« Back to channel list

#ruby - 08 April 2016

« Back 1 day Forward 1 day »
[00:00:13] aspiers: hah! yeah, it works, and very nicely too
[00:00:38] postmodern: aspiers, i believe so yes
[00:01:25] aspiers: when handling conflicts, would be nice if it let you do a manual merge
[00:01:54] Devalo: has joined #ruby
[00:02:14] bry4n_: has joined #ruby
[00:02:31] postmodern: aspiers, that's an option, i believe e
[00:02:43] aspiers: couldn't see it
[00:02:59] aspiers: d for diff was the closest
[00:03:49] marcdel: has joined #ruby
[00:07:56] jgpawletko: has joined #ruby
[00:09:12] djbkd_: has joined #ruby
[00:12:01] Amnez777: has joined #ruby
[00:13:53] aspiers: postmodern: sent a PR
[00:17:52] jenrzzz: has joined #ruby
[00:17:52] jenrzzz: has joined #ruby
[00:18:40] rake_db_migrate: has joined #ruby
[00:20:22] yohle: has joined #ruby
[00:20:50] yohle: has joined #ruby
[00:21:18] jorum: has joined #ruby
[00:25:07] yohle: has joined #ruby
[00:26:12] entropie: has joined #ruby
[00:26:25] agentmeerkat: has joined #ruby
[00:27:24] dravine: has joined #ruby
[00:29:43] shmuli: has joined #ruby
[00:30:14] LaT0rtue_: has joined #ruby
[00:32:59] GodFather: has joined #ruby
[00:35:48] agentmeerkat: has joined #ruby
[00:36:06] jgpawletko: has left #ruby: ()
[00:40:11] aeontech: has joined #ruby
[00:41:13] B1n4r10: has joined #ruby
[00:42:31] devbug: has joined #ruby
[00:42:59] nettoweb: has joined #ruby
[00:44:18] aibot: has joined #ruby
[00:44:59] agentmeerkat: has joined #ruby
[00:48:11] smathy: has joined #ruby
[00:48:45] mistermocha: has joined #ruby
[00:48:54] Musashi007: has joined #ruby
[00:49:25] mistermocha: has joined #ruby
[00:51:39] ramfjord: has joined #ruby
[00:54:10] agentmeerkat: has joined #ruby
[00:58:15] alexherbo2: has joined #ruby
[00:58:35] crank1988: has joined #ruby
[00:58:51] mistermocha: has joined #ruby
[01:03:18] agentmeerkat: has joined #ruby
[01:04:25] marcdel: has joined #ruby
[01:06:12] pifon: has joined #ruby
[01:07:13] darix: omg it is aspiers
[01:09:41] djbkd_: has joined #ruby
[01:11:02] ekinmur: has joined #ruby
[01:12:30] agentmeerkat: has joined #ruby
[01:14:31] gh: has joined #ruby
[01:16:09] Musashi007: has joined #ruby
[01:16:16] mistermocha: has joined #ruby
[01:18:05] Phanes: has joined #ruby
[01:19:53] ur5us: has joined #ruby
[01:19:57] AnoHito: has joined #ruby
[01:21:38] agentmeerkat: has joined #ruby
[01:21:44] GodFather: has joined #ruby
[01:22:00] jorum: has joined #ruby
[01:23:20] Ropeney: has joined #ruby
[01:24:17] diego2: has joined #ruby
[01:24:49] diego2: has joined #ruby
[01:28:52] duckpuppy: has joined #ruby
[01:29:08] grill: has joined #ruby
[01:34:01] bkxd: has joined #ruby
[01:37:41] mistermocha: has joined #ruby
[01:38:20] GnuYawk: has joined #ruby
[01:38:31] GnuYawk: has joined #ruby
[01:40:21] agentmeerkat: has joined #ruby
[01:40:40] deadlock: has joined #ruby
[01:42:11] torandu: has joined #ruby
[01:48:26] B1n4r10: has joined #ruby
[01:49:29] smathy: has joined #ruby
[01:59:19] rbennacer: has joined #ruby
[02:00:35] belkins: has joined #ruby
[02:02:14] Digpig: has joined #ruby
[02:04:20] numdig: has joined #ruby
[02:04:37] sami: has joined #ruby
[02:05:03] marcdel: has joined #ruby
[02:05:12] A124: has joined #ruby
[02:05:13] rbennacer: has joined #ruby
[02:06:47] araujo: has joined #ruby
[02:07:57] dstarh: has joined #ruby
[02:09:52] zapata: has joined #ruby
[02:10:04] numdig: has left #ruby: ("I'm a happy Miranda IM user! Get it here: http://miranda-im.org")
[02:10:28] djbkd_: has joined #ruby
[02:11:22] tvon: has joined #ruby
[02:11:36] barajasfab: has joined #ruby
[02:12:38] ensyde__: has joined #ruby
[02:15:59] HouseMD: has joined #ruby
[02:16:23] ekinmur_: has joined #ruby
[02:16:56] neanderslob_: has joined #ruby
[02:17:01] r4z3r: has joined #ruby
[02:17:07] rickmasta: has joined #ruby
[02:19:05] crank1988: has joined #ruby
[02:19:47] tristanp: has joined #ruby
[02:19:53] r4z3r: has joined #ruby
[02:20:04] greenride: has left #ruby: ()
[02:21:03] ruby[bot]: -bb $a:chriskeele$#ruby-banned chriskeele!*@*$#ruby-banned
[02:22:49] swills: has joined #ruby
[02:22:56] jorum: has joined #ruby
[02:25:05] chagel: has joined #ruby
[02:26:15] cdg: has joined #ruby
[02:26:23] shmuli_: has joined #ruby
[02:28:23] LuckyABA: has joined #ruby
[02:29:37] duckpuppy: has joined #ruby
[02:31:37] smathy: has joined #ruby
[02:33:02] bronson: has joined #ruby
[02:34:52] sdwrage: has joined #ruby
[02:39:32] baweaver: has joined #ruby
[02:39:56] Luna_Moonfang: has joined #ruby
[02:40:50] cpup: has joined #ruby
[02:43:46] mhoungbo: has joined #ruby
[02:45:17] Xiti: has joined #ruby
[02:47:52] tildes: has joined #ruby
[02:49:19] p0p0pr37: has joined #ruby
[02:51:13] solocshaw: has joined #ruby
[02:51:26] crameth: has joined #ruby
[02:51:37] Rubie: has joined #ruby
[02:52:54] wsk: has joined #ruby
[02:53:36] joaumg: has joined #ruby
[02:53:45] Chagel_: has joined #ruby
[02:53:58] jenrzzz: has joined #ruby
[02:58:44] chagel: has joined #ruby
[02:59:03] shmuli: has joined #ruby
[02:59:09] mistermocha: has joined #ruby
[03:03:05] tax: has joined #ruby
[03:03:43] chagel: has joined #ruby
[03:03:49] chipotle: has joined #ruby
[03:05:21] PaulCape_: has joined #ruby
[03:06:03] marcdel: has joined #ruby
[03:09:02] zast: has joined #ruby
[03:11:09] djbkd_: has joined #ruby
[03:12:55] bruno-: has joined #ruby
[03:14:05] chipotle: has joined #ruby
[03:17:19] braincras: has joined #ruby
[03:20:22] chagel: has joined #ruby
[03:20:23] nodejunkie: has joined #ruby
[03:21:52] astrobunny: has joined #ruby
[03:23:43] jorum: has joined #ruby
[03:24:28] A124: Is there anything wrong with this, when using it on queue and callback proc 'cb'? q.pop &cb
[03:24:43] bruno-: has joined #ruby
[03:24:50] cpruitt: has joined #ruby
[03:24:52] benzrf: A124: does pop take a callback
[03:25:06] limon7: has joined #ruby
[03:26:35] chagel: has joined #ruby
[03:26:47] A124: benzrf, well it is everywhere on net with EventMachine examples, but Rubocop warns me about Ambiguous block operator. Parenthesize the method arguments if it's surely a block operator, or add a whitespace to the right of the `&` if it should be a binary AND. (Lint/AmbiguousOperator)at line 22 col 11
[03:27:07] A124: If I add () it yells with error, so got confused
[03:29:43] tmtwd: has joined #ruby
[03:30:02] gix: has joined #ruby
[03:30:07] OTORelic2: has joined #ruby
[03:30:23] benzrf: it means, like
[03:30:30] A124: Trying to make EM client that does work on itself as well as takes user input, no luck on keyboard so far.
[03:30:42] A124: https://github.com/eventmachine/eventmachine/wiki/Code-Snippets
[03:30:57] A124: Did not use the actuall snippet, I should try though.
[03:32:05] pifon: has joined #ruby
[03:34:07] chagel: has joined #ruby
[03:34:54] bkxd: has joined #ruby
[03:37:40] chipotle: has joined #ruby
[03:38:04] snoobydoo: has joined #ruby
[03:40:44] AnoHito: has joined #ruby
[03:44:06] snoobydo1: has joined #ruby
[03:45:59] dvinciguerra__: has joined #ruby
[03:46:47] wsk: has joined #ruby
[03:46:59] wsk: has left #ruby: ()
[03:48:14] wsk: has joined #ruby
[03:49:56] LuckyABA: has joined #ruby
[03:52:57] Inside: has joined #ruby
[03:52:57] Inside: has joined #ruby
[03:54:51] A124: ACTION got it running, IDK even what was wrong. Still wonder about the proper syntax of the proc callback though
[03:58:43] x77686d: has joined #ruby
[03:58:59] pawnbox: has joined #ruby
[04:02:41] jackjackdripper: has joined #ruby
[04:03:31] Devalo: has joined #ruby
[04:05:40] Ox0dea: A124: https://eval.in/549619
[04:05:49] solocshaw: has joined #ruby
[04:11:52] djbkd_: has joined #ruby
[04:13:56] A124: Ox0dea Thank you. That enlightened me a lot more, valuable reference. .. I have to guess its problem with the linter. *me had no idea what linter is mere week ago*
[04:15:18] kareeoleez: has joined #ruby
[04:15:18] rbennacer: has joined #ruby
[04:16:07] DLSteve: has joined #ruby
[04:16:41] marcdel: has joined #ruby
[04:17:42] duncannz: has joined #ruby
[04:18:45] Ox0dea: A124: I've never seen the complaint about the ambiguous `&` be relevant. It whines because #& is a method, so maybe you meant to do a Boolean AND instead of pass a block, but that's vanishingly unlikely.
[04:18:46] duncannz: has joined #ruby
[04:18:56] pawnbox: has joined #ruby
[04:19:35] bluOxigen: has joined #ruby
[04:19:46] A124: No, I did not, But it said to use parenthesis, but if I do q.pop (&cb) it gives error.
[04:20:00] Ox0dea: Nix that space.
[04:20:42] rbennacer: has joined #ruby
[04:21:55] Ox0dea: With it in, the `(&cb)` gets interpreted as a standalone expression, but passing a block is only a valid thing to do when you're invoking a method.
[04:22:02] A124: Oooh. So both ruby itself and rubocop thinks this is the proper way to write it. Ok. So now got to know a lot more on blocks and some on syntax, thank again.
[04:24:43] jorum: has joined #ruby
[04:25:01] cpruitt: has joined #ruby
[04:25:06] Ox0dea: No problem. Ruby's parser is pretty lenient, but its only real option is to bail if it can't unambiguously determine what you meant to do.
[04:25:14] hxegon: has joined #ruby
[04:25:20] Ox0dea: *MRI's parser, technically.
[04:26:28] A124: Well, the linter does use ruby -s -w or something to check the syntax.
[04:26:43] kam270: has joined #ruby
[04:27:25] A124: As I was new into the IDE and linters and tools and stuff I tried and installed both, so sometimes they yell both, but mostly only rubocop complaining at coding style xD
[04:28:05] A124: Luckily, in most cases the autocorrect does fix stuff without screwing what I do not like. So not bad.
[04:28:34] Ox0dea: No, not really bad, just noisy. :P
[04:28:39] Ox0dea: Are you using Reek for your linter?
[04:29:26] skade: has joined #ruby
[04:30:53] OTORelic2: has joined #ruby
[04:31:08] ramfjord: has joined #ruby
[04:33:20] A124: ACTION looked, added one more.
[04:35:40] bkxd: has joined #ruby
[04:39:35] agentmeerkat: has joined #ruby
[04:40:14] karmatr0n: has joined #ruby
[04:43:08] astrobunny: has joined #ruby
[04:43:34] pifon: has joined #ruby
[04:43:39] _djbkd: has joined #ruby
[04:46:53] tmtwd: has joined #ruby
[04:47:03] freerobby: has joined #ruby
[04:47:26] freerobby: has joined #ruby
[04:47:55] freerobby: has joined #ruby
[04:48:04] kies: has joined #ruby
[04:48:38] shmuli: has joined #ruby
[04:50:43] hinbody: has joined #ruby
[04:52:01] Musashi007: has joined #ruby
[04:57:57] fedexo: has joined #ruby
[04:58:56] LaT0rtue: has joined #ruby
[04:59:14] matp: has joined #ruby
[05:00:20] kareeoleez: has joined #ruby
[05:00:46] iamvery: has joined #ruby
[05:02:04] ascarter: has joined #ruby
[05:02:28] Spami_: has joined #ruby
[05:03:07] sami: has joined #ruby
[05:03:23] hk238: has joined #ruby
[05:09:23] rake_db_migrate: has joined #ruby
[05:09:48] ascarter: has joined #ruby
[05:11:57] ascarter: has joined #ruby
[05:12:38] djbkd_: has joined #ruby
[05:13:47] chagel: has joined #ruby
[05:14:09] last_staff: has joined #ruby
[05:15:42] goglosh: has joined #ruby
[05:18:22] phredus: has joined #ruby
[05:18:49] chagel: has joined #ruby
[05:23:37] sauvin: has joined #ruby
[05:23:41] shmuli: has joined #ruby
[05:24:02] jero_: has joined #ruby
[05:24:09] nartes: has joined #ruby
[05:24:36] sudoubuntu: has joined #ruby
[05:25:45] jorum: has joined #ruby
[05:26:41] cdg: has joined #ruby
[05:26:49] tristanp: has joined #ruby
[05:31:22] jero_: has joined #ruby
[05:33:14] Infra-Red: has joined #ruby
[05:33:34] shmuli: has joined #ruby
[05:36:14] Devalo: has joined #ruby
[05:36:55] Musashi007: has joined #ruby
[05:37:29] elifoster: has joined #ruby
[05:39:29] juria_roberts: has joined #ruby
[05:39:58] ceej: has joined #ruby
[05:40:45] auzty: has joined #ruby
[05:40:45] Rubie: has joined #ruby
[05:41:03] juria_roberts: How can i avoid adding nil to the array? https://repl.it/CD30
[05:41:45] karmatr0n: has joined #ruby
[05:41:52] yfeldblum: has joined #ruby
[05:41:52] havenwood: juria_roberts: steps << 'b' if 'a' == 'c'
[05:42:39] noService: has joined #ruby
[05:43:32] juria_roberts: havenwood: that makes the array nil
[05:43:44] juria_roberts: havenwood: I wanna keep the previous value
[05:44:11] joonty: has joined #ruby
[05:46:14] havenwood: >> steps = []; steps << 'stuff'; steps << 'nope' if false; steps
[05:46:16] ruby[bot]: havenwood: # => ["stuff"] (https://eval.in/549707)
[05:46:50] jorum: has joined #ruby
[05:46:53] havenwood: juria_roberts: ^ that seem right? have an example of the missing previous value?
[05:47:12] Cohedrin: has joined #ruby
[05:47:34] Spami: has joined #ruby
[05:50:36] juria_roberts: havenwood: sorry...i guess if its in a function it will return nil if i dont put steps in the end...do you know an elegant way of appending to an array if a condition is satisfied?
[05:51:19] chagel: has joined #ruby
[05:53:54] havenwood: >> true if false
[05:53:55] ruby[bot]: havenwood: # => nil (https://eval.in/549713)
[05:54:32] klka: >> true if false else true
[05:55:03] havenwood: klka: #!> SyntaxError: unexpected keyword_else
[05:56:44] juria_roberts: havenwood: didn't understand...can you edit this example and show? https://repl.it/CD30
[05:57:00] czerasz: has joined #ruby
[05:57:00] moeabdol: has joined #ruby
[05:57:31] havenwood: juria_roberts: https://repl.it/CD30/1
[05:57:50] LaT0rtue: has joined #ruby
[05:58:08] juria_roberts: havenwood: i don't want the extra steps at the end
[05:58:17] Ox0dea: >> double double, toil and trouble if $hakespeare
[05:58:18] moeabdol1: has joined #ruby
[05:58:18] ruby[bot]: Ox0dea: # => nil (https://eval.in/549716)
[06:00:52] aufi: has joined #ruby
[06:01:15] kareeoleez: has joined #ruby
[06:01:15] Ox0dea: juria_roberts: https://eval.in/549717
[06:01:20] Ox0dea: But there's not much good reason to do that.
[06:02:30] juria_roberts: Ox0dea: is there a simpler way?
[06:02:44] Ox0dea: juria_roberts: You're optimizing for the wrong thing.
[06:02:52] nartes: has joined #ruby
[06:03:17] Ox0dea: You're not entering your code into some sort of beauty pageant, are you?
[06:03:44] abyx: has joined #ruby
[06:05:06] juria_roberts: Ox0dea: haha no...its gonna be code reviewed and i just want it to be easy to understand for a person who doesnt know ruby ( I don't know ruby as well)
[06:05:18] Ox0dea: Ruby methods implicitly return the last expression in their bodies, and conditional branches which don't get taken evaluate to `nil`. These are both Good Things.
[06:05:40] jaruga__: has joined #ruby
[06:05:40] Radar: except exit. exit doesn't return anything.
[06:05:50] ratazzi: has joined #ruby
[06:06:28] Ox0dea: juria_roberts: Looking for a way to not have to repeat `steps` at the end there is barking up the wrong tree.
[06:06:43] Chagel_: has joined #ruby
[06:06:49] Ox0dea: The alternative is #tap.
[06:07:21] codecop: has joined #ruby
[06:07:26] codecop_: has joined #ruby
[06:08:23] juria_roberts: Ox0dea: Cool...i think i will stick to putting the steps at the end
[06:10:01] Ox0dea: juria_roberts: Smaht. :)
[06:10:10] joonty: has joined #ruby
[06:11:18] baweaver: ACTION considers pulling out select_map
[06:11:19] krz: has joined #ruby
[06:12:12] tonini: has joined #ruby
[06:13:10] Ox0dea: From Reducible?
[06:13:19] djbkd_: has joined #ruby
[06:16:11] sapslaj: has joined #ruby
[06:16:13] sapslaj_: has joined #ruby
[06:16:23] baweaver: https://repl.it/CD30/2
[06:17:56] baweaver: >> def select_map(c) c.reduce([]){|a,i|v=yield(i);a<<v if v;a } end; select_map(1..10) { |v| v ** 2 if v.even? }
[06:17:57] ruby[bot]: baweaver: # => [4, 16, 36, 64, 100] (https://eval.in/549720)
[06:18:18] baweaver: essentially only take values which are not nil
[06:18:28] baweaver: well, falsy
[06:20:34] Ox0dea: https://eval.in/549721
[06:20:52] tildes: has joined #ruby
[06:22:14] Ox0dea: Er, that was a bad example.
[06:22:34] Ox0dea: The point was to have the pruning done on the new value.
[06:23:02] djbkd_: has joined #ruby
[06:24:23] chagel: has joined #ruby
[06:25:59] agit0: has joined #ruby
[06:26:14] jas02: has joined #ruby
[06:26:33] Spami_: has joined #ruby
[06:28:17] andikr: has joined #ruby
[06:28:32] Ox0dea: baweaver: Do you reckon you could say definitively whether #select->#map sees more use than #map->#select?
[06:29:02] baweaver: map select for me
[06:29:52] baweaver: though there have been inverse cases
[06:30:56] polyidus: has joined #ruby
[06:31:19] pawnbox: has joined #ruby
[06:33:11] rkazak: has joined #ruby
[06:33:22] OTORelic2: has joined #ruby
[06:35:21] krz: has joined #ruby
[06:35:53] ascarter: has joined #ruby
[06:35:59] bronson: has joined #ruby
[06:36:16] Macaveli: has joined #ruby
[06:36:30] bkxd: has joined #ruby
[06:37:45] symm-: has joined #ruby
[06:38:24] agentmee1kat: has joined #ruby
[06:40:28] mark2: has joined #ruby
[06:41:57] yfeldblum: has joined #ruby
[06:43:15] djellemah: baweaver: Out of curiosity, I did some performance testing on select_map and friends a little while ago. Turns out map{}.compact is faster in most useful cases. I was sad.
[06:43:43] baweaver: reduce is probably slower
[06:44:04] baweaver: do it with each in the background and it'd be faster
[06:45:10] Ox0dea: djellemah: #compact won't drop `false`s, though.
[06:45:17] djellemah: That might be worth trying. But I think the slowdown is because of the reallocations of the array as its being built up.
[06:46:14] nartes: has joined #ruby
[06:47:27] jorum: has joined #ruby
[06:49:49] chagel: has joined #ruby
[06:50:19] djellemah: Ox0dea: I had a go at finding a generic way to handle falsy, but I gave up when I realised that I also couldn't think of any realworldish uses.
[06:50:53] aeontech: has joined #ruby
[06:50:57] pawnbox: has joined #ruby
[06:51:20] Ox0dea: djellemah: Fair enough. I do wonder if allocating a large enough return Array just the once and returning a slice of it would be optimal.
[06:51:41] spikeheadon: has joined #ruby
[06:52:18] Ox0dea: MRI does use structural sharing, but that doesn't help much with growth reallocations.
[06:52:38] djellemah: I couldn't think of a way to track the end of such an array. But Doh! you just keep an index and increment it.
[06:53:00] Ox0dea: Welcome back to C. :P
[06:53:29] Infra-Red: has joined #ruby
[06:54:59] chagel: has joined #ruby
[06:56:21] djellemah: turns out random access structures can be quite useful...
[06:57:13] Suntzu: has joined #ruby
[06:57:20] Infra-Red: has joined #ruby
[06:58:36] bry4n_: has joined #ruby
[07:01:19] rbennacer: has joined #ruby
[07:03:13] ascarter: has joined #ruby
[07:04:59] ascarter: has joined #ruby
[07:06:01] leksster: has joined #ruby
[07:06:17] solars: has joined #ruby
[07:06:51] djellemah: I'm looking for solid information on DRb reliability. I'm not finding much - I'm guessing because the material I'm looking for is in Japanese. I asked last night, and I'm asking again to see if anyone on the other side of the planet knows of anything?
[07:07:21] ag4ve: is there a way to automagically define variable types w/in a hash so i can do: h[thing].push(foo)
[07:07:36] ag4ve: w/o first doing h[thing] = Array.new
[07:07:41] Infra-Red: has joined #ruby
[07:07:56] djellemah: ag4ve: see Hash#default_proc, also Hash.new
[07:07:57] Ox0dea: djellemah: I vaguely recall seeing some RubyConf talk that centered on DRb.
[07:08:16] Ox0dea: ag4ve: I trust you're familiar with Perl's autovivification semantics?
[07:08:18] bohr: has joined #ruby
[07:08:26] ag4ve: err, right Hash.new :)
[07:09:01] Ox0dea: Ah, I jumped the shark a bit, then.
[07:09:41] ag4ve: i mean, in perl, push(@{$h[thing]}, foo); would work on a new 'thing'
[07:09:51] ag4ve: blah, ruby got me using [] vs {}... w/e
[07:09:52] Ox0dea: >> auto = Hash.new { |h, k| h[k] = Hash.new &h.default_proc }; auto[1][2][3] = 4; auto
[07:09:53] ruby[bot]: Ox0dea: # => {1=>{2=>{3=>4}}} (https://eval.in/549747)
[07:10:08] Ox0dea: For when you just want to be able to shove things into a "tree".
[07:10:27] Ox0dea: No problem.
[07:10:58] TomyWork: has joined #ruby
[07:11:13] Ox0dea: >> h = Hash.new([]); h[:a] << :oops; h[:b] # Be mindful of reference types.
[07:11:14] ruby[bot]: Ox0dea: # => [:oops] (https://eval.in/549748)
[07:11:14] nartes: has joined #ruby
[07:11:43] vdamewood: has joined #ruby
[07:12:22] ag4ve: not sure what that's doing?
[07:12:41] Ox0dea: The default Array is being shared by all keys.
[07:12:49] Ox0dea: That's almost never what you'd want.
[07:13:03] terlar: has joined #ruby
[07:13:19] charlemagne: has joined #ruby
[07:13:45] bohr: has left #ruby: ("bye")
[07:13:49] bohr: has joined #ruby
[07:14:23] bohr: has left #ruby: ("bye")
[07:15:28] chagel: has joined #ruby
[07:16:44] vondruch: has joined #ruby
[07:17:41] Devalo: has joined #ruby
[07:19:04] futilegames: has joined #ruby
[07:21:20] kits: has joined #ruby
[07:22:48] pandaant: has joined #ruby
[07:22:59] ur5us: has joined #ruby
[07:23:27] karmatr0n: has joined #ruby
[07:23:35] futilegames: has joined #ruby
[07:24:00] rbennacer: has joined #ruby
[07:24:02] ferr: has joined #ruby
[07:24:55] Musashi007: has joined #ruby
[07:25:22] Couch: has joined #ruby
[07:25:54] kies: has joined #ruby
[07:33:13] rbennacer: has joined #ruby
[07:35:49] rake_db_migrate: has joined #ruby
[07:35:57] SCHAAP137: has joined #ruby
[07:37:14] bkxd: has joined #ruby
[07:37:54] danielpclark: has joined #ruby
[07:38:08] Guest84241: has joined #ruby
[07:38:14] rbennacer: has joined #ruby
[07:38:46] chridal: Has there been any indication when Ruby 3 might be coming out?
[07:38:48] dn`: has joined #ruby
[07:39:12] tmtwd: has joined #ruby
[07:39:50] chagel: has joined #ruby
[07:41:12] pifon: has joined #ruby
[07:43:50] colegatron: has joined #ruby
[07:44:19] PedramT: has joined #ruby
[07:44:57] madgen: has joined #ruby
[07:46:49] ur5us: has joined #ruby
[07:47:39] Ox0dea: chridal: Christmas 20xx.
[07:47:55] chridal: Right. They always release at Christmas. Cheers.
[07:48:06] solars: has joined #ruby
[07:48:37] petertretyakov: has joined #ruby
[07:49:22] dionysus69: has joined #ruby
[07:49:37] nhhc: has joined #ruby
[07:49:39] mikecmpbll: has joined #ruby
[07:54:03] monsieurp: has joined #ruby
[07:54:03] monsieurp: has joined #ruby
[07:54:20] monsieurp: has left #ruby: ()
[07:55:44] monsieur1: has joined #ruby
[07:55:44] monsieur1: has left #ruby: ()
[07:56:33] rbennacer: has joined #ruby
[07:57:54] troulouliou_div2: has joined #ruby
[08:01:53] x77686d: has joined #ruby
[08:02:26] _blizzy_: has joined #ruby
[08:03:50] mikecmpbll: has joined #ruby
[08:04:02] jtoy: has joined #ruby
[08:04:14] bruce_lee: has joined #ruby
[08:05:41] rbennacer: has joined #ruby
[08:08:07] ur5us: has joined #ruby
[08:11:27] yfeldblum: has joined #ruby
[08:12:36] biberu: has joined #ruby
[08:13:03] marr: has joined #ruby
[08:13:14] DrCode: has joined #ruby
[08:14:00] dc4: has joined #ruby
[08:15:03] rbennacer: has joined #ruby
[08:15:36] kam270: has joined #ruby
[08:16:48] dubidubi: has joined #ruby
[08:17:24] mmok: has left #ruby: ()
[08:18:54] d0nn1e: has joined #ruby
[08:20:02] charlemagne: has joined #ruby
[08:20:17] pawnbox: has joined #ruby
[08:23:35] Nuck: has joined #ruby
[08:23:52] bkxd: has joined #ruby
[08:26:33] charlemagne: has joined #ruby
[08:29:07] rbennacer: has joined #ruby
[08:29:09] jmorgado: has joined #ruby
[08:29:27] reprazent: has joined #ruby
[08:29:55] baweaver: has joined #ruby
[08:33:31] blackmesa: has joined #ruby
[08:34:15] sepp2k: has joined #ruby
[08:34:57] kareeoleez: has joined #ruby
[08:35:04] OTORelic2: has joined #ruby
[08:36:22] benlieb: has joined #ruby
[08:36:37] mosez: has joined #ruby
[08:37:39] rbennacer: has joined #ruby
[08:38:39] Anderson69s: has joined #ruby
[08:40:27] ur5us: has joined #ruby
[08:40:42] danand: has joined #ruby
[08:41:19] skislak: has joined #ruby
[08:43:10] Anderson69s: has joined #ruby
[08:43:44] charlemagne: has joined #ruby
[08:45:32] petertretyakov: has joined #ruby
[08:46:54] rbennacer: has joined #ruby
[08:47:52] snowy: has joined #ruby
[08:53:07] charlemagne: has joined #ruby
[08:53:08] chagel: has joined #ruby
[08:54:06] emilkarl: has joined #ruby
[08:56:25] rbennacer: has joined #ruby
[08:56:54] evidex: has joined #ruby
[08:57:08] davee_: has joined #ruby
[08:58:07] chagel: has joined #ruby
[08:59:10] bruce_lee: has joined #ruby
[09:00:27] senayar: has joined #ruby
[09:01:17] rbennacer: has joined #ruby
[09:01:41] jgt4: has joined #ruby
[09:02:30] tildes: has joined #ruby
[09:02:58] mdw: has joined #ruby
[09:03:58] tvw: has joined #ruby
[09:05:10] skade: has joined #ruby
[09:05:14] atmosx: Is there any better way to create this kind of string: https://gist.github.com/atmosx/68f5a6f4606ae9510eb7221c10552773 ? I can't use interpolation
[09:05:26] pawnbox: has joined #ruby
[09:06:04] Ox0dea: atmosx: Use %Q.
[09:06:32] robbyoconnor: has joined #ruby
[09:06:37] Ox0dea: It supports interpolation and doesn't require quotes of either style to be escaped.
[09:06:48] charlemagne: has joined #ruby
[09:07:36] atmosx: Ox0dea thanks!
[09:07:46] Ox0dea: atmosx: Happy to help.
[09:11:29] chagel: has joined #ruby
[09:12:10] corl: has joined #ruby
[09:13:24] charlema_: has joined #ruby
[09:14:44] raeoks: has joined #ruby
[09:16:58] akkmaxon: has joined #ruby
[09:17:22] charlemagne: has joined #ruby
[09:18:11] joonty: has joined #ruby
[09:18:26] PedramT: has joined #ruby
[09:18:47] jdm: has joined #ruby
[09:19:23] Zai00: has joined #ruby
[09:20:09] atmosx: Do we have an inverse function of Capitalize ? like turn Hello to hello
[09:20:19] atmosx: s/function/method
[09:20:37] atmosx: I can use downcase
[09:23:24] Swey_Hey: has joined #ruby
[09:24:07] charlemagne: has joined #ruby
[09:24:16] rake_db_migrate: has joined #ruby
[09:24:39] rolha: has joined #ruby
[09:24:51] bry4n_: has joined #ruby
[09:25:18] TheHodge: has joined #ruby
[09:25:56] mosez: has joined #ruby
[09:26:25] merida: has joined #ruby
[09:27:27] moeabdol: has joined #ruby
[09:28:04] tristanp: has joined #ruby
[09:29:18] shmoon_: has joined #ruby
[09:29:40] troulouliou_div2: has joined #ruby
[09:30:03] workmad3: has joined #ruby
[09:31:51] ramfjord: has joined #ruby
[09:33:08] chagel: has joined #ruby
[09:34:33] PedramT: has joined #ruby
[09:35:05] Ropeney: has joined #ruby
[09:37:39] dionysus69: has joined #ruby
[09:38:09] deavid: has joined #ruby
[09:41:45] leksster: has joined #ruby
[09:42:23] madgen: has joined #ruby
[09:42:37] charlemagne: has joined #ruby
[09:44:34] mosez: has joined #ruby
[09:45:29] OTORelic2: has joined #ruby
[09:46:27] colegatron: has joined #ruby
[09:46:49] reprazent: has joined #ruby
[09:47:14] rbennacer: has joined #ruby
[09:49:03] reprazent: has joined #ruby
[09:49:48] Ox0dea: atmosx: https://eval.in/549924
[09:50:42] atmosx: Ox0dea hehe magic, ty
[09:50:50] snoobydoo: has joined #ruby
[09:51:10] abrausch: has joined #ruby
[09:51:40] rbennacer: has joined #ruby
[09:51:41] Ox0dea: atmosx: That's apparently called "studly caps", but I like "roller coaster case" better ('cause it goes up and down).
[09:52:09] eprasad: has joined #ruby
[09:52:33] sonOfRa: has joined #ruby
[09:53:04] atmosx: Ox0dea makes more sense
[09:53:14] Ox0dea: I reckon so.
[09:53:46] ocbtec: has joined #ruby
[09:54:01] Ox0dea: My favorite #gsub trick:
[09:54:02] Ox0dea: >> trans = {'1' => 'one', '2' => 'two', '3' => 'three'}; '1 2 3 2 1'.gsub /\d/, trans
[09:54:03] ruby[bot]: Ox0dea: # => "one two three two one" (https://eval.in/549925)
[09:59:33] Regulati_: has joined #ruby
[10:01:10] rbennacer: has joined #ruby
[10:01:16] myntcake: has joined #ruby
[10:05:13] emilkarl: has joined #ruby
[10:06:50] rarruda: has joined #ruby
[10:09:25] GodFather: has joined #ruby
[10:14:24] rbennacer: has joined #ruby
[10:14:37] jdm: has joined #ruby
[10:15:44] emilkarl: has joined #ruby
[10:18:02] chagel: has joined #ruby
[10:21:41] cpup: has joined #ruby
[10:22:25] LaT0rtue: has joined #ruby
[10:25:41] bry4n_: has joined #ruby
[10:28:10] rbennacer: has joined #ruby
[10:28:47] bronson: has joined #ruby
[10:37:21] cdg: has joined #ruby
[10:37:26] rbennacer: has joined #ruby
[10:38:38] jdm: has joined #ruby
[10:40:29] triangles: has joined #ruby
[10:42:05] Yeomra: has joined #ruby
[10:46:31] pawnbox: has joined #ruby
[10:46:56] moeabdol: has joined #ruby
[10:47:53] dionysus69: has joined #ruby
[10:48:11] cdg: has joined #ruby
[10:48:21] AimlessRAven: has joined #ruby
[10:48:36] AimlessRAven: can anyone help me to transform this sql request https://gist.github.com/anonymous/7c7556a85ec357cd476947bbe37d32bc to rails active-record request
[10:51:02] nfk|laptop: has joined #ruby
[10:51:44] rbennacer: has joined #ruby
[10:53:30] sthns: has joined #ruby
[10:54:40] Vile`: has joined #ruby
[10:55:15] Hanmac: AimlessRaven: go to #rubyOnRails
[10:56:28] rickmasta: has joined #ruby
[10:57:19] AimlessRAven: hanmac: yea im there but noone write :)
[10:57:22] AimlessRAven: sorry for that
[10:58:38] soc42: has joined #ruby
[10:59:09] shevy: they don't have anything to talk about!
[11:00:21] Chagel_: has joined #ruby
[11:00:56] rbennacer: has joined #ruby
[11:01:43] nettoweb: has joined #ruby
[11:04:01] mosez: has joined #ruby
[11:06:29] bob434: has joined #ruby
[11:07:50] chagel: has joined #ruby
[11:08:31] merida: has joined #ruby
[11:09:49] sapslaj: has joined #ruby
[11:10:06] shevy: and neither do we :(
[11:11:31] blackmesa: has joined #ruby
[11:14:44] sapslaj: has joined #ruby
[11:15:03] karmatr0n: has joined #ruby
[11:16:03] gnufied: has joined #ruby
[11:16:48] antgel: has joined #ruby
[11:21:33] drptbl_: has joined #ruby
[11:21:51] nhhc: has joined #ruby
[11:22:19] nibbo: has joined #ruby
[11:23:19] bohr: has joined #ruby
[11:25:04] xfbs: has joined #ruby
[11:25:53] kimegede: has joined #ruby
[11:27:30] emilkarl: has joined #ruby
[11:28:04] shibly: has joined #ruby
[11:28:18] rbennacer: has joined #ruby
[11:28:25] nerium: has joined #ruby
[11:28:37] shibly: has left #ruby: ()
[11:28:54] diegoaguilar: has joined #ruby
[11:29:08] ldnunes: has joined #ruby
[11:29:39] jas02: has left #ruby: ()
[11:30:04] danand: has joined #ruby
[11:30:30] lyoshajapan: has joined #ruby
[11:32:56] antgel: has joined #ruby
[11:33:40] sonOfRa: has joined #ruby
[11:34:41] charlemagne: has joined #ruby
[11:35:20] skade: has joined #ruby
[11:36:42] n008f4g_: has joined #ruby
[11:37:26] charlemagne: has joined #ruby
[11:37:40] rbennacer: has joined #ruby
[11:37:44] terlar: has joined #ruby
[11:38:45] charlemagne: has joined #ruby
[11:42:07] lyoshajapan: has joined #ruby
[11:46:29] nartes: has joined #ruby
[11:47:05] jorum: has joined #ruby
[11:48:46] antgel: has joined #ruby
[11:48:48] charlemagne: has joined #ruby
[11:50:24] abyx: has joined #ruby
[11:51:34] rbennacer: has joined #ruby
[11:53:15] charlema_: has joined #ruby
[11:53:33] reprazent: has joined #ruby
[11:53:47] joonty: has joined #ruby
[11:54:00] triangles3: has joined #ruby
[11:54:22] johnmilton: has joined #ruby
[11:56:41] madgen: has joined #ruby
[11:57:07] someish: has joined #ruby
[11:58:25] dn`: has joined #ruby
[12:01:42] drptbl: has joined #ruby
[12:02:07] eprasad_: has joined #ruby
[12:03:57] Zai00: has joined #ruby
[12:04:45] sudoubuntu: has joined #ruby
[12:05:45] nerium: has joined #ruby
[12:06:32] davee_: has joined #ruby
[12:09:35] rbennacer: has joined #ruby
[12:11:41] nerium: has joined #ruby
[12:11:57] kam270: has joined #ruby
[12:13:01] nartes: has joined #ruby
[12:14:16] rbennacer: has joined #ruby
[12:15:00] rodfersou: has joined #ruby
[12:15:19] Hanmac: has joined #ruby
[12:15:19] banister: has joined #ruby
[12:15:27] LinuxDave: has joined #ruby
[12:15:50] BSaboia: has joined #ruby
[12:16:23] LinuxDave: Anyone used to pulling files from gridfs?
[12:17:34] agit0: has joined #ruby
[12:17:49] bohr: has left #ruby: ("bye")
[12:18:18] whiteline: has joined #ruby
[12:18:19] snowy: has joined #ruby
[12:19:07] charlemagne: has joined #ruby
[12:19:32] madgen: has joined #ruby
[12:21:12] whiteline: has joined #ruby
[12:23:16] pawnbox_: has joined #ruby
[12:24:31] LinuxDave: I am looking for help pulling files of a certain age from Gridfs.
[12:26:45] chouhoulis: has joined #ruby
[12:26:48] bry4n_: has joined #ruby
[12:31:01] djellemah_: has joined #ruby
[12:32:42] rbennacer: has joined #ruby
[12:34:18] Marsupermammal: has joined #ruby
[12:37:48] charlemagne: has joined #ruby
[12:38:25] sdothum: has joined #ruby
[12:39:18] armyriad: has joined #ruby
[12:40:25] zapata: has joined #ruby
[12:41:15] magikid: has joined #ruby
[12:41:24] reprazent: has joined #ruby
[12:41:58] rbennacer: has joined #ruby
[12:42:08] aupadhye: has joined #ruby
[12:42:41] kobain: has joined #ruby
[12:43:28] roelof: has joined #ruby
[12:44:31] roelof: Can anyone explain this : https://gist.github.com/rwobben/f5069036dcbf02c7f5e59dbb373f7de8
[12:45:14] roelof: I thought with instance_methods I only see the functions provided by the class itself and not the inherited ones
[12:45:25] workmad3: roelof: no, that`s `instance_methods(false)`
[12:45:52] workmad3: roelof: just a call to `instance_methods` gives you all instance methods, inherited and directly defined on that class
[12:46:17] roelof: oke, then that's the problem
[12:46:58] roelof: how can I get only the functions provided by the class itself in a function
[12:47:21] workmad3: roelof: first, method not function in ruby
[12:47:35] shevy: roelof didn't workmad3 just say how :)
[12:47:42] workmad3: and also ^ :)
[12:47:47] roelof: yes, he did, I over read it
[12:47:56] shevy: nobody reads workmad3 anymore
[12:47:59] OTORelic2: has joined #ruby
[12:48:19] Amnez777: has joined #ruby
[12:49:18] roelof: I do but sometimes I want to fast :(
[12:49:53] Zai00: has joined #ruby
[12:50:40] banister: roflmao: you might need to also tack on + private_instance_method() + protected_instance_methods to get the full suite
[12:50:43] rbennacer: has joined #ruby
[12:51:21] dstarh: has joined #ruby
[12:51:26] Yeomra: has joined #ruby
[12:52:50] aqoom: has joined #ruby
[12:53:21] roelof: oke, I try to make this exercise : https://rubymonk.com/learning/books/4-ruby-primer-ascent/problems/85-whodunnit
[12:53:27] roelof: but still no pass :(
[12:54:00] roelof: maybe something wrong with this part : answer = all_classes.select { |klas| klas.instance_methods(false).include? (method) }
[12:54:30] roelof: all_classes comes from here : all_classes = object.class.ancestors
[12:55:28] eljimbo: has joined #ruby
[12:55:30] rake_db_migrate: has joined #ruby
[12:56:25] karmatr0n: has joined #ruby
[12:57:05] kareeoleez: has joined #ruby
[12:57:50] charlemagne: has joined #ruby
[12:59:16] pawnbox: has joined #ruby
[12:59:35] decoponyo: has joined #ruby
[12:59:54] pawnbox: has joined #ruby
[13:00:27] roelof: Can someone then help me figure out why my code gives the wrong answer : https://gist.github.com/rwobben/4077834fff5be74edf530328c0ac3c6b
[13:00:44] n008f4g_: has joined #ruby
[13:03:09] krz: has joined #ruby
[13:03:49] aegis3121: has joined #ruby
[13:05:36] shevy: codemonk sucks
[13:06:51] shevy: something is wrong with your code anyway
[13:07:11] shevy: even if you put the argument to true, your array has [Kernel, Object, String]
[13:07:22] shevy: expected Numeric got Comparable - not sure how you can get from there, there
[13:07:48] perlgod: has joined #ruby
[13:08:04] noService: has joined #ruby
[13:09:22] ChiefAlexander: has joined #ruby
[13:09:32] roelof: shevy: im also not. IM trying to learn ruby by using ruby monk and never see this before
[13:10:32] mosez: has joined #ruby
[13:10:51] workmad3: roelof: there's two annoyances that aren't being made clear there - 1: it only wants classes, not modules (both appear in ancestors), 2: it wants the first class that the method appears under, which means that for stuff defined in a module you need to find the first class after it in the chain
[13:10:58] cdg: has joined #ruby
[13:10:58] fourq: has left #ruby: ("twip")
[13:11:40] _stu_: has joined #ruby
[13:11:49] roelof: workmad3: so I cannot use ancestors to find the answer
[13:12:16] workmad3: roelof: you can, but you need to be a bit more careful about it
[13:12:29] roelof: then I have to rewrite it using superclass
[13:13:11] workmad3: roelof: again, you can use ancestors, but you need to be a bit more careful
[13:13:53] openstruct: has joined #ruby
[13:14:02] roelof: oke, how can I solve this so modules are not part of it
[13:14:14] chipotle: has joined #ruby
[13:15:38] jero_: has joined #ruby
[13:16:03] ekinmur: has joined #ruby
[13:17:12] griffindy: has joined #ruby
[13:17:29] diegoaguilar: has joined #ruby
[13:18:46] diegoaguilar: has joined #ruby
[13:19:08] crameth: has joined #ruby
[13:19:47] madgen: has joined #ruby
[13:21:48] triangles: has joined #ruby
[13:23:01] malconis: has joined #ruby
[13:24:48] charlemagne: has joined #ruby
[13:25:43] noway_: has joined #ruby
[13:27:29] emilkarl_: has joined #ruby
[13:27:34] akkmaxon: has joined #ruby
[13:27:47] pawnbox: has joined #ruby
[13:28:13] pifon: has joined #ruby
[13:32:23] andywojo: has joined #ruby
[13:33:20] swills: has joined #ruby
[13:35:02] sgambino: has joined #ruby
[13:35:35] bry4n_: has joined #ruby
[13:35:52] platzhirsch: has joined #ruby
[13:35:55] pifon1: has joined #ruby
[13:38:36] imperator: has joined #ruby
[13:38:54] madgen: has joined #ruby
[13:40:22] freerobby: has joined #ruby
[13:41:50] guardian: has joined #ruby
[13:42:15] skweek: has joined #ruby
[13:42:43] rippa: has joined #ruby
[13:45:45] Begi: has joined #ruby
[13:47:18] CloCkWeRX: has joined #ruby
[13:52:28] nanoz: has joined #ruby
[13:52:50] pawnbox: has joined #ruby
[13:52:59] merida: has joined #ruby
[13:53:58] LaT0rtue: has joined #ruby
[13:55:41] sesquipedalian: has joined #ruby
[13:56:07] tubuliferous: has joined #ruby
[13:57:35] JesseH: has joined #ruby
[13:58:23] jmorgado1: has joined #ruby
[13:59:51] dvinciguerra__: has joined #ruby
[14:01:02] tristanp: has joined #ruby
[14:01:12] dvinciguerra__: has joined #ruby
[14:01:56] emilkarl: has joined #ruby
[14:02:10] chouhoulis: has joined #ruby
[14:02:32] dvinciguerra__: has joined #ruby
[14:02:34] kareeoleez: has joined #ruby
[14:02:56] reprazent: has joined #ruby
[14:03:06] whippythellama: has joined #ruby
[14:03:15] hxegon: has joined #ruby
[14:03:55] freerobby: has joined #ruby
[14:06:49] treehug88: has joined #ruby
[14:08:40] Waqas: has joined #ruby
[14:10:34] tubuliferous: has joined #ruby
[14:10:35] prestorium: has joined #ruby
[14:11:45] grill: has joined #ruby
[14:12:38] rake_db__: has joined #ruby
[14:12:38] troulouliou_div2: has joined #ruby
[14:13:05] freerobby: has joined #ruby
[14:13:15] LastWhisper____: has joined #ruby
[14:14:42] Rodya_: has joined #ruby
[14:15:07] madgen: has joined #ruby
[14:16:35] cpup: has joined #ruby
[14:18:32] VeryBewitching: has joined #ruby
[14:20:29] binaryplease1: has joined #ruby
[14:21:34] crime: has joined #ruby
[14:21:37] Begi: VeryBewitching: /o
[14:21:46] shevy: damn, witch magic happening again
[14:21:52] shevy: curse onto the yorickpeterse !
[14:21:54] VeryBewitching: No, this is witch magic https://gist.github.com/bewitchingme/ae71c86587d55f0d5e110eb78bf1de21
[14:22:00] VeryBewitching: That... makes no sense.
[14:22:15] shevy: App\PayrollPeriod:
[14:22:18] shevy: hey is this php
[14:22:50] VeryBewitching: Yes, and I apologize for polluting your eyes shevy, but I've been laughing about this since I started work this morning.
[14:22:50] jtoy: has joined #ruby
[14:23:01] VeryBewitching: A query with limit 1 that returns a count of 2
[14:23:06] shevy: yes this makes me violent... they had to pick \ :(
[14:23:30] VeryBewitching: Ya, the namespace separator is terribad
[14:23:32] shevy: php knows better than you how to count!
[14:23:41] nofacade: has joined #ruby
[14:25:03] emilkarl: has joined #ruby
[14:25:33] pawnbox: has joined #ruby
[14:28:20] dANOKELOFF: has joined #ruby
[14:28:45] M-shine: has joined #ruby
[14:30:03] dravine: has joined #ruby
[14:30:14] marcdel: has joined #ruby
[14:30:28] bronson: has joined #ruby
[14:34:58] djbkd_: has joined #ruby
[14:35:40] weemsledeux: has joined #ruby
[14:36:07] OTORelic2: has joined #ruby
[14:37:00] cpruitt: has joined #ruby
[14:38:09] yorickpeterse: Coming from PHP that doesn't surprise me
[14:39:56] tmtwd: has joined #ruby
[14:42:17] IrishGringo: has joined #ruby
[14:43:00] M-Kodo: has joined #ruby
[14:44:06] cpruitt: has joined #ruby
[14:47:51] Rubie: has joined #ruby
[14:47:51] Rodya_: has joined #ruby
[14:50:22] Rodya_: has joined #ruby
[14:50:54] karmatr0n: has joined #ruby
[14:53:35] neohunter: has joined #ruby
[14:53:41] codecop: has joined #ruby
[14:53:43] codecop_: has joined #ruby
[14:54:01] blandflakes: has joined #ruby
[14:55:17] Devalo: has joined #ruby
[14:55:24] fmcgeough: has joined #ruby
[14:57:59] polishdub: has joined #ruby
[14:59:45] pifon: has joined #ruby
[15:00:09] workmad3: has joined #ruby
[15:00:44] pifon: has joined #ruby
[15:01:29] Guest71601: has joined #ruby
[15:01:40] pifon: has joined #ruby
[15:02:30] pifon: has joined #ruby
[15:03:20] pifon: has joined #ruby
[15:05:51] PedramT: has joined #ruby
[15:06:16] chouhoulis: has joined #ruby
[15:07:15] smathy: has joined #ruby
[15:08:23] wmoxam: has joined #ruby
[15:09:31] Suntzu: has joined #ruby
[15:11:21] danand: has joined #ruby
[15:11:24] nettoweb: has joined #ruby
[15:12:09] czerasz2: has joined #ruby
[15:13:37] jtoy: has joined #ruby
[15:13:37] x77686d: has joined #ruby
[15:14:30] evidex: has joined #ruby
[15:14:40] nartes: has joined #ruby
[15:14:40] bruno-: has joined #ruby
[15:15:05] aegis3121: has joined #ruby
[15:16:00] VeryBewitching: Concatenating strings with . is probably the worst offense I can think of in it's history.
[15:16:00] nartes: has joined #ruby
[15:16:12] GnuYawk: has joined #ruby
[15:16:12] marcdel: has joined #ruby
[15:16:14] pawnbox: has joined #ruby
[15:16:21] Rodya_: has joined #ruby
[15:16:24] GnuYawk: has joined #ruby
[15:16:41] nartes: has joined #ruby
[15:19:00] nartes: has joined #ruby
[15:19:56] VeryBewitching: ACTION pets ~/.rubies/ruby-2.3.0/bin/ruby
[15:20:00] nartes: has joined #ruby
[15:20:26] dANOKELOFF: has joined #ruby
[15:20:34] diegoaguilar: has joined #ruby
[15:21:11] Rodya_: has joined #ruby
[15:21:32] kareeoleez: has joined #ruby
[15:24:36] jschoolcraft: has joined #ruby
[15:26:41] borodin: has joined #ruby
[15:27:41] Frem: has joined #ruby
[15:28:08] OTORelic: has joined #ruby
[15:28:56] millerti: has joined #ruby
[15:29:03] nfk|laptop: has joined #ruby
[15:30:14] neohunter: has joined #ruby
[15:30:27] platzhirsch: has joined #ruby
[15:31:28] petertretyakov: has joined #ruby
[15:32:51] yorickpeterse: OTORelic: command not found
[15:33:41] crime: yorickpeterse: try <exit></exit>
[15:35:15] M-shine: has joined #ruby
[15:35:58] irick: So i'm looking for some advice. I've read through The Well Grounded Rubyist, I've done the codecademy ruby course, I'm working through the ruby koans, I've got Practical Object Oriented Design and Design Patterns In Ruby. Are there any other steps I can be taking to really drill the language and some of the best practices into my head?
[15:38:33] jdm: has joined #ruby
[15:39:11] [Butch]: has joined #ruby
[15:39:24] Zai00: has joined #ruby
[15:39:27] symm-: has joined #ruby
[15:40:33] noService: has joined #ruby
[15:41:20] workmad3: irick: write some code :P
[15:41:46] workmad3: (sorry, it's friday afternoon, my sarcasm circuits are dialed to full)
[15:41:54] platzhirsch: has joined #ruby
[15:42:09] apeiros: workmad3: nice to see that your dial maxes out at "tame" ;-p
[15:42:17] irick: I am. I don't think i'm going to learn best practices by banging out C style ruby though.
[15:42:34] apeiros: irick: ask for reviews here
[15:42:50] apeiros: make sure you make small examples, ideally still runnable/reproducible
[15:43:27] havenwood: irick: What you listed is good stuff. Reading lots of code is also well worthwhile.
[15:43:35] workmad3: apeiros: there wasn't a huge amount of source to build decent sarcasm on :(
[15:46:26] M-Kodo: has joined #ruby
[15:47:52] sudoubuntu: has joined #ruby
[15:48:34] zast: has joined #ruby
[15:50:06] nartes: has joined #ruby
[15:50:26] evidex: has joined #ruby
[15:51:32] fedexo: has joined #ruby
[15:52:08] LuckyABA: has joined #ruby
[15:52:17] irick: havenwood: any projects you'd suggest looking through?
[15:53:19] lagweezle: has joined #ruby
[15:53:30] havenwood: irick: https://github.com/soveran/cuba/blob/master/lib/cuba.rb
[15:53:42] havenwood: irick: https://github.com/jeremyevans/roda/blob/master/lib/roda.rb
[15:53:51] Waqas: You only know ruby or ROR also?
[15:54:59] troulouliou_div2: has joined #ruby
[15:55:14] irick: I know some rails, I did a few interactive primers and i'm reading through Rails 4 In Action.
[15:55:28] Waqas: try this, Microblogger with ruby: http://tutorials.jumpstartlab.com/projects/microblogger.html
[15:55:38] havenwood: irick: https://github.com/trending?l=Ruby
[15:55:50] irick: thanks havenwood, Waqas.'
[15:56:50] tubuliferous: has joined #ruby
[15:56:59] Waqas: And if you are feeling ambitious, go through all of the projects in this page, they are all in Ruby, only: http://www.theodinproject.com/ruby-programming
[15:57:10] Suntzu: has joined #ruby
[15:57:19] kareeoleez: has joined #ruby
[15:57:28] irick: i heard of the odin project.
[15:57:42] Waqas: it is very good
[15:57:43] amclain: has joined #ruby
[15:58:07] CausaMortis: has joined #ruby
[15:58:18] jgt4: has joined #ruby
[15:59:02] jhack: has joined #ruby
[16:00:19] roger_rabbit: has joined #ruby
[16:01:04] bmf: has joined #ruby
[16:01:34] nettoweb: has joined #ruby
[16:02:00] rolha: has joined #ruby
[16:02:15] irick: It's kinda funny, I'm at ACR right now and there have been very few ruby talks. Thought it would be a better learning experience but it seems a lot more a social experience.
[16:03:10] merida: has joined #ruby
[16:03:11] djellemah_: has joined #ruby
[16:03:21] gizmore: has joined #ruby
[16:04:07] marxarelli: has joined #ruby
[16:05:44] jdm: has joined #ruby
[16:06:42] kareeoleez: has joined #ruby
[16:08:39] KnownSyntax: has joined #ruby
[16:08:44] KnownSyntax: has joined #ruby
[16:09:58] Blaguvest: has joined #ruby
[16:10:20] KensoDev: has joined #ruby
[16:13:50] tubuliferous: has joined #ruby
[16:14:17] M-mistake: has joined #ruby
[16:16:29] baweaver: has joined #ruby
[16:17:11] davedev24: has joined #ruby
[16:17:55] bogn: has joined #ruby
[16:18:13] Xeago: has joined #ruby
[16:20:40] bluOxigen_: has joined #ruby
[16:21:19] danand: has joined #ruby
[16:21:55] jdm_: has joined #ruby
[16:22:28] sudoubuntu: has joined #ruby
[16:23:26] floatingpoint: has joined #ruby
[16:24:29] norc: has joined #ruby
[16:24:47] kareeoleez: has joined #ruby
[16:26:29] platzhirsch: has left #ruby: ()
[16:28:13] ascarter: has joined #ruby
[16:29:55] ascarter: has joined #ruby
[16:30:29] Suntzu: has joined #ruby
[16:33:58] mikecmpbll: has joined #ruby
[16:34:53] ramfjord: has joined #ruby
[16:35:17] _djbkd: has joined #ruby
[16:35:23] Alayde: has joined #ruby
[16:35:59] _djbkd: has joined #ruby
[16:36:15] hxegon: has joined #ruby
[16:37:46] wsk: has joined #ruby
[16:37:54] platzhirsch: has joined #ruby
[16:38:41] platzhirsch: With an array of tuples [[Time, Integer]] and Time contains days, for instance 2016-03-01, 2016-03-02 and so on
[16:38:56] platzhirsch: there are gaps in between, what's the neatest way to fill them with [_, 0] ?
[16:39:13] platzhirsch: is there a way with zip?
[16:39:26] havenwood: platzhirsch: gaps?
[16:39:46] platzhirsch: havenwood: gaps as in missing days
[16:41:15] apeiros: platzhirsch: are they sorted?
[16:41:31] PedramT: has joined #ruby
[16:41:36] jackjackdripper: has joined #ruby
[16:42:19] apeiros: then you can use lut=ary.to_h; (ary.first.first.to_date..aray.last.first.to_date).map { |d| [d, lut[h] || 0] }
[16:42:25] apeiros: might need some parens
[16:42:31] apeiros: plain ruby might not have .to_date
[16:43:01] kareeoleez: has joined #ruby
[16:43:23] platzhirsch: has left #ruby: ()
[16:44:06] tomchapin: has joined #ruby
[16:44:11] apeiros: oh, right, needs h.to_time in the lookup
[16:44:24] apeiros: and at least ruby 2.3 has Time#to_date and Date#to_time :)
[16:44:42] apeiros: though IMO you should use Date instead of Time anyway there.
[16:44:51] skweek: has joined #ruby
[16:45:21] Begi: has left #ruby: ()
[16:45:46] tildes: has joined #ruby
[16:47:13] dionysus69: has joined #ruby
[16:49:00] nettoweb: has joined #ruby
[16:49:17] knopkodav: has joined #ruby
[16:50:24] rcvalle: has joined #ruby
[16:50:57] trinaldi: has joined #ruby
[16:52:17] kareeoleez: has joined #ruby
[16:52:20] The_Phoenix: has joined #ruby
[16:53:07] The_Phoenix: has joined #ruby
[16:53:28] shinnya: has joined #ruby
[16:54:06] norc: apeiros, to_date is probably one of the most widely used 2.3 features then in my applications. ;-)
[16:54:39] apeiros: norc: I'm actually not sure when it was added to plain ruby. I just remember at least 1.8 not having them. and it was PITA.
[16:55:21] DoubleMalt: has joined #ruby
[16:55:40] The_Phoenix: has joined #ruby
[16:55:40] rbennacer: has joined #ruby
[16:57:24] The_Phoenix: has joined #ruby
[16:58:43] The_Phoenix: has joined #ruby
[16:59:11] elifoster: has joined #ruby
[17:00:18] freerobby: has joined #ruby
[17:00:21] tubuliferous: has joined #ruby
[17:00:23] The_Phoenix: has joined #ruby
[17:00:52] tomchapin: has joined #ruby
[17:01:03] merida: has joined #ruby
[17:01:40] The_Phoenix: has joined #ruby
[17:03:04] abyx: has joined #ruby
[17:03:10] The_Phoenix: has joined #ruby
[17:03:49] Zai00: has joined #ruby
[17:04:32] The_Phoenix: has joined #ruby
[17:05:52] The_Phoenix: has joined #ruby
[17:05:53] kadoppe: has joined #ruby
[17:06:06] n008f4g_: has joined #ruby
[17:07:09] bb010g: has joined #ruby
[17:07:32] The_Phoenix: has joined #ruby
[17:08:31] benlieb: has joined #ruby
[17:08:49] The_Phoenix: has joined #ruby
[17:09:49] The_Phoenix: has joined #ruby
[17:10:25] kareeoleez: has joined #ruby
[17:10:28] aegis3121: has joined #ruby
[17:10:55] The_Phoenix: has joined #ruby
[17:11:40] gizmore: how could i check if two objects overlap in class hierarchy.... eg: check_compatible(4, 4.0) # => true
[17:11:57] gizmore: hmm... all inherit from object :/
[17:12:26] norc: gizmore, use composition, not inheritance.
[17:12:30] The_Phoenix: has joined #ruby
[17:12:34] norc: Oh silly me.
[17:12:41] norc: My head failed to parse that sentence.
[17:12:48] aegis3121: has joined #ruby
[17:12:54] norc: gizmore, be more specific what you mean.
[17:13:02] chocoelho: has left #ruby: ()
[17:13:12] noService: has joined #ruby
[17:13:12] noService: has joined #ruby
[17:13:14] norc: gizmore, what are you trying to do?
[17:13:18] gizmore: background: i have some merge_options function, and want to check if the option is valid... thought checking classA == classB is cool
[17:13:28] polyidus: has joined #ruby
[17:13:58] GodFather: has joined #ruby
[17:14:29] gizmore: i guess it´s not a good idea :)
[17:14:52] norc: gizmore, if you gist some code it would be easier to tell how it can be solved elegantly.
[17:15:15] apeiros: gizmore: option.is_a?(LowestCommonAncestor)
[17:15:51] madgen: has joined #ruby
[17:16:09] stannard: has joined #ruby
[17:16:55] norc: has left #ruby: ("Leaving")
[17:17:09] chosen1: has joined #ruby
[17:17:21] gizmore: https://github.com/gizmore/activerecord-magic/blob/master/lib/active_record/magic/setting/arm-options.rb
[17:17:51] gizmore: apeiros: both objects are arbitrary :)
[17:18:10] norc: has joined #ruby
[17:18:53] FooMunki: has joined #ruby
[17:19:00] apeiros: well, code can't do "arbitrary". either you have an algorithm, or bust.
[17:19:38] gizmore: norc: too lazy for a gist... here is the code https://github.com/gizmore/activerecord-magic/blob/master/lib/active_record/magic/setting/arm-options.rb ... checking if arbitrary objects are compatible is unpossible, so i will just force floats for the option in question
[17:20:30] havenwood: >> def gizmorable? a, b; ((a.class.ancestors & b.class.ancestors).grep(Class) - [Object, BasicObject]).any? end; [gizmorable?(4, 'hi'), gizmorable?(4, 0.4)]
[17:20:32] ruby[bot]: havenwood: # => [false, true] (https://eval.in/550076)
[17:21:19] gizmore: havenwood: you are a genius
[17:22:25] norc: Though testing for both Object and BasicObject seems a bit silly.
[17:22:52] PedramT: has joined #ruby
[17:22:53] norc: Oh wait, today I really suck at this.
[17:27:49] ramfjord: has joined #ruby
[17:28:12] gizmore: havenwood: haha... it complains about 7.seconds vs 8.0 now
[17:28:18] ChiefAlexander: has joined #ruby
[17:28:31] kareeoleez: has joined #ruby
[17:28:40] BSaboia: has joined #ruby
[17:28:49] jmacdonald: has joined #ruby
[17:28:55] jmacdonald: hi. ruby-nuby here.
[17:29:10] havenwood: jmacdonald: welcome!
[17:29:13] gizmore: puts "Hello jmacdonald"
[17:29:23] gregf: has joined #ruby
[17:29:32] Karix: has joined #ruby
[17:29:48] jmacdonald: actually i know zero ruby. I just know that i'm trying to run bundle exec rake test on a puppet repo.. and i keep getting this : Rake Aborted \n NameError: uninitialized constant Syck
[17:29:54] jmacdonald: so i installed the gem syck
[17:30:11] gizmore: jmacdonald: probably put it in your Gemfile?
[17:30:33] jmacdonald: i'll read into that some. tks
[17:31:04] gizmore: very welcome
[17:31:21] sudoubuntu: has joined #ruby
[17:32:05] havenwood: jmacdonald: prefixing `bundle exec` runs it "in the context of your bundle," meaning only with the exact gems from your Gemfile.lock file
[17:32:25] havenwood: jmacdonald: putting new gems in your Gemfile and running `bundle install` will update the Gemfile.lock
[17:32:49] ljd: has joined #ruby
[17:33:17] havenwood: http://bundler.io/#getting-started
[17:34:35] ljd: In ruby 2.3.0 > d = {}; d[:a][:b] = :foo returns nill instead of raising an error
[17:34:49] ljd: Is that intended?
[17:35:06] norc: >> d = {}; d[:a][:b] = :foo
[17:35:07] ruby[bot]: norc: # => nil (https://eval.in/550079)
[17:35:10] norc: 22>> d = {}; d[:a][:b] = :foo
[17:35:13] adaedra: I think it's a known bug
[17:35:22] ruby[bot]: norc: # => undefined method `[]=' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/550080)
[17:35:37] postmodern: has joined #ruby
[17:36:01] norc: adaedra, ljd: https://bugs.ruby-lang.org/issues/12098
[17:36:11] jmacdonald: okie, i added gem 'syck', '~>1.1.0' to my Gemfile, ran bundle install it installed. same error still.
[17:36:28] adaedra: thank you norc
[17:36:31] rbennacer: has joined #ruby
[17:37:15] Yiota: has joined #ruby
[17:38:54] huyderman: has joined #ruby
[17:40:23] rake_db_migrate: has joined #ruby
[17:41:03] gizmore: is yield async if you use threads? Oo
[17:41:21] rake_db_migrate: has joined #ruby
[17:41:31] kadoppe: has joined #ruby
[17:41:44] norc: gizmore, what do you mean?
[17:41:55] gizmore: i wanna turn an async function to sync, wrapping it... one sec
[17:43:04] havenwood: jmacdonald: Add a `require 'syck'` to the top of the files where you use `Syck`.
[17:43:26] gizmore: norc: http://railsbin.wechall.net/pastes/16
[17:44:11] abyx: has joined #ruby
[17:44:30] DANI111: has joined #ruby
[17:44:36] PedramT: has joined #ruby
[17:44:38] eljimmy: has joined #ruby
[17:44:50] gizmore: norc: the command will open a thread, and when it finished triggers the arm_subscribe thingy.... i thought wrapping with the above function is enough to wait for the result
[17:45:13] eljimmy: has joined #ruby
[17:46:51] kareeoleez: has joined #ruby
[17:47:46] norc: gizmore, nope, yield is just a fancy way of saying "call that block"
[17:48:16] norc: gizmore, the trick will lie in the implementation of arm_subscribe that makes this asynchronous.
[17:48:40] norc: So you will have to look at whatever library lies behind that to figure out how you can get notified. Maybe it implements a Deferred object.
[17:48:51] gizmore: i want to turn the async into sync
[17:49:03] norc: gizmore, generally you dont.
[17:49:04] gizmore: so wait with my func for the result
[17:49:11] gizmore: for my spec i want :)
[17:49:26] norc: Mock it.
[17:49:47] norc: Dont write custom code to satisfy your specs.
[17:50:26] gizmore: i need that async to sync there generally
[17:50:35] norc: I doubt that.
[17:50:52] gizmore: it will be possible to call plugins from command line
[17:51:06] gizmore: and the command has to finish before it can return results
[17:51:09] norc: Go write some JavaScript code with lots of XHR - after a day you will begin to realize how awesome writing async code is.
[17:51:30] gizmore: you are not helping by saying don´t do what you want :D
[17:51:53] norc: gizmore, you are solving the problem in the wrong way.
[17:52:12] gizmore: i just wanna write a function that waits for the command and returns the output then
[17:52:15] norc: And by locking your mind into a solution you are effectively preventing from actually tackling the problem.
[17:52:33] veloutin: has joined #ruby
[17:52:37] norc: gizmore, what library are you using?
[17:52:39] PedramT: has joined #ruby
[17:53:01] gizmore: none/mine... activerecord-magic/events
[17:53:14] gizmore: and ricer4 :P
[17:53:32] gnufied: has joined #ruby
[17:53:34] norc: gizmore, well without knowing how it works and what it does nobody here can help you.
[17:56:23] chosen1: @gizmore I think what you are looking for is to join the threads.
[17:56:36] baweaver: has joined #ruby
[17:56:46] gizmore: chosen1: yeah :(
[17:57:15] gizmore: i think i have to look into that one lib...
[17:57:20] norc: chosen1, unless of course its async because of IO..
[17:57:22] kadoppe: has joined #ruby
[17:57:30] gizmore: ruby-concurrency
[17:57:31] norc: Or some completely different mechanism.
[17:57:31] chosen1: gizmore the function is called join, I belive.
[17:58:01] gizmore: chosen1: the general design does not feature to know if a plugin uses threads or not
[17:58:02] chosen1: I'm new myself so I can't provide a working poc for you.
[17:58:18] gizmore: so i don´t know how many and which thread to join
[17:59:07] gizmore: i just have to wait for an event in the subscribe... ruby-concurrency seems to feature that, but looked complicated
[17:59:41] norc: gizmore, it sounds like your library already uses a publish/subscribe from the methods being used.
[17:59:55] ldnunes: has joined #ruby
[18:00:01] Cohedrin: has joined #ruby
[18:00:06] gizmore: but how could i wait inside a func for the publish?
[18:00:06] norc: Stacking another ontop to derail the asynchronous behavior. Im fairly certain that you should rethink your goals.
[18:01:13] [Butch]: has joined #ruby
[18:01:19] raeoks: has joined #ruby
[18:01:26] norc: gizmore, https://github.com/krisleech/wisper
[18:01:35] jmacdonald: has left #ruby: ()
[18:01:37] norc: Its a lightweight solution that lets you derail the async code of your library entirely.
[18:01:40] chipotle: has joined #ruby
[18:01:57] gizmore: thanks... will look at it
[18:02:04] gizmore: lunchtime :)
[18:02:06] norc: Of course.
[18:02:11] norc: It wont do what you expect it to.
[18:02:34] stannard: has joined #ruby
[18:05:05] kareeoleez: has joined #ruby
[18:05:31] dmr8: has joined #ruby
[18:05:41] norc: gizmore, in a nutshell your callback needs to emit a signal/message, and your controlling code needs to continuously poll until it seems that message.
[18:05:59] Devalo: has joined #ruby
[18:07:04] chouhoul_: has joined #ruby
[18:07:12] emilkarl: has joined #ruby
[18:07:18] Suntzu: has joined #ruby
[18:07:47] Xeago: has joined #ruby
[18:09:43] polyidus: has joined #ruby
[18:10:35] codecop: has joined #ruby
[18:13:24] aegis3121: has joined #ruby
[18:15:31] ChiefAlexander: has joined #ruby
[18:15:43] Mia: has joined #ruby
[18:15:57] kareeoleez: has joined #ruby
[18:16:09] baweaver: has joined #ruby
[18:17:43] madgen: has joined #ruby
[18:19:13] edwinvdgraaf: has joined #ruby
[18:19:36] DANI111: has joined #ruby
[18:19:46] zeroDivisible: has joined #ruby
[18:19:52] edwinvdgraaf: has joined #ruby
[18:21:31] ekinmur: has joined #ruby
[18:21:44] Giauzar: has joined #ruby
[18:22:03] tubuliferous: has joined #ruby
[18:23:22] edwinvdg_: has joined #ruby
[18:23:57] yuung: has joined #ruby
[18:24:17] Musashi007: has joined #ruby
[18:25:33] davee_: has joined #ruby
[18:25:45] drptbl: has joined #ruby
[18:26:08] kareeoleez: has joined #ruby
[18:27:10] rcvalle: has joined #ruby
[18:27:12] yuung: silly q: why does ruby pass by reference? i always thought most scripting languages did pass by value.
[18:28:01] apeiros: no. passing by value would be silly for almost all OO languages.
[18:28:15] norc: yuung, strictly speaking ruby is pass by value.
[18:28:15] apeiros: you'd have to copy potentially large objects
[18:28:17] yuung: apeiros, why is that? isn't java pass by value?
[18:28:18] SCHAAP137: has joined #ruby
[18:28:31] yuung: norc, how so?
[18:29:29] norc: >> def foo(bar); bar = 23 end; q = 42; foo(q); puts q
[18:29:31] ruby[bot]: norc: # => 42 ...check link for more (https://eval.in/550084)
[18:30:21] apeiros: yuung: no. iirc java works the same way as ruby there. which might cause confusion - see norc's explanation (hoping he'll explain properly :D)
[18:30:25] yuung: >> s = "a"; def foo(a); a = "b"; end; foo(s); p s
[18:30:26] ruby[bot]: yuung: # => "a" ...check link for more (https://eval.in/550085)
[18:32:25] norc: And then locally compile this C++ program and execute it: #include <iostream> void q(int &x) { x++; } int main() { int a = 1; q(a); std::cout << a << std::endl ;}
[18:32:31] norc: That is pass by reference as a comparison.
[18:32:33] bronson: has joined #ruby
[18:32:35] Guest38: has joined #ruby
[18:33:27] yuung: norc, that's so weird; i literally did the same thing in IRB (gist here https://gist.github.com/johnmarinelli/c45e5440a42c0e78f7853df33a62b19d) and i got something different
[18:34:05] yuung: norc okay nvm don't look at that i had a brainfart
[18:34:10] gizmore: yuung: java is pass by reference, except for primitives.... same as ruby. but in ruby: There are no primitives \o/
[18:34:13] norc: yuung, the method foo returns its last expression, which is an assignment, which returns the assignment expression, which is "john"
[18:34:21] norc: gizmore, java is pass by value, sorry.
[18:34:31] gizmore: no... it´s pass by ref
[18:34:37] gizmore: they say the ref is a value
[18:34:51] norc: gizmore, that still makes it pass by value.
[18:34:59] norc: gizmore, its just pointers renamed to references.
[18:35:05] gizmore: everything is a value then
[18:35:14] norc: gizmore, look at my C++ example.
[18:35:16] norc: That is pass by reference.
[18:36:14] norc: gizmore, only very few langauges have pass by reference, mostly because its difficult to implement and hard to use right.
[18:36:29] tjohnson: has joined #ruby
[18:36:39] hxegon: has joined #ruby
[18:36:44] norc: Especially since pointers provide a really easy workaround to modify things outside your function.
[18:37:09] gizmore: ruby is pass by reference... it does not copy values
[18:37:19] gizmore: java the same
[18:37:39] norc: gizmore, if you have the need to redefine the terminology then fine.
[18:37:44] freerobby: has joined #ruby
[18:37:46] norc: But both Java and Ruby are 100% pass-by-value.
[18:37:50] norc: I have shown you examples.
[18:37:58] yuung: norc got it. ty :)
[18:37:59] norc: Either show me proof or accept it.
[18:38:15] gizmore: if you confuse reference and value then java is pass by value
[18:38:17] chouhoulis: has joined #ruby
[18:38:19] polyidus: has joined #ruby
[18:38:35] norc: gizmore, java has that tendency to name things differently. What Java calls a reference is a pointer in reality.
[18:38:42] norc: The difference is really important.
[18:38:45] gizmore: yes... and you pass pointers
[18:39:03] norc: #include <iostream> void q(int &x) { x++; } int main() { int a = 1; q(a); std::cout << a << std::endl ;}
[18:39:05] gizmore: it does not do a copy of an object, if you pass it
[18:39:06] norc: That is not a pointer.
[18:39:28] norc: Let me show you what how a pointer works instead
[18:39:34] gizmore: that´s ugly!
[18:39:41] norc: void q(int *x) { x++; } int main() { int a = 1; q(a); std::cout << a << std::endl ;}
[18:39:45] gizmore: a refernce is a hidden pointer?
[18:39:57] norc: A reference is just that - an actual reference to the object.
[18:40:06] gizmore: what is a pointer then?
[18:40:13] norc: A memory address.
[18:40:16] norc: A number if you want.
[18:40:25] norc: And in my last snipped I modified that pointer.
[18:40:27] gizmore: and a reference is in fact just a pointer too
[18:40:34] gizmore: but i got your point... thanks
[18:40:38] norc: No it is not.
[18:40:46] norc: They are so inherently different in so many ways.
[18:40:47] shevy: this is fun
[18:40:56] norc: I dont have time to explain this to you.
[18:41:01] norc: Go read a book or something.
[18:41:03] duckpuppy: has joined #ruby
[18:41:06] gizmore: i understood the namings now, thanks
[18:41:40] rake_db__: has joined #ruby
[18:41:52] gizmore: under the hood, a reference is just a number too.... kinda pointer as well :P but whatever
[18:42:20] norc: Ignore what happens under the hood.
[18:42:26] norc: The important thing is the behavior.
[18:43:03] norc: References provide an absolutely elegant solution in C++ to do a lot of things that pointers can do, without the bugs.
[18:43:12] norc: Without the crashes.
[18:43:33] gizmore: because a reference can´t be null?
[18:44:36] jgt4: has joined #ruby
[18:44:52] norc: Pointers mean you need to manage memory, which leads to null ptr deferencings, access violations, double freeing, overflows errors
[18:45:04] norc: Memory leaking
[18:45:08] norc: All kinds of nasty things.
[18:46:02] rake_db_migrate: has joined #ruby
[18:46:27] norc: yuung, I kind of have hidden one important thing about this whole though.
[18:47:46] yuung: norc yes?
[18:47:51] benzrf: i thought references were a feature where you could pass a sort of "reference to a variable", so that you can assign to the variable which you have a reference to
[18:47:52] norc: >> def a(q); q.replace('42'); end; str = "23"; q(str); puts str
[18:47:53] ruby[bot]: norc: # => undefined method `q' for main:Object (NoMethodError) ...check link for more (https://eval.in/550086)
[18:48:00] norc: >> def a(q); q.replace('42'); end; str = "23"; a(str); puts str
[18:48:01] ruby[bot]: norc: # => 42 ...check link for more (https://eval.in/550087)
[18:48:12] ssiris: has joined #ruby
[18:48:28] norc: yuung, the relevant bit here is that variables are basically like "pointers" to objects.
[18:48:31] stannard: has joined #ruby
[18:48:46] gizmore: benzrf: in c++ (and C#, others?) there are indeed "references" ... which is a pointer with another syntax
[18:48:58] norc: And when you call a method with an argument, it effectively passes the value of that pointer.
[18:49:05] madgen: has joined #ruby
[18:49:06] stannard: has joined #ruby
[18:49:28] norc: yuung, but it still is pass by value - but you can still wreck havocs on external objects by using destructive methods
[18:49:33] benzrf: honestly, all this confusion becomes irrelevant when you go purely functional
[18:49:36] benzrf: #haskell4lyfe
[18:49:46] gizmore: a function is just a pointer!!!
[18:50:05] gizmore: terminology fml
[18:50:37] mr_oh: has joined #ruby
[18:50:39] Xeago: has joined #ruby
[18:52:18] mr_oh: mr. weaver?
[18:53:07] Zai00: has joined #ruby
[18:53:19] workmad3: has joined #ruby
[18:53:30] shevy: benzrf is a monad like a pointer?
[18:54:48] norc: yuung, so in summary: Variables are pointers to objects. Arguments are passed by value (giving you access to the same object without copying it). Assignment does not change the object, but changes the pointer of your variable.
[18:55:17] norc: That also shows how Ruby objects die. Once there is no variable or object pointing at a given object, it will get marked and sweeped.
[18:55:27] norc: By the garbage collector.
[18:55:27] dionysus69: has joined #ruby
[18:56:52] benzrf: shevy: not even slightly
[18:56:59] Es0teric: has joined #ruby
[18:57:05] devbug: has joined #ruby
[18:57:59] mr_oh: as far as I could figure, when I read about them, monad is a funnel with its own scope
[18:58:35] rake_db__: has joined #ruby
[19:03:54] rcvalle: has joined #ruby
[19:06:04] rake_db_migrate: has joined #ruby
[19:06:47] symm-: has joined #ruby
[19:06:52] Devalo: has joined #ruby
[19:08:03] dvinciguerra__: has joined #ruby
[19:08:05] rcvalle: has joined #ruby
[19:08:31] RenatoSilva: has joined #ruby
[19:09:09] RenatoSilva: hi, I have deleted old versions of some gems but they keep appearing in version list, how can I remove these ghost references?
[19:09:30] norc: renatosilva, how did you delete them, what are you doing to think they are there?
[19:11:04] RenatoSilva: norc: can't recall, accessing gem page
[19:11:24] RenatoSilva: norc: note that I don't think the gem is there
[19:11:36] norc: renatosilva, what command are you using that tells you the gem is still there
[19:11:40] norc: The exact command please.
[19:12:11] RenatoSilva: norc: command? no, browser
[19:12:12] ekinmur: has joined #ruby
[19:12:14] RenatoSilva: norc: https://rubygems.org/gems/repman
[19:12:20] rake_db_migrate: has joined #ruby
[19:12:40] norc: renatosilva, are you trying to delete a gem from rubygems?
[19:12:50] RenatoSilva: norc: again, I don't think the gem is there, neither do I know whether the page is saying the gem is there
[19:13:14] rake_db_migrate: has joined #ruby
[19:13:17] Suntzu: has joined #ruby
[19:13:20] RenatoSilva: norc: no, I am not trying, I did in the past
[19:13:31] boboc: has joined #ruby
[19:13:35] RenatoSilva: norc: then recently I noticed these old versions still referenced
[19:13:37] norc: renatosilva, Well I did not gather that from your initial couple sentences.
[19:14:06] shevy: renatosilva how did you delete these old versions?
[19:14:15] RenatoSilva: shevy: as I said, can't recall
[19:14:18] norc: renatosilva, anyhow, use gem yank to get rid of them
[19:14:25] RenatoSilva: shevy: probably the documented way at the time
[19:15:01] norc: renatosilva, the gem is still there. Just use gem yank and it will get pulled off rubygems for you.
[19:15:23] gizmore: chosen1: It was Thread.list.tap({|t|t.shift;}).map({|t|t.join} indeed
[19:15:36] majuscule: bundler is telling me it can't find Chef, but I see chef (12.8.1 ruby universal-mingw32, 12.3.0 x86-mingw32) with `gem search chef`
[19:15:39] adgtl: has joined #ruby
[19:15:40] majuscule: what might i be doing wrong?
[19:15:42] Pumukel: has joined #ruby
[19:15:50] majuscule: chef*, no capital
[19:15:54] norc: majuscule, bundler does not use your system gem store, but rather a separate.
[19:16:07] norc: majuscule, specify Chef in your Gemfile if you want to use it.
[19:16:11] shevy: renatosilva ah; "gem yank repman -v 2014.12.4"
[19:16:32] rcvalle: has joined #ruby
[19:17:16] majuscule: norc: 'chef' is in my gemfile, that's the point? i think i'm confused
[19:18:06] norc: majuscule, gist the part from your Gemfile, and give us your command that complains that Chef is missing.
[19:19:02] cpruitt: has joined #ruby
[19:19:09] majuscule: norc: http://sprunge.us/VjBd
[19:19:16] majuscule: bundler install --path vendor/bundle
[19:19:46] jtoy: has joined #ruby
[19:19:54] norc: majuscule, and the error message?
[19:19:57] rcvalle: has joined #ruby
[19:19:58] ur5us: has joined #ruby
[19:20:07] majuscule: Could not find gem 'chef' in any of the gem sources listed in your Gemfile or available on this machine.
[19:20:31] yuung: has joined #ruby
[19:20:41] gizmore: majuscule: the gem is not available in source rubygems.net
[19:20:51] gizmore: or whatever your source is
[19:21:26] gizmore: try gem 'chef', git: 'foo/chef'
[19:21:37] majuscule: gizmore: it is: https://rubygems.org/gems/chef
[19:21:48] norc: majuscule, that is bizarre.
[19:22:10] gizmore: majuscule: what is your source(s) in Gemfile?
[19:22:24] majuscule: fwiw this is using rvm and ruby 2.3.0p0
[19:22:25] gizmore: usually you have only rubygems.org
[19:22:26] norc: gizmore, do yourself a favour and click on the link above.
[19:22:26] norc: And read
[19:22:33] majuscule: gizmore: the entire gemfile is that paste
[19:22:41] baweaver: has joined #ruby
[19:22:52] norc: majuscule, is there a chance you have a mismatch between your ruby executable and bundle?
[19:23:13] majuscule: which bundle gives ~/.rvm/gems/ruby-2.3.0/bin/bundle
[19:23:20] norc: and which ruby?
[19:23:28] RenatoSilva: norc, shevy: not effective, ghost versions still show up https://rubygems.org/gems/repman/versions
[19:23:28] majuscule: ruby 2.3.0p0
[19:24:24] norc: renatosilva, ah. Use gem cleanup repman
[19:24:32] majuscule: norc: one odd thing i noticed - when i do this from another project, i see it saying Fetching gem metadata from https://rubygems.org/........ etc
[19:24:34] norc: Silly me again
[19:24:35] norc: .I give up.
[19:24:41] majuscule: it does not do that here, it just immediately errors
[19:24:47] shevy: renatosilva these are not ghost versions, they are gone
[19:24:52] norc: majuscule, is that your entire Gemfile?
[19:24:52] karmatr0n: has joined #ruby
[19:24:57] RenatoSilva: shevy: name it as you like
[19:25:04] shevy: https://rubygems.org/gems/repman/versions/2014.12.4
[19:25:18] norc: majuscule, Id say delete your entire bundle directory and reinstall for good measure.
[19:25:19] shevy: you only have to read the description there
[19:25:26] RenatoSilva: shevy: I'm sorry?
[19:25:38] shevy: sorry for what?
[19:26:03] shevy: "This gem has been yanked, and it is not available for download directly or for other gems that may have depended on it."
[19:26:26] majuscule: norc: .rvm/gems/ruby-2.3.0/gems/bundler-1.11.2 and .rvm/gems/ruby-2.3.0/bin/bundle ?
[19:26:51] mdw: has joined #ruby
[19:26:54] norc: majuscule, no your vendor/bundle
[19:26:58] RenatoSilva: I want the references to be completely deleted, like this one https://rubygems.org/gems/repman/versions/2016.4.8
[19:27:16] RenatoSilva: page not found ;)
[19:27:25] majuscule: norc: i've tried that :-( no change
[19:27:32] majuscule: rm'd the gemfile.lock too
[19:27:39] shevy: has 2016.4.8 ever existed?
[19:27:40] gizmore: >> Thread.list.tap{|t|t.shift;}.map{|t|t.join}
[19:27:41] ruby[bot]: gizmore: # => [] (https://eval.in/550091)
[19:27:49] majuscule: erm, actually the lock file never was created in the first place as it keeps failing
[19:27:54] RenatoSilva: shevy: no, which is the effect I want
[19:27:56] norc: majuscule, do you have a .rmvrc in your project?
[19:28:43] majuscule: norc: holy shit wait i think i figured it out
[19:28:57] majuscule: norc: bundle install works, bundler install doesn't
[19:28:57] norc: majuscule, please let me know if you do.
[19:29:00] shevy: renatosilva I guess the proper answer is that this is not possible because the feature is not available. You'd have to suggest this to the rubygems.org issue tracker: https://github.com/rubygems/rubygems.org/issues
[19:29:02] majuscule: i didn't realize they were even different things
[19:29:03] diegoviola: has joined #ruby
[19:29:15] norc: majuscule, oh my, I didnt spot that.
[19:29:27] RenatoSilva: shevy: thanks for sharing your thought with the world
[19:29:36] shevy: I am simply stating how it is
[19:29:50] RenatoSilva: I never said you are not
[19:30:03] norc: majuscule, well one is for managing bundles (bundler), while the other one allows you to work inside a specific bundle.
[19:30:17] elifoster: has joined #ruby
[19:31:36] majuscule: norc: bundler{,r} --help give the exact same man page...
[19:31:40] RenatoSilva: is there a concept of deleting/yanking "the gem itself" so that when you access its page there's a 404?
[19:31:46] norc: majuscule, Im thinking now.
[19:32:19] RenatoSilva: ...so that I reach my goal, if anyone knows of a way please tell me, thanks :)
[19:33:18] mr_oh: has joined #ruby
[19:34:27] norc: majuscule, sorry again Im confused.
[19:34:31] norc: majuscule, this should not happen.
[19:34:38] ekinmur: has joined #ruby
[19:34:39] norc: They are identical.
[19:35:04] Musashi007: has joined #ruby
[19:35:14] norc: majuscule, use which on both
[19:35:18] norc: see what happens
[19:36:14] jenrzzz: has joined #ruby
[19:36:14] jenrzzz: has joined #ruby
[19:36:35] majuscule: norc: they are both ruby_executable_hooks script text executable .rvm/gems/ruby-2.3.0/bin/bundle{,r}
[19:36:42] ged: has joined #ruby
[19:37:02] majuscule: which are identical except one does load Gem.bin_path('bundler', 'bundler', version)
[19:37:06] majuscule: and the other loads bundle...
[19:37:14] mahlon: has joined #ruby
[19:37:14] norc: majuscule, and both executables are 100% identical.
[19:37:26] norc: Ive dug into bundler a minute ago.
[19:37:28] majuscule: except one works and one doesn't :D
[19:37:31] norc: This makes no sense at all.
[19:37:40] norc: majuscule, Im really thinking RVM is to blame.
[19:37:46] majuscule: i believe it
[19:37:56] norc: Which is another reason why I use chruby. ;-)
[19:38:04] mdw: has joined #ruby
[19:38:21] majuscule: haha, i have no affiliation. just trying to get a setup working
[19:38:26] majuscule: i'd heard of rvm in the past
[19:38:46] majuscule: thought it might help another dev who's osx el capitan ruby install is broken
[19:39:41] norc: majuscule, I just dislike how highly intrusive RVM is. Its a recipe for bugs and problems.
[19:41:17] RenatoSilva: interesting http://help.rubygems.org/discussions/problems/19982-remove-yanked-gem
[19:41:41] RenatoSilva: "We will be removing previously yanked gems over the next few weeks."
[19:42:06] pawnbox: has joined #ruby
[19:42:34] jtoy: has joined #ruby
[19:43:24] majuscule: how can i pass some build instructions to a gem i'm trying to install into vendor/bundle?
[19:43:43] majuscule: aka i need --use-system-libraries etc to build nokogiri
[19:43:44] Waqas: has joined #ruby
[19:43:46] shevy: the "yanked" tag will remain
[19:43:57] majuscule: which is fine to install on it's own, but fails through bundler
[19:44:47] zapata: has joined #ruby
[19:44:50] pawnbox: has joined #ruby
[19:48:34] RenatoSilva: has left #ruby: ("http://pidgin.renatosilva.net - Pidgin++")
[19:48:36] workmad3: majuscule: the nokogiri README tells you how to do that, iirc
[19:49:28] gizmore: it("produces predictable random numbers") do ......
[19:49:52] baweaver: has joined #ruby
[19:50:00] gizmore: funny name for a test, in 1984
[19:51:25] polyidus: has joined #ruby
[19:52:41] Don_John: has joined #ruby
[19:53:00] mr_oh: I can't quite figure out why this will not write @title and "---" separator to file. It only writes the list of items.
[19:53:09] postmodern: has joined #ruby
[19:53:10] mr_oh: https://gist.github.com/anonymous/b8f15882c8fcbad663c7a21b743fd430
[19:53:26] polyidus: has joined #ruby
[19:55:32] sepp2k: has joined #ruby
[19:55:42] norc: mr_oh, puts like that writes to stdout and returns the string printed.
[19:56:07] norc: mr_oh, since you invoke a couple puts in succession, the last puts returns the printed list, which is then passed to write_to_file
[19:56:23] abyx: has joined #ruby
[19:56:33] darix: majuscule: there is an env var too
[19:57:07] darix: majuscule: export NOKOGIRI_USE_SYSTEM_LIBRARIES=1
[19:57:11] skade: has joined #ruby
[19:57:33] rcvalle: has joined #ruby
[19:57:46] lemur: has joined #ruby
[19:58:02] norc: gizmore, that test makes perfect sense. ;-)
[19:58:17] Thav: has left #ruby: ("blaa")
[19:58:26] norc: predictable because a predictable seed is used.
[19:58:30] tristanp_: has joined #ruby
[19:58:40] shadoi: has joined #ruby
[19:59:24] gizmore: norc: that´s what i´m testing
[19:59:57] zeroDi: has joined #ruby
[20:00:15] Nawn: has joined #ruby
[20:00:22] miah: has joined #ruby
[20:01:11] Xeago: has joined #ruby
[20:01:24] cdg: has joined #ruby
[20:01:25] tristanp: has joined #ruby
[20:01:33] dangerousdave: has joined #ruby
[20:02:39] Junaos: has joined #ruby
[20:03:35] Liothen: has joined #ruby
[20:03:40] shevy: it's random - and predictable!
[20:03:43] Liothen: has joined #ruby
[20:03:58] zeroDi: has joined #ruby
[20:04:28] kenichi: has joined #ruby
[20:04:58] sudoubuntu: has joined #ruby
[20:05:30] _stu_: has joined #ruby
[20:05:57] yuung_: has joined #ruby
[20:07:08] Infra-Red: has joined #ruby
[20:08:28] codezomb: has joined #ruby
[20:09:15] gizmore: shevy: i am still working on IRC RPG ... and of course random is crucial for an rpg
[20:09:43] gizmore: shevy: that´s the rpg server: https://www.youtube.com/watch?v=7n8LNxGbZbs
[20:10:09] imperator: has left #ruby: ("Leaving")
[20:11:50] rcvalle: has joined #ruby
[20:12:40] Sou|cutter: has joined #ruby
[20:12:59] Begi: has joined #ruby
[20:13:02] majuscule: has joined #ruby
[20:13:06] papercode: has joined #ruby
[20:13:13] jdm: has joined #ruby
[20:13:21] shevy: that reminds me of the marble piano
[20:14:28] workmad3: has joined #ruby
[20:15:37] bmn: has joined #ruby
[20:15:38] gizmore: ricer4 bot is the 4th ruby version of my irc bot :)
[20:16:25] gizmore: it speaks netcat,websockets,irc,libpurple and tty
[20:18:09] infernix: has joined #ruby
[20:18:13] mr_oh: don't really get it
[20:18:44] BrunoSaboia: has joined #ruby
[20:19:07] Begi1: has joined #ruby
[20:19:20] gizmore: mr_oh: me?
[20:19:42] mr_oh: No. The puts thing with writing to file
[20:19:51] gizmore: mr_oh: which line?
[20:20:53] ekinmur: has joined #ruby
[20:20:57] mr_oh: In my gist? Line 36... and the write to file on line 124
[20:22:13] abyx: has joined #ruby
[20:23:08] rcvalle: has joined #ruby
[20:23:32] gheegh: has joined #ruby
[20:23:56] mr_oh: Or maybe it is writing it all, but the last items overwrite the previous text
[20:25:17] shevy: have you tried append mode?
[20:25:58] weaksauce: mr_oh puts returns nil and prints to stdout not to a file stream
[20:26:30] mr_oh: yeah but it emits the text that I can feed to write
[20:27:13] Shidash: has joined #ruby
[20:27:29] polyidus: has joined #ruby
[20:27:39] ur5us: has joined #ruby
[20:28:07] quakephil: has joined #ruby
[20:28:45] quakephil: I have an object like this: [{"text"=>"test"}, {"text"=>"hello"}] what's the coolest way I can combine it to result in something like this: "test hello"
[20:28:49] quakephil: (ruby noob)
[20:28:55] dhollinger: has joined #ruby
[20:29:20] Ox0dea: >> [{"text"=>"test"}, {"text"=>"hello"}].map { |h| h['text'] } * ' ' # quakephil
[20:29:22] ruby[bot]: Ox0dea: # => "test hello" (https://eval.in/550107)
[20:29:31] quakephil: Nice... thanks
[20:32:17] mistermocha: has joined #ruby
[20:33:07] weaksauce: mr_oh f.puts is different than puts... f.puts is operating on the file stream that you opened up. the blank puts is operating on the stdout stream that is implicitly opened when you have a program running.
[20:33:22] OTORelic: >>puts "test"
[20:33:27] mistermocha: has joined #ruby
[20:33:33] OTORelic: >> puts "test"
[20:33:42] havenwood: OTORelic: #>> "test"
[20:33:42] weaksauce: >> x = puts("test"); x
[20:33:43] ruby[bot]: weaksauce: # => test ...check link for more (https://eval.in/550108)
[20:34:45] weaksauce: >> x = puts("test"); puts(x == nil)
[20:34:46] ruby[bot]: weaksauce: # => test ...check link for more (https://eval.in/550109)
[20:34:46] OTORelic: interesting little bot
[20:34:47] Infra-Red: has joined #ruby
[20:35:14] tomchapin: has joined #ruby
[20:35:22] metalic: has joined #ruby
[20:37:42] Es0teric: has joined #ruby
[20:38:12] retro2: has joined #ruby
[20:39:10] Ox0dea: weaksauce: More specifically: https://eval.in/550111
[20:39:31] itzjulien: has joined #ruby
[20:39:42] PedramT: has joined #ruby
[20:39:58] mdw: has joined #ruby
[20:40:03] SCHAAP137: has joined #ruby
[20:40:03] itzjulien: has left #ruby: ()
[20:40:24] mr_oh: I wanto to take the results as displayed in stdout and write it to file
[20:40:53] mdw: has joined #ruby
[20:41:03] Begi: has left #ruby: ()
[20:41:26] shevy: yeah that is easy
[20:41:37] _djbkd: has joined #ruby
[20:41:39] mdw: has joined #ruby
[20:41:40] weaksauce: you have to write to a file, build up the result as a string and write to a file or redirect your shell output into a file from the command line mr_oh
[20:41:58] duckpuppy: has joined #ruby
[20:42:09] shevy: http://stackoverflow.com/a/12903031/722915
[20:42:51] weaksauce: shevy mr_oh is already doing that but not for all outputs.
[20:43:11] PedramT: has joined #ruby
[20:44:26] ramfjord: has joined #ruby
[20:46:09] woodruffw: has joined #ruby
[20:46:25] stannard: has joined #ruby
[20:46:45] slappy16: has joined #ruby
[20:46:59] Saint_Philomena: has joined #ruby
[20:48:22] Xeago: has joined #ruby
[20:49:24] barajasfab: has joined #ruby
[20:50:08] postmodern: has joined #ruby
[20:50:58] baweaver: Saint_Philomena: welcome to #ruby
[20:52:14] Macaveli: has joined #ruby
[20:53:00] mistermocha: has joined #ruby
[20:53:19] yfeldblum: has joined #ruby
[20:53:46] rcvalle: has joined #ruby
[20:54:07] gnufied: has joined #ruby
[20:54:10] yos7ph: has joined #ruby
[20:54:10] blackmesa: has joined #ruby
[20:54:12] Saint_Philomena: baweaver thank you :)
[20:54:23] mistermocha: has joined #ruby
[20:56:21] aeterne: has joined #ruby
[20:57:11] skweek: has joined #ruby
[20:58:23] hakunin: has joined #ruby
[20:59:14] PedramT_: has joined #ruby
[21:00:35] dopie: has joined #ruby
[21:00:49] Giauzar: has joined #ruby
[21:00:49] PedramT__: has joined #ruby
[21:00:52] mr_oh: So i can make a variable -- a switch -- to go from stdout to the file ?
[21:02:35] Ox0dea: mr_oh: You just need to invoke #puts twice (once on $stdout and again on your log file) wherever you want to write to both streams.
[21:02:47] rcvalle: has joined #ruby
[21:02:59] mistermocha: has joined #ruby
[21:03:27] _djbkd: has joined #ruby
[21:04:38] Ox0dea: If you're doing that more than once, it's a pretty good candidate for method extraction.
[21:04:52] mistermocha: has joined #ruby
[21:06:38] yuung: has joined #ruby
[21:08:11] smathy: There's a tee gem too.
[21:08:15] PedramT: has joined #ruby
[21:09:13] kadoppe: has joined #ruby
[21:09:19] chipotle: has joined #ruby
[21:10:26] mr_oh: Seems like this should be simple...
[21:10:47] mr_oh: but I'm dumb!
[21:11:05] smathy: mr_oh, use the tee gem.
[21:11:10] Ox0dea: smathy pls
[21:11:50] smathy: I think it's a nice API actually.
[21:12:03] x77686d: has joined #ruby
[21:12:49] agit0: has joined #ruby
[21:14:12] jdm: has joined #ruby
[21:15:36] nettoweb: has joined #ruby
[21:15:37] rkazak: has joined #ruby
[21:16:44] _mak: has joined #ruby
[21:17:11] _mak: is it possible to require a gem only if the file is being executed on linux:
[21:17:54] infernix: has joined #ruby
[21:18:40] ramfjord: has joined #ruby
[21:19:48] Ox0dea: _mak: `require 'foo' if RUBY_PLATFORM[/linux/]` or some such.
[21:19:55] swills: has joined #ruby
[21:21:07] VeryBewitching: You know, I still haven't been able to get Ruby working well on a Windows box.
[21:21:28] shevy: I used to just throw in the rubyinstaller
[21:21:31] _mak: Ox0dea: thanks!
[21:21:35] shevy: even ruby-gtk worked on it
[21:21:38] Ox0dea: _mak: Sure thing.
[21:21:42] _mak: ruby works fine on windows for me
[21:21:51] Ox0dea: Famous last words.
[21:22:10] stannard: has joined #ruby
[21:22:16] VeryBewitching: shevy: Last time I tried to get it running under Windows I was trying to get a Rails env on Windows; 5 hours and some pain later I gave up.
[21:22:50] nettoweb: has joined #ruby
[21:23:07] mistermocha: has joined #ruby
[21:23:32] stannard: has joined #ruby
[21:23:35] mr_oh: Got it. clunky, but I got it
[21:25:21] moeabdol: has joined #ruby
[21:25:25] skweek: has joined #ruby
[21:25:31] smathy: VeryBewitching, you're saying the expected thing as if it's unexpected.
[21:25:55] shevy: can't recall having tried rails but I found rails got increasingly more annoying to install and get running over the years, just that javascript addon extra step, that wasn't necessary in the older days
[21:25:59] VeryBewitching: smathy: I was following a HOWTO at the time :D
[21:26:14] VeryBewitching: I expected that someone else who got it working would benefit my situation at the time, it didn't
[21:26:32] smathy: VeryBewitching, :) Just might be better to save the announcements for if you ever DO get it to work on Windows.
[21:26:55] VeryBewitching: Nah, I use Windows for games exclusively these days.
[21:27:20] smathy: Windows has just never been a friendly software dev platform, unless its your target platform.
[21:27:37] VeryBewitching: That's some truth right there.
[21:27:52] kadoppe: has joined #ruby
[21:27:52] VeryBewitching: I don't even know how I'd compiled native extensions on Win64
[21:27:59] pawnbox: has joined #ruby
[21:28:08] VeryBewitching: Does the free version of VS include everything required for most gems?
[21:28:20] VeryBewitching: wrt to build environment
[21:29:03] mhoungbo: has joined #ruby
[21:29:57] smathy: VeryBewitching, no clue.
[21:30:30] camilasan: has joined #ruby
[21:37:21] polyidus: has joined #ruby
[21:39:41] BD8: has joined #ruby
[21:40:37] moeabdol: has joined #ruby
[21:40:55] ramfjord: has joined #ruby
[21:41:10] dunpeal: has joined #ruby
[21:41:42] jdm: has joined #ruby
[21:43:22] Xeago: has joined #ruby
[21:44:49] dunpeal: Hi. I want to render a dependency graph; i.e. which file requires which other files. How do I do that?
[21:45:19] chipotle: has joined #ruby
[21:48:53] jtoy: has joined #ruby
[21:53:58] Es0teric: has joined #ruby
[21:54:10] jtoy: has joined #ruby
[21:54:41] Es0teric: has joined #ruby
[21:54:43] VeryBewitching: dunpeal: This may help http://railroad.rubyforge.org/
[21:54:46] chouhoul_: has joined #ruby
[21:55:26] havenwood: dunpeal: bundle viz
[21:55:34] neanderslob_: has joined #ruby
[21:55:55] millerti: has joined #ruby
[21:56:09] havenwood: or hanmac wrote one, hmm where is it...
[21:56:09] dunpeal: VeryBewitching: thanks! exaxtly what I needed
[21:56:25] dunpeal: havenwood: bundle viz is just for bundle, right?
[21:56:56] workmad3: has joined #ruby
[21:57:02] sp4rrow: has joined #ruby
[21:57:04] havenwood: dunpeal: Rails apps ship with a Gemfile.
[21:57:54] havenwood: dunpeal: But yup, just for apps with Gemfiles.
[21:58:30] baweaver: has joined #ruby
[21:58:51] neanderslob: has joined #ruby
[21:59:59] VeryBewitching: bundle viz crashes for me.
[22:00:28] havenwood: VeryBewitching: it makes a gem_graph.png for me (the default)
[22:00:38] Cohedrin: has joined #ruby
[22:01:02] havenwood: or maybe crashing is the default and I have the exception :P
[22:01:58] VeryBewitching: Looks like it can't find GraphViz (though, the gem is installed, and so is ruby-graphviz)
[22:02:26] VeryBewitching: NameError: uninitialized constant GraphViz
[22:02:43] lemur: has joined #ruby
[22:02:47] Es0teric: has joined #ruby
[22:02:49] havenwood: VeryBewitching: Do you have the graphviz package installed with your package manager?
[22:02:56] i: has joined #ruby
[22:03:09] VeryBewitching: I use ruby-install/chruby and I installed both of those gems.
[22:03:10] polyidus: has joined #ruby
[22:03:18] dvinciguerra_: has joined #ruby
[22:03:25] _djbkd: has joined #ruby
[22:03:30] VeryBewitching: It's searching the correct gem path, too (so says the diagnostic output)
[22:03:30] havenwood: VeryBewitching: Like on OS X: brew install graphviz
[22:03:49] VeryBewitching: Oh, maybe not? But the gems installed, there's no native extensions?
[22:04:02] dopie: has joined #ruby
[22:04:11] VeryBewitching: And no I didn't, interesting.
[22:04:14] d0nn1e: has joined #ruby
[22:04:31] VeryBewitching: Nope, still crashes.
[22:05:17] VeryBewitching: (K)ubuntu 15.10
[22:05:48] mistermocha: has joined #ruby
[22:06:25] polyidus: has joined #ruby
[22:06:37] nettoweb: has joined #ruby
[22:08:02] VeryBewitching: RubyMine does that work for me though, luckily.
[22:08:22] Gasher: has joined #ruby
[22:08:26] jenrzzz_: has joined #ruby
[22:14:57] HouseMD: has joined #ruby
[22:15:27] HouseMD: has joined #ruby
[22:15:57] HouseMD: has joined #ruby
[22:16:28] HouseMD: has joined #ruby
[22:16:58] HouseMD: has joined #ruby
[22:17:37] pawnbox: has joined #ruby
[22:20:10] diegoviola: has joined #ruby
[22:20:26] postmodern: has joined #ruby
[22:22:57] trinaldi: has joined #ruby
[22:23:24] rake_db_migrate: has joined #ruby
[22:24:05] Spami: has joined #ruby
[22:24:46] baweaver: has joined #ruby
[22:25:04] rake_db__: has joined #ruby
[22:25:50] yohle: has joined #ruby
[22:25:50] cpup: has joined #ruby
[22:26:31] toretore: has joined #ruby
[22:27:10] kadoppe: has joined #ruby
[22:28:42] chipotle: has joined #ruby
[22:29:05] Madplatypus: has joined #ruby
[22:29:09] shmuli: has joined #ruby
[22:31:50] polyidus: has joined #ruby
[22:33:03] rake_db_migrate: has joined #ruby
[22:36:02] Spami: has joined #ruby
[22:37:35] Spami: has joined #ruby
[22:37:41] chouhoulis: has joined #ruby
[22:38:29] zenlot6: has joined #ruby
[22:42:31] mhoungbo: has joined #ruby
[22:42:41] BSaboia: has joined #ruby
[22:42:43] duckpuppy: has joined #ruby
[22:43:52] BSaboia: has joined #ruby
[22:44:55] moeabdol1: has joined #ruby
[22:47:23] pawnbox: has joined #ruby
[22:48:01] andywojo: has joined #ruby
[22:50:14] eljimbo: has joined #ruby
[22:50:40] chosen1_: has joined #ruby
[22:52:40] _djbkd: has joined #ruby
[22:52:44] Xeago: has joined #ruby
[22:58:56] kadoppe: has joined #ruby
[23:00:45] Kallis: has joined #ruby
[23:02:15] dunpeal: has joined #ruby
[23:02:48] diegoaguilar: has joined #ruby
[23:02:49] darkf: has joined #ruby
[23:03:50] bkxd: has joined #ruby
[23:04:01] mistermocha: has joined #ruby
[23:05:11] yohle: has joined #ruby
[23:06:18] IrishGringo: has joined #ruby
[23:06:18] polyidus: has joined #ruby
[23:07:46] freerobby: has joined #ruby
[23:07:51] nando293921: has joined #ruby
[23:08:05] tubuliferous: has joined #ruby
[23:10:42] gizless: has joined #ruby
[23:12:43] aegis3121: has joined #ruby
[23:15:52] rkazak: has joined #ruby
[23:17:32] pawnbox: has joined #ruby
[23:19:20] edwinvdgraaf: has joined #ruby
[23:19:26] jgt4: has joined #ruby
[23:22:06] rake_db_migrate: has joined #ruby
[23:22:28] GodFather: has joined #ruby
[23:25:48] chosen1: has joined #ruby
[23:29:49] irick: okay, so I know this is not a good solution, i'm going to refactor later, but I don't get anywhere near the correct values so... what am I missing here? http://pastebin.com/UnvpDr1L
[23:29:50] ruby[bot]: irick: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
[23:31:32] magikid: has joined #ruby
[23:32:53] sp4rrow: has joined #ruby
[23:33:24] Ikri: has joined #ruby
[23:37:48] iWaffles: has joined #ruby
[23:38:03] huyderman: has joined #ruby
[23:38:20] Ox0dea: irick: && and || don't work like that.
[23:38:40] pawnbox: has joined #ruby
[23:39:33] dfockler: has joined #ruby
[23:40:58] Ox0dea: You can't say `(1 && 2) < 3`; you have to say `1 < 3 && 2 < 3`.
[23:41:11] Ox0dea: >> [1, 2, 3].all? { |x| x < 4 } # Or do this.
[23:41:12] ruby[bot]: Ox0dea: # => true (https://eval.in/550128)
[23:41:39] aegis3121: has joined #ruby
[23:41:43] moei: has joined #ruby
[23:42:16] Vile`: has joined #ruby
[23:42:43] swills: has joined #ruby
[23:43:07] johnny56: has joined #ruby
[23:43:21] rkazak: has joined #ruby
[23:44:01] aegis3121: has joined #ruby
[23:44:54] zenspider: has joined #ruby
[23:45:55] _stu_: has joined #ruby
[23:49:03] kadoppe: has joined #ruby
[23:56:33] krobzaur_: has joined #ruby
[23:59:03] ur5us: has joined #ruby
[23:59:23] lemur: has joined #ruby
[23:59:47] karmatr0n: has joined #ruby