« Back to channel list

#ruby - 06 September 2015

« Back 1 day Forward 1 day »
[00:00:09] jher: shevy: wow that bare-words thing shows some crazy metaprogramming
[00:00:09] Mon_Ouie: The code that is executed when a new instance of a class is created is the initialize method
[00:00:18] shevy: jher haha I loved the pictures
[00:00:25] jher: Reminds me of an XKCD a while back about JS
[00:01:14] jher: https://xkcd.com/1537/
[00:02:02] shevy: we can not poke too much fun at javascript because it is the most popular language on github :( http://githut.info/
[00:03:22] shevy: floor(10.5)
[00:03:22] jher: It's pretty useful though
[00:03:33] jher: Not the floor, JS in general
[00:03:47] shevy: well you don't have an alternative
[00:04:32] jher: Ha! `Array(16).join("wat" - 1) + "Batman!"`
[00:08:36] diegoaguilar: has joined #ruby
[00:09:22] fgo: has joined #ruby
[00:11:18] majjoha: has joined #ruby
[00:11:23] Mon_Ouie: has joined #ruby
[00:13:53] dopamean_: has joined #ruby
[00:14:45] pyon: has joined #ruby
[00:16:21] tno: has joined #ruby
[00:16:54] theery: has joined #ruby
[00:19:35] grenierm: has joined #ruby
[00:26:44] n0xff: has joined #ruby
[00:27:03] Rurik: has joined #ruby
[00:27:08] grenierm: has joined #ruby
[00:27:28] michaeldeol: has joined #ruby
[00:28:27] Rollabunna: has joined #ruby
[00:34:48] moeabdol: has joined #ruby
[00:37:21] bronson: has joined #ruby
[00:37:31] pontiki: that's just silly
[00:38:07] ghr: has joined #ruby
[00:39:57] mahmoudmahfouz: has joined #ruby
[00:42:31] keen__________14: has joined #ruby
[00:43:23] [k-: has joined #ruby
[00:43:44] failshell: has joined #ruby
[00:47:18] Maletor: has joined #ruby
[00:52:24] Kallis: has joined #ruby
[00:53:04] govt: has joined #ruby
[00:53:04] govt: has joined #ruby
[00:53:38] shevy: that's legal javascript!
[00:54:51] luckyme: has joined #ruby
[00:56:40] rickmasta: has joined #ruby
[00:56:56] michaeldeol: has joined #ruby
[00:59:08] failshell: has joined #ruby
[00:59:28] mistergibson: has joined #ruby
[01:01:01] bruno-: has joined #ruby
[01:01:20] HAL2328: has joined #ruby
[01:03:20] juanpablo____: has joined #ruby
[01:04:15] Ox0dea: >> "#{0/0.0}" * 16 + ' Batman!'
[01:04:16] ruboto: Ox0dea # => "NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN Batman!" (https://eval.in/428611)
[01:05:07] datanoise: has joined #ruby
[01:05:25] datanoise: has joined #ruby
[01:07:03] shevy: what is NaN in ruby
[01:08:41] mary5030: has joined #ruby
[01:08:46] Ox0dea: The same as NaN in any other language, presumably.
[01:08:54] workmad3: has joined #ruby
[01:11:01] fgo: has joined #ruby
[01:12:38] jher: Divide by zero!
[01:12:48] ruboto: jher # => divided by 0 (ZeroDivisionError) ...check link for more (https://eval.in/428612)
[01:12:58] jher: Wait so that means
[01:13:08] jher: >> 1 / 0.0
[01:13:09] ruboto: jher # => Infinity (https://eval.in/428613)
[01:13:15] HAL2328: NaN = Not a Number
[01:13:32] jher: >> 0 / 0.0
[01:13:33] ruboto: jher # => NaN (https://eval.in/428614)
[01:13:39] jher: I'm confused why
[01:13:46] jher: 0 / 0 isn't NaN
[01:13:50] jher: But 0 / 0.0 is
[01:14:10] Ox0dea: jher: IEEE 754.
[01:14:43] HAL2328: 0 / 0.0 is NaN
[01:14:56] jher: 0x0dea: Ah, I see
[01:15:48] grenierm: has joined #ruby
[01:16:07] HAL2328: 0 is a fixnum
[01:16:10] HAL2328: 0.0 is float
[01:16:29] Ox0dea: >> [Float::NAN, Float::INFINITY] # jher
[01:16:30] ruboto: Ox0dea # => [NaN, Infinity] (https://eval.in/428619)
[01:16:36] Ox0dea: Notice the namespace under which they're defined.
[01:17:34] Ox0dea: Most languages that use IEEE 754 semantics for floating point numbers provide some means to acquire NaN and Infinity.
[01:17:41] Ox0dea: Even C: https://eval.in/428620
[01:19:17] Scripore: has joined #ruby
[01:19:31] Mendenhall: has joined #ruby
[01:21:21] shevy: why is the name Float::NAN
[01:21:45] weemsledeux: has joined #ruby
[01:22:09] gambl0re: has joined #ruby
[01:22:14] shevy: I was trying to desperately use Float::NaN
[01:22:34] Ox0dea: shevy: Do you even naming conventions?
[01:22:42] Ox0dea: (I secretly dislike it too. :/)
[01:22:46] shevy: because ruby enforces them?
[01:22:56] Ox0dea: Well, no, but they're socially enforced.
[01:23:06] shevy: oh like rubocop
[01:23:28] Ox0dea: People excepting screaming snake case for constants, and it'd be a silly place to break the principle of least astonishment.
[01:23:32] Ox0dea: *People expect
[01:23:40] shevy: there is no such principle in ruby
[01:23:55] shevy: unless you are matz
[01:24:01] Ox0dea: And yet here we are discussing your (misplaced) astonishment.
[01:24:38] shevy: "we" are not doing anything, you are doing something
[01:25:03] victorkohl: has joined #ruby
[01:25:14] Ox0dea: This is a dialogue, the "di" indicating two.
[01:25:48] jenrzzz: has joined #ruby
[01:26:05] shevy: this is a dialogue?
[01:26:35] shevy: so we have constants upcased
[01:26:51] shevy: under what procedure will they become capitalized or non-capitalized, aka NaN versus Infinity?
[01:28:03] shevy: as a String representation that is
[01:29:01] [k-: has joined #ruby
[01:30:20] shevy: >> (Math::HMM).to_s
[01:30:21] ruboto: shevy # => uninitialized constant Math::HMM (NameError) ...check link for more (https://eval.in/428622)
[01:30:58] shevy: somehow I seem to have CMath
[01:31:48] Contigi: has joined #ruby
[01:32:36] luckyme: has joined #ruby
[01:38:13] mary5030: has joined #ruby
[01:38:53] grenierm: has joined #ruby
[01:41:27] swgillespie: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[01:41:32] quazimodo: has joined #ruby
[01:41:52] grenierm: has joined #ruby
[01:43:50] RobertBirnie: has joined #ruby
[01:44:50] wildlander: has joined #ruby
[01:46:25] matp: has joined #ruby
[01:47:21] matp: has joined #ruby
[01:50:29] Rurik: has joined #ruby
[01:50:44] moeabdol: has joined #ruby
[01:50:51] sargas: has joined #ruby
[01:53:04] based_: has joined #ruby
[01:54:40] jher: has joined #ruby
[01:58:21] dvabr: has left #ruby: ()
[02:00:03] failshell: has joined #ruby
[02:01:54] davedev24: has joined #ruby
[02:02:06] based_: has joined #ruby
[02:05:51] jdawgaz: has joined #ruby
[02:06:22] PaulCapestany: has joined #ruby
[02:07:28] fumk: has joined #ruby
[02:09:26] d5sx43: has joined #ruby
[02:11:38] fgo: has joined #ruby
[02:12:28] majjoha: has joined #ruby
[02:25:30] ricer: has joined #ruby
[02:25:51] KensoDev: has joined #ruby
[02:26:40] segfalt: has joined #ruby
[02:26:49] solocshaw: has joined #ruby
[02:27:14] solocshaw: has joined #ruby
[02:28:32] michaeldeol: has joined #ruby
[02:29:05] Rollabunna: has joined #ruby
[02:30:13] aaeron: has joined #ruby
[02:30:50] mary5030: has joined #ruby
[02:31:05] jgt: has joined #ruby
[02:31:22] deol: has joined #ruby
[02:31:30] theery: has joined #ruby
[02:31:35] i: has joined #ruby
[02:34:01] hololeap: has joined #ruby
[02:35:09] davedev24: has joined #ruby
[02:38:30] bb010g: has joined #ruby
[02:41:09] stardiviner: has joined #ruby
[02:43:03] esauOp: has joined #ruby
[02:43:43] esauOp_: has joined #ruby
[02:46:15] ricer: has joined #ruby
[02:47:58] hmsimha_: has joined #ruby
[02:49:46] jenrzzz: has joined #ruby
[02:50:51] Rakunh0: has joined #ruby
[02:51:27] darkf: has joined #ruby
[02:52:23] juanpablo____: has joined #ruby
[02:57:44] workmad3: has joined #ruby
[03:00:19] based_: has joined #ruby
[03:01:20] jdawgaz: has joined #ruby
[03:01:48] havenwood: has joined #ruby
[03:02:17] gener1c: has joined #ruby
[03:07:05] roshanavand: has joined #ruby
[03:12:41] fgo: has joined #ruby
[03:13:12] majjoha: has joined #ruby
[03:13:47] braincrash: has joined #ruby
[03:14:52] theery: has joined #ruby
[03:14:59] ledestin: has joined #ruby
[03:15:44] codecop: has joined #ruby
[03:15:45] codecop_: has joined #ruby
[03:16:40] bruno-: has joined #ruby
[03:18:00] Rakunh0: has joined #ruby
[03:19:39] freerobby: has joined #ruby
[03:24:26] tejasmanohar: has joined #ruby
[03:24:31] tejasmanohar: lol eval.so went down O.o
[03:24:37] tejasmanohar: http://downforeveryoneorjustme.com/eval.so
[03:24:57] tejasmanohar: right as i was using it... i don't think it was related, i didn't run anything bad, just a PHP function returning 0 and nothing else lol
[03:25:11] Ox0dea: tejasmanohar: isup.me
[03:26:34] tejasmanohar: http://isup.me/eval.so Ox0dea
[03:26:58] Ox0dea: tejasmanohar: Sure, I was just pointing out that there's a nicer URL.
[03:27:23] tejasmanohar: Ox0dea: oh ok :P
[03:27:26] tejasmanohar: well shit man O.o
[03:27:29] tejasmanohar: hackathon project rekt
[03:27:42] Ox0dea: Why not operate your own sandbox?
[03:28:09] yfeldblum: has joined #ruby
[03:29:14] johnhamelink: has joined #ruby
[03:30:59] Klumben: has joined #ruby
[03:31:06] Shidash: has joined #ruby
[03:31:29] tejasmanohar: Ox0dea: now i know _why_ i should! :P
[03:31:58] shevy: _why had one
[03:32:10] shevy: where is ze code to it
[03:32:10] jgt: has joined #ruby
[03:32:44] based_: has joined #ruby
[03:32:59] michaeldeol: has joined #ruby
[03:33:04] dfinninger: has joined #ruby
[03:33:20] Musashi007: has joined #ruby
[03:35:17] gizmore: that??s weird
[03:35:20] gizmore: module Ricer
[03:35:20] gizmore: class Thread < Thread
[03:35:32] gizmore: superclass mismatch for class Thread
[03:35:44] gizmore: in the lower line
[03:35:46] ohaibbq: has joined #ruby
[03:35:49] tejasmanohar: eval.in + eval.so are by the same people right?
[03:36:01] bazbing80: has joined #ruby
[03:36:34] gizmore: i think class Ricer::Thread < Thread might fix it?
[03:37:11] gizmore: or maybe i need Thread < System::Thread ?
[03:37:21] nini1294: has joined #ruby
[03:37:22] shevy: tejasmanohar the code to it, since someone else suggested it
[03:37:51] shevy: gizmore I found usually that it helps to be more specific; sometimes you may have to use leading ::
[03:38:00] shevy: like I have one module RBT
[03:38:16] nini1294: has left #ruby: ()
[03:38:19] gizmore: shevy: so ::Thread will mean the real Thread class from the "kernel"?
[03:38:32] tejasmanohar: yeah i don't see the code to it online
[03:38:39] shevy: inside of that, I have a module called Shared. When I define a class, like: module RBT; class Bla; then I can do either include Shared, or include RBT::Shared <-- I have been doing the extra :: work lately
[03:38:42] gizmore: shevy: like class Foo::Thread < ::Thread ?
[03:39:01] moeabdol: has joined #ruby
[03:39:08] shevy: gizmore if in doubt yeah although I never had to do ::Thread; I know that I had to use :: for ruby-gnome code, in the module Gtk
[03:39:21] gizmore: shevy: i am inheriting the real ruby thread class
[03:39:27] shevy: like, include Gtk::Colours versus ::Gtk::Colours
[03:40:01] shevy: ok, class Foo must exist in your example yes?
[03:40:05] gizmore: https://github.com/gizmore/ricer2/blob/master/app/models/ricer/thread.rb
[03:40:37] gizmore: Ricer::Thread inherits from "real"/"kernel" Thread class .. so Thread < ::Thread ?
[03:40:53] gizmore: the error happens on reloading code
[03:41:04] gizmore: when Ricer::Thread already exists
[03:41:34] shevy: will not this warning happen whenever you reload code anyway?
[03:42:46] gizmore: shevy: no... on startup all is fine
[03:42:58] toretore: use ::Thread; when you reload the file, Ricer::Thread exists, and `Thread` in that context evaluates to Ricer::Thread, not ::Thread
[03:43:11] gizmore: yep... thanks shevy and toretore
[03:43:42] toretore: but Ricer::Thread's superclass is ::Thread, and when reloading, you're reopening the class, not redefining it, thus the mismatch
[03:43:43] clarkenciel: has joined #ruby
[03:46:10] TravisTheNavi: has joined #ruby
[03:46:20] howdoi: has joined #ruby
[03:46:41] Musashi007: has joined #ruby
[03:46:57] TravisTheNavi: Can somebody help me review my code?
[03:47:03] TravisTheNavi: http://pastebin.com/zktzsXg9
[03:47:04] ruboto: TravisTheNavi, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/60bfff07c80f4f4f1c5f
[03:47:04] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[03:47:21] [k-: shevy: look! he is using ruby! https://youtu.be/DBXZWB_dNsw
[03:47:51] TravisTheNavi: It works until I get to line 15 and then I get an error saying "undefined local variable or method `x' for main:Object (NameError)
[03:48:16] ranchodev: has joined #ruby
[03:48:19] TravisTheNavi: Thank you ruboto!
[03:48:53] Ox0dea: [k-: I see Objective-C?
[03:49:48] Ox0dea: TravisTheNavi: You're setting `x` in the context of `getGuess`; it goes out of scope at the end of the method.
[03:51:30] UtkarshRay: has joined #ruby
[03:51:58] shevy: [k- a wunderkind!
[03:52:53] Rakunh0: has joined #ruby
[03:53:24] tejasmanohar: has joined #ruby
[03:54:13] shevy: [k- that could be you
[03:54:26] baweaver: has joined #ruby
[03:55:18] Ox0dea: TravisTheNavi: What resource(s) are you using to learn Ruby?
[03:55:20] [k-: Ox0dea: it's in the early part of the video
[03:55:44] [k-: When he goes to his school and one-on-one with his lecturer
[03:56:00] [k-: hold on, i'll just link it
[03:56:51] [k-: hm, you cant link timestamps in mobile
[03:57:07] [k-: the video at 01:14
[03:58:32] TravisTheNavi: Ox0dea: The internet.
[03:58:47] Scripore: has joined #ruby
[03:59:00] TravisTheNavi: More accurately, I'm just looking up things that I need to know about the syntax. For example, I may look up how to define functions.
[03:59:09] Ox0dea: Ruby doesn't have functions.
[03:59:26] naim: has joined #ruby
[03:59:35] TravisTheNavi: Really? So what did I do on line 2 of my code then?
[03:59:41] Ox0dea: You defined a method.
[03:59:51] TravisTheNavi: I don't understand the difference.
[04:00:07] TravisTheNavi: I assumed that those two words were interchangeable.
[04:00:11] Ox0dea: Not quite.
[04:00:19] Ox0dea: A method is a function attached to an object.
[04:00:43] failshell: has joined #ruby
[04:00:47] Ox0dea: [k-: That is indeed Ruby.
[04:00:53] Ox0dea: >> def foo; end; method(:foo) # TravisTheNavi
[04:00:54] ruboto: Ox0dea # => #<Method: Object#foo> (https://eval.in/428631)
[04:01:04] Musashi007: has joined #ruby
[04:01:14] Ox0dea: See? Even though I defined `foo` at the top level, it ends up being a method on the Object class.
[04:01:14] shevy: [k- he wants to work at apple :(
[04:01:49] tejasmanohar_: has joined #ruby
[04:01:54] gix: has joined #ruby
[04:02:34] TravisTheNavi: Ox0dea: And so you use .foo to instance your method?
[04:02:50] Ox0dea: I'm afraid I can't make sense of the question. :/
[04:02:58] TravisTheNavi: To run the method.
[04:03:07] TravisTheNavi: After you have defined it.
[04:03:35] TravisTheNavi: Nevermind. I think I need to take a class on Ruby before I continue coding this program.
[04:03:53] Ox0dea: Consider reading a book?
[04:03:57] TravisTheNavi: It seems much different from any other language I've dealt with so far (I'm still a beginner, obviously.)
[04:04:03] TravisTheNavi: I have the Pickaxe book.
[04:04:04] ndrei: has joined #ruby
[04:04:08] TravisTheNavi: And Learn to Program.
[04:04:20] Ox0dea: Are you using them as doorstops? :P
[04:04:33] TravisTheNavi: I recently loaned Learn to Program to my friend (last night) so that I could get him interested in development.
[04:04:39] TravisTheNavi: So I can't really access it for awhile.
[04:04:45] Ox0dea: Well, that was kind of you.
[04:04:47] TravisTheNavi: I'm only using Ruby right now to help him out.
[04:04:52] Ox0dea: The MINASWAN is strong in this one.
[04:06:03] [k-: matz is nice and so we are nice (minaswan)
[04:06:03] TravisTheNavi: Quick question. I'd imagine that many of the users on this channel use Ruby professionally. Is Ruby really dying?
[04:06:22] [k-: Ruby is not dying, you are misinformed
[04:06:44] Ox0dea: It is past its peak, for what that's worth.
[04:06:48] TravisTheNavi: Don't want to learn something that will be dead in 5 years.
[04:06:52] bnagy: just being subsumed by Rails
[04:07:07] bnagy: winky face
[04:07:18] naim: guys how you write clean and optimize code
[04:07:28] bnagy: naim: practice
[04:07:40] naim: where i can learn?
[04:07:42] Ox0dea: TravisTheNavi: See https://www.youtube.com/watch?v=zs0E4E83_X8 for an optimistic take on Ruby's decline.
[04:07:47] bnagy: naim: practice?
[04:07:57] Ox0dea: naim: Do you have a keyboard?
[04:08:03] bnagy: sounds like I'm being an ass but I'm really not
[04:08:11] naim: i mean any refference book
[04:08:22] bnagy: the best way to learn to write good code is to write 10s of thousands of lines of code
[04:08:49] naim: like 10 thousund hours of code :)
[04:08:50] paradisaeidae: has joined #ruby
[04:08:51] bnagy: books are like a tertiary resource imho
[04:08:54] TravisTheNavi: Thank you for the link, Ox0dea . Watching now.
[04:09:35] TravisTheNavi: One more quick question: What do you personally use the Ruby language to develop?
[04:10:00] Ox0dea: I do a lot of boring-ass ETL, but being able to do it in Ruby keeps me sane.
[04:10:08] TravisTheNavi: I figured it could be good to learn for backend scripting of websites instead of learning PHP.
[04:10:40] Ox0dea: Ruby is good for almost everything, numerical analysis and scientific computing being the notable exceptions.
[04:10:42] bnagy: ruby is a fairly awesome prototyping language. It can be pretty much as low level as you want.
[04:10:57] bnagy: well, it's (imho) fine for scicomp, just slow
[04:11:09] bnagy: but it's quick to write, which is sometimes a good tradeoff
[04:12:16] Musashi007: has joined #ruby
[04:13:04] inteq: has joined #ruby
[04:13:36] theery: has joined #ruby
[04:13:47] fgo: has joined #ruby
[04:13:55] majjoha: has joined #ruby
[04:15:47] braincra-: has joined #ruby
[04:16:27] RobertBirnie: has joined #ruby
[04:17:27] Rakunh0: has joined #ruby
[04:17:41] qiukun: has joined #ruby
[04:17:55] aaeron: has joined #ruby
[04:19:10] tubuliferous_: has joined #ruby
[04:20:26] ricer: has joined #ruby
[04:20:54] s00pcan: has joined #ruby
[04:22:25] mary5030: has joined #ruby
[04:26:18] pranny: has joined #ruby
[04:26:53] Musashi007: has joined #ruby
[04:27:31] qiukun: has joined #ruby
[04:28:21] theery_: has joined #ruby
[04:30:12] Rollabunna: has joined #ruby
[04:32:22] [k-: shevy: i can't be like him unfortunately
[04:32:28] [k-: he lives and breathes code
[04:32:35] [k-: he even dreams about it @.@
[04:32:45] datanoise: has joined #ruby
[04:32:54] jgt: has joined #ruby
[04:33:28] RobertBirnie: has joined #ruby
[04:33:50] jenrzzz: has joined #ruby
[04:34:32] ndrei: has joined #ruby
[04:36:52] based_: has joined #ruby
[04:38:04] charliesome: has joined #ruby
[04:39:59] shevy: [k- well he is obsessed with it which is why he excels
[04:40:48] juanpablo____: has joined #ruby
[04:42:08] moeabdol: has joined #ruby
[04:42:38] ricer2: has joined #ruby
[04:43:51] [k-: im not obsessed with code!
[04:45:22] The_Phoenix: has joined #ruby
[04:45:37] RobertBirnie: has joined #ruby
[04:46:14] The_Phoenix: has joined #ruby
[04:46:35] workmad3: has joined #ruby
[04:47:05] shevy: yeah me neither... from gregory brown recently https://pbs.twimg.com/media/CN7mzMVVEAACKVo.png:large
[04:55:04] DeweyD: has joined #ruby
[04:58:10] craysiii: has joined #ruby
[04:58:25] psye: has joined #ruby
[04:58:42] pranny: has joined #ruby
[05:00:12] chinmay_dd: has joined #ruby
[05:01:03] sparr: has joined #ruby
[05:01:04] larissa: has joined #ruby
[05:01:04] Voxxit: has joined #ruby
[05:01:16] michaeldeol: has joined #ruby
[05:01:17] based_: has joined #ruby
[05:01:54] khebbie: has joined #ruby
[05:02:03] rickmasta: has joined #ruby
[05:03:10] Ketchy: has joined #ruby
[05:04:22] arescorpio: has joined #ruby
[05:08:39] DoctorMo_: has joined #ruby
[05:09:43] pranny: has joined #ruby
[05:14:54] fgo: has joined #ruby
[05:19:08] craysiii: has joined #ruby
[05:19:08] charliesome: has joined #ruby
[05:20:11] hmsimha_: has joined #ruby
[05:20:14] riotjones: has joined #ruby
[05:20:41] leat: has joined #ruby
[05:22:59] zenspider: has joined #ruby
[05:26:21] hmsimha_: has joined #ruby
[05:26:28] shevy: var odds = evens.map(v => v + 1);
[05:26:33] shevy: this is the feature of javascript
[05:27:06] [k-: that works?
[05:28:27] AlexAltea: has joined #ruby
[05:29:17] mozzarella: es6 arrow functions
[05:29:39] shevy: baweaver: I think I found your logo -> http://blog.printfection.com/files/2012/10/grayshiver2.png
[05:30:02] shevy: [k- they even added classes!
[05:30:13] shevy: https://github.com/lukehoban/es6features
[05:30:35] shevy: there be no boundaries between classes and prototypes any longer \o/
[05:30:39] rcs: has joined #ruby
[05:31:43] [k-: that's more terse than Ruby!
[05:31:58] [k-: (and Haskell)
[05:36:06] Rakunh0: has joined #ruby
[05:36:37] pranny: has joined #ruby
[05:38:11] phatypus: has joined #ruby
[05:38:58] weemsledeux: has joined #ruby
[05:39:13] bronson: has joined #ruby
[05:39:18] pranny: has joined #ruby
[05:41:06] phrozen77: has joined #ruby
[05:42:10] emba: has joined #ruby
[05:42:34] charliesome: has joined #ruby
[05:48:09] tkuchiki: has joined #ruby
[05:49:17] TravisTheNavi: Quick question. Let's say I'm creating a program to read user input and capitalize it. I would first ask what city they were from. However, what if the user input was "san diego"? If I used the .upcase! method, only San would be capitalized.
[05:49:47] TravisTheNavi: How could I ensure that if there is a space located in the user's input, the following character is also capitalized?
[05:50:33] [k-: .split.map(&:upcase).join(' ')
[05:51:04] Ox0dea: has joined #ruby
[05:51:06] tejasmanohar: has joined #ruby
[05:51:12] Ox0dea: That should be :capitalize, not :upcase.
[05:52:18] Ox0dea: >> 'san diego'.split.map(&:capitalize).join(' ') # TravisTheNavi
[05:52:19] ruboto: Ox0dea # => "San Diego" (https://eval.in/428709)
[05:52:21] Ox0dea: >> 'san diego'.gsub(/\b./, &:upcase)
[05:52:22] ruboto: Ox0dea # => "San Diego" (https://eval.in/428710)
[05:52:53] moeabdol: has joined #ruby
[05:54:24] Scripore: has joined #ruby
[05:54:45] pranny: has joined #ruby
[05:55:55] zenspider: has joined #ruby
[05:56:08] DenSchub: has joined #ruby
[05:57:02] [k-: 'san diego and something else'.match(/^(.)(\w+ (.)){0,}/).captures
[05:57:17] [k-: >> 'san diego and something else'.match(/^(.)(\w+ (.)){0,}/).captures
[05:57:18] ruboto: [k- # => ["s", "omething e", "e"] (https://eval.in/428711)
[05:57:24] Ox0dea: What are you even doing?
[05:57:33] [k-: black magic
[05:57:39] Ox0dea: ?experiment
[05:57:39] ruboto: Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
[05:58:20] [k-: it works ok
[05:59:04] roxtrongo: has joined #ruby
[05:59:46] majjoha: has joined #ruby
[06:01:25] pranny: has joined #ruby
[06:01:30] failshell: has joined #ruby
[06:02:36] pranny: has joined #ruby
[06:03:36] jgt: has joined #ruby
[06:04:23] rippa: has joined #ruby
[06:07:18] postmodern: has joined #ruby
[06:07:26] ghr: has joined #ruby
[06:10:41] pranny: has joined #ruby
[06:11:27] Rakunh0: has joined #ruby
[06:13:16] gambl0re: has joined #ruby
[06:15:58] fgo: has joined #ruby
[06:16:17] yardenbar: has joined #ruby
[06:18:13] pranny: has joined #ruby
[06:19:18] wldcordeiro: has joined #ruby
[06:28:33] solars: has joined #ruby
[06:29:20] youngbaks: has joined #ruby
[06:29:34] juanpablo____: has joined #ruby
[06:30:38] Symbiosisz: has joined #ruby
[06:30:44] Rollabunna: has joined #ruby
[06:31:25] sivsushruth: has joined #ruby
[06:33:58] phatypus: has joined #ruby
[06:34:07] pranny: has joined #ruby
[06:35:05] andrei_la: has joined #ruby
[06:35:15] workmad3: has joined #ruby
[06:36:56] kriskropd: has joined #ruby
[06:37:13] tkuchiki: has joined #ruby
[06:39:18] FalseDeal: has joined #ruby
[06:39:40] FalseDeal: has left #ruby: ()
[06:39:43] nofxx: TravisTheNavi, activesupport has #titleize
[06:40:24] watsy: has joined #ruby
[06:41:06] arup_r: has joined #ruby
[06:41:32] sivsushruth: has joined #ruby
[06:43:26] Mendenhall: has joined #ruby
[06:46:43] AlexAltea: has joined #ruby
[06:52:47] tkuchiki: has joined #ruby
[06:54:46] radgeRayden: has joined #ruby
[06:55:23] towski_: has joined #ruby
[06:56:52] Guest31: has joined #ruby
[06:56:54] zenspider: that's black magic?
[06:59:09] moeabdol: has joined #ruby
[07:00:19] emba: has joined #ruby
[07:00:25] majjoha: has joined #ruby
[07:02:36] nofxx: western abracadabra. oriental magic doesn't have a perfect understand of case ;)
[07:02:38] pranny: has joined #ruby
[07:02:47] Exponential: has joined #ruby
[07:02:51] nofxx: zenspider, you live in japan right? I'm confusing?
[07:04:02] zenspider: yes, you're confusing.
[07:04:04] arup_r: nofxx: he is from Seattle
[07:04:21] jgt: has joined #ruby
[07:04:21] UtkarshRay: has joined #ruby
[07:06:54] i: has joined #ruby
[07:11:34] charliesome: has joined #ruby
[07:12:00] pranny: has joined #ruby
[07:12:06] faces: has joined #ruby
[07:14:22] dotix: has joined #ruby
[07:14:52] baweaver: ACTION scratches head
[07:17:06] fgo: has joined #ruby
[07:18:14] dionysus69: has joined #ruby
[07:19:56] jimms: has joined #ruby
[07:21:29] jhass: has joined #ruby
[07:22:55] pranny: has joined #ruby
[07:23:29] Hijiri: has joined #ruby
[07:25:11] khebbie: has joined #ruby
[07:26:18] eGGsha: has joined #ruby
[07:27:35] watsy_: has joined #ruby
[07:27:50] roxtrongo: has joined #ruby
[07:28:15] copygift: has joined #ruby
[07:28:18] copygift: has left #ruby: ()
[07:30:21] bruno-: has joined #ruby
[07:30:47] acke: has joined #ruby
[07:34:27] khebbie: has joined #ruby
[07:34:54] acke: has joined #ruby
[07:35:25] acke: has joined #ruby
[07:35:47] bruno-: has joined #ruby
[07:36:06] acke: has joined #ruby
[07:43:38] fxn: has joined #ruby
[07:44:21] sagittarian: has joined #ruby
[07:49:47] Salehi: has joined #ruby
[07:51:51] banister: has joined #ruby
[07:52:14] lampshades: has joined #ruby
[07:52:23] marienz: has joined #ruby
[07:53:41] Rurik: has joined #ruby
[07:54:19] dotix: has joined #ruby
[07:54:19] dotix: has joined #ruby
[07:57:16] based_: has joined #ruby
[07:58:48] sivsushruth: has joined #ruby
[08:00:32] NightMonkey: has joined #ruby
[08:01:09] majjoha: has joined #ruby
[08:01:13] Spami: has joined #ruby
[08:02:07] failshell: has joined #ruby
[08:06:16] jenrzzz: has joined #ruby
[08:08:12] roelof: has joined #ruby
[08:08:29] ghr: has joined #ruby
[08:09:12] Jackneill: has joined #ruby
[08:09:40] roelof: why do I see this output: http://lpaste.net/140383 on this code : http://lpaste.net/140384
[08:10:14] roelof: I was expecting to see 1, 2, foo
[08:11:25] DeweyD: has joined #ruby
[08:13:33] Zackio: has joined #ruby
[08:15:27] Hounddog: has joined #ruby
[08:18:52] juanpablo____: has joined #ruby
[08:19:24] fgo: has joined #ruby
[08:19:46] noethics: has joined #ruby
[08:19:48] jimms: roelof: the 3 is your input; the Foobar comes first because 0 % 15 is 0
[08:20:09] jimms: Then the rest is falling to the else and just printing the number
[08:20:55] Hounddog: has joined #ruby
[08:20:58] roelof: oke, is there a way I can tell times not to use 0 or can I better use a while loop
[08:22:38] jimms: could add 1 to n or yeah, switch up your loop
[08:23:33] acke: has joined #ruby
[08:24:00] workmad3: has joined #ruby
[08:24:23] emba: has joined #ruby
[08:24:33] fxn: roelof: another alternative is 1.upto(n)
[08:24:37] yeticry: has joined #ruby
[08:24:48] youngbaks: has joined #ruby
[08:24:59] acke: has joined #ruby
[08:25:14] tkuchiki_: has joined #ruby
[08:25:58] juanpablo____: has joined #ruby
[08:26:31] roelof: Thanks all. I have made it working
[08:27:23] Oog: has joined #ruby
[08:27:58] everlost: has joined #ruby
[08:29:09] everlost: if /\A[a-z \r\n]+\Z/ =~ my_var
[08:29:17] everlost: can someone tell me what this ereg means?
[08:29:24] everlost: particulary the \Z/ part
[08:30:15] [k-: &ri Regexp
[08:30:15] `derpy: http://www.rubydoc.info/stdlib/core/Regexp
[08:30:18] fxn: \Z means "end of string, optionally matching before a trailing newline if there is one
[08:30:22] [k-: it's all listed there
[08:30:30] platzhirsch: has joined #ruby
[08:30:31] everlost: thanks guys
[08:30:57] moeSeth: has joined #ruby
[08:31:30] [k-: http://ruby-doc.org/core-2.1.1/Regexp.html
[08:31:38] Rollabunna: has joined #ruby
[08:31:40] [k-: correction, this link above ^
[08:32:34] leat: has joined #ruby
[08:37:33] arup_r: How are you ?
[08:38:07] fxn: hey arup_r ! fine, recovering from a week out in a Perl conference, how about you?
[08:39:04] radgeRayden_: has joined #ruby
[08:39:11] arup_r: fxn: doing good.. Once you said you will think about writing a book on constant autoloading.. Did you started ?
[08:39:30] arup_r: Waiting for your new talk on that same subject
[08:40:22] jhass: here's my book on it: Avoid doing it where you can.
[08:40:33] jhass: Who do I contact to get it printed?
[08:40:39] fxn: heh, I have a personal conflict about that kind of things, in general prefer to contribute such work as part of the Rails docs rather than writing a book so I wrote a guide instead http://guides.rubyonrails.org/autoloading_and_reloading_constants.html
[08:41:02] arup_r: I read the doc.
[08:41:16] bronson: has joined #ruby
[08:41:34] arup_r: it is way much technical... In the middle of the doc I was lost..
[08:41:44] fxn: next step is to document constants in the Ruby documentation, again looking forward to do it in the Ruby project itself
[08:42:02] arup_r: I read 3 times.. I have to read those many more times..
[08:42:21] fxn: yeah, it's a bit technical, and the problem is constants in Ruby are a complicate and undocumented topic
[08:42:39] arup_r: jhass: I got a huge idea after seeing a talk of fxn , about `Class.new` and `class` keyword
[08:43:36] arup_r: I saw there first how class definitions got assigned to the constants.. Before that I had no that deep idea.
[08:43:51] Spami: has joined #ruby
[08:44:04] fxn: arup_r: good, surprising huh
[08:44:20] arup_r: yes it was..
[08:44:39] arup_r: I think you had 3 talks on the same subject if I remember correctly..
[08:45:04] arup_r: but someone have to see the first talk.. to understand the later
[08:45:50] arup_r: jhass: contact Pragprog :D
[08:47:33] zenspider: has joined #ruby
[08:49:14] jenrzzz: has joined #ruby
[08:49:19] noethics: has joined #ruby
[08:50:33] based_: has joined #ruby
[08:51:11] blackmesa: has joined #ruby
[08:55:41] Mon_Ouie: has joined #ruby
[08:55:48] apeiros: MatchData#values_at does not work with named captures
[08:56:01] n008f4g_: has joined #ruby
[09:00:41] youngbaks: has joined #ruby
[09:05:06] jgt: has joined #ruby
[09:05:59] roxtrongo: has joined #ruby
[09:07:13] quazimodo: has joined #ruby
[09:07:15] vmatiyko: has joined #ruby
[09:09:29] chipotle: has joined #ruby
[09:09:30] ghr: has joined #ruby
[09:10:50] blackmesa: has joined #ruby
[09:13:24] jgt: has joined #ruby
[09:17:38] Rurik: has joined #ruby
[09:17:51] bluOxigen: has joined #ruby
[09:18:45] quazimodo: has joined #ruby
[09:19:22] lxsameer: has joined #ruby
[09:20:35] fgo: has joined #ruby
[09:20:50] jamesaxl: has joined #ruby
[09:22:45] David27: has joined #ruby
[09:22:58] jtirila: has joined #ruby
[09:23:24] houhoulis: has joined #ruby
[09:24:07] DmitryBochkarev: has joined #ruby
[09:25:54] ex0ns: has joined #ruby
[09:27:25] stuartb_: has joined #ruby
[09:27:44] jimms: has joined #ruby
[09:28:06] code1o6: has joined #ruby
[09:28:08] Fire1o6: has joined #ruby
[09:30:25] moeabdol: has joined #ruby
[09:32:27] jenrzzz: has joined #ruby
[09:32:35] majjoha: has joined #ruby
[09:32:51] choke: has joined #ruby
[09:33:09] codenapper: has joined #ruby
[09:33:52] bkxd: has joined #ruby
[09:33:53] eightfold: has joined #ruby
[09:35:50] [k-_: has joined #ruby
[09:36:42] mprelude: has joined #ruby
[09:36:58] Oog_: has joined #ruby
[09:37:24] freestyl3r: has joined #ruby
[09:38:27] jtirila: has joined #ruby
[09:40:01] bruno-: has joined #ruby
[09:40:17] blackmesa: has joined #ruby
[09:40:59] bkxd: has joined #ruby
[09:41:12] freestyl3r: hi, i have the following hash: a = { b: { c: { d: 1 } } } but sometimes 'c' key can be missing: a = { b: { d: 1 } }
[09:42:20] freestyl3r: how can i access it in a universal way? i got this so far a[:b].fetch(:c, a[:b])[:d]
[09:42:39] freestyl3r: is there a cleaner way without repeating a[:b] insice fetch()?
[09:44:30] xwct: has joined #ruby
[09:44:34] jhass: not really, no. I'd probably assign it to a local
[09:45:32] Mon_Ouie: And maybe just define a method to do that that takes the three keys and the hash as parameters
[09:46:43] freestyl3r: it would be nice if there was something like a[:b].fetch(:c, hash_so_far)[:d]
[09:49:16] DanielI: has joined #ruby
[09:49:27] freestyl3r: tap seems to be doing what i'm asking
[09:49:30] freestyl3r: a[:b].tap { |h| h[:c] }[:d]
[09:51:02] alphaatom: has joined #ruby
[09:51:10] bruno-: has joined #ruby
[09:51:24] apt-get: has joined #ruby
[09:51:34] shevy: tap dance \o/
[09:51:57] SCHAAP137: has joined #ruby
[09:52:35] allomov: has joined #ruby
[09:53:32] jhass: freestyl3r: nope, tap will always return a[:b], never a[:b][:c]
[09:54:18] startupality: has joined #ruby
[09:54:38] apeiros: >> [:a, :b, :c].inject({ b: { d: 1 } }) { |h,k| h[k] || h }
[09:54:39] ruboto: apeiros # => {:d=>1} (https://eval.in/428795)
[09:54:47] apeiros: >> [:a, :b, :c].inject({ b: { c: { d: 1 } } }) { |h,k| h[k] || h }
[09:54:49] ruboto: apeiros # => {:d=>1} (https://eval.in/428796)
[09:54:50] khebbie: has joined #ruby
[09:54:50] freestyl3r: so this only works if i use it 2nd in chain
[09:55:03] apeiros: though, I question the soundness of a design which allows for this kind of structural changes
[09:56:30] apeiros: above in abstract is `KEYS.inject(HASH) { |h,k| h[k] || h }`
[09:57:02] alexherbo2: has joined #ruby
[09:57:38] mahmoudmahfouz: has joined #ruby
[09:58:24] Salehi: has joined #ruby
[10:02:07] FernandoBasso: has joined #ruby
[10:02:47] leat: has joined #ruby
[10:05:13] shevy: insanity prevails
[10:05:59] yfeldblum: has joined #ruby
[10:06:12] last_staff: has joined #ruby
[10:10:12] ghr: has joined #ruby
[10:10:55] AlexAltea: has joined #ruby
[10:11:35] bruno-: has joined #ruby
[10:12:46] workmad3: has joined #ruby
[10:12:53] platzhirsch: has left #ruby: ()
[10:14:42] juanpablo____: has joined #ruby
[10:15:21] dima_: has joined #ruby
[10:15:31] Salehi: has joined #ruby
[10:18:05] dima_: has joined #ruby
[10:18:46] dima_: has joined #ruby
[10:19:30] DmitryBochkarev: has joined #ruby
[10:19:53] greg: has joined #ruby
[10:20:00] bkxd: has joined #ruby
[10:21:18] voker57: has joined #ruby
[10:21:35] fgo: has joined #ruby
[10:22:11] Rurik: has joined #ruby
[10:22:21] emba: has joined #ruby
[10:23:11] firstdayonthejob: has joined #ruby
[10:25:38] mahmoudmahfouz: has joined #ruby
[10:28:11] Salehi: has joined #ruby
[10:30:33] Scripore: has joined #ruby
[10:32:13] stamina: has joined #ruby
[10:32:40] stuartb: has joined #ruby
[10:32:50] Rollabunna: has joined #ruby
[10:33:00] DmitryBochkarev: has joined #ruby
[10:34:02] segfalt: has joined #ruby
[10:35:02] shevy: how do you add people to a rubygems project?
[10:38:05] Stalkr^: has joined #ruby
[10:41:04] Spami: has joined #ruby
[10:41:16] Azure: has joined #ruby
[10:42:31] emba_: has joined #ruby
[10:45:35] wnd: has joined #ruby
[10:45:42] gix: has joined #ruby
[10:48:04] alphaatom: has joined #ruby
[10:51:18] k3asd`: has joined #ruby
[10:52:10] agni_dev: has joined #ruby
[10:53:01] leafybasil: has joined #ruby
[10:53:05] Spami: has joined #ruby
[10:54:34] joonty: has joined #ruby
[10:55:18] spider-mario: has joined #ruby
[11:00:25] Rollabunna: has joined #ruby
[11:00:51] blackmesa: has joined #ruby
[11:03:13] tkuchiki: has joined #ruby
[11:05:11] jenrzzz: has joined #ruby
[11:09:40] qwertme: has joined #ruby
[11:09:43] CloCkWeRX: has joined #ruby
[11:11:03] ghr: has joined #ruby
[11:11:52] codenapp_: has joined #ruby
[11:11:56] jenrzzz: has joined #ruby
[11:13:09] dorei: has joined #ruby
[11:15:13] northfurr: has joined #ruby
[11:19:17] mahmoudmahfouz: has joined #ruby
[11:20:08] Kallis: has joined #ruby
[11:20:13] blackmes1: has joined #ruby
[11:22:42] fgo: has joined #ruby
[11:22:47] dotix: has joined #ruby
[11:22:47] dotix: has joined #ruby
[11:24:14] codenapper: has joined #ruby
[11:24:39] emba: has joined #ruby
[11:24:59] shinnya: has joined #ruby
[11:28:10] Soda: has joined #ruby
[11:28:30] shevy: ah... gem owner --add
[11:29:15] skade: has joined #ruby
[11:29:19] symm-: has joined #ruby
[11:30:56] freestyl3r: how can you conditionally method call on an object? example: a.merge(b) if condition
[11:31:12] jhass: that should work
[11:33:04] charliesome: has joined #ruby
[11:33:45] freestyl3r: if the condition fails it returns nil. at least in my case where i chain 2 method calls: a.merge(b).merge(c) if condition
[11:33:52] freestyl3r: i only want the last call to be optional
[11:34:00] jhass: but it on two lines
[11:34:43] jimms_: has joined #ruby
[11:34:46] jhass: or a.merge(b).tap {|a| a.merge!(c) if condition } # note the !
[11:35:33] Slavox: has joined #ruby
[11:36:06] mary5030: has joined #ruby
[11:36:17] Rurik: has joined #ruby
[11:37:55] Ox0dea: >> Hash.const_get('Hash')
[11:37:56] ruboto: Ox0dea # => Hash (https://eval.in/428804)
[11:38:14] Oka: has joined #ruby
[11:38:14] freestyl3r: thanks. the tap method worked
[11:38:38] freestyl3r: i'm finding solutions but i'm starting to think the code looks funky
[11:38:58] freestyl3r: with all those merge/tap/fetch conditionals etc
[11:39:21] Ox0dea: That's because you're using LOC as a metric for quality code.
[11:40:57] freestyl3r: you mean that i try to do one-liners instead of properly expanding the code?
[11:42:11] mary5030: has joined #ruby
[11:42:31] Ox0dea: Brevity = concise expression; forcing things onto one line misses the second part.
[11:43:14] freestyl3r: you are not entirely wrong. since the code is going on a rails project i'm trying to keep controller/views short
[11:43:23] freestyl3r: but maybe the code is too "smart" for it's own good
[11:43:33] sdothum: has joined #ruby
[11:43:54] freestyl3r: example line from view:
[11:43:55] freestyl3r: link_to params.slice(:q, :sort).merge(q: c[:key]) { |_, old, new| old.include?(new) ? [old].flatten - [new] : [old, new].flatten },
[11:44:39] eGGsha: has joined #ruby
[11:45:19] Papierkorb: freestyl3r: I think it does something. But I'm not sure what.
[11:45:44] millerti: has joined #ruby
[11:45:47] jhass: that at very least needs an explanation by putting it into a properly named helper method
[11:46:09] freestyl3r: How did i get here :( i take pride in my C code https://github.com/foss-teiwest/irc-bot
[11:46:15] freestyl3r: but coming into ruby/rails
[11:46:22] jhass: what the hell is c? -> bad variable name
[11:46:23] freestyl3r: i'm finding i'm trying to be smart
[11:48:10] Hrorek: has joined #ruby
[11:49:25] northfurr: has joined #ruby
[11:52:34] Rurik: has joined #ruby
[11:55:41] blueOxigen: has joined #ruby
[11:55:46] startupality: has joined #ruby
[11:56:56] khebbie: has joined #ruby
[11:57:53] [k-: has joined #ruby
[11:58:03] joonty: has joined #ruby
[11:58:13] bkxd: has joined #ruby
[11:58:19] khebbie_: has joined #ruby
[12:01:31] workmad3: has joined #ruby
[12:02:03] stardiviner: has joined #ruby
[12:03:46] failshell: has joined #ruby
[12:03:53] juanpablo____: has joined #ruby
[12:04:54] tejasmanohar: has joined #ruby
[12:05:02] lolmaus: has joined #ruby
[12:05:24] fantazo: has joined #ruby
[12:08:18] etqqkoiflwhb: has joined #ruby
[12:08:54] etqqkoiflwhb: has joined #ruby
[12:08:57] tkuchiki: has joined #ruby
[12:10:12] etqqkoiflwhb: has joined #ruby
[12:10:43] ekleog: has joined #ruby
[12:11:50] ghr: has joined #ruby
[12:13:17] [k-: anyone uses brackets from brackets.io?
[12:13:31] etqqkoiflwhb: has joined #ruby
[12:14:12] alphaatom: has joined #ruby
[12:16:15] seefood: has joined #ruby
[12:17:53] seefood: Morning! I have an issue with an erubis template (run from puppet). I get a value into a variable, but I can't seem to compare it as an integer to test a threshold. @varname.int_i doesn't do it. what am I doing wrong?
[12:18:10] seefood: I mean @varname.to_i
[12:19:08] jhass: what's the error you get?
[12:19:11] shevy: if both are integers then it would work
[12:19:15] youngbaks: has joined #ruby
[12:20:35] seefood: no error, that's the problem. it's not syntactically wrong, since I got it to run inside the puppet context.
[12:20:50] ruboto: We can't help you without your code, please post it to https://gist.github.com
[12:21:10] seefood: OK, good idea. 5 minutes.
[12:23:50] fgo: has joined #ruby
[12:24:39] shevy: what happens after these 5 minutes :D
[12:24:57] [k-: drink some water shevy!
[12:25:16] seefood: https://gist.github.com/seefood/a85e2026beeae1f12c39 How about that? :-)
[12:25:23] tkuchiki: has joined #ruby
[12:25:40] Spami: has joined #ruby
[12:26:00] solocshaw: has joined #ruby
[12:28:27] jhass: anyway, disk_size != disk_size
[12:28:36] jhass: er, != $disk_size
[12:28:45] jhass: local, @instance, @@class, $global, Constant
[12:28:59] Mon_Ouie: Also do not use eval
[12:29:13] jhass: yeah, was just going to that, @blockdevice wants to be a hash
[12:29:32] jhass: or @blockdevice_size rather
[12:29:43] seefood: I tried with @, $, nothing worked right.
[12:29:50] jhass: @blockdevises should be an array before you pass it to the template
[12:30:08] jhass: yes, disk_size != @disk_size != $disk_size
[12:30:21] jhass: these are three entirely different variables
[12:30:38] jhass: you got it right when you print, no idea why you think you need to change it for the condition
[12:31:02] wldcordeiro: has joined #ruby
[12:31:45] seefood: I guess. I've tried assigning with local vars methods, no good.
[12:31:56] jhass: what's the code where you set @blockdevices and @blockdevice_xxx_size ?
[12:32:13] seefood: @blockdevice may be better as a hash, but facter gives it to me as a string...
[12:32:41] seefood: [root@setup-42-1 ~]# facter|grep block blockdevice_sda_model => MB2000EAZNL blockdevice_sda_size => 2000398934016 blockdevice_sda_vendor => ATA blockdevice_sdb_model => MB2000EAZNL blockdevice_sdb_size => 2000398934016 blockdevice_sdb_vendor => ATA blockdevices => sda,sdb
[12:32:51] seefood: yuck. hang on...
[12:33:12] seefood: [root@setup-42-1 ~]# facter|grep sdb
[12:33:17] seefood: blockdevice_sdb_model => MB2000EAZNL
[12:33:21] seefood: blockdevice_sdb_size => 2000398934016
[12:33:25] jhass: I need a really large bat for whenever I meet somebody who designed facter
[12:33:26] seefood: blockdevice_sdb_vendor => ATA
[12:33:30] seefood: blockdevices => sda,sdb
[12:33:34] jhass: !kick seefood Please use https://gist.github.com
[12:33:47] ruboto: ruboto kicked seefood: use https://gist.github.com
[12:33:47] ruboto: -o ruboto
[12:33:52] dfinninger: has joined #ruby
[12:34:07] apt-get: has joined #ruby
[12:36:32] f4cl3y: has joined #ruby
[12:39:51] blackmes1: has joined #ruby
[12:46:35] emba: has joined #ruby
[12:47:55] solocshaw: has joined #ruby
[12:48:43] stuartb: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[12:49:33] dionysus69: has joined #ruby
[12:49:44] leat: has joined #ruby
[12:50:25] jher: has joined #ruby
[12:51:19] sepp2k: has joined #ruby
[12:51:21] diegoaguilar: has joined #ruby
[12:52:58] qwertme: has joined #ruby
[12:54:38] arup_r: has joined #ruby
[12:55:55] solocshaw: has joined #ruby
[12:58:19] jgt: has joined #ruby
[13:03:56] ndrei: has joined #ruby
[13:05:03] jdawgaz: has joined #ruby
[13:07:30] roxtrongo: has joined #ruby
[13:11:14] jimms: has joined #ruby
[13:12:30] ghr: has joined #ruby
[13:12:42] millerti: has joined #ruby
[13:13:24] diegoaguilar: has joined #ruby
[13:13:25] Scripore: has joined #ruby
[13:15:59] nanoz: has joined #ruby
[13:17:12] futilegames: has joined #ruby
[13:19:50] jimg: has joined #ruby
[13:21:02] riotjones: has joined #ruby
[13:22:57] ruby-lang457: has joined #ruby
[13:24:37] Ropeney: has joined #ruby
[13:24:56] fgo: has joined #ruby
[13:28:10] TomyLobo: has joined #ruby
[13:28:15] mahtennek: has joined #ruby
[13:30:22] acke: has joined #ruby
[13:31:17] blackmes1: has joined #ruby
[13:32:26] jenrzzz: has joined #ruby
[13:34:02] mary5030: has joined #ruby
[13:38:26] khebbie: has joined #ruby
[13:40:27] bigredboots: has joined #ruby
[13:44:12] startupality: has joined #ruby
[13:45:25] solocshaw: has joined #ruby
[13:45:47] tejasmanohar: has joined #ruby
[13:47:13] gregf: has joined #ruby
[13:49:13] juanpablo____: has joined #ruby
[13:49:14] emba_: has joined #ruby
[13:50:12] workmad3: has joined #ruby
[13:50:39] tejasmanohar: has joined #ruby
[13:51:59] ordepdev: has joined #ruby
[13:53:55] ordepdev: has joined #ruby
[13:57:43] mary5030: has joined #ruby
[13:59:43] UtkarshRay: has joined #ruby
[14:00:41] bruno-: has joined #ruby
[14:02:48] al2o3-cr: has joined #ruby
[14:02:51] rbennacer: has joined #ruby
[14:03:44] codecop: has joined #ruby
[14:03:47] codecop_: has joined #ruby
[14:04:24] failshell: has joined #ruby
[14:05:04] phutchins: has joined #ruby
[14:07:32] fgo: has joined #ruby
[14:08:56] dgutierrez1287: has joined #ruby
[14:11:53] mahmoudmahfouz: has joined #ruby
[14:12:04] RenardP: has joined #ruby
[14:13:28] ghr: has joined #ruby
[14:15:45] firstdayonthejob: has joined #ruby
[14:16:05] xblade: has joined #ruby
[14:17:51] h3ra: has joined #ruby
[14:20:01] emba: has joined #ruby
[14:21:57] Azure: has joined #ruby
[14:24:54] jher: has joined #ruby
[14:25:38] fgo_: has joined #ruby
[14:26:34] acke: has joined #ruby
[14:26:37] roxtrongo: has joined #ruby
[14:31:34] acke_: has joined #ruby
[14:31:48] ht__: has joined #ruby
[14:32:58] dasher00: has joined #ruby
[14:36:51] allcentury: has joined #ruby
[14:37:38] theery: has joined #ruby
[14:40:03] greg: has joined #ruby
[14:40:50] Xiti: has joined #ruby
[14:42:09] northfurr: has joined #ruby
[14:44:26] shevy: ah new TIOBE \o/ http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
[14:48:09] tejasmanohar: has joined #ruby
[14:48:58] isxek: has joined #ruby
[14:49:39] Oog: has joined #ruby
[14:52:23] NeverDie: has joined #ruby
[14:53:24] fgo_: has joined #ruby
[14:53:38] krz: has joined #ruby
[14:54:26] Queeniebee: has joined #ruby
[14:57:26] saddad: has joined #ruby
[14:57:55] mleung: has joined #ruby
[14:58:02] RobertBirnie: has joined #ruby
[14:59:13] futilegames: has joined #ruby
[15:03:58] nofxx: has joined #ruby
[15:04:32] chipotle: has joined #ruby
[15:05:00] khebbie: has joined #ruby
[15:06:45] Ox0dea: What explains the spike in Assembly's ranking?
[15:07:24] tonios57: has joined #ruby
[15:08:52] patrick_star: has joined #ruby
[15:10:07] zenguy_pc: has joined #ruby
[15:11:40] druznek: has joined #ruby
[15:14:42] MrFjords: has joined #ruby
[15:14:59] diegoaguilar: has joined #ruby
[15:15:15] leat: has joined #ruby
[15:16:04] diegoaguilar: has joined #ruby
[15:16:23] [k-: Ox0dea: what explains your disappearance?
[15:17:15] cornerma1: has joined #ruby
[15:18:08] dmolina: has joined #ruby
[15:18:56] Scripore: has joined #ruby
[15:22:56] havenwood: has joined #ruby
[15:23:30] Ox0dea: [k-: I used to do drugs.
[15:24:38] tjohnson: has joined #ruby
[15:26:10] [k-: at least you changed now \o/
[15:26:30] [k-: hurray for changing for the better \o/
[15:26:31] [k-: ???(?????????)??? ??? ???(?????????)??? ??? ???(?????????)???
[15:26:54] [k-: havenwood: now you must cut down on caffeine
[15:27:56] Ox0dea: ACTION decides to let [k- have his bliss.
[15:28:32] xblade: has joined #ruby
[15:28:41] ghr: has joined #ruby
[15:30:07] garethrees: has joined #ruby
[15:30:35] lxsameer: has joined #ruby
[15:30:35] lxsameer: has joined #ruby
[15:31:11] arup_r: has joined #ruby
[15:32:37] jenrzzz: has joined #ruby
[15:33:06] emba: has joined #ruby
[15:34:26] [k-: come back to #ot!
[15:35:26] Ox0dea: What's the category?
[15:36:10] solars: has joined #ruby
[15:36:21] [k-: hangman!
[15:36:34] Ox0dea: The Hangman category is "hangman"?!
[15:36:49] riotjones: has joined #ruby
[15:37:11] emba: has joined #ruby
[15:37:51] [k-: ACTION splashes Ox0dea with water
[15:37:58] juanpablo____: has joined #ruby
[15:39:04] workmad3: has joined #ruby
[15:39:25] dionysus69: has joined #ruby
[15:39:45] jenrzzz: has joined #ruby
[15:40:22] emba: has joined #ruby
[15:40:34] grotewold: has joined #ruby
[15:40:38] neohunter: has joined #ruby
[15:41:29] blue_deref: has joined #ruby
[15:41:31] [k-: comebaaaaack
[15:42:48] theery: has joined #ruby
[15:44:20] tmtwd: has joined #ruby
[15:47:12] platzhirsch: has joined #ruby
[15:47:42] bruno-: has joined #ruby
[15:53:51] Papabear: has joined #ruby
[15:54:40] shevy: sundays are not fundays
[15:56:32] houhoulis: has joined #ruby
[15:56:43] [k-: ACTION strips fun off shevy's day
[15:56:59] Ox0dea: >> Time.new('Funday').sunday?
[15:57:00] [k-: shevy: now you are technically correct today
[15:57:00] ruboto: Ox0dea # => false (https://eval.in/428902)
[15:57:24] khebbie: has joined #ruby
[15:57:34] grotewold: has joined #ruby
[15:57:40] platzhirsch: [k- you look like the rest of your name got lost
[15:57:50] solocshaw: has joined #ruby
[15:58:17] solocshaw: has joined #ruby
[15:58:43] roxtrongo: has joined #ruby
[15:59:40] bronson: has joined #ruby
[15:59:58] [k-: this is in fact my full nick
[16:02:30] MrFjords: has joined #ruby
[16:05:09] failshell: has joined #ruby
[16:06:47] jenrzzz: has joined #ruby
[16:07:14] pandaant: has joined #ruby
[16:08:37] kirun: has joined #ruby
[16:08:59] jdawgaz: has joined #ruby
[16:11:30] rht: has joined #ruby
[16:14:51] shevy: what does that nick mean
[16:15:51] [k-: yea, platzhirsch, what does your nick mean
[16:16:44] jhass: [k-: platzhirsch is a real german word, use your dictionary
[16:16:45] platzhirsch: The platzhirsch is the alpha stag in a group of deers, if that makes sense
[16:17:07] rbennacer: has joined #ruby
[16:17:10] psye: has joined #ruby
[16:17:25] [k-: im not german, how would i know if that is german?!
[16:17:35] [k-: Ox0dea: tell me if i would now
[16:17:46] platzhirsch: Yes, use your dictionary *slaps book into [k-'s face*
[16:18:01] Ox0dea: [k-: "platz" sounds pretty German, to be fair.
[16:18:03] [k-: that doesnt even seem like a legit word!
[16:18:04] platzhirsch: No smalltalk!
[16:18:37] [k-: DeBot !hangman german in ot!
[16:19:44] platzhirsch: Well anyway, now you know :)
[16:20:24] [k-: until it gets collected by my aggressive memory collector
[16:20:39] Ox0dea: [k-: You own a Pensieve?
[16:20:47] tkuchiki: has joined #ruby
[16:20:47] MrFjords: has joined #ruby
[16:20:50] ndrei: has joined #ruby
[16:21:50] MrFjords: has joined #ruby
[16:22:30] youngbaks: has joined #ruby
[16:23:16] blackmes1: has joined #ruby
[16:25:10] shevy: [k- platzhirsch is kinda like the dominant animal in a group (of deer); it's the big boss that kicks out his rivals with ease, the one who commands the others
[16:25:37] platzhirsch: last time you explained that nick you also said something along the lines of spraying urine in the rival's faces
[16:26:01] shevy: well that is optional
[16:26:08] [k-: https://en.wikipedia.org/wiki/Underscore#Programming_conventions
[16:26:17] [k-: In the interactive Python interpreter, the special variable _ holds the result of the previous evaluation.
[16:26:21] [k-: they forgot irb :(
[16:26:31] shevy: _ is my favourite variable
[16:26:50] platzhirsch: I feel sorry for Python
[16:27:43] shevy: python is so weird
[16:27:46] apt-get: has joined #ruby
[16:27:47] shevy: what will you do when ruby dies
[16:27:49] shevy: USE PYTHON?!
[16:28:36] shevy: http://perlnews.org/2015/04/perl-5-22-a-preview/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+PerlNews+%28Perl+News%29
[16:28:40] platzhirsch: I'd rather jump off a cliff burning holding a picture of Guido van Rossum
[16:28:45] shevy: CGI.pm disappear
[16:28:53] [k-: use perl?
[16:29:20] shevy: there are not so many options
[16:29:39] platzhirsch: Well I guess it's not really an alternative.. but I think I would use Go and become a serious man and have no fun anymore
[16:29:59] shevy: isn't Go a toy language?
[16:31:04] [k-: your face is a toy language!
[16:31:08] michaeldeol: has joined #ruby
[16:31:58] platzhirsch: It's a very potent violin which can shoot elephants down
[16:32:04] platzhirsch: concurrently!
[16:32:19] Queeniebee: has joined #ruby
[16:33:09] [k-: my face is a very potent violin that can shoot elephants down concurrently
[16:33:41] mahmoudmahfouz: has joined #ruby
[16:33:57] michaeldeol: has joined #ruby
[16:34:16] northfurr: has joined #ruby
[16:34:26] Ox0dea: has joined #ruby
[16:35:35] kies: has joined #ruby
[16:36:06] shevy: someone here has a facial obsession
[16:37:11] platzhirsch: I am stuck on Ruby 1.9.3 and Resque,..
[16:37:18] apt-get: has joined #ruby
[16:37:32] blackmes1: has joined #ruby
[16:37:47] shevy: update to 2.2.3
[16:37:54] dgutierrez1287: has joined #ruby
[16:38:30] platzhirsch: I think there is no reason not to, but I can't justify it at the moment
[16:38:43] juanpablo____: has joined #ruby
[16:38:51] platzhirsch: please help me justifying it
[16:39:06] aaeron: has joined #ruby
[16:39:56] Papierkorb: moar speed. it's faster, so less machines needed in production
[16:40:04] dorei: i'm stuck on ruby 2.1.1 :D
[16:40:49] bigredboots: has joined #ruby
[16:41:12] ponga: has joined #ruby
[16:41:42] TvL: has joined #ruby
[16:42:51] shevy: platzhirsch hmm
[16:43:19] shevy: let me try to remember
[16:43:29] [k-: end of life
[16:43:57] platzhirsch: Papierkorb: citation needed *scream*
[16:43:58] stamina: has joined #ruby
[16:44:05] grotewold: has joined #ruby
[16:44:55] shevy: I have had these problems jumping from 1.8.x to higher versions:
[16:45:16] shevy: (1) Encoding and (2) psych
[16:46:11] shevy: psych I can still avoid thanks to the syck gem
[16:46:16] roxtrongo: has joined #ruby
[16:46:29] Cust0sLim3n: has joined #ruby
[16:46:46] shevy: Encoding is annoying but one can work around it via .force_encoding
[16:46:50] David27: has joined #ruby
[16:49:28] yardenbar: has joined #ruby
[16:49:30] shevy: with these problems gone, there were no more reasons not to use the latest ruby version
[16:49:36] shevy: platzhirsch does that work for you!
[16:49:44] grotewold: has joined #ruby
[16:51:12] platzhirsch: oh I guess reviewing everything and being afraid the upgrade breaks production is a reason against it
[16:52:19] youngbaks: has joined #ruby
[16:52:28] [k-: https://www.ruby-lang.org/en/news/2015/02/23/support-for-ruby-1-9-3-has-ended/
[16:53:33] shevy: yeah you have to invest time to make things work
[16:54:10] shevy: I am scared of having to do massive changes once strings be frozen by default
[16:54:42] naftilos76: has joined #ruby
[16:55:38] [k-: arent you doing massive changes now
[16:55:57] platzhirsch: yeah, we are just too few people, small office 6 people, 5 year old production system, high user base and we're just working on the next product to be pushed out, so I will probably not go with that argument very far
[16:57:22] [k-: luckily you arent using scala, where everything breaks after every release
[16:57:34] platzhirsch: We're just revamping the Java backend, that's why I've taken quick course of action and updated it from Java 7, Ant, Eclipse to Java 8, Gradle, Intellj :D
[16:58:02] platzhirsch: oh yeah, we all had high hopes of Scala
[16:58:03] solocshaw: has joined #ruby
[16:58:15] platzhirsch: Clojure seems to have made it though
[16:58:17] [k-: clojurereeee
[16:58:27] [k-: try Frege
[16:58:38] platzhirsch: but yeah, with Java 8, I don't feel very desperate for that stuff
[16:58:46] perturbation: has joined #ruby
[16:59:03] jenrzzz: has joined #ruby
[16:59:31] [k-: shevy: ^ :(
[17:00:49] leafybasil: has joined #ruby
[17:02:57] Hrorek: has joined #ruby
[17:03:14] arup_r: any body will teach me here the cofeescript ?
[17:04:15] grotewold: has joined #ruby
[17:04:37] s00pcan: has joined #ruby
[17:04:51] eosinx: has joined #ruby
[17:04:55] [k-: go away coffeescript
[17:05:01] Papierkorb: arup_r: ECHAN, also http://coffeescript.org/ and js2.coffee/
[17:05:19] jdawgaz: has joined #ruby
[17:05:59] Rurik: has joined #ruby
[17:06:27] arup_r: [k-: coffeescript is a sister of Ruby .. Don't say like that :/
[17:06:59] platzhirsch: CoffeeScript is a joke
[17:07:11] Papierkorb: I'm somehow starting to think that Coffeescript is hated by angularjs users
[17:07:30] platzhirsch: It's the MongoDB of Web Development
[17:07:44] grotewold: has joined #ruby
[17:08:19] arup_r: Then should I close my book and learn JS ?
[17:08:35] arup_r: my coffescript book *
[17:08:58] Papierkorb: arup_r: for what? for use with rails? I think it's .. fine as language. I hate JS though. Garbage language.
[17:09:08] towski_: has joined #ruby
[17:09:21] arup_r: haha.. Papierkorb Yes learning for Rails
[17:09:37] Papierkorb: arup_r: it's convention over there, so if you don't have a reason for not using it, use it.
[17:09:44] arup_r: got assigned a project where they wrote only coffescript..
[17:09:49] AlexAltea: has joined #ruby
[17:09:58] fgo_: has joined #ruby
[17:09:58] arup_r: and I am lost between -> and => :/
[17:10:01] Papierkorb: Then use CoffeeScript, by all means, introducing another language to the stack won't do good
[17:10:11] symm-: has joined #ruby
[17:10:14] Papierkorb: arup_r: then read up on it. => is also in the newest JS standard.
[17:10:46] arup_r: reading.. from Google
[17:10:47] _blizzy_: has joined #ruby
[17:11:01] Rurik: my favorite JS gem:
[17:11:04] Rurik: >[1,5,20,10].sort()
[17:11:08] David27: has joined #ruby
[17:11:19] Rurik: [1, 10, 20, 5]
[17:11:27] arup_r: I thought it is Hash :( .. As people say it is a kinda Ruby.. so I was with rumor
[17:11:52] [k-: it's a little ruby
[17:11:56] Papierkorb: arup_r: "kinda ruby" is wrong, it's more like JS with a ruby-esque syntax
[17:12:22] Papierkorb: Rurik: oh god why
[17:14:08] [k-: because js likes doing string comparisons
[17:14:23] Papierkorb: [k-: []+{} <- sometimes at least
[17:14:23] [k-: >> %w[1 5 20 10].sort
[17:14:24] ruboto: [k- # => ["1", "10", "20", "5"] (https://eval.in/428935)
[17:14:55] Rurik: Papierkorb, Array.sort() sorts elements according to unicode code points
[17:15:10] Rurik: even when they are numbers
[17:15:34] Papierkorb: Rurik: yeah. why on earth is anyone, really, saying that JS is alright?
[17:16:37] bruno-: has joined #ruby
[17:17:06] havenwood: has joined #ruby
[17:18:16] grotewold: has joined #ruby
[17:18:56] ndrei: has joined #ruby
[17:19:48] greg: has joined #ruby
[17:21:07] failshell: has joined #ruby
[17:21:15] swgillespie: has joined #ruby
[17:21:17] fernandezpablo_: has joined #ruby
[17:21:55] grotewold: has joined #ruby
[17:25:48] platzhirsch: I don't think CoffeeScript is used anymore in Rails
[17:26:17] platzhirsch: oh apparently, it does
[17:26:56] bruno-: has joined #ruby
[17:27:43] workmad3: has joined #ruby
[17:28:51] rbennacer: has joined #ruby
[17:29:20] Dreamer3: has joined #ruby
[17:29:47] dmolina: has joined #ruby
[17:29:49] grotewold: has joined #ruby
[17:30:41] AlexAltea: has joined #ruby
[17:33:01] ChanServ: -b fullmetalkunt!*@*
[17:33:16] ordepdev: has joined #ruby
[17:34:57] clarkenciel: has joined #ruby
[17:35:14] ndrei: has joined #ruby
[17:36:32] phutchins: has joined #ruby
[17:36:57] Rakunh0: has joined #ruby
[17:38:00] nofxx: has joined #ruby
[17:38:00] nofxx: has joined #ruby
[17:38:32] jdawgaz: has joined #ruby
[17:41:47] baweaver: has joined #ruby
[17:41:54] _blizzy_: has joined #ruby
[17:42:01] qwertme: has joined #ruby
[17:42:26] based_: has joined #ruby
[17:42:41] moahny: has joined #ruby
[17:43:04] ndrei: has joined #ruby
[17:47:54] tkuchiki: has joined #ruby
[17:48:21] apt-get: has joined #ruby
[17:50:15] s00pcan: has joined #ruby
[17:51:36] fantazo: has joined #ruby
[17:58:55] xblade: has joined #ruby
[17:59:35] Rurik: has joined #ruby
[18:01:50] dmolina: has joined #ruby
[18:02:27] toretore: has joined #ruby
[18:02:52] alphaatom: has joined #ruby
[18:03:01] phutchins: has joined #ruby
[18:03:33] dasher00: has joined #ruby
[18:03:41] nofxx: platzhirsch, sure it is, otherwise you'll have to write....grrr... javascript
[18:05:14] futilegames: has joined #ruby
[18:05:27] acosonic_: has joined #ruby
[18:05:44] acosonic_: hi, how can I findout which wrapper if installed via rvm is used?
[18:08:51] spider-mario: has joined #ruby
[18:09:23] dasher00: has joined #ruby
[18:09:47] roshanavand: has joined #ruby
[18:10:14] MyMind: has joined #ruby
[18:10:49] jhass: acosonic_: in what context?
[18:10:54] dasher00: has joined #ruby
[18:11:02] acosonic_: I???ve foundout...
[18:11:05] Exuma: has joined #ruby
[18:11:16] fgo_: has joined #ruby
[18:11:17] acosonic_: ~/.rvm/wrappers/default/ruby ...
[18:11:32] acosonic_: but is there some tool which can tell me that?
[18:11:47] jhass: I'm still not sure what you mean with "is used"
[18:11:59] jhass: when doing what?
[18:12:28] Legitkrillin: has joined #ruby
[18:14:48] Soda: has joined #ruby
[18:15:00] grotewold: has joined #ruby
[18:15:27] FernandoBasso: has joined #ruby
[18:15:39] dasher00: has joined #ruby
[18:16:34] ShalokShalom: has joined #ruby
[18:16:43] s00pcan: has joined #ruby
[18:17:04] havenwood: acosonic_: gem wrappers
[18:18:13] jenrzzz: has joined #ruby
[18:18:57] acosonic_: havenwood: thnx it works
[18:19:04] PaulCapestany: has joined #ruby
[18:19:14] fedexo: has joined #ruby
[18:20:31] dfinninger: has joined #ruby
[18:20:55] yqt: has joined #ruby
[18:21:24] dasher00: has joined #ruby
[18:21:41] Rurik: has joined #ruby
[18:21:56] cscheib: I'm blanking... what's the name of the method that you can use to return every possible slice of n characters from a string? i.e.in a scenario where n = 3, it returns index 0-2, then index 1-3, index 2-4, etc...
[18:22:29] Scripore: has joined #ruby
[18:22:29] jhass: .chars.each_cons(3)
[18:22:36] s00pcan: has joined #ruby
[18:22:44] Rakunh0: has joined #ruby
[18:22:45] baweaver: permutation on chars
[18:22:57] baweaver: each_cons, yeah
[18:23:02] cscheib: awesome, that's it, thanks!
[18:23:05] baweaver: ACTION needs to grab coffee
[18:23:36] adaedra: ACTION drowns baweaver in coffee
[18:24:37] dasher00: has joined #ruby
[18:25:01] ndrei: has joined #ruby
[18:25:15] cscheib: I knew it was probably in enumerable, but it wasn't popping out at me on the doc
[18:25:49] kith: has joined #ruby
[18:27:29] juanpablo____: has joined #ruby
[18:29:27] nofxx: cscheib, enumerable is by far the obj with more methods in ruby. (am I wrong?) there's always a helper there for that crazy job
[18:29:44] nofxx: ok.. array
[18:30:29] dseitz: has joined #ruby
[18:30:38] cscheib: yea, enumerable's come in quite handy... just so many methods in there (and similar methods) that it can sometimes be hard to find the right one, if you haven't memorized em yet
[18:30:47] roxtrongo: has joined #ruby
[18:31:13] ordepdev: has joined #ruby
[18:31:32] fantazo: has joined #ruby
[18:31:54] platzhirsch: has left #ruby: ()
[18:33:42] havenwood: >> Gem::Specification.instance_methods(false).size
[18:33:43] ruboto: havenwood # => 150 (https://eval.in/428953)
[18:34:01] havenwood: >> Enumerable.instance_methods(false).size
[18:34:02] ruboto: havenwood # => 51 (https://eval.in/428954)
[18:34:16] nofxx: havenwood, ahh, but Gem is not something you're using...like in runtime
[18:34:55] shinnya: has joined #ruby
[18:35:03] havenwood: >> String.instance_methods(false).size
[18:35:04] ruboto: havenwood # => 116 (https://eval.in/428955)
[18:35:09] havenwood: nofxx: My retort ^
[18:35:24] nofxx: havenwood, yup, now we got a winner
[18:35:33] havenwood: >> Pathname.instance_methods(false).size
[18:35:34] ruboto: havenwood # => uninitialized constant Pathname (NameError) ...check link for more (https://eval.in/428956)
[18:35:45] havenwood: But yeah, stdlib.
[18:35:49] dasher00: has joined #ruby
[18:35:59] stamina: has joined #ruby
[18:36:02] jhass: >> c = ObjectSpace.each_object(Class).max_by { c.instance_methods(false).size }; [c, c.instance_methods(false).size]
[18:36:03] nofxx: >> Array.instance_methods(false).size
[18:36:04] ruboto: jhass # => undefined method `instance_methods' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/428958)
[18:36:04] ruboto: nofxx # => 91 (https://eval.in/428958)
[18:36:13] nofxx: >> Hash.instance_methods(false).size
[18:36:14] ruboto: nofxx # => 55 (https://eval.in/428959)
[18:36:16] havenwood: >> ObjectSpace.each_object(Module).max_by(6) { |mod| mod.instance_methods(false).size }
[18:36:16] ruboto: havenwood # => [Gem::Specification, String, Array, IO, Hash, ARGF.class] (https://eval.in/428960)
[18:36:33] symm-: has joined #ruby
[18:36:34] nofxx: havenwood, easier. =D
[18:37:28] ruurd: has joined #ruby
[18:37:58] nofxx: >> String.instance_methods(false) - Array.instance_methods(false)
[18:37:59] ruboto: nofxx # => [:===, :casecmp, :%, :bytesize, :=~, :match, :succ, :succ!, :next, :next!, :upto, :chr, :getbyte, :s ...check link for more (https://eval.in/428961)
[18:38:04] David27: has joined #ruby
[18:38:17] freestyl3r: has joined #ruby
[18:38:29] acke: has joined #ruby
[18:38:42] arup_r: has joined #ruby
[18:38:48] kobain: has joined #ruby
[18:39:46] esauOp: has joined #ruby
[18:41:57] ndrei: has joined #ruby
[18:41:59] freestyl3r: has left #ruby: ()
[18:43:59] khebbie: has joined #ruby
[18:44:24] choke: has joined #ruby
[18:47:24] blackmes1: has joined #ruby
[18:48:06] based_: has joined #ruby
[18:49:23] swgillespie: has joined #ruby
[18:49:59] segy: has joined #ruby
[18:50:09] Exuma: has joined #ruby
[18:51:24] Silox|: has joined #ruby
[18:52:02] swgillespie: has joined #ruby
[18:54:55] swgillespie: has joined #ruby
[18:57:02] xwct: has joined #ruby
[18:58:54] welsch4: has joined #ruby
[19:00:10] dgutierrez1287: has joined #ruby
[19:01:19] chills42: has joined #ruby
[19:03:14] iamninja: has joined #ruby
[19:04:40] marr: has joined #ruby
[19:06:25] IrishGringo: has joined #ruby
[19:06:52] based_: has joined #ruby
[19:08:26] Scripore: has joined #ruby
[19:09:00] xblade: has joined #ruby
[19:10:47] jimbeaudoin: has joined #ruby
[19:10:53] s00pcan: has joined #ruby
[19:11:29] yfeldblum: has joined #ruby
[19:12:18] Cust0sLim3n: has joined #ruby
[19:12:35] fgo_: has joined #ruby
[19:13:10] bigredboots: has joined #ruby
[19:13:40] dgutierrez1287: has joined #ruby
[19:14:31] dasher00: has joined #ruby
[19:14:52] Jardayn: has joined #ruby
[19:15:46] blindgaenger: has joined #ruby
[19:18:57] xblade_: has joined #ruby
[19:21:43] ruurd: has joined #ruby
[19:21:44] lopin: has joined #ruby
[19:21:45] failshell: has joined #ruby
[19:23:15] xwct: has joined #ruby
[19:23:53] ringarin: has joined #ruby
[19:24:48] ringaring: has joined #ruby
[19:27:14] acke: has joined #ruby
[19:27:38] Rurik: has joined #ruby
[19:28:13] juanpablo____: has joined #ruby
[19:29:21] rickmasta: has joined #ruby
[19:30:34] k3asd`: has joined #ruby
[19:30:54] ringarring_: has joined #ruby
[19:31:31] ringarring_: has joined #ruby
[19:33:31] dopie: has joined #ruby
[19:34:08] northfurr: has joined #ruby
[19:34:30] clarkenciel: has joined #ruby
[19:34:46] bruno-: has joined #ruby
[19:35:21] kies: has joined #ruby
[19:40:31] acke: has joined #ruby
[19:40:52] jenrzzz: has joined #ruby
[19:41:08] mprelude: has joined #ruby
[19:42:01] ruurd: has joined #ruby
[19:42:43] Mendenhall: has joined #ruby
[19:43:22] xblade: has joined #ruby
[19:44:36] alphaatom: has joined #ruby
[19:46:12] patrick_star: has joined #ruby
[19:47:23] khebbie: has joined #ruby
[19:48:57] yardenbar: has joined #ruby
[19:49:26] amclain: has joined #ruby
[19:49:53] jenrzzz: has joined #ruby
[19:50:23] ShalokShalom: has joined #ruby
[19:51:43] chipotle: has joined #ruby
[19:53:34] hmsimha_: has joined #ruby
[19:56:23] stuartb: has joined #ruby
[19:56:45] Oog: has joined #ruby
[19:57:02] startupality: has joined #ruby
[19:57:22] alphaatom: has joined #ruby
[19:57:50] ruurd: has joined #ruby
[19:58:47] stuartb: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[19:58:54] MyMind: has joined #ruby
[19:58:56] alphaatom: has joined #ruby
[20:01:46] doublemalt__: has joined #ruby
[20:02:31] dionysus69: has joined #ruby
[20:02:45] Kallis: has joined #ruby
[20:03:12] Rakunh0: has joined #ruby
[20:03:44] majjoha: has joined #ruby
[20:04:32] eightfold: has joined #ruby
[20:05:14] platzhirsch: has joined #ruby
[20:05:29] platzhirsch: So I went for a run and have thought about what I hate on Ruby
[20:06:38] platzhirsch: and I came to the conclusion, nothing
[20:06:56] jhass: how about that it makes you hate all other languages?
[20:07:33] xblade: has joined #ruby
[20:07:53] bigredboots: has joined #ruby
[20:10:26] Rurik: has joined #ruby
[20:11:50] platzhirsch: well, I do need a statically-typed language as well to balance my inner self
[20:11:59] jhass: checked crystal yet?
[20:12:10] platzhirsch: I am coding drug-free, thanks
[20:12:43] platzhirsch: a language with the same syntax, so I don't need to learn anything
[20:12:50] jhass: well, similar
[20:12:56] jhass: or even familiar
[20:12:58] everlost: too much assembler
[20:13:12] everlost: pls less assembler :s
[20:13:19] everlost: and less crypto
[20:13:26] jhass: everlost: uh, context?
[20:13:40] fgo_: has joined #ruby
[20:13:46] everlost: either reverse or crypto
[20:13:47] platzhirsch: I must admit, Go has a very confusing syntax, sometimes it feels like they just switched order of words and declaration, just to be different
[20:13:50] everlost: or reverse crypto
[20:13:56] platzhirsch: such hipsters
[20:14:34] everlost: also more points for prog
[20:14:35] jhass: we had a nice comparison how 50loc Go was like 10loc in Crystal :P
[20:14:54] everlost: seriously 100 points for people raping stego with 1 command line
[20:15:02] platzhirsch: haha I bet it is
[20:15:05] everlost: and 100 points for 200 lines of code
[20:15:13] everlost: reward devs!
[20:15:19] everlost: devs are the greatest!
[20:15:32] jhass: everlost: watch your language
[20:15:47] platzhirsch: But you know that's the thing with statically typed things. It needs to feel mighty, and it only feelds mighty if I wield code with a magnitude of 10 higher than dynamically typed languages to feel the strength. AFter all, you eat with your eyes first!
[20:15:59] everlost: jhass: watch your problems
[20:16:24] jhass: !kick everlost sober up
[20:16:25] ruboto: ruboto kicked everlost: up
[20:16:25] ruboto: -o ruboto
[20:16:54] everlost: has joined #ruby
[20:17:05] everlost: sorry about that shit talk
[20:17:16] everlost: good evening kind sirs
[20:17:19] everlost: has left #ruby: ()
[20:18:13] platzhirsch: Anyway, I am looking forward to the day Ruby removes the GIL, I think it's very ambitious that they plan to do that
[20:18:55] bigredboots: has joined #ruby
[20:19:01] esauOp: has joined #ruby
[20:19:59] jhass: I'm looking forward to the day somebody turns https://github.com/manastech/crystal_ruby into something real world usable and then I no longer care about the GIL since I'll just port everything that's too slow to crystal :P
[20:21:05] apt-get: has joined #ruby
[20:21:54] dseitz: What are the merits of Crystal beyond "It looks and acts like Ruby"?
[20:22:40] adam12: It's _familiar_ as well, especially if you are a Ruby dev. I feel right at home with it.
[20:23:14] adam12: I guess that's similar to "acts like Ruby" - but familiarity goes a long way, imho.
[20:23:31] Ketchy: has joined #ruby
[20:23:33] michaeldeol: has joined #ruby
[20:23:48] jhass: a Go like concurrency model
[20:24:07] aaeron: has joined #ruby
[20:25:49] anthony__: has joined #ruby
[20:27:45] riotjones: has joined #ruby
[20:31:17] max_Q: has joined #ruby
[20:32:47] fostertheweb: has joined #ruby
[20:33:33] ndrei: has joined #ruby
[20:34:48] rickmasta: has joined #ruby
[20:34:48] michael_mbp: has joined #ruby
[20:35:26] bruno-: has joined #ruby
[20:36:34] govt: has joined #ruby
[20:36:34] govt: has joined #ruby
[20:36:57] acke: has joined #ruby
[20:37:37] platzhirsch: But what about JRuby, it's fast, it's strong, it's the JVM! *prown*
[20:38:59] jhass: it's fast. If you can wait 5 minutes for it to boot :P
[20:39:16] govt: as opposed to MRI rails crashing dozens of times per day
[20:39:16] dseitz: JRuby+Truffle will be fast, at some costs.
[20:39:48] yorickpeterse: Ah yeah, lets rewrite our Ruby apps in some other language
[20:39:51] yorickpeterse: surely that will only bring benefits
[20:40:01] govt: Jruby is just ruby
[20:40:01] chrisseaton: dseitz: what do you think those costs will be? (there are costs, just wondering what people think they are)
[20:40:07] platzhirsch: don't be so sarcastic, that makes me cry
[20:40:29] ordepdev: has joined #ruby
[20:41:24] govt: yorick does a lot of shit talking for someone whose most significant contribution to the ecosystem is an xml parser
[20:41:29] govt: just something ive noticed
[20:42:23] platzhirsch: I am just jelly of his GitHub repo stars
[20:42:41] yorickpeterse: govt: if we're going down that route, what exactly has been your contribution?
[20:43:14] govt: not being a rubyist who runs his mouth, i havent contributed any foss code
[20:43:35] yorickpeterse: So either put up, or shut up
[20:43:48] yorickpeterse: Don't go around saying shit like that when you're a nobody yourself
[20:43:51] govt: like i said, im not running my mouth in chat
[20:44:16] yorickpeterse: You also might want to look at the stuff I have worked on, or work on
[20:44:23] yorickpeterse: Instead of making yourself look like a fool
[20:44:37] platzhirsch: hey, hey.. language
[20:44:41] govt: a nobody, lol! i get paid to write code, just like you. i dont feel the need to write open source gems b/c anytime I look in #ruby this is what i find
[20:44:50] yorickpeterse: govt: you're welcome to leave
[20:44:54] bigredbo_: has joined #ruby
[20:44:56] govt: id rather you
[20:44:57] yorickpeterse: You won't be missed
[20:45:24] yorickpeterse: Reminds me of small children
[20:45:36] yorickpeterse: "you're a dumbass yourself!"
[20:46:02] govt: hey check out my xml parser
[20:46:05] govt: notice me
[20:46:12] havenwood: Please be nice.
[20:46:15] platzhirsch: I guess we can agree, that both of you haven't really made it to the top of the ladder, but that doesn't mean you guys have a great a character
[20:46:20] yorickpeterse: govt: that really hurt my feelings
[20:46:20] havenwood: And don't touch anything.
[20:46:30] govt: has left #ruby: ()
[20:46:32] ruurd: has joined #ruby
[20:46:33] yorickpeterse: platzhirsch: I care little for fame
[20:46:34] govt: has joined #ruby
[20:46:47] yorickpeterse: arguebly the programming industry is not a good one to become famous
[20:46:50] platzhirsch: Good, than give me all your GitHub stars
[20:46:52] yorickpeterse: Better to start in some new Hollywood movie
[20:46:53] govt: yorick do you express your feelings with angle brackets?
[20:47:11] yorickpeterse: govt: enjoy the /ignore, I have better things to do than waste my time argueing with a 12 year old
[20:47:12] dseitz: chrisseaton: actually... time moves quicker than I thought :) Truffle is integrated into JRuby now
[20:47:13] govt: id recommend <suicidal> for you
[20:47:15] jhass: !kick govt take it to PM, this is offtopic
[20:47:15] ruboto: ruboto kicked govt: it to PM, this is offtopic
[20:47:15] ruboto: -o ruboto
[20:47:26] jhass: yorickpeterse: just add them to ignore please
[20:47:40] pyon: has joined #ruby
[20:47:45] platzhirsch: jesus, I can't remember #ruby being such a rowdy place
[20:48:00] yorickpeterse: platzhirsch: welcome to Sunday evening :P
[20:48:00] havenwood: Well, that escalated to wildly-inappropriate quickly.
[20:48:14] dseitz: So other than that, I think just the fact that it is not completely stable would be the only risk
[20:48:17] jhass: govt's just looking for trouble, ignore and move on
[20:48:20] platzhirsch: You always want to score more attention, no?
[20:48:39] yorickpeterse: platzhirsch: pardon?
[20:48:54] northfurr: has joined #ruby
[20:48:54] platzhirsch: That wasn't directed at you yorickpeterse
[20:49:07] platzhirsch: That was directed to everyone who trolls :D
[20:49:19] yorickpeterse: but I'm like, 80% troll
[20:49:21] platzhirsch: everything is fine
[20:49:24] platzhirsch: ACTION strokes yorickpeterse
[20:50:21] craysiii: i came in here at the wrong time it seems.
[20:51:26] jhass: troll's gone, yw
[20:51:46] last_staff: has joined #ruby
[20:52:17] adaedra: I let all of you alone for some time and you bring in the trolls
[20:53:24] govt: has joined #ruby
[20:53:34] govt: jhass, jhass, jhass
[20:53:45] rbennacer: has joined #ruby
[20:53:45] govt: what a fine line you walk
[20:53:54] jhass: !mute govt
[20:53:55] ruboto: +q govt!*@*
[20:53:55] ruboto: -o ruboto
[20:54:02] havenwood: !ban NICK !T 1d "abusive trolling"
[20:54:02] ruboto: havenwood, could not find a matching user for "NICK"
[20:54:05] Nilium: Thank you.
[20:54:05] dseitz: I got a second to look at Crystal. Very nice. I've been using a lot of Rust late (and I mostly work in C/C++). Crystal is something I'll enjoy using.
[20:54:20] adaedra: haha havenwood
[20:54:24] havenwood: adaedra: ;)
[20:54:29] platzhirsch: dseitz: Rust! How does the no null-thingie work for you?
[20:54:43] havenwood: adaedra: Time for more coffee!
[20:54:51] Nilium: If it's anything like Scala, not having null is actually not that big of a deal.
[20:55:06] dseitz: It's a tough language to get used to :)
[20:55:08] havenwood: ACTION thanks adaedra 
[20:55:13] dseitz: So many concepts
[20:55:28] Nilium: I keep meaning to learn it, but right now I mostly approach languages with how practical they'd be for what I'm doing at work
[20:55:47] dseitz: And unlike other languages where you can get some code to compile and find out later it doesn't work, Rust won't let you compile if the compiler knows your code sucks really bad lol
[20:55:50] platzhirsch: I think it's great that people are open to other topics like different languages in #ruby, there are so many channels in freenode, where they will gag you and hit your kidney when you introduce the wrong topic.
[20:56:00] Nilium: So, Go was first, Erlang or Elixir are probably next, Rust maybe for building libraries for use in other languages
[20:56:01] adaedra: ?ot platzhirsch
[20:56:01] ruboto: platzhirsch, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
[20:56:27] platzhirsch: no meta discussions, silly!
[20:56:43] Nilium: ACTION duct tapes platzhirsch to a door
[20:56:56] adaedra: #ruby-offtopic is actually a nice place too :)
[20:57:10] adaedra: One of us! One of us!
[20:57:11] Nilium: I have too many channels, I don't want more
[20:57:55] Nilium: I could remove c++-social, I guess, but it's comforting having it open
[20:58:10] platzhirsch: C++ has a social channel? haha
[20:58:15] jhass: !ban govt !P troll
[20:58:16] ChanServ: +b govt!*@*
[20:58:16] ChanServ: ChanServ kicked govt: troll
[20:58:23] jhass: !unmute govt
[20:58:24] ruboto: -q govt!*@*
[20:58:24] ruboto: -o ruboto
[20:58:35] Nilium: platzhirsch: They do, and if you get off-topic in ##C++, they will scream at you
[20:58:40] adaedra: std::social<std::communication::irc>
[20:58:48] platzhirsch: I am always afraid around C/C++ people, they are the most violent
[20:59:04] adaedra: it's becuase you don't have -fnice
[20:59:08] Nilium: I'm a C and C++ person, but that's mostly because they're the industry standard for game dev.
[20:59:35] dseitz: Nilium: Rust is great if you need the performance of C & C++, but are sick of solving problems of C in C :)
[20:59:43] Nilium: Pretty much.
[20:59:51] Nilium: They're also the reason I use Go at work
[21:00:28] dseitz: I've seen very little tradeoffs; and where concurrency is a concern, Rust is able to reason about and help you write working code that is safe.
[21:00:29] Nilium: 'Cause I like C, I just don't want to use it for writing server programs, and Go fits that niche really well.
[21:01:13] rickmasta: has joined #ruby
[21:01:23] adaedra: I've started learning rust, but it's hard for now. It may get better with practice.
[21:02:13] adaedra: we have tenderlove in here?
[21:02:24] pandaant: has joined #ruby
[21:02:26] dseitz: But I don't want to turn this into #rust :P Feel free to ask any question. The community is filled with people that love to help and don't bully our beginners with RTFMs and alikes
[21:02:29] dseitz: We'll help :)
[21:02:59] bruno-: has joined #ruby
[21:03:00] adaedra: Oh, I'm already in #rust
[21:03:52] Nilium: I used to hang out in a rust channel, but that was pre-1.x and the language was a much larger pain in the neck then. Unfortunately, this also means the tiny little bits I knew about it are also completely unusable now.
[21:04:29] sgambino: has joined #ruby
[21:04:47] adaedra: dseitz: over rust problems, I also don't have anything I could do in Rust to train :T
[21:05:16] workmad3: has joined #ruby
[21:05:43] maceto: has joined #ruby
[21:06:58] VeryBewitching: has joined #ruby
[21:07:39] firstdayonthejob: has joined #ruby
[21:08:14] bruno-: has joined #ruby
[21:08:33] vmatiyko: has joined #ruby
[21:08:50] platzhirsch: Nilium: What do you do with Go at work?
[21:08:55] dotix: has joined #ruby
[21:09:50] Nilium: Backend server stuff, processing data sent to us. Mostly the really high-volume stuff, since otherwise the majority of our backend code is in PHP for reasons unknown to me.
[21:09:54] dseitz: adaedra: Well that's always the hard part. Finding something that interests you to work on. I'm using it where I used to use C++ in mobile applications.
[21:10:32] Nilium: So basically I write programs to read stuff off of queues and process it faster than anything can put it in.
[21:10:36] acke: has joined #ruby
[21:11:51] platzhirsch: would like to apply it for our stuff, but I am just learning and no one else knows the language
[21:12:00] Nilium: The majority of the latest system we built is almost entirely in Go, so our internal web API server things, the processing, delivery to third parties, etc. is almost entirely Go.
[21:12:05] platzhirsch: I have written out Slack Bot in Go though, plays sounds over the pi on our speakers
[21:12:34] Nilium: There's really only two exceptions, one where it was written in Go and the person who wrote it thought the problem was Go so he rewrote it in Java and had the same problem, the latter being the hooks into the older systems which had to be written in PHP
[21:13:29] Nilium: By the time the one thing got rewritten in Java, I said screw it, just maintain that for now and we'll replace it later, so technically the Go implementation is still sitting around in VCS, it's just slightly outdated.
[21:14:02] Nilium: The main problem is that when we go to replace it, I need to sit down and have a talk with the rest of the team that's using Go about all the weird stuff they've been doing in it.
[21:14:15] Nilium: 'Cause they really, really like pointers.. and I don't know why.
[21:14:23] ruurd: has joined #ruby
[21:14:46] fgo_: has joined #ruby
[21:14:47] platzhirsch: sounds like.. a lot of fun.. and discussions.. about,.. well :D
[21:14:49] Nilium: I'm not really sure how they got it into their heads that they need pointers to everything in Go, but that's on the list of things I need to tell them not to do.
[21:15:19] NeverDie: has joined #ruby
[21:15:23] Nilium: Also, the mainly-PHP guy who wrote the internal API server thought that global variables were per-HTTP-request or something, so there was an enormous, scary data race in there
[21:15:59] Nilium: i.e., he had a global response variable and he was just modifying it from every HTTP request, so two or more in-flight requests would overwrite one another, signal they were incorrectly complete, etc.
[21:16:00] emba: has joined #ruby
[21:16:15] armyriad: has joined #ruby
[21:16:23] Nilium: So, I rewrote most of that..
[21:16:43] platzhirsch: and ordered three copies of Efficient Go
[21:16:59] juanpablo____: has joined #ruby
[21:17:00] Nilium: Never read it. I just tell people to do the tour, read Effective Go, and read the language spec.
[21:17:11] emba: has joined #ruby
[21:17:39] platzhirsch: seems sufficient if you are proficient with general programming concepts
[21:17:45] Nilium: At any rate, that's what happens when you learn a language on the fly, so it just happens.
[21:17:46] NeverDie: has joined #ruby
[21:17:58] platzhirsch: trail and error
[21:18:21] Nilium: I've been trying to slowly put together a bunch of documents about Go stuff at work just so I've got something to point at
[21:18:52] ruurd: has joined #ruby
[21:19:13] Nilium: Right now it mostly consists of installing Go, "please don't use go run in production ever," and "don't use interface{} unless there's a really good reason"
[21:19:57] Nilium: Rust might be a good idea if I want to get stricter about stuff like that.
[21:22:26] failshell: has joined #ruby
[21:22:29] VeryBewitching: Question regarding passing self to a block and not being able to call a protected method: https://gist.github.com/bewitchingme/28b891f0c20ad6f7bbc0 Once this class is initialized, it's important that values cannot be redefined after initialization, how can I work this so add is not a public method on an instance of this class?
[21:23:06] VeryBewitching: In the block, I want to do self.add :accessor, value
[21:25:12] helpa-bot: has joined #ruby
[21:25:32] Nilium: Couldn't you just freeze the class and then check frozen in your methods?
[21:25:40] ordepdev: has joined #ruby
[21:25:46] Nilium: i.e., after block.call, freeze the object.
[21:25:47] tonios57_: has joined #ruby
[21:25:48] jenrzzz: has joined #ruby
[21:26:47] VeryBewitching: Nilium: Yes, I can certainly find ways to accomplish it, but I guess I'm looking for clarification on scope with a block that is passed in; I would have assumed that the block shared the scope where it was called.
[21:27:12] helpa: has joined #ruby
[21:27:29] mblagden: Blocks run in their lexical context, not the callers
[21:27:32] Nilium: Alternatively, have a separate builder object that's mutable and then use the result of the mutable object to create the immutable object, but at that point you're getting silly and the easier thing to do is either freeze it or just don't modify the object after init.
[21:27:46] VeryBewitching: mblagden: Oh, that clears that up then. Thanks :D
[21:27:50] toretore: VeryBewitching: use instance_eval on the block
[21:28:54] toretore: or pass a configuration object to the block which is then used to configure the instance inside initialize
[21:28:57] VeryBewitching: toretore: Nope, that still raises an exception
[21:29:20] VeryBewitching: instance_eval block.call self ?
[21:29:27] Nilium: Could also just make add return a new instance.
[21:31:00] toretore: >> class Foo; def initialize(&b); instance_eval(&b) end; attr_reader :foo; private; def set_foo(f); @foo = f; end; end; Foo.new{ set_foo 'bar' }.foo
[21:31:01] ruboto: toretore # => "bar" (https://eval.in/429002)
[21:32:49] Cust0sLim3n: has joined #ruby
[21:33:05] toretore: class Foo; def initialize(&b); c = Configurator.new; yield c; do_something_with(c); end; end
[21:33:53] bronson: has joined #ruby
[21:36:22] VeryBewitching: OK, I sorted it out; instance_eval(&block) allows me to use :add in the block
[21:36:22] nofxx: has joined #ruby
[21:37:03] zenguy_pc: has joined #ruby
[21:37:09] ruurd: has joined #ruby
[21:39:48] maceto: has joined #ruby
[21:43:01] DeweyD: has joined #ruby
[21:44:16] clarkenciel: has joined #ruby
[21:44:41] diegoaguilar: has joined #ruby
[21:45:02] PaulCapestany: has joined #ruby
[21:48:54] Rurik: has joined #ruby
[21:49:13] tkuchiki: has joined #ruby
[21:52:18] JDiPierro: has joined #ruby
[21:52:50] [k-: has joined #ruby
[21:54:13] Scripore: has joined #ruby
[21:55:00] tenderlove: has joined #ruby
[21:57:32] weemsledeux: has joined #ruby
[21:59:30] jamesaxl|2: has joined #ruby
[21:59:54] pipework: has joined #ruby
[22:00:14] CloCkWeRX: has joined #ruby
[22:01:26] swgillespie: has joined #ruby
[22:01:55] ponga: has joined #ruby
[22:02:03] decoponio: has joined #ruby
[22:04:38] majjoha: has joined #ruby
[22:05:39] jdawgaz: has joined #ruby
[22:05:42] northfurr: has joined #ruby
[22:06:44] CloCkWeRX: has joined #ruby
[22:07:03] ruurd: has joined #ruby
[22:07:20] j5s7: has joined #ruby
[22:08:19] KensoDev: has joined #ruby
[22:09:32] i: has joined #ruby
[22:10:06] bstrrm: has joined #ruby
[22:12:12] ranchodev: has joined #ruby
[22:12:12] hololeap: has joined #ruby
[22:12:45] northfurr: has joined #ruby
[22:14:39] ndrei: has joined #ruby
[22:15:00] lignux: has joined #ruby
[22:15:50] fgo_: has joined #ruby
[22:22:57] nahtnam: When I run this, it prints the number an pin on new lines. Why is that? https://gist.github.com/nahtnam/9c70d834e4b4e416f2ba
[22:23:23] failshell: has joined #ruby
[22:24:25] heftig: nahtnam: the string that gets returns includes a line ending
[22:24:45] nahtnam: Is there an alternative to gets?
[22:25:23] heftig: use gets.chomp
[22:26:02] vdamewood: has joined #ruby
[22:26:27] nahtnam: Oh one more question
[22:26:52] nahtnam: How can I have a "default" so if the field is empty, replace it with a default value.
[22:27:05] weemsledeux: has joined #ruby
[22:27:27] Rakunh0: has joined #ruby
[22:27:35] voker57: puts(somevar || :default)
[22:27:55] voker57: or somewar ||= :default if you want to change the variable
[22:28:29] Lycanii: has joined #ruby
[22:28:37] nahtnam: number = gets.chomp ||= "asdf"
[22:28:46] nahtnam: I dont think that would work
[22:28:54] nahtnam: *it doesnt
[22:30:24] eightfold: has joined #ruby
[22:30:27] max_Q: has joined #ruby
[22:39:20] max_Q: has joined #ruby
[22:40:11] leafybasil: has joined #ruby
[22:40:17] hololeap: has joined #ruby
[22:45:40] Radar: nahtnam: You know the rules, and so do I.
[22:45:48] Radar: "Doesn't work" is not useful.
[22:46:15] Radar: Meditate on this:
[22:46:20] Radar: >> "" || "asdf"
[22:46:21] ruboto: Radar # => "" (https://eval.in/429012)
[22:46:59] nahtnam: But that returned "" instead of "asdf"
[22:47:18] voker57: that's why it doesn't work
[22:47:32] Radar: nahtnam: Yes, now meditate.
[22:49:28] max_Q: has joined #ruby
[22:50:07] aaeron: has joined #ruby
[22:52:02] dopie: has joined #ruby
[22:52:19] chuy: has joined #ruby
[22:52:31] jesterfraud: has joined #ruby
[22:54:01] workmad3: has joined #ruby
[22:54:13] s00pcan: has joined #ruby
[22:57:17] Guest29337: has joined #ruby
[22:58:27] CloCkWeRX: has joined #ruby
[22:58:48] Guest29337: has left #ruby: ()
[22:59:04] havenwood: has joined #ruby
[23:00:02] blackmesa: has joined #ruby
[23:02:37] michaeldeol: has joined #ruby
[23:03:26] djbkd: has joined #ruby
[23:05:55] Scripore: has joined #ruby
[23:06:23] juanpablo____: has joined #ruby
[23:07:24] Swappticon: has joined #ruby
[23:12:49] dgutierrez1287: has joined #ruby
[23:13:57] yashinbasement: has joined #ruby
[23:14:56] platzhirsch: has joined #ruby
[23:15:31] s00pcan: has joined #ruby
[23:15:35] tubuliferous_: has joined #ruby
[23:16:56] fgo_: has joined #ruby
[23:17:01] platzhirsch: Can anyone recommend good podcasts?
[23:18:08] Kallis: has joined #ruby
[23:19:05] jdawgaz: has joined #ruby
[23:25:21] _clarkenciel: has joined #ruby
[23:26:24] maceto: has joined #ruby
[23:26:46] s00pcan: has joined #ruby
[23:27:59] weemsledeux: has joined #ruby
[23:28:35] Mon_Ouie: has joined #ruby
[23:29:20] bb010g: has joined #ruby
[23:30:36] glennt: has joined #ruby
[23:33:09] ZYPP: has joined #ruby
[23:33:12] havenwood: platzhirsch: The Ruby Rogues and the Changelog.
[23:34:38] icedragon: has joined #ruby
[23:35:50] Esya-: has joined #ruby
[23:36:15] Bish: has joined #ruby
[23:36:49] Coraline: Yay Ruby Rogues
[23:37:57] Coraline: http://bikeshed.fm is also good.
[23:38:28] Azure: has joined #ruby
[23:38:46] bigredboots: has joined #ruby
[23:38:58] fostertheweb: has joined #ruby
[23:40:06] jdawgaz: has joined #ruby
[23:42:04] rakm: has joined #ruby
[23:42:12] shevy: Coraline you got too much time!
[23:42:25] Coraline: Nothing but time
[23:42:28] platzhirsch: Oh the last one features yorickpeterse, you're famous
[23:42:46] shevy: what did he do
[23:43:00] Ropeney: has joined #ruby
[23:43:08] shevy: I can only became famous by ranting :(
[23:43:09] platzhirsch: He wrote a XML parser in Ruby
[23:43:20] shevy: that sounds painful
[23:43:24] maceto: has joined #ruby
[23:43:27] shevy: that deserves legendary fame
[23:43:47] platzhirsch: also there was a troll who made fun of him because of that very fact
[23:43:49] LoganG: has joined #ruby
[23:44:09] platzhirsch: very dramatic scenes in #ruby
[23:44:18] platzhirsch: During your absence shevy!
[23:44:23] _liquid_: has joined #ruby
[23:45:24] shevy: platzhirsch I fell asleep :(
[23:45:28] devbug: has joined #ruby
[23:45:45] shevy: yeah... but right now I feel awesome, so it's time to be productive!
[23:45:58] platzhirsch: I am very tired now and I have to work tomorrow
[23:46:05] shevy: from the backlog it seems as if jhass had to kick about 50 people
[23:46:19] platzhirsch: yeah jhass went mental
[23:47:37] stardiviner: has joined #ruby
[23:48:03] shevy: I'd wish I could somehow convert a case when menu into a hash
[23:48:18] shevy: programmatically
[23:48:23] claw: has joined #ruby
[23:49:12] havenwood: shevy: try Ripper
[23:49:19] shevy: yeah I always (also) use it as menu actually, main entry point e.g. to cover things like --help but also -h
[23:49:23] platzhirsch: I am sorry case doesn't return a value yet
[23:49:46] jenrzzz: has joined #ruby
[23:49:53] tkuchiki: has joined #ruby
[23:51:51] maceto: has joined #ruby
[23:51:53] havenwood: shevy: It'd be convoluted. Hem. Not the most straightforward parser.
[23:53:42] havenwood: shevy: But I think doable.
[23:54:24] shevy: when 'a','b'
[23:54:40] shevy: { 'a' => 'c', 'b' => 'c' }
[23:54:59] Scripore: has joined #ruby
[23:56:18] havenwood: >> require 'ripper'; Ripper.sexp "case 'a'; when 'a','b'; 'c' end"
[23:56:19] ruboto: havenwood # => [:program, [[:case, [:string_literal, [:string_content, [:@tstring_content, "a", [1, 6]]]], [:when, ...check link for more (https://eval.in/429022)
[23:57:46] shevy: what is the [1, 6] there?
[23:59:48] Musashi007: has joined #ruby