norc

Activity Graph

Page 1 of 49 | Next »

2016-07-28

[16:10:29] norc: has joined #ruby-offtopic
[16:10:29] norc: has joined #RubyOnRails
[16:10:29] norc: has joined #ruby-community
[16:10:29] norc: has joined #ruby
[18:40:51] norc: Quit: Leaving

2016-07-02

[17:02:28] norc: has joined #ruby-offtopic
[17:02:28] norc: has joined #RubyOnRails
[17:02:28] norc: has joined #ruby-community
[17:02:28] norc: has joined #ruby
[22:21:17] norc: Read error: Connection reset by peer

2016-06-24

[08:41:23] norc: has joined #ruby
[09:21:22] norc: has left #ruby: ()

2016-06-23

[07:46:00] norc: has joined #ruby
[09:07:06] norc: has joined #RubyOnRails
[09:09:56] norc: I have a naming question. I have two models like this: https://gist.github.com/anonymous/dbd37d282361adb965727fcd5a2c6b92
[09:10:10] norc: What is a reasonable name for both has_many in Facility?
[09:11:36] norc: Oh! I think I have it nevermind.
[09:11:50] norc: active_loop_pathways and passive_loop_pathways seems like a good fit.
[09:22:45] norc: adac: do you have permissions to execute pg_dump ?
[09:31:05] norc: adac: run the entire command as specified in the output
[09:31:09] norc: adac: see what happens.
[09:33:53] norc: adac: One thing Im curious. The error message even told you what to do. Why did you still have no idea what you can do about it?
[09:34:01] norc: Note this is an honest question.
[09:46:26] norc: adac: it does not have to be installed via OS package manager.
[09:46:44] norc: adac: As the error message quite clearly indicated, it assumes the binary to be in $PATH
[09:47:27] norc: &ri Enumerable#any?
[09:47:30] norc: nofxx: ^-
[09:47:47] norc: adac: wherever its found in PATH first.
[09:48:16] norc: adac: or to rephrase: whichever directory first contains it in your PATH.
[09:49:19] norc: adac: Possibly. Type "which pg_dump" to find out.
[09:50:16] norc: &ri Array#empty?
[09:50:23] norc: nofxx: That also is not an activesupport method.
[09:50:39] norc: nofxx: Contrary to popular belief, Ruby is not based on Rails.
[09:52:11] norc: adac: Then it's likely, depending on what operating system you are running. :)
[10:03:04] norc: dionysus69: can you attach the output of rake routes?
[10:03:37] norc: dionysus69: also include the code that creates the form you mentioned.
[10:04:21] norc: andromedian: Look at your libraries manual.
[10:04:59] norc: andromedian: Ruby has no notion of Property and AdditionalSize
[10:05:27] norc: ?rails andromedian
[10:05:47] norc: You are welcome.
[10:07:25] norc: andromedian: Please include the actual code from whatever is related to this. Models, controllers, views.
[10:09:13] norc: dionysus69: What URL does the log show for the request that is routed wrongly?
[10:09:30] norc: (And HTTP verb for completeness)
[10:11:18] norc: ACTION hands codecodecode123 a class and some methods to play with
[10:11:55] norc: codecodecode123: what does it SEEM to do instead?
[10:13:08] norc: dionysus69: I think there has been a mixup between us.
[10:13:56] norc: dionysus69: You said some request ends up in the wrong controller/action. What HTTP verb/URL are you sending on that request? Please copy this from your log.
[10:14:45] norc: What HTTP verb/URL are you sending on that request? Please copy this from your log.
[10:15:01] norc: I can repeat myself again if you like.
[10:15:11] norc: What HTTP verb/URL are you sending on that request? Please copy this from your log.
[10:16:28] norc: dionysus69: What?
[10:16:37] norc: Thank you.
[10:45:46] norc: andromedian: Not sure what nested_attribute_lists is.
[10:46:46] norc: dionysus69: Can you include the definition of your Admin::ApplicationController?
[10:47:03] norc: andromedian: This by the way is what I meant by "check your libraries manual"
[10:50:45] norc: dionysus69: Please attach the full log for the request in question to your gist.
[10:50:50] norc: And please do not open *another*.
[10:54:34] norc: dionysus69: Started PATCH "/en/news/1" f
[10:54:38] norc: dionysus69: why did you lie to me?
[10:55:22] norc: dionysus69: [12:16] <dionysus69> Started GET "/en/admin/news/1/edit" for ::1 at 2016-06-23 14:16:05 +0400
[10:55:26] norc: dionysus69: That is not in the log.
[10:57:02] norc: What does what tell us
[10:57:08] norc: Which is correct?
[10:57:23] norc: dionysus69: Started PATCH "/en/news/1"
[10:57:25] norc: Routing is working fine.
[10:57:40] norc: Processing by NewsController#update as HTML
[10:57:49] norc: dionysus69: Look again.
[10:58:37] norc: dionysus69: You request PATCH "/en/news/1" which is fulfilled by the following route:
[10:58:38] norc: https://gist.github.com/anonymous/e933a0ce1f5e75dad5582f6fc1c5c65d#file-routes-output-L78
[10:58:45] norc: dionysus69: So your form is wrong.
[11:00:25] norc: dionysus69: form_for [:admin, admin_news], multipart: true
[11:01:22] norc: dionysus69: So. Next time first look at the log - and understand whats happening.
[11:05:18] norc: marahin: Don't fix code to please rubocop.
[11:05:32] norc: marahin: Configure rubocop to adhere whatever coding guidelines YOU want.
[11:06:14] norc: (About the only useful default setting rubocop has is to complain about double quoted strings without interpolation)
[11:07:34] norc: jhass: I think that is a brilliant example of why rubocop needs to be configured. ;-)
[11:09:31] norc: jhass: In my case it's just style.
[11:09:57] norc: If performance is relevant enough to justify subtle coding rules, then Ruby is by far a bad language pick.
[11:10:07] norc: (Outside of writing stdlib/core functionality)
[11:12:01] norc: dionysus69: again. start by looking at your log.
[11:12:15] norc: dionysus69: dont jump the queue. start with your log. start understanding what is happening.
[11:12:36] norc: Well that feels like a C influence.
[11:12:41] norc: Which is sensible.
[11:13:30] norc: dionysus69: the error you are getting is strong params validation. You told the controller that "admin_news" is required - but somehow its not present. So take a look at what is being sent.
[11:14:27] norc: Is that to allow for up to utf32 code points?
[11:14:57] norc: dionysus69: Too fast.
[11:15:02] norc: dionysus69: Read my last message.
[11:15:24] norc: dionysus69: Oh.
[11:15:35] norc: Well that is a different problem.
[11:16:48] norc: dionysus69: you can redirect request all you want.
[11:17:18] norc: (Do not understand this as a hint that what you are doing is a great idea)
[11:27:26] norc: jhass: Perhaps Crystal will be my first language to be supported in a year from now when I have userspace support. :o)
[11:28:17] norc: AimlessRaven: How do you get the ID of current admin?
[11:29:06] norc: Great idea jhass! The biggest cost in kernel memory management is freeing pages.
[11:29:11] norc: I should simply use a garbage collector.
[11:30:01] norc: See, my operating system will be running on valgrind.
[11:30:15] norc: Whenever valgrind determines a program probably doesn't use some memory anymore, it gets taken from it.
[11:30:41] norc: Gone are the days of buggy software stealing your memory.
[11:32:14] norc: I would call it libnfaalloc though.
[11:32:26] norc: As in never free again alloc.
[11:38:20] norc: Based on your descriptive description it is clear what caused your crash.
[12:05:14] norc: binaryplease: Did you bother to even look at the first line of the README?
[12:07:50] norc: binaryplease: Fair enough. Well Im fairly certain that it won't provide you with access to music.
[12:08:04] norc: binaryplease: https://developer.spotify.com/web-api/endpoint-reference/
[12:08:14] norc: binaryplease: there you can see the full extend of what the api offers.
[12:09:40] norc: binaryplease: note if you click on for example "Get a track" you will get a full description of what that endpoint offers.
[12:12:21] norc: binaryplease: Apologies for my harsh remark.
[12:16:14] norc: jhass: That is neat. Wasn't aware you could create an associated model that way. :)
[12:22:36] norc: dionysus69: The problems you figure out yourself are the best. :)
[12:23:04] norc: No idea what that meant.
[12:23:11] norc: But nice that you figured it out.
[12:25:16] norc: has joined #ruby-offtopic
[12:25:32] norc: So. My colleague correctly pointed out to me, that I have been whistling christmas songs all day long..
[12:25:57] norc: DeBot: !hangman ruby 3
[12:26:00] norc: DeBot: d
[12:26:01] norc: DeBot: :
[12:26:03] norc: DeBot: e
[12:26:07] norc: DeBot: s
[12:26:09] norc: DeBot: s
[12:26:09] norc: DeBot: s
[12:26:09] norc: DeBot: s
[12:26:09] norc: DeBot: s
[12:26:10] norc: DeBot: s
[12:26:17] norc: jhass: Why is your bot unresponsive at times?
[12:29:24] norc: apeiros: So Im just too fast for hangman.
[12:29:33] norc: DeBot: OpenSSL
[12:29:49] norc: P_e_ o_o
[12:30:40] norc: DeBot: k
[12:30:41] norc: DeBot: pkey
[12:31:25] norc: DeBot: c
[12:33:23] norc: DeBot: t
[12:36:07] norc: jhass: except with playing in hardcore mode I dont want to guess more than one letter at a time :p
[12:36:40] norc: DeBot: r
[12:36:50] norc: DeBot: _
[12:37:07] norc: DeBot: #
[12:37:48] norc: DeBot: g
[12:37:52] norc: DeBot: u
[12:37:55] norc: ACTION hoorays
[12:40:23] norc: jhass: One of the few things I really dislike about Ruby is how methods can be called without an explicit receiver. Does Cr share this peculiarity?
[12:40:42] norc: (This whole variable shadowing behaviour hack in the lexer is super disgusting)
[12:43:34] norc: Well granted, it allows for sleek looking DSLs that is for sure.
[12:43:56] norc: (Couldn't imagine RSpec using self.it {})
[12:46:07] norc: Well adding self as a receiver does not increase the size of your methods or classes.
[12:46:59] norc: See, in a way ruby feels like variables are dynamically created - when in reality they are not.
[12:47:11] norc: In reality Ruby does what C does, but not at compile time but at lexing time.
[12:50:39] norc: >> def f; p binding.local_variable_get(:f); f = 0; end; f()
[12:50:50] norc: jhass: Things like that are just mindblowing.
[12:52:51] norc: apeiros: heh, I even use explicit self.method in some cases
[12:53:16] norc: Example is for indenting some forms of method chaining
[12:53:36] norc: https://gist.github.com/anonymous/81e9107d82763dc21a34dbf16943c219
[12:54:13] norc: apeiros: you are writing a toy language?
[12:54:39] norc: jhass: In my case it makes more sense to indent it like that becuase of what the methods do.
[12:54:43] norc: It is a rare case though.
[13:51:05] norc: User458764: Don't use ActiveRecord
[13:51:13] norc: User458764: your models are just classes.
[14:35:38] norc: Ping timeout: 250 seconds

2016-06-22

[16:32:13] norc: has joined #ruby-offtopic
[16:32:13] norc: has joined #RubyOnRails
[16:32:13] norc: has joined #ruby-community
[16:32:13] norc: has joined #ruby
[16:36:57] norc: >> Process.send(:SIGBUS, $$)
[16:37:10] norc: >> Process.kill(:SIGBUS, $$)
[16:42:14] norc: Well the tzinfo gem has the information in a file.
[16:42:23] norc: At the very least its extractable.
[16:50:18] norc: dRbiG, your filesystem sucks if the ruby code changed while you stopped doing anything to it. :p
[18:43:26] norc: kallisti6, I think it's a design thing. Perhaps you need to transmit a large object across the network as part of a POST request - at that point you may not want the object transmitted back again.
[18:44:36] norc: desnudopenguino, models dont 'pick info from the form'
[18:44:55] norc: desnudopenguino, models have available whatever you give to them (usually the controller or perhaps a service module)
[18:45:43] norc: skwp, what native extensions are you running?
[18:46:01] norc: skwp, or actually - just gist the segfault screen. ;-)
[18:49:46] norc: skwp, gist a seg fault screen then.
[18:50:51] norc: Great. :)
[18:56:06] norc: Well it is a memory issue.
[18:56:39] norc: skwp, I think the only way you can sensibly debug this is if you rebuild ruby and attach a memory debugger like valgrind.
[18:58:12] norc: havenwood, what do you think looking at the C stacktrace?
[19:05:48] norc: havenwood, from what I can tell is that this particular line triggers the segmentation fault https://github.com/ruby/ruby/blob/v2_3_1/gc.c#L688
[19:06:24] norc: (The pointer seems to have been smashed, leading to a page fault)
[19:11:26] norc: skwp, well its always the same line of code in the gc.c:1067 triggering this.
[19:11:50] norc: skwp, some stress test creating objects might be able to more reliably produce the crash.
[19:11:59] norc: skwp, no its not about the GC.
[19:12:11] norc: or its impossible to tell.
[19:13:26] norc: skwp, can you attach the loaded features from the sigsegv screen?
[19:15:37] norc: skwp, logically this function is the problem: heap_get_freeobj_from_next_freepage
[19:17:48] norc: skwp, no because Im not exactly sure whats broken. From the call path the ruby object heap is screwed up somehow.
[19:18:09] norc: skwp, you don't want to leak the memory. create objects and lose the references
[19:19:23] norc: skwp, and get started by compiling ruby yourself.
[19:25:55] norc: skwp, sure. But you will have to use a memory debugger yourself in all likelihood.
[19:26:51] norc: apawl, what gem are you trying to install?
[19:27:23] norc: apawl, and please gist the entire error message
[19:30:47] norc: apawl, though from the looks of it the build process is not using the correct ruby header.
[19:31:35] norc: apawl, how is your Ruby installed?
[19:32:28] norc: ACTION steps backwards
[19:34:07] norc: Would you prefer I pretended I had experience with heroku?
[19:35:14] norc: apawl, it just never occured to me to install ruby by unpacking a prepackaged directory from someone
[19:35:56] norc: isberg, yes.
[19:37:01] norc: isberg, assuming you are on a regular PC, you can probably get as high as 2^47-1 or around that ballpark.
[19:37:24] norc: (as in that amount of memory to represent your number)
[19:37:47] norc: So my female neighbor is having orgasms.. quite loudly in fact.
[19:38:47] norc: Which will rightfully give you Infinity.
[20:04:04] norc: Read error: Connection reset by peer

2016-06-21

[08:35:23] norc: has joined #ruby
[08:35:31] norc: has joined #ruby-offtopic
[09:11:48] norc: has joined #RubyOnRails
[09:43:26] norc: You are right jhass.
[09:43:27] norc: Slashdot is.
[10:10:56] norc: Ping timeout: 250 seconds

2016-06-20

[20:35:26] norc: It will tell you precisely which part of the code is the offending bit.
[21:06:25] norc: albedoa, you could write your own method on Symbol that implements it.
[21:08:21] norc: albedoa, https://eval.in/592337
[21:08:23] norc: example code included.
[21:09:28] norc: scorphus, expect(ary).to include(1) ?
[21:09:44] norc: scorphus, note that it works on any object that responds to #include?
[21:10:04] norc: scorphus, what do you mean?
[21:11:46] norc: scorphus, you can simply use enumerable
[21:11:58] norc: scorphus, mmm
[21:12:27] norc: scorphus, you dont have to put the subject into the expect()
[21:13:48] norc: scorphus, rspec does not have such a matcher built in that I am aware of
[21:14:31] norc: scorphus, how do opt1, opt2 and opt3 relate to testing_method ?
[21:15:35] norc: scorphus, then test against the one you expect the method to return.
[21:16:01] norc: Given some input the method should behave predictably. If there is a random component, use seeds and mocks to enforce it.
[21:16:20] norc: Otherwise you have a case where a test might sometimes fail depending on what it returns.
[21:18:49] norc: Surely apeiros has been a good boy and documented the code.
[21:23:10] norc: its updating?
[21:24:44] norc: skroon, you can simply change the adapter configuration and force a reconnect if you insist.
[21:24:55] norc: But I really don't see why you would want that.
[21:25:20] norc: Human cronjob?
[21:26:32] norc: http://guides.rubyonrails.org/active_record_querying.html#using-array-hash-of-named-associations
[21:26:57] norc: Clearly the problem is your sleeping rhythm.
[21:27:48] norc: Oh neat. Ill check it out if I have some time.
[21:28:01] norc: Though toying around with kernel development leaves me with not much time these days. :(
[21:28:27] norc: wrkrcoop, play around with rack middleswares to find out whats so nice about it.
[21:28:54] norc: wrkrcoop, well rack itself is just an interface.
[21:29:08] norc: wrkrcoop, yes. and so does sinatra.
[21:35:06] norc: wrkrcoop, the best way to recognize the value of a particular part is to interact with it enough until you get a feeling for it.
[21:35:30] norc: wrkrcoop, because no matter what I tell you its gonna be biased.
[21:35:43] norc: And you won't know any better other than to quote someone who said something on some IRC channel
[21:35:48] norc: who may or may not be a complete dork.
[21:37:36] norc: Alright Im heading to bed good night.
[21:38:18] norc: Read error: Connection reset by peer