« Back to channel list

#ruby - 10 May 2016

« Back 1 day Forward 1 day »
[00:04:52] mozzarella: has joined #ruby
[00:09:17] joaumg: has joined #ruby
[00:10:10] EdwardIII: has joined #ruby
[00:13:27] GodFather: has joined #ruby
[00:15:11] crdpink: has joined #ruby
[00:16:51] chipotle: has joined #ruby
[00:17:39] skolman: has joined #ruby
[00:18:54] rkazak: has joined #ruby
[00:19:43] Puffball: has joined #ruby
[00:20:43] Yiota: has joined #ruby
[00:22:21] skolman: has joined #ruby
[00:23:27] ixti: has joined #ruby
[00:24:02] r_rios: has joined #ruby
[00:25:13] r_rios: Is there a way to make the instances of a class callable? Kinda like overloading operator() in C++
[00:26:48] Radar: r_rios: "callable"?
[00:27:21] r_rios: Radar: Something like: a = B.new; a(1, 2, 3)
[00:27:33] Radar: r_rios: what would that do?
[00:28:18] r_rios: Some method from B
[00:29:10] eljimmy: has joined #ruby
[00:29:33] r_rios: I don't know the exact terminology in Ruby, but you can make objects callable like functions in C++ by overloading operator(); I'd like to know if there's an equivalent of that in Ruby
[00:30:31] mtkd: has joined #ruby
[00:30:36] baweaver: there's not
[00:30:51] baweaver: There are things like this you might see:
[00:30:57] baweaver: >> Integer('1')
[00:30:58] ruby[bot]: baweaver: # => 1 (https://eval.in/567646)
[00:31:20] jancel: has joined #ruby
[00:31:21] baweaver: but that's literally a method, distinguished by the parens
[00:31:32] baweaver: otherwise Ruby would try constant resolution on it
[00:32:04] stannard: has joined #ruby
[00:32:29] r_rios: baweaver: OK, thanks for the info :)
[00:32:55] baweaver: well, rather by presence of a param as well since Ruby can go without parens
[00:33:40] moeabdol: has joined #ruby
[00:33:56] baweaver: r_rios what you _could_ do though...
[00:34:35] baweaver: >> class B; def [](arg) send(arg) end end; B.new[:to_s]
[00:34:36] ruby[bot]: baweaver: # => "#<B:0x408959f0>" (https://eval.in/567650)
[00:34:50] baweaver: is overload the array accessor
[00:39:16] CloCkWeRX: has joined #ruby
[00:39:33] r_rios: baweaver: Yeah, that's what I'm doing right now, but it kinda feels wrong, but I guess this will have to do
[00:39:49] r_rios: Thanks, anyway (y)
[00:39:49] idefine: has joined #ruby
[00:39:49] baweaver: I guess the other question is why?
[00:39:59] Ropeney: has joined #ruby
[00:40:14] ljames: has joined #ruby
[00:40:16] r_rios: Why it feels wrong? Or why I want to do it?
[00:40:25] baweaver: why you'd want to do it
[00:40:30] havenwood: just for fun:
[00:40:31] havenwood: >> class B; def initialize *args; @args = args end end; a = B.public_method(:new); a.(1, 2, 3)
[00:40:32] Nanuq: has joined #ruby
[00:40:33] ruby[bot]: havenwood: # => #<B:0x41cc58bc @args=[1, 2, 3]> (https://eval.in/567653)
[00:40:45] havenwood: ACTION looks for an excuse to add #curry
[00:40:47] raeoks: has joined #ruby
[00:41:03] baweaver: havenwood stop that, you'll scare the children
[00:41:13] havenwood: >> class B; def initialize *args; @args = args end end; a = ->(*args) { B.new *args }; a.(1, 2, 3)
[00:41:15] ruby[bot]: havenwood: # => #<B:0x422797b8 @args=[1, 2, 3]> (https://eval.in/567654)
[00:42:13] r_rios: ...I think I'll stick to []
[00:44:07] al2o3-cr: havenwood: a.=== 1,2,3 is gooey
[00:44:12] havenwood: >> class B; def initialize a, b, c; @args = [a, b, c] end end; a = B.public_method(:new).curry(3); a.(1).(2).(3)
[00:44:13] ruby[bot]: havenwood: # => #<B:0x40c3d5a8 @args=[1, 2, 3]> (https://eval.in/567655)
[00:44:22] r_rios: And it doesn't even get all the way there: I'd have to call a.(1, 2, 3), not a(1, 2, 3)
[00:44:37] havenwood: r_rios: a dot away
[00:44:40] r_rios: Not that I don't appreciate the effort, though
[00:45:02] havenwood: r_rios: you could always use a method instead of a proc, i was just being silly
[00:45:10] r_rios: I know :P
[00:45:14] al2o3-cr: r_rios: python might be better for you
[00:45:16] baweaver: r_rios so why do you want that?
[00:45:19] havenwood: al2o3-cr: :P
[00:45:45] baweaver: at least from a straight ruby perspective it doesn't make much sense why you'd need it
[00:46:09] neanderslob_: has joined #ruby
[00:46:32] r_rios: Anyway, baweaver: it's a class whose main purpose is to execute a command, so it's basically like a function; however, I have to register paths, local executables, etc. once in a while
[00:46:59] baweaver: might be time to look into lambdas instead
[00:47:08] r_rios: Most of the time, I'd call it like a function; but sometimes, I'd do a.register_foo('a', '/usr/bin')
[00:47:26] r_rios: Then do a('a')
[00:47:33] baweaver: either that or allow it to yield a block
[00:47:49] r_rios: What do you mean, exactly?
[00:47:57] baweaver: a.do_something { |yielded_value| calculations }
[00:48:52] r_rios: Is that supposed to replace a.register_foo('a') or a('a')?
[00:49:22] baweaver: not sure, don't know enough of the usecase.
[00:49:24] neanderslob: has joined #ruby
[00:49:33] baweaver: just mentioning that it's there
[00:50:04] baweaver: though you could just build up closures as well
[00:50:39] r_rios: I don't think it applies to my case, though. What I what is a function-like object that is capable of holding state
[00:50:45] r_rios: Or something like that
[00:50:47] baweaver: >> adder = -> x { -> y { x + y } }; add3 = adder[3]; (1..10).map(&add3)
[00:50:48] ruby[bot]: baweaver: # => [4, 5, 6, 7, 8, 9, 10, 11, 12, 13] (https://eval.in/567656)
[00:51:01] baweaver: add3 remembers the state of x
[00:51:27] r_rios: Can I change x afterwards?
[00:51:33] baweaver: make a new adder
[00:51:58] Puffball: has joined #ruby
[00:52:05] baweaver: once x is set, it's set, but you can make a new one
[00:52:08] dn`: has joined #ruby
[00:52:43] baweaver: https://leanpub.com/combinators - this will sufficiently trip you out on what you can get away with for Lambdas and the like
[00:53:08] r_rios: Then I think just overloading [] will be enough for me
[00:53:11] Devalo: has joined #ruby
[00:53:13] r_rios: For now, at least
[00:53:29] GodFather: has joined #ruby
[00:53:34] baweaver: read through some of that and do some poking around FP and closures.
[00:54:12] r_rios: I just learned that that's how Procs are called, so it's a bit more reassuring that what I'm doing is not too unusual
[00:54:37] dopamean_: has joined #ruby
[00:54:47] r_rios: Thanks for the advice, though. Really appreciate it
[00:54:52] eljimbo: has joined #ruby
[00:55:12] baweaver: I'm not incredibly fond of it honestly, I think that's the key weakness of paren-free styling
[00:56:30] baweaver: Haskell and Scala did a better job of composition on that note.
[00:56:51] baweaver: especially taking advantage of _
[00:57:31] Arahael: baweaver: Not sure about Scala, but Haskell doesn't exactly offer an alternative, w.r.t. OO techniques.
[00:57:53] jaguarmagenta: has joined #ruby
[00:57:53] baweaver: not saying it does
[00:57:55] Arahael: Though, it's TypeClasses, Applicative and Monads are all pretty good.
[00:58:13] baweaver: just saying that composing functions is a lot cleaner in terms of syntax there
[00:58:29] baweaver: Scala is definitely OO capable
[00:58:43] Arahael: Ah, fair enough.
[00:58:56] cdg: has joined #ruby
[00:59:10] baweaver: I just like that Haskell will let me: 1 `mod` 5 or fn . otherFn
[00:59:39] Arahael: That's just infix notation, though.
[00:59:42] baweaver: function infix and composition
[00:59:46] Arahael: But it's indeed neat.
[00:59:53] baweaver: the . is compose
[01:00:29] baweaver: If I didn't know any better though I'd say Ruby 3.0 is what happens when Ruby 2.x and Scala get together
[01:00:35] Arahael: Well, yes, though it's also shown in infix form there. :) Rather than, say, (.) fn otherFn
[01:00:46] baweaver: yeah, that's fair
[01:01:08] baweaver: Ruby 3 is already rumored to be statically typed with a concurrency system that looks a lot like Akka
[01:01:25] Arahael: It will be interesting to see how that works out.
[01:01:39] Arahael: I still prefer python... But Ruby seems to be advancing much faster now.
[01:02:22] baweaver: https://medium.com/@franzejr/ruby-3-mri-and-gil-a302577c6634#.7ofqzbw8t
[01:02:50] skalfyfan: has joined #ruby
[01:02:50] baweaver: Hopefully we don't pull a Python with our 2/3 jump :P
[01:03:40] Arahael: Indeed. Mind you, the ruby 1.6, 1.8, and 2.0 changes were fairly disruptive. But nothing like the python 2/3 change.
[01:03:48] havenwood: 3x the performance of Ruby 2.0 along with higher level concurrency is a tasty looking carrot.
[01:04:18] Arahael: Especially if that's combined with (optional?) static typing.
[01:04:40] stannard: has joined #ruby
[01:04:41] baweaver: arahael read through how Scala does static typing. Heavy inference.
[01:04:55] baweaver: hence the Ruby stealing from Scala comment earlier.
[01:05:16] havenwood: Matz has mentioned he's reluctant to merge a JIT until Ruby 3 because he wants it to have that draw.
[01:05:40] BrunoSaboia: has joined #ruby
[01:05:48] Arahael: Impressive. Is there a good writeup about these plans/rumours so that I can post it at work?
[01:05:58] baweaver: See that above link
[01:06:07] baweaver: Matz is a tease is what it amounts to though
[01:06:35] havenwood: arahael: Matz' last two RubyConf keynotes cover it it some detail.
[01:07:11] Arahael: Thanks. I'll have to look for them.
[01:07:34] havenwood: arahael: http://confreaks.tv/videos/rubyconf2015-keynote-and-q-a-matz
[01:07:47] yude: has joined #ruby
[01:07:47] Arahael: Blegh, a video!
[01:07:55] Arahael: Anything with at least a transcription?
[01:08:18] Arahael: Sorry, I have a thing against videos. (Mainly due to his deafness, to be honest)
[01:08:28] havenwood: arahael: yeah, i'm pretty sure matz releases the code for his slides
[01:08:35] juanfra: has joined #ruby
[01:08:40] Arahael: Cool, I'll find them, then. :)
[01:08:41] havenwood: you can find the link in the video i bet :P
[01:08:48] havenwood: yeah, i'd like it if i knew
[01:09:00] jdawgaz: has joined #ruby
[01:09:14] havenwood: turtle and a hare
[01:10:41] Arahael: havenwood: This looks useful: http://engineering.appfolio.com/appfolio-engineering/2015/11/18/ruby-3x3
[01:10:46] Arahael: Doesn't mention static analysis though.
[01:11:50] whathappens: has joined #ruby
[01:12:30] jenrzzz: has joined #ruby
[01:12:31] jenrzzz: has joined #ruby
[01:12:35] idefine: has joined #ruby
[01:14:32] Yzguy: has joined #ruby
[01:16:51] jancel: has joined #ruby
[01:17:16] `tim`: has joined #ruby
[01:24:15] devbug: has joined #ruby
[01:25:55] |ifei5g00d: has joined #ruby
[01:26:35] stardiviner: has joined #ruby
[01:26:55] idefine: has joined #ruby
[01:26:56] Puffball: has joined #ruby
[01:27:41] stannard: has joined #ruby
[01:27:50] dn`: has joined #ruby
[01:34:01] rbennacer: has joined #ruby
[01:34:31] bazz_: what means `%Q{"str"}`
[01:36:51] Coldblackice: has joined #ruby
[01:37:53] bazz_: nevermind I figured it out
[01:42:10] idefine: has joined #ruby
[01:43:58] rbennacer: has joined #ruby
[01:45:12] juanfra: has joined #ruby
[01:51:21] rbennacer: has joined #ruby
[01:51:46] jud: has joined #ruby
[01:52:05] dikaio: has joined #ruby
[01:52:56] skolman_: has joined #ruby
[01:55:23] Dimik: has joined #ruby
[01:57:05] ur5us: has joined #ruby
[01:59:08] sp4rrow_: has joined #ruby
[02:00:21] electrostat: has joined #ruby
[02:00:50] tatsuo: has joined #ruby
[02:01:43] robbyoconnor: has joined #ruby
[02:04:37] skalfyfan: has joined #ruby
[02:04:40] Rikaikun: has joined #ruby
[02:05:11] shinnya: has joined #ruby
[02:06:04] jancel: has joined #ruby
[02:07:27] stardiviner: has joined #ruby
[02:08:35] arescorpio: has joined #ruby
[02:09:17] kkeuning: has joined #ruby
[02:09:25] jdawgaz: has joined #ruby
[02:13:38] electrostat: has joined #ruby
[02:15:37] chouhoulis: has joined #ruby
[02:16:10] dikaio: has joined #ruby
[02:17:13] tmtwd: has joined #ruby
[02:21:59] moeabdol: has joined #ruby
[02:23:19] chipotle: has joined #ruby
[02:24:57] gooodroot: has joined #ruby
[02:27:33] davedev24: has joined #ruby
[02:27:58] Puffball: has joined #ruby
[02:28:17] davedev24: has joined #ruby
[02:29:42] rbennacer: has joined #ruby
[02:35:04] AustinMatherne: has joined #ruby
[02:35:44] banister: has joined #ruby
[02:37:19] skalfyfan: has joined #ruby
[02:37:24] justin_pdx: has joined #ruby
[02:39:02] jancel: has joined #ruby
[02:39:05] cdg: has joined #ruby
[02:46:33] TransMemroyEXII: has joined #ruby
[02:46:50] Nanuq: has joined #ruby
[02:47:00] stardiviner: has joined #ruby
[02:49:13] stannard: has joined #ruby
[02:50:16] kgrz: has joined #ruby
[02:51:03] GregUK: has joined #ruby
[02:52:31] nando293921: has joined #ruby
[02:53:22] sdwrage: has joined #ruby
[02:53:34] grenierm: has joined #ruby
[02:54:10] electrostat: has joined #ruby
[02:54:20] Devalo: has joined #ruby
[02:55:34] RegulationD: has joined #ruby
[02:56:12] |ifei5g00d: has joined #ruby
[02:56:48] solocshaw1: has joined #ruby
[02:56:58] electrostat: has joined #ruby
[02:58:08] jenrzzz: has joined #ruby
[02:58:08] jenrzzz: has joined #ruby
[02:58:42] jaguarmagenta: has joined #ruby
[02:59:42] |ifei5good: has joined #ruby
[03:02:14] jancel: has joined #ruby
[03:04:13] solocshaw: has joined #ruby
[03:05:29] |ifei5g00d: has joined #ruby
[03:05:30] BMetash: has joined #ruby
[03:06:51] rkazak: has joined #ruby
[03:07:22] Nanuq: has joined #ruby
[03:07:31] bronson: has joined #ruby
[03:10:16] solocshaw: has joined #ruby
[03:10:42] sneakerhax: has joined #ruby
[03:11:59] braincrash: has joined #ruby
[03:14:48] Puffball: has joined #ruby
[03:14:53] brent__: has joined #ruby
[03:15:02] grenierm: has joined #ruby
[03:15:12] moeabdol: has joined #ruby
[03:18:15] tatsuo: has joined #ruby
[03:18:41] dikaio: has joined #ruby
[03:18:43] JoshGlzBrk: has joined #ruby
[03:21:45] Caerus: ACTION greets #ruby
[03:22:26] azor: has joined #ruby
[03:22:51] Radar: hi Caerus
[03:23:15] azor: ACTION winter is coming
[03:23:20] gix: has joined #ruby
[03:23:58] rbennacer: has joined #ruby
[03:25:54] ramfjord: has joined #ruby
[03:25:57] Yiota: has joined #ruby
[03:30:08] BMetash: has joined #ruby
[03:30:12] dopamean_: has joined #ruby
[03:34:26] Puffball: has joined #ruby
[03:35:25] djbkd: has joined #ruby
[03:39:47] koooge: has joined #ruby
[03:41:15] jdawgaz: has joined #ruby
[03:41:58] dudepare: has joined #ruby
[03:43:11] jancel: has joined #ruby
[03:43:43] benlieb: has joined #ruby
[03:46:14] goooodroot: has joined #ruby
[03:47:03] jdawgaz: has joined #ruby
[03:48:41] banister: has joined #ruby
[03:49:07] nisstyre: has joined #ruby
[03:49:30] Puffball: has joined #ruby
[03:50:50] mukyu: has joined #ruby
[03:51:02] zacstewart: has joined #ruby
[03:51:16] stannard: has joined #ruby
[03:51:51] mukyu: has left #ruby: ()
[03:51:54] azor: has joined #ruby
[03:53:40] rkazak: has joined #ruby
[03:56:19] Fr0g: has joined #ruby
[03:57:48] Fr0g: Hello Ruby wizards. I'm recently switching from perl to ruby and need a pointer: Find.find('/var/spool/*/new/)
[03:58:11] Fr0g: This doesnt work; how can I get that to work
[03:58:52] karmatr0n: has joined #ruby
[04:00:25] kgrz: Fr0g: Are you trying to find all the files under `/var/spool/` directory?
[04:02:31] kgrz: If that's so, checkout Dir.glob http://ruby-doc.org/core-2.2.0/Dir.html#method-c-glob
[04:02:44] LoneHerm_: has joined #ruby
[04:02:53] Fr0g: yes kgrz
[04:02:57] Fr0g: for all users
[04:03:14] znz_jp: has joined #ruby
[04:03:33] Fr0g: err correction, I'm trying to find all emails for all users in /var/spool/mail/$USER/new/
[04:03:51] Fr0g: i dont want to generate a list of users and check them
[04:04:23] Fr0g: checking Dir.glob
[04:04:49] kareeoleez: has joined #ruby
[04:06:31] michael_mbp: has joined #ruby
[04:10:08] schpn: has joined #ruby
[04:12:29] Fr0g: sweet that worked kgrz
[04:12:45] Fr0g: are you savvy with threads by chance?
[04:12:52] BMetash: has left #ruby: ()
[04:19:19] ngscheurich: has joined #ruby
[04:19:52] schpn: has joined #ruby
[04:21:14] juanfra: has joined #ruby
[04:23:00] azor: What do you want to do with threads?
[04:23:04] djd: has joined #ruby
[04:23:21] schpn: has joined #ruby
[04:24:22] schpn: has joined #ruby
[04:24:32] tmtwd: has joined #ruby
[04:26:30] Yzguy: has joined #ruby
[04:26:57] dikaio: has joined #ruby
[04:28:00] azor: Fr0g: It's very easy to use threads in Ruby.
[04:32:54] stannard: has joined #ruby
[04:32:55] d0lph1n98: has joined #ruby
[04:34:57] terminal_: has joined #ruby
[04:35:05] wnd: has joined #ruby
[04:35:49] dling: has joined #ruby
[04:37:07] Arahael: email threads, on the other hand...
[04:37:17] Yzguy: has joined #ruby
[04:40:47] Puffball: has joined #ruby
[04:42:59] fedexo: has joined #ruby
[04:43:51] Devalo: has joined #ruby
[04:44:54] zenlot6: has joined #ruby
[04:45:11] Yzguy: has joined #ruby
[04:47:05] orangey: has joined #ruby
[04:50:48] ascarter: has joined #ruby
[04:51:11] JoshGlzB_: has joined #ruby
[04:52:21] anes: has joined #ruby
[04:53:20] dikaio: has joined #ruby
[04:54:39] yude: has joined #ruby
[04:55:17] Puffball: has joined #ruby
[04:55:18] yfeldblum: has joined #ruby
[04:56:30] stardiviner: has joined #ruby
[04:59:27] jaguarmagenta: has joined #ruby
[05:02:11] justin_pdx: has joined #ruby
[05:04:34] dionysus69: has joined #ruby
[05:04:50] max1: has joined #ruby
[05:08:02] bronson: has joined #ruby
[05:08:42] tatsuo: has joined #ruby
[05:09:05] duncannz: has joined #ruby
[05:10:03] duncannz: has joined #ruby
[05:11:15] tvw: has joined #ruby
[05:13:16] nando293921: has joined #ruby
[05:14:27] duderonomy: has joined #ruby
[05:14:30] stannard: has joined #ruby
[05:14:51] Puffball: has joined #ruby
[05:15:41] justin_pdx: has joined #ruby
[05:17:36] benlieb: has joined #ruby
[05:18:09] last_staff: has joined #ruby
[05:18:47] lxsameer: has joined #ruby
[05:19:22] sauvin: has joined #ruby
[05:20:44] duncannz: has joined #ruby
[05:21:50] fedexo: has joined #ruby
[05:23:46] bazz_: has joined #ruby
[05:23:59] ferr: has joined #ruby
[05:24:22] tmtwd: has joined #ruby
[05:26:44] Puffball: has joined #ruby
[05:27:36] justin_pdx: has joined #ruby
[05:28:40] pawnbox: has joined #ruby
[05:31:29] rickmasta: has joined #ruby
[05:33:11] noService: has joined #ruby
[05:33:35] crankharder: has joined #ruby
[05:35:30] d0lph1n98: has joined #ruby
[05:37:11] Guest2: has joined #ruby
[05:37:36] helpa: has joined #ruby
[05:37:37] stryek: has joined #ruby
[05:44:39] Puffball: has joined #ruby
[05:44:51] Nilium_: has joined #ruby
[05:46:53] Dimik: has joined #ruby
[05:46:54] dikaio: has joined #ruby
[05:47:08] Dimik: has joined #ruby
[05:48:35] astrobunny: has joined #ruby
[05:51:02] futilegames: has joined #ruby
[05:52:44] LoneHerm_: has joined #ruby
[05:53:25] dikaio: has joined #ruby
[05:54:46] orangey: has left #ruby: ("Part")
[05:56:15] claw: has joined #ruby
[05:56:53] moeabdol: has joined #ruby
[05:57:23] djbkd: has joined #ruby
[05:57:47] pawnbox: has joined #ruby
[05:58:01] futilegames: has joined #ruby
[05:58:16] fckyoufreenode: has joined #ruby
[05:58:56] ramfjord: has joined #ruby
[05:59:50] lomex: has joined #ruby
[06:02:58] RenatoSilva: has joined #ruby
[06:03:17] yfeldblum: has joined #ruby
[06:03:36] RenatoSilva: has left #ruby: ("http://renatosilva.net - Renato Silva")
[06:03:56] jancel: has joined #ruby
[06:04:02] yfeldblum: has joined #ruby
[06:04:08] ramfjord: has joined #ruby
[06:04:18] pawnbox: has joined #ruby
[06:08:42] Nilium: has joined #ruby
[06:09:07] bronson: has joined #ruby
[06:09:53] kareeoleez: has joined #ruby
[06:12:59] kareeoleez: has joined #ruby
[06:13:24] astrobunny: has joined #ruby
[06:13:48] Guest2: has joined #ruby
[06:16:24] Macaveli: has joined #ruby
[06:17:10] goldfax: has joined #ruby
[06:20:39] ddffg: has joined #ruby
[06:21:22] ayonkhan: has joined #ruby
[06:24:10] firstdayonthejob: has joined #ruby
[06:27:03] pawnbox: has joined #ruby
[06:28:48] duncannz: has joined #ruby
[06:28:53] stannard: has joined #ruby
[06:30:49] hypercube32: has joined #ruby
[06:32:50] tmtwd: has joined #ruby
[06:35:59] idefine: has joined #ruby
[06:36:22] akem: has joined #ruby
[06:39:45] rickmasta: has joined #ruby
[06:41:05] Tichodroma: has joined #ruby
[06:44:07] ur5us: has joined #ruby
[06:45:31] yude: has joined #ruby
[06:47:53] scepticulous: has joined #ruby
[06:49:59] Dimik: has joined #ruby
[06:51:31] platzhirsch: has joined #ruby
[06:51:36] Slackman1: has joined #ruby
[06:52:11] JohnBat26: has joined #ruby
[06:55:47] madhatter: has joined #ruby
[06:57:03] pLaToOn: has joined #ruby
[06:57:58] platzhirsch: has left #ruby: ()
[06:58:31] nobitanobi: has joined #ruby
[06:59:11] tildes: has joined #ruby
[06:59:21] DoubleMalt: has joined #ruby
[06:59:23] noService: has joined #ruby
[07:00:16] jaguarmagenta: has joined #ruby
[07:02:44] stupidystupid: has joined #ruby
[07:02:54] codecop: has joined #ruby
[07:04:24] noServic1: has joined #ruby
[07:05:04] biberu: has joined #ruby
[07:05:19] stupidystupid: has joined #ruby
[07:05:40] blur3d: has joined #ruby
[07:08:08] dionysus69: has joined #ruby
[07:08:19] toretore: has joined #ruby
[07:10:21] ur5us: has joined #ruby
[07:10:28] stannard: has joined #ruby
[07:11:28] Couch: has joined #ruby
[07:12:35] stupidystupid: has joined #ruby
[07:13:03] drewo: has joined #ruby
[07:15:05] bwlang: has joined #ruby
[07:15:41] gooooodroot: has joined #ruby
[07:16:56] benlieb: has joined #ruby
[07:17:46] tao_: has joined #ruby
[07:18:23] Arnvald: has joined #ruby
[07:19:13] AnoHito: has joined #ruby
[07:21:24] the_drow: has joined #ruby
[07:22:11] edwinvdgraaf: has joined #ruby
[07:24:37] aganov: has joined #ruby
[07:25:21] Echohn: has joined #ruby
[07:26:33] TomyWork: has joined #ruby
[07:27:25] emiltin: has joined #ruby
[07:29:23] antgel: has joined #ruby
[07:29:29] andikr: has joined #ruby
[07:32:21] anisha: has joined #ruby
[07:33:22] shevy: http://ruby-doc.org/stdlib-2.3.1/libdoc/fileutils/rdoc/FileUtils.html#method-c-compare_file
[07:33:28] CausaMortis: has joined #ruby
[07:33:30] shevy: FileUtils.compare_file('somefile', 'somefile') #=> true
[07:33:36] shevy: FileUtils.compare_file('/bin/cp', '/bin/mv') #=> maybe false
[07:33:41] shevy: we got a maybe monad
[07:34:09] Ch4rAss: has joined #ruby
[07:34:11] Arnvald: has joined #ruby
[07:35:00] xall: has joined #ruby
[07:35:40] terminal_: has joined #ruby
[07:37:59] TheBrayn: https://github.com/rap1ds/ruby-possibly
[07:38:21] idefine: has joined #ruby
[07:39:47] hk238: has joined #ruby
[07:41:57] mark_66: has joined #ruby
[07:42:45] Ch4rAss: has joined #ruby
[07:44:31] terlar: has joined #ruby
[07:45:50] skade: has joined #ruby
[07:47:08] ctp: has joined #ruby
[07:48:31] aufi: has joined #ruby
[07:48:56] rickmasta: has joined #ruby
[07:50:29] goldfax: has joined #ruby
[07:51:56] zacstewart: has joined #ruby
[07:53:25] jancel: has joined #ruby
[07:53:46] Ch4rAss: has joined #ruby
[07:54:00] stannard: has joined #ruby
[07:54:18] sdwrage: has joined #ruby
[07:55:10] Radar: I got asked today and I don't know the answer to this: when should we use block.call and when should we use yield?
[07:56:09] tobiasvl: Radar: http://innig.net/software/ruby/closures-in-ruby.rb
[07:56:19] Ch4rAss: has joined #ruby
[07:57:46] Ch4rAss: has joined #ruby
[08:01:36] terlar: has joined #ruby
[08:01:38] Ch4rAss: has joined #ruby
[08:02:27] lxsameer: has joined #ruby
[08:03:25] Ch4rAss: has joined #ruby
[08:05:38] pawnbox: has joined #ruby
[08:06:34] mikecmpbll: has joined #ruby
[08:07:42] Ch4rAss: has joined #ruby
[08:07:53] bweston92: has joined #ruby
[08:07:58] finnnnnnnnnnn: has joined #ruby
[08:08:59] Ch4rAss: has joined #ruby
[08:09:52] blackmes1: has joined #ruby
[08:10:05] nobitanobi: has joined #ruby
[08:11:38] mesamoo: has joined #ruby
[08:13:34] karapetyan: has joined #ruby
[08:14:14] Polysics: has joined #ruby
[08:14:32] ICantCook: has joined #ruby
[08:14:41] ishe_ua: has joined #ruby
[08:14:47] apeiros: Radar: yield/block_given? is faster and less gc intense
[08:15:01] marr: has joined #ruby
[08:15:21] apeiros: in case of immediate use that is. if it's nested, use &block to pass the block on
[08:15:46] apeiros: block.call itself I only ever use if I store the block and invoke it elsewhere
[08:15:47] IbrahimA: has joined #ruby
[08:15:51] nobitanobi: has joined #ruby
[08:16:35] stannard: has joined #ruby
[08:16:44] IbrahimA: was reading this article https://samsaffron.com/archive/2013/11/22/demystifying-the-ruby-gc , and i have a question about ruby's memory allocation model and GC
[08:19:43] IbrahimA: he says ruby allocates multiple "heaps" and each one is 16kb and if GC finds that it ran out of free heaps it will allocate 1.8x more
[08:19:58] IbrahimA: and the number of heaps is never decreased
[08:20:02] siovene: has joined #ruby
[08:20:29] IbrahimA: is that still true? is there no way to reclaim that heap space once we no longer need it, besides restarting the process?
[08:20:38] moeabdol: has joined #ruby
[08:21:48] rickmasta: has joined #ruby
[08:22:41] Ropeney: IbrahimA, I believe thats still the case but a factor of 1.4
[08:23:44] mrgrieve1: has joined #ruby
[08:23:45] Macaveli_: has joined #ruby
[08:23:53] drbrain: has joined #ruby
[08:23:57] droptone: Does .find return just the first matching result?
[08:24:06] apeiros: IbrahimA: a modern OS will page out unused memory anyway and virtualize it
[08:24:15] apeiros: droptone: context
[08:24:21] apeiros: droptone: there's an infinite number of .find methods.
[08:24:41] IbrahimA: apeiros: what if swap is turned off or swap space is low?
[08:25:17] rkazak: has joined #ruby
[08:25:27] IbrahimA: it seems like for a long running process this could be a potential trouble spot
[08:25:53] IbrahimA: i've got a sidekiq worker running all sorts of jobs, and a new type of job im trying to add tends to use a lot of memory depending on what sorts of files users upload
[08:25:57] apeiros: IbrahimA: if I run "top" I see `VM: 962G vsize`
[08:26:11] apeiros: my system doesn't have 962GB of ram, neither does it have that amount of disk space
[08:26:12] IbrahimA: actually yeah i've seen chrome does that
[08:26:14] apeiros: it's purely virtual
[08:26:31] snowy: has joined #ruby
[08:26:46] IbrahimA: i wonder if swapoff prevents that from working though; i guess in theory swap and virtual memory are orthogonal
[08:26:59] apeiros: I don't know the precise details at how that works, but as I understood it, while the memory is not reclaimed by the OS, it won't occupy any real memory either.
[08:27:03] droptone: Ok, so in this context:
[08:27:04] droptone: contacts = [ { "name" => "Jim", "age" => 20 }, { "name" => "Bob", "age" => 25 }, { "name" => "Jim", "age" => 20 } ]; user = { "name" => "Jim", "age" => 20 }; testfind = contacts.find(|con| con["name"].downcase == user["name"].downcase);
[08:27:08] droptone: Just that line.
[08:27:11] IbrahimA: but in practice i imagine if you have swap off once you pass the amount of physical memory something's gotta give
[08:27:18] droptone: That final find statement would match two entries, the first and the last array index.
[08:27:21] Ropeney: IbrahimA, it does
[08:27:23] apeiros: droptone: so the context would be Array#find
[08:27:43] apeiros: droptone: yes, Array#find will only find the first result
[08:27:54] IbrahimA: Ropeney: you mean, most likely the kernel will kill ruby due to low memory?
[08:28:08] Ropeney: or it will kill something else
[08:28:20] apeiros: droptone: which is btw. (surprise) also documented: "Returns the first for which block is not false"
[08:29:13] IbrahimA: im thinking the best way to go for me here is to fork and do the work in a separate process to avoid increasing heap size of my sidekiq worker
[08:29:21] Ishido: has joined #ruby
[08:29:48] IbrahimA: i think upstart or something will restart sidekiq if it dies, but i'll lose whatever it was working on i believe
[08:30:38] droptone: Right, but did you see how I wasn't clear on which .find of the infinite .find methods I would be researching?
[08:30:52] apeiros: droptone: contacts.class
[08:31:00] apeiros: droptone: and then `ri ThatClass#find`
[08:31:05] apeiros: not all that difficult
[08:31:16] droptone: Right, but I clearly didn't understand that I needed to know the class to understand the context.
[08:31:20] droptone: Hence me asking the question in the channel.
[08:31:22] Ropeney: IbrahimA, probably not a good solution
[08:31:29] apeiros: droptone: great, so you learned something today
[08:34:09] Ropeney: IbrahimA http://www.sitepoint.com/ruby-uses-memory/ claims it gives it back ***slowly***
[08:34:25] IbrahimA: yeah that's definitely not an ideal solution
[08:34:45] IbrahimA: ah funnily enough i was just reading that article
[08:34:58] IbrahimA: and it's newer than sam saffron's
[08:35:55] brunto: has joined #ruby
[08:36:04] Ropeney: goodluck though, im off
[08:36:06] Ch4rAss: has joined #ruby
[08:38:57] Arnvald: has joined #ruby
[08:39:54] Ch4rAss: has joined #ruby
[08:40:50] aupadhye: has joined #ruby
[08:41:15] Echohn: has joined #ruby
[08:42:00] Ch4rAss: has joined #ruby
[08:45:19] Madplatypus: has joined #ruby
[08:47:47] Ch4rAss: has joined #ruby
[08:51:30] lewis1711: has joined #ruby
[08:51:50] lewis1711: how does ruby "know" how to sort characters?
[08:53:04] tobiasvl: http://ruby-doc.org/core-2.3.0/Comparable.html
[08:53:38] lewis1711: hmm it seems to do it by the result of "ord" with strings
[08:54:34] ur5us: has joined #ruby
[08:54:38] lewis1711: though I am not quite sure what an "integer ordinal" is
[08:55:15] apeiros: lewis1711: it doesn't sort characters, it sorts bytes. ruby doesn't have collation support.
[08:55:46] Jet4Fire: has joined #ruby
[08:58:08] stannard: has joined #ruby
[09:00:55] jaguarmagenta: has joined #ruby
[09:03:37] Xiti: has joined #ruby
[09:04:46] hays: has joined #ruby
[09:04:51] aep: has left #ruby: ("Quit message")
[09:05:20] astrobunny: has joined #ruby
[09:06:03] jgt: has joined #ruby
[09:06:33] pabs: has joined #ruby
[09:09:01] drptbl: has joined #ruby
[09:11:34] CloCkWeRX: has joined #ruby
[09:16:52] tAn: has joined #ruby
[09:19:25] platzhirsch: has joined #ruby
[09:20:37] stannard: has joined #ruby
[09:21:23] IbrahimA: has left #ruby: ()
[09:23:25] jespada: has joined #ruby
[09:23:36] mdw: has joined #ruby
[09:24:48] terlar: has joined #ruby
[09:26:14] senayar: has joined #ruby
[09:26:14] senayar: has joined #ruby
[09:27:22] ensyde__: has joined #ruby
[09:27:54] yfeldblum: has joined #ruby
[09:31:33] workmad3: has joined #ruby
[09:32:29] yude: has joined #ruby
[09:33:48] d0lph1n98: has joined #ruby
[09:38:05] lewis1711: has left #ruby: ("Ex-Chat")
[09:38:30] CloCkWeRX: has joined #ruby
[09:38:32] johnDoe111: has joined #ruby
[09:39:08] drewo: has joined #ruby
[09:39:42] DoubleMalt: has joined #ruby
[09:40:04] idefine: has joined #ruby
[09:40:42] Ox0dea: apeiros: How do I hit this? https://git.io/vrJcZ
[09:41:01] Ox0dea: And can you reckon on the rationale that might've gone into that?
[09:41:15] cpup: has joined #ruby
[09:42:02] CloCkWeRX1: has joined #ruby
[09:42:23] Macaveli: has joined #ruby
[09:43:33] ujjain: is this valid? timeout_exception = 'Execution Timeout Error: This deployment has taken too long to run'
[09:43:33] ujjain: puts 'timeout_exception'
[09:46:34] qwer: has joined #ruby
[09:46:40] kgrz: are you trying to print out the contents of variable `timeout_exception`?
[09:46:59] ur5us: has joined #ruby
[09:47:30] kgrz: puts timeout_exception is the valid call. No single quotes around the variable name
[09:48:05] qwer: how to pass all arguments of the method to another method ?
[09:48:53] kgrz: qwer: can you provide an example of what you're trying to achieve? pastebin or gist
[09:48:58] Gasher: has joined #ruby
[09:49:52] Hanmac: qwer: def meth1(*args); meth2(*args); end
[09:52:23] Caerus: interesting
[09:52:26] Ox0dea: qwer: Sounds like you might want to structure your thing so that you can just say `super`.
[09:53:26] qwer: actually i just want to modify existing initialize() of external class
[09:54:00] qwer: to modify one attribute when initialize() is finished
[09:54:16] Caerus: so the only way to make args non mutable is to define them as Constants? or is it common practice that you you want args not to be mutated you code so that they don't get tampered with
[09:54:36] Caerus: *if you don't want*
[09:54:37] Ox0dea: qwer: Then you probably want Module#prepend... and `super`. :P
[09:54:53] CoderPuppy: has joined #ruby
[09:56:20] Hanmac: qwer & Ox0dea i would probably do something like that: class X; prepend Module.new { def initialize(*); super; "your code there"; end }; end
[09:56:41] Ox0dea: hanmac: Thank you for letting me know you would do what I would do.
[09:57:58] goodroot: has joined #ruby
[09:58:11] Hanmac: ;p in one of my systems i had a function that did the "prepend Module.new" inside a function so you can do: class X; overwrite { ... }; end
[09:58:24] marens: has joined #ruby
[09:59:00] Ox0dea: qwer: https://eval.in/567829
[09:59:24] RegulationD: has joined #ruby
[09:59:49] Ox0dea: Don't actually do that #dup to "stack" prependitures, though.
[09:59:51] qwer: hanmac, Ox0dea, thank you
[09:59:57] Ox0dea: No worries.
[10:00:03] qwer: the recipe works
[10:00:35] Ox0dea: Ruby loves you and wants you to be happy.
[10:01:37] joconcepts: has joined #ruby
[10:02:46] mikecmpbll: "Ruby MRI does not release memory back to the OS." http://stackoverflow.com/a/27663380/1520714 — is that the case?
[10:03:24] yorickpeterse: mikecmpbll: pretty much, it however does re-use memory
[10:03:43] last_staff: has joined #ruby
[10:03:49] mikecmpbll: hmpf. my delayed-jobs can use a heck of a lot of memory, some of the time
[10:03:51] yorickpeterse: basically it allocates chunks of memory for objects. Whenever the objects are GC'd the memory is IIRC not released back to the OS but kept around, instead being re-used for any future objects
[10:04:18] mikecmpbll: and i run workers in separate processes, so other processes aren't able to access that memory i guess.
[10:05:01] mikecmpbll: ACTION upgrades his server :D
[10:05:03] emiltin: has joined #ruby
[10:05:44] Hanmac: qwer & Ox0dea: i would do it like that: https://eval.in/567830
[10:05:45] ujjain: https://gist.github.com/ujjain/29324d4e533e8025bebd34aa10770ba8 - Can I use ruby with the double quotes like this? log.error "#{timeout_exception}"
[10:06:00] Ox0dea: ?try ujjain
[10:06:00] ruby[bot]: ujjain: Why don't you try it and see for yourself?
[10:06:14] ujjain: oh of course
[10:06:48] yorickpeterse: mikecmpbll: I think the only solution here is to fix your code so it doesn't use as much memory
[10:07:10] ujjain: thanks, works fine
[10:07:23] blackmes1: has joined #ruby
[10:08:22] mikecmpbll: yorickpeterse : yeah. that would be a nice option. i'm not sure i can, though. it's rendering a PDF
[10:08:47] noService: has joined #ruby
[10:08:53] noService: has joined #ruby
[10:09:39] mikecmpbll: oh actually, i can probably render directly to a file instead of memory :D
[10:09:53] zerOnepal: has joined #ruby
[10:10:53] zerOnepal: has left #ruby: ()
[10:12:40] bronson: has joined #ruby
[10:12:52] blaxter: has joined #ruby
[10:16:31] Caerus: >> def mymethod(x); x +=1 end; y=1; puts mymethod(y); puts y
[10:16:32] ruby[bot]: Caerus: # => 2 ...check link for more (https://eval.in/567844)
[10:17:55] Caerus: >> z = [1,2]; z.each { |x| x += 1; puts x} ; puts z
[10:17:56] ruby[bot]: Caerus: # => 2 ...check link for more (https://eval.in/567851)
[10:18:26] b|ackwolf: has joined #ruby
[10:18:55] Caerus: is there a way to mutate arguments passed to methods or blocks?
[10:19:09] Caerus: ACTION searches
[10:21:00] yorickpeterse: Caerus: what do you mean with mutate?
[10:21:20] ravishankarjha: has joined #ruby
[10:21:21] Caerus: pass by value
[10:21:53] finnnnnnnnnnn_: has joined #ruby
[10:22:17] chouhoulis: has joined #ruby
[10:22:24] yorickpeterse: Caerus: the values passed as arguments are always references
[10:22:49] yorickpeterse: You can't do pure pass by value in Ruby
[10:23:16] Ox0dea: Caerus: Just use a method that mutates the receiver.
[10:23:26] blaxter: has joined #ruby
[10:25:33] Caerus: >> def mymethod(x); x +=1 end; y=1; y = mymethod(y); puts y
[10:25:33] Ox0dea: >> a = %w[foo bar]; a.map! &:upcase; a
[10:25:34] ruby[bot]: Caerus: # => 2 ...check link for more (https://eval.in/567863)
[10:25:36] ruby[bot]: Ox0dea: # => ["FOO", "BAR"] (https://eval.in/567864)
[10:25:44] Caerus: that actually works lol
[10:28:05] yorickpeterse: Caerus: but probably not because of how you expect it to work
[10:28:20] yorickpeterse: x += 1 in "mymethod" does a re-assign of "x" local to the method's body
[10:28:26] yorickpeterse: the result of this is then returned
[10:28:43] yorickpeterse: so the outer "y" is not modified because of what mymethod re-assigns, but because of what it returns and due to the outer re-assign of "y"
[10:28:59] yorickpeterse: >> def mymethod(x); x +=1 end; y=1; mymethod(y); puts y
[10:29:00] ruby[bot]: yorickpeterse: # => 1 ...check link for more (https://eval.in/567874)
[10:29:24] Caerus: yeah the method didn't modify the actual argument.
[10:30:51] Caerus: I had read about bang methods I was just wondering if could make a module with some function that modified args
[10:31:12] edavis_: has joined #ruby
[10:31:26] Caerus: in a.map! I'm actually passing a an argument?
[10:31:30] Ox0dea: You can, if those args are mutable.
[10:31:49] Ox0dea: You're passing a block, which is pretty much an argument, but the interpreter itself disagrees.
[10:32:27] Ox0dea: >> def foo arg1, &arg2; end; method(:foo).arity
[10:32:28] ruby[bot]: Ox0dea: # => 1 (https://eval.in/567878)
[10:32:28] platzhirsch: IRC in the terminal, that's... new
[10:32:36] Ox0dea: It... shouldn't be?
[10:33:15] drewo: has joined #ruby
[10:36:56] iszak: I only use IRC in the terminal in irssi
[10:37:40] soc42: has joined #ruby
[10:37:49] millerti: has joined #ruby
[10:38:05] Ox0dea: That's a weird way to spell WeeChat.
[10:38:29] Caerus: Ox0dea, interesting, so it's either arg1 or &arg2 the later being the mutable one?
[10:38:39] Ox0dea: Caerus: No, &arg2 is a block parameter.
[10:39:07] Ox0dea: Caerus: Array, Hash, and String are mutable.
[10:39:21] Caerus: oh, proc, I missed it
[10:40:15] Caerus: gotcha, thanks.
[10:40:34] Ox0dea: Most anything but Fixnums and Symbols can be mutated in-place, but you have to get your hands dirty for certain things.
[10:43:04] Caerus: getting dirty sometimes help with learning, I'm sure it's sane for ruby to behave like that but digging up sometimes makes learning more solid
[10:43:17] Caerus: provided that you don't go down the rabbit hole xD
[10:44:00] Ox0dea: Caerus: https://eval.in/567888
[10:44:00] sepp2k: has joined #ruby
[10:44:17] Ox0dea: (Check 'em.)
[10:44:47] Ox0dea: Anyway, those classes also have a #replace method, so you can swap them out for new instances entirely.
[10:45:19] Caerus: cool, I'm on it
[10:49:15] stannard: has joined #ruby
[10:50:09] DanyC: has joined #ruby
[10:50:26] CausaMortis: has joined #ruby
[10:51:12] ujjain: is this valid ruby? https://gist.github.com/ujjain/79ba87a2caa7485ce9fb4de223986f5f
[10:52:31] skade: has joined #ruby
[10:58:01] |ifei5good: has joined #ruby
[10:58:42] GodFather: has joined #ruby
[11:01:09] Luna_Moonfang: has joined #ruby
[11:01:42] jaguarmagenta: has joined #ruby
[11:03:59] apeiros: Ox0dea: will take a look after lunch break
[11:04:55] d0lph1n98: has joined #ruby
[11:05:27] umdstu: has joined #ruby
[11:06:53] apeiros: RB_ENCODING_GET looks fancy
[11:06:58] apeiros: errr, ENCODING_GET
[11:08:21] brunto: has joined #ruby
[11:08:54] karapetyan: has joined #ruby
[11:10:55] inukshuk_: has joined #ruby
[11:11:00] chipotle: has joined #ruby
[11:13:27] rodfersou: has joined #ruby
[11:17:40] Caerus: ACTION yawnz*
[11:18:01] Yiota: has joined #ruby
[11:19:15] Caerus: don't know how I substituted call-by-reference with its opposite call-by-value, that's so destructive
[11:19:59] Caerus: also my cue that I should stop reading and go to bed, see ya later #ruby thank you all for the help :)
[11:24:24] johnmilton: has joined #ruby
[11:26:18] deadnull_: has joined #ruby
[11:27:28] drewo: has joined #ruby
[11:30:29] rickmasta: has joined #ruby
[11:30:53] stannard: has joined #ruby
[11:31:54] r_rios: has joined #ruby
[11:31:55] r_rios: has joined #ruby
[11:32:49] chouhoulis: has joined #ruby
[11:33:18] tatsuo: has joined #ruby
[11:33:21] jespada: has joined #ruby
[11:34:02] grs: has joined #ruby
[11:37:44] roshanavand: has joined #ruby
[11:41:22] nobitanobi: has joined #ruby
[11:41:41] idefine: has joined #ruby
[11:46:21] finnnnnnnnnnn: has joined #ruby
[11:47:02] apeiros: Ox0dea: seems like you hit that when the two strings have a different encoding which is not considered to be comparable, and then it's the index of the encoding which decides <=> (which makes little to no sense to me - but that's how I read it)
[11:47:49] apeiros: can't test since rb_str_comparable is not accessible from ruby and I don't feel like writing native code just for this :)
[11:49:31] ferr: has joined #ruby
[11:49:53] gnufied: has joined #ruby
[11:51:01] blackmes1: has joined #ruby
[11:51:16] zacstewart: has joined #ruby
[11:51:59] Ox0dea: apeiros: Right, it was that <=> which struck me as perfectly nonsensical.
[11:52:06] Ox0dea: Feels very "PHP". :/
[11:54:14] drptbl_: has joined #ruby
[11:56:36] apeiros: yeah. comparing encodings instead of strings in case of incompatible encodings makes no sense IMO
[11:56:40] apeiros: should just return nil
[11:57:01] apeiros: like any other incomparables
[11:57:13] noServic1: has joined #ruby
[11:58:11] Madmanden: has joined #ruby
[11:58:35] synthroid: has joined #ruby
[12:00:13] RegulationD: has joined #ruby
[12:00:18] jdawgaz: has joined #ruby
[12:00:46] shevy: we must use one true encoding
[12:00:58] apeiros: there is no one true encoding
[12:01:15] apeiros: utf-8, which you love so much, comes somewhat close to it, though.
[12:02:25] Arahael: or just compare bytes!
[12:02:47] Arahael: might not be lexographical order though.
[12:03:17] Hanmac: has joined #ruby
[12:04:54] ldnunes: has joined #ruby
[12:04:58] mikecmpb_: has joined #ruby
[12:05:02] Madmanden: has joined #ruby
[12:05:25] xpt: has left #ruby: ("WeeChat 1.4")
[12:06:00] d0lph1n98: has joined #ruby
[12:06:52] banister: has joined #ruby
[12:07:57] apeiros: Ox0dea, arahael: oooh, actually it *does* compare the bytes
[12:07:59] GinoManWorks: has joined #ruby
[12:08:09] apeiros: it only resorts to the encodings once they're the same
[12:11:09] kdisneur: has joined #ruby
[12:13:08] terlar: has joined #ruby
[12:13:36] norc-2: has joined #ruby
[12:14:16] stannard: has joined #ruby
[12:14:30] bronson: has joined #ruby
[12:14:44] crameth: has joined #ruby
[12:16:23] Madmanden: has joined #ruby
[12:18:52] sdothum: has joined #ruby
[12:19:11] dionysus69: has joined #ruby
[12:19:16] karapetyan: has joined #ruby
[12:20:28] rbennacer: has joined #ruby
[12:20:45] nerium: has joined #ruby
[12:21:17] nchambers: has joined #ruby
[12:21:34] drewo: has joined #ruby
[12:21:48] kkeuning: has joined #ruby
[12:23:20] zenspider: has joined #ruby
[12:23:30] iamvery: has joined #ruby
[12:24:00] sarbs: has joined #ruby
[12:25:02] pLaTo0n: has joined #ruby
[12:25:30] chouhoulis: has joined #ruby
[12:25:52] jancel: has joined #ruby
[12:25:54] hays: has joined #ruby
[12:28:40] zast: has joined #ruby
[12:29:17] giz|work: has joined #ruby
[12:29:54] |2701: has joined #ruby
[12:32:16] terlar: has joined #ruby
[12:32:47] hays: has joined #ruby
[12:33:30] evidex: has joined #ruby
[12:35:51] tesuji_: has joined #ruby
[12:36:09] araujo_: has joined #ruby
[12:36:23] wldcordeiro: has joined #ruby
[12:36:25] dANOKELOFF: has joined #ruby
[12:36:51] stannard: has joined #ruby
[12:36:56] davedev24: has joined #ruby
[12:37:39] Symbiosisz: has joined #ruby
[12:40:56] skalfyfan: has joined #ruby
[12:40:59] budhram: has joined #ruby
[12:41:38] rubyaw: has joined #ruby
[12:42:15] budhram: hello folks, I have heard that it is not recommended to checkin Gemfile.lock while building Ruby Gem. I have searched for its reason but couldn't get the perfect answer. Could anybody help me to understand its valid point of not checkin Gemfile.lock?
[12:42:24] jdawgaz: has joined #ruby
[12:43:57] blackmes1: has joined #ruby
[12:44:26] hays_: has joined #ruby
[12:44:36] cpup: has joined #ruby
[12:46:49] stardiviner: has joined #ruby
[12:47:49] skalfyfan: has joined #ruby
[12:47:54] apeiros: budhram: I don't use Gemfile's at all when building gems. but when I have a Gemfile, I think it makes the most sense to check-in the Gemfile.lock too
[12:49:46] budhram: apeiros, thanks for response. Would like to see what opinion other have
[12:50:08] kareeoleez: has joined #ruby
[12:51:21] finnnnnnnnnnn: has joined #ruby
[12:52:11] ifsp: has joined #ruby
[12:55:17] norc-2: apeiros: I prefer to keep that to myself. Why should other people avoid the pain I had to go through, figuring out which Oracle dependencies are broken.
[12:55:19] skalfyfan: has joined #ruby
[12:55:38] norc-2: Knowing that they are suffering just as much as I was is what gets me through the day.
[12:55:45] apeiros: shared pain is half the pain?
[12:56:02] apeiros: Ox0dea: so you side with commander data on this? :)
[12:56:33] Ox0dea: apeiros: Pain is the greatest teacher, and we must always be ready to realize we're in Her classroom at all times.
[12:57:36] Ox0dea: Er, I didn't mean to equate Pain with God there, but maybe that's a thing?
[12:57:50] norc-2: apeiros: Plus if being an asshole dictator is fine for having led the most widely used C library, then surely that sort of behaviour can't be bad for me.
[12:58:46] ramortegui: has joined #ruby
[12:58:49] brunto: has joined #ruby
[12:58:52] Ox0dea: Assholes that GSD are absolved of all their sins.
[12:59:15] norc-2: get shit done
[12:59:16] Ox0dea: I learned that from Ayn Rand, so take it as gospel.
[12:59:55] apeiros: I'd disagree. but I have no intention of arguing my point :)
[12:59:57] mikecmpb_: Penthos the greek god of mourning and lamentation :'(
[13:00:07] norc-2: Ox0dea: You see, and I cannot get shit done with the current state of my surroundings.
[13:00:13] norc-2: Do you know understand my pain?
[13:00:24] Ox0dea: norc__: Do you know how to start a fire?
[13:00:36] norc-2: Ox0dea: We had this crash course in the military once.
[13:01:10] Ox0dea: norc__: I swear I meant it in the figurative sense.
[13:02:32] jaguarmagenta: has joined #ruby
[13:02:45] millerti: has joined #ruby
[13:05:42] pawnbox: has joined #ruby
[13:06:36] GodFather: has joined #ruby
[13:06:48] lxsameer: has joined #ruby
[13:07:22] roamingdog: has joined #ruby
[13:08:38] Ouchy: has joined #ruby
[13:09:59] tvw: has joined #ruby
[13:10:49] blandflakes: has joined #ruby
[13:11:37] skalfyfan: has joined #ruby
[13:12:16] fmcgeough: has joined #ruby
[13:13:08] aguynamedben: has joined #ruby
[13:13:10] nadir: has joined #ruby
[13:15:39] drewo: has joined #ruby
[13:18:28] stannard: has joined #ruby
[13:20:41] pawnbox: has joined #ruby
[13:20:46] malconis: has joined #ruby
[13:21:24] duoi: has joined #ruby
[13:21:48] jaruga___: has joined #ruby
[13:22:12] aegis3121: has joined #ruby
[13:22:51] pawnbox: has joined #ruby
[13:23:08] jgt: has joined #ruby
[13:24:00] robh71: has joined #ruby
[13:24:23] nobitanobi: has joined #ruby
[13:24:44] karmatr0n: has joined #ruby
[13:27:15] gooodroot: has joined #ruby
[13:27:59] malconis: has joined #ruby
[13:32:34] noService: has joined #ruby
[13:34:14] weemsledeux: has joined #ruby
[13:34:29] Bish: can somebody tell me, how to automaticially break new pages with squid and prawn ( pdf creation )
[13:34:46] Bish: if was about to do 3000.times do text "text" end, it would break to a new page, when the end of the current is reached
[13:34:56] Bish: if i do that with squid graphs, it simply writes over it
[13:35:02] Bish: like in dead space
[13:35:23] stannard: has joined #ruby
[13:35:45] karapetyan: has joined #ruby
[13:38:12] jdawgaz: has joined #ruby
[13:38:56] duoi: has joined #ruby
[13:40:00] kies: has joined #ruby
[13:40:50] pandaant: has joined #ruby
[13:41:30] zacstewart: has joined #ruby
[13:43:41] jobewan: has joined #ruby
[13:43:42] jancel: has joined #ruby
[13:43:52] idefine: has joined #ruby
[13:43:53] `tim`: has joined #ruby
[13:44:12] karapetyan: has joined #ruby
[13:44:56] malconis: has joined #ruby
[13:45:09] douglascorrea: has joined #ruby
[13:46:00] tpendragon: has joined #ruby
[13:46:37] aguynamedben: has joined #ruby
[13:46:46] platzhirsch: has joined #ruby
[13:47:40] blackjid: has joined #ruby
[13:49:11] anisha: has joined #ruby
[13:50:53] CloCkWeRX: has joined #ruby
[13:52:21] pawnbox: has joined #ruby
[13:55:29] rbennacer: has joined #ruby
[13:55:57] nobitano_: has joined #ruby
[13:56:14] rbennacer: has joined #ruby
[13:56:17] finnnnnnnnnnn_: has joined #ruby
[13:59:02] djcp: has joined #ruby
[13:59:21] nobitanobi: has joined #ruby
[14:00:57] RegulationD: has joined #ruby
[14:00:59] ahai: has joined #ruby
[14:01:09] Mon_Ouie: has joined #ruby
[14:01:56] blandflakes: has joined #ruby
[14:02:21] nobitano_: has joined #ruby
[14:02:58] quakephil: has joined #ruby
[14:03:31] quakephil: is there a way to load a sqlite3 in ruby using a different schema name? essentially something like 'attach blah.sqlite3 as different_schema_name' but in database.yml?
[14:03:33] akkmaxon: has joined #ruby
[14:03:52] apeiros: sqlite3 has schemas? :D
[14:04:30] quakephil: if you issue a create table blah.mycooltable it will work, but you will have to attach db.sqlite3 as blah to be able to access it
[14:04:42] quakephil: so it looks like it has schemas on the command line
[14:05:04] apeiros: I never knew
[14:05:07] apeiros: interesting
[14:05:12] idle_task: has joined #ruby
[14:06:18] quakephil: i'm using it to facilitate rspec tests, whereas production db is a mysql with actual schemas, so I need this functionality in database.yml but I donno how to tell ruby to access the blah schema (gem must be loading it with the default "main" schema and therefore can't find my tables)
[14:06:51] millerti: has joined #ruby
[14:07:00] griffindy: has joined #ruby
[14:07:03] apeiros: given that you're in a rails context, I'd ask over there. but I somewhat doubt that rails can do that via database.yml
[14:07:11] apeiros: if at all, you'll probably have to write an initializer
[14:07:29] sarbs: has joined #ruby
[14:07:33] apeiros: might even be necessary to do it on creation of each db connection
[14:07:38] quakephil: actually i'm not in rails, i'm in grape
[14:07:52] rbennacer: has joined #ruby
[14:07:56] quakephil: wonderful...
[14:08:14] whippythellama: has joined #ruby
[14:08:44] sdwrage: has joined #ruby
[14:09:07] apeiros: IMO you should use the same db for tests anyway
[14:09:25] banister: has joined #ruby
[14:09:42] drewo: has joined #ruby
[14:09:52] quakephil: we use codeship for qa and they can't tunnel to our databases
[14:09:57] eljimbo: has joined #ruby
[14:10:43] apeiros: ok, let me rephrase: same db software
[14:10:52] apeiros: doesn't need to be the very same server
[14:10:52] pickandmix: has joined #ruby
[14:10:57] blackwolf: has joined #ruby
[14:11:00] quakephil: yeah you do have a point there
[14:11:12] quakephil: i just thought sqlite+ruby was mature enough by now
[14:11:26] apeiros: actually I'd even prefer not using the same server for envs != prod as prod. for the other envs, not sure I'd care.
[14:11:43] mostlybadfly: has joined #ruby
[14:11:47] quakephil: obviously our prod is separate server, vpc, etc
[14:12:03] agent_white: has joined #ruby
[14:12:36] quakephil: of course its a problem installing mysql on codeship all the same
[14:14:09] Sdwrage_: has joined #ruby
[14:15:18] cdg: has joined #ruby
[14:15:22] umdstu: anyone know why the git unignore operator (!) would not be working on os x? (2.3.2 apple git-55)
[14:15:26] futilegames: has joined #ruby
[14:16:18] bronson: has joined #ruby
[14:17:59] banister: has joined #ruby
[14:18:17] emilkarl: has joined #ruby
[14:19:07] tatsuo: has joined #ruby
[14:21:10] blackjid: has joined #ruby
[14:21:10] aguynamedben: has joined #ruby
[14:22:36] tpendragon: has joined #ruby
[14:23:08] senayar^: has joined #ruby
[14:25:05] smathy: has joined #ruby
[14:25:31] duoi: has joined #ruby
[14:25:53] kobain: has joined #ruby
[14:29:19] [Butch]: has joined #ruby
[14:29:26] grenierm: has joined #ruby
[14:29:51] jdawgaz: has joined #ruby
[14:33:35] aegis3121: has joined #ruby
[14:33:53] kobain: has joined #ruby
[14:37:14] terminal_: has joined #ruby
[14:38:16] Caerus|Away: has joined #ruby
[14:40:14] TheBrayn: do you have an example?
[14:40:42] grenierm: has joined #ruby
[14:41:14] aufi: has joined #ruby
[14:42:06] banister: has joined #ruby
[14:44:55] finnnnnnnnnnn: has joined #ruby
[14:45:35] Devalo: has joined #ruby
[14:45:59] dopamean_: has joined #ruby
[14:47:27] noService: has joined #ruby
[14:47:52] freerobby: has joined #ruby
[14:49:13] karapetyan: has joined #ruby
[14:49:13] quakephil: So I have a calculated column in my ar model (like this: http://stackoverflow.com/questions/1982778/concat-two-fields-activerecord ) but I'm stumped how to select it.. I tried Myarclass.select('usual,fields', :calculated_field).other().stuff() ... but that just gave me 'calculated_field' as calculated_field instead of what I have in my def.... am I missing something obvious here?
[14:49:45] Mia: has joined #ruby
[14:50:11] SilverKey: has joined #ruby
[14:50:36] duderonomy: has joined #ruby
[14:51:10] quakephil: If I do select('*') its not there either...
[14:52:23] quakephil: fuck it, I'll just have the front end do it
[14:52:45] inukshuk_: has joined #ruby
[14:53:05] polishdub: has joined #ruby
[14:53:29] matp: has joined #ruby
[14:53:33] Kim^J: has left #ruby: ()
[14:54:42] havenwood: quakephil: Show the real code? Might be nice to do it in Ruby! :)
[14:54:52] freerobby: has joined #ruby
[14:55:43] havenwood: quakephil: Just for future reference, there's a #rubyonrails channel specifically for Rails stuff.
[14:56:24] skalfyfan: has joined #ruby
[14:56:53] malconis: has joined #ruby
[14:57:02] apeiros: and AR is considered rails stuff, even when used outside of it, like e.g. in grape ;-)
[14:57:37] havenwood: Active/Action/Turbo/Adequate -> Rails
[14:59:04] rbennacer: has joined #ruby
[14:59:10] hobodave: has joined #ruby
[15:00:25] evidex: has joined #ruby
[15:00:26] Ouchy: Does Ruby install on windows with WAMP well, without rails?
[15:00:40] bruno-: has joined #ruby
[15:01:26] quakephil: havenwood: I'm not using rails, I'm using grape, does that chan still apply?
[15:01:53] quakephil: apeiros: ok gotcha, I'll check there if I'm still stuck...
[15:02:03] havenwood: quakephil: If it's ActiveRecord that's where the most people using AR can be found.
[15:02:18] havenwood: quakephil: There are plenty here as well but it's a component of Rails.
[15:03:07] finisherr: has left #ruby: ()
[15:03:16] jaguarmagenta: has joined #ruby
[15:03:42] grenierm: has joined #ruby
[15:03:52] drewo: has joined #ruby
[15:05:15] akkmaxon: has joined #ruby
[15:06:29] Ch4rAss: has joined #ruby
[15:07:51] dionysus69: has joined #ruby
[15:08:08] blandflakes: has joined #ruby
[15:09:14] tubbo: has joined #ruby
[15:12:31] chouhoulis: has joined #ruby
[15:12:45] qwer: has left #ruby: ()
[15:13:03] rikai: has joined #ruby
[15:13:08] blackmes1: has joined #ruby
[15:15:01] skalfyfan: has joined #ruby
[15:15:11] chopin: has joined #ruby
[15:18:57] rkazak: has joined #ruby
[15:20:00] joneshf-laptop: has joined #ruby
[15:22:30] tvw: has joined #ruby
[15:22:34] bruno-: has joined #ruby
[15:22:49] codecop: has joined #ruby
[15:23:26] Madmanden: has joined #ruby
[15:24:19] failshell: has joined #ruby
[15:25:02] symm-: has joined #ruby
[15:27:50] skalfyfan: has joined #ruby
[15:29:20] hk238: has joined #ruby
[15:29:33] dhollinger: has joined #ruby
[15:29:53] openstruct: has joined #ruby
[15:29:53] araujo: has joined #ruby
[15:29:54] araujo: has joined #ruby
[15:30:41] jds: has joined #ruby
[15:32:34] ramortegui: has joined #ruby
[15:35:14] Yeomra: has joined #ruby
[15:35:38] jhack: has joined #ruby
[15:36:55] ramortegui: has left #ruby: ()
[15:36:57] kgrz: havenwood: that Active/Action... should be a IRC msg shorthand :D
[15:37:13] kgrz: (I don't know what they are called)
[15:37:20] tvw: has joined #ruby
[15:37:42] jgt: has joined #ruby
[15:37:45] bruno-: has joined #ruby
[15:37:59] ekinmur: has joined #ruby
[15:38:10] skalfyfan: has joined #ruby
[15:39:02] Yiota: has joined #ruby
[15:39:08] rippa: has joined #ruby
[15:39:19] blackmes1: has joined #ruby
[15:39:41] nobitanobi: has joined #ruby
[15:40:11] GnuYawk: has joined #ruby
[15:40:17] GnuYawk: has joined #ruby
[15:40:52] jancel: has joined #ruby
[15:42:21] RegulationD: has joined #ruby
[15:44:52] djbkd: has joined #ruby
[15:46:07] ferr: has joined #ruby
[15:46:49] skalfyfan: has joined #ruby
[15:50:16] xxneolithicxx: has joined #ruby
[15:50:50] moeabdol: has joined #ruby
[15:51:08] mtkd: has joined #ruby
[15:52:23] bruno-: has joined #ruby
[15:53:24] whathappens: has joined #ruby
[15:54:19] davedev24: has joined #ruby
[15:55:38] idefine: has joined #ruby
[15:56:21] xall: has joined #ruby
[15:56:28] idefine: has joined #ruby
[15:56:47] idefine: has joined #ruby
[15:57:17] skalfyfan: has joined #ruby
[15:57:54] drewo: has joined #ruby
[15:59:30] robh71: has joined #ruby
[15:59:38] skade: has joined #ruby
[16:01:31] diegoaguilar: has joined #ruby
[16:02:45] akkmaxon: has joined #ruby
[16:03:49] pietr0: has joined #ruby
[16:04:26] amclain: has joined #ruby
[16:04:57] LastWhisper____: has joined #ruby
[16:05:35] rbennacer: has joined #ruby
[16:07:05] idefine: has joined #ruby
[16:07:19] kareeoleez: has joined #ruby
[16:08:13] karapetyan: has joined #ruby
[16:09:45] wldcordeiro: has joined #ruby
[16:10:12] akkmaxon: has joined #ruby
[16:10:43] karapety_: has joined #ruby
[16:12:14] bruno-: has joined #ruby
[16:12:24] skolman_: has joined #ruby
[16:13:49] skalfyfan: has joined #ruby
[16:15:09] benlieb: has joined #ruby
[16:15:10] stannard: has joined #ruby
[16:15:38] skalfyfan: has joined #ruby
[16:18:05] bronson: has joined #ruby
[16:18:39] danostrowski: has joined #ruby
[16:18:57] nando293921: has joined #ruby
[16:19:19] noService: has joined #ruby
[16:20:07] nrd_pxs: has joined #ruby
[16:21:47] __swanson: has joined #ruby
[16:22:12] millerti: has joined #ruby
[16:22:59] chouhoulis: has joined #ruby
[16:23:08] __swanson: I'm trying to upgrade a project from ruby 2.2 -> 2.3.1 and seeing strange behavior with the CSV library in 2.3.1. Am I missing something obvious? Checked bug tracker and release notes and didn't see anything about CSV issues: https://gist.github.com/swanson/7d551c3e479ab46871bac1bf7070048c
[16:23:29] __swanson: CSV loads fine in 2.2, but gives undefined constant in 2.3.1
[16:23:42] __swanson: rubies installed via rbenv on osx
[16:23:49] rubyaw: has joined #ruby
[16:24:09] kgrz: has joined #ruby
[16:24:57] troulouliou_div2: has joined #ruby
[16:25:11] RegulationD: has joined #ruby
[16:25:57] ngscheurich: has joined #ruby
[16:26:29] kareeoleez: has joined #ruby
[16:26:37] havenwood: >> require 'csv'; CSV
[16:26:39] ruby[bot]: havenwood: # => CSV (https://eval.in/568167)
[16:27:24] Hanmac: __swanson: maybe something else does prevent the csv from loading? what does "require 'csv'; $LOADED_FEATURES.last" return?
[16:27:38] havenwood: __swanson: Can you require anything else in the stdlib? If we keep telling people to tweet @DHH for rbenv support will they deprecate in favor of chruby? :P
[16:27:56] whathappens: has joined #ruby
[16:28:03] __swanson: irb(main):002:0> require 'csv'; $LOADED_FEATURES.last => "/Users/matt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/csv.rb"
[16:28:06] havenwood: __swanson: What does just `require 'csv'` return? Just?: true
[16:28:20] havenwood: (Or `false` once you've already run it.)
[16:28:33] __swanson: it returns true on first call, false on subsequent calls
[16:28:51] havenwood: __swanson: So the require is happening. You're $LOADED_FEATURES show it there.
[16:28:59] benlieb: has joined #ruby
[16:29:18] havenwood: >> 'CSV'.bytes
[16:29:20] ruby[bot]: havenwood: # => [67, 83, 86] (https://eval.in/568168)
[16:29:34] __swanson: I tried to require base64 (random othe stdlib) and it works fine
[16:29:34] havenwood: __swanson: Is your "CSV" a real C, S and V?
[16:29:36] Hanmac: __swanson: ĥm can you checkup if that csv.rb does has this CSV class?
[16:30:17] __swanson: 'CSV'.bytes => [67, 83, 86] -- appears to be
[16:30:35] grs: has joined #ruby
[16:30:54] __swanson: opening csv.rb in a text editor looks like it is binary? does that seem right?
[16:31:28] havenwood: __swanson: No.
[16:31:34] Hanmac: oO no it shouldnt be oO
[16:31:38] __swanson: perhaps I should reinstall
[16:32:20] mikecmpbll: has joined #ruby
[16:32:26] skolman_: has joined #ruby
[16:32:40] havenwood: __swanson: If rbenv's ruby-build keep borking consider using ruby-install instead. It can install for rbenv.
[16:32:49] akkmaxon: has joined #ruby
[16:32:54] __swanson: thanks, I will keep that in mind
[16:32:57] havenwood: __swanson: But yeah, that's messed up.
[16:33:06] havenwood: File.read($LOADED_FEATURES.last)[/class CSV/] #=> "class CSV"
[16:34:03] hobodave_: has joined #ruby
[16:34:05] skolman: has joined #ruby
[16:34:07] havenwood: https://github.com/postmodern/ruby-install#integration
[16:34:19] shinnya: has joined #ruby
[16:34:58] hobodave_: has joined #ruby
[16:35:06] __swanson: I don't suppose there is a diagnostic or checksum to verify the install, is there?
[16:36:10] whathappens: has joined #ruby
[16:36:16] Asher: has joined #ruby
[16:36:35] havenwood: __swanson: Well, ruby-install will check MD5, SHA1, SHA256 and SHA512 checksums of the Rubies it downloads. You can make test and such to confirm that things check out.
[16:37:36] azor: has joined #ruby
[16:37:49] Eiam: has joined #ruby
[16:38:20] havenwood: __swanson: make test-all TESTS=-v
[16:38:30] Yiota: has joined #ruby
[16:38:31] __swanson: from which directory?
[16:38:31] QORRiE: has joined #ruby
[16:38:39] havenwood: __swanson: src root dir
[16:38:55] __swanson: thanks, reinstalling almost finished -- will try it out
[16:38:59] havenwood: __swanson: make test-all TESTS=csv/test_csv.rb
[16:39:08] finnnnnnnnnnn_: has joined #ruby
[16:39:47] __swanson: reinstall + running the irb snippet above is working now
[16:39:53] babblebre: has joined #ruby
[16:39:56] __swanson: appreciate the help debugging, thanks!
[16:40:05] DanyC: has joined #ruby
[16:40:09] havenwood: __swanson: de nada
[16:41:06] Zarthus: has joined #ruby
[16:41:12] sarbs: has joined #ruby
[16:41:30] akkmaxon: has joined #ruby
[16:42:38] The_Phoenix: has joined #ruby
[16:43:27] ctp: has joined #ruby
[16:44:43] blackmes1: has joined #ruby
[16:45:39] Zarthus: has joined #ruby
[16:45:45] Asher: has joined #ruby
[16:46:10] akkmaxon: has joined #ruby
[16:47:12] Dimik: has joined #ruby
[16:47:17] Guest2: has joined #ruby
[16:49:31] goooodroot: has joined #ruby
[16:50:06] middaywalker: has joined #ruby
[16:50:20] Cohedrin: has joined #ruby
[16:50:32] millerti: has joined #ruby
[16:51:41] moeabdol: has joined #ruby
[16:52:17] drewo: has joined #ruby
[16:54:28] whathappens: has joined #ruby
[16:54:38] ctp: has joined #ruby
[16:55:35] blackmes1: has joined #ruby
[16:55:52] whathapp_: has joined #ruby
[16:57:27] bruno-: has joined #ruby
[16:59:41] laska: has joined #ruby
[17:01:54] jancel: has joined #ruby
[17:03:08] kareeoleez: has joined #ruby
[17:04:03] jaguarmagenta: has joined #ruby
[17:04:55] alexherbo2: has joined #ruby
[17:05:59] edwinvdgraaf: has joined #ruby
[17:06:00] A124: has joined #ruby
[17:06:45] flashpoint9: has joined #ruby
[17:06:45] giz|work: has joined #ruby
[17:07:45] cdg: has joined #ruby
[17:09:04] justin_pdx: has joined #ruby
[17:11:08] pglombardo: has joined #ruby
[17:11:29] whathappens: has joined #ruby
[17:11:42] VeryBewitching: has joined #ruby
[17:12:35] skalfyfan: has joined #ruby
[17:13:17] bruno-: has joined #ruby
[17:13:35] idefine_: has joined #ruby
[17:14:23] benlieb: has joined #ruby
[17:14:31] idefine: has joined #ruby
[17:16:01] whathappens: has joined #ruby
[17:16:17] CustosLimen: I want to use a tuple like thing in a Range()
[17:16:20] CustosLimen: and I'm not sure how
[17:17:09] nobitano_: has joined #ruby
[17:17:10] Ch4rAss: has joined #ruby
[17:17:21] jhack: has joined #ruby
[17:17:33] CustosLimen: arrays cannot be compared with '<=>'
[17:18:53] last_staff: has joined #ruby
[17:19:00] lomex: has joined #ruby
[17:19:10] whathappens: has joined #ruby
[17:19:34] Ox0dea: CustosLimen: Sure they can, but they can't be iterated.
[17:19:45] Ox0dea: Which makes perfect sense, really; what's the next Array after [1,2,3]?
[17:20:14] skade: has joined #ruby
[17:20:38] dhollinger: has joined #ruby
[17:21:14] kareeoleez: has joined #ruby
[17:23:36] davedev24: has joined #ruby
[17:25:43] minot: has joined #ruby
[17:26:30] Ox0dea: CustosLimen: To elaborate, a thing needs #<=> *and* #succ in order to participate in Ranges, and Array doesn't (can't?) have the latter.
[17:26:44] CustosLimen: yeah ok, I'm doing something else wrong
[17:26:51] chouhoulis: has joined #ruby
[17:26:55] CustosLimen: trying to figure out what
[17:27:04] chouhoulis: has joined #ruby
[17:27:42] chouhoulis: has joined #ruby
[17:27:42] freerobby: has joined #ruby
[17:28:11] stannard: has joined #ruby
[17:28:17] Devalo: has joined #ruby
[17:28:37] stannard: has joined #ruby
[17:29:59] CustosLimen: is there like some concept in ruby for a stirng smalle than any other string
[17:30:07] CustosLimen: that will always compare less than any string ?
[17:30:52] apeiros: CustosLimen: https://github.com/apeiros/sorting/blob/master/lib/sorting/smaller.rb
[17:31:50] CustosLimen: thanks apeiros
[17:34:00] Ox0dea: >> def (min_string = '').<=> other; -1; end; min_string < '' # CustosLimen
[17:34:01] ruby[bot]: Ox0dea: # => true (https://eval.in/568212)
[17:34:08] SilverKey: has joined #ruby
[17:34:30] drewo: has joined #ruby
[17:34:58] Ox0dea: In case you need it to actually behave like a String in some other context.
[17:35:11] ramfjord: has joined #ruby
[17:35:12] skade: has joined #ruby
[17:37:34] apeiros: Ox0dea: do you happen to have an idea why I added #to_str to my Sorting::Smaller?
[17:37:40] lxsameer: has joined #ruby
[17:39:37] kareeoleez: has joined #ruby
[17:40:36] kgrz: has joined #ruby
[17:40:46] CustosLimen: >> Range.new( [ nil, nil ], [ "", "" ] )
[17:40:47] ruby[bot]: CustosLimen: # => bad value for range (ArgumentError) ...check link for more (https://eval.in/568213)
[17:40:51] RegulationD: has joined #ruby
[17:40:57] Ox0dea: CustosLimen: Array does not have #succ.
[17:41:10] Ox0dea: apeiros: Interpolation is the only thing that comes to mind, but it's pretty irrelevant. :/
[17:41:19] CustosLimen: >> Range.new( [ "a", "a" ], [ "b", "b" ] )
[17:41:20] ruby[bot]: CustosLimen: # => ["a", "a"]..["b", "b"] (https://eval.in/568214)
[17:41:30] apeiros: I bet it was rails related :-/
[17:41:34] Ox0dea: Ah, or that.
[17:42:06] Ox0dea: >> [nil] <=> [''] # Yikes.
[17:42:07] ruby[bot]: Ox0dea: # => nil (https://eval.in/568215)
[17:42:24] kareeoleez: has joined #ruby
[17:42:25] Ox0dea: Array#<=> usually does element-wise comparison; the hell's going on here?
[17:43:03] Mon_Ouie: is also nil, because you can't compare nil with a string
[17:43:51] Ox0dea: Right, duh. Forgot that wasn't an error.
[17:44:56] wrkrcoop: has joined #ruby
[17:45:28] wrkrcoop: when i try to install jruby using rvm, i get this error: ‘'command gem pristine --version ' failed, you need to fix this gems manually.’
[17:45:33] CustosLimen: ok, so lets say I load json with JSON.parse - is there easy way I can traverse the whole structure/tree (recursively) and replace all occurences of '{ "$minKey" : 1 }' with Sorting::Smaller ?
[17:45:43] wrkrcoop: my thought is ‘just install pristine’ … is that logical?
[17:47:16] malconis: has joined #ruby
[17:47:40] tvw: has joined #ruby
[17:48:04] malconis: has joined #ruby
[17:48:16] wrkrcoop: maybe its because i dont have jdk installed
[17:49:05] kareeoleez: has joined #ruby
[17:49:54] troulouliou_div2: has joined #ruby
[17:50:23] chouhoulis: has joined #ruby
[17:50:57] elifoster: has joined #ruby
[17:52:22] bruno-: has joined #ruby
[17:52:59] diegoviola: has joined #ruby
[17:53:11] skolman_: has joined #ruby
[17:55:44] mtkd: has joined #ruby
[17:56:50] kareeoleez: has joined #ruby
[17:56:53] Puffball: has joined #ruby
[17:56:56] roger_rabbit: has joined #ruby
[17:58:38] havenwood: wrkrcoop: What version of JRuby are you installing?
[17:58:49] wrkrcoop: havenwood: just installed jruby 1.7.19
[17:58:59] wrkrcoop: should i now install jruby 9000?
[17:59:07] havenwood: wrkrcoop: Yeah, use 9.1.0.0
[17:59:12] havenwood: wrkrcoop: rvm get head
[17:59:24] wrkrcoop: havenwood: company is using 9000
[17:59:37] blackmes1: has joined #ruby
[17:59:48] havenwood: wrkrcoop: The latest 1.7 is 1.7.25 but 9.1 is better yet!
[17:59:54] terminalrecluse: has joined #ruby
[18:00:54] wrkrcoop: havenwood: just to clarify, jruby 9000 is the interpreter or virtual machine, and 1.7 is the language version?
[18:01:25] aegis3121: has joined #ruby
[18:01:49] Madmanden: has joined #ruby
[18:02:14] nankyokusei: has joined #ruby
[18:02:49] giz|work: has joined #ruby
[18:04:43] SilverKey: has joined #ruby
[18:06:48] YP-QMUL-W: has joined #ruby
[18:06:57] Fernando-Basso: has joined #ruby
[18:09:12] kgrz: has joined #ruby
[18:12:45] MissionCritical: has joined #ruby
[18:13:01] |2701: has joined #ruby
[18:14:47] dhollinger: has joined #ruby
[18:16:13] xaxisx: has joined #ruby
[18:17:03] davedev24: has joined #ruby
[18:19:46] RegulationD: has joined #ruby
[18:20:08] wrkrcoop: has joined #ruby
[18:20:23] jancel: has joined #ruby
[18:21:52] havenwood: wrkrcoop: Those are both the `RUBY_ENGINE_VERSION`.
[18:22:36] Denart_: has joined #ruby
[18:22:38] havenwood: wrkrcoop: For example on 9.1.0.0: [RUBY_ENGINE_VERSION, RUBY_VERSION] #=> ["9.1.0.0", "2.3.0"]
[18:22:47] havenwood: >> [RUBY_ENGINE_VERSION, RUBY_VERSION]
[18:22:48] ruby[bot]: havenwood: # => ["2.3.0", "2.3.0"] (https://eval.in/568222)
[18:22:58] wrkrcoop: havenwood: so there’s no difference between 1.7.19 & 9000?
[18:24:00] havenwood: wrkrcoop: On 1.7.25: [RUBY_ENGINE_VERSION, RUBY_VERSION] #=> ["1.7.25", "1.9.3"]
[18:25:11] havenwood: wrkrcoop: 1.7.19 engine version is 1.9.3 ruby version as well
[18:25:58] wrkrcoop: havenwood: so both 1.7.19 and 9000 are callled engine versions?
[18:26:47] havenwood: wrkrcoop: Yes, RUBY_ENGINE_VERSION corresponds to the RUBY_ENGINE.
[18:26:59] havenwood: wrkrcoop: Those are both the RUBY_ENGINE_VERSION.
[18:27:06] havenwood: wrkrcoop: [RUBY_ENGINE, RUBY_ENGINE_VERSION] #=> ["jruby", "9.1.0.0"]
[18:27:22] wrkrcoop: so they’re both engines, but they are not the same engine …
[18:27:34] arpegius: has joined #ruby
[18:28:05] arpegius: Hash[phone_numbers.map{ |f| [f.id,{value:f.value,title:f.title,is_primary:f.is_primary}]}] can I define that object schema a little more susinctly somehow?
[18:29:46] grenierm: has joined #ruby
[18:30:32] nadav: has joined #ruby
[18:30:48] dvinciguerra: has joined #ruby
[18:31:29] benlieb: has joined #ruby
[18:32:05] jwren: has joined #ruby
[18:32:16] rkazak: has joined #ruby
[18:32:31] blackmes1: has joined #ruby
[18:32:39] nerium: has joined #ruby
[18:36:24] malconis: has joined #ruby
[18:39:04] spider-mario: has joined #ruby
[18:39:21] bluOxigen: has joined #ruby
[18:39:49] kkeuning: has joined #ruby
[18:41:03] deadhound: has joined #ruby
[18:41:35] freerobby: has joined #ruby
[18:41:51] middaywalker: has joined #ruby
[18:42:05] |2701: has joined #ruby
[18:44:29] Contigi: has joined #ruby
[18:44:48] Nahra: has joined #ruby
[18:44:52] Emmanuel_Chanel: has joined #ruby
[18:45:58] malconis: has joined #ruby
[18:46:58] freerobby: has joined #ruby
[18:48:15] symm-: has joined #ruby
[18:51:17] Amnez777: has joined #ruby
[18:52:00] UKn0Me: has joined #ruby
[18:52:07] dionysus69: has joined #ruby
[18:55:32] zacstewart: has joined #ruby
[18:56:32] Alina-malina: has joined #ruby
[18:57:17] dhollinger: has joined #ruby
[18:57:43] smathy: ACTION does NOT answer f.slice for a change
[18:58:08] bruno-: has joined #ruby
[18:58:55] Puffball: has joined #ruby
[18:59:54] wrkrcoop: has joined #ruby
[19:02:09] ngscheur1: has joined #ruby
[19:02:28] spectra: has joined #ruby
[19:02:40] noService: has joined #ruby
[19:03:22] jdawgaz: has joined #ruby
[19:04:09] chouhoulis: has joined #ruby
[19:04:46] jaguarmagenta: has joined #ruby
[19:05:37] mynameisbrian: has joined #ruby
[19:05:50] umdstu: has joined #ruby
[19:06:06] Emmanuel_Chanel: has joined #ruby
[19:06:23] mynameisbrian: Why can't I do: puts {}.methods.sort; since everything in Ruby is an object, shouldn't the hash literal work with that syntax?
[19:06:32] Emmanuel_Chanel: has joined #ruby
[19:06:40] mynameisbrian: If I put paranthesis around it, it works
[19:06:56] inukshuk_: has joined #ruby
[19:07:09] middaywalker: has joined #ruby
[19:09:15] zeroDi: has joined #ruby
[19:09:22] ruby[bot]: mynameisbrian: # => [:transpose, :fill, :assoc, :rassoc, :uniq, :uniq!, :compact, :compact!, :to_h, :flatten, :flatten!, ...check link for more (https://eval.in/568226)
[19:09:31] ruby[bot]: mynameisbrian: # => [:<, :>, :<=, :>=, :==, :[], :[]=, :empty?, :eql?, :inspect, :length, :size, :each, :to_hash, :to_pr ...check link for more (https://eval.in/568227)
[19:09:53] mynameisbrian: it's not working for my version?
[19:10:03] mynameisbrian: >> puts {}.methods
[19:10:04] ruby[bot]: mynameisbrian: # => ...check link for more (https://eval.in/568228)
[19:10:09] mynameisbrian: oh okay, something with puts
[19:10:10] matled: mynameisbrian: empty hash and empty block are both {}, so if you have 'puts {}' it is interpreted as puts with a block, whereas puts({}) disambiguates it to be a has as the first argument
[19:10:28] mynameisbrian: thanks matled haha
[19:10:56] mynameisbrian: >> puts ({}).methods
[19:10:57] ruby[bot]: mynameisbrian: # => < ...check link for more (https://eval.in/568231)
[19:11:00] Puffball: has joined #ruby
[19:11:07] matled: mynameisbrian: def foo(*args, &block); p [args, block]; end -- this can help to understand what's going on
[19:11:19] yqt: has joined #ruby
[19:11:39] mynameisbrian: yeah, I understand.
[19:12:02] pawnbox: has joined #ruby
[19:12:44] MissionCritical: has joined #ruby
[19:12:45] Ch4rAss: has joined #ruby
[19:16:03] jwren: has joined #ruby
[19:18:23] ekinmur: has joined #ruby
[19:19:24] jgt: has joined #ruby
[19:19:50] skolman_: has joined #ruby
[19:20:01] banister: has joined #ruby
[19:20:25] bronson: has joined #ruby
[19:22:51] nobitanobi: has joined #ruby
[19:23:21] stannard: has joined #ruby
[19:23:38] jwren: has joined #ruby
[19:25:14] jwren: has joined #ruby
[19:25:36] Puffball: has joined #ruby
[19:30:23] nixfreak: has joined #ruby
[19:31:20] nixfreak: Hello , I am trying to increment numbers like this 20160510-1, I would like to increment the 1 and 10 if I could
[19:32:19] nixfreak: basically I want ruby to do a conditional on that number and if it exisits then increment by 1
[19:33:57] adaedra: mh, so 20160510-1 + 1 would be what?
[19:34:11] ekinmur: has joined #ruby
[19:34:53] nixfreak: either changing the -1 to += or incrementing the 10
[19:35:04] emilkarl: has joined #ruby
[19:35:30] adaedra: what would be the output then? 20160510-2 or 20160511-1?
[19:36:04] CoderPuppy: has joined #ruby
[19:37:00] bazzy: has joined #ruby
[19:37:04] adaedra: >> "20160510-1".succ
[19:37:05] ruby[bot]: adaedra: # => "20160510-2" (https://eval.in/568235)
[19:37:47] nixfreak: oh ok thanks
[19:37:55] adaedra: just have in mind that
[19:37:59] adaedra: >> "20160510-9".succ
[19:38:00] ruby[bot]: adaedra: # => "20160511-0" (https://eval.in/568236)
[19:38:09] adaedra: it may not be the behavior you wish.
[19:39:26] Hanmac: adaedra: but its funny for version like:
[19:39:26] Hanmac: >> "1.2.9".succ
[19:39:27] ruby[bot]: hanmac: # => "1.3.0" (https://eval.in/568237)
[19:39:36] ur5us: has joined #ruby
[19:39:47] bluOxigen: has joined #ruby
[19:40:08] adaedra: >> "1.2.9".split('.').tap { |v| v.last.succ! }.join('.')
[19:40:09] ruby[bot]: adaedra: # => "1.2.10" (https://eval.in/568238)
[19:40:21] djbkd: has joined #ruby
[19:40:28] arpegius: has joined #ruby
[19:41:46] Puffball: has joined #ruby
[19:42:20] BSaboia: has joined #ruby
[19:42:27] nixfreak: noob with ruby what does this actually mean ? = puts "#{$!} (#{$!.class})"
[19:42:28] jackjackdripper: has joined #ruby
[19:43:22] shevy: nixfreak $! is a special one
[19:43:33] adaedra: $! is the current exception.
[19:43:41] adaedra: See http://www.zenspider.com/Languages/Ruby/QuickRef.html
[19:43:42] havenwood: >> require 'English'; $ERROR_INFO
[19:43:43] ruby[bot]: havenwood: # => nil (https://eval.in/568241)
[19:43:50] shevy: http://jimneath.org/2010/01/04/cryptic-ruby-global-variables-and-their-meanings.html
[19:43:59] shevy: "$! contains the Exception that was passed to raise."
[19:44:20] nixfreak: ok thank you
[19:45:49] havenwood: >> '1.2.9'.sub /\d+\z/, &:next
[19:45:50] ruby[bot]: havenwood: # => "1.2.10" (https://eval.in/568242)
[19:46:19] cdg: has joined #ruby
[19:47:22] cdg: has joined #ruby
[19:47:22] Coldblackice: has joined #ruby
[19:48:44] shevy: nixfreak are you using nixos btw?
[19:48:52] daftdolphin: has joined #ruby
[19:48:56] cpup: has joined #ruby
[19:49:13] stringn00b: has joined #ruby
[19:50:30] Ch4rAss: has joined #ruby
[19:51:06] stringn00b: I'm trying to format the following text into a string "\begin{document}", but using "\\begin{document}" gives me an error. How can I output \b as a normal string without using "\\ \bb"?
[19:53:11] havenwood: stringn00b: Do you mean to be interpolating anything?
[19:53:16] havenwood: >> '\begin{document}'
[19:53:17] ruby[bot]: havenwood: # => "\\begin{document}" (https://eval.in/568243)
[19:53:25] nixfreak: if @browser.text_field(:id => 'request_id').exists?('20160510-06')
[19:53:30] Devalo: has joined #ruby
[19:53:48] mwlang: has joined #ruby
[19:54:01] nixfreak: then I want to change it with increment_requestid method which I used your code
[19:54:37] nixfreak: how to can I .set that method ?
[19:55:52] stringn00b: I am using string interpolation, but the only issue popping up is correctly outputing "\begin{tikzcd}" for pdflatex
[19:56:56] jaiks: has joined #ruby
[19:57:07] nixfreak: does ruby have matches?
[19:57:30] nixfreak: match say a number
[19:57:41] havenwood: nixfreak: regexp?
[19:57:43] nixfreak: then use regex to generate another one?
[19:58:08] havenwood: nixfreak: What do you have and what do you want?
[19:58:36] Ch4rAss: has joined #ruby
[19:59:14] nixfreak: If I put in a requestid like 20160510-01 I want to use watir-webdriver to see if that requestid exists and if it does create another one like incrementing by 1
[19:59:20] nixfreak: does that make sense?
[19:59:29] skolman_: has joined #ruby
[19:59:31] xaxisx: has joined #ruby
[20:00:20] shevy: you seem to be set on to let watir handle that
[20:00:33] Ch4rAss: has joined #ruby
[20:00:37] shevy: you could manipulate or query the "20160510-01" yourself before passing into watir whatever it can handle too
[20:00:56] ekinmur: has joined #ruby
[20:01:35] nixfreak: ok so query the request id that goes in the text_field then if it exists pass it something else
[20:01:40] wrkrcoop: has joined #ruby
[20:01:58] roshanavand: has joined #ruby
[20:02:34] d5sx43: has joined #ruby
[20:02:48] nobitanobi: has joined #ruby
[20:03:43] ngscheur1: has joined #ruby
[20:05:47] freerobby: has joined #ruby
[20:06:06] yfeldblum: has joined #ruby
[20:07:30] Musashi007: has joined #ruby
[20:07:34] bruno-: has joined #ruby
[20:09:01] sepp2k: has joined #ruby
[20:09:02] blackmes1: has joined #ruby
[20:09:21] giz|work: has joined #ruby
[20:09:50] djbkd: has joined #ruby
[20:09:53] PlasmaStar: has joined #ruby
[20:10:08] synthroid: has joined #ruby
[20:10:57] blackgoat: has joined #ruby
[20:11:13] minimalism: has joined #ruby
[20:11:24] Slackman1: has joined #ruby
[20:12:24] zacstewart: has joined #ruby
[20:12:47] MissionCritical: has joined #ruby
[20:13:06] aegis3121: has joined #ruby
[20:13:29] karapetyan: has joined #ruby
[20:14:38] TomyLobo: has joined #ruby
[20:15:03] Ch4rAss: has joined #ruby
[20:15:53] Don_John: has joined #ruby
[20:16:16] sp4rrow: has joined #ruby
[20:17:09] idefine_: has joined #ruby
[20:17:54] jhack: has joined #ruby
[20:18:18] grenierm: has joined #ruby
[20:20:35] grenierm: has left #ruby: ()
[20:20:42] dmr8: has joined #ruby
[20:21:11] idefine: has joined #ruby
[20:21:27] ixti: has joined #ruby
[20:23:47] firstdayonthejob: has joined #ruby
[20:25:06] jenrzzz: has joined #ruby
[20:26:31] idefine: has joined #ruby
[20:27:41] sp4rrow: has joined #ruby
[20:29:47] isxek: has joined #ruby
[20:30:13] roamingdog: has joined #ruby
[20:30:21] brunto: has joined #ruby
[20:31:30] dhs111_: has joined #ruby
[20:32:28] dhs111_: im trying to install ruby version manager, can i get some help on here?
[20:32:36] havenwood: dhs111_: What trouble are you having?
[20:33:03] horaceheaven: has joined #ruby
[20:33:37] dhs111_: i am following a guide, after typing in command : "curl -L get.rvm.io | bash -s stable" and reopening the terminal. The guide asks for command "type rvm | head -1" to return "rvm is a function" i do not get that
[20:33:45] freerobby: has joined #ruby
[20:33:58] dhs111_: i am getting "rvm not found"
[20:34:36] adaedra: what did the command above said?
[20:34:42] adaedra: (the curl ...)
[20:35:15] banister: has joined #ruby
[20:36:20] dhs111_: it printed out a lot of stuff
[20:36:29] dhs111_: guide said "This will do some stuff and print a long message which you can ignore."
[20:36:49] elfuego: i’m getting a string from an external source in the format “”test string””, but i’m getting the following error: syntax error, unexpected tIDENTIFIER, expecting end-of-input , is there a way to parse this symbol to be a string?
[20:36:50] havenwood: dhs111_: rvm get head --auto-dotfiles
[20:37:25] adaedra: havenwood: well, if it says "rvm not found", I'm not sure this would work
[20:37:39] topjake: has joined #ruby
[20:37:50] dhs111_: this is the output of curl command: http://pastebin.com/n8ZUGtbC
[20:37:51] havenwood: adaedra: touche
[20:37:51] ruby[bot]: dhs111_: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/830e2afcabba482021bfb03908c45293
[20:37:51] ruby[bot]: dhs111_: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[20:38:11] adaedra: elfuego: are the quotes supposed to be english quotes (as opposed to straight " quotes)?
[20:38:53] dhs111_: command suggested by heavenwood also returned "rvm not found"
[20:39:05] elfuego: adaedra: it should be english quotes
[20:39:12] havenwood: dhs111_: Yeah, sorry about that.
[20:39:17] sneakerhax: has joined #ruby
[20:39:25] havenwood: dhs111_: \curl -sSL https://get.rvm.io | bash -s -- --auto-dotfiles
[20:39:46] havenwood: dhs111_: Then restart your terminal.
[20:40:08] dionysus69: has joined #ruby
[20:40:16] adaedra: well, looking at the output looking for errors won't hurt.
[20:40:19] karmatr0n: has joined #ruby
[20:40:39] adaedra: elfuego: have some code to see what you're trying?
[20:40:52] ur5us: has joined #ruby
[20:41:13] diego3: has joined #ruby
[20:41:30] dhs111_: command give by heavenwood worked, for command "type rvm | head -1" i am getting "rvm is /home/dhs111/.rvm/bin/rvm" thanks, however guide which i am following expects output "rvm is a function"
[20:41:57] bruce_lee: has joined #ruby
[20:41:57] bruce_lee: has joined #ruby
[20:42:10] jancel: has joined #ruby
[20:42:16] adaedra: is your terminal setup to start login shells?
[20:43:04] dhs111_: i do not know, i am using kubuntu with terminal konsole ill look it up online
[20:43:52] lomex: has joined #ruby
[20:43:56] Dimik: has joined #ruby
[20:43:59] adaedra: tadaa https://rvm.io/integration/konsole
[20:44:22] dhs111_: thanks :) gonna do it
[20:45:16] elfuego: adaedra: https://gist.github.com/anonymous/4f8608df9692dd5ebd012fe092b969aa
[20:45:31] dhs111_: thanks guys, works fine now :)
[20:45:40] blandflakes: has joined #ruby
[20:46:13] elfuego: adaedra: if the etag isn’t blank it returns a the string from request.env['HTTP_IF_NONE_MATCH'] with an extra quote around the text
[20:46:35] adaedra: elfuego: side note, ruby always use the last expression value as result of a method; your "return" clauses can be removed.
[20:46:55] adaedra: how do you check what's in your string?
[20:48:39] adaedra: Also, looks like If-None-Match header can be used with quotes according to the Wikipedia article
[20:51:28] pwnd_nsfw`: has joined #ruby
[20:51:32] firstdayonthejob: has joined #ruby
[20:52:26] bradleesand: has joined #ruby
[20:52:50] weemsledeux: has joined #ruby
[20:52:57] jenrzzz: has joined #ruby
[20:54:50] Radar: GOOD MORNING
[20:55:05] Roa: has joined #ruby
[20:55:38] adaedra: Not so loud, some people are idling here.
[20:55:46] skolman_: has joined #ruby
[20:57:55] nobitanobi: has joined #ruby
[20:58:16] elfuego: adaedra: i’m using JSON.parse to parse the string returned from get_current_etag, but since the quote surrounds the string its throwing unexpected token at '\"{\"__client_id\":
[20:59:46] adaedra: also, didn't see it the first time: Hash.new -> {} (but you could also construct the #create_etag_hash in one time)
[21:01:49] solocshaw: has joined #ruby
[21:01:53] skolman_: has joined #ruby
[21:01:53] idefine_: has joined #ruby
[21:02:22] derekbarber: has joined #ruby
[21:02:56] aegis3121: has joined #ruby
[21:03:40] adaedra: for your problem, you could manually remove the double quotes at each ends, but that's quite manual
[21:03:44] derekbarber: has left #ruby: ()
[21:03:59] Devalo: has joined #ruby
[21:04:08] ledestin: has joined #ruby
[21:05:34] jaguarmagenta: has joined #ruby
[21:05:51] charliesome: has joined #ruby
[21:06:46] sluukkonen: has joined #ruby
[21:07:20] nobitanobi: has joined #ruby
[21:08:01] ur5us: has joined #ruby
[21:08:24] charliesome_: has joined #ruby
[21:08:36] postmodern: has joined #ruby
[21:08:55] nofxx: has joined #ruby
[21:09:58] greylevel: has joined #ruby
[21:10:53] mdw: has joined #ruby
[21:11:05] brunto_: has joined #ruby
[21:11:51] johnmilton: has joined #ruby
[21:13:29] aegis3121: has joined #ruby
[21:14:19] al2o3-cr: has joined #ruby
[21:16:25] idefine_: has joined #ruby
[21:16:38] mustmodify_: has joined #ruby
[21:17:47] jancel: has joined #ruby
[21:18:01] mustmodify_: this is more of a general dev question but I have a new Ruby microservice. I was just writing an email asking how much data loss was acceptable for backups, etc.... realized I need to have some equivalent of a ping test. Just a test to make sure it's up because things go down... but it's not a ping test because I'm not testing a website. I'm testing ... that ... we're still receiving messages via UDP. So what's that called? :)
[21:18:19] PlasmaStar: has joined #ruby
[21:19:01] bobbycvi: has joined #ruby
[21:19:42] smathy: Availability monitoring?
[21:20:02] jwren: has joined #ruby
[21:20:08] mustmodify_: ok, works for me.
[21:20:39] djbkd: has joined #ruby
[21:21:08] idefine: has joined #ruby
[21:21:36] idefine: has joined #ruby
[21:22:40] bronson: has joined #ruby
[21:23:07] bruno-: has joined #ruby
[21:23:21] millerti: has joined #ruby
[21:24:20] ekinmur: has joined #ruby
[21:24:28] idefine: has joined #ruby
[21:26:39] daftdolphin: has joined #ruby
[21:29:00] cdg: has joined #ruby
[21:29:45] johnmilton: has joined #ruby
[21:29:47] cdg: has joined #ruby
[21:32:00] mustmodify_: has left #ruby: ()
[21:32:28] Parko: has joined #ruby
[21:32:58] diegoaguilar: has joined #ruby
[21:33:13] mtkd: has joined #ruby
[21:33:51] skolman: has joined #ruby
[21:35:10] lacuna: has joined #ruby
[21:35:32] djbkd: has joined #ruby
[21:35:37] workmad3: has joined #ruby
[21:36:26] djbkd: has joined #ruby
[21:40:13] jdawgaz: has joined #ruby
[21:40:34] neanderslob: has joined #ruby
[21:40:39] Ebok: has joined #ruby
[21:40:42] Moblin: has joined #ruby
[21:41:07] Ebok: has joined #ruby
[21:41:16] kareeoleez: has joined #ruby
[21:44:05] GodFather: has joined #ruby
[21:44:10] sp4rrow: has joined #ruby
[21:46:35] malconis: has joined #ruby
[21:48:36] azor: has joined #ruby
[21:48:45] azor: has left #ruby: ()
[21:55:16] Cohedrin: has joined #ruby
[21:55:24] sp4rrow: has joined #ruby
[21:55:31] djbkd: has joined #ruby
[21:55:53] tatsuo: has joined #ruby
[21:56:49] workmad3: has joined #ruby
[21:57:03] Pumukel: has joined #ruby
[21:59:48] kareeoleez: has joined #ruby
[22:01:07] banister: has joined #ruby
[22:01:15] idefine_: has joined #ruby
[22:01:31] finisherr: has joined #ruby
[22:04:40] Madplatypus: has joined #ruby
[22:06:00] SilverKey: has joined #ruby
[22:06:17] CausaMortis: has joined #ruby
[22:06:57] crystal77: has joined #ruby
[22:09:00] mdw: has joined #ruby
[22:09:05] noService: has joined #ruby
[22:09:52] idefine: has joined #ruby
[22:10:00] graft: has joined #ruby
[22:10:05] zotherstupidguy: has joined #ruby
[22:12:40] pawnbox: has joined #ruby
[22:13:31] bruno-: has joined #ruby
[22:13:57] agent_white: has joined #ruby
[22:14:10] graft: okay, so a common pattern i use is ary.map{|item| { item.some => item.thing } }.reduce(:merge) - apparently this is abominably slow compared to Hash[ary.map{|item| [ item.some, item.thing ] }]
[22:14:16] graft: can someone explain why?
[22:14:44] graft: too much copying?
[22:15:18] idefine: has joined #ruby
[22:16:59] renderful: has joined #ruby
[22:18:02] kareeoleez: has joined #ruby
[22:18:33] wldcordeiro: has joined #ruby
[22:19:58] horaceheaven: has joined #ruby
[22:20:49] jancel: has joined #ruby
[22:25:32] Arahael: different algorthm.
[22:25:46] kaleido: graft: im sorta dumb but im guessing because hashes are superior to arrays in all ways :P
[22:26:55] d0nn1e: has joined #ruby
[22:27:35] graft: they yield the same result... i'm guessing when I do reduce(:merge) it means making a fresh hash for every item in the array and copying the previous entry into it, whereas Hash[] only constructs a single hash from the array argument
[22:28:18] graft: but oh man, do i do this a lot
[22:29:49] weemsledeux: has joined #ruby
[22:30:34] al2o3-cr: graft: to_h all the way :)
[22:32:16] weaksauce: graft each merge call dups one of the hashes
[22:32:19] goldfax: has joined #ruby
[22:33:07] weaksauce: and then runs hash_update each time
[22:34:45] CausaMortis: hi guys, anyone here working on a vagrant + docker setup?
[22:34:56] rbennacer: has joined #ruby
[22:35:30] whathappens: has joined #ruby
[22:35:44] Mendenhall: has joined #ruby
[22:35:52] Mendenhall: has left #ruby: ()
[22:36:22] kareeoleez: has joined #ruby
[22:37:23] zenlot: has joined #ruby
[22:37:28] whathappens: has joined #ruby
[22:38:13] bruno-: has joined #ruby
[22:39:24] nickjj: CausaMortis, what's the question?
[22:41:59] CausaMortis: nickjj, I am a total noob but trying to setup vagrant using my own box (for now im using ubuntu) and then using docker to perform all the provisioning. Does this look remotely correct to you? https://gist.github.com/CausaMortis/090e4b7ec518005d9899468d75961bee
[22:42:43] nickjj: thoughts on just eliminating vagrant from the equation?
[22:43:56] nickjj: or a better question, what are you using vagrant for in your dev. environment that couldn't be solved with docker directly?
[22:44:02] CausaMortis: Currently running under windows and considering docker for windows is still in beta id rather serve up a vm using vagrant
[22:44:14] Azure: has joined #ruby
[22:44:33] CausaMortis: vagrant can use boot2docker as a provider but i would rather, if possible, have full control over the base box
[22:44:36] nickjj: docker for windows is pretty stable now through the docker toolbox
[22:44:53] nickjj: which uses docker-machine, which in turn uses boot2docker under the hood
[22:45:11] nickjj: the beta version is a native implementation which bypasses needing a VM entirely, so it runs natively just like it does on linux
[22:45:36] nickjj: it's not quite ready for prime time but it's certainly usable in every way dev, but at this point you'd need to get accepted the private beta to use it
[22:46:10] nickjj: *every day dev
[22:46:56] CausaMortis: thanks that does make things a bit more understandable for me. I assumed it would still be wonky at this point
[22:47:17] nickjj: your windows experience at the moment with the docker toolbox will be quite reasonable
[22:47:42] nickjj: i mean, if you really wanted to stick with the ubuntu base and vagrant, you should consider just mounting in your code into vagrant and not using the docker provider at all
[22:48:02] nickjj: but at that point, you might as well just use the docker toolbox
[22:48:17] CausaMortis: Thanks. Obviously I was overcomplicating matters here
[22:48:26] sp4rrow: has joined #ruby
[22:48:31] nickjj: yeah no problem
[22:48:43] nickjj: are you using rails too by any chance?
[22:48:47] CausaMortis: I started on this path cause I had read a while back that this was on option
[22:49:01] Nanuq: has joined #ruby
[22:49:20] CausaMortis: I come from a PHP background but recently had to make the switch so yea, that will be the end goal here so I can get my feet wet
[22:49:22] nickjj: i've been using docker on my dev box and in production for well over a year now, it's really nice. vagrant is longer a tool i use for dev environment set up
[22:49:32] nickjj: *no longer
[22:49:41] openstruct: has joined #ruby
[22:50:39] CausaMortis: never really bothered diving in as laravel (not sure if you are familiar) provides a dev env using vagrant out of the box
[22:50:40] nickjj: CausaMortis, what's your overall docker knowledge at the moment?
[22:50:51] CausaMortis: haha lets just say it is lacking
[22:51:07] CausaMortis: a few hours of reading on trying to get this to work tops
[22:51:09] nickjj: so, you've basically glanced the getting started guide and heard it might be cool?
[22:51:31] CausaMortis: yeah I want to jump on the bandwagon
[22:51:56] nickjj: are your intentions to eventually deploy a rails app to production with docker?
[22:52:56] CausaMortis: my intentions are to learn its ins and outs
[22:53:17] CausaMortis: first my priorities are with learning ruby and rails
[22:53:27] nickjj: i ask because if you were interested, i have a course out that you may like
[22:53:50] horaceheaven: for some reason the browser always surounds the request.env['HTTP_IF_NONE_MATCH'] with unwanted quotes, is there a built in ruby method to parse and cleanup strings coming back from the browser headers?
[22:53:57] CausaMortis: hey, I welcome any reading / video material on the subject
[22:54:09] nickjj: it won't teach you rails but it covers "dockerizing" a rails app and scaling/deploying a rails app on AWS with docker, it'll cover topics like load balancing, rolling restarts and much more
[22:54:24] kareeoleez: has joined #ruby
[22:54:40] nickjj: in your case, it might be a "phase 2" learning material, since you'd need to get a reasonable rails base of knowledge before you probably think about deploying an app to production with it
[22:55:04] sp4rrow: has joined #ruby
[22:55:22] nickjj: CausaMortis, everything about what the course covers can be found at http://nickjanetakis.com/courses/scaling-docker-on-aws
[22:56:26] karmatr0n: has joined #ruby
[22:57:33] pragmatism: Could someone clear this up for me: what's the point of using a double in testing? Why not just create an instance of the thing you're testing?
[22:57:51] CausaMortis: Luckily laravel for PHP adheres to many of the same conventions and because of its common ancestor i should be able to become familiar with rails in a short time frame
[22:58:22] astrobunny: has joined #ruby
[22:58:28] ramfjord: has joined #ruby
[22:59:10] weaksauce: pragmatism speed mainly.
[22:59:22] pragmatism: I hadn't considered that.
[22:59:44] CausaMortis: I totally misread that
[23:00:20] jenrzzz: has joined #ruby
[23:00:27] weaksauce: pragmatism it also decouples things and reduces dependencies.
[23:00:39] jancel: has joined #ruby
[23:00:49] openstruct: has joined #ruby
[23:01:08] pragmatism: weaksauce Why would I want to decrease dependencies on things in tests that are depended on outside of test?
[23:01:19] pragmatism: Wouldn't that lead to poor test coverage?
[23:01:30] weaksauce: pragmatism say the team for the double'd object is not done yet. how do you test your code?
[23:01:46] pragmatism: Again, hadn't considered that.
[23:01:54] weaksauce: you test given this input, I expect this output and MY code will work
[23:02:32] weaksauce: you do the same thing for the other end. and then you do integration testing to make sure things play well with each other... but those are slower because they touch more things
[23:03:01] pragmatism: Thank you!!!
[23:04:25] skolma___: has joined #ruby
[23:05:19] nickjj: CausaMortis, i think so too. there's also a million great blog posts and tutorials to pull from
[23:05:30] Devalo: has joined #ruby
[23:05:30] skolman: has joined #ruby
[23:06:14] skolman_: has joined #ruby
[23:06:18] CausaMortis: nickjj, I appreciate the link to the course material and will definitely consider it. bookmarked
[23:06:20] jaguarmagenta: has joined #ruby
[23:06:21] sp4rrow: has joined #ruby
[23:06:44] nickjj: cool, if you have any questions later on, don't hesitate to ask (my contact info is on my site, or PM me here)
[23:08:39] sonikspin: has joined #ruby
[23:11:38] CloCkWeRX: has joined #ruby
[23:11:45] jenrzzz_: has joined #ruby
[23:12:37] kareeoleez: has joined #ruby
[23:13:02] CausaMortis_: has joined #ruby
[23:14:38] sonikspin: has joined #ruby
[23:15:48] |2701: you guys know what's cool?
[23:15:55] |2701: mruby. mruby is what is freaking cool.
[23:16:56] mg^: mruby is cool
[23:17:24] mg^: I've done a little work with it
[23:17:39] mostlybadfly: has joined #ruby
[23:17:42] |2701: I havent yet, but I've been keeping a close eye on it. there's already a little microecosystem growing around it
[23:17:50] |2701: some guy got it running under rust, called mrusty
[23:17:58] |2701: VERY exciting stuff, i think
[23:18:26] mg^: https://github.com/mgcaret/hexchat-mruby
[23:18:38] mg^: that's my contribution to the ecosystem, so far
[23:18:51] |2701: oh wow, right on! that's awesome
[23:19:17] Yiota: has joined #ruby
[23:19:19] mg^: I want to find more excuses to use it
[23:19:38] xall: has joined #ruby
[23:19:52] mib_mib: has joined #ruby
[23:19:57] mg^: I recently found my old ham packet radio gear, I was thinking about trying to write a Ruby-based AX.25 stack.
[23:20:29] |2701: that is sufficiently nerdy, you should definitely do it
[23:20:34] mib_mib: hi - having trouble with reading a document - i do File.read('somefile').remove_non_ascii.split("\n").collect {|x| x.strip} to parse it into lines
[23:21:01] mg^: yeah the problem is always time, of course
[23:21:03] mib_mib: however, i am getting erro: in `strip`: invalid byte sequence in US-ASCII
[23:21:07] chip_: has joined #ruby
[23:21:09] mg^: I also want to do home automation stuff
[23:21:34] mib_mib: but i already did remove_non_ascii - so why would i be getting an invalid byte sequence if i already encoded it to ascii and replaced all non-ascii?
[23:21:53] Arahael: mib_mib: force the encoding to binary and re-convert it.
[23:22:02] mib_mib: ENCODING_OPTIONS = { :invalid => :replace, # Replace invalid byte sequences :undef => :replace, # Replace anything not defined in ASCII :replace => ' ', # Use a blank for those replacements :universal_newline => true # Always break lines with \n } ASCII_ENCODING = Encoding.find('ASCII') class String def remove_non_ascii self.encode(ASCII_ENCODING, ENCODING_OPTIONS) end end
[23:22:28] |2701: I didnt know remove_non_ascii was a thing... I get no method on 2.3, am i missing out?
[23:22:35] Arahael: mib_mib: i got caught by this: converting to the same encoding is a no-op.
[23:22:55] Arahael: mib_mib: as per docs, incidentially.
[23:23:00] mib_mib: |2701: nah, i just pasted it =D - i usually monkey patch this in to String class
[23:23:24] bruno-: has joined #ruby
[23:23:29] |2701: so then it's not working then, seems like
[23:23:49] |2701: if it's still finding non-ascii bytes after you've removed them, that seems like it would indicative of a faulty method
[23:23:51] mib_mib: |2701: it works, just not the no-op part, since my default encoding is not utf8 but ascii i assume
[23:24:09] Radar: Looking for code opinions on https://gist.github.com/radar/2909756e32053b576309abccd5efede2
[23:24:12] mib_mib: arahael: okay, so do I need to do like File.read('somefile','rb') ?
[23:24:27] bronson: has joined #ruby
[23:24:29] Radar: Particularly: is the usage of instance variables understandable, or should those values assigned to those ivars be explicitly passed to those methods?
[23:24:53] Arahael: mib_mib: not sure. i'm not an expert rubist.
[23:25:28] Arahael: mib_mib: but i assume ruby is guessing, incorrectly, what the encoding is.
[23:25:39] baweaver: Radar: I tend to avoid ivar implied method arguments
[23:25:42] pragmatism: Radar that reads fine to me, although I do inject when possible.
[23:25:45] cdg: has joined #ruby
[23:25:46] baweaver: makes it a lot harder to move code around
[23:25:55] mib_mib: arahael: you read the docs saying its a no-op but you dont know how to convert it ?
[23:25:59] mib_mib: arahael: i see
[23:26:23] baweaver: that and al the self references aren't really needed
[23:26:34] pragmatism: Agreed on self.
[23:26:52] Radar: baweaver: thank you :)
[23:26:52] pragmatism: Sorry, I agree with baweaver on `self`.
[23:26:55] Arahael: mib_mib: well, i suggested forcjng the encoding. i suppose i could have been more specific: force the encoding of the strings obtained from that file.
[23:26:58] baweaver: catch errors feels like it'd be a block given method
[23:27:02] Radar: Thanks all :)
[23:27:34] Arahael: pragmatism: that looks like slack.
[23:27:43] Arahael: pragmatism: slacker!
[23:28:06] pragmatism: Laziness, impatience, and hubris ;)
[23:28:07] baweaver: like: catch_errors { dangerous_method } -> def catch_errors; yield rescue => e handle errors end
[23:28:17] Arahael: pragmatism: ssh. :)
[23:28:53] baweaver: though at that point you don't gain much over begin/rescue unless you have very specific errors you're meaning to catch
[23:29:07] baweaver: in which case it'd be of benefit to have a more detailed name on it than catch_errors
[23:29:51] baweaver: that and you probably really don't want to do actions if errors occur such as delete/create
[23:30:22] kareeoleez: has joined #ruby
[23:30:26] Radar: baweaver: "errors" in this case are simply a "bad" HTTP response, i.e. a non-200. But yeah, you could definitely make it a block.
[23:30:51] baweaver: ah. In that case I'd use that to patch to a logger somehow and format sane defaults
[23:31:12] baweaver: also line 5 could probably use a sane default as well
[23:31:34] baweaver: the ivar thing has screwed me more than a few times trying to refactor code / move things around
[23:31:44] rkazak: has joined #ruby
[23:32:33] baweaver: we do something similar on HTTP responses, we use an interceptor to log out all failed external requests properly so we can track them later.
[23:32:53] baweaver: then normally either pass through the response or return false.
[23:33:55] mib_mib: arahael: ah okay that appeared to work, very oddly though
[23:34:39] Arahael: mib_mib: my guess is that when ruby assumes a given encoding, it does no conversion at that point, but assumes it's valid.
[23:35:06] Arahael: mib_mib: which is a reasonable decision, but surprising until you find out.
[23:35:47] SilverKey: has joined #ruby
[23:36:39] baweaver: Then again I have a near pathological aversion to `nil`, so with a grain of salt.
[23:37:20] Arahael: baweaver: you're not alone. there's been paprrs on that, one sec...
[23:37:46] baweaver: I prefer sane defaults whenever possible, which is completely doable in Ruby
[23:38:15] baweaver: Maybe Monad _could_ be mentioned but then you're going Haskell
[23:38:29] jancel: has joined #ruby
[23:38:43] koooge: has joined #ruby
[23:38:51] Arahael: baweaver: https://www.google.com.au/url?sa=t&source=web&rct=j&url=https://en.wikipedia.org/wiki/Tony_Hoare&ved=0ahUKEwiHgpbI1tDMAhVCe6YKHcFXApYQFgggMAE&usg=AFQjCNENYzUH6N72hyyrDeYWoDyibV2CRw&sig2=6DaRrBaHN7gJ3zAlMdzJjQ
[23:39:11] Arahael: not a paper, but anyway. *sigh*, all that garbage google adds these days...
[23:39:26] baweaver: The billion dollar mistake bit?
[23:40:03] Arahael: baweaver: applicative could be done in ruby?
[23:40:14] |2701: does CSP redeem Hoare?
[23:40:40] |2701: null refs were a pretty big fuckup, but I mean surely CSP makes up for that
[23:40:52] baweaver: not really fully, without a static type system it's not really there
[23:41:31] Arahael: (there are too many acronyms)
[23:42:18] |2701: communication sequenrial processes
[23:42:31] |2701: he also was responsible for quicksort
[23:42:36] Arahael: that sounds unrelated.
[23:42:50] |2701: yeah but it makes up for his mistake
[23:43:16] |2701: it is unrelated to null refs specifically, but i think he's still a pretty rad dude, considering all that he has contributed to the field
[23:43:23] Arahael: |2701: lets not delve into philosphy before i have to head off to work ;)
[23:43:25] baweaver: remember one thing in programming, if nothing else: you are not your code
[23:43:27] ekinmur: has joined #ruby
[23:43:49] baweaver: http://adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html - Also that's my go to to explain all those scary haskell terms
[23:44:01] skolman_: has joined #ruby
[23:45:19] |2701: heck of an ego to tell someone what to remember 'if nothing else'
[23:46:11] ekinmur: has joined #ruby
[23:46:15] baweaver: if you choose to take it that way
[23:46:44] |2701: didnt bother in 1st place, but ok
[23:47:00] baweaver: point being, there's no such thing as "making up for" past code
[23:47:14] |2701: sure there is, you scrap it and write better
[23:47:29] |2701: is a novice programmer forever in debt to code that he wrote as he was starting out? obv not
[23:47:49] |2701: not that he was a novice then, but still
[23:47:53] postmodern: has joined #ruby
[23:48:07] baweaver: then why should Hoare need to be "redeemed"
[23:48:16] |2701: to judge someone on mistakes they've chosen to correct and move past is a pretty obvious indicator of egoism
[23:48:20] karapetyan: has joined #ruby
[23:48:47] baweaver: ....you mean like what you just did?
[23:49:19] Yiota: has joined #ruby
[23:49:21] chris349: has joined #ruby
[23:49:32] baweaver: I'm mentioning that your mention of him being redeemed was exactly that, not sure how you're pulling the rest out of there.
[23:49:32] |2701: "if nothing else" like are you even serious with that kind of crap? That's the sort of thing a sophomore tells a freshman as a joke
[23:49:35] |2701: give me a break
[23:50:01] |2701: i was bringing attention that despite one bad idea, hoare is an important figure in cs
[23:50:27] |2701: he's definitely not just 'billion dollar mistake' guy.
[23:50:29] baweaver: and being quite rude in the process.
[23:50:46] |2701: "if nothing else..." *I'm* rude... ok
[23:50:54] |2701: if you choose to take it that way
[23:51:09] fullstack: has joined #ruby
[23:51:09] baweaver: ACTION sighs
[23:51:21] |2701: w/e. next topic....
[23:51:58] Vile`: has joined #ruby
[23:53:04] eljimbo: has joined #ruby
[23:54:18] bougyman: manveru: around?
[23:54:34] bougyman: trying to figure out how to use Net::LDAP.open in the context of a class.
[23:54:42] crystal77: has joined #ruby
[23:54:55] baweaver: !rude |2701
[23:54:55] ruby[bot]: +qq |2701!*@* *!*@gateway/web/irccloud.com/x-tkorgsukilkydniy
[23:55:02] bougyman: currently doing an @ldap = LDAP.new in the initializer then using @ldap to search. I just found this does a new connection/bind for each operation.
[23:55:08] aegis3121: has joined #ruby
[23:55:18] bougyman: but Net::LDAP.open() requires a block, so it will take a refactor.
[23:55:34] darix: has joined #ruby
[23:55:38] bougyman: is there a common pattern to use in such cases?
[23:55:53] bougyman: darix! currently doing an @ldap = LDAP.new in the initializer then using @ldap to search. I just found this does a new connection/bind for each operation.
[23:55:57] bougyman: woops, mispaste.
[23:56:00] crystal77: has joined #ruby
[23:56:09] darix: moin bougyman
[23:56:13] jdawgaz: has joined #ruby
[23:56:56] dopamean_: has joined #ruby
[23:57:01] chris349: How can I force the reinstall of a gem?
[23:59:23] Musashi007: has joined #ruby