« Back to channel list

#ruby - 19 January 2016

« Back 1 day Forward 1 day »
[00:00:19] Carella: Ox0dea: why did you have to multiply __id__ by two?
[00:00:49] Ox0dea: carella: Because odd addresses are used as tagged pointers for Fixnums.
[00:01:09] Ox0dea: >> ObjectSpace._id2ref 85
[00:01:10] ruby[bot]: Ox0dea: # => 42 (https://eval.in/504239)
[00:01:36] Ox0dea: >> 200.times.all? { |i| i.__id__ == i * 2 + 1 }
[00:01:37] ruby[bot]: Ox0dea: # => true (https://eval.in/504240)
[00:02:08] nerfando: has joined #ruby
[00:03:24] neanderslob: has joined #ruby
[00:03:41] skade: has joined #ruby
[00:04:37] bollullera: has left #ruby: ()
[00:04:37] Carella: Ox0dea: I knew that about Fixnums, but i'm still not sure I get it
[00:04:49] Carella: Probably there's something basic that I don't know about
[00:05:41] Ox0dea: carella: "Real" objects have an actual place in memory; the #object_id instance method simply returns that address shifted once to the right.
[00:06:21] neanderslob: has joined #ruby
[00:06:22] Ox0dea: We shift it back to the left (<< 1 == * 2) to give Fiddle the actual address we want a pointer into.
[00:06:37] gatopan: has joined #ruby
[00:06:57] Carella: Why does it shift to right though?
[00:07:12] Ox0dea: Because it has to differentiate between tagged pointers and regular ones.
[00:07:53] Ox0dea: Ruby does that the conventional way: use the low bit as the tag.
[00:08:19] Carella: My head is starting to hurt. I alwayws thoght of it like this: because of alignment the low bit it always zero
[00:08:43] Ox0dea: Barring insane architectures, that's right.
[00:08:50] Carella: so if the runtime sees that we pass pointer that have 1 in the smallest bit it's a tagged pointer
[00:08:58] Carella: so it will behave differently
[00:09:24] Carella: in that case I don't see the need in shifting to right.
[00:10:17] tomchapin: has joined #ruby
[00:10:18] Carella: I cant see that something will brake if __id__ returned the actual pointer value
[00:10:40] TomPeed: has joined #ruby
[00:12:29] kalopsian: has joined #ruby
[00:13:49] Carella: I think i finally get it
[00:13:50] ferr: has joined #ruby
[00:13:50] Carella: https://en.wikipedia.org/wiki/Hilbert%27s_paradox_of_the_Grand_Hotel
[00:14:12] tomchapin: has joined #ruby
[00:14:25] nerium: has joined #ruby
[00:14:50] Ox0dea: But that would only be applicable if object IDs were virtual, no?
[00:15:11] Ox0dea: >> ObjectSpace._id2ref(2**64) rescue $!
[00:15:12] ruby[bot]: Ox0dea: # => #<RangeError: bignum too big to convert into `unsigned long'> (https://eval.in/504241)
[00:15:24] Ox0dea: MRI doesn't bother to account for infinitely many objects.
[00:15:55] Carella: Was the ruby built that way from the beggining?
[00:16:06] Carella: i mean the tagged pointers
[00:16:07] Ox0dea: ID allocation has gone through a few changes.
[00:16:17] Ox0dea: Yeah, tagged pointers from the beginning, I'm sure.
[00:16:27] Ox0dea: But a handful of optimizations since then.
[00:17:10] dlitvak: has joined #ruby
[00:18:01] Ox0dea: carella: https://git.io/vzlDb
[00:18:06] cicloid: has joined #ruby
[00:18:18] Ox0dea: The "blank" MSB column seems of some importance. :P
[00:19:12] Carella: Ox0dea: we need to go deeper!
[00:19:27] uris: has joined #ruby
[00:20:21] gatopan: has left #ruby: ("WeeChat 0.4.2")
[00:20:22] Carella: https://github.com/ruby/ruby/blob/trunk/gc.c#L758
[00:21:08] Carella: is it where it divides it? Right before return?
[00:21:23] jamw: has joined #ruby
[00:21:26] Ox0dea: That'd be the one.
[00:21:41] Darmani: has joined #ruby
[00:21:55] cpup: has joined #ruby
[00:25:33] dlitvak: has joined #ruby
[00:26:22] astrobunny: has joined #ruby
[00:27:14] Carella: Ox0dea: i think I got it
[00:27:23] Carella: cant it use the same system for floats?)
[00:27:33] Carella: >> ObjectSpace._id2ref(666)
[00:27:59] Carella: > ObjectSpace._id2ref(66)
[00:28:08] atomical: has joined #ruby
[00:30:10] Ox0dea: carella: There are way more Floats than addresses.
[00:30:24] Carella: but still, -2.0.__id__ == 6
[00:30:45] Carella: ObjectSpace._id2ref(66) == 2.0000000000000036
[00:31:07] Carella: ObjectSpace._id2ref(666) == 2.000000000000037
[00:31:14] Ox0dea: Interesting.
[00:31:34] nerfando: has joined #ruby
[00:31:42] Carella: I think it's the mantissa or something
[00:31:50] mburns: has joined #ruby
[00:31:59] Ox0dea: Yeah, just a byproduct of IEEE 754, really.
[00:33:08] Carella: I wonder how exactly it is used
[00:34:00] BigFish: carella: if i don't do it in interactive ruby, i won't know if the code i typed is wrong or not
[00:34:29] Moblin: has joined #ruby
[00:34:47] Carella: BigFish: you can run your file like this: ruby greeter.rb
[00:36:54] BigFish: oh, carella, you mean turning the .txt into .rb
[00:38:01] northfurr: has joined #ruby
[00:38:08] Rodya_: has joined #ruby
[00:38:18] emilford: has joined #ruby
[00:38:32] SCHAAP137: has joined #ruby
[00:39:23] cndiv: has joined #ruby
[00:41:27] johnbburg: has joined #ruby
[00:42:35] kalopsian: has joined #ruby
[00:44:00] jbrhbr: has joined #ruby
[00:44:38] Carella: Ox0dea: ObjectSpace._id2ref(((x*2)+1)*2) == 2 + Float::EPSILON * x
[00:44:43] Carella: finally got it
[00:45:20] Ox0dea: carella: Nice!
[00:46:36] Ox0dea: >> 200.times.count { |x| ObjectSpace._id2ref(((x*2)+1)*2) == 2 + Float::EPSILON * x } # carella
[00:46:37] ruby[bot]: Ox0dea: # => 0x000006 is not id value (RangeError) ...check link for more (https://eval.in/504244)
[00:46:43] guacamole: has joined #ruby
[00:46:47] Ox0dea: I get 100 on a 64-bit machine.
[00:46:53] m1dnight1: has joined #ruby
[00:47:47] cicloid_: has joined #ruby
[00:48:04] atomical_: has joined #ruby
[00:48:10] freerobby: has joined #ruby
[00:49:14] Carella: well, that's interesting
[00:49:29] nerfando: has joined #ruby
[00:49:35] Carella: irb(main):111:0> 200.times.count { |x| ObjectSpace._id2ref(((x*2)+1)*2) == 2 + Float::EPSILON * x }
[00:49:43] emilford: has joined #ruby
[00:50:13] fantasti`: has joined #ruby
[00:52:38] drbrain: carella: Ruby uses a similar system for some floats
[00:52:55] Ox0dea: This is all dead code: https://git.io/vzlSW
[00:53:02] Carella: Ox0dea: i figured out the 50% loss - the odd x's will result in negative numbers
[00:53:03] Ox0dea: drbrain: Worth an excision patch?
[00:53:19] drbrain: Ox0dea: seems so
[00:53:26] fantasti`: has joined #ruby
[00:53:39] waheedi: has joined #ruby
[00:55:04] Tref_: has joined #ruby
[00:57:15] Darmani: Ox0dea - yo
[00:57:22] fsapo: has joined #ruby
[00:57:30] Ox0dea: Darmani: Heading out for a bit.
[00:57:48] ferr: has joined #ruby
[00:58:09] Darmani: Well if anyone's around, how do I remove a specific word within a string with a Regex, what would that look like?
[00:59:36] Tempesta_: has joined #ruby
[01:01:11] rodolfowtf: has joined #ruby
[01:02:22] Carella: drbrain: is there some posts about it?
[01:02:34] Carella: I've managed to replicate the logic though: https://repl.it/BeqC
[01:02:51] eyesnot: has joined #ruby
[01:04:31] skade: has joined #ruby
[01:05:02] dlitvak: has joined #ruby
[01:05:55] kalopsian: has joined #ruby
[01:06:33] rns: has joined #ruby
[01:07:49] sankaber: has joined #ruby
[01:07:58] nerfando: has joined #ruby
[01:11:00] johnbburg: has joined #ruby
[01:12:26] sakix: has joined #ruby
[01:12:29] Carella: I still cant understand how one can safely use fiddle, because to me object_id to memory address conversion implementation is a subject for change
[01:13:02] northfurr: has joined #ruby
[01:14:09] pdoherty: has joined #ruby
[01:19:52] johnbburg: has joined #ruby
[01:20:47] devbug: has joined #ruby
[01:20:53] tjohnson: has joined #ruby
[01:23:46] Carella: There's more!
[01:23:50] Carella: > ObjectSpace._id2ref(-62)
[01:23:50] Carella: => 1.9999999999999982
[01:24:09] x0F_: has joined #ruby
[01:25:45] pawnbox: has joined #ruby
[01:26:12] nerfando: has joined #ruby
[01:26:56] bnagy: Darmani: probably you want sub or gsub
[01:27:16] kalopsian: has joined #ruby
[01:29:24] ur5us: has joined #ruby
[01:29:30] howdoicomputer: has joined #ruby
[01:30:15] chouhoulis: has joined #ruby
[01:32:09] Ox0dea: >> s = 'This is not cool.'; s['not'] = 'kinda'; s # Darmani
[01:32:11] ruby[bot]: Ox0dea: # => "This is kinda cool." (https://eval.in/504255)
[01:32:39] PaulCapestany: has joined #ruby
[01:32:43] Darmani: oh I figured it out.
[01:33:02] Ox0dea: You should use regular expressions when you need them.
[01:33:54] chris2: has joined #ruby
[01:34:24] iateadonut: has joined #ruby
[01:34:33] arescorpio: has joined #ruby
[01:35:17] x0F: has joined #ruby
[01:38:32] hxegon: has joined #ruby
[01:38:32] jbrhbr: has joined #ruby
[01:38:35] diegoviola: has joined #ruby
[01:38:36] nanoz: has joined #ruby
[01:38:44] Rodya_: has joined #ruby
[01:40:25] cicloid: has joined #ruby
[01:41:02] sesquipedalian: has joined #ruby
[01:41:25] johnbburg: has joined #ruby
[01:42:52] yeticry_: has joined #ruby
[01:44:25] nerfando: has joined #ruby
[01:45:22] mistermocha: has joined #ruby
[01:46:17] akem: has joined #ruby
[01:49:54] cpup: has joined #ruby
[01:50:51] guacamole: has joined #ruby
[01:51:15] freerobby: has joined #ruby
[01:54:45] rakm: has joined #ruby
[02:01:46] dlitvak: has joined #ruby
[02:02:37] nerfando: has joined #ruby
[02:05:55] dlitvak: has joined #ruby
[02:06:46] cicloid_: has joined #ruby
[02:08:14] dlitvak: has joined #ruby
[02:10:08] Domaldel: has joined #ruby
[02:11:15] dstarh: has joined #ruby
[02:11:49] northfurr: has joined #ruby
[02:15:06] jamw: has joined #ruby
[02:15:43] baweaver: has joined #ruby
[02:17:27] johnbburg: has joined #ruby
[02:19:11] dfinninger: has joined #ruby
[02:19:26] Pupeno: has joined #ruby
[02:19:26] Pupeno: has joined #ruby
[02:20:40] nerfando: has joined #ruby
[02:20:53] Rodya_: has joined #ruby
[02:21:34] krobzaur: has joined #ruby
[02:21:58] marcdel: has joined #ruby
[02:23:36] ur5us: has joined #ruby
[02:24:45] mistermocha: has joined #ruby
[02:25:58] rkazak: has joined #ruby
[02:26:24] Cyrus: has joined #ruby
[02:30:49] mrchris: has joined #ruby
[02:31:13] mrchris: Is there an enumerable method that will return a single value?
[02:32:16] blackmes1: has joined #ruby
[02:32:18] tomchapin: has joined #ruby
[02:32:47] mrchris: [1,2,3,4].<method> { |v| "Test" if v == 3; break }
[02:33:09] mrchris: I would like to break out of the loop and return a value
[02:34:39] monoprotic: why not test if the specific element is in the array
[02:34:40] Cohedrin: __chris .find
[02:34:52] mrchris: just found detect/find thanks
[02:35:04] northfurr: has joined #ruby
[02:36:06] freerobby: has joined #ruby
[02:39:00] nerfando: has joined #ruby
[02:39:44] northfurr: has joined #ruby
[02:43:05] huluhuluhulu: has joined #ruby
[02:43:39] Bloomer: has joined #ruby
[02:43:48] solocshaw: has joined #ruby
[02:44:38] howdoicomputer: has joined #ruby
[02:48:32] Sperant: has joined #ruby
[02:55:06] emilford: has joined #ruby
[02:57:03] nerfando: has joined #ruby
[02:58:20] lkba: has joined #ruby
[02:58:27] lkba: has joined #ruby
[03:01:36] segmond: has joined #ruby
[03:02:14] djbkd: has joined #ruby
[03:03:24] jbrhbr: has joined #ruby
[03:03:27] cashnguns: has joined #ruby
[03:07:07] dfinninger: has joined #ruby
[03:09:06] Melpaws: has joined #ruby
[03:09:24] mondok: has joined #ruby
[03:11:37] j_mcnally: has joined #ruby
[03:12:55] huluhuluhulu: has joined #ruby
[03:13:03] huluhuluhulu: has left #ruby: ()
[03:13:11] sakix: has joined #ruby
[03:13:46] Sperant: has joined #ruby
[03:14:14] zambini: has joined #ruby
[03:15:08] psye: has joined #ruby
[03:15:17] bronson: has joined #ruby
[03:16:47] psye: has joined #ruby
[03:18:28] robbyoconnor: has joined #ruby
[03:20:45] robbyoconnor: has joined #ruby
[03:21:55] Rodya_: has joined #ruby
[03:23:14] hannelita: has joined #ruby
[03:24:23] nerfando: has joined #ruby
[03:24:23] iateadonut: has joined #ruby
[03:30:56] Moblin: has joined #ruby
[03:33:48] northfurr: has joined #ruby
[03:35:20] baweaver: has joined #ruby
[03:36:06] devbug: has joined #ruby
[03:36:06] vikas027: Hello Everyone, I have a Hash like this diff_names = {'mask-passwords' => 'abc123', 'vikas' => 'vicky', 'hello' => 'me'} How can I filter out the value corresponding to 'mask-passwords' ?
[03:37:21] Ropeney: has joined #ruby
[03:37:30] tildes: has joined #ruby
[03:37:38] havenwood: vikas027: What would you like the output to be?
[03:37:42] Moblin: Use reject to remove the key-value pair at key password, and then call values on the rest?
[03:37:57] havenwood: vikas027: Or rather, what's the desired return value?
[03:38:33] vikas027: havenwood: I just want to query the first the key of the hash (mask-password, vikas or hello in my case) and print the corresponding value
[03:38:52] havenwood: vikas027: diff_names.values.first
[03:39:11] vikas027: havenwood: So, if I query mask-passwords, I get a value abc123
[03:39:29] havenwood: vikas027: What return value do you want?
[03:39:44] blackmes1: has joined #ruby
[03:39:51] vikas027: havenwood: if I query for mask-passwords, I get a return value abc123
[03:39:52] havenwood: vikas027: You want the first key's value or no?
[03:40:22] havenwood: vikas027: So not?: diff_names.values.first
[03:40:44] rickmasta: has joined #ruby
[03:40:53] havenwood: vikas027: Is the return value you're looking for?: "abc123"
[03:41:52] havenwood: vikas027: Either `diff_names.values.first` or `diff_names.first.last` would be the first value of the Hash.
[03:41:57] vikas027: havenwood: I also want to look for a 'vikas' and have 'vicky' in return. Similary, when I look for 'hello', I should get 'me' in return
[03:42:44] Carella: so you want all values?
[03:42:56] vikas027: havenwood: Thanks for the first and last values. But, I have a big hash. I am looking to somehow iterate over the hash, and find all corresponding values.
[03:43:01] al2o3-cr: diff_names.invert['vicky'] # like this?
[03:43:01] vikas027: carella: right
[03:43:13] havenwood: al2o3-cr: yup, seems so
[03:43:19] Moblin: vikas, hash.values.each iterates over all the values in order
[03:43:31] Carella: vikas, diff_names.values will just return the array
[03:43:32] al2o3-cr: havenwood: I weren't to sure tbh
[03:43:45] havenwood: vikas027: ^ the values will become unique when you invert but i think al2o3-cr understood what you're asking
[03:44:20] havenwood: >> {aim: true, facts: true, same: false}.invert
[03:44:21] ruby[bot]: havenwood: # => {true=>:facts, false=>:same} (https://eval.in/504272)
[03:46:00] B1n4r10: has joined #ruby
[03:46:14] diegoviola: has joined #ruby
[03:46:54] crdpink: has joined #ruby
[03:47:02] howdoi: has joined #ruby
[03:47:50] northfurr: has joined #ruby
[03:49:13] vikas027: carella, havenwood, al2o3-cr: Sorry for not being clear. I am framing my question again. This is a small part of my hash - diff_names = {'mask-passwords' => 'abc123', 'vikas' => 'vicky', 'hello' => 'me'} What I want is that I can query this hash for keys like 'mask-passwords', 'vikas' or 'hello'. And it returns values like 'abc123', 'vicky' or 'me'. Something like puts diff_names.values.['mask-passwords'] should return abc123
[03:50:05] havenwood: vikas027: diff_names['mask-passwords'] #=> "abc123"
[03:51:13] vikas027: havenwood: Exactly. sorry for not being clear. Thanks. I am good at shell programming, but new at ruby.
[03:51:33] nerfando: has joined #ruby
[03:53:21] havenwood: vikas027: No prob!
[03:54:25] caffeinic: has joined #ruby
[03:56:22] tmtwd: has joined #ruby
[03:58:33] casadei: has joined #ruby
[03:59:19] hxegon: has joined #ruby
[04:01:02] nerfando: has joined #ruby
[04:02:47] haraoka: has joined #ruby
[04:06:00] fedexo: has joined #ruby
[04:06:01] arup_r: has joined #ruby
[04:06:26] dfinninger: has joined #ruby
[04:09:06] tubuliferous_: has joined #ruby
[04:09:42] jtnegrotto: has joined #ruby
[04:10:01] nerfando: has joined #ruby
[04:10:20] finisherr: has joined #ruby
[04:12:05] DiCablo: has joined #ruby
[04:14:08] rkazak: has joined #ruby
[04:17:13] braincrash: has joined #ruby
[04:18:42] gregf_: has joined #ruby
[04:19:04] nerfando: has joined #ruby
[04:20:33] jtnegrotto: has joined #ruby
[04:22:20] peeja: has joined #ruby
[04:23:09] Rodya_: has joined #ruby
[04:23:46] djbkd: has joined #ruby
[04:24:17] hannelita: has joined #ruby
[04:25:21] sakix: has joined #ruby
[04:25:38] krz: has joined #ruby
[04:26:40] dseitz: has joined #ruby
[04:27:06] Moblin: has joined #ruby
[04:30:48] tjbiddle: has joined #ruby
[04:31:38] wolffles: say im doing range.each_with_index ternary operator
[04:31:49] pdoherty_: has joined #ruby
[04:31:51] wolffles: ignore that
[04:33:20] wolffles: say im doing range.each_with_index with a ternary operator i want to return a number if 2 conditions are true and if false i want enumerator to start at the beginning again.
[04:33:42] wolffles: is that possible?
[04:35:34] Ox0dea: wolffles: Sounds scary.
[04:35:39] Radar: what Ox0dea said
[04:35:42] Radar: show us some code?
[04:36:24] Ox0dea: wolffles: It sounds like you want that to run in a loop until #find returns non-nil, but that means you've got mutable state in places it doesn't belong.
[04:37:12] nerfando: has joined #ruby
[04:37:29] wolffles: so far this is what im working with i keep messing with the ternerary operator but to no avail https://eval.in/504296
[04:39:42] al2o3-cr: >> [*1..20].inject(:lcm)
[04:39:43] ruby[bot]: al2o3-cr: # => 232792560 (https://eval.in/504303)
[04:39:53] pawnbox: has joined #ruby
[04:40:33] Majost_: has joined #ruby
[04:40:37] cicloid: has joined #ruby
[04:41:18] wolffles: i cant seem to think like you guys do
[04:41:37] Ox0dea: wolffles: Here's my much dumber solution if it makes you feel any better: https://eval.in/504308
[04:42:26] blackmes1: has joined #ruby
[04:43:34] wolffles: Ox0dea: im having difficulty understanding yours
[04:44:18] Ox0dea: wolffles: It's basically al2o3-cr's but retarded.
[04:44:22] wolffles: why that array? random numbers
[04:44:37] diegoviola: has joined #ruby
[04:44:41] usershell: has joined #ruby
[04:44:43] Ox0dea: No, the 5040 is LCM(1..10) * 2.
[04:45:03] Ox0dea: The array is 11..20 sans the numbers we don't need to check.
[04:45:06] Majost_: Does anyone happen to have any prior experience using rmagic? I am trying to just display a jpeg, but when I do ` Magick::Image.display(IO.binread("test.jpg"))` I get the error: `NoMethodError: undefined method `write' for #<String:0x00561296ebba28>`
[04:45:15] Radar: Majost_: you're the first person. Congratulations.
[04:45:34] Radar: ?ri IO.binread
[04:45:34] ruby[bot]: Radar: I don't see no IO.binread, whom should I tell about ri?
[04:45:42] Ox0dea: &ri IO.binread
[04:45:42] `derpy: http://ruby-doc.org/core-2.3.0/IO.html#method-c-binread
[04:46:53] wolffles: ahhh didnt know lcm was a thing already
[04:47:04] wolffles: would you call that a constant?
[04:48:07] Radar: Which? :lcm?
[04:48:19] Radar: lcm is a method on Integer.
[04:48:41] jamw: has joined #ruby
[04:49:27] al2o3-cr: has joined #ruby
[04:49:52] wolffles: yes in al2o3-cr ???s code
[04:50:12] Ox0dea: >> (1..5).reduce(:lcm) == 1.lcm(2).lcm(3).lcm(4).lcm(5) # wolffles
[04:50:14] ruby[bot]: Ox0dea: # => true (https://eval.in/504315)
[04:50:19] radgeRayden__: has joined #ruby
[04:52:25] wolffles: ehh i need to do some more reading
[04:52:52] cicloid: has joined #ruby
[04:52:58] Pupeno: has joined #ruby
[04:55:02] Radar: I've been doing Ruby for 10 years and I didn't know that lcm existed.
[04:55:20] wolffles: :D feels better
[04:55:56] shevy: I did not know lcm either
[04:56:10] shevy: that's pretty funny
[04:56:17] gix: has joined #ruby
[04:56:29] shevy: "least common multiple"
[04:59:14] Ox0dea: >> 12684.divmod(100).reduce(:gcd)
[04:59:15] ruby[bot]: Ox0dea: # => 42 (https://eval.in/504326)
[05:02:57] tildes: has joined #ruby
[05:04:19] nerfando: has joined #ruby
[05:04:30] jamw: has joined #ruby
[05:08:58] Darmani: has joined #ruby
[05:09:17] fclausen: has joined #ruby
[05:10:06] Radar: lowest common multiple
[05:10:42] iateadonut: has joined #ruby
[05:10:50] pawnbox: has joined #ruby
[05:11:08] Ox0dea: Yay, English.
[05:12:04] dlitvak: has joined #ruby
[05:12:08] speaking1ode: has joined #ruby
[05:13:02] Ox0dea: Array#min *technically* returns the least element, but nobody talks like that anymore.
[05:14:24] Ox0dea: Then again, nobody reads < as "lower than", so it's a mixed bag.
[05:16:34] vikas027: Hello Everyone, I am trying to shorten my code by used .each.with_index, but for some reason the output is a little weird than expected. - https://dpaste.de/c8tZ
[05:18:40] vikas027: Sorry, here is the correct link - https://dpaste.de/yRgd
[05:18:54] Ox0dea: vikas027: Be advised that there's an #each_with_index method which'll only create the one Enumerator instead of two.
[05:19:05] Ox0dea: Usually no big deal, but you said you're working with a rather large collection.
[05:19:37] hakunin_: has joined #ruby
[05:19:56] RobertBirnie: has joined #ruby
[05:19:58] Ox0dea: vikas027: Your block parameters should be |(plugin, version), index|.
[05:20:16] vikas027: Ox0dea: Ah, thanks. Let me try that
[05:20:21] Ox0dea: Sure thing.
[05:20:36] goodroot: has joined #ruby
[05:21:53] vikas027: Ox0dea: Excellent, Thanks a ton !
[05:22:04] Ox0dea: vikas027: Happy to help. :)
[05:22:22] nerfando: has joined #ruby
[05:24:23] Rodya_: has joined #ruby
[05:25:02] hannelita: has joined #ruby
[05:26:17] Channel6: has joined #ruby
[05:29:23] konsolebox: has joined #ruby
[05:29:25] El3ktra: has joined #ruby
[05:29:28] agentmeerkat: has left #ruby: ()
[05:37:46] User458764: has joined #ruby
[05:39:39] dopie: has joined #ruby
[05:40:14] jgt: has joined #ruby
[05:40:20] mkosaki: has joined #ruby
[05:40:34] nerfando: has joined #ruby
[05:43:43] astrobun_: has joined #ruby
[05:45:29] blackmes1: has joined #ruby
[05:46:34] bronson: has joined #ruby
[05:46:42] sigurding: has joined #ruby
[05:48:02] wlanboy: has joined #ruby
[05:48:23] Graphettion: has joined #ruby
[05:48:44] bronson: has joined #ruby
[05:50:47] Synthmead: has joined #ruby
[05:52:55] techsethi: has joined #ruby
[05:54:49] yfeldblum: has joined #ruby
[05:57:11] jackjackdripper: has joined #ruby
[05:57:41] goodroot: has joined #ruby
[05:58:05] hakunin: has joined #ruby
[05:59:05] nerfando: has joined #ruby
[05:59:20] casadei: has joined #ruby
[06:00:57] juddey: has joined #ruby
[06:04:34] ur5us: has joined #ruby
[06:07:00] agent_white: has joined #ruby
[06:08:40] agent_white: Evenin' folks
[06:11:36] Darmani: hey agent_white (:
[06:12:10] User458764: has joined #ruby
[06:13:39] musl: has joined #ruby
[06:15:03] techsethi: has joined #ruby
[06:17:20] akem: has joined #ruby
[06:17:29] nerfando: has joined #ruby
[06:18:16] Ishido: has joined #ruby
[06:18:58] guacamole: has joined #ruby
[06:19:10] Ox0dea: Nice ear, though.
[06:20:19] malconis: has joined #ruby
[06:21:43] arup_r: has joined #ruby
[06:21:43] karapetyan: has joined #ruby
[06:24:45] tubuliferous_: has joined #ruby
[06:25:44] hannelita: has joined #ruby
[06:26:21] tubuliferous_: has joined #ruby
[06:26:29] nerfando: has joined #ruby
[06:26:40] rkazak: has joined #ruby
[06:27:42] janebootydoe: has joined #ruby
[06:29:25] rkazak: has joined #ruby
[06:32:02] Macaveli: has joined #ruby
[06:36:50] atmosx: has joined #ruby
[06:38:28] karapetyan: has joined #ruby
[06:41:51] usershell: has joined #ruby
[06:42:01] fantazo: has joined #ruby
[06:44:31] nerfando: has joined #ruby
[06:46:41] krz: has joined #ruby
[06:48:00] howdoi: has joined #ruby
[06:48:17] dopie: has joined #ruby
[06:48:32] blackmes1: has joined #ruby
[06:48:48] astrobun_: has joined #ruby
[06:51:58] claw: has joined #ruby
[06:52:08] anisha: has joined #ruby
[06:53:20] Pupeno: has joined #ruby
[06:55:08] lxsameer: has joined #ruby
[06:55:24] rakm: has joined #ruby
[06:58:32] goodroot: has joined #ruby
[07:02:31] nerfando: has joined #ruby
[07:03:17] RobertBirnie: has joined #ruby
[07:04:31] tjbiddle: has joined #ruby
[07:05:01] Spami: has joined #ruby
[07:06:23] yardenbar: has joined #ruby
[07:07:18] solars: has joined #ruby
[07:07:43] darkf: has joined #ruby
[07:10:55] weemsledeux: has joined #ruby
[07:11:28] scepticulous: has joined #ruby
[07:12:03] nerfando: has joined #ruby
[07:12:16] User458764: has joined #ruby
[07:13:44] neanderslob: has joined #ruby
[07:14:10] pwnd_nsfw: has joined #ruby
[07:15:29] karapetyan: has joined #ruby
[07:15:32] usershell: has joined #ruby
[07:21:11] Carella: has joined #ruby
[07:21:13] nerfando: has joined #ruby
[07:22:44] frewtc4ke: has joined #ruby
[07:25:17] goodroot: has joined #ruby
[07:26:47] Rodya_: has joined #ruby
[07:27:48] hannelita: has joined #ruby
[07:30:16] nerfando: has joined #ruby
[07:30:28] DoubleMalt: has joined #ruby
[07:32:43] frewtc4ke: has left #ruby: ()
[07:33:27] tubuliferous_: has joined #ruby
[07:34:07] sandstrom: has joined #ruby
[07:35:09] RobertBirnie: has joined #ruby
[07:36:58] symm-: has joined #ruby
[07:37:26] firstdayonthejob: has joined #ruby
[07:38:06] gagrio: has joined #ruby
[07:39:22] nerfando: has joined #ruby
[07:41:44] jtnegrotto_: has joined #ruby
[07:42:21] ympeg: has joined #ruby
[07:43:53] pwnd_nsfw: has joined #ruby
[07:44:17] jtnegrotto__: has joined #ruby
[07:51:33] blackmes1: has joined #ruby
[07:55:27] rippa: has joined #ruby
[07:57:33] nerfando: has joined #ruby
[07:57:53] hs366: has joined #ruby
[07:58:46] DirtyFInn: has joined #ruby
[07:59:11] j_mcnally: has joined #ruby
[08:00:06] casadei: has joined #ruby
[08:02:11] agent_white: has joined #ruby
[08:06:06] Hounddog: has joined #ruby
[08:07:00] RobertBirnie: has joined #ruby
[08:08:52] roshanavand: has joined #ruby
[08:08:53] jas02: has joined #ruby
[08:09:17] ur5us: has joined #ruby
[08:09:37] roshanavand: has joined #ruby
[08:11:43] jameswatling: has joined #ruby
[08:11:46] pawnbox: has joined #ruby
[08:13:33] aufi: has joined #ruby
[08:14:48] TomyWork: has joined #ruby
[08:15:30] tubuliferous_: has joined #ruby
[08:15:35] nerfando: has joined #ruby
[08:15:48] vdamewood: has joined #ruby
[08:16:16] cornerma1: has joined #ruby
[08:16:29] bascht: has joined #ruby
[08:16:54] ta: has joined #ruby
[08:18:52] SCHAAP137: has joined #ruby
[08:19:23] sepp2k: has joined #ruby
[08:20:45] blackms: has joined #ruby
[08:21:27] mclee: has joined #ruby
[08:21:47] tjbiddle: has joined #ruby
[08:24:59] waheedi: has joined #ruby
[08:25:02] nerfando: has joined #ruby
[08:25:06] virgil: has joined #ruby
[08:26:05] goodroot: has joined #ruby
[08:27:02] JohnT: has joined #ruby
[08:27:29] mclee: has joined #ruby
[08:27:51] sandstrom: has joined #ruby
[08:27:56] Rodya_: has joined #ruby
[08:28:01] UtkarshRay: has joined #ruby
[08:28:27] fantazo: has joined #ruby
[08:28:32] mark2: has joined #ruby
[08:28:33] hannelita: has joined #ruby
[08:30:02] edwinvdgraaf: has joined #ruby
[08:32:56] techsethi: has joined #ruby
[08:33:11] jbrhbr: has joined #ruby
[08:33:56] nerfando: has joined #ruby
[08:35:51] antgel: has joined #ruby
[08:36:56] techsethi_: has joined #ruby
[08:37:23] steffkes: has joined #ruby
[08:37:24] steffkes: has joined #ruby
[08:37:45] sjums: I want to execute a shell command with `'s, though I also want part of that command to be something user-defined, which open up for a lot of security issues. Is there a way to sanitize user-input before passing it to the shell?
[08:38:48] asmodlol: has joined #ruby
[08:39:39] shellie_: has joined #ruby
[08:40:41] Ox0dea: sjums: Are you wanting to obtain the output of said command?
[08:40:50] sjums: yes please
[08:41:12] futilegames: has joined #ruby
[08:41:14] sjums: more specific it's the output of the `file` command on a user-uploaded file
[08:41:33] sjums: I just realized I safely could rename the file to something safe
[08:42:42] Ox0dea: sjums: You can use popen with the arguments passed as an Array to avoid spawning a shell at all.
[08:43:12] sjums: and would that save me from people running commands on my server?
[08:43:32] usershell: has joined #ruby
[08:43:56] sjums: if the file for example was name "kitten.jpg && rm -r . ;"
[08:44:10] blackms: has joined #ruby
[08:44:33] andikr: has joined #ruby
[08:45:08] Macaveli: has joined #ruby
[08:45:45] Ox0dea: $ ruby -e 'name = "kitten.jpg && rm -r . ;"; p IO.popen(%W[file #{name}], &:read)'
[08:45:47] Ox0dea: "kitten.jpg && rm -r . ;: cannot open `kitten.jpg && rm -r . ;' (No such file or directory)\n"
[08:46:15] sjums: looks promising :)
[08:46:26] Ox0dea: Probably I shouldn't've used %W there, though.
[08:46:30] Hounddog: has joined #ruby
[08:46:51] Ox0dea: Just popen(['file', name]) will suffice.
[08:47:21] sjums: and if there are multiple args they just go in the array after 'file' ?
[08:48:52] kahrl: has joined #ruby
[08:49:19] Macaveli: has joined #ruby
[08:50:10] sjums: Are you by any chance Mat or are you just incredibly dedicated to ruby? :D
[08:50:12] Ox0dea: There's a wrapper around libmagic if you don't want to be parsing `file`: https://github.com/blackwinter/ruby-filemagic
[08:50:55] sjums: The great Matsumoto :b
[08:51:17] Ox0dea: Oh, yes. I'm him.
[08:51:40] astrobun_: has joined #ruby
[08:51:53] baweaver: ACTION grabs popcorn
[08:52:09] nerfando: has joined #ruby
[08:52:18] Domaldel: has joined #ruby
[08:52:34] sjums: ACTION hands baweaver some butter
[08:53:06] sjums: Yet again (for the fifth time or so) thanks for your help, Ox0dea :)
[08:53:34] Ox0dea: sjums: Ah, forgive me for not recognizing your nick. :< Happy to help, in any case.
[08:54:13] donnoc: hahaha... Ox0dea, the master of helping =D
[08:54:20] Ox0dea: It is known.
[08:54:32] blackmes1: has joined #ruby
[08:54:51] sjums: No probs! I'm just glad you're here every single time I struggle with something.
[08:57:40] Ox0dea: Relevant: https://youtu.be/Eb-DSPmeuyo?t=45
[08:57:48] Ox0dea: Just don't start calling me All Mother.
[08:58:24] usershell: has joined #ruby
[08:58:42] goodroot: has joined #ruby
[08:58:49] donnoc_: has joined #ruby
[08:58:52] blaxter: has joined #ruby
[08:59:12] asmodlol: has joined #ruby
[09:00:52] Carella: has joined #ruby
[09:01:36] nerfando: has joined #ruby
[09:01:43] consti: has joined #ruby
[09:02:03] f4cl3y: has joined #ruby
[09:02:41] kahrl: has left #ruby: ()
[09:03:21] krz: has joined #ruby
[09:05:57] tesuji: has joined #ruby
[09:06:00] Ox0dea: So "unicorn disruption" is a thing; what a time to be alive.
[09:06:35] mikecmpbll: has joined #ruby
[09:07:22] sandstrom: has joined #ruby
[09:10:04] techsethi: has joined #ruby
[09:13:11] sftrabbit: has joined #ruby
[09:15:00] goodroot: has joined #ruby
[09:15:37] Carella: has joined #ruby
[09:16:01] malconis: has joined #ruby
[09:16:51] edwinvdgraaf: has joined #ruby
[09:16:59] troulouliou_div2: has joined #ruby
[09:17:03] last_staff: has joined #ruby
[09:17:31] drptbl: has joined #ruby
[09:17:50] fclausen: has joined #ruby
[09:17:53] mondok: has joined #ruby
[09:21:26] sftrabbit: has joined #ruby
[09:22:06] sigurding: has joined #ruby
[09:23:25] donnoc: has joined #ruby
[09:23:31] hannelita: has joined #ruby
[09:24:39] phax: has joined #ruby
[09:25:03] huyderman: has joined #ruby
[09:25:15] agent_white: has left #ruby: ()
[09:26:12] einarj: has joined #ruby
[09:26:50] User458764: has joined #ruby
[09:27:21] sulky: has joined #ruby
[09:28:19] mondok: has joined #ruby
[09:28:46] dmolina: has joined #ruby
[09:33:41] techsethi: has joined #ruby
[09:33:52] blaxter: has joined #ruby
[09:38:06] srenatus: has joined #ruby
[09:39:11] srenatus: hi there. how could I find the cause when an `instance_eval &block` is raising an exception? it's a failed conversion of fixnum to string, but I have no idea which line of code even tries to do that...
[09:39:43] srenatus: I was trying to use byebug to step through the code line-by-line, but it goes directly to the `rescue` block after the `instance_eval`
[09:40:02] blur3d: has joined #ruby
[09:41:04] bronson: has joined #ruby
[09:42:05] canton7: what is the stack trace?
[09:42:34] skade: has joined #ruby
[09:42:37] ur5us: has joined #ruby
[09:43:29] srenatus: the call to instance_eval, basically
[09:43:36] srenatus: and what led up to it
[09:45:31] matp_: has joined #ruby
[09:46:06] DriesS: has joined #ruby
[09:47:32] usershell: has joined #ruby
[09:47:49] marr: has joined #ruby
[09:47:50] ruby[bot]: -b *!*@gateway/web/cgi-irc/kiwiirc.com/ip.209.95.35.50$#ruby-banned
[09:48:08] Carella: has joined #ruby
[09:48:17] colegatron: has joined #ruby
[09:48:22] Macaveli: has joined #ruby
[09:48:27] nettoweb: has joined #ruby
[09:49:41] Ox0dea: srenatus: Post code?
[09:51:55] kknight: has joined #ruby
[09:52:18] tvw: has joined #ruby
[09:52:22] matp: has joined #ruby
[09:52:29] srenatus: Ox0dea: hmm, haven't prepared a MWE; can't post much: https://gist.github.com/srenatus/90e300d5a081c0d7068b
[09:52:30] d0nn1e: has joined #ruby
[09:55:20] blackmes1: has joined #ruby
[09:55:23] Ox0dea: srenatus: It's a long shot, but are you using Regexp.quote?
[09:55:41] srenatus: Ox0dea: I appreciate the long shot, but I am not :)
[09:56:21] krz: has joined #ruby
[09:57:00] Xeago: has joined #ruby
[09:57:19] Macaveli: has joined #ruby
[09:57:28] Ox0dea: srenatus: I think you might be. :P
[09:58:06] Ox0dea: srenatus: https://git.io/vz8Ue
[09:58:26] randym_: has joined #ruby
[09:58:36] srenatus: hehe Ox0dea just found that myself -- to my huge surprise
[09:58:38] kknight: hello i want to include timer in my code which print ok after 80 sec https://gist.github.com/aj07/879111f4a82f67f1d4db
[09:58:46] kknight: but not working any idea?
[09:59:00] srenatus: Ox0dea: so... I should not? ;)
[09:59:16] Ox0dea: >> Regexp.quote(1) rescue $! # srenatus
[09:59:17] ruby[bot]: Ox0dea: # => #<TypeError: no implicit conversion of Fixnum into String> (https://eval.in/504506)
[09:59:22] avril14th: has joined #ruby
[09:59:39] Ox0dea: That's the only thing I can find that produces that exact error message.
[09:59:56] srenatus: Ox0dea: ok, I'll dig into that. thank you so much
[09:59:58] rodfersou: has joined #ruby
[10:00:04] Ox0dea: srenatus: Sure thing. :)
[10:00:08] Ox0dea: Godspeed. :P
[10:00:42] kknight: Ox0dea: please review my query
[10:00:56] platzhirsch: has joined #ruby
[10:01:37] DaniG2k: has joined #ruby
[10:02:06] srenatus: Ox0dea: nah, no luck. :)
[10:02:18] lipoqil: has joined #ruby
[10:02:22] Bish: kknight: What does Timeout::timeout do?
[10:02:46] kknight: it will wait for 5 sec
[10:02:58] kknight: after i wwant to write puts 'ok'
[10:03:10] kknight: that thing i want to implement
[10:03:28] dwfait: has joined #ruby
[10:03:33] Bish: so you want 'sleep 5; puts "ok"' ?
[10:03:56] kknight: no need of Timeout::timeout do
[10:04:07] Bish: no, i just want to say, it's a weird place to put the timeout
[10:04:32] Bish: in this case, the return value of "Timeout::timout" gets put into the string, if it doesn't return anything, it will be empty (at that place)
[10:04:44] pawnbox: has joined #ruby
[10:04:45] Bish: try to print the whole HTTP response to console
[10:05:12] Ox0dea: Timeout.timeout without a block is an error, mind.
[10:05:22] Ox0dea: srenatus: I can't think what else it could be. :<
[10:05:50] Ox0dea: That Regexp.quote raises that error and you've got a Regexp.quote in your library can't be a coincidence. :P
[10:06:02] Bish: Ox0dea: didn't even know timeout is a module, he hasn't included that one
[10:06:03] Ox0dea: It's just a matter of figuring out how the hell @module becomes a Fixnum.
[10:06:28] joneshf-laptop: has joined #ruby
[10:06:47] Matewz_br: has joined #ruby
[10:06:48] blackgoat: has joined #ruby
[10:06:52] Ox0dea: Bish: Observe the double-spacing.
[10:07:04] kknight: Bish: actual problem i have posted as comment https://gist.github.com/aj07/879111f4a82f67f1d4db
[10:07:21] kknight: tell me m i heading in right direction or not
[10:08:47] Bish: kknight: well, in terms of http response: add r\n after the timeout, and i wouldn't use timeout either way, since that is not what it does
[10:09:02] Bish: Timeout::timeout ensures that something does take NOT longer than x seconds
[10:09:51] kknight: there i want to put ok msg after 80
[10:10:06] Bish: yeah than sleep 80 seconds before sending it, it's simple as that
[10:10:16] Bish: >> sleep 0.5; "0.5 seconds have passed"
[10:10:17] kknight: for that do sleep(80); puts "ok" work?
[10:10:18] ruby[bot]: Bish: # => "0.5 seconds have passed" (https://eval.in/504508)
[10:10:40] rdark: has joined #ruby
[10:10:47] Bish: >> x=Time.now;sleep 0.5; "#{Time.now-x} seconds have passed"
[10:10:48] ruby[bot]: Bish: # => "0.5005352 seconds have passed" (https://eval.in/504510)
[10:10:56] pawnbox: has joined #ruby
[10:11:11] Bish: geez ruby is slow.
[10:12:04] srenatus: Ox0dea: I commented that line out ;) so, no more Regexp.quote except for in some specs
[10:12:05] FernandoBasso: has joined #ruby
[10:12:10] kknight: i have to include those block in place of timeout?
[10:12:52] Bish: no, timeout wants a block, but you don't need timeout at all
[10:13:18] Bish: you want "sleep 80"
[10:13:18] kknight: which line i have to make ammend?
[10:13:38] Bish: i'd say before the http headers or after it, i don't know the http protocol as well
[10:14:15] Bish: guess after 'em
[10:15:26] aganov: has joined #ruby
[10:15:49] goodroot: has joined #ruby
[10:17:47] DefV: Is there a Set implementation in ruby core that's ordered?
[10:18:27] dtordable: has left #ruby: ()
[10:19:54] Ox0dea: >> require 'set'; SortedSet[2, 1, 3] # DefV
[10:19:55] ruby[bot]: Ox0dea: # => #<SortedSet: {1, 2, 3}> (https://eval.in/504516)
[10:20:00] Ox0dea: srenatus: I can't find it. :<
[10:20:08] Ox0dea: It's weird you don't have more information in the backtrace.
[10:20:37] Carella: has joined #ruby
[10:21:07] DefV: Ox0dea: not what I mean, I mean something that keeps the insertion order
[10:21:21] Ox0dea: DefV: Hashes already do that.
[10:21:25] anisha: has joined #ruby
[10:21:25] jamw: has joined #ruby
[10:21:26] Ox0dea: They have for a very long time.
[10:21:46] Ox0dea: Set is implemented in terms of Hash, to clarify.
[10:22:48] DefV: But that's an implementation detail, not a promise
[10:24:30] Ox0dea: Looks like MRI, JRuby, and Rubinius all maintain insertion order.
[10:25:29] DefV: still implementation detail
[10:25:41] DefV: documentation makes explicit notice that a Set is unordered
[10:25:51] Ox0dea: SortedSet.
[10:26:19] DefV: same thing as in MySQL results are unordered unless order is specified, but due to implementation you mostly get them sorted by id
[10:26:23] DefV: it's not a given
[10:27:38] Ox0dea: >> require 'set'; s = Set.new; ns = [*1..100].shuffle; ns.each { |n| s.add n }; s.to_a == ns
[10:27:39] ruby[bot]: Ox0dea: # => true (https://eval.in/504527)
[10:27:59] stamina: has joined #ruby
[10:28:14] DefV: I _know_ the current implementation is ordered as inserted
[10:28:24] DefV: I'm just saying that documentation doesn't promise it
[10:28:52] DefV: And I really don't want to write a unit test to check that set keeps order
[10:29:09] Ox0dea: Then don't. It does.
[10:29:17] DefV: Until Ruby 3.0 doens't
[10:29:20] DefV: doesn't*
[10:29:29] jgt: has joined #ruby
[10:30:05] Ox0dea: I'd be willing to bet.
[10:30:08] ldnunes: has joined #ruby
[10:30:21] Rodya_: has joined #ruby
[10:30:27] fclausen: has joined #ruby
[10:30:32] Bish: kinda offtopic: does somebody know how emails get seperated when put into a file by postfix?
[10:30:40] Bish: i want to parse them with Mail.new
[10:31:36] kknight: hello bish thanks for help i this programm https://gist.github.com/aj07/09c9cfd0977f4dda70e6
[10:31:41] kknight: and it works
[10:32:04] Bish: :D that works :DD?
[10:32:17] ljarvis: knight_: dont rescue Exception
[10:32:39] ljarvis: i read the code properly
[10:32:40] kknight: explain little
[10:33:05] blackmes1: has joined #ruby
[10:33:05] kknight: one more thing i want to i mplement
[10:33:09] ljarvis: I see why you're doing it here, but in general you should avoid it because it catches even stuff like LoadError or SyntaxError
[10:33:36] Bish: there is no need to catch anything there, either way
[10:33:44] kknight: one more thing i want to include - Exposes a GET API as "api/serverStatus"
[10:33:44] kknight: This API returns all the running requests on the server with their time left for
[10:33:44] kknight: completion. E.g {"2":"15","8":"10"} where 2 and 8 are the connIds and 15 and 10
[10:33:44] kknight: is the time remaining for the requests to complete (in seconds).
[10:33:48] ljarvis: no just realised that's only for printing the time
[10:33:52] ljarvis: so it's pointless
[10:33:53] Ox0dea: Bish, ljarvis: See any similarities? https://eval.in/504527
[10:34:13] ljarvis: that copy paste
[10:34:18] Ox0dea: They're just throwing shit at the wall. :(
[10:34:36] Bish: im not throwing shit :(
[10:35:41] Bish: kknight: your homework sucks
[10:35:44] kknight: bish if i want to show timming as well means how much time left like countdown then what to do?
[10:36:11] Bish: im assuming you got this start-code from the start
[10:36:24] rodferso1: has joined #ruby
[10:36:35] Bish: your code only handles one connection at a time => you cannot have another request, while the first waits for x seconds
[10:36:52] Bish: so the complete thing has to be changed in order to do what you want to do
[10:37:02] ljarvis: please dont ask them to start thinking about threads
[10:37:11] Bish: you just did that, i didn't
[10:37:14] ljarvis: it's bad enough as it is
[10:39:37] Bish: https://practicingruby.com/articles/implementing-an-http-file-server lol, i found his code
[10:39:46] Ox0dea: On a related note, I'm using Timeout and threads to detect keyup events in the terminal. :P
[10:40:03] Bish: Threads are great, especially in ruby :3
[10:40:07] Ox0dea: Bish: That's why I pointed out the double-spacing.
[10:40:19] jackcom: has joined #ruby
[10:40:19] ChanServ: +b jackcom!*@*
[10:40:19] ChanServ: ChanServ kicked jackcom: trolling
[10:40:19] ljarvis: timeout sucks
[10:40:19] ruby[bot]: +bb *!*@unaffiliated/jackcom$#ruby-banned $a:jackcom$#ruby-banned
[10:40:21] ruby[bot]: -b+b jackcom!*@* jackcom!*@*$#ruby-banned
[10:40:33] Ox0dea: It's not great, but it works for determining a user's key repeat rate.
[10:40:42] Bish: jackcom finally got removed? thankgod.
[10:40:50] ruby[bot]: -bbb *!*@unaffiliated/jackcom$#ruby-banned $a:jackcom$#ruby-banned jackcom!*@*$#ruby-banned
[10:44:46] arup_r: has joined #ruby
[10:44:55] donnoc: has joined #ruby
[10:47:11] pandaant: has joined #ruby
[10:48:22] dfinninger: has joined #ruby
[10:49:28] usershell: has joined #ruby
[10:53:05] CloCkWeRX: has joined #ruby
[10:53:11] f4cl3y: has joined #ruby
[10:56:32] srenatus: Ox0dea: turns out you can call `instance_eval` either with string, filename, line_no OR with a block. what is not possible (and leads to my error) is `instance_eval(filename, line_no) &block`
[10:57:23] srenatus: >> instance_eval("filename", 1) &Proc.new { puts "hi there" } rescue $!
[10:57:24] ruby[bot]: srenatus: # => #<TypeError: no implicit conversion of Fixnum into String> (https://eval.in/504535)
[10:58:14] Ox0dea: >> instance_eval('', 1) rescue $! # srenatus
[10:58:15] ruby[bot]: Ox0dea: # => #<TypeError: no implicit conversion of Fixnum into String> (https://eval.in/504536)
[10:59:22] Ox0dea: The filename and lineno arguments are for reporting errors in case evaluating the string goes badly.
[11:00:06] Ox0dea: >> instance_eval('foo', 'bar.rb', 42) rescue $!.backtrace[0]
[11:00:07] ruby[bot]: Ox0dea: # => "bar.rb:42:in `<main>'" (https://eval.in/504538)
[11:01:16] srenatus: Ox0dea: yup, which is great. there's just no way to give it any information where that block came from, right?
[11:01:23] srenatus: which is what I was trying to do...
[11:01:26] casadei: has joined #ruby
[11:01:42] Ox0dea: srenatus: I'm not sure how you mean.
[11:02:07] Ox0dea: There's Proc#source_location, if that's what you were going for.
[11:02:38] srenatus: Ox0dea: exactly, and when I pass that block to instance_eval, I could give it source and line_no information from that. or will it figure that out from Proc#source_location itself?
[11:03:25] Ox0dea: It'll report the call site for the #instance_eval.
[11:03:37] srenatus: yup. ok, great.
[11:03:46] srenatus: Ox0dea: thanks for your help
[11:03:59] Ox0dea: Sure thing.
[11:04:58] Ox0dea: Hm... evaluating a String and a block at the same time.
[11:05:09] Ox0dea: For science, of course.
[11:06:11] Ox0dea: >> begin; eval '_(&_){}'; rescue SyntaxError; $! end
[11:06:12] ruby[bot]: Ox0dea: # => #<SyntaxError: (eval):1: both block arg and actual block given> (https://eval.in/504542)
[11:06:31] ur5us: has joined #ruby
[11:06:35] Ox0dea: Shame about that being a syntax error; can't preempt the parser. :/
[11:06:48] curses: has joined #ruby
[11:08:42] chouhoulis: has joined #ruby
[11:08:46] goodroot: has joined #ruby
[11:09:04] Bish: >> begin; eval '_(&_){}'; rescue ; $! end
[11:09:05] ruby[bot]: Bish: # => (eval):1: both block arg and actual block given (SyntaxError) ...check link for more (https://eval.in/504543)
[11:09:21] Bish: >> begin; eval '_(&_){}'; rescue ; puts "wayho";$! end
[11:09:22] ruby[bot]: Bish: # => (eval):1: both block arg and actual block given (SyntaxError) ...check link for more (https://eval.in/504544)
[11:09:40] Bish: so rescue without anything does only catch StandardError?
[11:10:46] rodfersou: has joined #ruby
[11:11:20] User458764: has joined #ruby
[11:11:26] hannelita: has joined #ruby
[11:11:42] binaryplease: has joined #ruby
[11:13:02] duckson: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[11:14:18] Ox0dea: And any of its descendants.
[11:14:41] Carella: has joined #ruby
[11:16:47] virgil: has joined #ruby
[11:17:20] kerunaru: has joined #ruby
[11:17:30] Ox0dea: >> ObjectSpace.each_object(Class).select { |c| c < Exception unless c < StandardError }
[11:17:31] ruby[bot]: Ox0dea: # => [SystemStackError, NoMemoryError, SecurityError, NotImplementedError, LoadError, SyntaxError, Script ...check link for more (https://eval.in/504548)
[11:17:37] Ox0dea: There's all the ones a bare `rescue` won't catch.
[11:17:56] sgambino: has joined #ruby
[11:18:10] Ox0dea: Er, that second one should've been <=.
[11:18:30] gaussblurinc1: has joined #ruby
[11:19:03] gaussblurinc1: hi! who should write tests in big team? code author?
[11:19:59] Ox0dea: Managers.
[11:20:01] sftrabbit: has joined #ruby
[11:21:53] Carella: Depends on your team and your process
[11:22:33] FooMunki: has joined #ruby
[11:23:22] snowy: has joined #ruby
[11:23:51] canton7: .. and the sorts of tests you're talking about
[11:27:01] last_staff: has joined #ruby
[11:28:41] dlitvak: has joined #ruby
[11:29:27] blackmes1: has joined #ruby
[11:30:38] aspiers: has joined #ruby
[11:31:11] Rodya_: has joined #ruby
[11:31:30] x0F_: has joined #ruby
[11:31:50] Pupeno: has joined #ruby
[11:31:56] Pupeno: has joined #ruby
[11:35:07] bkxd: has joined #ruby
[11:35:15] donnoc: Manager is a good idea
[11:35:16] jgt: has joined #ruby
[11:35:59] jhass: Ox0dea: this is why these kind of jokes don't work on IRC
[11:36:06] f4cl3y: has joined #ruby
[11:36:51] donnoc: jhass: why?
[11:37:00] sigurding: has joined #ruby
[11:37:50] techsethi: has joined #ruby
[11:37:54] Ox0dea: https://cucumber.io/pro
[11:37:56] Ox0dea: > User friendly platform designed for product owners, business analysts and team managers
[11:38:23] ddv: Customers don't care honestly
[11:38:47] jhass: I didn't hear too many "worked well for us" reports about that
[11:39:13] Ox0dea: I was being facetious. Cucumber is a joke that got taken way too seriously.
[11:39:55] howdoicomputer: has joined #ruby
[11:43:14] asdecvd: has joined #ruby
[11:46:54] pawnbox_: has joined #ruby
[11:48:08] Nuck: has joined #ruby
[11:49:41] ympeg: has joined #ruby
[11:49:58] binaryplease: has joined #ruby
[11:50:32] binaryplease: has joined #ruby
[11:50:42] yardenbar: has joined #ruby
[11:52:46] baweaver: has joined #ruby
[11:53:54] lidenbrock: has joined #ruby
[11:54:42] rodfersou: has joined #ruby
[11:54:51] asdecvd: has left #ruby: ()
[11:55:58] dlitvak: has joined #ruby
[11:56:01] pawnbox__: has joined #ruby
[11:57:51] Carella: has joined #ruby
[11:58:14] lxsameer: has joined #ruby
[11:58:26] nettoweb: has joined #ruby
[11:59:25] rickmasta: has joined #ruby
[12:02:04] sftrabbit: has joined #ruby
[12:03:13] matp_: has joined #ruby
[12:04:04] chthon: has joined #ruby
[12:05:51] rikkipitt: has joined #ruby
[12:06:15] edwinvdgraaf: has joined #ruby
[12:06:52] matp: has joined #ruby
[12:07:20] bartavelle: has joined #ruby
[12:07:22] bartavelle: has left #ruby: ("Ex-Chat")
[12:09:10] BSaboia: has joined #ruby
[12:09:25] chouhoulis: has joined #ruby
[12:09:39] goodroot: has joined #ruby
[12:11:15] yorickpeterse: but now your non developers can write tests for your business systems
[12:11:23] yorickpeterse: even the janitor can do it!
[12:11:44] gbgdev: has joined #ruby
[12:13:24] roshanav_: has joined #ruby
[12:13:36] karapetyan: has joined #ruby
[12:15:23] karapetyan: has joined #ruby
[12:15:43] binaryplease: has joined #ruby
[12:16:27] matp: has joined #ruby
[12:17:31] sftrabbit: has joined #ruby
[12:17:44] norc: has joined #ruby
[12:19:17] nettoweb: has joined #ruby
[12:21:28] emilkarl: has joined #ruby
[12:21:28] quaristice: has joined #ruby
[12:22:08] jamw: has joined #ruby
[12:22:25] tvw: has joined #ruby
[12:24:25] mloy_: has joined #ruby
[12:25:26] krz: has joined #ruby
[12:25:31] mikecmpbll: has joined #ruby
[12:28:09] peeja: has joined #ruby
[12:28:18] karapetyan: has joined #ruby
[12:28:56] sergey_makagon: has joined #ruby
[12:32:38] Rodya_: has joined #ruby
[12:34:41] sftrabbit: has joined #ruby
[12:34:44] Ropeney: has joined #ruby
[12:35:03] karapetyan: has joined #ruby
[12:35:47] lucasb: has joined #ruby
[12:35:47] DoubleMalt: has joined #ruby
[12:35:56] skade: has joined #ruby
[12:37:14] arup_r: has joined #ruby
[12:37:42] aupadhye: has joined #ruby
[12:38:06] pawnbox: has joined #ruby
[12:38:16] karapetyan: has joined #ruby
[12:40:20] howdoicomputer: has joined #ruby
[12:41:53] jgt: has joined #ruby
[12:42:22] jaiks: has joined #ruby
[12:42:25] bronson: has joined #ruby
[12:43:19] apeiros: hehe, cheap colored nicknames in a cli irc log:
[12:43:20] apeiros: ColorPalette = [31,32,33,34,35,36,37].cycle
[12:43:23] apeiros: Colors = Hash.new { |h,k| h[k] = ColorPalette.next }
[12:43:28] rodferso1: has joined #ruby
[12:43:29] apeiros: color = Colors[nick]
[12:44:32] arup_r: has joined #ruby
[12:44:57] ddv: I'm not cheap, apeiros
[12:45:48] apeiros: but you're pink
[12:46:27] dlitvak: has joined #ruby
[12:47:02] sftrabbit: has joined #ruby
[12:47:03] Xeago: has joined #ruby
[12:47:47] Macaveli: has joined #ruby
[12:48:29] fsapo: has joined #ruby
[12:50:03] Jardayn: has joined #ruby
[12:51:04] aryaching: has joined #ruby
[12:51:21] casadei: has joined #ruby
[12:51:46] jhass: and pink is cheap because...
[12:52:19] mikecmpbll: i'm breaking a file into predefined chunks, but I'm trying to do it in the most memory efficient way possible, so allowing the user of the method to get an array of the chunks, or if they're more memory concerned just each chunk one by one. at the top is my first implementation, using a block, then I thought maybe this is where enumberable::lazy comes in to it's own so I tried to refactor it
[12:52:31] usershell: has joined #ruby
[12:52:33] mikecmpbll: my question is, because I'm using map is ruby still building the full array of all the chunks internally? https://gist.github.com/mikecmpbll/1152878079ba0f175b24
[12:52:39] mikecmpbll: even with using lazy
[12:53:54] kimegede: has joined #ruby
[12:54:21] mikecmpbll: the idea being, with `chunk2`, they cal call chunk2.to_a to get them all, or chunk2.each{ |c| ... }, i was hoping with the latter that only one chunk will need to be stored in memory at a time
[12:54:44] apeiros: break_points.each_cons(2).each # <-- uh? :)
[12:54:57] rodfersou: has joined #ruby
[12:55:00] lacrymology: has joined #ruby
[12:55:04] linduxed: has joined #ruby
[12:55:17] pawnbox: has joined #ruby
[12:55:58] jgt: has joined #ruby
[12:55:59] apeiros: Enumerator::Lazy#map returns an Enumerator::Lazy
[12:56:11] apeiros: i.e. not an array. so it'll not build an array.
[12:57:08] mikecmpbll: yeah, but when .each is called on that, all blocks get evaluated on each item, and at that point i'm wondering whether ruby is building up that array for the return value of map
[12:57:12] BTRE: has joined #ruby
[12:57:29] mikecmpbll: not sure that sentence made any sense, hard to explain what i mean ;<
[12:57:41] apeiros: mikecmpbll: the more idiomatic approach is to drop chunk2 and instead have `return enum_for(__method__) unless block_given?` as first line in #chunk
[12:57:52] sdothum: has joined #ruby
[12:58:04] karapetyan: has joined #ruby
[12:58:16] apeiros: mikecmpbll: calling .each on Enumerator::Lazy#map does not create an array either.
[12:58:31] emilford: has joined #ruby
[12:59:23] apeiros: mikecmpbll: you can test that by printing out in the map and the appended each. if it'd build an array, all prints from map would be consecutively. but since it doesn't build an array, it'll be interleaved with the prints from .each.
[13:00:04] mikecmpbll: ack. of course.
[13:00:24] synthroid: has joined #ruby
[13:00:47] mikecmpbll: okay, that's allayed my concerns, thanks!
[13:01:15] apeiros: commented :-)
[13:01:27] vikas027: has joined #ruby
[13:02:03] mikecmpbll: i've never seen enum_for before! looks great, researching now
[13:02:41] ddv: allayed?
[13:03:11] mikecmpbll: ddv : http://dictionary.reference.com/browse/allayed
[13:05:38] Xeago: has joined #ruby
[13:05:42] jottr: has joined #ruby
[13:08:39] Carella: has joined #ruby
[13:09:31] Anderson69s_Deb: has joined #ruby
[13:10:09] chouhoulis: has joined #ruby
[13:10:44] goodroot: has joined #ruby
[13:13:23] pulgolino: has joined #ruby
[13:13:41] Pathfinder: has joined #ruby
[13:13:41] ferr: has joined #ruby
[13:14:06] jottr: has joined #ruby
[13:19:51] huluhuluhulu: has joined #ruby
[13:19:59] Rodya_: has joined #ruby
[13:22:36] mfb2_: has joined #ruby
[13:26:09] dlitvak: has joined #ruby
[13:26:48] decoponio: has joined #ruby
[13:28:11] govg: has joined #ruby
[13:28:11] duckpuppy: has joined #ruby
[13:29:06] astrofog: has joined #ruby
[13:29:10] durstburger: has joined #ruby
[13:38:26] dfinninger: has joined #ruby
[13:39:22] drptbl: has joined #ruby
[13:39:31] emilford: has joined #ruby
[13:40:57] Pupeno: has joined #ruby
[13:41:06] jaiks: has joined #ruby
[13:41:18] Carella: has joined #ruby
[13:41:48] droidburgundy: has joined #ruby
[13:41:49] Ropeney: has joined #ruby
[13:43:58] DirtyFInn: has joined #ruby
[13:44:12] sftrabbit: has joined #ruby
[13:45:15] nerium: has joined #ruby
[13:46:35] aegis3121: has joined #ruby
[13:47:54] dwfait: has joined #ruby
[13:48:07] saush: has joined #ruby
[13:48:37] saush: How to make changes in my ruby gem files?
[13:48:50] dstarh: has joined #ruby
[13:48:52] govg: has joined #ruby
[13:48:59] binaryplease: has joined #ruby
[13:49:06] jhass: saush: why do you want to? there's probably a better way
[13:49:08] johnbburg: has joined #ruby
[13:49:41] saush: I want to make changes in some file to test the code
[13:51:02] joonty: has joined #ruby
[13:51:44] ruby[bot]: Please add more context to your question, what are you doing, why are you doing it, which libraries are involved. Post some code to gist if it clarifies your question.
[13:51:46] Carella: has joined #ruby
[13:51:53] emilford: has joined #ruby
[13:52:11] B1n4r10: has joined #ruby
[13:52:32] aryaching: has joined #ruby
[13:54:11] saush: I am having a ruby gem installed which contains C++ files. I want to make changes in the function of that file so that I can test me required output. I tried to simply modify and save the file but its not working.
[13:54:27] baweaver: has joined #ruby
[13:55:25] rns: has joined #ruby
[13:55:35] workmad3_: has joined #ruby
[13:57:55] hxegon: has joined #ruby
[13:57:57] sgambino: has joined #ruby
[13:58:08] nfk|laptop: has joined #ruby
[13:58:19] imperator: has joined #ruby
[13:59:37] imperator: i'm having trouble getting acl_get_tag_type to work on Linux with FFI. Any ideas? https://gist.github.com/djberg96/d95e28e0b8eac67be208
[13:59:45] saush: jhass : Can I maybe change the path of my gem to point my local directory copy of it?
[14:00:38] workmad3: has joined #ruby
[14:01:07] jhass: saush: not easily with rubygems, you can add to the load path by using the -I flag to ruby or modifying the Ruby global $LOAD_PATH, or you can use bundler which offers a more convenient way to do what you want
[14:01:08] aegis3121: saush: if you're using a Gemfile, definitely. gem 'my_gem', path: '/path/to/project'
[14:01:37] binaryplease: has joined #ruby
[14:01:56] steffkes: has joined #ruby
[14:01:57] steffkes: has joined #ruby
[14:02:26] apeiros: saush: `gem which NAME`
[14:02:32] apeiros: shows you the path of the installed gem
[14:02:46] apeiros: but IMO get a copy from the repo and don't install the gem
[14:03:41] saush: aegis3121 : Do I need to add that to my local directory Gemfile?
[14:04:05] aegis3121: whatever the consuming project is, ya
[14:04:48] shinnya: has joined #ruby
[14:05:20] anagha_: has joined #ruby
[14:05:37] mfb2: has joined #ruby
[14:06:58] lacrymology: has joined #ruby
[14:07:12] Carella: has joined #ruby
[14:07:29] saush: aegis3121 : I added into Gemfile but its not working.
[14:08:07] saush: aegis3121 : Still `gem which gem_name` gives the original location
[14:08:24] roshanavand: has joined #ruby
[14:08:54] jhass: saush: bundle show gem_name
[14:08:55] aegis3121: That will affect which version the consuming project uses; for trying to simply run the gem, I'm pretty sure it won't. I apologize if I misunderstood your problem :/
[14:09:01] jhass: and bundle exec your_command
[14:09:15] roshanavand: has joined #ruby
[14:09:53] anagha_: how can you define an index function?Is it necessary to define that for models?
[14:10:32] cdg: has joined #ruby
[14:10:47] rodfersou: has joined #ruby
[14:10:55] chouhoulis: has joined #ruby
[14:11:16] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[14:11:29] goodroot: has joined #ruby
[14:11:37] skade: has joined #ruby
[14:12:36] Jackneill: has joined #ruby
[14:13:32] cfinley_: has joined #ruby
[14:15:19] ympeg: has joined #ruby
[14:15:25] karapetyan: has joined #ruby
[14:15:34] yalue: has joined #ruby
[14:15:46] rodferso1: has joined #ruby
[14:16:44] saush: jhass : Now I can't figure it out but bundle show gem_name is giving me error
[14:16:45] mikecmpbll: if you have an array of objects that you're regularly/repeatedly checking to see if it contains another object, i.e. objects.include?(other), is it ever sensible to make that a hash because hash key lookups are so much faster than array.include? ? even though the hash values are not relevant
[14:17:00] saush: Could not locate Gemfile or .bundle/ directory
[14:17:20] apeiros: mikecmpbll: you realize that "array of objects" is redundant? :)
[14:17:22] jhass: saush: then you don't run it in the directory where your Gemfile is
[14:17:24] headius: Ox0dea: maintaining insertion order was made required behavior around 1.9.2 I believe
[14:17:43] mikecmpbll: apeiros: not sure what you mean, so no probably not :D
[14:17:44] apeiros: headius: oh, interesting, no 1.9.0?
[14:17:45] headius: we resisted for a while but it was clear people wanted predictable iteration order of k/v pairs
[14:17:49] TomPeed: has joined #ruby
[14:17:53] mikecmpbll: i was thinking like lookup = Hash[objects.map{ |o| [o, nil] }]; lookup.key?(other)
[14:17:55] apeiros: mikecmpbll: have you seen arrays of non-objects?
[14:18:02] mikecmpbll: oh right, yeah.
[14:18:02] headius: apeiros: well, might have been around then...I don't consider 1.9.0 or 1.9.1 viable releases
[14:18:30] jhass: mikecmpbll: looks like a Set
[14:18:36] apeiros: headius: ah, ok. given that I don't even consider 1.9.2 a viable release (but much more viable than <=1.9.1)
[14:18:52] jhass: mikecmpbll: but benchmark your case, the tradeoff of conversion can be greater than the lookup gain
[14:19:01] apeiros: mikecmpbll: and yeah, Set is what you want.
[14:19:15] apeiros: ACTION still sad that Set's set operations are slower than Array's :(
[14:19:16] mikecmpbll: i just did some benchmarks on a size 1000 array and the hash key lookup was ~20x faster
[14:19:23] mikecmpbll: zomg, sets. knew i forgot something.
[14:19:43] apeiros: mikecmpbll: it'll get worse on average the more items you have :)
[14:20:02] headius: apeiros: yeah, ditto
[14:20:07] apeiros: mikecmpbll: important, though: Array#include? is based on ==, Set#include? is based on #hash + #eql?
[14:20:09] headius: I think it's the first one that was at least usable though
[14:20:15] mikecmpbll: benchmarking set now
[14:20:24] saush: jhass : Could not find gem 'nmatrix-0.2.1' in source at `.`. I am getting this error in my Gemfile directory
[14:20:24] zerowaitstate: has joined #ruby
[14:20:29] Meow-J: has joined #ruby
[14:20:45] apeiros: headius: yeah, it still had a few kinks which got largely resolved in 1.9.3
[14:20:51] jhass: saush: so the path you've given is wrong (does not contain an appropriate .gemspec)
[14:20:53] apeiros: stuff like instance_eval not yielding self anymore :)
[14:21:27] jhass: saush: might also because the version you requested in the Gemfile is different than from what you've given the path to
[14:21:33] apeiros: also some weird things regarding encodings. had to patch a lib of mine to do Encoding#to_s because some methods wouldn't accept an encoding instance, only an encoding name???
[14:22:09] headius: yeah I think there were a lot of m17n/encoding fixes in 1.9.3
[14:22:25] headius: key internal things
[14:22:34] ItSANgo: has joined #ruby
[14:22:41] apeiros: ACTION still waits for collation support in strings :<
[14:22:41] headius: 1.9.x was just a huge change...I suppose it's not surprising it took several revisions to iron out
[14:22:49] mikecmpbll: yep, that's better, sets are fast. duh
[14:22:52] headius: collation?
[14:22:58] jamuraa: has joined #ruby
[14:23:01] apeiros: collations define comparisons
[14:23:13] arup_r: has joined #ruby
[14:23:15] apeiros: e.g. whether "a", "??" or "??" is sorted first
[14:23:21] djcp: has joined #ruby
[14:23:29] saush: jhass : Let me clarify. The path I am supposed to give in my gemfile is current gemfile path? or the path of my actually installed gem?
[14:23:57] apeiros: I'm not sure but collations might also include information about case-mapping
[14:24:32] jhass: saush: neither, it's the path to the working copy of the gem you want to work on while using it in your Gemfile's project at the same time
[14:26:06] VeryBewitching: has joined #ruby
[14:26:13] sharkman: has joined #ruby
[14:26:28] sankaber: has joined #ruby
[14:26:47] malconis: has joined #ruby
[14:26:56] harai: has joined #ruby
[14:27:08] saush: jhass : I am adding this in my Gemfile. gem 'nmatrix-0.2.1', path: "/home/saurabh/Music/nmatrix"
[14:27:23] saush: jhass : I have cloned nmatrix over here
[14:28:41] jhass: the gem name is probably wrong
[14:28:55] jhass: don't include the version
[14:29:29] virgil: has joined #ruby
[14:30:59] beast: has joined #ruby
[14:31:00] saush: jhass : Well now 'bundle show nmatrix' gives => /home/saurabh/Music/nmatrix
[14:31:14] jhass: interesting
[14:31:20] User458764: has joined #ruby
[14:33:17] apeiros: that looks correct?
[14:33:36] tjohnson: has joined #ruby
[14:33:49] ESpiney: has joined #ruby
[14:34:23] krz: has joined #ruby
[14:34:23] karapetyan: has joined #ruby
[14:34:42] jhass: well, it's interesting in case they didn't fix the name
[14:34:51] Gadgetoid: has joined #ruby
[14:34:53] malconis: has joined #ruby
[14:35:26] mfb2: has joined #ruby
[14:35:42] mrchris: has joined #ruby
[14:35:52] Tempesta_: has joined #ruby
[14:36:29] B1n4r10: has joined #ruby
[14:37:45] varesa-: has joined #ruby
[14:38:19] kobain: has joined #ruby
[14:38:20] dostoyevsky: Is code in set_trace_func not traced or are there certain constraints into what code is allowed in a trace_func?
[14:38:57] victortyau: has joined #ruby
[14:39:01] dostoyevsky: > Tracing is disabled within the context of proc.
[14:41:03] howdoicomputer: has joined #ruby
[14:41:07] Pupeno: has joined #ruby
[14:41:19] roshanavand: has joined #ruby
[14:42:05] Tempesta: has joined #ruby
[14:43:00] saush: has joined #ruby
[14:43:26] saush: jhass : Sorry Connection problems.
[14:43:34] Rodya_: has joined #ruby
[14:43:45] saush: jhass : now 'bundle show nmatrix' gives => /home/saurabh/Music/nmatrix. What to do next?
[14:44:26] dlitvak: has joined #ruby
[14:45:23] jhass: bundle exec whatever
[14:45:41] bronson: has joined #ruby
[14:47:20] saush: jhass : I want to make changes in cpp file. So should it go bundle exec filename?
[14:47:38] howdoi: has joined #ruby
[14:47:48] rikkipitt: has joined #ruby
[14:48:18] jhass: make the changes
[14:48:26] jhass: run bundle again in the project using it
[14:48:32] jhass: run the project using it with bundle exec
[14:48:44] peeja: has joined #ruby
[14:48:53] chthon: has joined #ruby
[14:48:58] jhass: or actually I never did that with a project using a C ext
[14:49:10] jtnegrotto: has joined #ruby
[14:49:12] jhass: you probably have to rebuilt the extension and there's probably a rake task for it
[14:49:16] jhass: check rake -aT in the gem
[14:49:52] imperator: mornin' jhass
[14:50:06] Frem: has joined #ruby
[14:50:17] saush: jhass : It gives me a long output!
[14:50:26] jhass: thanks for the information!
[14:51:17] drptbl: has joined #ruby
[14:53:15] Macaveli: has joined #ruby
[14:53:24] imperator: make changes? is there a glitch in the nmatrix?
[14:54:09] troulouliou_div2: has joined #ruby
[14:54:41] saush: jhass : I made my changes. Running bundle exec nmatrix gives 'Your Gemfile lists the gem nmatrix (>= 0) more than once.'
[14:54:42] sgambino_: has joined #ruby
[14:55:08] jhass: well then don't
[14:55:13] jhass: (list it more than once)
[14:55:16] gbgdev: has joined #ruby
[14:56:37] freerobby: has joined #ruby
[14:56:46] ljarvis: pesky error messages
[14:57:09] freerobby1: has joined #ruby
[14:57:19] freerobby: has joined #ruby
[14:57:24] saush: jhass : My gem path also still shows the previous one
[14:57:34] freerobby: has joined #ruby
[14:58:11] usershell: has joined #ruby
[14:58:24] jhass: that's okay
[14:58:34] jhass: (however you determine your gem path)
[14:58:56] mary5030: has joined #ruby
[15:00:07] beast: "#{11461173985121.to_s.split(/[356]/).map(&:to_i).map(&:chr).join.capitalize}!! " * 3
[15:00:29] floatingpoint: has joined #ruby
[15:00:42] Pupeno: has joined #ruby
[15:00:58] saush: jhass : So what should I do now?
[15:01:10] jhass: see above
[15:01:14] goodroot: has joined #ruby
[15:02:09] apeiros: ACTION hands beast a ">>"
[15:03:14] saush: jhass : sorry?
[15:03:51] lacrymology: has joined #ruby
[15:03:56] saush: jhass : see above?
[15:04:07] rodfersou: has joined #ruby
[15:04:18] jhass: on your screen, with the chat history
[15:05:12] dlitvak: has joined #ruby
[15:05:26] saush: jhass : I apologize but I didn't get you. Which commands to execute next?
[15:05:40] jhass: the right ones
[15:06:01] Rodya_: has joined #ruby
[15:06:05] saush: which ones?
[15:06:13] jhass: those achieving your goals
[15:06:43] saush: Goal is not achieved
[15:07:33] lindistock: has joined #ruby
[15:07:36] polishdub: has joined #ruby
[15:07:50] ljarvis: this is painful
[15:08:10] jhass: I guess I'm bored :P
[15:08:53] saush: Me too. :P
[15:09:01] jhass: saush: in case you didn't realize yet, I level the vagueness/information level/context of my answers to those of your questions
[15:09:10] mary5030: has joined #ruby
[15:09:15] jhass: you want better answers? ask better questions
[15:09:19] shevy: saush did you solve your problem yet
[15:09:51] saush: My problem is not solved.
[15:09:55] loatbac: has joined #ruby
[15:09:55] ChanServ: +b *!*@webvpn.floyd.k12.va.us
[15:09:55] ChanServ: ChanServ kicked loatbac: Good bye
[15:09:55] ruby[bot]: -b+b *!*@webvpn.floyd.k12.va.us *!*@webvpn.floyd.k12.va.us$#ruby-banned
[15:10:16] saush: Anyway thanks for helping me
[15:10:19] User458764: has joined #ruby
[15:10:52] whippythellama: has joined #ruby
[15:11:09] hxegon: finally used &. in the wild :D
[15:11:33] ljarvis: shame on you
[15:11:39] ajf-: has joined #ruby
[15:11:41] chouhoulis: has joined #ruby
[15:11:47] shevy: oh that is the new operator right? the lonely operator
[15:12:34] hxegon: nested #find is very good for this
[15:13:10] TomPeed: has joined #ruby
[15:13:41] jhass: .find { }&.find { } bah
[15:13:54] jhass: yeah, seriously
[15:14:07] ljarvis: .find { .find { ... } }
[15:14:07] sftrabbit: has joined #ruby
[15:14:23] hxegon: like #find { |x| x.find().bool&.nil? }
[15:14:23] jhass: not equivalent
[15:14:46] shevy: you must combine -> with &. for the extra ugliness
[15:14:50] hxegon: #find { |x| x.find()&.bool }
[15:14:56] ljarvis: also &.nil? is pointless...
[15:15:37] disconnekted: has joined #ruby
[15:16:00] hxegon: shevy you mean 'blinding beauty of our supreme language-master-sama ruby-kun' right?
[15:16:01] sigurding: has joined #ruby
[15:17:15] Jardayn: has joined #ruby
[15:18:09] apeiros: >> "#{11461173985121.to_s.split(/[356]/).map(&:to_i).map(&:chr).join.capitalize}!! " * 3 + "said the beast"
[15:18:10] ruby[bot]: apeiros: # => "Ruby!! Ruby!! Ruby!! said the beast" (https://eval.in/504743)
[15:18:20] karapetyan: has joined #ruby
[15:18:33] imperator: i must have missed what loatbac did
[15:18:39] dhollinger: has joined #ruby
[15:18:59] apeiros: ljarvis: it might be a BasicObject!!!!!!!!!111!elf!
[15:19:50] pamatya: has joined #ruby
[15:19:54] mrchris: has joined #ruby
[15:20:23] shevy: hxegon omg
[15:20:37] shevy: hxegon is that really valid ruby syntax?
[15:21:00] hxegon: my #find example?
[15:21:28] chthon: has joined #ruby
[15:22:08] aufi: has joined #ruby
[15:22:12] hxegon: basically: 'what in thing contains bool'
[15:22:12] shevy: this makes me sad
[15:22:24] beast: beast is fond of Ruby...don't be sad
[15:22:24] shevy: but it can still become uglier!
[15:22:31] shevy: you just need to somehow integrate a sneaky ->
[15:22:52] shevy: and a .() perhaps ... Ox0dea had one example some time ago for that
[15:23:26] sepp2k: has joined #ruby
[15:23:35] hxegon: or rather 'what thing in thing contains bool'
[15:24:13] shevy: what thing in that thing contains thing
[15:25:24] pdoherty_: has joined #ruby
[15:26:39] usershell: has joined #ruby
[15:26:54] tlexww: has joined #ruby
[15:27:22] uris: has joined #ruby
[15:28:15] lucasb: has joined #ruby
[15:28:17] imperator: has left #ruby: ("Leaving")
[15:28:31] aegis3121: has joined #ruby
[15:29:42] cicloid: has joined #ruby
[15:29:49] roshanavand: has joined #ruby
[15:30:27] gaussblurinc1: has left #ruby: ()
[15:32:09] sgambino: has joined #ruby
[15:32:26] mrtomme: has joined #ruby
[15:32:34] freerobby: has joined #ruby
[15:32:37] duckpuppy: has joined #ruby
[15:32:57] nettoweb: has joined #ruby
[15:37:45] rodolfowtf: has joined #ruby
[15:37:49] mchu: has joined #ruby
[15:39:05] sgambino: has joined #ruby
[15:39:09] karapetyan: has joined #ruby
[15:39:37] terminalrecluse: has joined #ruby
[15:40:10] durstburger: has joined #ruby
[15:41:27] mrchris: has joined #ruby
[15:41:27] atomical: has joined #ruby
[15:41:40] blackms: hello, which is the best way to debug vagrant in an IDE?
[15:41:46] beast: has joined #ruby
[15:41:58] blackms: I need to have the "step by step" button at some point
[15:43:35] aryaching: has joined #ruby
[15:43:55] karapetyan: has joined #ruby
[15:44:56] Xeago: has joined #ruby
[15:46:16] lacrymology: has joined #ruby
[15:46:17] ledestin: has joined #ruby
[15:48:50] davedev24: has joined #ruby
[15:49:32] hxegon: blackms is this ruby related?
[15:49:34] scepticulous: has joined #ruby
[15:50:00] ympeg: has joined #ruby
[15:50:13] blackms: hxegon, yes
[15:50:51] blackms: hxegon, I'm actually doing this: VAGRANT_LOG=debug bundle exec vagrant up --provider=arubacloud
[15:51:03] blackms: i need a way to have a step by step approach
[15:51:20] blackms: in order to see what happen at a certain point in the code
[15:51:33] dfinninger: has joined #ruby
[15:51:50] TomPeed: has joined #ruby
[15:51:56] jgt: has joined #ruby
[15:53:07] Macaveli: has joined #ruby
[15:53:26] atomical_: has joined #ruby
[15:53:37] hxegon: what are you trying to find out? blackms
[15:54:20] blackms: hxegon, i'm developing a new plugin, but the ConfigValidator tell me that the marchine object has two field which is not be there...
[15:54:33] casadei: has joined #ruby
[15:54:45] mrchris: has joined #ruby
[15:55:13] baweaver: has joined #ruby
[15:57:05] scepticulous: are there any recommendations for a authorization framework, but pundit. I think pundit will meet my needs and looks promising, however, maybe there are new ( and good ) kids on the block
[15:57:20] aufi: has joined #ruby
[15:58:02] colegatron: has joined #ruby
[15:58:59] tubbo: scepticulous: well there's pundit
[15:59:02] tubbo: scepticulous: there's also pundit
[15:59:31] tubbo: j/k...i used authority for a while and then there's cancancan but imho it's not very good
[15:59:49] tubbo: authority is *decent* but is a little too big for me. pundit can do all the things authority can do, and doesn't require so much coupling
[15:59:55] aryaching: has joined #ruby
[16:00:34] scepticulous: yay I took a look and cancancan, coming from "declarative_authorization" . I will take a look at authority as well, thanks. I believe there is also pundit
[16:00:53] goodroot: has joined #ruby
[16:01:44] sgambino: has joined #ruby
[16:02:45] Bish: i also heard of one.. pu.. pundit, yeah that's it
[16:02:52] digs84: has joined #ruby
[16:05:43] chouhoulis: has joined #ruby
[16:07:06] User458764: has joined #ruby
[16:08:23] floatingpoint: what's an appropriate exception to throw if a file doens't ecist
[16:08:51] solars: has joined #ruby
[16:09:03] apeiros: you shouldn't throw exceptions, only raise them</pedantry>
[16:09:16] apeiros: Errno::ENOENT I guess?
[16:09:18] ljarvis: >> File.open "foo"
[16:09:19] ruby[bot]: ljarvis: # => No such file or directory @ rb_sysopen - foo (Errno::ENOENT) ...check link for more (https://eval.in/504788)
[16:10:23] cndiv: has joined #ruby
[16:10:46] waheedi: has joined #ruby
[16:10:51] Mon_Ouie: has joined #ruby
[16:11:47] sgambino: has joined #ruby
[16:12:49] lacrymology: has left #ruby: ()
[16:13:29] quaristice: has joined #ruby
[16:13:43] sandstrom: has joined #ruby
[16:14:08] houhoulis: has joined #ruby
[16:14:54] freerobby: has joined #ruby
[16:16:10] st0opkid: has joined #ruby
[16:17:58] aufi: has joined #ruby
[16:18:15] Bloomer: has joined #ruby
[16:18:15] blackms: hxegon, are you there?
[16:18:51] ljames: has joined #ruby
[16:19:16] hxegon: blackms yeah, I have no idea. As far as I can tell the vagrant gem hasn't been updated since 2014, and I've never used an IDE so I'm not sure how much help I can offer.
[16:19:32] blackms: without an IDE for me it's the same :)
[16:19:44] blackms: if i launch that via irb does it should work?
[16:21:00] mrchris: has joined #ruby
[16:21:42] gizmore: has joined #ruby
[16:22:07] cicloid: has joined #ruby
[16:22:21] bronson: has joined #ruby
[16:23:22] hxegon: blackms I would look at pry, pry-byebug
[16:23:41] jamw: has joined #ruby
[16:24:02] blackms: hxegon, ok i will try it thanks
[16:25:25] dlitvak: has joined #ruby
[16:26:41] kuroro: has joined #ruby
[16:26:50] ajf-: has joined #ruby
[16:27:24] headius: has joined #ruby
[16:27:52] harai: has joined #ruby
[16:28:22] lucasb: ah, now I got the joke. 'throw' is to be used with 'catch', not exceptions
[16:29:02] kuroro: "[0x804A004].pack("I")" gives me "\x04\xA0\x04\b" instead of what im expecting, which is "\x04\xA0\x04\x08"
[16:29:11] kuroro: am i to assume \b corresponds to \x08
[16:29:41] apeiros: no. you should verify it.
[16:29:46] apeiros: >> "\b" == "\x08"
[16:29:47] ruby[bot]: apeiros: # => true (https://eval.in/504797)
[16:30:07] pdoherty_: has joined #ruby
[16:30:10] apeiros: assumptions are bad ;-)
[16:30:10] ruby[bot]: canton7: # => "\b" (https://eval.in/504798)
[16:30:21] kuroro: i see, interesting, i wonder why they chose "\b"
[16:30:30] apeiros: kuroro: you know ascii?
[16:30:34] apeiros: take a look at an ascii-table???
[16:30:45] canton7: (asciitable.com)
[16:30:47] cfinley: has joined #ruby
[16:30:47] apeiros: same as \n, \t etc.
[16:30:48] headius: has joined #ruby
[16:32:04] apeiros: that said, I do have a patch in my pryrc which overrides String#inspect for binary strings.
[16:32:14] guacamole: has joined #ruby
[16:32:27] kuroro: oh ic, so \b means backspace
[16:32:50] mark2: has left #ruby: ("PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PONG :tepper.freenode.net")
[16:34:10] IrishGringo: has joined #ruby
[16:34:11] Prominent: has joined #ruby
[16:34:35] kuroro: love to see the patch. i'd like a reliable way to get the actual hex output instead of the ascii equivalent
[16:34:58] headius: has joined #ruby
[16:35:00] blackms: is there a way to run pry in bundle environment?
[16:36:03] hxegon: add gem 'pry' to Gemfile, bundle exec pry
[16:36:43] TomyLobo: has joined #ruby
[16:36:56] dopie: has joined #ruby
[16:37:21] dfinninger: has joined #ruby
[16:38:18] sftrabbit: has joined #ruby
[16:38:25] zast: has joined #ruby
[16:39:48] sgambino: has joined #ruby
[16:39:48] rikkipitt: has joined #ruby
[16:40:06] huyderman: has joined #ruby
[16:41:27] chouhoulis: has joined #ruby
[16:41:49] howdoicomputer: has joined #ruby
[16:42:23] tercenya: has joined #ruby
[16:42:45] tvw: has joined #ruby
[16:42:51] asccigcc: has joined #ruby
[16:44:28] marr: has joined #ruby
[16:45:05] sftrabbit: has joined #ruby
[16:46:07] norc: has joined #ruby
[16:47:21] emilford: has joined #ruby
[16:48:14] momomomomo: has joined #ruby
[16:48:14] asccigcc: has joined #ruby
[16:48:18] headius: has joined #ruby
[16:48:39] UtkarshRay: has joined #ruby
[16:49:27] mrchris: has joined #ruby
[16:49:35] User458764: has joined #ruby
[16:49:51] pdoherty: has joined #ruby
[16:49:51] norc: So who here is on OSX and also uses Oracle? :D
[16:50:35] arup_r: has joined #ruby
[16:51:07] Limix: has joined #ruby
[16:51:25] codecop: has joined #ruby
[16:51:53] shevy: naughty people
[16:53:07] dhollinger: has joined #ruby
[16:54:03] Ebok: has joined #ruby
[16:54:09] mary5030: has joined #ruby
[16:54:12] tildes: has joined #ruby
[16:54:15] B1n4r10: has joined #ruby
[16:54:34] darkf: has joined #ruby
[16:55:26] sgambino: has joined #ruby
[16:55:43] vvolde: has joined #ruby
[16:56:03] dtordable: has joined #ruby
[16:56:28] Xeago: has joined #ruby
[16:56:40] dopie: has joined #ruby
[16:58:09] hannelita: has joined #ruby
[16:58:21] BTRRY: has joined #ruby
[16:58:24] krz: has joined #ruby
[17:00:04] sgambino: has joined #ruby
[17:00:23] Channel6: has joined #ruby
[17:00:29] zambini: has joined #ruby
[17:01:05] shellie: has joined #ruby
[17:01:22] dostoyevsky: norc: you mean: java? :)
[17:02:20] norc: No Ruby.
[17:02:25] Macaveli: has joined #ruby
[17:02:31] WeiJunLi: has joined #ruby
[17:03:11] WeiJunLi: my ruby version is 1.9 however I have ruby2.0 installed as well, how can I update my version?
[17:03:36] norc: WeiJunLi, you will need to use a tool like chruby.
[17:03:41] shevy: wget ftp://ftp.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.xz
[17:04:03] norc: WeiJunLi, beyond that any method of installing a Ruby that suits your needs.
[17:04:17] norc: WeiJunLi, ruby-install with chruby is the flavor of the month currently.
[17:04:26] mrchris: has joined #ruby
[17:05:20] synthroid: has joined #ruby
[17:05:51] sgambino: has joined #ruby
[17:08:08] tomchapin: has joined #ruby
[17:08:23] amclain: has joined #ruby
[17:09:20] sgambino: has joined #ruby
[17:13:22] emilford: has joined #ruby
[17:13:28] rakm: has joined #ruby
[17:14:17] Hanmac: shevy did you see the youtube video i linked to you last time? ;P
[17:15:05] shevy: hanmac hmm I forgot it
[17:15:22] Hanmac: shevy: https://www.youtube.com/watch?v=870OhSp4ai0
[17:15:28] ruby[bot]: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
[17:16:17] rdark: has joined #ruby
[17:16:22] [Butch]: has joined #ruby
[17:16:43] snockerton: has joined #ruby
[17:18:34] dlitvak: has joined #ruby
[17:18:46] hakunin: has joined #ruby
[17:19:59] dlitvak_: has joined #ruby
[17:20:29] dfinninger: has joined #ruby
[17:21:54] mary5030: has joined #ruby
[17:22:23] emilford: has joined #ruby
[17:23:15] SCHAAP137: has joined #ruby
[17:25:32] redlegion: has joined #ruby
[17:26:47] momomomomo: has joined #ruby
[17:28:21] roshanav_: has joined #ruby
[17:28:39] tomdp: has joined #ruby
[17:28:46] Alayde: has joined #ruby
[17:29:00] dlitvak: has joined #ruby
[17:29:08] dcunit3d: has joined #ruby
[17:29:12] Alayde: has left #ruby: ()
[17:29:13] solars: has joined #ruby
[17:31:04] ferr: has joined #ruby
[17:31:27] emilford: has joined #ruby
[17:33:23] nertzy: has joined #ruby
[17:37:59] cschneid_: has joined #ruby
[17:39:05] emilford: has joined #ruby
[17:39:47] johnbburg: has left #ruby: ()
[17:39:54] bronson: has joined #ruby
[17:40:15] troulouliou_div2: has joined #ruby
[17:40:37] benlieb: has joined #ruby
[17:41:01] psye: has joined #ruby
[17:41:52] mfb2: has joined #ruby
[17:42:02] psye: has joined #ruby
[17:42:07] jottr: has joined #ruby
[17:45:40] hahuang65: has joined #ruby
[17:49:38] drocsid: has joined #ruby
[17:51:55] floatingpoint: has joined #ruby
[17:52:03] ssm: has joined #ruby
[17:52:19] aegis3121: has joined #ruby
[17:52:25] baweaver: has joined #ruby
[17:52:36] drocsid: I'm using ruby to launch scripts that start java processes. These java processes just trigger a remote job. I'm starting them like pid = spawn('/some/java/launcher.sh'). Then I want to give the process a little time to start it's job and kill it. So I sleep a little while and Process.kill(9,pid). However this is not killing the processes. Is it because I'm using spawn?
[17:52:54] WeiJunLi: has left #ruby: ("Konversation terminated!")
[17:53:32] eam: drocsid: what do you mean "not killing the process?"
[17:53:43] eam: what state do you observe it in?
[17:54:11] rodferso1: has joined #ruby
[17:54:32] eam: (where I'm going with this: there's good odds it has been killed and is a zombie)
[17:54:34] mg^: has joined #ruby
[17:54:43] cicloid: has joined #ruby
[17:54:53] hxegon: I'll be in my bunker
[17:55:19] RobertBirnie: has joined #ruby
[17:55:25] drocsid: eam: ok I will read up more on zombies.. Thanks
[17:55:35] eam: drocsid: happy to explain further here if you've questions :)
[17:55:47] lxsameer: has joined #ruby
[17:55:47] lxsameer: has joined #ruby
[17:55:52] eam: if you use `ps -ef`, see if it's in state "defunct"
[17:56:28] mg^: always reap your children!
[17:57:35] tomchapin: has joined #ruby
[17:57:47] rkazak: has joined #ruby
[17:58:57] sgambino: has joined #ruby
[17:58:59] ur5us: has joined #ruby
[17:59:03] jbrhbr: has joined #ruby
[18:00:21] JohnT: has joined #ruby
[18:01:33] gruz0: has joined #ruby
[18:01:50] howdoicomputer: has joined #ruby
[18:02:20] rodfersou: has joined #ruby
[18:03:13] myntcake: has joined #ruby
[18:03:38] edwinvdgraaf: has joined #ruby
[18:04:12] mfb2: has joined #ruby
[18:04:44] firstdayonthejob: has joined #ruby
[18:04:58] guacamole: has joined #ruby
[18:08:50] PhantomSpank: has joined #ruby
[18:10:34] JohnT: has joined #ruby
[18:10:46] shevy: have a shotgun ready
[18:12:06] mistermocha: has joined #ruby
[18:12:11] User458764: has joined #ruby
[18:14:04] Mon_Ouie: has joined #ruby
[18:14:28] dlitvak: has joined #ruby
[18:14:53] bigkevmcd: has joined #ruby
[18:15:12] gregf_: has joined #ruby
[18:15:55] drocsid: Then I assume my issue is that my java processes won't exit when I kill them with the signal?
[18:16:43] pdoherty: has joined #ruby
[18:18:02] freeone3000: has joined #ruby
[18:18:05] spider-mario: has joined #ruby
[18:18:20] freeone3000: Could someone please explain the error https://gist.github.com/freeone3000/0fdcd94abb4196e5bfd1 to me?
[18:18:25] benlieb: has joined #ruby
[18:20:00] symm-: has joined #ruby
[18:21:18] blackmes1: has joined #ruby
[18:22:25] duckpuppy: has joined #ruby
[18:22:54] radgeRayden: has joined #ruby
[18:23:07] euoia: has joined #ruby
[18:24:45] jamw: has joined #ruby
[18:25:46] dlitvak: has joined #ruby
[18:25:57] cndiv: has joined #ruby
[18:26:33] jhass: freeone3000: make sure you're on latest bundler, also try running the suggested command
[18:26:51] freeone3000: jhass: There was no change after executing that command. How should I update bundler? 'bundler install bundler"?
[18:27:25] jhass: depends on how you installed it initially, most commonly gem install bundler
[18:28:43] harai: has joined #ruby
[18:29:10] dlitvak: has joined #ruby
[18:29:12] bronson: has joined #ruby
[18:32:02] j_mcnally: has joined #ruby
[18:32:09] pietr0: has joined #ruby
[18:32:50] freeone3000: I'm running bundler-1.11.2
[18:33:13] edwinvdgraaf: has joined #ruby
[18:33:20] jhass: can you gist your Gemfile & lock?
[18:33:41] zerowaitstate: has joined #ruby
[18:33:57] freeone3000: jhass: https://gist.github.com/freeone3000/aec564518dab2b9a7084
[18:33:59] hanneli: has joined #ruby
[18:34:22] zzak__: has joined #ruby
[18:34:24] TomPeed: has joined #ruby
[18:34:46] knowtheory_: has joined #ruby
[18:35:55] avahey: has joined #ruby
[18:35:58] Arcaire: has joined #ruby
[18:36:33] swgillespie: has joined #ruby
[18:36:43] deimos: has joined #ruby
[18:36:47] justinweiss: has joined #ruby
[18:37:00] borkdude: has joined #ruby
[18:37:05] boxrick1: has joined #ruby
[18:37:06] cbednarski: has joined #ruby
[18:37:07] bjmllr: has joined #ruby
[18:37:07] apipkin: has joined #ruby
[18:37:08] MiracleBlue__: has joined #ruby
[18:37:15] cstrahan: has joined #ruby
[18:37:22] pizzaops: has joined #ruby
[18:37:26] HashNuke: has joined #ruby
[18:37:31] bjeanes: has joined #ruby
[18:37:34] err_ok: has joined #ruby
[18:37:43] dwfait: has joined #ruby
[18:38:05] jokke: has joined #ruby
[18:38:26] camilasan: has joined #ruby
[18:38:30] gmci: has joined #ruby
[18:38:46] wldcordeiro: has joined #ruby
[18:39:51] Gurio: has joined #ruby
[18:39:51] mistermocha: has joined #ruby
[18:39:59] jhass: star_atlas is a private gem?
[18:40:06] tomaw: has joined #ruby
[18:40:11] freeone3000: jhass: Yes - it resolves it fine here.
[18:40:24] jhass: well, it doesn't here, so I can't really debug
[18:40:51] snockerton: has joined #ruby
[18:41:37] benlakey: has joined #ruby
[18:41:38] ggherdov_: has joined #ruby
[18:41:39] Gurio: Hi guys, I come here because I want learn ruby, Do you know a good book about ruby ?
[18:41:41] sgambino: has joined #ruby
[18:41:58] last_staff: has joined #ruby
[18:42:25] baweaver: has joined #ruby
[18:42:31] machty: has joined #ruby
[18:43:04] digs84: has joined #ruby
[18:43:45] jhass: freeone3000: and when I comment it out it resolves fine here
[18:43:46] freeone3000: jhass: https://gist.github.com/freeone3000/aec564518dab2b9a7084 has been edited and shows the same problem
[18:44:41] ruby[bot]: You can find a list of recommended books at http://ruby-community.com/pages/links
[18:45:03] mg^: Gurio: do you already know any other programming languages?
[18:45:12] freeone3000: jhass: Okay, it looks like only ruby 1.9.3 has this problem, ruby 2.0.0 seems to work.
[18:46:38] jhass: freeone3000: yeah, resolves fine here. 1.9 is out of official security maintenance anyway, 2.0 is about to EOL
[18:47:30] sandstrom: has joined #ruby
[18:47:55] norc: freeone3000, that Gemfile is extremely brave. Not locking the version of the Rails meta gem...
[18:48:08] eam: drocsid: kind of. A zombie occurs when a process *does* exit, but hasn't yet been cleaned up by its parent
[18:48:28] eam: that is, it's dead, no longer running, but still sitting in the process table as an entry until the parent calls wait()
[18:48:54] disconnekted: has joined #ruby
[18:48:57] eam: you can't kill a zombie (because it's already not running, already exited). What's neede is for the parent to call wait() and reap its entry
[18:49:00] aspire: has joined #ruby
[18:50:13] mg^: yeah this discussion happened on Reddit a week or so ago, someone wrote an entire article about killing zombie processes
[18:50:46] shevy: all zombies must die
[18:50:51] mg^: they weren't talking about zombie processes, they were talking about leaked processes
[18:51:06] eam: an easy way to create a zombie is: ruby -e'fork {puts $$} and sleep' # will print the pid of the zombie
[18:51:07] sgambino: has joined #ruby
[18:51:08] mg^: but kept saying zombie. the sysadmin in me was raging.
[18:51:32] eam: mg^: yeah, zombie processes and this whole area of interaction is one of the least well understood aspects of unix
[18:51:36] guacamole: has joined #ruby
[18:51:50] norc: Oh. Killing a zombie is fairly trivial. Kill the parent and watch the zombie disappear. :D
[18:52:03] eam: norc: ;)
[18:52:12] eam: unless you've done bad things to init, of course
[18:52:22] norc: Well. If the parent is init you are shit out of luck.
[18:52:30] chouhoulis: has joined #ruby
[18:52:33] eam: I did a demo of that for our interns "what happens when init stops calling wait?"
[18:52:35] dfinninger: has joined #ruby
[18:52:43] momomomomo: has joined #ruby
[18:52:51] eam: turns out you can't just kill -STOP it because there's signal protection on it
[18:53:20] norc: You can send the SIGREBOOTIREALLYMEANIT still.
[18:53:35] chouhoulis: has joined #ruby
[18:53:42] eam: anyway after the internship I got word that one of the interns went back to school and tried the same demo on a live server at the school, panic'd the box and created a bit of an outage
[18:53:50] norc: That is hilarious.
[18:53:55] eam: "watch this"
[18:54:13] eam: I used gdb to pause it
[18:54:15] sanko: has joined #ruby
[18:54:16] DoubleMalt: has joined #ruby
[18:54:36] dlitvak: has joined #ruby
[18:54:59] mg^: a functioning init always reaps its dead children, so if you've got zombies with PPID 1 you've got issues
[18:55:22] sanko: How to unpack,gemspec and build a ruby gem?
[18:55:41] shevy: sanko some .gem files will not have a .gemspec file
[18:55:51] joonty: has joined #ruby
[18:55:57] shevy: sanko if the .gem has the .gemspec file, you can easily rebuild a new gem
[18:56:08] baweaver: has joined #ruby
[18:56:22] sanko: What if it does not have a gemspec file?
[18:56:26] eam: mg^: yeah, can still happen in a bunch of cases though (eg docker)
[18:56:28] shevy: sanko to unpack, "gem unpack", and to make a new gem, "gem build *.gemspec"
[18:56:43] shevy: sanko dunno... this is typically bundler gems... I think they tend to have some rake task or something
[18:57:11] pdoherty: has joined #ruby
[18:57:19] sanko: Can I copy the gemspec file and put it in appropriate gem
[18:57:31] mg^: Yeah docker has introduced all kinds of fun into the world
[18:57:38] hannelita: has joined #ruby
[18:57:54] zambini: has joined #ruby
[18:58:10] norc: eam, I have a fun aprils prank coming up. I will set up servers to start throwing proprietary iterm escape codes that changes the color palette into the MOTD.
[18:58:13] Xeago: has joined #ruby
[18:58:18] norc: I wonder how that is going to turn out.
[18:58:31] shevy: sanko how can you copy a file if it is not part of the respective .gem :)
[18:58:39] sgambino: has joined #ruby
[18:58:43] mg^: back on topic... I've been toying around with making an X-Chat MRuby plugin. Had some success, been a while since I've programmed in C.
[18:59:02] Cohedrin: has joined #ruby
[18:59:27] sanko: shevy Well in my case when I clone it from github it has a gemspec file. But it is not present at the gem location
[18:59:57] shevy: that is strange... I assume that the process, by which that is built into a .gem, removes the .gemspec file. my gems always have the .gemspec file
[19:00:24] hanneli: has joined #ruby
[19:01:24] darkf_: has joined #ruby
[19:01:27] kadoppe: has joined #ruby
[19:01:43] mistermocha: has joined #ruby
[19:02:05] mistermocha: has joined #ruby
[19:02:09] Prominent_: has joined #ruby
[19:02:18] howdoicomputer: has joined #ruby
[19:02:28] juddey: has joined #ruby
[19:02:51] Ebok: Is there an #index varient that returns all of the indexes which match?
[19:03:32] sanko: shevy I unpacked the gem, made changes to my files and built it. But changes are not showing up after the built in the gem?
[19:03:59] PedramT: has joined #ruby
[19:04:01] shevy: sanko it has a .gemspec file
[19:04:11] shevy: that was supposed to be a question, so add a "?" there
[19:04:56] hannelita: has joined #ruby
[19:05:00] sanko: shevy I copied the gemspec file
[19:05:02] shevy: sanko let's assume that it has a .gemspec file... how I would go is, unpack the gem, make your changes to the .rb files, increment the version, then build the gem, then install it. perhaps you are still using the old gem?
[19:05:36] newbie22: has joined #ruby
[19:05:51] beast: has joined #ruby
[19:06:42] sanko: shevy To be clear I have some C files in my gem and I made changes over there. So after that what does increment the version mean?
[19:07:22] shevy: the .gemspec has a specific version e. g. the entry s.version =
[19:07:53] zambini: Ebok: #select work for you?
[19:08:09] lacuna: has joined #ruby
[19:08:09] lacuna: has joined #ruby
[19:08:10] dorei: has joined #ruby
[19:08:29] zambini: But that'll give you the object, not the index
[19:08:36] sanko: shevy So can I just keep the same version while building?
[19:08:49] mchu: has joined #ruby
[19:08:55] Graphettion: has joined #ruby
[19:09:23] mrmist: has joined #ruby
[19:09:35] sftrabbit: has joined #ruby
[19:10:12] Ebok: Select wont do the trick. Right now I'm just doing an each interation and shoveling index into a empty array if match. It just seems like one of those things that could be done simpler.
[19:10:14] atomical: has joined #ruby
[19:10:30] Ebok: Each_with_index**
[19:10:58] shevy: sanko in theory you could... I would uninstall the old gem just in case
[19:11:34] freeone3000: has left #ruby: ("Konversation terminated!")
[19:11:38] ramfjord: has joined #ruby
[19:14:52] al2o3-cr: >> a = %w[bar foo bar foo bar foo]; a.each_index.find_all { |i| a[i] == "foo" } # Ebok
[19:14:53] ruby[bot]: al2o3-cr: # => [1, 3, 5] (https://eval.in/504826)
[19:15:22] Ebok: Ah. Very cool
[19:17:03] zambini: Much cleaner than my next suggestion :P
[19:17:23] jackjackdripper: has joined #ruby
[19:17:43] DroidBur_: has joined #ruby
[19:18:03] al2o3-cr: find_all is just select btw
[19:18:17] Ebok: each_index
[19:18:51] User458764: has joined #ruby
[19:19:02] Ebok: To be fair, I was working with a string, so these still wont work. However, I'm going to evaluate whether I can get more functionality out of using them as an array. We'll see.
[19:19:14] eam: norc: nice
[19:19:30] al2o3-cr: Ebok: Why won't it work?
[19:20:57] Ebok: String doesnt have #each_index or #select. So I'd have to use #chars / #split etc to turn it into an array first.
[19:20:58] hanneli: has joined #ruby
[19:22:11] Ebok: Its not a big deal. I have to dig through the rest of this functionality to determine if I need the string as a string most often, or if I could get by doing all the work as an array. I appreciate the help! It fully and completely answered my query.
[19:24:02] hakunin: has joined #ruby
[19:24:07] newdan: has joined #ruby
[19:26:32] PedramT: has joined #ruby
[19:26:43] al2o3-cr: Ebok: "foobarfoobar".enum_for(:scan,/a/).map { $~.begin 0 } #=> [4, 10]
[19:27:06] Ebok: That I've never seen before. Neat.
[19:28:09] graffix222: has joined #ruby
[19:28:37] hannelita: has joined #ruby
[19:29:07] ta: has joined #ruby
[19:29:07] skade: has joined #ruby
[19:29:17] ur5us: has joined #ruby
[19:29:30] ta: has joined #ruby
[19:30:22] tAn: has joined #ruby
[19:30:38] jbrhbr: has joined #ruby
[19:31:14] nerium: has joined #ruby
[19:31:57] fantazo: has joined #ruby
[19:33:28] PedramT_: has joined #ruby
[19:33:30] newbie22: *: I hoping learning Ruby, and Python will help me get back into the field.
[19:33:30] newbie22: what is the latest and the hottest to learn ?
[19:34:12] Freeaqingme: has joined #ruby
[19:34:43] hannelita: has joined #ruby
[19:35:41] usershell: has joined #ruby
[19:35:54] TomPeed: languages?
[19:36:04] hanneli: has joined #ruby
[19:36:54] TomPeed: probably javascript and go
[19:36:55] choke: has joined #ruby
[19:38:00] arup_r: has joined #ruby
[19:38:39] newdan: newbie22: Python and Ruby should get you plenty of chances. Other languages good for getting into the field are Javascript, Java, PHP, and depending on where you are, C++. Might help to just search want ads and see what people are looking for
[19:38:40] newbie22: *: I hoping learning Ruby, and Python will help me get back into the field.
[19:38:41] newbie22: what is the latest and the hottest to learn ?
[19:39:06] TomPeed: don't learn python and ruby
[19:39:16] TomPeed: they both pretty much solve the same problems
[19:39:25] ziyadb: has joined #ruby
[19:39:32] TomPeed: pick 1 and then learn javascript with it IMO
[19:39:46] TomPeed: that way you'll have a back-end language and a front-end language
[19:40:02] atomical: has joined #ruby
[19:40:22] TomPeed: the way you decide which language to choose is to look at the job market in your area
[19:40:37] TomPeed: or look at what the comppanies you want to apply for use
[19:40:40] asccigcc: has joined #ruby
[19:40:43] mg^: Node.js is the current hotness at my workplace
[19:40:48] Freeaqingme: has joined #ruby
[19:40:54] TomPeed: yeah node.js is hot right now
[19:41:46] emilford: has joined #ruby
[19:41:50] llrb001: has joined #ruby
[19:42:32] skade: has joined #ruby
[19:43:47] llrb001: has joined #ruby
[19:44:19] psye: has joined #ruby
[19:44:58] shevy: javascript kills ruby!
[19:45:16] dlitvak: has joined #ruby
[19:45:21] mg^: Ruby code is so much nicer to read.
[19:45:34] newdan: shevy: Ruby's doing fine
[19:45:58] guacamole: has joined #ruby
[19:45:59] shevy: but node.js look
[19:46:10] zambini: Coming from a C#/C++ background, Ruby is much prettier than Javascript.
[19:46:48] newdan: JS has the unique advantage of being *the only* choice for running anything in the browser, but supposedly with new tech like WASM that won't last forever
[19:47:12] zambini: JS also has fewer uniform standards than Ruby. Which is impressive :P
[19:47:32] mg^: haha true that
[19:47:34] zambini: There are approximately 9000 ways to do any one thing in JS, and every asserts it's the "right" way
[19:47:36] dfinninger: has joined #ruby
[19:48:05] sgambino: has joined #ruby
[19:48:09] mg^: The best fun with JS is supporting the bleeding edge stuff cross-browser.
[19:48:30] zambini: If I could write and run Ruby on people's browsers, I'd never touch JS
[19:48:39] moufl: has joined #ruby
[19:48:50] mg^: we need to get MRuby into firefox or something
[19:48:57] Cohedrin: well theres a reason you cant
[19:49:01] Cohedrin: its too slow lol
[19:49:06] Cohedrin: can you imagine
[19:49:12] Cohedrin: doing the stupid shit people do in js
[19:49:16] Cohedrin: in the browser?
[19:49:24] Cohedrin: you'd need ibm watson to load a web page
[19:49:36] dfinninger: has joined #ruby
[19:50:06] newdan: zambini: You can try compiling Ruby to JS using Opal
[19:50:15] uris: has joined #ruby
[19:51:14] n00bDev: has joined #ruby
[19:51:16] nertzy: has joined #ruby
[19:52:36] diegoviola: has joined #ruby
[19:53:04] newbie22: *: What do you guys think about the book "Learn Ruby the Hard way" ??
[19:53:31] shevy: you should learn idiomatic ruby
[19:54:04] postmodern: has joined #ruby
[19:54:16] baweaver: has joined #ruby
[19:54:32] hxegon: has joined #ruby
[19:54:43] fantazo: has joined #ruby
[19:55:05] PhantomSpank: has joined #ruby
[19:55:58] jottr: has joined #ruby
[19:55:59] ta: has joined #ruby
[19:56:20] dlitvak: has joined #ruby
[19:56:41] PsionTheory: has joined #ruby
[19:57:27] newbie22: shevy: what is the difference ??
[19:58:04] shevy: newbie22 you will write better ruby code if you learn idiomatic ruby
[20:00:00] harai: has joined #ruby
[20:00:15] newdan: shevy: "Learn Ruby the Hard Way" doesn't teach idiomatic Ruby?
[20:00:30] ramfjord: has joined #ruby
[20:02:09] mchu: has joined #ruby
[20:02:28] atomical_: has joined #ruby
[20:02:58] Rodya_: has joined #ruby
[20:03:04] mchu: has joined #ruby
[20:04:24] shevy: newdan http://learnrubythehardway.org/book/ex40.html
[20:04:41] Rodya_: has joined #ruby
[20:05:18] kith: has joined #ruby
[20:06:25] shevy: python loves the ()
[20:06:50] mistermocha: has joined #ruby
[20:07:22] newdan: shevy: Yeah, most people I know wouldn't put in empty parens
[20:08:25] shevy: typically module MyStuff; def MyStuff.apple() would be module Foo; def self.bar
[20:08:38] psye: has joined #ruby
[20:09:16] devbug: has joined #ruby
[20:09:20] dlitvak: has joined #ruby
[20:09:36] sharms: has joined #ruby
[20:09:53] shevy: http://learnrubythehardway.org/book/ex16.html file closing should typically happen through the block form, I don't see a chapter about blocks though
[20:10:08] shevy: the chris pine tutorial was cool 10 years ago but it also should be updated a lot :\
[20:10:24] shevy: if we can find 100 people!
[20:10:29] shevy: each writing one tutorial-chapter ...
[20:12:04] roshanavand: has joined #ruby
[20:12:14] bb010g: has joined #ruby
[20:12:33] durstburger: was the Chris Pine tutorial book the "learn how to program" book?
[20:12:50] shdw_frbrd: has joined #ruby
[20:13:02] B1n4r10: has joined #ruby
[20:14:13] yfeldblum: has joined #ruby
[20:15:18] thejoecarroll: has joined #ruby
[20:17:09] Xeago: How can one 'spawn' a process in ruby and write to it's stdin? The sole purpose of my script is to launch that process, write to stdin and quit or stop existing.
[20:17:30] skade: has joined #ruby
[20:17:34] babblebre: has joined #ruby
[20:17:45] psuedo: has joined #ruby
[20:18:17] shdw_frbrd: IO.popen does that, I think
[20:18:48] DoubleMalt: has joined #ruby
[20:18:54] psuedo: Hey gents' and lents' -- I was curious of your opinion on using !(varA == varB) vs varA != varB for logic comparison
[20:19:44] psuedo: For readability, I wanted to use the former in an if-block... But I was wondering if I should just leave it at !=
[20:19:47] Xeago: shdw_frbrd: thanks!
[20:20:08] newdan: psuedo: != is more straightforward imo
[20:20:41] shdw_frbrd: @Xeago -- check ri or the web -- I don't use it, so take that with salt...
[20:21:13] shdw_frbrd: varA != varB reads more cleanly IMO
[20:21:57] platzhirsch: Any idea how to reduce the lines 4-8? https://gist.github.com/platzhirsch/c6afe7789b209d310a5c
[20:22:33] AnoHito: has joined #ruby
[20:22:35] Roxas: has joined #ruby
[20:22:39] BTRE: has joined #ruby
[20:23:10] jtnegrotto: has joined #ruby
[20:23:14] llrb001: has joined #ruby
[20:23:36] al2o3-cr: platzhirsch: ternary
[20:23:36] Roxas: Hi everyone, im pretty new to ruby and have possibly a dumb question that I havent found a straight answer for on google
[20:23:37] psuedo: coupons = (current_coupon.present?) ? all + [current_coupon] : all
[20:23:59] platzhirsch: not sure if that increases readability :D but true!
[20:24:15] psuedo: or you could do...
[20:24:46] psuedo: coupons = all ... coupons = coupons + [current_coupon] if current_coupon.present?
[20:24:54] blackgoat: has joined #ruby
[20:25:13] jamw: has joined #ruby
[20:25:41] shdw_frbrd: @platzhirsch - of course the cleanest solution is to make the coupons object deal with it
[20:25:43] cryzlr: has joined #ruby
[20:25:55] Roxas: i have a variable that takes a number and converts it from lbs to kgs. how do I make sure that it only spits out its answer to the 2nd decimal place? Example: 500.23554 -> 500.24
[20:26:13] al2o3-cr: Roxas: #round
[20:26:30] al2o3-cr: >> 500.23554.round(2)
[20:26:31] ruby[bot]: al2o3-cr: # => 500.24 (https://eval.in/504834)
[20:27:13] al2o3-cr: >> "%.2f" % 500.23554
[20:27:14] ruby[bot]: al2o3-cr: # => "500.24" (https://eval.in/504835)
[20:27:29] Xeago: shdw_frbrd: I'm running `cat` which reads from stdin, I've straced it and it is reading from it's stdin. When trying to #write to the returned object, it gives `IOError: not opened for writing`. Any idea's? I've read the online documentation, but it doesn't cover how to write to the process /from/ ruby, it only shows how to attach files to the different streams.
[20:27:30] Roxas: awesome. exactly what i was looking for. thanks!
[20:27:34] zambini: platzhirsch: This may be a silly question but is current_coupon inside of all? Reading that makes me think that (obviously w/o real context)
[20:28:08] platzhirsch: zambini: that's a good question, no all is based on a YAML file and current is retrieved from the associated modell
[20:28:11] Xeago: even though #closed? is `false` :|
[20:28:30] shdw_frbrd: @Xeago - running 'cat' seems wrong to me -- what are you catting and why?
[20:28:35] dlitvak: has joined #ruby
[20:28:55] shdw_frbrd: @Xeago if you are just appending to a file...
[20:29:01] choke: has joined #ruby
[20:29:18] ta: has joined #ruby
[20:29:23] dopie: has joined #ruby
[20:29:59] PedramT: has joined #ruby
[20:30:47] PedramT_: has joined #ruby
[20:31:03] zambini: platzhirsch: Are you using rails for that? If you wanted to avoid a ternary you could do `(all + current_coupon.presence).compact` and avoid any ifs
[20:31:08] hakunin: has joined #ruby
[20:31:13] Xeago: shdw_frbrd: I'm running cat as a example program, cat is easy and you have it :)
[20:31:13] dlitvak: has joined #ruby
[20:31:14] platzhirsch: zambini: wow that's neat
[20:31:26] zambini: I believe it's only rails though
[20:31:31] tomchapin: has joined #ruby
[20:31:58] Dimik: has joined #ruby
[20:31:59] Xeago: `cat`, typing text, giving it an EOF character (^D) has the expected result
[20:32:09] Xeago: I want to now do this programmattically in ruby
[20:32:13] Xeago: (`cat` in irb)
[20:32:15] shdw_frbrd: @Xeago hang on a min...
[20:32:42] zambini: Oh, except I typo'd, you still have to wrap it in brackets `(all + [current_coupon.presence]).compact`, or you could `push` it if you don't want to bracketize things
[20:32:55] mistermocha: has joined #ruby
[20:32:59] roshanavand: has joined #ruby
[20:34:02] drocsid: I'm getting /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:879:in `initialize': getaddrinfo: Name or service not known (SocketError) when using open ui, but I can resolve the host using nslookup. What gives?
[20:35:16] weemsledeux: has joined #ruby
[20:36:21] PedramT: has joined #ruby
[20:36:22] skade: has joined #ruby
[20:36:42] mistermocha: has joined #ruby
[20:38:01] shdw_frbrd: @Xeago x = IO.popen('cat', mode='w'); w.puts "foo" ?? Trying to test that in pry, but I think HexChat is screwing with my tiny netbook...
[20:39:46] shdw_frbrd: @Xeago seems to work here
[20:40:22] shdw_frbrd: @Xeago - or IO.popen('cat', mode='w') {|x| ...
[20:40:23] Xeago: shdw_frbrd: I see, I've been stupid, the default mode is just 'r', I did not specify that I wanted to write to it :|
[20:40:35] shdw_frbrd: Happy to help...
[20:41:21] craysiii: anyone using VS Code for ruby?
[20:41:34] IrishGringo_: has joined #ruby
[20:41:53] choke: has joined #ruby
[20:42:04] roshanavand: has joined #ruby
[20:42:11] nertzy: has joined #ruby
[20:43:28] FernandoBasso: has joined #ruby
[20:44:53] Ebok: Does anyone know of a good web tutorial for the various File.readlines File.open etc? Basically the ins and outs of reading and writing to files. I've been using RubyDoc primarily and that's great as a reference, but I'm looking for some instructional pieces that'll teach me best-practices when it comes to these methods.
[20:44:58] Coldblackice: has joined #ruby
[20:44:59] norc: craysiii, editors like any other part of your development environment are like religion. Pick one you like but dont talk about it.
[20:45:25] norc: Ebok, use ri instead of rdoc btw
[20:45:33] craysiii: maybe to you they are :) not everyone is close-minded
[20:46:01] j_mcnally: has joined #ruby
[20:46:02] norc: craysiii, no it is just that these talks tend to end up in religious wars - and those always end up in glorious vim vs emacs wars.
[20:46:12] norc: Its just filled with beliefs, nothing else.
[20:46:23] nerium: has joined #ruby
[20:46:36] zambini: I would suggest Sublime Text craysiii :P unless you're a command line junkie
[20:46:46] lucasb: has joined #ruby
[20:47:10] craysiii: i moved from sublime text to VS code for my web stuff, just wondering if anyone has experience with it using ruby/rails
[20:47:18] craysiii: ill stop though :)
[20:47:24] norc: Ebok, best practices come with with experience honestly, not from guides.
[20:47:42] norc: Ebok, best to start contributing to existing projects that make extensive use of these facilities.
[20:47:44] Ebok: norc, I have to start somewhere.
[20:47:50] norc: Ebok, contribute to a Gem you like then.
[20:47:56] shdw_frbrd: Sometimes you need some pointers before you can get the experience...
[20:48:00] IrishGringo: has joined #ruby
[20:49:03] baweaver: has joined #ruby
[20:50:11] norc: Ebok, the advantage is that you gain experience with the used facilities, with gems, with testing, deployment - all very useful feats. :)
[20:50:21] ta: has joined #ruby
[20:50:33] shdw_frbrd: has left #ruby: ("Leaving")
[20:51:22] norc: And by doing that you get to pick up how other people solve problems, until you start to develop your own style or recognize good and bad patterns.
[20:51:32] baweaver: has joined #ruby
[20:51:41] idefine: has joined #ruby
[20:52:00] Ebok: I completely agree with you. I'm not there yet however, I have to get my footing in the language before attempting to make contributions.
[20:52:24] roshanavand: has joined #ruby
[20:52:29] Ebok: In time. First, Im got to figure out how to DO stuff.
[20:52:43] norc: Alright. Id say dont worry about best practices at all then.
[20:53:02] norc: Just focus on getting things done.
[20:54:06] bigkevmcd: has joined #ruby
[20:54:26] norc: Ebok, the only best practice advice that is relevant for you, is to definitely use the block variants of the File class functions.
[20:54:39] Ebok: I dont even know what that is
[20:54:50] norc: Like File.open(path, mode) { |handle| }
[20:54:56] dlitvak: has joined #ruby
[20:55:26] ta: has joined #ruby
[20:55:59] norc: Ebok, otherwise feel free to write code and share your gists here, there is plenty people who can give you constructive criticsm.
[20:56:27] Ebok: Thanks norc.
[20:57:23] platzhirsch: has left #ruby: ()
[20:57:59] j_mcnally: has joined #ruby
[20:58:35] dlitvak: has joined #ruby
[20:58:53] j_mcnally: has joined #ruby
[21:01:22] skade: has joined #ruby
[21:01:29] psye: has joined #ruby
[21:03:03] howdoicomputer: has joined #ruby
[21:03:04] pawnbox: has joined #ruby
[21:04:16] IrishGringo_: has joined #ruby
[21:05:13] benlieb: has joined #ruby
[21:05:22] segmond: has joined #ruby
[21:05:58] mistermocha: has joined #ruby
[21:06:43] sdothum: has joined #ruby
[21:08:40] cicloid_: has joined #ruby
[21:10:56] ta: has joined #ruby
[21:11:09] wilbert: has joined #ruby
[21:13:17] diego4: has joined #ruby
[21:13:25] diego4: has joined #ruby
[21:13:56] goodroot: has joined #ruby
[21:15:45] cdg: has joined #ruby
[21:16:06] [Butch]: has joined #ruby
[21:18:11] tomchapin: has joined #ruby
[21:18:20] romain_t: has joined #ruby
[21:19:17] agent_white: has joined #ruby
[21:20:27] romain_t: has joined #ruby
[21:21:37] hannelita: has joined #ruby
[21:23:40] Bloodshot: has joined #ruby
[21:24:37] sgambino: has joined #ruby
[21:24:37] uris: has joined #ruby
[21:24:37] Rodya_: has joined #ruby
[21:25:16] derailed: has joined #ruby
[21:25:36] aspire: has joined #ruby
[21:27:58] nertzy: has joined #ruby
[21:30:16] binaryplease: has joined #ruby
[21:30:43] emilford: has joined #ruby
[21:31:36] diego4: has joined #ruby
[21:31:56] diego4: has joined #ruby
[21:32:21] dhollinger: has joined #ruby
[21:33:29] dlitvak: has joined #ruby
[21:35:42] cicloid: has joined #ruby
[21:36:19] atomical: has joined #ruby
[21:36:53] casadei: has joined #ruby
[21:36:58] bronson: has joined #ruby
[21:37:13] tAn: has joined #ruby
[21:37:25] PhantomSpank: has joined #ruby
[21:38:06] tAn: has joined #ruby
[21:39:01] baweaver: has joined #ruby
[21:39:54] cbyrda: has joined #ruby
[21:40:21] usershell: has joined #ruby
[21:41:02] sneakerhax: has joined #ruby
[21:41:23] sgambino: has joined #ruby
[21:42:02] YP-QMUL-W: has joined #ruby
[21:42:30] mchu: looking for a project for a beginnner/intermediate level programmer to learn / build a portfolio. anything out there? thanks in advance!
[21:43:26] jerematic: has joined #ruby
[21:43:31] waheedi: start your own project for now mchu until something works out :)
[21:43:38] waheedi: thats my advice
[21:43:59] dlitvak: has joined #ruby
[21:44:42] mchu: I tried but I???m not creative enough. I???d like to have set goals/instructions if possible. but any good open source projects out there for beginners?
[21:45:42] eam: mchu: what's your skillset look like? What kinds of areas are you interested in?
[21:46:06] dotrb: has joined #ruby
[21:46:22] atomical_: has joined #ruby
[21:46:25] niotoan: has joined #ruby
[21:46:38] mchu: well i know rubyonrails, js, html, css. Looking to debug or possibly build something with some concrete instructions
[21:47:04] dotrb: newbie here, should I use rvm or rbenv?
[21:47:12] havenwood: dotrb: chruby
[21:47:22] ta: has joined #ruby
[21:47:26] sgambino: has joined #ruby
[21:47:33] goodroot: has joined #ruby
[21:47:49] zeroDivisible: has joined #ruby
[21:47:58] guacamole: has joined #ruby
[21:48:44] mfb2: dotrb: I use rbenv
[21:48:52] dlitvak: has joined #ruby
[21:49:11] eam: I use rvm but I'm really not pleased with it
[21:49:17] mfb2: I struggled through that decision again recently... I had used both in the past, I found rbenv to be much easier to reason about
[21:49:30] waheedi: i use rvm and I like it :)
[21:49:36] adaedra: +1 for chruby.
[21:49:56] waheedi: three characters :)
[21:50:05] waheedi: less is more :P
[21:50:29] dotrb: it's like one of those emacs vs vim questions for the ruby world it seems
[21:50:32] adaedra: "Less is more" is the perfect thing to say *against* rvm, if I may.
[21:50:40] cbyrda: I'm fairly new to ruby but I've been using rvm, maybe because I don't know any better what is 'The case against RVM' if there is one?
[21:50:43] jottr: has joined #ruby
[21:50:43] momomomomo: has joined #ruby
[21:50:57] adaedra: It's bloat, to be short.
[21:51:06] solars: has joined #ruby
[21:51:15] last_staff: has joined #ruby
[21:51:21] dotrb: adaedra: what is bloat? rvm?
[21:51:27] waheedi: mostly end results are very important
[21:51:44] mfb2: don't expect a cogent defense of rbenv from me... I simply found it easier to deal with than rvm. I recall it required a lot of hand-holding in order to work properly
[21:51:50] cbyrda: So I guess this is really targeted at people that don't really use multiple ruby versions so maybe if you only ever just use the latest I can see the bloat argument
[21:51:59] adaedra: mfb2: argument against rbenv: rbenv rehash
[21:52:26] dotrb: adaedra: yupp, there's that
[21:52:27] mfb2: adaedra: fair point, definitely had that happen to me in the past
[21:52:49] dotrb: ACTION issues rbenv rehash command he forgot earlier
[21:52:55] ruby[bot]: Missing command under rbenv? Did you try `rbenv rehash`?
[21:53:23] dlitvak: has joined #ruby
[21:53:57] newdan: rbenv is the only one that reads the intended Ruby version from the command line, right?
[21:54:00] ledestin: has joined #ruby
[21:54:05] newdan: Er, meant to say from the filesystem
[21:54:48] newdan: adaedra: Elaborate?
[21:54:51] dotrb: chruby seems very minimal
[21:55:02] lemur: has joined #ruby
[21:55:07] adaedra: chruby does it too, and iirc rvm does it too
[21:55:45] adaedra: dotrb: that's the goal.
[21:55:58] greenhat: It looks like adding methods in a rake file just adds those methods to Object, even if you declare the methods in a rake namespace.
[21:56:09] greenhat: Is that right?
[21:56:23] dotrb: ah.. clarity
[21:57:19] cbyrda: anyone around here ever use Nexus as a gemserver? If so, how did it work out for you
[21:58:47] greenhat: Is there a suggested way to create functions in a rake file where they don't get added to the global namespace?
[21:58:58] colegatron: has joined #ruby
[22:00:36] lacuna: has joined #ruby
[22:01:39] guacamole: has joined #ruby
[22:04:15] mistermocha: has joined #ruby
[22:04:16] sgambino: has joined #ruby
[22:06:03] axisys: has joined #ruby
[22:07:22] diego4: has joined #ruby
[22:07:35] diego4: has joined #ruby
[22:07:45] PhantomSpank: has joined #ruby
[22:08:04] agent_white: has joined #ruby
[22:08:33] sgambino: has joined #ruby
[22:08:59] mistermocha: has joined #ruby
[22:09:31] Ox0dea: greenhat: Either stick them in your own namespace or add them to Object in a refinement such that they're only visible from the Rakefile itself.
[22:10:03] goodroot: has joined #ruby
[22:13:08] gizless: has joined #ruby
[22:14:21] dlitvak: has joined #ruby
[22:16:22] northfurr: has joined #ruby
[22:17:22] jbrhbr: has joined #ruby
[22:17:27] finisherr: has joined #ruby
[22:20:03] dlitvak: has joined #ruby
[22:20:37] choke: has joined #ruby
[22:20:46] ohcibi: has joined #ruby
[22:21:02] binaryplease1: has joined #ruby
[22:24:39] baweaver: has joined #ruby
[22:25:30] FernandoBasso: has joined #ruby
[22:25:36] eriick: has joined #ruby
[22:26:02] jamw: has joined #ruby
[22:26:03] gbgdev: has joined #ruby
[22:26:06] confounds: has joined #ruby
[22:26:12] yfeldblum: has joined #ruby
[22:26:30] binaryplease: has joined #ruby
[22:27:29] nertzy: has joined #ruby
[22:27:40] skade: has joined #ruby
[22:27:49] eriick: has left #ruby: ()
[22:29:09] zambini: has joined #ruby
[22:29:17] dlitvak_: has joined #ruby
[22:32:46] yqt: has joined #ruby
[22:34:18] pawnbox: has joined #ruby
[22:35:27] stevemackinnon: has joined #ruby
[22:36:34] kalopsian: has joined #ruby
[22:37:23] gizmore: has joined #ruby
[22:37:49] Mia: has joined #ruby
[22:37:49] Mia: has joined #ruby
[22:38:01] ohcibi: has joined #ruby
[22:38:16] drbrain: greenhat: I put functions in a library and make rake a wrapper for the library's actions
[22:38:28] drbrain: then you get both rake tasks and an API for enhanced automation
[22:39:00] mchu: has joined #ruby
[22:39:57] atomical: has joined #ruby
[22:42:50] TomPeed: has joined #ruby
[22:43:54] 6A4ABQHYC: has joined #ruby
[22:44:16] Darmani: has joined #ruby
[22:44:24] Darmani: Hey kids<3
[22:45:02] gizless: has joined #ruby
[22:45:05] zenlot1: has joined #ruby
[22:45:38] wilbert: has joined #ruby
[22:46:23] diego_k: has joined #ruby
[22:49:19] emilford_: has joined #ruby
[22:49:51] jgt: has joined #ruby
[22:49:54] bollullera: has joined #ruby
[22:50:47] fclausen: has joined #ruby
[22:51:37] Ebok: has joined #ruby
[22:52:21] dopie: has joined #ruby
[22:54:18] solocshaw: has joined #ruby
[22:56:35] aegis3121: has joined #ruby
[22:58:19] skade: has joined #ruby
[22:58:53] d0nn1e: has joined #ruby
[22:59:04] zarubin: has joined #ruby
[23:00:25] Melpaws: has joined #ruby
[23:00:53] Outlastsheep: has joined #ruby
[23:01:41] guacamole: has joined #ruby
[23:02:17] crdpink: has joined #ruby
[23:03:48] lacuna: has joined #ruby
[23:03:48] howdoicomputer: has joined #ruby
[23:04:52] B1n4r10: has joined #ruby
[23:05:01] lucasb: has joined #ruby
[23:07:45] baweaver: has joined #ruby
[23:07:58] Dimik: has joined #ruby
[23:08:36] jgpawletko: has joined #ruby
[23:11:27] sakix: has joined #ruby
[23:12:11] didymus: has joined #ruby
[23:13:15] ss_much: has joined #ruby
[23:13:15] baweaver: has joined #ruby
[23:13:23] hakunin: has joined #ruby
[23:13:39] lacuna: has joined #ruby
[23:15:00] Mia: has joined #ruby
[23:15:00] Mia: has joined #ruby
[23:18:27] Ebok: has joined #ruby
[23:18:43] hahuang65: has joined #ruby
[23:18:49] sgambino: has joined #ruby
[23:20:12] dlitvak: has joined #ruby
[23:21:38] BlackCoyote: has joined #ruby
[23:22:33] asccigcc: has joined #ruby
[23:24:31] Ropeney: has joined #ruby
[23:27:02] zambini: Did Ebok receive this as part of an answer: https://github.com/bbatsov/ruby-style-guide
[23:27:34] Ebok: I did not. Thankyou.
[23:28:03] janebootydoe: has joined #ruby
[23:29:07] zambini: Remember: They're just guidelines, but if you have any questions that page does a pretty decent job of saying what reasons they have for their choices
[23:29:59] zambini: For me, learning styles is an important part of learning what it means to "do things right" in a language. Having Rubocop plugin in SublimeText/Emacs/Vim is a nice way to see things in realtime
[23:30:40] zambini: I'm also new to Ruby specifically, but it helps me out to see almost instantly that I typed something in a less-recommended style. Same thing happened when I was learning Python with PEP8 plugins.
[23:32:17] Ebok: I like to have as many good references as possible.
[23:33:08] Mackerel: has joined #ruby
[23:33:41] pawnbox: has joined #ruby
[23:35:25] drocsid: has joined #ruby
[23:36:55] finisherr: has left #ruby: ()
[23:37:33] bronson: has joined #ruby
[23:37:47] lucasb: that style guide is very good, but... some items are very subjective. I don't follow everything in there.
[23:38:58] baweaver: has joined #ruby
[23:39:26] Radar: Sacriledge.
[23:39:31] Radar: Shun the non-believer.
[23:39:44] benzrf: has joined #ruby
[23:39:51] Ox0dea: Radar: No D like in "privilege".
[23:40:03] Radar: Ox0dea: I am sorry Oh Mighty One.
[23:40:09] benzrf: with Thread.new, what order of magnitude of threads is it reasonable to go up to
[23:40:15] benzrf: 10s? 100000s?
[23:40:15] Pufferfish: what's up Radar, back again to flail with beginner mess
[23:40:42] CihanKaygusuz: has left #ruby: ()
[23:40:52] Radar: Pufferfish: you know me :)
[23:41:13] snowy: has joined #ruby
[23:41:31] lucasb: It's funny how psychology works. It can make you feel like a bad person if you don't follow the style guide. But I think I got over it, now :)
[23:41:33] emilford: has joined #ruby
[23:41:58] chipotle: has joined #ruby
[23:42:29] Ox0dea: benzrf: Nice to meet you.
[23:42:51] mary5030_: has joined #ruby
[23:42:51] Xeago: has joined #ruby
[23:44:14] CloCkWeRX: has joined #ruby
[23:45:03] choke: has joined #ruby
[23:45:07] dlitvak_: has joined #ruby
[23:45:57] goodroot: has joined #ruby
[23:46:05] paradisaeidae: has joined #ruby
[23:48:34] mchu: has joined #ruby
[23:48:44] casadei: has joined #ruby
[23:52:20] zambini: lucasb: yep! Exactly why it's a guide and not a rule :D
[23:54:24] guacamole: has joined #ruby
[23:54:58] dfockler: has joined #ruby
[23:55:45] lemur: has joined #ruby
[23:57:53] x77686d: has joined #ruby
[23:59:41] hanneli: has joined #ruby
[23:59:54] djbkd: has joined #ruby