« Back to channel list

#ruby - 07 June 2017

« Back 1 day Forward 1 day »
[00:03:36] zenguy_pc: has joined #ruby
[00:13:30] patr0clus: has joined #ruby
[00:13:38] zenguy_pc: has joined #ruby
[00:16:00] trampy: has joined #ruby
[00:18:42] brent__: has joined #ruby
[00:19:49] Trynemjoel: has joined #ruby
[00:25:13] bkxd: has joined #ruby
[00:28:24] blackmesa: has joined #ruby
[00:28:47] mostlybadfly: has joined #ruby
[00:40:06] olivier__: has joined #ruby
[00:41:35] rkazak_: has joined #ruby
[00:46:11] Jameser: has joined #ruby
[00:52:54] Tempesta: has joined #ruby
[00:52:56] rikai: has joined #ruby
[00:54:11] ecuanaso: has joined #ruby
[00:55:21] jgt3: has joined #ruby
[00:56:43] rikai: has joined #ruby
[01:04:16] rikai: has joined #ruby
[01:04:28] charliesome: has joined #ruby
[01:11:11] stormbytes: what does this phrase 'say' in Ruby terms: Application::Console.prompt.display
[01:11:14] enterprisey: has joined #ruby
[01:11:27] stormbytes: is Application a class with Console as a method or module?
[01:12:10] elomatreb: Application is a module, Console is (probably) a class, and prompt and display are methods
[01:12:39] stormbytes: chained methods?
[01:13:03] elomatreb: (Application::Console.prompt).display
[01:13:06] stormbytes: meaning... <execute>display and pass the output onto prompt
[01:13:41] elomatreb: No, it calls prompt on Console, and then .display on the return value of that
[01:13:48] olivier__: has joined #ruby
[01:14:18] mitt3ns: has joined #ruby
[01:14:19] stormbytes: Oh, i see.. ok. so, simplifying it a bit, assuming I'm not using a module... I would define a class called Console and some methods, and then I could just call them with Console::method without instantiating the class?
[01:14:42] ineb: like Human::Male.mouth.speak :)
[01:14:54] stormbytes: lol ineb well put
[01:15:17] elomatreb: If you need to call the methods without instantiation you need to define them as such
[01:15:27] stormbytes: how is it you don't need to George = new Male
[01:15:41] elomatreb: `def method` vs. `def self.method`, where the latter is callable on the Class (that is without instantiation)
[01:15:41] stormbytes: elomatreb how do you do that?
[01:16:19] bougyman: ideally (imo), self.thing is just an alternate way to instantiate the class.
[01:16:19] havenwood: stormbytes: "Application is a #{Application.class} and Application::Console is a #{Application::Console.class} with a #{Application::Console.class.downcase} method ::prompt which returns a #{Application::Console.prompt.class}."
[01:16:47] stormbytes: havenwood wow.. that's a mouthful :)
[01:16:50] bougyman: for "helper" type methods I'd use a Module.method
[01:16:53] havenwood: stormbytes: Run it!
[01:17:34] forgot: has joined #ruby
[01:17:38] havenwood: stormbytes: That ^ string
[01:17:47] stormbytes: in... that eva thing?
[01:17:56] ruby[bot]: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
[01:18:09] stormbytes: havenwood: NameError: uninitialized constant Application
[01:18:18] havenwood: stormbytes: require your code first
[01:18:34] stormbytes: i don't have any
[01:18:41] stormbytes: its pseudocode from an example
[01:19:03] stormbytes: i was trying to figure out what it was
[01:19:05] havenwood: stormbytes: Then nevermind!
[01:19:16] stormbytes: Pry vs IRB for simple stuff?
[01:19:19] havenwood: stormbytes: But if it was code, you can introspect thusly.
[01:19:38] havenwood: stormbytes: Either.
[01:19:39] havenwood: stormbytes: Most pry users solely use pry.
[01:19:46] havenwood: Unless pry isn't installed for whatever reason.
[01:20:13] stormbytes: i sometimes use irb to test out code
[01:20:22] stormbytes: seems to work well enough
[01:20:23] havenwood: stormbytes: There's no harm in starting with pry. It's probably more intuitive than irb.
[01:20:30] havenwood: stormbytes: gem install pry
[01:20:32] stormbytes: gem install pry
[01:21:15] uZiel: has joined #ruby
[01:21:15] stormbytes: nice color coding
[01:21:43] S1kx: has joined #ruby
[01:21:50] havenwood: stormbytes: If you'd like fancier colors: gem install pry-theme
[01:22:17] havenwood: stormbytes: In my ~/.pryrc I set: Pry.config.theme = 'railscasts'
[01:22:38] havenwood: Speaking of which, I should make a theme to match my editor.
[01:22:43] elomatreb: Depending on your terminal emulator you can change its colors too
[01:23:41] stormbytes: pretty cool :)
[01:23:47] stormbytes: i use mostly iterm2
[01:24:08] poloych: has joined #ruby
[01:24:34] stormbytes: its cool that you can look up the methods of anything and get color coded output
[01:30:17] jcao219: has joined #ruby
[01:30:47] bruce_lee: has joined #ruby
[01:30:47] bruce_lee: has joined #ruby
[01:31:11] DoubleMalt: has joined #ruby
[01:33:27] stormbytes: what does this mean (the last part I get, its splitting a string on a delimiter) : command, *params = input.split /\s/
[01:33:30] Hanmac: has joined #ruby
[01:33:55] stormbytes: this is preceded by input = gets.chomp
[01:34:24] d^sh: has joined #ruby
[01:39:05] mim1k: has joined #ruby
[01:39:36] cjhowe7: has joined #ruby
[01:40:22] havenwood: stormbytes: In irb or pry try: head, *tail = [1, 2, 3, 4]
[01:40:57] stormbytes: oh thats way cool
[01:41:20] havenwood: stormbytes: Or try: head, *body, tail = [1, 2, 3, 4]
[01:41:47] stormbytes: lets say i have a string and I want to test it for certain substrings and perform an action if one is found, would that be best served with case/when or if/elsif?
[01:42:28] trampy: has joined #ruby
[01:42:35] stormbytes: havenwood that's nuts.. so first one goes to the first var, then last elem to the last variabe, and everything else gets dumped into *body
[01:46:38] KnownSyntax: has joined #ruby
[01:46:53] dc2: has joined #ruby
[01:50:10] gizmore|2: has joined #ruby
[01:55:08] mim1k: has joined #ruby
[02:01:45] czeq: has joined #ruby
[02:02:55] ascarter: has joined #ruby
[02:09:22] duderonomy: has joined #ruby
[02:10:44] mrconfused: has joined #ruby
[02:11:03] mim1k: has joined #ruby
[02:16:31] Frem: has joined #ruby
[02:20:30] genpaku: has joined #ruby
[02:26:51] bkxd: has joined #ruby
[02:30:25] knight33: has joined #ruby
[02:31:54] A124: has joined #ruby
[02:41:40] cschneid_: has joined #ruby
[02:46:09] mim1k: has joined #ruby
[02:48:26] sleetdrop: has joined #ruby
[02:50:47] jcao219: has joined #ruby
[02:56:31] jgt3: has joined #ruby
[03:02:05] mim1k: has joined #ruby
[03:05:34] Ferdroid: has joined #ruby
[03:09:17] gusrub: has joined #ruby
[03:11:57] jackjackdripper: has joined #ruby
[03:13:48] jackjackdripper: has joined #ruby
[03:18:07] Ferdroid: has joined #ruby
[03:24:49] AnoHito_: has joined #ruby
[03:26:15] gix: has joined #ruby
[03:33:46] cfec0b8d: has joined #ruby
[03:35:26] jenrzzz: has joined #ruby
[03:40:10] jgnagy: has joined #ruby
[03:47:53] uZiel: has joined #ruby
[03:51:22] Immune: has joined #ruby
[03:52:07] arescorpio: has joined #ruby
[03:52:21] perniciouscaffei: has joined #ruby
[04:04:28] stormbytes: is this illegal elsif input.include?("calories" || "calorie")?
[04:05:09] havenwood: stormbytes: "calories" || *anything here* #=> "calories"
[04:05:14] lostapathy: "legal", yes. What you want, doubtful
[04:05:37] stormbytes: i can use a regex to append the optional 's'
[04:06:11] mim1k: has joined #ruby
[04:06:12] lostapathy: think about it from the inside of parenthesis out, like havenwood did
[04:06:48] dasher00: has joined #ruby
[04:07:00] lostapathy: input.include?("calorie") probably does what you want in that case, since you aren't matching on anything else afterward - it allows the s or anything else
[04:07:12] stormbytes: so that becomes an if (foo) || do something else
[04:07:29] stormbytes: lostapathy good point
[04:07:34] stormbytes: didn't see that
[04:11:12] rohitpaulk: has joined #ruby
[04:11:48] patarr: has joined #ruby
[04:12:02] nowhere_man: has joined #ruby
[04:23:07] Cohedrin: has joined #ruby
[04:24:15] renchan: has joined #ruby
[04:29:38] knight33: has joined #ruby
[04:31:16] nofxxx: has joined #ruby
[04:31:25] jenrzzz: has joined #ruby
[04:31:25] jenrzzz: has joined #ruby
[04:33:22] AnoHito: has joined #ruby
[04:33:58] enterprisey: has joined #ruby
[04:35:03] ascarter: has joined #ruby
[04:40:04] ascarter: has joined #ruby
[04:40:12] AnoHito_: has joined #ruby
[04:43:44] AnoHito: has joined #ruby
[04:43:59] ascarter_: has joined #ruby
[04:45:22] jcao219: has joined #ruby
[04:45:58] Bock: has joined #ruby
[04:46:14] skixlix: has joined #ruby
[04:48:31] skixlix: Why is it that with the lcm method you would have 9.lcm(3) where 9 is the receiver and 3 is the argument, but for a self defined thing, like
[04:48:54] skixlix: def add_two_numbers(x, y)
[04:49:16] skixlix: you would have to use it without a receiver, and just use two arguments?
[04:49:45] skixlix: add_two_numbers(5, 2) would output 7, but why not have it be
[04:49:56] skixlix: 5.add_two_numbers(2)
[04:50:18] skixlix: I don't see any reason the 9 needs to be in front for the lcm, 3 and 9 are just two things needed right, nothing special about the 9
[04:50:32] jenrzzz: has joined #ruby
[04:50:54] Arahael: skixlix: Because it doesn't scale. Why should "add_two_numbers" be a property of integers?
[04:51:04] Arahael: skixlix: But sure, if you have a 10-line script, do it that way.
[04:51:17] Arahael: skixlix: But where I am, I count lines of code in the millions.
[04:52:45] skixlix: what do you mean "be a property of integers?"
[04:53:02] skixlix: both use integers, rite? the lcm and the adding numbers one
[04:53:46] skixlix: what is the point of the receiver vs the argument?
[04:53:56] Arahael: skixlix: Ruby has single-dispatch.
[04:54:12] skixlix: the 9 in 9.lcm(3) is the receiver and the 3 is the argument, correct?
[04:54:14] Arahael: skixlix: It determines which method you want to use by way of single dispatch - the reciever dictates which method is called.
[04:54:48] skixlix: oh interesting
[04:54:52] skixlix: I'm gonna read more about that
[04:55:23] Arahael: skixlix: Generally speaking, most object oriented systems are single dispatch - only a very few support multiple dispatch.
[04:55:32] Arahael: skixlix: So what you learn there is likely to be general.
[04:55:40] skixlix: so the receiver is just the 9, or the 9.lcm as a group
[04:55:59] skixlix: the lcm is the part that ensures the program knows which method I'm trying to use right
[04:56:06] mitt3ns: has joined #ruby
[04:56:09] Arahael: skixlix: The receiver there is the 9. lcm is the name of the message you are sending to it, with the arguments.
[04:56:42] skixlix: why is it they couldn't have done it
[04:57:27] cschneid_: has joined #ruby
[04:57:59] Arahael: skixlix: They could have done it that way. But I guess the writer decided that all integeres should support that.
[04:58:05] jgt3: has joined #ruby
[04:58:26] Axsuul: has joined #ruby
[04:58:31] Arahael: skixlix: Though personally, I'd like to put it into some sort of math library, but the advantage of putting it into the integer class means that you can have a sorta-infix style of writing.
[04:58:54] Arahael: skixlix: lcm(9, 3) <-- That's prefix. 9.lcm(3) <-- Sorta-infix.
[04:59:06] Arahael: And most people are more comfortable with infix style when doing maths.
[04:59:35] dminuoso: arahael: I would not call this infix style no matter how many beer I had.
[04:59:36] skixlix: wow ok thank you very much
[04:59:59] skixlix: I'm very new to ruby, sorry I sound like such a noob
[05:00:06] skixlix: thanks for the help though, you've given me some to read up on too :)
[05:00:19] Arahael: dminuoso: Yeah. Even "sorta infix" style is pushing it. :(
[05:00:38] Cohedrin: has joined #ruby
[05:01:15] skixlix: I'm not sure what infix and prefix are referring to when talking about coding, I'm googling lol
[05:01:38] dminuoso: skixlix: prefix: + 1 2
[05:01:42] dminuoso: postfix 1 2 +
[05:01:45] Arahael: skixlix: It's not infix, however I was hoping to suggest that the way it's written is different. Google RPN notation, vs infix.
[05:01:45] dminuoso: infix 1 + 2
[05:01:49] dminuoso: function style: add(1, 2)
[05:01:55] dminuoso: method style: 1.add(2)
[05:02:06] dminuoso: or the more ruby-like variant
[05:02:08] skixlix: oh it has to do with the location of the operator
[05:02:08] Arahael: skixlix: l-expr style: (+ 1 2)
[05:02:15] Arahael: skixlix: m-expr style: +(1 2)
[05:02:27] dminuoso: skixlix: Yeah. It's basically a parsing thing.
[05:02:28] boombox_: has joined #ruby
[05:02:42] Arahael: skixlix: Haskell infix style: 1 `add` 2
[05:02:48] dminuoso: skixlix: and some notations, like the Polish notation for mathematics, dont use infix.
[05:03:02] skixlix: 3.times do
[05:03:07] hutch34: has joined #ruby
[05:03:09] Arahael: skixlix: But in this particular case with ruby, it also becomes a code organisation thing.
[05:03:09] skixlix: does that have an infix postfix
[05:03:10] skixlix: type thing
[05:03:12] dminuoso: skixlix: no
[05:03:15] skixlix: or no because there's only a 3
[05:03:17] dminuoso: skixlix: it's method-style
[05:03:27] skixlix: so in ruby it can change
[05:03:36] skixlix: like I could define something as infix or otherwise
[05:04:02] rohitpaulk: has joined #ruby
[05:04:17] dminuoso: skixlix: no
[05:04:33] dminuoso: skixlix: infix operators are hardwired into the parser
[05:04:40] dminuoso: skixlix: but they are overloadable
[05:05:04] Arahael: skixlix: In other languages, any standalone function can be used infix style, but not in ruby.
[05:05:19] Arahael: skixlix: (Eg, the backticks for the haskell version I gave)
[05:05:37] dminuoso: skixlix: And by overloadable I mean: you can take any class, define the method :+ on it, and then you can take two objects like car1 and car2 and do: result = car1 + car2
[05:06:09] Arahael: Note, there, that in ruby, even that uses single-dispatch to resolve the operator.
[05:06:25] dminuoso: Or in some cases not even that. :-)
[05:07:13] dminuoso: arahael: Are you new around here? I distinctly remember seeing your name in the C++ channels
[05:07:18] dminuoso: And by here I mean #ruby
[05:07:26] skixlix: I'll brb thanks tho guys :D
[05:08:28] aupadhye: has joined #ruby
[05:17:03] ascarter: has joined #ruby
[05:21:37] nimboo: has joined #ruby
[05:23:43] harfangk: has joined #ruby
[05:24:30] nalread: has joined #ruby
[05:25:17] nimboo: has joined #ruby
[05:25:39] aupadhye: has joined #ruby
[05:27:41] __Yiota: has joined #ruby
[05:27:43] uZiel: has joined #ruby
[05:32:56] szu: has joined #ruby
[05:35:50] aufi: has joined #ruby
[05:36:50] morfin: has joined #ruby
[05:37:16] Arahael: dminuoso: I come and go, but I suppose I am still relatively new to #ruby.
[05:37:35] morfin: returning to Random - seems like there is only uniform distribution
[05:37:47] dminuoso: morfin: What do you mean?
[05:38:12] morfin: did you see how many distributions has <random> in C++?
[05:38:12] dminuoso: Random is just your standard MT19337 PRNG
[05:38:23] morfin: uniform, discrete, gamma, bernoulli etc
[05:38:55] dminuoso: morfin: Ruby is rarely used in scientific scenarios. It's kind of a devils circle I guess.
[05:39:38] dminuoso: morfin: Be glad that the OpenSSL support is plugged in so well. :-)
[05:39:44] Arahael: morfin: I often see scientific circles using python.
[05:40:02] Arahael: Though, Julia seems to be growing.
[05:40:03] dminuoso: Which again is yet another devils circle.
[05:40:37] morfin: poor perfomance for their purposes?
[05:41:33] Arahael: morfin: On the contrary, it has pretty good performance. Together with tools such as ipython (know known as Jupyter), it's pretty good. The problem is that the toolchain is a bit of a mess.
[05:41:50] dminuoso: Jupyter? Really?
[05:41:59] dminuoso: That is such terrible naming..
[05:42:40] pwnd_nsfw`: has joined #ruby
[05:42:43] morfin: i think GCC is real mess: )
[05:42:58] dminuoso: morfin: GCC is old.
[05:43:04] Arahael: GCC is very old.
[05:43:13] dminuoso: morfin: Most GNU projects are a mess because they have evolved from 20-30 years of development.
[05:43:24] morfin: and Python is not such mess
[05:43:24] dminuoso: Just look at autotools
[05:43:29] dminuoso: GCC is completely harmless
[05:43:35] morfin: autotools is thing i avoid
[05:44:13] Arahael: dminuoso: It's a better name than "ipython". ;)
[05:44:39] morfin: well, most cases require uniform distribution
[05:45:54] zenguy_pc: has joined #ruby
[05:46:08] jenrzzz: has joined #ruby
[05:46:08] jenrzzz: has joined #ruby
[05:52:28] Arahael: morfin: I'd be careful claiming that.
[05:52:54] Arahael: morfin: The nature of the distribution tends to be quite significant. Gaming, vs encryption scenarios, for instance.
[05:53:20] Arahael: When I am doing tests, I even like _predicably-random_ distributions.
[05:53:48] matthewd: morfin: I think SciRuby might cover that domain
[05:54:14] rohitpaulk: has joined #ruby
[05:54:56] Arahael: morfin: If you're looking at that, see if this works for you: https://github.com/SciRuby/iruby
[05:56:27] anisha: has joined #ruby
[06:03:59] gothicsouth: has joined #ruby
[06:05:42] zenguy_pc: has joined #ruby
[06:07:04] Jameser: has joined #ruby
[06:07:29] Cohedrin: has joined #ruby
[06:12:48] Mortomes|Work: has joined #ruby
[06:16:52] jenrzzz: has joined #ruby
[06:16:52] jenrzzz: has joined #ruby
[06:19:00] xall: has joined #ruby
[06:21:36] Bhootrk_: has joined #ruby
[06:22:14] mim1k: has joined #ruby
[06:22:26] audy: has joined #ruby
[06:22:38] ascarter: has joined #ruby
[06:22:59] vali: has joined #ruby
[06:36:03] dionysus69: has joined #ruby
[06:38:58] Pumukel: has joined #ruby
[06:42:08] Pumukel: has joined #ruby
[06:43:01] Pumukel: has joined #ruby
[06:43:11] andikr: has joined #ruby
[06:44:07] yogg-saron: has joined #ruby
[06:53:25] saltsa: has joined #ruby
[06:53:26] mim1k: has joined #ruby
[06:59:12] morfin: i am not sure which distribution used in encryption - as example when you use OpenSSL for that
[07:03:01] morfin: https://crypto.stanford.edu/pbc/notes/crypto/prng.html this says uniform {0,1}^n
[07:05:08] zenguy_pc: has joined #ruby
[07:06:13] rkazak: has joined #ruby
[07:07:47] claw: has joined #ruby
[07:09:44] SeepingN: has joined #ruby
[07:09:56] jgt3: has joined #ruby
[07:10:23] rohitpaulk: has joined #ruby
[07:16:55] Hanna: has left #ruby: ("WeeChat 1.9-dev")
[07:19:21] nanoz: has joined #ruby
[07:19:21] nanoz: has joined #ruby
[07:19:37] JoshS: has joined #ruby
[07:21:55] HoloIRCUser1: has joined #ruby
[07:22:00] mark_66: has joined #ruby
[07:23:30] aufi: has joined #ruby
[07:23:45] Silthias1: has joined #ruby
[07:26:24] blackmesa: has joined #ruby
[07:33:58] zenguy_pc: has joined #ruby
[07:34:34] rohitpaulk: has joined #ruby
[07:36:44] patarr: has joined #ruby
[07:39:30] zipace: has joined #ruby
[07:41:30] burgestrand: has joined #ruby
[07:41:37] jgnagy: has joined #ruby
[07:41:38] psychicist__: has joined #ruby
[07:42:35] Jameser: has joined #ruby
[07:43:33] c00kiemon5ter: has joined #ruby
[07:44:27] c00kiemon5ter: is there any case where the following would evaluate to true?
[07:44:34] c00kiemon5ter: if octets.any? { |_| false }
[07:44:48] glejeune: has joined #ruby
[07:50:56] ljarvis: c00kiemon5ter: no
[07:51:31] bkxd: has joined #ruby
[07:52:00] c00kiemon5ter: thanks, my understanding is correct
[07:52:33] blackwind_123: has joined #ruby
[07:52:50] c00kiemon5ter: has left #ruby: ()
[07:55:54] apeiros: too bad they left, wanted to tell them that they could leave |_| away :)
[07:56:54] z3uS: has joined #ruby
[07:58:14] charliesome: has joined #ruby
[07:58:18] mikecmpbll: has joined #ruby
[07:58:57] davic: has joined #ruby
[07:58:59] dn`: has joined #ruby
[08:03:34] hurricanehrndz: has joined #ruby
[08:03:40] nanoz]: has joined #ruby
[08:03:42] Antiarc: has joined #ruby
[08:03:46] workmad3: has joined #ruby
[08:04:28] dminuoso: morfin: The problem is that encryption requires more than uniformity.
[08:04:29] burgestrand: has joined #ruby
[08:04:34] dminuoso: or crypto rather.
[08:06:01] dminuoso: morfin: A simple sequence that overflows for example is a perfectly uniform distribution.
[08:06:03] Burgestr_: has joined #ruby
[08:07:54] mikecmpbll: hello this splendid morning
[08:08:18] dminuoso: (i.e. golombs randomness postulates, maurers universal statistical test, etc)
[08:08:33] dminuoso: Uniformity just is not enough.
[08:09:52] dminuoso: ljarvis: I can see a case where it would evaluate to true.
[08:10:16] dminuoso: >> class F; def any; true; end; end; octets = F.new; puts octets.any? { |_| false }
[08:10:22] ruby[bot]: dminuoso: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[08:10:26] dminuoso: >> class F; def any; true; end; end; octets = F.new; puts octets.any? { |_| false }
[08:10:30] dminuoso: ACTION kicks ruby[bot]
[08:10:32] ruby[bot]: dminuoso: I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
[08:10:35] dminuoso: ACTION punches ruby[bot]
[08:10:37] dminuoso: >> class F; def any; true; end; end; octets = F.new; puts octets.any? { |_| false }
[08:10:44] ruby[bot]: dminuoso: I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
[08:10:47] dminuoso: ACTION sighs
[08:11:04] ljarvis: your code is wrong anyway
[08:11:12] ljarvis: but yes, you pedant
[08:11:25] dminuoso: I was hoping to win a cookie
[08:11:30] dminuoso: and failed miserably at nitpicking.
[08:11:35] ljarvis: yep, no cookie for you
[08:12:32] gusrub: has joined #ruby
[08:13:17] rohitpaulk: has joined #ruby
[08:15:40] dennisvennink: has joined #ruby
[08:16:44] vali: has joined #ruby
[08:20:06] nanoz: has joined #ruby
[08:21:22] mim1k: has joined #ruby
[08:22:10] PatrikasZvaigzde: has joined #ruby
[08:23:15] bvcosta: has joined #ruby
[08:23:43] workmad3: oh, random distributions? fun :)
[08:24:33] fxa90id: has joined #ruby
[08:24:33] fxa90id: has joined #ruby
[08:24:43] zenguy_pc: has joined #ruby
[08:28:20] aufi: has joined #ruby
[08:29:26] Jameser`: has joined #ruby
[08:31:06] Jameser: has joined #ruby
[08:31:08] dminuoso: ACTION hides workmad3's cookies using a random distribution
[08:31:14] dminuoso: Good luck finding them.
[08:32:56] universa1: pseudo random? ;)
[08:34:43] HoloIRCUser2: has joined #ruby
[08:35:32] xall: has joined #ruby
[08:35:34] herwin: it's easy to find them: it were tracking cookies
[08:35:45] Otti: has joined #ruby
[08:37:32] Antiarc: has joined #ruby
[08:37:33] dionysus69: has joined #ruby
[08:39:18] navycrosser: has joined #ruby
[08:40:36] zenguy_pc: has joined #ruby
[08:44:35] pandaant: has joined #ruby
[08:47:08] Jameser: has joined #ruby
[08:47:39] Pumukel: has joined #ruby
[08:48:15] mim1k: has joined #ruby
[08:48:37] Pumukel: has joined #ruby
[08:49:01] bvcosta: has joined #ruby
[08:49:44] Pumukel: has joined #ruby
[08:50:28] ur5us: has joined #ruby
[08:52:29] mikecmpbll: has joined #ruby
[08:55:22] Pumukel: has joined #ruby
[08:56:06] lxsameer: has joined #ruby
[08:57:11] rgr: has joined #ruby
[08:58:27] dminuoso: herwin: In soviet russia cookies track you.
[08:58:27] cschneid_: has joined #ruby
[08:59:39] apeiros: shouldn't that be the other way round?
[09:00:01] apeiros: since in the normal world, cookies track you, it'd be "In soviet russia, you track cookies"?
[09:00:30] herwin: Chuck Norris doesn't need breadcrumbs, he has tracking cookies
[09:01:04] workmad3: I wish I could track cookies... I'm hungry :(
[09:01:40] antgel: has joined #ruby
[09:02:02] workmad3: also, I really need to uphold my culture better and start calling them 'tracking biscuits'
[09:02:33] dminuoso: apeiros: I turned it around since herwin implied already that a tracking cookie means you could track the cookie, thus making the cookies easy to find,
[09:03:23] dminuoso: Though I admit Im kind of pulling a Sheldon there.
[09:03:52] workmad3: s/Im/I'm/ :P
[09:04:46] workmad3: (seriously, your pedantism is not kicking in fully today, is it? :) )
[09:05:01] dminuoso: You are right. I give up today.
[09:05:20] dminuoso: Opioid painkillers seem to have an impact on my brain.
[09:05:30] apeiros: can you give it to me? I'm still in need of a today.
[09:05:38] workmad3: heh :) well, that is kinda what they're meant to do
[09:05:44] apeiros: oy? what are you on and why?
[09:06:04] workmad3: given he's able to type, I'm guessing codeine?
[09:08:29] Terens: has joined #ruby
[09:12:14] marr: has joined #ruby
[09:14:13] mikecmpb_: has joined #ruby
[09:14:48] tvw: has joined #ruby
[09:16:53] Terens: I am using event-machine with HTTP. All I want to do is do periodic post requests. Adding periodic_timer how can I ensure that previous request has finisehd?
[09:17:23] roshanavand: has joined #ruby
[09:17:24] Jameser: has joined #ruby
[09:17:25] universa1: Terens: set a status flag?
[09:17:34] nowhere_man: has joined #ruby
[09:18:26] Terens: this is how it looks now
[09:18:27] Terens: https://gist.github.com/parhs/69cd3ac6f0d24992171450b809133025
[09:19:17] jenrzzz: has joined #ruby
[09:19:17] jenrzzz: has joined #ruby
[09:19:19] mikecmpbll: has joined #ruby
[09:19:42] jgt4: has joined #ruby
[09:20:31] nowhereman: has joined #ruby
[09:21:40] Kug3lis: has joined #ruby
[09:21:56] universa1: Terens: there is most likely a better solution for event machine, but this might work: https://gist.github.com/universal/bfcf6b7368801692198eeb0ab4d70ff4
[09:24:30] mikecmpb_: has joined #ruby
[09:25:14] dminuoso: workmad3: spot on
[09:25:17] dminuoso: apeiros: My doctor thinks that cutting into my foot and stitching it up might be painful.
[09:25:18] dminuoso: I disagree. I dont feel a think, should just stop taking the painkillers.
[09:26:03] Jameser: has joined #ruby
[09:27:01] jenrzzz: has joined #ruby
[09:27:01] jenrzzz: has joined #ruby
[09:27:21] workmad3: Terens: https://gist.github.com/workmad3/694243fc7eeb0bad72be3832f41284ee is another possibility without using status flags
[09:27:44] rohitpaulk: has joined #ruby
[09:27:44] mikecmpbll: has joined #ruby
[09:27:46] Terens: thanks guys
[09:27:52] zenspider_: has joined #ruby
[09:27:57] workmad3: Terens: minor difference is that this method will start another request 5s after the last one finished, rather than every 5s
[09:28:55] canton7: (might be a good thing: you might not want requests overlapping)
[09:29:06] Terens: I guess so
[09:29:37] Terens: I should find a way to terminate this too
[09:29:38] workmad3: and if you have a status flag, you avoid overlapping requests, but you may have the next request trigger only a second or so after the last one finished
[09:29:50] dminuoso: workmad3: Codeine sucks though, I don't feel high. :(
[09:29:50] dminuoso: ACTION needs to find another docto
[09:30:30] tomphp: has joined #ruby
[09:30:44] workmad3: dminuoso: yeah, it's the weakest of the opioid painkillers (to the point where you can get it over the counter in the UK when it's combined with paracetamol or ibuprofen)
[09:30:52] dminuoso: I wonder, why is there no HTTP version that requires proof-of-work client side?
[09:31:11] dminuoso: Email has it :A
[09:33:02] Sylario: has joined #ruby
[09:34:14] flying: has joined #ruby
[09:34:48] anisha: has joined #ruby
[09:35:27] apeiros: dminuoso: I think you have it wrong regarding cause & effect ;-p
[09:35:34] xall: has joined #ruby
[09:37:31] patarr: has joined #ruby
[09:37:59] PenguinHunterX3X: has joined #ruby
[09:38:53] PenguinHunterX3X: has left #ruby: ()
[09:39:01] xychix: has joined #ruby
[09:39:40] romank: has joined #ruby
[09:43:05] jgnagy: has joined #ruby
[09:43:38] zenspider: has joined #ruby
[09:45:21] belmoussaoui: has joined #ruby
[09:45:25] ddffg: has joined #ruby
[09:46:59] rohitpaulk: has joined #ruby
[09:49:27] Terens: should I have a single EM.run block at my app ?
[09:52:35] zenguy_pc: has joined #ruby
[09:53:43] patarr: has joined #ruby
[09:54:10] jenrzzz: has joined #ruby
[09:54:41] zenspider: >> %w[yes no].sample
[09:54:42] ruby[bot]: zenspider: # => "yes" (https://eval.in/813258)
[09:56:03] matthewd: That's one more EM.run block than I would recommend, but that's not an actually-helpful answer either ;)
[09:56:18] matthewd: I *think* the answer is yes.
[09:56:42] sunrunner20: has joined #ruby
[09:59:28] xychix: has joined #ruby
[09:59:58] zenspider: no code runs faster than no code
[10:00:35] nowhereman: has joined #ruby
[10:00:36] mtkd: has joined #ruby
[10:01:33] nicesignal: has joined #ruby
[10:02:03] Jameser: has joined #ruby
[10:03:55] stamina: has joined #ruby
[10:06:03] Ryzokuken: has joined #ruby
[10:08:12] glejeune: has joined #ruby
[10:08:24] Pumukel: has joined #ruby
[10:09:10] gigetoo: has joined #ruby
[10:09:17] ozzy3: has joined #ruby
[10:10:01] arup_r: has joined #ruby
[10:10:37] ozzy3: can u run ruby command on android
[10:11:45] HoloIRCUser1: has joined #ruby
[10:11:46] dminuoso: ozzy3, kind of.
[10:11:52] Jameser`: has joined #ruby
[10:12:10] mim1k: has joined #ruby
[10:12:11] dminuoso: ozzy3, are you talking about just REPL or real apps?
[10:13:04] dminuoso: ozzy3, Ruboto and RubyMotion are probably the two projects you should be looking at.
[10:13:52] ferr1: has joined #ruby
[10:14:04] ozzy3: i talking about android terminal
[10:15:11] arup_r: has left #ruby: ()
[10:15:14] blackwind_123: has joined #ruby
[10:18:44] yogg-saron: has joined #ruby
[10:25:15] mim1k: has joined #ruby
[10:27:27] ur5us: has joined #ruby
[10:29:23] anisha: has joined #ruby
[10:30:10] tomphp: has joined #ruby
[10:32:53] Terens: should I have in my gem within
[10:33:13] Terens: bin/gemnamesomething require 'bundler/setup' ?
[10:33:18] sleetdrop: has joined #ruby
[10:40:33] Sievers: has joined #ruby
[10:44:30] cfec0b8d: has joined #ruby
[10:46:17] jgt4: has joined #ruby
[10:48:10] Kug3lis: has joined #ruby
[10:51:44] tomphp: has joined #ruby
[10:54:35] dminuoso: Terens: Any way you could phrase that less coherently?
[11:00:37] BSaboia: has joined #ruby
[11:01:42] Terens: I mean when developing a gem whether I should include require 'bundler/setup' within bin/ files
[11:06:01] dminuoso: Terens: If you are writing a gem, you already have your Gem::Specification to declare dependencies
[11:06:28] dminuoso: Some folks in here have opinions wrt to gem and bundler and dependencies.
[11:06:30] dminuoso: Im not one of them.
[11:07:14] Terens: I am having some trouble now with requires
[11:07:19] Terens: files within my gem
[11:07:43] anisha: has joined #ruby
[11:08:52] Terens: ok it seems that I have to commit changes
[11:10:59] dminuoso: commit early, commit often. a tip for version control - not for relationships.
[11:12:13] anisha: has joined #ruby
[11:14:31] anisha_: has joined #ruby
[11:14:43] slima: Hello, I need script for parse this documment: https://hazard.mf.gov.pl/api/Register I like to use this: http://www.nokogiri.org/tutorials/searching_a_xml_html_document.html there is my code: https://gist.github.com/slima/389266e08065428564607fff7fbfd128 but I have no results, can you help me?
[11:15:03] mim1k: has joined #ruby
[11:17:47] glejeune: has joined #ruby
[11:21:55] sonOfRa: has joined #ruby
[11:22:18] cfec0b8d: has joined #ruby
[11:22:54] rgr: has joined #ruby
[11:23:23] canton7: slima, it's getting tripped up on the namespaces: .xpath('//xmlns:AdresDomeny') works
[11:23:41] canton7: (tested by checking .css('AdresDomeny'), which works, then by reading http://www.nokogiri.org/tutorials/searching_a_xml_html_document.html)
[11:24:43] dminuoso: Indeed. Namespace bindings are a bitch.
[11:24:45] dminuoso: Just use .css
[11:24:52] MarkBilk: has joined #ruby
[11:25:11] benjen: has joined #ruby
[11:25:12] Lord_of_Life: has left #ruby: ("Laa shay'a waqi'un moutlaq bale kouloun moumkine")
[11:25:18] canton7: use .remove_namspaces! also does the trick
[11:25:39] dminuoso: If only I had a shotgun to threaten you with.
[11:25:50] canton7: (not that I'd necessarily recommend it, but that doc doesn't use namespaces at all, other than setting the default xmlns)
[11:26:08] dminuoso: I'd say just use css
[11:26:12] dminuoso: the interface is so much more usable
[11:26:27] canton7: yeah, it's not quite as powerful, but I don't need to go read the xpath docs every time I see one :P
[11:28:08] cdg: has joined #ruby
[11:28:23] dminuoso: canton7: In my humble experience it's grossly overpaid Senior Java Enterprice Architects that use lots of fancy XPath expressions where a 10 character regex would have sufficed.
[11:28:53] dminuoso: Not before constructing a singleton HelperFactoryAdapterPolicyPatternGeneratorFactory though
[11:29:05] brent__: has joined #ruby
[11:29:43] canton7: you'd use regex on xml?
[11:30:24] dminuoso: canton7: Yes.
[11:30:28] dminuoso: I have some production code that does it even.
[11:30:39] dminuoso: When you know your input it's quite safe to do this.
[11:31:23] ldnunes: has joined #ruby
[11:32:17] canton7: yeah, but something like '/items/item[last()]' must be a PITA with regex, never things whitespace, attributes appearing in any order, self-closing vs closed tags, etc
[11:33:13] aupadhye: has joined #ruby
[11:37:25] chouhoulis: has joined #ruby
[11:39:39] rohitpaulk: has joined #ruby
[11:40:23] rgr: has joined #ruby
[11:40:57] chat_: has joined #ruby
[11:41:37] kspencer: has joined #ruby
[11:44:16] HoierM: has joined #ruby
[11:45:23] dminuoso: canton7: No it's easy!
[11:45:26] olivier__: has joined #ruby
[11:46:09] dminuoso: str.reverse =~ /<meti>(.*)<meti\/>/
[11:46:24] contradictioned: has joined #ruby
[11:46:27] dminuoso: There may or may not be some mistake in that.
[11:47:14] slima: canton7: thx!
[11:48:23] VladGh: has joined #ruby
[11:48:49] dminuoso: canton7: But as I said, when you know about the input it can be perfectly fine.
[11:48:54] slima: dminuoso: thx too
[11:49:14] dminuoso: canton7: In my case I apply regex to machine generated XML from embedded hardware we are operating.
[11:49:44] im0nde: has joined #ruby
[11:52:16] cdg: has joined #ruby
[11:53:05] davic: has joined #ruby
[11:53:22] olivier__: has joined #ruby
[11:54:08] nowhereman: has joined #ruby
[11:56:57] petruff: has joined #ruby
[12:06:49] synthroid: has joined #ruby
[12:07:49] synthroid: has joined #ruby
[12:08:17] minimalism: has joined #ruby
[12:08:19] uZiel: has joined #ruby
[12:09:39] gaurav: has joined #ruby
[12:09:56] ur5us: has joined #ruby
[12:10:56] olivier__: has joined #ruby
[12:11:15] psychicist__: has joined #ruby
[12:11:39] gaurav: Hi I am trying to append something to the end of a string. Where my string is "Bar" I want to append "0" to the end so it becomes "Bar0"
[12:11:49] cfec0b8d: has joined #ruby
[12:12:03] gaurav: 'Bar'.gsub('/\Z/', '0')
[12:12:10] gaurav: is what I am trying.
[12:12:55] gaurav: $,\$,\$/ also don't seem to work.
[12:13:01] tobiasvl: gaurav: well, can't you just do 'Bar' + '0' in that simple case? what do you want to do precisely?
[12:13:23] dtzuzu: has joined #ruby
[12:13:42] universa1: or "Bar" << 0
[12:14:24] cyphase: has joined #ruby
[12:14:31] gaurav: 'Bar' << 0 gives => "Bar\x00"
[12:14:52] tobiasvl: 'Bar' << '0'
[12:15:03] universa1: and if you pass the regexp as an actual regexp, and not a string, it actually works.
[12:15:13] tobiasvl: haha, I missed that
[12:15:26] tobiasvl: >> 'Bar'.gsub(/\Z/, '0')
[12:15:31] ruby[bot]: tobiasvl: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[12:16:22] cdg_: has joined #ruby
[12:16:41] cfec0b8d: has joined #ruby
[12:17:17] gaurav: Thanks tobiasvl it seems like I just needed to remove my quotes from my matching regex. :)
[12:19:41] sepp2k: has joined #ruby
[12:21:26] Fernando-Basso: has joined #ruby
[12:23:58] im0nde: has joined #ruby
[12:25:29] doublemalt_: has joined #ruby
[12:25:39] pupsicle: has joined #ruby
[12:28:49] apeiros: tobiasvl: happens when eval.in returns an error (error in handling non-200 status codes)
[12:29:04] apeiros: and eval.in has been rather uppity the last few weeks
[12:29:26] apeiros: gaurav: << "0" is definitively the much better choice than gsub
[12:30:01] apeiros: gaurav: also pay attention to delimiters/identifying sigils. "0" and 0 are not the same. "/\Z/" and /\Z/ are not the same. etc.
[12:32:01] xall: has joined #ruby
[12:32:37] olivier__: has joined #ruby
[12:34:47] uZiel: has joined #ruby
[12:37:32] Jameser: has joined #ruby
[12:41:46] ineb: i wrote a little script which counts words from files from a dir: https://paste.xinu.at/5on4/ i made it with threads and was expecting performance gain but no matter what i pick as nr_threads, script runtime is always almost the same. did i made a mistake somewhere?
[12:43:16] dminuoso: apeiros, so here's just a silly thought but
[12:43:29] dminuoso: Why doesn't ruby[bot] have an error handler for that?
[12:45:34] SaschaVoid: has joined #ruby
[12:46:57] Burgestr_: ineb ruby's parallelism is (mostly) limited to IO operations, which means that your word-counting is only concurrent, which could be the cause
[12:47:45] ineb: Burgestr_: any way to make it parallel quickly?
[12:47:46] ytti: IO does not suffer from GIL?
[12:48:07] Burgestr_: ytti you can read and write in parallel on different threads
[12:48:19] Burgestr_: (for example)
[12:48:34] ytti: i did not know that, i assumed everything is GILd
[12:48:34] Burgestr_: ineb give JRuby a try to see if it makes a difference
[12:48:44] jud^: has joined #ruby
[12:49:21] Burgestr_: ytti this also applies to networking operations, e.g. http calls or calling out to your database
[12:50:09] Dry_Lips: has joined #ruby
[12:50:09] Dry_Lips: has joined #ruby
[12:50:22] Burgestr_: ineb what I mentioned is not necesarily *the* reason, perhaps your operations are simply not slow enough or context-switching in your case is perhaps expensive enough to outweigh the concurrency gains
[12:50:55] darix: ytti: good IO libraries release the GIL when waiting for data
[12:51:13] darix: and then signal back then they have their data
[12:51:14] burgestrand: ytti in addition, C extensions can explicitly unlock the GIL during expensive operations, I believe Ruby's BigNum does this for maths with large numbers for example
[12:51:55] ytti: alright, live and learn, thanks
[12:52:30] ineb: Burgestrand: i dont know, i have 52 files with 779600 words and my script almost always takes ~10s
[12:53:15] Cavedog: has joined #ruby
[12:53:19] DoubleMalt: has joined #ruby
[12:53:22] cfec0b8d: has joined #ruby
[12:54:01] ineb: more threads tend to be even slower. its depressing
[12:55:14] burgestrand: ineb definitely try JRuby, if you see a performance gain that changes drastically with the numbers of threads (for the better) then you're likely seeing the effects of c-ruby's limited parallelism
[12:56:14] burgestrand: ineb yeah, well, as you add more threads you also increase the time it takes to switch between them, which reduces the time you're doing the work you actually want to speed up :D
[12:57:17] ineb: ok i tried jruby and now my system hangs at 100% cpu
[12:57:30] ineb: and i can turn off the heater
[12:57:41] ineb: haha. is my script rigged?
[12:57:52] ineb: Exception in thread "Ruby-0-Thread-51: wordCount.rb:1" java.lang.OutOfMemoryError: Java heap space
[12:58:22] dminuoso: Burgestrand, indeed. I think the main case where the GIL is unlocked though is syscalls.
[12:59:11] Cavedog: has joined #ruby
[12:59:43] dminuoso: Or GVL rather.
[13:00:21] burgestrand: it has different names in the C source too as far as I can remember, not much need to be pedantic about it
[13:00:27] dminuoso: (Which I guess makes sense, since syscalls are kind of "expensive" since they almost always guarantee a context switch)
[13:00:55] burgestrand: ineb that's surprising!
[13:01:11] burgestrand: ineb I'm trying to find somewhere on my system where the run time is actually significant to test it out myself, but I have too few source files :o
[13:01:12] duncellyjr: has joined #ruby
[13:01:38] dminuoso: ytti, ^- btw think you might find that interesting.
[13:02:34] burgestrand: Feels like I'm missing a bunch of files…
[13:02:54] dminuoso: At the end the whole point of the GVL is to protect the (thread-unsafe) internals of Ruby. At syscall thresholds all the Ruby invariants are held, so Ruby might as well release the GVL - this is quite great because the syscall will almost always invoke the OS scheduler.
[13:02:58] pupsicle: has joined #ruby
[13:03:58] pupsicle2: has joined #ruby
[13:04:10] ineb: Burgestrand: great, thanks
[13:04:43] pupsicle: has joined #ruby
[13:06:19] shinnya: has joined #ruby
[13:07:04] rohitpaulk: has joined #ruby
[13:08:25] pupsicle: has joined #ruby
[13:08:43] mim1k: has joined #ruby
[13:09:15] pupsicle: has joined #ruby
[13:09:47] snath: has joined #ruby
[13:20:14] cadillac_: has joined #ruby
[13:20:27] hutch34: has joined #ruby
[13:20:34] yogg-saron: has joined #ruby
[13:20:39] jordanm: has joined #ruby
[13:20:55] mrconfused: has joined #ruby
[13:21:40] cadillac_: has joined #ruby
[13:22:01] cdg: has joined #ruby
[13:22:30] snath: has joined #ruby
[13:23:08] Benshiro: has joined #ruby
[13:25:51] snath: has left #ruby: ()
[13:26:22] bvcosta: has joined #ruby
[13:27:43] cadillac_: has joined #ruby
[13:27:47] DLSteve: has joined #ruby
[13:29:04] djbkd: has joined #ruby
[13:29:40] Jameser: has joined #ruby
[13:29:51] tomphp: has joined #ruby
[13:31:56] swills: has joined #ruby
[13:32:13] biberu: has joined #ruby
[13:33:25] knight33: has joined #ruby
[13:34:53] hashrocket: has joined #ruby
[13:35:01] apeiros: dminuoso: you have to read closely. it has. but that handler crashes.
[13:35:38] apeiros: that you get a reply at all is because it has a failsafe around it all.
[13:36:20] dminuoso: apeiros: Ah well, I cant even remember where the repository is.
[13:36:31] dminuoso: I have so many git-"place" accounts...
[13:36:44] mark_66: has left #ruby: ("PART #elixir-lang :PART #crystal-lang :PONG :weber.freenode.net")
[13:36:49] apeiros: hint, it starts with github.com/apeiros ;-)
[13:37:28] dminuoso: apeiros: Do you know how many github accounts I have?
[13:37:36] dminuoso: I have like 5 or 6..
[13:38:00] oleo: has joined #ruby
[13:38:44] mim1k: has joined #ruby
[13:39:20] blackmesa: has joined #ruby
[13:40:42] borodin: has joined #ruby
[13:41:33] griffindy: has joined #ruby
[13:42:02] tomphp: has joined #ruby
[13:43:22] chouhoulis: has joined #ruby
[13:47:57] apeiros: dminuoso: well, that's kinda your problem :-p
[13:48:06] apeiros: and for everything else, there's organisations
[13:49:12] aaoiki: has joined #ruby
[13:50:57] jgnagy: has joined #ruby
[13:51:08] olivier__: has joined #ruby
[13:53:37] jphase: has joined #ruby
[13:55:38] tomphp: has joined #ruby
[13:58:06] enterprisey: has joined #ruby
[14:01:31] sleetdrop: has joined #ruby
[14:05:48] GinoMan: has joined #ruby
[14:05:52] __Yiota: has joined #ruby
[14:08:09] Jameser: has joined #ruby
[14:09:22] CrazyEddy: has joined #ruby
[14:10:50] ur5us: has joined #ruby
[14:13:05] ben_h: has joined #ruby
[14:14:36] jjaii9: has joined #ruby
[14:15:09] gusrub: has joined #ruby
[14:15:14] rkazak: has joined #ruby
[14:17:24] Jameser`: has joined #ruby
[14:18:34] mrconfused: has joined #ruby
[14:21:34] renchan_: has joined #ruby
[14:21:51] Ishido: has joined #ruby
[14:22:37] charliesome: has joined #ruby
[14:23:12] mim1k: has joined #ruby
[14:23:46] cfec0b8d: has joined #ruby
[14:24:20] cfec0b8d: has joined #ruby
[14:24:41] rkazak: has joined #ruby
[14:27:54] gheegh: has joined #ruby
[14:28:17] marr: has joined #ruby
[14:29:17] charliesome: has joined #ruby
[14:29:24] clouvet: has joined #ruby
[14:29:41] rkazak: has joined #ruby
[14:29:53] arup_r: has joined #ruby
[14:31:02] antgel: has joined #ruby
[14:32:17] olivier__: has joined #ruby
[14:33:45] ljarvis: wtf, people have more that 1 github account?
[14:34:47] arup_r: haha. to hide identity probably :)
[14:35:10] blackwind_123: has joined #ruby
[14:35:35] arup_r: I saw people to ask question by sharing anonymous gist, again to hide their identity.. They feel shy to ask. :D :D
[14:36:51] dminuoso: At some point I forgot my password and was too lazy to reset
[14:36:58] dminuoso: then I was forced to make a separate for the company
[14:37:07] dminuoso: And then there were other reasons
[14:39:19] ljarvis: all very poor ones i see
[14:39:34] dminuoso: I think lazyness is a good one.
[14:39:35] gothicsouth: has joined #ruby
[14:42:39] rohitpaulk: has joined #ruby
[14:42:45] arup_r: dminuoso: you are different! :) I saw people .. like I said.. who also change their nickname ..
[14:43:34] dminuoso: I may have done that. :-)
[14:45:11] LastWhisper____: has joined #ruby
[14:47:19] arup_r: I worked with a guy .. who hired me from #rubyonrails .. worked with him 4-5 months.. and then last month $2200 he didn't pay. Then he makes excuses.. I somehow managed $1300 from him.. now $900 remaining ... and it seems like he is trying to bluff it :) He comes there to ask questions, and keep changing his nicknames.. I caught him 2 times.. And he said he is trying.. :) But now I don't know in which nickname he is prese
[14:47:20] arup_r: nt.. I will see next 2 months, and then I will take him my way when I will see him online there.. ( Sorry I said this here to support why someone try to hide under name ) :D
[14:47:48] arup_r: sorry again for posting this offtopic thing.
[14:47:56] apeiros: ?ot arup_r
[14:47:56] ruby[bot]: arup_r: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
[14:47:58] dminuoso: This is what happens when you work without a contract.
[14:48:32] dminuoso: No liability whatsoever.
[14:48:40] arup_r: apeiros: yes you are right! I mentioned it.. I just put a reasoning :)
[14:49:10] apeiros: dminuoso: separate for the company? that's what organizations exist for :)
[14:49:27] apeiros: unless you chose an unsuitable username of course…
[14:49:33] dminuoso: apeiros: I was asked to not use my personal account for.. idk.
[14:50:11] apeiros: reasons are the best
[14:55:11] olivier__: has joined #ruby
[14:55:21] YOUR_NIC: has joined #ruby
[14:57:14] bvcosta: What is the best way to do exception handling with ruby and puma? Should we bubble up the exception and have a global exception handler?
[14:58:25] dminuoso: bvcosta: Catch exceptions where you can handle them.
[14:58:36] ruby[bot]: dminuoso: I don't know anything about next
[14:58:41] dminuoso: ACTION kicks ruby[bot] with an apeiros
[14:58:55] bvcosta: Yes I know
[14:58:59] bvcosta: https://spring.io/blog/2013/11/01/exception-handling-in-spring-mvc
[14:59:30] bvcosta: rephasing the question, should we or should we not use global exception handling in ruby?
[15:00:30] bvcosta: I believe rails has it as well
[15:03:26] dminuoso: bvcosta: Indeed. If an uncaught exception bubbles up, it should not wreck the entire web server.
[15:03:32] YOUR_NIC: has joined #ruby
[15:03:43] haylon: has joined #ruby
[15:03:46] dminuoso: bvcosta: So it makes sense to have certain "catch all exception" handlers in sensible places.
[15:03:57] elomatreb: You're going to want to have a global handler, but you only want it to be called when there truly is an Exceptional condition
[15:04:30] __Yiota: has joined #ruby
[15:04:32] bvcosta: Yes, that makes totally sense
[15:05:19] bvcosta: handling local exception, bubble up the ones that we cannot handle locally and have the global exception handler
[15:05:53] dminuoso: bcavileer: You might have multiple stages of "catch all" handlers though.
[15:06:38] elomatreb: Avoid using Exceptions for logic flow, but generally that's accurate
[15:07:45] haylon: has joined #ruby
[15:07:50] bvcosta: do you recommend any opensource project to take a look at?
[15:09:06] ledestin: has joined #ruby
[15:10:01] apeiros: beware of `rescue Exception`, though. it'll rescue things like Interrupt and NoMemoryError
[15:10:23] bvcosta: that is the anti pattern in any language I believe :P
[15:10:29] dminuoso: apeiros: Interesting. Interrupt -> Ruby generates an Exception for that?
[15:10:38] apeiros: dminuoso: yupp
[15:10:48] dminuoso: That is.. weird at first glance.
[15:10:57] dminuoso: apeiros: What kind of interrupt are we talking about?
[15:11:22] apeiros: the default sigint handler is basically Thread.main.raise Interrupt
[15:11:51] dminuoso: I'd really like to know the reasoning behind this
[15:11:52] apeiros: or rather Interrupt.new
[15:12:03] dminuoso: Or is it just a historical artifcat kept for sake of backward compatibility?
[15:12:52] apeiros: given that Interrupt < SignalException, I'd guess there's more :)
[15:13:19] apeiros: hm, wrong guess
[15:13:26] apeiros: >> ObjectSpace.each_object(SignalException.singleton_class).to_a
[15:13:27] ruby[bot]: apeiros: # => [Interrupt, SignalException] (https://eval.in/813508)
[15:13:31] gothicsouth: has joined #ruby
[15:18:04] patarr: has joined #ruby
[15:19:39] dminuoso: >> class A; end; class B < A; end; class A; def self.m; end; end; B.m
[15:19:40] ruby[bot]: dminuoso: # => nil (https://eval.in/813515)
[15:19:45] dminuoso: Can someone tell me why this works?
[15:20:09] dminuoso: Singleton classes are created on demand, so how does Ruby find A::m in dispatch?
[15:20:17] ujjain: has joined #ruby
[15:20:17] ujjain: has joined #ruby
[15:21:07] apeiros: B.singleton_class < A.singleton_class
[15:21:22] olivier__: has joined #ruby
[15:21:32] apeiros: >> class A; end; class B < A; end; B.singleton_class < A.singleton_class
[15:21:33] ruby[bot]: apeiros: # => true (https://eval.in/813521)
[15:21:37] yogg-saron: has joined #ruby
[15:21:58] dminuoso: apeiros: Except B has no singleton class in the code above.
[15:22:00] apeiros: not sure whether B.m causes ruby to create B's singleton class or whether dispatch just goes on
[15:22:13] dminuoso: apeiros: No it cant. Simple induction proves this.
[15:22:29] dminuoso: You could simply do : B.singleton_class.singleton_class.singleton_class.singleton_class.singleton_class.q
[15:22:49] apeiros: well, it might be either of A) the dispatcher skips nonexistent singleton classes or B) invoking a method constitutes demand, creating one
[15:22:50] clouvet: has joined #ruby
[15:22:52] dminuoso: Ruby cant create an infinite amount of singleton classes in anticipation of my weird days..
[15:23:08] dminuoso: apeiros: Oh oh oh oh!
[15:23:08] apeiros: that's not anticipation if you actually call a method
[15:23:12] clouvet: has joined #ruby
[15:23:14] dminuoso: apeiros: http://i.imgur.com/04Mlrwp.png
[15:23:20] mim1k: has joined #ruby
[15:23:38] dminuoso: My thought is: if klass does not exist, it could simply walk the super chain until an RClass with a klass ptr != null exists.
[15:23:51] dminuoso: This is really screwed up for when you do
[15:23:54] cschneid_: has joined #ruby
[15:24:11] ben_h: has joined #ruby
[15:24:18] apeiros: I'm afraid, I don't know the C impl specifics
[15:24:28] apeiros: banisterfiend would probably know
[15:25:10] dminuoso: apeiros: Funny fact, did you know that internally "metaclass" is used for singleton classes of classes, and "singleton class" for singleton classes of objects?
[15:25:25] apeiros: heh, no, didn't
[15:25:34] apeiros: I still think they should've gone with eigenclass
[15:26:16] hobodave: has joined #ruby
[15:26:40] jgnagy: has joined #ruby
[15:26:41] dminuoso: Yeah, the lack of German words in todays inventions is really dissatisfying.
[15:30:20] rkazak: has joined #ruby
[15:34:31] brent__: has joined #ruby
[15:39:32] rippa: has joined #ruby
[15:39:57] bvcosta: has joined #ruby
[15:44:07] synthroid: has joined #ruby
[15:47:01] jackjackdripper: has joined #ruby
[15:50:41] yeticry: has joined #ruby
[15:53:22] swills: has joined #ruby
[15:56:48] boombox_: has joined #ruby
[15:57:39] amclain: has joined #ruby
[15:58:53] ben_h: has joined #ruby
[16:05:14] bkxd: has joined #ruby
[16:06:58] cdg: has joined #ruby
[16:08:31] gusrub: has joined #ruby
[16:08:53] vondruch: has joined #ruby
[16:11:31] ur5us: has joined #ruby
[16:13:28] cadillac_: has joined #ruby
[16:16:19] Alex9: has joined #ruby
[16:16:35] cadillac__: has joined #ruby
[16:16:41] quobo: has joined #ruby
[16:16:45] dasher00: has joined #ruby
[16:18:55] t-recx: has joined #ruby
[16:19:18] olivier__: has joined #ruby
[16:20:23] DLSteve: has joined #ruby
[16:20:49] DeeJayh: has joined #ruby
[16:22:07] Alex9: Do most people use Ruby for web applications?
[16:22:20] chalkmonster: has joined #ruby
[16:22:29] mrconfused_: has joined #ruby
[16:22:38] dminuoso: Alex9: A fair share probably do.
[16:22:56] dminuoso: Alex9: However Ruby is also widely used in other environments like Chef or Puppet.
[16:23:24] Alex9: dminuoso That's great to know, I'm thinking of picking Ruby up as my next language. :)
[16:25:04] olivier__: has joined #ruby
[16:26:04] olivier__: has joined #ruby
[16:27:45] nanoz: has joined #ruby
[16:27:45] nanoz: has joined #ruby
[16:29:22] gusrub: has joined #ruby
[16:29:58] gusrub_: has joined #ruby
[16:31:55] [Butch]: has joined #ruby
[16:34:27] ddffg: has joined #ruby
[16:35:59] yogg-saron: has joined #ruby
[16:39:56] NeverTired: has joined #ruby
[16:46:30] stormbytes: has joined #ruby
[16:49:09] ben_h: has joined #ruby
[16:52:06] muelleme: has joined #ruby
[16:52:14] agentsmith: has joined #ruby
[16:53:43] chalkmonster: has joined #ruby
[17:00:33] nowhereman: has joined #ruby
[17:00:42] ascarter: has joined #ruby
[17:02:43] Pumukel: has joined #ruby
[17:03:44] djbkd: has joined #ruby
[17:03:48] jdsampayo: has joined #ruby
[17:04:16] haylon: has joined #ruby
[17:05:33] Ishido: has joined #ruby
[17:07:29] mostlybadfly: has joined #ruby
[17:08:51] ascarter_: has joined #ruby
[17:10:35] perniciouscaffei: has joined #ruby
[17:10:59] dances_with_taco: has joined #ruby
[17:11:01] ruby[bot]: dminuoso: I don't know anything about hi
[17:11:14] dminuoso: Do I really have to socially interact with people to greet them back?
[17:11:53] apeiros: yes, yes you have to :-p
[17:12:14] dminuoso: jdsampayo: Uh. I mean. Hi.
[17:12:35] jdsampayo: https://thepasteb.in/p/Y6hkB5Qj7WXu7
[17:13:27] dminuoso: jdsampayo: https://cirw.in/blog/constant-lookup.html
[17:13:30] dminuoso: Read it, learn it, love it.
[17:14:07] psychicist__: has joined #ruby
[17:14:36] dminuoso: (Ruby does not do hierarchy based lookup for constants, it does nesting based lookup)
[17:15:16] jdsampayo: thanks! I think this does the magic: WRAPPERS.class_eval{ Account }
[17:15:24] dminuoso: jdsampayo: Ughhhhh....
[17:15:27] dminuoso: jdsampayo: Please no.
[17:15:55] dminuoso: Though I gotta admire the creativity..
[17:16:54] dminuoso: jdsampayo: Let me stare at this for a while while you read up on nesting.
[17:18:52] dminuoso: jdsampayo: Am I right in assuming in lines 27 and 33 you meat Soap::V1::Actions rather than Soap::V1::Base ?
[17:19:31] PaulCapestany: has joined #ruby
[17:20:29] jdsampayo: sure, you are right! error copying
[17:20:33] Rodya_: has joined #ruby
[17:21:03] jdsampayo: I think I can also solve it if I could get the name of the includers inside of the concern, to decide if using one path or another
[17:21:12] dminuoso: jdsampayo: Once you have read and understood I will give you the answer (it's done, so whenever you are ready)
[17:21:32] dminuoso: jdsampayo: Much simpler than what you are thinking.
[17:23:04] dminuoso: There is a simple way to express exactly what you are doing with minimal change, but I'd like you to understand why your approach failed.
[17:23:20] cjhowe7: has joined #ruby
[17:24:41] GinoMan: has joined #ruby
[17:26:48] mcafee: has joined #ruby
[17:30:26] duderonomy: has joined #ruby
[17:31:08] learningruby: has joined #ruby
[17:31:17] andrzejku: has joined #ruby
[17:32:09] learningruby: Variables and method names are often referred in separate in Ruby books. But ain't a method name just a variable holding the method body?
[17:33:05] elomatreb: No, a method is a method and a variable is a variable. Technically completely different, just look similar in syntax
[17:33:05] dminuoso: learningruby: No.
[17:33:37] dminuoso: learningruby: Ruby has a mechanism by which it lexographically (think like "during parsing") it learns whether an identifier is either a variable or a method.
[17:33:59] dminuoso: learningruby: When it sees something like a = <something> it then treats "a" as a local variable for the rest of the scope.
[17:34:03] dminuoso: Otherwise it treats it as a method.
[17:34:32] elomatreb: But not `a()`
[17:34:53] jdsampayo: @dminuso my aproach failed because at the execution of included, I'm on a different scope:
[17:35:10] dminuoso: learningruby: and a method foo is basically self.send(:foo), whereas a variable is kind-of like local_variable_get(:foo)
[17:35:13] dminuoso: Except that last bit does not exist.
[17:35:17] dminuoso: jdsampayo: Not scope!
[17:35:22] jdsampayo: https://thepasteb.in/p/X6hBrm1lBBru3
[17:35:27] dminuoso: jdsampayo: Though kind of. It's called nesting.
[17:35:40] jdsampayo: I will never find WRAPPERS value there
[17:35:48] dminuoso: &ri Module.const_get
[17:35:48] `derpy: http://ruby-doc.org/core-2.4.1/Module.html#method-i-const_get
[17:36:02] dminuoso: jdsampayo: ^- you can this to invoke a completely dynamic way of obtaining a const.
[17:36:24] dminuoso: This will bypass any nesting rules, and let you specify exactly where it should search.
[17:37:08] ascarter: has joined #ruby
[17:37:18] mcafee: Question: Is there a method one can call on an array that returns nil if the array is empty, otherwise it returns the array? I have a function that looks like arr = (...big function call...); arr.empty? ? nil : arr; and I wish I could turn it into a single expression.
[17:37:28] havenwood: >> def meth; 42 end; var = 42; "meth is a #{defined? meth} and var is a #{defined? var}" # learningruby
[17:37:30] ruby[bot]: havenwood: # => "meth is a method and var is a local-variable" (https://eval.in/813576)
[17:37:31] rgr_: has joined #ruby
[17:37:55] dminuoso: jdsampayo: A regular constant-lookup is basically nesting.each { |n| break n.const_get(:CONSTANT) if n.const_defined?(:CONSTANT) } (it's contrived, but conceptually it works)
[17:38:21] dminuoso: And if that returns nil, it starts to look for const_missing hooks, and if that fails, it throws an exception
[17:38:37] dminuoso: And there's no way you can resolve that in your situation.
[17:39:21] jdsampayo: @diminuso I think my problem now is that even I could get the const_get to dynamically load the class needed, the concern is not getting the constant of the includer, so I need to in someway pass a variable / attribute to the Concern
[17:40:08] dminuoso: jdsampayo: Im not really 100% certain about Rails concerns - I prefer to use raw Ruby modules because I consider concerns silly.
[17:40:09] nitric: has joined #ruby
[17:41:06] dminuoso: >> module M; Q = 1; end; class C; include M; puts const_get(:Q); end # jdsampayo
[17:41:11] ruby[bot]: dminuoso: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[17:41:19] dminuoso: There's network connections.
[17:41:24] dminuoso: This will return: #=> 1
[17:41:27] dminuoso: Thank you havenwood.
[17:41:54] havenwood: Actually I should be a better REPL:
[17:42:29] dminuoso: jdsampayo: But Im fairly sure it should also work with Rails concerns.
[17:42:57] dminuoso: (They are just sugar coated ruby moduleS)
[17:43:08] cfec0b8d: has joined #ruby
[17:43:17] ben_h: has joined #ruby
[17:44:34] dminuoso: jdsampayo: Oh it just hit me. You will have to do const_get twice.
[17:45:35] olivier__: has joined #ruby
[17:45:44] dminuoso: Or might. Im not sure.
[17:46:17] dtzuzu: anyone hiring out there
[17:47:13] dminuoso: havenwood>> module M; module N; Q = 1; end; end; end; class C; include M; puts const_get("N::Q"); end
[17:47:49] gusrub: has joined #ruby
[17:48:04] dminuoso: havenwood uses GraalVM - long warmup.
[17:48:50] r8: has joined #ruby
[17:49:04] nchambers: has joined #ruby
[17:50:02] dminuoso: >> module M; Q = 1; end; module N; P = M; end; class C; include M; puts const_get("N::P::Q"); end # jdsampayo
[17:50:03] ruby[bot]: dminuoso: # => 1 ...check link for more (https://eval.in/813577)
[17:50:04] dminuoso: no this works fine.
[17:50:04] jdsampayo: @diminuoso following your example I think the problem I have is the inverse, try to get a constant defined in C inside N
[17:51:02] nchambers: has joined #ruby
[17:51:02] jdsampayo: I mean, the controller defines the Wrapper Path, after defining the constant include the Concern and make the Concern to use it in the included block
[17:51:31] jdsampayo: somewhat of "passing a variable to a concern", probably
[17:51:56] jdsampayo: but in the included block, the nesting does not know anything about the controller
[17:52:56] Rodya_: has joined #ruby
[17:53:45] learningruby: thanks diminuoso and havenwood for the answers : )
[17:54:01] dminuoso: jdsampayo: Too much abstract talk. Give me a test case.
[17:54:05] dminuoso: jdsampayo: use eval.in if you want.
[17:54:35] mtkd: has joined #ruby
[17:54:44] r8: If my program may be installed anywhere in the filesystem, how do I 'require' in a way that gets me the libraries I ship with it? I think require_relative is supposed to help with this?
[17:54:46] jdsampayo: sorry, let me try to make it less fuzzy
[17:55:35] dminuoso: r8: just a plain require
[17:55:37] ikoma: has joined #ruby
[17:56:18] r8: dminuoso: What if my app's libraries aren't in the $LOAD_PATH?
[17:56:26] dminuoso: r8: Use the RUBYLIB environment variable
[17:56:51] dminuoso: r8: And have the outside world deal with where it is. It's not your programs responsibility to figure out where a library is.
[17:57:58] r8: dminuoso: What's require_relative for?
[17:59:00] dminuoso: r8: say you are inside a lib/car/engine/rotor.rb, and you need to get hold of lib/car/electronics.rb
[17:59:19] r8: dminuoso: So when I deliver my app to operations, I tell them they need to set their environment so they can run my program? Surely there's a way for the program or Ruby to figure out that the libraries are ../lib from the program itself?
[17:59:57] dminuoso: r8: If the ruby libraries are not in the LOAD_PATH, you are out of luck unless there's some convention or way to guess where they might end up in.
[18:00:07] dminuoso: r8: Or you could search the entire filesystem.
[18:00:32] dminuoso: r8: The better solution would be to actually use gems properly.
[18:00:49] dminuoso: r8: Have some gem server set up that contains the libraries, and then you can use gemspec/bundler to pull in the dependencies as needed.
[18:01:04] dminuoso: (or if the libraries are not IP, upload them to rubygems.org)
[18:01:14] r8: dminuoso: My program and its libraries are basically a unit...
[18:01:31] dminuoso: r8: Oh so you ship the libraries yourself?
[18:01:54] r8: dminuoso: Yeah, sorry, should have clarified.
[18:01:58] dminuoso: r8: Just push things onto $LOAD_PATH :)
[18:02:01] dminuoso: And then require as usual
[18:02:37] jdsampayo: @dminuoso you are a genious, it worked! see:
[18:02:48] Fysicus: has joined #ruby
[18:03:13] r8: dminuoso: Something like get dir of my program, push "#{dir}/../lib" onto $LOAD_PATH?
[18:04:02] bmurt_: has joined #ruby
[18:04:19] jdsampayo: https://thepasteb.in/p/vghOVvDEGkMu3
[18:04:23] dminuoso: r8: You can use Kernel#__dir__ to help you :)
[18:04:56] dminuoso: r8: Or use require_relative -> both options are fine. I would use the LOAD_PATH approach if you ever plan to extract the libraries into separate gems.
[18:04:56] jdsampayo: @diminuoso, this was the trick as you pointed out: soap_path.const_get("Account")
[18:05:06] GinoMan: has joined #ruby
[18:05:23] jdsampayo: @dminuoso, but it needs to be a String! as the documentation you sent me, not a Class like I was doing
[18:05:45] dminuoso: jdsampayo: Btw, use symbols for single constants without namespace qualifiers.
[18:06:26] dminuoso: Or.. Im not certain now. Let me check
[18:07:03] dminuoso: jdsampayo: Yes absolutely use a symbol! :)
[18:07:04] jdsampayo: @dminuoso thanks! it works also with the Symbol
[18:07:24] dminuoso: jdsampayo: Yeah only for immediate constants. I dont think it works with nested constants looking at the C code.
[18:07:41] dminuoso: >> module A; module B; end; end; const_get(:"A::B")
[18:07:43] ruby[bot]: dminuoso: # => undefined method `const_get' for main:Object (NoMethodError) ...check link for more (https://eval.in/813580)
[18:07:58] dminuoso: >> module A; module B; end; end; class C; include A; end; puts C.const_get(:"A::B")
[18:08:00] ruby[bot]: dminuoso: # => wrong constant name A::B (NameError) ...check link for more (https://eval.in/813581)
[18:08:07] dminuoso: >> module A; module B; end; end; class C; include A; end; puts C.const_get("A::B")
[18:08:08] ruby[bot]: dminuoso: # => A::B ...check link for more (https://eval.in/813582)
[18:08:14] dminuoso: jdsampayo: ^- yup.
[18:08:31] dminuoso: jdsampayo: The symbol approach is much faster. :)
[18:08:43] dminuoso: Crazy buttloads faster.
[18:09:07] jdsampayo: @dminuoso, lol, sure, keeping the symbol, this was exactly what I needed, thank you very much, you saved a project to duplicate LOT of files only to change a SOAP serializer response, hope you have a great day, will be around
[18:10:27] morfin: i can't just read Range from YAML?
[18:11:06] tvw: has joined #ruby
[18:11:21] morfin: foo: 10..1000 becomes {"foo" => "10..1000"}
[18:12:12] ur5us: has joined #ruby
[18:12:29] r8: dminuoso: I like your idea. I may do this: $LOAD_PATH.push(File.dirname(__FILE__) + '/../lib')
[18:13:16] mrconfused: has joined #ruby
[18:13:43] petruff1: has joined #ruby
[18:14:23] Rodya_: has joined #ruby
[18:15:14] Cohedrin: has joined #ruby
[18:15:33] gusrub: has joined #ruby
[18:15:55] gothicsouth: has joined #ruby
[18:16:06] r8: dminuoso: Or maybe $LOAD_PATH.insert(). Thanks for your help.
[18:16:26] haylon: has joined #ruby
[18:16:29] dminuoso: r8: Indeed. And if you don't want public access to that, you can remove that path after setting up your library again.
[18:16:34] ben_h: has joined #ruby
[18:16:45] rohitpaulk: has joined #ruby
[18:18:09] olivier__: has joined #ruby
[18:19:38] haylon: Has anyone had any luck with Microsoft Teams and making a bot using Ruby?
[18:20:46] mrconfused: has joined #ruby
[18:21:19] glejeune: has joined #ruby
[18:22:54] nchambers: has joined #ruby
[18:23:02] Rodya_: has joined #ruby
[18:23:16] nchambers: has joined #ruby
[18:23:56] psychicist__: has joined #ruby
[18:27:56] jdawgaz: has joined #ruby
[18:29:23] Cohedrin: has joined #ruby
[18:30:05] djbkd: has joined #ruby
[18:30:39] justizin: has joined #ruby
[18:30:47] mikecmpbll: has joined #ruby
[18:32:57] justizin: getting this error that typically indicates xcode missing, when it's not (trying to gem install mysql2 on macos sierra) : "ld: library not found for -l-lpthread", anyone know anything else i might wanna check?
[18:33:24] justizin: i'm kinda wondering, is it possible i need to remove and install xcode command line tools fresh? not sure i've ever encountered that, but a first time for everything..
[18:35:17] ben_h: has joined #ruby
[18:35:55] joevandyk: has joined #ruby
[18:36:44] GinoMan2440: has joined #ruby
[18:37:31] ozzy3: has joined #ruby
[18:38:04] muelleme: has joined #ruby
[18:38:18] GinoMan1423: has joined #ruby
[18:38:26] SeepingN: has joined #ruby
[18:39:00] dminuoso: justizin: xcode?
[18:39:01] dminuoso: You are brave.
[18:39:02] havenwood: justizin: What do you get for?: xcode-select --version
[18:39:27] dminuoso: ACTION ended up custom patching a GCC because he got sick of this apple stuff
[18:39:32] justizin: havenwood: "xcode-select version 2347."
[18:39:48] havenwood: justizin: So you have the latest command line tools installed.
[18:40:03] justizin: havenwood: but i'm thinking, maybe that install had a silent failure? it should provide pthread, yah?
[18:40:15] cfec0b8d: has joined #ruby
[18:40:18] havenwood: justizin: gcc --version #=> 8.1.0?
[18:40:19] ozzy3: how can i try ruby codes pc free
[18:40:26] justizin: havenwood: si
[18:40:57] borodin: is there any way to convert a string into an attribute name? i.e. if varattr="size" then big_aray.varattr gives the size of big_array?
[18:41:02] havenwood: ozzy3: https://carc.in/#/rb
[18:41:07] justizin: dminuoso: yah, i support a largeish team and i try to get the least esoteric path working, if possible.
[18:41:18] borodin: I know there's a way but I can't remember
[18:41:23] havenwood: justizin: And mysql is installed?
[18:41:30] justizin: our devs use a vagrant box tho, i just need bundle install to run on my mac so i can 'bundle exec cap deploy' without all that
[18:41:32] ascarter_: has joined #ruby
[18:41:41] justizin: havenwood: yah, it's failing on pthread, totally finds mysql-config and such
[18:41:42] ozzy3: @havenwood tnx
[18:41:53] havenwood: justizin: hrm
[18:42:07] jamesaxl: has joined #ruby
[18:42:27] olivier__: has joined #ruby
[18:42:52] dminuoso: justizin: Does it really say -l-lpthread ?
[18:42:57] dminuoso: That looks quite.. wrong.
[18:43:07] TheBrayn: has joined #ruby
[18:44:32] ltem: has joined #ruby
[18:46:15] justizin: dminuoso: yah, "ld: library not found for -l-lpthread"
[18:47:31] olivier__: has joined #ruby
[18:48:12] cfec0b8d: has joined #ruby
[18:49:22] dminuoso: Shouldn't this just say -lpthread (or -pthread) ?
[18:50:16] justizin: maybe? i'm not sure..
[18:51:21] morfin: -pthread is something i saw
[18:51:29] dminuoso: justizin: I'd really like to see the config.log of that build.
[18:51:32] morfin: i heard it's same thing
[18:51:42] dminuoso: justizin: Can you poke around and figure out whether it's somewhere?
[18:51:46] roshanavand: has joined #ruby
[18:51:56] pupsicle: has joined #ruby
[18:52:01] dminuoso: morfin: no. -lpthread and -pthread are subtly different.
[18:52:15] justizin: dminuoso: happily
[18:52:22] morfin: -lpthread used for linking
[18:52:26] dminuoso: morfin: -pthread activates certain macros as well as linking
[18:52:35] dminuoso: so -pthread is kind of a mix of compiler and linker flags.
[18:52:41] Rodya_: has joined #ruby
[18:52:51] dminuoso: whereas -lpthread is just the raw *link the pthread.EXTENSION*
[18:53:05] morfin: _REENTRANT thing?
[18:53:19] dminuoso: morfin: Im not sure whether that specific macro is controlled by that, but let's just say yeah.
[18:53:49] morfin: hmm i want to try build Ruby again with my Msys2 muhahahaa
[18:53:52] nowhereman: has joined #ruby
[18:54:39] morfin: Ruby do compile but something goes wrong after that(probably gems or something) and boom
[18:55:24] Rodya__: has joined #ruby
[18:56:29] hutch34: has joined #ruby
[18:58:27] jamesaxl: has joined #ruby
[18:59:08] al2o3-cr: has joined #ruby
[19:00:26] GinoMan: has joined #ruby
[19:01:12] dviola: has joined #ruby
[19:01:14] Rodya_: has joined #ruby
[19:02:54] morfin: i just wanted to start project on my PC instead of slow gateway )
[19:04:43] jgt4: has joined #ruby
[19:05:48] bkxd: has joined #ruby
[19:06:18] itaipu: has joined #ruby
[19:06:33] jdawgaz: has joined #ruby
[19:07:23] jdawgaz: has joined #ruby
[19:07:43] itaipu: what is the idiom to call system('echo #{msg}') if msg could have unescaped shell chars (such as '`, etc..)
[19:08:08] jdawgaz: has joined #ruby
[19:08:37] dminuoso: itaipu: &ri Shellwords
[19:08:45] dminuoso: &ri Shellwords itaipu
[19:08:45] `derpy: itaipu: http://ruby-doc.org/stdlib-2.4.1/libdoc/shellwords/rdoc/Shellwords.html
[19:08:50] itaipu: what I'm actually doing is calling festival (text to speech) command line utility
[19:09:06] manveru: itaipu: system('echo', msg)
[19:09:09] morfin: i used that with Asterisk
[19:09:15] dminuoso: Of course..
[19:09:23] dminuoso: Shellwords is kind of elaborate when you consider manveru's solution.
[19:09:39] dminuoso: ACTION facepalms
[19:09:47] manveru: that just won't go through the shell, saving you the trouble :)
[19:10:09] morfin: shellescape
[19:10:24] dminuoso: manveru: For about 4 seconds I was incredibly proud to link Shellwords!
[19:10:27] dminuoso: Then you ruined my evening.
[19:10:33] manveru: i'm so sorry man
[19:10:55] dminuoso: But man, this could be a really good interview question.
[19:10:58] manveru: i just get irritated everytime someone uses system and string interpolation for no reason ^^;
[19:11:05] itaipu: manveru: the problem is that I need to append &, because I want to run it async
[19:11:09] dminuoso: "So you say you are a Ruby expert. What did you say Shellwords was used for?"
[19:11:20] manveru: fork{ system('echo', msg) }
[19:11:20] itaipu: so system have to return immediately
[19:11:34] itaipu: manveru: hmmm thats better
[19:11:42] qmr: you're making me think of funny reddit comment dminuoso
[19:11:58] qmr: something about someone interviewing at google claiming to be python expert / wrote the book on python / whatever
[19:12:15] qmr: they pulled guido in to interview him and the candidate left a broken man
[19:12:29] dminuoso: If guido and me were in a room
[19:12:32] dminuoso: He would leave with a broken arm.
[19:12:34] manveru: itaipu: don't forget to Process.detach it, or you'll have zombies
[19:12:45] qmr: that's not nice because matz is nice dminuoso
[19:12:54] manveru: so the whole thing is like Process.detach(fork{ system('echo', msg) })
[19:13:01] ben_h: has joined #ruby
[19:13:07] dminuoso: manveru: Im starting to like Shellwords very suddenly..
[19:13:08] manveru: i assume you don't care about exit status in this case :)
[19:13:09] morfin: i write one program with Phantomjs
[19:13:18] morfin: and i had zombiew apocalypse today
[19:13:38] morfin: there was like 20 zombies of phantomjs )
[19:13:51] morfin: but i do not use just fork
[19:14:17] manveru: well, you either have to handle your childs or give the responsibility to your parent
[19:14:24] morfin: i use this: https://github.com/grosser/parallel
[19:15:18] morfin: holy crap
[19:15:20] morfin: https://github.com/grosser/parallel/blob/master/lib/parallel/processor_count.rb
[19:15:27] workmad3: has joined #ruby
[19:15:47] manveru: morfin: did you call .wait on it?
[19:16:18] manveru: oh looks like it's a private method
[19:16:26] jackjackdripper: has joined #ruby
[19:16:31] manveru: well, that's just irresponsible :P
[19:16:35] morfin: it happens when you ctrl+c out of byebug )
[19:16:37] ozzy3: has joined #ruby
[19:16:45] mim1k: has joined #ruby
[19:16:55] morfin: also there was some orphans
[19:17:05] morfin: still trying to write console
[19:20:38] sspreitz: has joined #ruby
[19:20:45] patr0clus: has joined #ruby
[19:21:10] cdg: has joined #ruby
[19:21:38] bvcosta: has joined #ruby
[19:24:15] cdg: has joined #ruby
[19:26:10] SaschaVoid: has joined #ruby
[19:29:26] KeyJoo: has joined #ruby
[19:30:08] zapata: has joined #ruby
[19:31:23] milardovich: has joined #ruby
[19:31:50] morfin: i changed directory to tmp dir created by rbenv and did make install should not that properly install whole thing?
[19:32:26] Cohedrin: has joined #ruby
[19:32:31] jackjackdripper: has joined #ruby
[19:36:49] gusrub: has joined #ruby
[19:37:11] jdawgaz: has joined #ruby
[19:37:35] bvcosta: has joined #ruby
[19:38:44] andrzejku: has joined #ruby
[19:39:04] mrconfused: has joined #ruby
[19:42:50] raspado: has joined #ruby
[19:44:48] olivier__: has joined #ruby
[19:45:33] cdg: has joined #ruby
[19:49:36] jdsampayo: has joined #ruby
[19:50:36] arup_r: has joined #ruby
[19:50:53] AndChat|474201: has joined #ruby
[19:51:27] patr0clus: has joined #ruby
[19:54:18] olivier__: has joined #ruby
[19:55:17] jgt4: has joined #ruby
[19:57:42] dionysus69: has joined #ruby
[19:57:42] belmoussaoui: has joined #ruby
[19:58:31] mtkd: has joined #ruby
[20:04:07] shinnya: has joined #ruby
[20:07:22] ben_h: has joined #ruby
[20:08:30] synthroid: has joined #ruby
[20:09:11] djbkd: has joined #ruby
[20:10:03] ur5us: has joined #ruby
[20:14:48] synthroid: has joined #ruby
[20:16:50] Polysics: has joined #ruby
[20:17:28] bvcosta: has joined #ruby
[20:18:27] Kug3lis: has joined #ruby
[20:19:13] bvcosta: has joined #ruby
[20:20:29] Kug3lis: has joined #ruby
[20:25:41] ecuanaso: has joined #ruby
[20:26:27] morfin: something is wrong with stderr
[20:27:11] morfin: i tried running command which do install stuff and seems like stderr printed before stdout oO
[20:27:39] mrconfused: has joined #ruby
[20:29:20] tomphp: has joined #ruby
[20:29:30] modin: has joined #ruby
[20:29:48] sonOfRa: morfin: stdout is buffered, stderr is generally not buffered
[20:30:18] DeeJayh: has joined #ruby
[20:30:27] sonOfRa: Generally stdout is line-buffered, so if a newline is encountered, the buffer is generally written, but stderr is generally written *immediately*
[20:30:43] morfin: ah i forgot
[20:31:27] morfin: my ruby-build fails for 2.2.0 with error ENOENT(but file exists) and 2.3.0 does nothing after install
[20:33:23] morfin: ruby can't work with not real path?
[20:33:56] jdawgaz: has joined #ruby
[20:34:03] morfin: File.read(fake) # this fails with fake = "/tmp/ruby-build.20170608005404.5048/ruby-2.2.0/tools/fake.rb"
[20:35:03] Cohedrin: has joined #ruby
[20:36:25] dminuoso: sonOfRa. I thought I knew your name from somewhere. :-)
[20:36:45] sonOfRa: ACTION waves
[20:36:48] sonOfRa: I'm all over the place!
[20:37:40] synthroid: has joined #ruby
[20:39:58] morfin: HAHAHAHAAHAHAH
[20:40:12] sonOfRa: I'd much rather not
[20:40:22] morfin: i found ruby 2.2.0 and 2.3.0 installed in D:/home
[20:41:06] dminuoso: sonOfRa: Since you only stated a preference, does that still make you open to the proposition?
[20:41:15] morfin: how the heck it's possible?
[20:41:15] dminuoso: I mean it was not a categorical no...
[20:42:02] morfin: how when i build inside of Msys2 in mingw64 session it resolve path to real /
[20:42:43] ur5us: has joined #ruby
[20:45:15] morfin: or that's just mintty detect path as /?
[20:45:34] olivier__: has joined #ruby
[20:45:38] morfin: so outside of mintty / => D:/
[20:46:03] sonOfRa: dminuoso: I never ever make categorical statements!
[20:46:22] bkxd: has joined #ruby
[20:46:24] itaipu: has joined #ruby
[20:46:32] morfin: msys2 do some magic
[20:46:34] dminuoso: sonOfRa: I think the "ever" was over the top.
[20:46:41] gusrub: has joined #ruby
[20:47:24] tomphp: has joined #ruby
[20:49:52] anomaly: has joined #ruby
[20:50:08] stephenh: has joined #ruby
[20:51:14] anomaly: I am taking two inputs. I can print the interpolated strings just fine. however I want to then also print "The count was " but neither assigning count = input.length or #{input.length} are working. What am I missing?
[20:51:38] morfin: guys, do you have any idea - is that miniruby issue?
[20:52:12] morfin: why it thinks it's out of box and use real directories
[20:52:42] elomatreb: anomaly: We'll need your code, preferrably on gist.github.com
[20:53:26] jenrzzz: has joined #ruby
[20:53:27] jenrzzz: has joined #ruby
[20:54:57] morfin: ah screw that it's bedtime
[20:54:59] anomaly: elomatreb: https://gist.github.com/anonymous/67b61c9f1525985e5cf4dc666be4982a
[20:55:16] stephenh: Hi! I've been following the answer at https://stackoverflow.com/questions/3258518/ruby-get-available-disk-drives and I wondered how is it possible to view the methods of the drive variable if they are not known (or any other object?)
[20:55:19] morfin: at least i found out that installation of ruby succeded
[20:55:26] stephenh: I thought perhaps I could use .inspect, like at https://hastebin.com/evavebewot.rb, but that didn't work
[20:56:05] elomatreb: anomaly: Try and see what `puts` returns (e.g. in irb/pry)
[20:56:07] stephenh: normally at this point I would just look at the file in the gem, but thought I would ask if there was a way to, like, discover methods available on an object rather than always looking at the code itself
[20:57:03] MrBismuth: has joined #ruby
[20:57:10] elomatreb: stephenh: Almost all objects have #methods
[20:57:50] stephenh: awesome, that worked!
[20:57:54] stephenh: mystery solved, thanks!
[20:58:18] elomatreb: If you pass it true as an argument it won't show inherited methods btw
[20:58:52] anomaly: `<main>': undefined method `length' for nil:NilClass (NoMethodError)
[20:58:53] anomaly: using puts
[20:59:32] elomatreb: anomaly: https://eval.in/813638
[21:00:16] olivier__: has joined #ruby
[21:01:07] prubini87: has joined #ruby
[21:01:49] ben_h: has joined #ruby
[21:02:24] anomaly: elomatreb: pardon my not grasping the meaning. that was not interpolated strings. I can take a string like count = "this is a sentence".length puts count and it works. it seems the problem is with the interpolated strings.
[21:03:09] elomatreb: No, it's just that puts does not return its argument (the interpolated string), but rather nil
[21:03:43] faelkle: has joined #ruby
[21:03:43] faelkle: has joined #ruby
[21:03:59] poloych: has joined #ruby
[21:04:22] spcmao: has joined #ruby
[21:05:02] jenrzzz: has joined #ruby
[21:07:54] Qommand0r: has joined #ruby
[21:08:05] SCHAPiE: has joined #ruby
[21:09:51] boombox_: has joined #ruby
[21:10:35] dminuoso: elomatreb: You can also use havenwood, our new repl.
[21:11:21] dminuoso: Let's see if it works!
[21:11:23] dminuoso: >> a = puts 1
[21:11:25] ruby[bot]: dminuoso: # => 1 ...check link for more (https://eval.in/813640)
[21:11:28] dminuoso: havenwood>> a = puts 1
[21:11:36] dminuoso: elomatreb: ^_
[21:11:49] dminuoso: Much improved version as you can see.
[21:11:51] elomatreb: So the machines have claimed another victim
[21:12:00] muslimgirl: has joined #ruby
[21:13:59] GinoMan2440: has joined #ruby
[21:15:18] Uranio: has joined #ruby
[21:15:56] anomaly: elomatreb: I took out puts from the variable name and now it works. thanks for the help.
[21:16:28] anomaly: not from the variable name but from the variable content
[21:16:51] whathappens: has joined #ruby
[21:17:16] elomatreb: Yeah, that's exactly what I meant. puts prints the String you give it, and returns nil
[21:18:05] dminuoso: havenwood>> puts (puts(1)).nil?
[21:18:12] jdawgaz: has joined #ruby
[21:18:37] anomaly: elomatreb: I was not grasping your meaning. so rather than pester I kept tinkering until I figured it out.
[21:19:03] zenspider: `p` however, DOES return the value (now)
[21:19:13] elomatreb: Sorry. If you have questions, feel free to ask them
[21:20:18] dminuoso: zenspider: since when?
[21:21:36] zenspider: I think 2.0 but maybe I bit later
[21:22:03] stephenh: elomatreb: apparently I got ahead of myself... looking at https://hastebin.com/galekujoxo.rb I don't see #Drives but it is there..
[21:22:31] MarkBilk_: has joined #ruby
[21:23:39] dminuoso: 19>> puts (p(42))
[21:23:40] ruby[bot]: dminuoso: # => 42 ...check link for more (https://eval.in/813643)
[21:23:43] dminuoso: 18>> puts (p(42))
[21:23:49] ruby[bot]: dminuoso: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[21:23:51] dminuoso: 18>> puts (p(42))
[21:23:52] gains: has joined #ruby
[21:23:52] bkxd: has joined #ruby
[21:23:54] elomatreb: stephenh: 1) Uppercase method name? 2) It may be using method_missing, check the source maybe?
[21:23:57] ruby[bot]: dminuoso: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[21:24:22] aurelien`: has joined #ruby
[21:24:26] guidos_: has joined #ruby
[21:24:33] ircmaxell_: has joined #ruby
[21:24:35] chromis_: has joined #ruby
[21:24:36] itaipu: has joined #ruby
[21:24:36] peteretep_: has joined #ruby
[21:24:40] craysiii1: has joined #ruby
[21:24:41] charles81__: has joined #ruby
[21:24:49] hlmjr: has joined #ruby
[21:24:50] skmp_: has joined #ruby
[21:24:52] t-recx: has joined #ruby
[21:24:55] caw_: has joined #ruby
[21:24:56] boxrick1_: has joined #ruby
[21:25:06] stephenh: elomatreb: fair enough.. that's what I would do normally, thought maybe there was some trick people had to show all things callable
[21:25:12] machty_: has joined #ruby
[21:25:27] SeepingN: >> puts (p(42))
[21:25:28] ruby[bot]: SeepingN: # => 42 ...check link for more (https://eval.in/813644)
[21:25:32] dminuoso: 18>> puts (p(42))
[21:25:33] SeepingN: why are you putting 18 before it
[21:25:43] ruby[bot]: dminuoso: # => /tmp/execpad-7898aceafbd4/source-7898aceafbd4:2: warning: don't put space before argument parenthese ...check link for more (https://eval.in/813645)
[21:25:43] dminuoso: SeepingN: It selects the Ruby version 1.8
[21:25:44] elomatreb: That's what #methods does, but since you can't predict what method_missing may do, those won't show up
[21:25:47] elomatreb: stephenh: ^
[21:25:56] jenrzzz: has joined #ruby
[21:26:01] jenrzzz: has joined #ruby
[21:26:01] dminuoso: SeepingN: There's a handful of other modifiers
[21:26:07] RazorX-: has joined #ruby
[21:26:08] Talltree_: has joined #ruby
[21:26:13] SeepingN: 18>>puts(p(42))
[21:26:14] ruby[bot]: SeepingN: # => 42 ...check link for more (https://eval.in/813646)
[21:26:15] dminuoso: ast>> puts 1 {}
[21:26:16] ruby[bot]: dminuoso: I have parsed your code, the result is at https://eval.in/813647
[21:26:18] elomatreb: You could write a method_missing that rolls a dice to check if a method does something or raises an error
[21:26:19] justache: has joined #ruby
[21:26:21] SeepingN: remove space, fix life
[21:26:24] dminuoso: asm>> puts 1 {}
[21:26:25] ruby[bot]: dminuoso: I have disassembled your code, the result is at https://eval.in/813648
[21:26:25] Xeago_: has joined #ruby
[21:26:25] rheddry: has joined #ruby
[21:26:34] dminuoso: tok>> puts 1 {}
[21:26:35] ruby[bot]: dminuoso: I have tokenized your code, the result is at https://eval.in/813649
[21:26:48] pleiosau1: has joined #ruby
[21:26:48] dreamthese: has joined #ruby
[21:26:50] _DanN__: has joined #ruby
[21:26:51] genpaku_: has joined #ruby
[21:26:56] sebd_: has joined #ruby
[21:27:07] mnem: has joined #ruby
[21:27:38] dminuoso: SeepingN: Just be cary of the tokenization. As zenspider has pointed out the Ripper implementation is kind of rubbish
[21:28:13] ColeHub: has joined #ruby
[21:28:15] nyuszika7h_: has joined #ruby
[21:28:17] dasher00: has joined #ruby
[21:28:48] aredride-: has joined #ruby
[21:28:54] Iota-: has joined #ruby
[21:29:01] gix-: has joined #ruby
[21:29:05] ntt_: has joined #ruby
[21:29:10] yasu_: has joined #ruby
[21:29:10] Liothen-: has joined #ruby
[21:29:16] DarkBushido_: has joined #ruby
[21:29:17] eputnam: has joined #ruby
[21:29:20] arthurnn_: has joined #ruby
[21:29:32] nebiros_: has joined #ruby
[21:29:32] pragmatism: has joined #ruby
[21:29:34] SeepingN: that's all beyond me anyway
[21:29:38] russt: has joined #ruby
[21:29:49] csaunders_: has joined #ruby
[21:29:50] DarkBushido: has joined #ruby
[21:29:53] nemesit|znc: has joined #ruby
[21:29:57] tessi_zz: has joined #ruby
[21:29:58] CustosLimen: has joined #ruby
[21:30:03] oz: has joined #ruby
[21:30:04] Fridtjof: has joined #ruby
[21:30:19] Kilo`byte: has joined #ruby
[21:30:24] Didac: has joined #ruby
[21:30:27] gsingh93: has joined #ruby
[21:30:32] potatoe: has joined #ruby
[21:30:32] potatoe: has joined #ruby
[21:30:43] Didac: has joined #ruby
[21:32:10] dminuoso: SeepingN: And then there's the havenwood modifier/
[21:32:13] Drakevr: has joined #ruby
[21:32:26] stephenh: elomatreb: so essentially best it to look at source because otherwise you could miss stuff :) ?
[21:32:38] SeepingN: The Havenwood Modifier, in theaters this fall
[21:32:48] dminuoso: havenwood>> puts "hello world"; Kernel.dup
[21:32:49] lpaste: has joined #ruby
[21:33:03] __Yiota: has joined #ruby
[21:33:10] dminuoso: It doesn't work very reliably (yet) though. We are working on it.
[21:33:17] elomatreb: stephenh: Overusing method_missing's is considered bad practice for this reason
[21:33:39] itaipu: has joined #ruby
[21:33:44] Kilo`byte: has joined #ruby
[21:34:03] bokayio: has joined #ruby
[21:34:04] bkutil: has joined #ruby
[21:34:06] octomancer: has joined #ruby
[21:34:08] snapcase: has joined #ruby
[21:34:12] texasmynsted: has joined #ruby
[21:34:14] jinie: has joined #ruby
[21:34:25] Paradox: has joined #ruby
[21:34:32] ecuanaso: has joined #ruby
[21:34:39] olivier__: has joined #ruby
[21:34:42] hfp: has joined #ruby
[21:34:42] dminuoso: SeepingN: Oh and then there's another modifier I forgot to mention
[21:34:50] dminuoso: baweaver>> puts "hello world"; Kernel.dup
[21:34:57] baweaver: # => "screw off"
[21:34:58] nebiros: has joined #ruby
[21:34:58] nebiros: has joined #ruby
[21:35:01] Bhootrk_: has joined #ruby
[21:35:15] dminuoso: Behavior is kind of erradic and usually filled with (bad) puns.
[21:35:26] dminuoso: >> Kernel.pun
[21:35:28] ruby[bot]: dminuoso: # => undefined method `pun' for Kernel:Module ...check link for more (https://eval.in/813650)
[21:35:30] baweaver: # => "a good pun is its own reword"
[21:38:46] SCHAPiE: has joined #ruby
[21:38:59] jenrzzz: has joined #ruby
[21:38:59] jenrzzz: has joined #ruby
[21:39:45] daxroc: has joined #ruby
[21:40:39] marr123: has joined #ruby
[21:42:37] cschneid_: has joined #ruby
[21:43:04] cschneid_: has joined #ruby
[21:45:05] muelleme: has joined #ruby
[21:47:55] HalcyonicStorm: has joined #ruby
[21:56:29] GinoMan: has joined #ruby
[21:56:30] ben_h: has joined #ruby
[21:57:43] konsolebox: has joined #ruby
[21:57:49] evanleck: has joined #ruby
[21:58:45] dgs: has left #ruby: ("Leaving...")
[21:59:29] mrconfused: has joined #ruby
[21:59:48] herbmillerjr: has joined #ruby
[22:01:57] snapcase: has joined #ruby
[22:02:38] bkutil: has joined #ruby
[22:03:17] jackjackdripper: has joined #ruby
[22:03:38] dviola: has joined #ruby
[22:04:33] firstdayonthejob: has joined #ruby
[22:07:34] npgm: has joined #ruby
[22:09:52] im0nde: has joined #ruby
[22:10:34] gothicsouth: has joined #ruby
[22:16:31] HoierM: has joined #ruby
[22:18:32] mim1k: has joined #ruby
[22:18:47] sun[BEAM]: has joined #ruby
[22:18:51] sun[BEAM]: Sup. Anyone interested in friendly talking, flirting and Love? Join our Server: irc.ladysclub-irc.net Port 6667 / SSL 6697 Main Room #Outlaws :) Flirt/Fun/Love :)
[22:20:43] baweaver: !spam sun[BEAM]
[22:20:43] ruby[bot]: +bb sun[BEAM]!*@*$#ruby-banned *!*@ip1f11f87f.dynamic.kabel-deutschland.de$#ruby-banned
[22:20:43] ruby[bot]: ruby[bot] kicked sun[BEAM]: is a bannable offense, see http://ruby-community.com/pages/user_rules
[22:21:48] baweaver: ACTION blows smoke off gun
[22:23:27] dminuoso: baweaver: Have you tried blowing off the torch off a blow torch?
[22:23:32] Radar: GOOD MORNING
[22:24:06] dminuoso: Good evening.
[22:24:17] baweaver: you're too late Radar. I've already won this round of whack-a-troll
[22:24:43] jdsampayo: poor spammer, only wanted some love
[22:24:53] dminuoso: baweaver: I lost todays round in nitpicking.
[22:25:07] baweaver: dminuoso cookies--
[22:28:00] ben_h: has joined #ruby
[22:28:03] __Yiota: has joined #ruby
[22:30:55] __Yiota: has joined #ruby
[22:31:35] olivier__: has joined #ruby
[22:34:04] cdg_: has joined #ruby
[22:34:46] TTilus: has joined #ruby
[22:36:49] SpComb: has joined #ruby
[22:39:41] prubini87: has joined #ruby
[22:46:12] GodFather: has joined #ruby
[22:47:13] muelleme: has joined #ruby
[22:53:11] MarkBilk: has joined #ruby
[22:58:14] snapcase: has joined #ruby
[22:58:14] bkutil: has joined #ruby
[22:58:18] jdawgaz: has joined #ruby
[22:59:11] prubini87: has joined #ruby
[23:01:43] SaschaVoid: has joined #ruby
[23:04:23] cjhowe7: has joined #ruby
[23:08:11] prubini87: has joined #ruby
[23:16:15] Rodya_: has joined #ruby
[23:17:49] jdawgaz: has joined #ruby
[23:18:34] jdawgaz: has joined #ruby
[23:20:34] Cohedrin: has joined #ruby
[23:20:46] nertzy: has joined #ruby
[23:21:44] jwheare: has joined #ruby
[23:23:59] gothicsouth: has joined #ruby
[23:25:26] balazs__: has joined #ruby
[23:26:27] duderonomy: has joined #ruby
[23:29:50] SaschaVoid: has joined #ruby
[23:33:55] hutch34: has joined #ruby
[23:34:21] davidmichaelkarr: has joined #ruby
[23:47:06] poloych: has joined #ruby
[23:47:57] muelleme: has joined #ruby
[23:52:19] alveric4: has joined #ruby
[23:52:19] Cohedrin: has joined #ruby
[23:59:29] LucasTT: hi, if I have a Hash 'students', that can contain either {}, { 'Class 1' => {} }, or { 'Class 1' => [ 'Alice' ] }
[23:59:36] LucasTT: What's the simplest way to add another student in its class? I'd like to avoid doing it in two steps like:
[23:59:42] LucasTT: students['Class 2'] ||= [] ; students['Class 2'] << 'Bob' (my real use case has more than two levels)