« Back to channel list

#ruby - 28 February 2019

« Back 1 day Forward 1 day »
[00:06:50] Onwarion: has joined #ruby
[00:09:39] ua: has joined #ruby
[00:21:22] laaron: has joined #ruby
[00:25:54] Onwarion: has joined #ruby
[00:28:31] jyaworski: has joined #ruby
[00:29:56] ramfjord: has joined #ruby
[00:30:13] sezuan: has joined #ruby
[00:30:30] ramfjord: Anyone know a good library to parse strings like '500Mi' into a number of bytes?
[00:31:51] ramfjord: Mi, Gi, Ki are the units I need to support
[00:33:39] Forager: has joined #ruby
[00:34:18] orbyt_: has joined #ruby
[00:36:52] mr_blue: has joined #ruby
[00:37:03] houhoulis: has joined #ruby
[00:38:16] mr_blue: What the keywork 'using' means in : 'class C1; using C2; end' ?
[00:38:56] mr_blue: I was aware about 'include' and 'extend' but I do not find infos about 'using'
[00:41:58] leftylink: I think using is for a refinement
[00:43:21] leftylink: &>> module ArraysCanSayHello refine Array do def hello; "hello" end end end; using ArraysCanSayHello; [].hello
[00:43:22] rubydoc: # => "hello" (https://carc.in/#/r/6dqj)
[00:47:15] znz_jp: has joined #ruby
[00:48:34] mr_blue: leftylink: great thank you :) I'll check you link
[00:49:23] bmurt: has joined #ruby
[00:49:57] mr_blue: leftylink: I there official doc about this ?
[00:50:17] mr_blue: s/I there/Is there/
[00:56:41] leftylink: mr_blue: I'm sure there probably is. you will probably be able to find it, now that you know it is called a Refinement. It should be in the docs for versions 2.0.0 and later
[00:58:33] AJA4351: has joined #ruby
[01:08:14] mr_blue: leftylink: yes you're right I just found it. Thank again for you time :)
[01:08:14] orbyt_: has joined #ruby
[01:12:36] Onwarion: has joined #ruby
[01:17:39] mangold: has joined #ruby
[01:26:54] laaron: has joined #ruby
[01:26:58] tdy: has joined #ruby
[01:32:36] mangold: has joined #ruby
[01:50:25] faitswulff: has joined #ruby
[01:55:19] duderonomy: has joined #ruby
[01:58:31] jyaworski: has joined #ruby
[02:02:52] crankharder: has joined #ruby
[02:03:35] scapegoatee: has joined #ruby
[02:15:28] Swyper: has joined #ruby
[02:15:31] Swyper: https://pastebin.com/UGFE0fZr
[02:15:31] ruby[bot]: Swyper: as I told you already, please use https://gist.github.com
[02:15:56] Swyper: https://gist.github.com/RickArora/8de9e0d08b94392615094fd9d92a0fff
[02:16:05] Swyper: can someone help me out
[02:16:25] Swyper: 01_coprime.rb:16: void value expression
[02:32:43] Renich: has joined #ruby
[02:34:44] orbyt_: has joined #ruby
[02:46:16] faitswulff: has joined #ruby
[02:55:23] tdy: has joined #ruby
[03:10:44] Swyper: has joined #ruby
[03:10:55] Swyper: https://gist.github.com/RickArora/8de9e0d08b94392615094fd9d92a0fff
[03:11:15] Swyper: i have alot of syntax errors
[03:12:13] fluxAeon: has joined #ruby
[03:13:46] ogres: has joined #ruby
[03:14:48] jyaworski: has joined #ruby
[03:30:51] Swyper: has joined #ruby
[03:30:58] Swyper: why will no1 help me =(
[04:02:24] wolfshappen: has joined #ruby
[04:09:06] braincrash: has joined #ruby
[04:13:11] crankharder: has joined #ruby
[04:20:19] Swyper: has joined #ruby
[04:20:20] Swyper: mozzarella:
[04:29:28] v01d4lph4: has joined #ruby
[04:29:42] Swyper: havenwood: you on?
[04:30:12] baweaver: Swyper: You're on your own for syntax errors, you need to look those up.
[04:31:21] baweaver: What have you tried to fix your syntax errors?
[04:31:35] \void: has joined #ruby
[04:31:58] Swyper: baweaver: well I looked up the correct syntax and read the error message
[04:32:08] Swyper: the crazy part is some of the errors its showing arent even in my code
[04:32:24] baweaver: How do you write a Ruby method?
[04:32:54] baweaver: What's the syntax?
[04:33:00] Swyper: https://gist.github.com/RickArora/16fb844c8744ead5e8efc18a9900da73
[04:34:04] Swyper: changing line 12 to coprime? still gives me the same errors
[04:34:15] baweaver: Fix the indentation as a first step
[04:34:39] baweaver: Second, what's your method name?
[04:34:58] baweaver: Third, where is that method defined when you call it on 7 through 10?
[04:36:28] Swyper: 1) done, 2) coprime? 3) the method is defined right below the method call
[04:36:42] Swyper: is 3) causing the error? does a method need to be defined before its called?
[04:36:44] baweaver: 2: No it's not
[04:36:59] baweaver: Ruby isn't that smart.
[04:39:02] Swyper: okay so in C iirc the options are to 1) define the method before calling it or 2) declare the method signature and define it later on, is it exactly the same for Ruby?
[04:39:29] Swyper: 2) so my method name is 'coprime' not 'coprime?' ?
[04:39:52] Swyper: if the answer to 2) is yes what does ? mean in the context of ruby
[04:42:05] Swyper: I have so many errors and I'm not really sure how to look them up since the errors aren't really descriptive
[04:44:25] MyMind: has joined #ruby
[04:56:36] Swyper: has joined #ruby
[04:56:40] Swyper: i got it working
[04:57:04] Swyper: thanks for your help baweaver
[04:57:06] xlued: has joined #ruby
[05:03:53] Xiti`: has joined #ruby
[05:10:17] SeepingN: has joined #ruby
[05:11:56] Xiti: has joined #ruby
[05:15:43] ByronJohnson: has joined #ruby
[05:23:29] bairyn: has joined #ruby
[05:23:48] t0xik: has joined #ruby
[05:27:02] Swyper: has joined #ruby
[05:30:56] tdy: has joined #ruby
[05:53:13] rippa: has joined #ruby
[05:55:40] ramfjord: has joined #ruby
[06:01:37] jyaworski: has joined #ruby
[06:06:51] jcarl43: has joined #ruby
[06:25:13] chens: has joined #ruby
[06:37:02] v01d4lph4: has joined #ruby
[06:37:30] conta: has joined #ruby
[06:48:53] am0123: has joined #ruby
[06:49:41] DTZUZO: has joined #ruby
[06:57:48] idiocrash: has joined #ruby
[07:02:33] Furai: has joined #ruby
[07:13:37] sauvin: has joined #ruby
[07:22:28] prestorium: has joined #ruby
[07:22:51] tdy1: has joined #ruby
[07:24:08] aupadhye: has joined #ruby
[07:24:55] mangold: has joined #ruby
[07:27:17] jyaworski: has joined #ruby
[07:30:07] maufart__: has joined #ruby
[07:52:47] jyaworski: has joined #ruby
[08:21:00] kapil____: has joined #ruby
[08:21:11] Cthulu201: has joined #ruby
[08:24:10] lxsameer: has joined #ruby
[08:24:27] blackmesa: has joined #ruby
[08:25:49] clemens3_: has joined #ruby
[08:44:01] alem0lars: has joined #ruby
[08:58:42] livcd: https://www.twitch.tv/videos/387236323
[09:08:17] tuor: has joined #ruby
[09:17:55] mikecmpbll: has joined #ruby
[09:22:49] G: Having a bit of a d'oh moment, what is it in ruby terms when you do something like. method_a.dostuff.domorestuff (i.e. the .dostuff and .domorestuff)
[09:23:56] zenspider: G: they're either just called method calls or chained method calls... why? what's your doh moment?
[09:24:30] G: zenspider: I was just trying to think of the best term to use while Googling :)
[09:24:42] zenspider: G: ask me, not google
[09:27:39] G: Basically, what I'm trying to do is prevent the next chained method from running, because I've already run it - this is a monkey patched method situation.
[09:28:15] zenspider: so, you have something like obj.a.b.c and you want #b to prevent #c from "running" ?
[09:28:33] zenspider: can you explain the "why" a bit more?
[09:28:58] zenspider: you've monkey patched a class or object to do something custom and you want to be done in the middle?
[09:34:17] G: Yeah, so the background is, this is within a rails app, and more specifically ActionMailer (just so it's a little less abstract), controller calls MailerClass.send_message.deliver I've monkey patched send_message because we need to do things before and after the MailerClass actually sends the message, so the new send_message kind of looks like: dostuff, resp = orig_send_message.deliver, domorestuff, resp (where commas are linebreaks), but I'm finding .delive
[09:38:09] reber: has joined #ruby
[09:40:45] TheBrayn: you could use &. and return nil
[09:41:41] zenspider: G: the proper way to do that is to subclass, override, and use super w/ your custome prefix/suffix code around the super...
[09:42:52] zenspider: but... if you are already in the muck... either what TheBrayn said, or you return a dummy that doesn't respond to those chained messages
[09:43:31] zenspider: obj = Object.new; def obj.c; self; end; def obj.d; self; end; obj
[09:44:07] zenspider: I don't actually recommend creating objects like that. Create a DummyMail class, or whatever, and instantiate one. That way you're not mucking with method tables all the time
[09:45:04] zenspider: does that make sense?
[09:45:23] G: Just trying to figure it out in my head
[09:45:41] zenspider: to which scenario?
[09:46:02] zenspider: SO CLOSE: 6339 runs, 27766 assertions, 4 failures, 19 errors, 44 skips
[09:47:23] G: I don't think TheBrayn's suggestion would work, because the calling controller needs the response, I think I've got to do what you've suggested. Just going to brb while I look at something real quick
[09:47:58] zenspider: does it need the response? generally you call mailers for side-effect, no?
[09:48:33] G: Need to record Message-Id's
[09:48:51] zenspider: also, what are you monkey patching it for? what problem are you trying to solve?
[09:51:37] G: The mailer service, modifies the message-id from what the application provides, AND what ActionMailer generates, but doesn't replace the Message ID in the returned response, instead it adds to the response hash, the monkey patch is to return the Message ID that was truly used by replacing the message-id
[09:52:27] G: (this is Amazon/SES, sigh... https://github.com/aws/aws-sdk-rails/blob/master/lib/aws/rails/mailer.rb#L37)
[09:53:40] G: I'm starting to ponder if it'd be easier to monkey patch that class, wrap around deliver!
[09:53:48] zenspider: I would suggest NOT changing the return type at all. Instead, store off the value you want in a side instance variable on the response object and access it in the controller
[09:55:06] zenspider: try to get it as simple as possible. Something like:
[09:55:07] zenspider: def some_monkey_patched_method; @original_msg_id = @msg_id; super; end
[09:55:24] zenspider: Then you can also create an accessor method or just use ivar_get to grab it in the crontroller
[10:02:38] wolfshappen_: has joined #ruby
[10:05:25] jyaworski: has joined #ruby
[10:10:20] arup_r: has joined #ruby
[10:15:32] G: zenspider: thanks for the help, I managed to get a solution where I didn't have to touch the controllers to get SES working right, think I'll be filing an issue on their github repo though
[10:16:32] zenspider: you should. thank you
[10:32:37] themsay: has joined #ruby
[10:41:56] am0123: has joined #ruby
[10:52:33] blackmesa1: has joined #ruby
[10:58:49] ellcs: has joined #ruby
[11:12:45] xrexeon: has joined #ruby
[11:13:40] mangold: has joined #ruby
[11:24:42] laaron-: has joined #ruby
[11:27:29] conta: has joined #ruby
[11:50:05] jyaworski: has joined #ruby
[11:56:12] ramfjord: has joined #ruby
[12:06:17] stryek: has joined #ruby
[12:07:07] jyaworski: has joined #ruby
[12:16:59] iMadper: has joined #ruby
[12:35:30] houhoulis: has joined #ruby
[12:35:44] Pisuke: has joined #ruby
[12:47:38] arooni_team_b: has joined #ruby
[12:47:54] zapata_: has joined #ruby
[12:52:21] gray_-_wolf: has joined #ruby
[12:55:24] zenspider: Finished in 4.867713s, 1302.2543 runs/s, 5722.3998 assertions/s.
[12:55:24] zenspider: 6339 runs, 27855 assertions, 0 failures, 0 errors, 44 skips
[13:00:04] darix: zenspider: that seems a bit slow *runs*
[13:00:28] zenspider: more important (to me, currently) are the zeros
[13:00:48] zenspider: that was ~12 hour debugging session and rat's nest untangling
[13:01:12] nowhere_man: has joined #ruby
[13:03:28] am0123: has joined #ruby
[13:05:59] fribmendes: has joined #ruby
[13:06:30] rprimus_: has joined #ruby
[13:13:32] aqd: has joined #ruby
[13:13:55] AJA4350: has joined #ruby
[13:19:38] nwradio: has joined #ruby
[13:20:49] am0123: has joined #ruby
[13:23:45] faitswulff: has joined #ruby
[13:31:57] nfk: has joined #ruby
[13:34:24] blackmesa1: has joined #ruby
[13:46:12] darkphnx: has joined #ruby
[13:53:48] ogres: has joined #ruby
[14:04:23] blackmesa1: has joined #ruby
[14:08:10] jyaworski: has joined #ruby
[14:15:33] hightower3: has joined #ruby
[14:15:55] hightower3: How do I most conveniently delete [0..x] indices from array and return them as list?
[14:17:13] phaul: &ri Array#shift, hightower3
[14:17:13] rubydoc: hightower3: https://ruby-doc.org/core-2.6/Array.html#method-i-shift
[14:17:25] hightower3: aah, fabulous
[14:22:57] Creatornator: has joined #ruby
[14:27:32] lucasb: has joined #ruby
[14:38:32] AJA4350: has joined #ruby
[14:39:06] bmurt: has joined #ruby
[14:54:10] orbyt_: has joined #ruby
[15:02:30] Rapture: has joined #ruby
[15:05:15] laaron: has joined #ruby
[15:05:40] Dbugger: has joined #ruby
[15:08:47] themsay: has joined #ruby
[15:18:03] jyaworski: has joined #ruby
[15:22:05] ramfjord: has joined #ruby
[15:23:14] Xeago_: has joined #ruby
[15:28:36] Creatornator: has joined #ruby
[15:29:41] conta: has joined #ruby
[15:30:07] jyaworski: has joined #ruby
[15:32:27] polishdub: has joined #ruby
[15:35:35] SeepingN: has joined #ruby
[15:36:38] blackmesa1: has joined #ruby
[15:39:10] ellcs: is there a better way for `1.digits.count`?
[15:42:29] bhaak: Math.log10(1).floor + 1
[15:42:50] bhaak: less mathy: 1.to_s.length
[15:43:01] tdy1: has joined #ruby
[15:43:16] agent_white: has joined #ruby
[15:43:43] phaul: what's wrong with 1.digits.count ?
[15:44:14] mozzarella: it's certainly the most readable
[15:44:39] bhaak: it's probably also the slowest.
[15:44:50] mozzarella: I'm not sure
[15:45:13] ellcs: i think digits is slower
[15:45:32] conta: has joined #ruby
[15:52:12] jyaworski: has joined #ruby
[15:55:47] bhaak: puts Benchmark.measure { 10_000_000.times { 123456.digits.count } }; puts Benchmark.measure { 10_000_000.times { 123456.to_s.length } }; puts Benchmark.measure { 10_000_000.times { Math.log10(123456).floor + 1 } }
[15:56:13] bhaak: 5 seconds vs 3.3 seconds vs 1.2 seconds
[15:56:27] bhaak: I would have expected the math version to be faster
[15:58:57] jyaworski: has joined #ruby
[15:58:58] Zarthus_: kinda depends on how often you run the bechmark
[15:59:35] Zarthus_: the second and third one get kinda close to eachother
[16:02:53] wolfshappen: has joined #ruby
[16:11:00] hightower3: What's the best way to spawn a process and only take control of its stdin, leaving stdout/stderr as-is?
[16:15:38] bhaak: Zarthus_: the times are pretty stable. but running it now, I get 1.6s seconds for the to_s version
[16:19:34] ellcs: has joined #ruby
[16:23:29] cd: has joined #ruby
[16:24:39] dmwit: Only one of the three works on negative numbers, and the fastest one doesn't handle bignums.
[16:28:40] volkov: has joined #ruby
[16:28:45] bhaak: the math one worksforme with bignums
[16:30:27] bhaak: and "working" with negative numbers is depending on what you expect. I'd say -1.to_s.length => 2 is wrong
[16:32:34] bougyman: hrm. I forgot something and google isn't helping me remember.
[16:32:35] cd: has joined #ruby
[16:35:51] bougyman: https://gist.github.com/bougyman/2ae6f784c582726b15f6992d2c1e3212
[16:37:41] bougyman: google points me here, which are just variations of what I'd already done: https://stackoverflow.com/questions/133357/how-do-you-find-the-namespace-module-name-programmatically-in-ruby-on-rails
[16:38:23] phaul: bougyman: There is module nesting
[16:38:33] phaul: and that's orthogonal to inheritance
[16:39:25] phaul: &ri Module.nesting
[16:39:26] rubydoc: https://ruby-doc.org/core-2.6/Module.html#method-c-nesting
[16:40:53] nowhere_man: has joined #ruby
[16:41:44] bougyman: phaul: I know it is.
[16:41:44] phaul: you split on '::' which is what nesting is, and you also deal with ancestors, which is inheratnce. Those are completely disparate things
[16:42:32] bougyman: I don't think I ever mentioned inheritance. I know the difference.
[16:42:36] bougyman: This is just namespace nesting.
[16:42:51] bougyman: and I want to know the parent namespace of a class inside that module
[16:43:24] ivanskie: has joined #ruby
[16:43:41] bougyman: module Outer; module Inner; module SuperInner; class Foo; def my_parent; ...; end; end; end; end; end
[16:43:52] bougyman: I want foo's my_parent to return Outer::Inner::SuperInner
[16:44:07] bougyman: I mean, that's what it does, currently.
[16:47:41] hightower3: Why I get "wrong exec redirect action" when I try to do: input = StringIO.new; spawn(*cmdline, :in => input) ?
[16:47:55] hightower3: (I would like to print into 'input' to be fed into the process' stdin)
[16:51:55] phaul: &>> module A; module B; module C; class D; def self.x; Module.nesting.first; end; end; end; end; end; A::B::C::D.x
[16:51:57] rubydoc: # => A::B::C::D (https://carc.in/#/r/6dyg)
[16:53:16] phaul: or Module.nesting[1] for the outer scope.
[16:54:59] phaul: &>> module A; module B; module C; class D; def self.x; Module.nesting[1]; end; end; end; end; end; A::B::C::D.x
[16:55:00] rubydoc: # => A::B::C (https://carc.in/#/r/6dyh)
[16:58:25] JayDoubleu: has joined #ruby
[16:59:04] phaul: bougyman: the gist did self.class.ancestors.first which confused me. can you explain what that bit of code is supposed to do?
[16:59:55] JayDoubleu: Hi, I am completely new to ruby. If I want to run bunch of queries on aws and cache it, should I save it to a file and check that file on each run or is there some sort of caching module/plugin available ?
[17:04:41] Creatornator: has joined #ruby
[17:09:31] Creatornator: has joined #ruby
[17:14:33] \void: has joined #ruby
[17:17:13] jcarl43: has joined #ruby
[17:17:34] hightower3: is "a, b = b, a" atomic in MRI?
[17:23:13] galaxie: has joined #ruby
[17:23:21] balo: hightower3: RubyVM::InstructionSequence.compile("a = 1; b =2; a, b = b, a").disasm
[17:23:32] prestorium: has joined #ruby
[17:23:46] galaxie: How would I make an array out of the results of calling a method n times?
[17:24:20] elomatreb: You can use Integer#times with map to get this easily
[17:24:29] hightower3: galaxie, something as simple as results = []; 10.times do |i| results.push a_method() end ?
[17:25:10] [Butch]: has joined #ruby
[17:25:19] hightower3: thanks balo, nice one
[17:25:27] galaxie: elomatreb: And that's as fast as hightower3's suggestion?
[17:25:58] elomatreb: Probably equivalent or slightly faster
[17:28:12] balo: &>> 3.times.map { |n| "n=#{n}" }
[17:28:12] rubydoc: # => ["n=0", "n=1", "n=2"] (https://carc.in/#/r/6dyi)
[17:28:36] galaxie: elomatreb: My mind's blanking, what's it called when you pass something like &:to_s or similar?
[17:29:11] balo: galaxie: it's called symbol to proc :)
[17:29:44] elomatreb: galaxie: 0.to_s, 1.to_s, ...
[17:34:13] SeepingN: has joined #ruby
[17:35:29] orbyt_: has joined #ruby
[17:39:56] phaul: &asm>> a = 1; b = 2; a, b = b, a
[17:39:57] rubydoc: I have disassembled your code, the result is at https://carc.in/#/r/6dyn
[17:40:17] xrexeon: has joined #ruby
[17:40:25] prestorium: has joined #ruby
[17:42:49] bougyman: phaul: the parent of a child class is looking for its own namespace.
[17:42:57] bougyman: But this method is defined in its parent class.
[17:43:05] bougyman: which has a different namespace.
[17:45:23] bougyman: Module.nesting seems to always choose the parent class's namespace.
[17:46:19] orbyt_: has joined #ruby
[17:53:50] ams__: has joined #ruby
[18:03:59] mikecmpbll: has joined #ruby
[18:07:39] phaul: I _think_ self.class.ancestors.first is just self.class. To get the parent class there is .superclass
[18:08:33] gix: has joined #ruby
[18:09:58] Renich: has joined #ruby
[18:09:58] phaul: that^ is until al2o3-cr arrives with Fiddle :D
[18:11:41] jyaworski: has joined #ruby
[18:16:24] KeyJoo: has joined #ruby
[18:16:53] mikecmpbll: has joined #ruby
[18:34:13] Renich_: has joined #ruby
[18:35:54] cow[moo]: has joined #ruby
[18:36:29] AJA4350: has joined #ruby
[18:48:43] bambanx: has joined #ruby
[18:53:04] Creatornator: has joined #ruby
[18:59:08] serverok: has joined #ruby
[18:59:18] ramfjord: has joined #ruby
[18:59:53] ua: has joined #ruby
[19:04:21] serverok: has left #ruby: ()
[19:04:25] am0123: has joined #ruby
[19:11:16] orbyt_: has joined #ruby
[19:19:02] d^sh: has joined #ruby
[19:21:50] jyaworski: has joined #ruby
[19:36:48] dinfuehr: has joined #ruby
[19:39:11] am0123: has joined #ruby
[19:41:23] reber: has joined #ruby
[19:50:20] xtsee: has joined #ruby
[19:52:33] jyaworski: has joined #ruby
[19:58:26] wilbert: has joined #ruby
[20:02:00] ramfjord: has joined #ruby
[20:03:23] crankhar1er: has joined #ruby
[20:09:31] postmodern: has joined #ruby
[20:29:28] orbyt_: has joined #ruby
[20:32:40] hiroaki_: has joined #ruby
[20:51:59] Swyper: has joined #ruby
[20:57:03] cnsvc_: has joined #ruby
[20:59:34] Fernando-Basso: has joined #ruby
[21:05:55] Inline: has joined #ruby
[21:07:15] marmotini_: has joined #ruby
[21:09:12] am0123: has joined #ruby
[21:33:14] zenspider: phaul: prepend can fuck up that assumption
[21:34:30] hightower2: has joined #ruby
[21:43:08] ams__: has joined #ruby
[21:45:03] AJA4351: has joined #ruby
[21:46:13] phaul: zenspider: true
[21:51:03] nwradio: has joined #ruby
[21:51:07] phaul: based on what they said tho, I _think_ they wanted self.class.superclass. as they wanted parent?
[21:54:40] hightower2: Is there a way to start a thread and not have to join it later after it exits?
[22:02:11] wolfshappen_: has joined #ruby
[22:06:18] ramfjord: hightower2: after the process exits? All threads will be terminated. After the thread exits? Doesn't join just tell a process to wait for the threads to exit? not sure what you're trying for
[22:06:47] ramfjord: guys I just wrote some beautious ruby code to use ActiveModel::Validations on dynamically generated objects: https://gist.github.com/ramfjord/8903bfd6c4d9dbb0cb44866d4a52335e
[22:06:55] hightower2: ramfjord, yes (the latter case you describe), but isn't it that until I call join() the thread isn't garbage collected
[22:07:18] hightower2: I want it to be GC-ed, but without me having to call join or do any cleanup after it decides to exit
[22:08:46] ramfjord: Ahhh, well I don't know the internals of the GC, but i would think that as the thread finishes it would pop off it's stack, and the reference counter would be able to see that the ojects are collectible. Probably others could answer better than I though.
[22:09:17] ramfjord: You might be able to test this out by starting a thread which creates a big array and exits, then in the main thread sleep a second or two and call GC.start, all while monitoring the memory usage
[22:09:46] ramfjord: or do you already know they won't be GC'd in the thread without join?
[22:10:35] hightower2: ramfjord, I'm pretty sure they're not collected because the return value is still pending - no one retrieved it, and in the list of threads they are still visible even though in state DEAD or whatever
[22:11:17] hightower2: (whatever the exit status was)
[22:11:56] ramfjord: separate thread that lists dead threads and joins them :D
[22:13:54] hightower2: hehe :) possibly :)
[22:16:04] jyaworski: has joined #ruby
[22:16:06] ramfjord: weirdly when I'm testing this locally I can't seem to reduce the process memory usage with GC.start even after I join the thread
[22:16:49] zenspider: hightower2: what you're describing is a bad smell
[22:17:24] ramfjord: yeah, possibly keeping a persistent threadpool with work units and a queue would be better, since there's probably a decent overhead to starting and stopping them
[22:19:35] hightower2: oh yeah, I assumed thread == a process I run in it, when in fact nothing prevents me from re-using the same thread from starting the process in a loop multiple times
[22:20:14] hightower2: zenspider, yeah I wasn't intending to really do it the way I asked, unless some favorable answer/option was given
[22:27:40] akem: has joined #ruby
[22:39:24] hiroaki_: has joined #ruby
[22:48:52] AJA4351: has joined #ruby
[23:00:49] cd: has joined #ruby
[23:02:53] ogres: has joined #ruby
[23:20:37] ericboehs: has joined #ruby
[23:25:50] AJA4351: has joined #ruby
[23:45:22] r3m: has joined #ruby
[23:47:15] Renich_: has joined #ruby
[23:53:35] jyaworski: has joined #ruby