« Back to channel list

#ruby - 18 July 2017

« Back 1 day Forward 1 day »
[00:00:35] al2o3-cr: has joined #ruby
[00:01:36] brent__: has joined #ruby
[00:02:23] al2o3-cr: zenspider: apologies
[00:03:37] kkiero: has left #ruby: ()
[00:04:19] aaa: has joined #ruby
[00:07:36] quuxman: apparently I needed to add no_primary_key to every model that didn't have an id column
[00:07:41] Guest83: has joined #ruby
[00:11:22] runescape07rsps: has joined #ruby
[00:13:22] hotpancakes: has joined #ruby
[00:14:37] rohitpaulk: has joined #ruby
[00:20:31] milardov_: has joined #ruby
[00:22:45] al2o3-cr: quuxman: is this a rails ting?
[00:23:44] cagomez: has joined #ruby
[00:25:08] Guest83: has joined #ruby
[00:25:15] rkellermeyer: has joined #ruby
[00:25:50] al2o3-cr: >> %)RAILS IS AMAZING).gsub /\G/, ?*
[00:25:51] ruby[bot]: al2o3-cr: # => "*R*A*I*L*S* *I*S* *A*M*A*Z*I*N*G*" (https://eval.in/833686)
[00:26:29] phinxy: has joined #ruby
[00:26:36] phinxy: What is line 2. doing? http://ideone.com/jjQxJx
[00:26:45] dstrunk: has joined #ruby
[00:27:53] al2o3-cr: phinxy: what do you think it's doing?
[00:28:41] phinxy: DX is a dictionary where they key E is set to 1, W is set to -1 etc,
[00:29:07] phinxy: but E is defines as 4..
[00:29:17] phinxy: so.. DX[4] = 1 ?
[00:29:34] hotpancakes: has joined #ruby
[00:29:38] phinxy: This is my first encounter with Ruby
[00:30:12] al2o3-cr: phinxy: are you coming from python?
[00:30:20] infernix: has joined #ruby
[00:30:38] al2o3-cr: that is a Hash
[00:31:08] al2o3-cr: with key/value pairs just like dict
[00:31:23] quuxman: al2o3-cr: I'm using Sequel
[00:32:00] al2o3-cr: you've got 3 hashes
[00:32:55] al2o3-cr: phinxy: you can't index hashes, just like you cant index a dict
[00:33:42] al2o3-cr: array/list can be indexed
[00:34:19] al2o3-cr: quuxman: my bad :(
[00:35:32] jdawgaz: has joined #ruby
[00:36:31] al2o3-cr: phinxy: so basically you've got 4 constants and 3 hashes
[00:36:57] al2o3-cr: with consequent 4 key/value pairs
[00:39:41] al2o3-cr: phinxy: DX[E] = 1 ?
[00:40:10] phinxy: The fact that E is 4 does not matter?
[00:40:23] phinxy: It is used as a C #define?
[00:41:13] al2o3-cr: phinxy: of course
[00:41:37] hotpancakes: has joined #ruby
[00:42:35] al2o3-cr: so, you answered your own question
[00:45:27] al2o3-cr: phinxy: ruby hashes work exactly like a python dictionary works
[00:46:00] hotpancakes: has joined #ruby
[00:47:47] al2o3-cr: same if you do this in perl, lua etc...
[00:49:56] ansraliant: has joined #ruby
[00:52:04] brent__: has joined #ruby
[00:52:40] moei: has joined #ruby
[00:53:50] Tau: has joined #ruby
[00:54:36] jdawgaz: has joined #ruby
[00:56:28] centrx: has joined #ruby
[01:02:21] bkxd: has joined #ruby
[01:02:23] bkxd_: has joined #ruby
[01:02:36] umaaji: has joined #ruby
[01:03:17] rohitpaulk: has joined #ruby
[01:04:07] hutch34: has joined #ruby
[01:06:17] phinxy: al2o3-cr,
[01:06:21] al2o3-cr: consider this
[01:06:27] al2o3-cr: >> A,B,C=1,2,3; f={A: B, B: A, C: B}
[01:06:28] ruby[bot]: al2o3-cr: # => {:A=>2, :B=>1, :C=>2} (https://eval.in/833689)
[01:08:19] al2o3-cr: now, consider this
[01:08:21] phinxy: The 'A' is just a key and the dict does not know it came from 'A' object?
[01:08:29] al2o3-cr: >> A,B,C=1,2,3; f={A => B, B => A, C => B}
[01:08:30] ruby[bot]: al2o3-cr: # => {1=>2, 2=>1, 3=>2} (https://eval.in/833690)
[01:08:58] ReinH: has joined #ruby
[01:09:10] phinxy: now the key is set
[01:09:21] orgasm: has joined #ruby
[01:09:22] ReinH: Oh, when did #ruby-lang merge with #ruby?
[01:09:48] centrx: Last year sometime
[01:10:29] hotpancakes: has joined #ruby
[01:10:54] bruno-: has joined #ruby
[01:11:13] al2o3-cr: that's a pretty bad example tbh but ...
[01:12:17] patarr: has joined #ruby
[01:12:20] gj: has joined #ruby
[01:12:21] Tau: has joined #ruby
[01:16:10] hutch34: has joined #ruby
[01:17:07] al2o3-cr: phinxy: you know what a symbol is?
[01:18:25] ecuanaso: has joined #ruby
[01:22:34] jirido_: has left #ruby: ()
[01:23:29] rundor: has joined #ruby
[01:25:17] enterprisey: has joined #ruby
[01:28:25] mniip: has joined #ruby
[01:28:32] __Yiota: has joined #ruby
[01:29:22] Guest83: has joined #ruby
[01:30:44] matthewd: al2o3-cr: Exactly not the same if you do this in Perl, FWIW
[01:31:07] kculpis: has joined #ruby
[01:31:09] Azure: has joined #ruby
[01:31:45] hotpancakes: has joined #ruby
[01:31:47] jdawgaz: has joined #ruby
[01:32:28] al2o3-cr: matthewd: bullshit
[01:32:36] gizmore|2: has joined #ruby
[01:33:43] Guest83: has joined #ruby
[01:35:04] joelwallis: has joined #ruby
[01:35:50] matthewd: https://eval.in/private/12b6c517352223
[01:36:03] smulverine: has joined #ruby
[01:36:54] charliesome: has joined #ruby
[01:38:48] al2o3-cr: matthewd: and wtf that prove?
[01:39:53] al2o3-cr: that it interpolates
[01:40:44] phinxy: has joined #ruby
[01:41:06] matthewd: "of course" and "exactly the same" need some reasonably strong understanding of how the syntaxes differ
[01:41:21] astrobunny: has joined #ruby
[01:41:44] rundor: has joined #ruby
[01:42:15] al2o3-cr: matthewd: pretty sure i understand how syntaxes differ
[01:42:29] rundor: has joined #ruby
[01:42:31] tacoboy: has joined #ruby
[01:43:27] bronson: has joined #ruby
[01:45:31] matthewd: al2o3-cr: Sure. But that distinction may not be apparent to someone who's new, so let's not imply they're missing something obvious.
[01:45:34] aaa: has joined #ruby
[01:46:01] lacuna: has joined #ruby
[01:46:23] al2o3-cr: i'll just fuck off then
[01:47:32] hotpancakes: has joined #ruby
[01:49:29] rundor: has joined #ruby
[01:50:29] mim1k: has joined #ruby
[01:51:26] astrobunny: has joined #ruby
[01:51:31] milardovich: has joined #ruby
[01:51:48] d^sh: has joined #ruby
[01:56:14] jdawgaz: has joined #ruby
[01:57:04] jdawgaz: has joined #ruby
[01:59:41] apparition: has joined #ruby
[02:00:15] PorcoRex: has joined #ruby
[02:00:23] herbmillerjr: has joined #ruby
[02:00:24] PorcoRex: Evening Ruby.
[02:00:59] gothicsouth: has joined #ruby
[02:03:01] patarr: has joined #ruby
[02:04:46] facest: has joined #ruby
[02:05:28] cdg: has joined #ruby
[02:05:46] blznblzn2: has joined #ruby
[02:06:17] statelesscode_: has joined #ruby
[02:06:21] zzak_: has joined #ruby
[02:06:22] adambeynon_: has joined #ruby
[02:06:26] kculpis: has joined #ruby
[02:06:40] gwilkes_: has joined #ruby
[02:06:48] sonOfRa_: has joined #ruby
[02:07:03] chrisseaton_: has joined #ruby
[02:07:11] avdi_: has joined #ruby
[02:07:14] cstrahan_: has joined #ruby
[02:07:15] bove_: has joined #ruby
[02:07:17] danzilio_: has joined #ruby
[02:07:23] t-richards_: has joined #ruby
[02:07:25] bcavileer_: has joined #ruby
[02:07:28] yosafbridge`: has joined #ruby
[02:07:48] kireevco_: has joined #ruby
[02:07:48] boxrick1_: has joined #ruby
[02:08:01] pmarreck_: has joined #ruby
[02:08:20] discopatrick_: has joined #ruby
[02:08:28] jottr: has joined #ruby
[02:08:46] LyndsySimon_: has joined #ruby
[02:08:46] jaequery: has joined #ruby
[02:09:11] cyclonis_: has joined #ruby
[02:09:11] jzigmund_: has joined #ruby
[02:09:12] chloe____: has joined #ruby
[02:09:31] MasterNayru: has joined #ruby
[02:09:41] jaequery: hi guys, anyone happen to have a recommendation on a good book for a young kid (highschooler) wanting to become a web developer?
[02:09:42] alex```: has joined #ruby
[02:09:49] patarr: has joined #ruby
[02:09:51] devyn_: has joined #ruby
[02:10:08] jaequery: im not sure what would be a book appropriate for a high school kid
[02:10:13] RushPL: has joined #ruby
[02:10:44] moei: has joined #ruby
[02:10:59] __Yiota: has joined #ruby
[02:11:26] k1ltzman: has joined #ruby
[02:12:19] PorcoRex: jaequery, do you have any background in development? And in web development?
[02:12:20] matthewd_: has joined #ruby
[02:12:40] Scientz: has joined #ruby
[02:12:40] szulak_: has joined #ruby
[02:12:42] apeiros_: has joined #ruby
[02:12:46] gnoss_: has joined #ruby
[02:12:48] zachary1-: has joined #ruby
[02:12:49] dysfigur-: has joined #ruby
[02:12:51] cjk101010_: has joined #ruby
[02:12:52] justinmrkva_: has joined #ruby
[02:12:52] Archrove-: has joined #ruby
[02:12:55] timmow_: has joined #ruby
[02:13:27] jaequery: well, i been developing for over 13 years
[02:13:46] Tagami[m]1: has joined #ruby
[02:13:54] jaequery: but i dont know how to pick a good book for kids these days hehe
[02:14:12] armyriad: has joined #ruby
[02:14:12] troter__________: has joined #ruby
[02:14:14] sindork_: has joined #ruby
[02:14:26] zack6849: has joined #ruby
[02:14:26] zack6849: has joined #ruby
[02:14:28] vedu: has joined #ruby
[02:14:40] PorcoRex: This garbage collector is pretty extreme...
[02:14:48] octomancer: has joined #ruby
[02:15:34] alamar: has joined #ruby
[02:16:04] PorcoRex: jaequery, I assume you're looking for a Rails reference for webdev?
[02:16:10] TheBrayn: has joined #ruby
[02:16:30] PorcoRex: Maybe they can give you a better assesment in their channel.
[02:16:35] willymox: has joined #ruby
[02:17:11] kash: has joined #ruby
[02:17:12] runescape07rsps: has joined #ruby
[02:17:53] Jameser: has joined #ruby
[02:17:59] crayfishx: has joined #ruby
[02:18:01] charliesome: has joined #ruby
[02:18:18] jaequery: @porcorex: yea, but no response
[02:18:37] jaequery: is the irc channel dead these days? i haven't been on here in like 2 years
[02:18:48] PorcoRex: I'm not sure.
[02:18:53] jaequery: seems relatively too quiet
[02:18:56] bokayio: has joined #ruby
[02:19:11] PorcoRex: Not unlike this one.
[02:19:13] gremax: has joined #ruby
[02:19:13] nertzy: has joined #ruby
[02:19:13] Caius: has joined #ruby
[02:19:13] mistym: has joined #ruby
[02:19:24] PorcoRex: Anyways, what level are you looking for? Basic?
[02:19:49] Caius: has joined #ruby
[02:19:49] mistym: has joined #ruby
[02:20:17] ignarps: has joined #ruby
[02:20:23] apeiros: has joined #ruby
[02:22:34] mtkd: has joined #ruby
[02:22:48] qsx: has joined #ruby
[02:24:30] willardg: has joined #ruby
[02:25:45] willardg: has left #ruby: ()
[02:25:50] willardg: has joined #ruby
[02:26:05] willardg: Good evening!
[02:26:32] PorcoRex: willardg, hey.
[02:31:32] ElFerna: has joined #ruby
[02:32:33] jaequery: he knows basic HTML/CSS
[02:32:47] orgasm: has joined #ruby
[02:34:52] PorcoRex: jaequery, paid or free?
[02:35:00] jaequery: paid is fine
[02:36:33] PorcoRex: jaequery, well, you can buy this, but you can also read it online for free. I think it's a good starting point for Rails: https://www.railstutorial.org/book
[02:36:40] rundor: has joined #ruby
[02:36:42] jackjackdripper: has joined #ruby
[02:36:46] PorcoRex: Or at least it was way back when I originally read it.
[02:37:14] jackjackdripper: has joined #ruby
[02:41:39] mim1k: has joined #ruby
[02:41:49] shiranuidong: has joined #ruby
[02:41:57] jackjackdripper: has joined #ruby
[02:44:03] Bhootrk_: has joined #ruby
[02:44:29] bogdanteleaga: has joined #ruby
[02:44:30] z64: has joined #ruby
[02:44:58] ascarter: has joined #ruby
[02:46:17] Silthias: has joined #ruby
[02:47:41] jdawgaz: has joined #ruby
[02:48:18] hotpanca_: has joined #ruby
[02:48:50] astrobunny: has joined #ruby
[02:49:31] astrobunny: has joined #ruby
[02:49:56] ascarter_: has joined #ruby
[02:50:23] cdg: has joined #ruby
[02:52:55] jdawgaz: has joined #ruby
[02:56:11] daed: has joined #ruby
[02:57:18] rundor: has joined #ruby
[02:57:47] rundor: has joined #ruby
[02:58:04] duracrisis: has joined #ruby
[02:58:30] bogdanteleaga: has joined #ruby
[02:58:42] seitensei: has joined #ruby
[02:58:48] rundor: has joined #ruby
[02:58:49] dyyylan: has joined #ruby
[02:59:22] rundor: has joined #ruby
[03:00:01] z64: has joined #ruby
[03:00:12] rundor: has joined #ruby
[03:00:32] dennisvennink: has joined #ruby
[03:02:50] jackjackdripper: has joined #ruby
[03:04:34] orgasm: has joined #ruby
[03:06:29] emers2n: has joined #ruby
[03:06:54] biox: has joined #ruby
[03:07:57] jnollette: has joined #ruby
[03:09:29] jottr: has joined #ruby
[03:13:38] emers2n: I have a function in ruby which will return all the combinations of a string. For example "dog" => returns "god", "odg", "ogd", "dgo", "gdo"
[03:14:12] emers2n: My question is how the function can be modified to also return all n-1 letter combos (2 letter combos in this case)?
[03:14:19] emers2n: https://pastebin.com/raw/hF1FTf8x
[03:14:19] ruby[bot]: emers2n: 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
[03:15:43] PorcoRex: So all n combinations and all n - 1 combinations, but no n - 2 ones?
[03:16:37] emers2n: No, I'd like n-2, n-3, etc.
[03:17:06] havenwood: >> 'dogs'.chars.combination(3).map(&:join)
[03:17:11] ruby[bot]: havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[03:17:13] havenwood: >> 'dogs'.chars.combination(2).map(&:join)
[03:17:15] ruby[bot]: havenwood: # => ["do", "dg", "ds", "og", "os", "gs"] (https://eval.in/833729)
[03:18:25] PorcoRex: Yeah, you probably will want to iterate from length to 1 and build that array, then join it.
[03:18:58] emers2n: Yep, thank you very much havenwood and PorocoRexx. Much appreciated.
[03:19:16] znz_jp: has joined #ruby
[03:20:34] emers2n: Eh sorry spoke to soon
[03:20:41] emers2n: >> 'dog'.chars.combination(3).map(&:join)
[03:22:21] emers2n: would hopefully return "god", "odg", "gdo"
[03:26:13] PorcoRex: Try permutation instead of combination.
[03:26:34] hotpancakes: has joined #ruby
[03:27:14] iMadper: has joined #ruby
[03:28:35] emers2n: Thank you kindly, you're right PorocoRexx
[03:29:59] PorcoRex: No problem.
[03:31:35] hotpancakes: has joined #ruby
[03:37:08] Bhootrk_: has joined #ruby
[03:38:58] eckhardt: has joined #ruby
[03:39:41] Silthias1: has joined #ruby
[03:41:46] duderonomy: has joined #ruby
[03:42:41] high_fiver: has joined #ruby
[03:44:18] bronson: has joined #ruby
[03:45:11] milardovich: has joined #ruby
[03:50:50] gix: has joined #ruby
[03:51:16] kies: has joined #ruby
[03:54:32] milardovich: has joined #ruby
[03:56:43] astrobunny: has joined #ruby
[03:57:14] jdawgaz: has joined #ruby
[03:57:29] astrobun_: has joined #ruby
[04:02:50] elcontrastador: has joined #ruby
[04:02:50] bkxd: has joined #ruby
[04:02:52] bkxd_: has joined #ruby
[04:08:39] roamingdog: has joined #ruby
[04:10:31] jottr: has joined #ruby
[04:10:31] __Yiota: has joined #ruby
[04:13:18] ElFerna: has joined #ruby
[04:16:34] milardovich: has joined #ruby
[04:16:50] milardov_: has joined #ruby
[04:29:57] TvL2386_: has joined #ruby
[04:30:17] jdawgaz: has joined #ruby
[04:30:32] hotpancakes: has joined #ruby
[04:31:16] Guest83: has joined #ruby
[04:34:04] cadillac_: has joined #ruby
[04:37:23] hahuang65: has joined #ruby
[04:40:23] swills: has joined #ruby
[04:40:23] swills: has joined #ruby
[04:41:22] benlieb: has joined #ruby
[04:41:29] swills: has joined #ruby
[04:41:30] swills: has joined #ruby
[04:42:40] rohitpaulk: has joined #ruby
[04:46:42] patrontechnosoft: has joined #ruby
[04:48:20] zenspider: jaequery: if they're new to actually coding, back up and do chris pine's how to program book first
[04:48:37] zenspider: let them pick their own pace w/ it. pretty self directed
[04:49:39] mim1k: has joined #ruby
[04:52:02] zenspider: >> (1..3).map { |n| "dog".chars.permutation(n).map(&:join) }.flatten
[04:52:04] ruby[bot]: zenspider: # => ["d", "o", "g", "do", "dg", "od", "og", "gd", "go", "dog", "dgo", "odg", "ogd", "gdo", "god"] (https://eval.in/833766)
[04:52:18] zenspider: I always mess those up
[04:56:48] milardovich: has joined #ruby
[05:01:37] brent__: has joined #ruby
[05:02:14] sarmiena_: has joined #ruby
[05:07:16] swills: has joined #ruby
[05:07:17] swills: has joined #ruby
[05:07:36] patarr: has joined #ruby
[05:07:47] Rodya_: has joined #ruby
[05:08:24] mjolnird: has joined #ruby
[05:11:14] jottr: has joined #ruby
[05:11:45] Silthias: has joined #ruby
[05:12:15] aupadhye: has joined #ruby
[05:14:23] hightower2: has joined #ruby
[05:16:19] Bock: has joined #ruby
[05:17:30] jackjackdripper: has joined #ruby
[05:21:04] Silthias: has joined #ruby
[05:21:43] jackjackdripper: has joined #ruby
[05:24:36] gothicsouth: has joined #ruby
[05:27:11] hutch34: has joined #ruby
[05:28:05] jdawgaz: has joined #ruby
[05:28:47] enterprisey: has joined #ruby
[05:32:34] uZiel: has joined #ruby
[05:33:09] BSAlb: has joined #ruby
[05:41:22] jaruga: has joined #ruby
[05:45:13] ahrs: has joined #ruby
[05:45:37] bronson: has joined #ruby
[05:48:12] anisha: has joined #ruby
[05:48:16] orgasm: has joined #ruby
[05:51:01] astrobunny: has joined #ruby
[05:53:59] astrobun_: has joined #ruby
[05:54:32] benlieb: has joined #ruby
[05:55:40] charliesome: has joined #ruby
[05:56:01] astrobunny: has joined #ruby
[05:59:46] hotpancakes: has joined #ruby
[06:03:03] jnollette: has joined #ruby
[06:03:43] morfin: can i somehow build miniruby with debug symbols?
[06:03:51] morfin: i want to trace down segfault
[06:12:16] jottr: has joined #ruby
[06:12:23] morfin: objspace_xmalloc was able to cause memory leak?
[06:13:13] morfin: seems like i have same issue as some guy had way before this started crashing
[06:13:18] Silthias: has joined #ruby
[06:13:36] morfin: but he had memory leak in objspace_xmalloc in gc.c
[06:20:02] morfin: http://paste.ubuntu.com/25117027/
[06:20:31] Guest83: has joined #ruby
[06:20:45] morfin: i guess it's parser calling ruby_xmalloc2 which calls objspace_xmalloc
[06:24:32] Mortomes|Work: has joined #ruby
[06:26:38] renchan_: has joined #ruby
[06:29:49] TomyWork: has joined #ruby
[06:30:18] rohitpaulk: has joined #ruby
[06:32:22] BSab: has joined #ruby
[06:33:49] renchan: has joined #ruby
[06:34:31] milardovich: has joined #ruby
[06:35:56] BSaboia: has joined #ruby
[06:38:27] BSAlb: has joined #ruby
[06:39:45] hahuang65: has joined #ruby
[06:41:50] TomyWork: has joined #ruby
[06:43:13] ddffg: has joined #ruby
[06:48:41] Silthias: has joined #ruby
[06:53:24] ricer2: has joined #ruby
[06:55:19] djbkd: has joined #ruby
[06:56:15] ClarkeZhu_: has joined #ruby
[06:57:47] morfin: anybody is familiar wiht Ruby internals?
[06:58:30] morfin: if i understand correctly some parsing code autogenerated from parse.y
[07:00:45] duderonomy: has joined #ruby
[07:02:14] dminuoso: morfin: Yes.
[07:02:47] dminuoso: morfin: parse.y containts both the lexer and the bison code, that bison transforms into a LR(1) parser.
[07:03:33] morfin: http://paste.ubuntu.com/25117027/
[07:03:59] smulverine: has joined #ruby
[07:04:00] morfin: that's what i get - i think parser somewhere allocate wrong number of bytes and that cause memory corruption
[07:04:30] dminuoso: morfin: Im just seeing a stack trace. Why is execution halted?
[07:05:06] morfin: because it does not execute after malloc_printerr
[07:05:26] morfin: it call abort()
[07:05:29] astrobun_: has joined #ruby
[07:05:40] morfin: https://github.com/lattera/glibc/blob/master/malloc/malloc.c#L3431
[07:05:45] morfin: this is where i fall
[07:06:38] dminuoso: morfin: Let me rephrase.
[07:06:47] dminuoso: Did you get a SIGSEGV?
[07:06:48] astrobun_: has joined #ruby
[07:06:55] Silthias1: has joined #ruby
[07:07:22] dminuoso: morfin: Do you have a ruby testcase for this?
[07:07:26] ski7777: has joined #ruby
[07:07:39] morfin: hmm there is a problem
[07:07:49] astrobun_: has joined #ruby
[07:07:54] dminuoso: morfin: This should not happen, it's doubtful there is a bug in the parser for many reasons.
[07:08:12] morfin: but where then?
[07:08:21] patarr: has joined #ruby
[07:08:35] morfin: basically it fails when i build ruby 2.3.4(miniruby crash)
[07:08:48] morfin: dminuoso, look
[07:09:17] morfin: local_tbl_gen call buf = ALLOC_N(ID, cnt + 1);
[07:09:21] dminuoso: morfin: A SIGABRT is a strong indication some unrelated part over/underflowed a buffer.
[07:09:26] dminuoso: morfin: You miss the point.
[07:09:48] morfin: wait a second
[07:10:02] morfin: thats what i got /tmp/ruby-build.20170718110227.24026/ruby-2.3.0/lib/fileutils.rb:1747: [BUG] Segmentation fault at 0xfffffffffffffff9
[07:10:22] mark_66: has joined #ruby
[07:10:44] dminuoso: morfin: I thought your processes was SIGABRT'ed
[07:11:34] morfin: make -f enc.mk V="0" \
[07:11:34] morfin: RUBY="./miniruby -I./lib -I. -I.ext/common " MINIRUBY="./miniruby -I./lib -I. -I.ext/common " \
[07:11:34] morfin: -n enc there is last thing i see before crash
[07:11:44] morfin: when make -n
[07:12:15] dminuoso: morfin: So let's start all over again. miniruby is crashing right?
[07:12:29] hotpancakes: has joined #ruby
[07:12:41] morfin: but it use same code as Ruby as i see
[07:12:43] dminuoso: morfin: Please gist the full and complete output of the stacktrce.
[07:12:53] dminuoso: Well, everything actually
[07:13:00] jottr: has joined #ruby
[07:13:34] ClarkeZhu_: hi anyone can speak Chinase?
[07:13:35] dminuoso: morfin: But the parser is the one part in Ruby that has trivial code. Bison is unlikely to be buggy, and the semantic actions are just trivial node building operations that are not buggy.
[07:14:02] morfin: well, i see there is huge tree
[07:14:26] dminuoso: morfin: Just gist the entire output from the moment things go wrong.
[07:17:41] RahulT: has joined #ruby
[07:18:42] morfin: http://paste.ubuntu.com/25117240/
[07:18:53] morfin: that's what i see when run make
[07:20:10] morfin: i am sure something is wrong with that local_tbl_gen
[07:21:22] mim1k: has joined #ruby
[07:21:25] dminuoso: morfin: Mmm, it does seem like malloc metadata got corrupted.
[07:21:50] morfin: that's what i say
[07:22:01] dminuoso: morfin: No way to tell how that happened without running asan or valgrind.
[07:22:11] dminuoso: The error is not in the stack trace.
[07:22:36] morfin: but it started exploding after upgrading to newer GCC
[07:23:03] dminuoso: morfin: Newer GCC versions apply more aggressive optimizations, that can suddenly trigger different UB behavior
[07:24:14] Silthias: has joined #ruby
[07:26:57] dminuoso: Just hope it's not an aliasing bug, because those are near impossible to track down even with instrumentation. :-)
[07:27:58] morfin: basically i see there is memory being allocated then copied
[07:28:03] morfin: then loop goes
[07:28:23] morfin: i want to check one thing
[07:29:39] morfin: dminuoso, i found out it crash exactly on this line: buf = ALLOC_N(ID, cnt + 1);
[07:30:04] dminuoso: morfin: Again, the error is somewhere else.
[07:30:14] morfin: why you think so?
[07:30:16] dminuoso: morfin: By the time that line of code is reached, the damage has already been done. Which is why you need valgrind.
[07:30:19] jaruga: has joined #ruby
[07:30:21] dminuoso: morfin: Because the crash happens deep inside malloc.
[07:30:56] dminuoso: morfin: when you do a malloc(1) in C you get a pointer. However, in reality you get more than 1 accessible byte.
[07:31:39] morfin: well, i know you can write outside of allocated memory
[07:31:46] morfin: until the moment
[07:31:55] dminuoso: morfin: Well, outside that allocated memory malloc keeps internal metadata.
[07:31:56] morfin: crap i see now
[07:32:05] morfin: there is chunks
[07:32:09] dminuoso: morfin: And if some process overwrites that metadata, it will blow up the next time you call free or malloc.
[07:32:29] dminuoso: morfin: Which is why you need instrumentation like asan or valgrind to find the spot where a program tries to access "invalid memory"
[07:34:06] morfin: how do i track down command
[07:34:30] mikolaj9: has joined #ruby
[07:34:31] morfin: make -n give some incorrect command
[07:35:09] dminuoso: morfin: either compile miniruby with -fsanitize-address or run with valgrind. you will need to disable optimizations in both cases.
[07:35:21] dminuoso: Err -fsanitize=address
[07:35:22] morfin: that's why i need exact command
[07:35:28] dminuoso: morfin: Google.
[07:35:30] andikr: has joined #ruby
[07:35:46] bigkevmcd: has joined #ruby
[07:35:54] rundor: has joined #ruby
[07:36:16] morfin: with other command i got segfault at 0x00000000000000
[07:36:56] mikolaj9: what is mini ruby?
[07:37:03] dminuoso: morfin: You need to compile miniruby with that.
[07:37:12] dminuoso: mikolaj9: Ruby uses Ruby in order to compile itself.
[07:37:14] morfin: i already ran with valgrind
[07:37:27] aufi: has joined #ruby
[07:37:38] morfin: there was tonns of complains about gc
[07:37:38] vali: has joined #ruby
[07:37:38] dminuoso: mikolaj9: So in order to bootstrap, Ruby first compiles a miniature version of itself called Miniruby, which is then used for the rest of the build process.
[07:37:50] mikolaj9: miniruby != mruby || mrubyc
[07:37:56] dminuoso: mikolaj9: Right.
[07:38:10] dminuoso: mikolaj9: miniruby is just an internal thing during the build process.
[07:38:38] nicoulaj: has joined #ruby
[07:39:11] morfin: dminuoso, just 70346 erros)
[07:39:47] dminuoso: morfin: That's quite normal for small bugs.
[07:39:50] morfin: http://paste.ubuntu.com/25117308/
[07:40:02] morfin: there is lots of not critical things
[07:40:41] morfin: ==451== Address 0x6aacfe8 is 8 bytes inside a block of size 272 free'd
[07:41:44] milardovich: has joined #ruby
[07:41:59] morfin: not sure such things are safe
[07:42:31] xall: has joined #ruby
[07:45:09] livcd: There was this article that Ruby is used differently in Japan than in West but it was not very specific about how. Does anyone know more ?
[07:46:29] bronson: has joined #ruby
[07:48:39] morfin: ==451== Invalid read of size 8 again in local_id_gen
[07:48:56] morfin: but before there is bunch of different calls
[07:50:38] mikecmpbll: has joined #ruby
[07:51:36] mikolaj9: dminuoso can I show a microcode from ruby or mruby?
[07:53:41] mikolaj9: for example i woul like to get program in fuby and show microcode (meybe store it in file)
[07:54:16] mikolaj9: and run it with ruby code (vm in ruby?)
[07:54:22] mikolaj9: it is simple?
[07:55:20] vali: has joined #ruby
[07:55:22] valentin: has joined #ruby
[07:56:52] morfin: not sure where could be a reason for that?
[07:57:26] bkxd: has joined #ruby
[07:57:40] bkxd_: has joined #ruby
[07:57:54] mikolaj9: please look at mrubyc this project is interesting but very complicated
[07:58:12] mikolaj9: I would like to undestand how using microcode.
[07:58:18] dminuoso: mikolaj9: No, the VMs are incompatible from another.
[07:58:37] mikolaj9: next i thing embeding microcode to small device like as arduino
[07:59:05] mikolaj9: mrubyc read a mruby microcode
[07:59:12] morfin: dminuoso, can it be optimized out code like this: "if (p < heap_pages_lomem || p > heap_pages_himem) return FALSE;"?
[07:59:21] mikolaj9: and translate to small program
[07:59:44] mikolaj9: meybe for didactic , using it but to ruby code
[08:00:11] dminuoso: mikolaj9: Technically optimizations can create false positives (though they are rare)
[08:00:23] dminuoso: Be sure to compile with -O0 to rule that out.
[08:00:23] morfin: wrong guy
[08:00:28] dminuoso: morfin: Indeed.
[08:00:42] morfin: i suspect optimizer can optimize out something
[08:00:58] morfin: because there is many records related to GC
[08:01:00] dminuoso: morfin: Well optimizations create false negatives for sure.
[08:01:17] mikolaj9: dminuoso: this will be only for didactic, undestand how run vm in ruby
[08:01:45] mikolaj9: or in lua or perl ;-)
[08:02:55] mikolaj9: dminuoso: Can You help me?
[08:04:17] dminuoso: morfin: Basically what valgrind does, is take the assembly output from our compiler and together with debug symbols and the original source code disassemble, insert instrumentation, reassembly and run on the CPU. So it does not care how aggressively optimized the code is.
[08:04:40] dminuoso: The fact that it can in rare cases produce false positives is because of a performance optimization.
[08:04:50] InfinityFye: has joined #ruby
[08:04:51] lpapp: has joined #ruby
[08:04:57] lpapp: hi, what is the ruby version of this? python3 -u -c 'for i in range(20):print("HAPPY NEW YEAR!!!","/o\\"[::1-2*(i%2)],end="\r\n"[i==19])or sum(range(int(1e7)))'
[08:05:10] dminuoso: (And valgrind does this on-the-fly, so it's basically a JIT compiler)
[08:05:24] dminuoso: Or a JIT recompiler if you want. :P
[08:05:34] dminuoso: lpapp: Describe in words what that does.
[08:05:44] lpapp: ah, you cannot run it.
[08:05:55] dminuoso: lpapp: I can, but that's besides the point.
[08:06:16] lpapp: it changes HAPPY NEW YEAR!!! \o/ and HAPPY NEW YEAR!!! /o\ a couple of times (20).
[08:06:25] lpapp: on the same line on the console.
[08:06:57] lpapp: if you understand perl better: perl -MTime::HiRes=sleep -we '$|++; my @x = ("\\", "o", "/"); for (1..20) { print "HAPPY NEW YEAR!!! ", @x,"\r"; sleep 0.2; @x = reverse @x; }; print "\n";' :-)
[08:07:16] dminuoso: lpapp: No I want you to technically describe what your goal is.
[08:07:24] lpapp: 09:06 < lpapp> it changes HAPPY NEW YEAR!!! \o/ and HAPPY NEW YEAR!!! /o\ a couple of times (20).
[08:07:27] lpapp: 09:06 < lpapp> on the same line on the console.
[08:07:42] morfin: dminuoso, with -O0 build
[08:07:57] dminuoso: morfin: Then those reports are valid.
[08:08:09] dminuoso: morfin: Probably most boil down to just 2-3 bugs.
[08:08:12] dminuoso: Or maybe even 1.
[08:10:06] antgel: has joined #ruby
[08:10:31] morfin: i really suspect it's 1984
[08:12:09] dminuoso: morfin: Can you try and reproduce with 2.3.4?
[08:12:56] havenwood: lpapp: ruby -e 'animation = %w[\o/ /o\\].cycle; 20.times { print "lpapp #{animation.next}\r"; sleep 1 }'
[08:13:45] jottr: has joined #ruby
[08:13:55] dminuoso: havenwood: Can you also give me a sed script to replace my antd components with their material-ui react component equivalents?
[08:14:03] hutch34: has joined #ruby
[08:14:20] mikolaj9: I'm looking for peaple who knows how bytecode working on mruby or ruby
[08:14:30] havenwood: ACTION mutters something about rehydrating the dom and backs away slowly
[08:14:51] lpapp: havenwood: oops, I used a different approach print + \r
[08:14:52] dminuoso: Well. I do have hydration going on.. so you're quite close!
[08:15:06] dminuoso: Though its redux that gets hydrated ;o
[08:15:11] lpapp: havenwood: oh, you used the same thing, very nice.
[08:16:39] dminuoso: morfin: btw be sure to explicitly run miniruby in 2.3 with valgrind too (it's possible that code changes hide the UB and not cause a crash)
[08:16:44] lpapp: havenwood: thank you
[08:16:55] dminuoso: mikolaj9: What questions do you have?
[08:18:09] morfin: same result )
[08:18:37] dminuoso: morfin: File a bug report I'd say.
[08:18:41] rohitpaulk: has joined #ruby
[08:18:53] mikolaj9: dminuoso: Very simple ;-) how storing all bytecode and run it
[08:18:57] hotpancakes: has joined #ruby
[08:19:05] morfin: i think there was one already
[08:19:08] dminuoso: &ri RubyVM::InstructionSequence
[08:19:08] `derpy: http://ruby-doc.org/core-2.4.1/RubyVM/InstructionSequence.html
[08:19:26] dminuoso: morfin: ^- that is the current interface to run bytecode explicitly
[08:19:41] mikolaj9: for example 'puts 2+3.0' convert to bytecode and how run it in ruby
[08:19:41] dminuoso: load_from_binary should be of particular interest to you.
[08:20:12] ltem: has joined #ruby
[08:20:34] dminuoso: mikolaj9: Look at the documentation I showed you.
[08:20:45] dminuoso: You basically construct an ISeq object, and then you can serialize it with to_binary
[08:20:52] dminuoso: You can either explicitly compile code, or from a file
[08:21:03] anisha: has joined #ruby
[08:21:10] dminuoso: >> RubyVM::InstructionSequece.compile('puts 2+3.0').to_binary
[08:21:12] ruby[bot]: dminuoso: # => uninitialized constant RubyVM::InstructionSequece ...check link for more (https://eval.in/833800)
[08:21:15] mikolaj9: dminuoso: he he documentation is very complicated
[08:21:17] dminuoso: >> RubyVM::InstructionSequence.compile('puts 2+3.0').to_binary
[08:21:18] ruby[bot]: dminuoso: # => "YARB\x02\x00\x00\x00\x03\x00\x00\x00\xA8\x01\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x0 ...check link for more (https://eval.in/833801)
[08:21:33] dminuoso: mikolaj9: If that is too complicated for you, perhaps you shouldn't be doing this at all.
[08:21:53] mikolaj9: dminuoso: ok, and how read binary and run it? can You show me?
[08:21:59] dminuoso: mikolaj9: Look at the documentation.
[08:22:32] astrobunny: has joined #ruby
[08:23:17] mikolaj9: where is documentation about bytecode?
[08:23:51] dminuoso: mikolaj9: Use the source, luke.
[08:24:00] mikolaj9: dminuoso: how run dissasem (p = proc { num = 1 + 2 }
[08:24:00] mikolaj9: puts RubyVM::InstructionSequence.disasm(p)
[08:24:14] dionysus69: has joined #ruby
[08:24:55] mikolaj9: dminuoso: he he, this is not answer. I can send to You what i create in C. Can You help me ?
[08:25:09] matled: has joined #ruby
[08:27:13] cagomez: has joined #ruby
[08:28:06] Bish: can i somehow change ruby default .to_s format for date iso8601?
[08:28:10] ferr: has joined #ruby
[08:28:12] Bish: would it be dangerous?
[08:30:08] aufi: has joined #ruby
[08:30:08] dminuoso: Bish: You mean so that the default output format for Date#to_s is iso8601?
[08:30:33] dminuoso: I would say any code that relies on the specific format deserves to break.
[08:30:34] morfin: 2.4.0 do not compile as well
[08:30:45] dminuoso: morfin: Test against 2.4.1, not 2.4.0
[08:31:08] dminuoso: morfin: Sometimes there are changes in the newest version, that have not been backported to older rubys yet.
[08:31:22] postmodern_: has joined #ruby
[08:31:24] Bish: so i just monkeypatch Date#to_s to iso8601?
[08:32:11] lpapp: has left #ruby: ()
[08:32:20] dminuoso: Bish: here's the thing.. Date#to_s already prints the date in iso8601 format..
[08:32:53] astrobun_: has joined #ruby
[08:33:01] dminuoso: >> puts Time.now.to_date.to_s
[08:33:03] ruby[bot]: dminuoso: # => undefined method `to_date' for 2017-07-18 08:32:59 +0000:Time ...check link for more (https://eval.in/833808)
[08:33:04] Bish: i mean Time then i guess
[08:33:19] morfin: GCC 7.1 is disaster
[08:33:30] dminuoso: Bish: irb(main):002:0> Time.now.to_s => "2017-07-18 10:33:15 +0200"
[08:33:46] dminuoso: morfin: Not necessarily.
[08:35:30] dminuoso: morfin: There were lots of changes in the optimizers, it's a lot more aggressive.
[08:36:18] Bish: ? if i monkeypatch time the whole class disappears
[08:36:19] dminuoso: Though valgrind would have uncovered those bugs still, my guess is miniruby is rarely run with valgrind.. :-)
[08:36:31] dminuoso: Bish: No, why would it?
[08:36:54] Bish: oh, i created one in my namespace
[08:37:01] dminuoso: Bish: No you didn't.
[08:37:09] Bish: wel, yes?
[08:37:15] dminuoso: >> class Time; end; puts Time.now
[08:37:16] ruby[bot]: dminuoso: # => 2017-07-18 08:37:13 +0000 ...check link for more (https://eval.in/833809)
[08:37:19] mikecmpbll: anyone? https://github.com/pmq20/ruby-compiler
[08:37:38] dminuoso: mikecmpbll: Interesting!
[08:37:43] Bish: well, i did module xyz;class Time..; and didnt notice
[08:38:08] dminuoso: Bish: Well you shouldn't be reopening Time anyway.
[08:38:14] dminuoso: Just create a module, and prepend it into Time. :P
[08:38:33] dminuoso: Perhaps using refinements
[08:38:45] dminuoso: Bish: The thing that confuses me is why you think you need this anyway?
[08:38:56] dminuoso: Bish: It outputs iso8601 for me all across. Is it possible you have some quirky locale?
[08:39:12] Bish: actually i dont mean to_s, i mean to_json
[08:39:19] Bish: my webapp communicates with my ruby app
[08:39:30] Bish: for all dates i have iso8601, which worked great so far
[08:39:39] lxsameer: has joined #ruby
[08:39:41] Bish: BUT: i have json fields in my database
[08:39:49] Bish: and ruby tends to shove its on format in there
[08:40:07] Bish: so in the end, it doesnt even matter
[08:40:24] Bish: so in the end, my webapp gets ruby date format, whatever that is called
[08:40:34] Bish: damn the json guys for not adding a date type
[08:40:38] hahuang65: has joined #ruby
[08:41:08] Beams: has joined #ruby
[08:44:40] morfin: at least 1 working version )
[08:44:47] dminuoso: Bish: so before I poke more, please make up your mind _what_ you are trying to change.
[08:45:04] dminuoso: First it was Date#to_s, then it was Time#to_s, now it's Time#to_json..
[08:45:13] dminuoso: I'm not convinced you know what you want.
[08:46:17] dminuoso: >> Time.now.to_json
[08:46:18] ruby[bot]: dminuoso: # => undefined method `to_json' for 2017-07-18 08:46:15 +0000:Time ...check link for more (https://eval.in/833810)
[08:46:24] dminuoso: >> require 'json'; Time.now.to_json
[08:46:25] ruby[bot]: dminuoso: # => "\"2017-07-18 08:46:21 +0000\"" (https://eval.in/833812)
[08:46:30] dminuoso: Still ISO 8601.
[08:46:50] dminuoso: Now Im convined you dont know what you want.
[08:46:56] xerx: has joined #ruby
[08:47:37] aufi: has joined #ruby
[08:49:33] milardovich: has joined #ruby
[08:49:59] stoffus: has joined #ruby
[08:53:42] kkiero: has joined #ruby
[08:54:00] morfin: dminuoso, how usually fight with that negative optimizations?
[08:54:06] kkiero: has left #ruby: ()
[08:54:12] morfin: *fighting
[08:54:27] aupadhye: has joined #ruby
[08:54:31] dminuoso: morfin: What is a negative optimization?
[08:54:51] morfin: like one broke my malloc metadata
[08:55:02] Bish: dminuoso: ? thats not iso8601
[08:55:31] workmad3: has joined #ruby
[08:55:31] Bish: thats weirdy ruby syntax
[08:57:06] dminuoso: Bish: The default format is rfc2822 I think
[08:57:07] morfin: can be something like 20170718T135521+0000
[08:57:22] dminuoso: Or.. no. That is different too
[09:00:41] jdawgaz: has joined #ruby
[09:02:06] brent__: has joined #ruby
[09:06:39] TheBrayn: Sometimes during the installation of a gem native extensions are built, is there a way to specify additional options like parallel jobs?
[09:07:14] sarbs: has joined #ruby
[09:09:17] patarr: has joined #ruby
[09:11:25] veex: has joined #ruby
[09:14:32] jottr: has joined #ruby
[09:16:03] coenraad: has joined #ruby
[09:16:08] belmoussaoui: has joined #ruby
[09:19:12] rohitpaulk: has joined #ruby
[09:21:47] romankapitonov: has joined #ruby
[09:22:13] morfin: so isthere ways to fight such optimizations?
[09:22:19] morfin: volatile?
[09:23:13] vali: has joined #ruby
[09:25:14] zenspider: TheBrayn: It depends on the gem ... `gem help install` for more (generic) info
[09:25:23] hotpancakes: has joined #ruby
[09:25:43] matthewd: morfin: C optimizations rely on undefined behaviour. "Fight" them by not writing code that uses undefined behaviour.
[09:26:23] ur5us: has joined #ruby
[09:26:33] marr: has joined #ruby
[09:28:23] Serpent7776: has joined #ruby
[09:29:24] Bish: dminuoso: as i said, ruby weirdoformat
[09:30:01] dminuoso: morfin: Optimizations don't break code. Using undefined behavior does.
[09:30:29] dminuoso: morfin: What happens if you compile with an older version of GCC and valgrind?
[09:31:39] dminuoso: Or alternatively recompile miniruby with -fno-strict-aliasing
[09:38:41] djbkd: has joined #ruby
[09:42:09] hahuang65: has joined #ruby
[09:45:35] morfin: so you say there was an UB
[09:45:45] morfin: i suspected that
[09:46:00] morfin: it was silentrly working before
[09:46:02] cseder: has joined #ruby
[09:47:25] bronson: has joined #ruby
[09:53:41] dminuoso: morfin: Accessing invalid memory is UB.
[09:54:11] dminuoso: morfin: The fact that it was working fine before means nothing. It just happened that GCC hid the bug.
[09:54:37] dminuoso: morfin: Check my previous recommendations. Especially the last one should be interesting
[09:57:52] morfin: i know it's UB
[09:59:04] mfaeh: has joined #ruby
[10:00:02] morfin: interesting that clang was working nice with that
[10:03:42] pwned: has joined #ruby
[10:04:26] tvw: has joined #ruby
[10:04:52] rohitpaulk: has joined #ruby
[10:06:46] patarr: has joined #ruby
[10:07:11] Arahael: morfin: Why couldn't it? "working nice" is is perfectly valid UB.
[10:08:21] mim1k: has joined #ruby
[10:12:24] leah2: has joined #ruby
[10:14:05] gregf_: has joined #ruby
[10:15:18] jottr: has joined #ruby
[10:15:39] encounter_ekamba: has joined #ruby
[10:16:43] xall: has joined #ruby
[10:17:51] mim1k: has joined #ruby
[10:18:55] dminuoso: morfin: And did you run it through valgrind?
[10:19:37] dminuoso: With a clang-built miniruby
[10:23:41] dminuoso: ACTION stabs arahael with an obsolete set of FIXINCLUDES
[10:23:46] vali: has joined #ruby
[10:24:37] Arahael: dminuoso: What?
[10:25:35] dminuoso: That's what I thought
[10:29:36] hotpancakes: has joined #ruby
[10:30:18] tvw: has joined #ruby
[10:38:27] x0F: has joined #ruby
[10:39:18] mim1k: has joined #ruby
[10:39:48] hutch34: has joined #ruby
[10:40:14] Francy: has joined #ruby
[10:41:49] djbkd: has joined #ruby
[10:42:53] rgtk: has joined #ruby
[10:53:07] nanoz: has joined #ruby
[10:57:37] Ishido: has joined #ruby
[11:01:55] mfaeh: has joined #ruby
[11:08:48] synget: has joined #ruby
[11:13:41] ShekharReddy: has joined #ruby
[11:14:22] mim1k: has joined #ruby
[11:16:03] jottr: has joined #ruby
[11:23:19] sarbs: has joined #ruby
[11:26:14] renchan: has joined #ruby
[11:27:00] tvw: has joined #ruby
[11:27:58] psychicist__: has joined #ruby
[11:31:30] psychicist__: has joined #ruby
[11:33:59] hotpancakes: has joined #ruby
[11:34:46] Guest83: has joined #ruby
[11:36:40] ldnunes: has joined #ruby
[11:42:58] hahuang65: has joined #ruby
[11:45:48] Silthias: has joined #ruby
[11:48:12] Silthias1: has joined #ruby
[11:49:19] bronson: has joined #ruby
[11:51:49] kkiero: has joined #ruby
[11:54:36] leah2_: has joined #ruby
[11:54:57] ldnunes: has joined #ruby
[11:58:22] charliesome: has joined #ruby
[11:59:52] Jameser: has joined #ruby
[12:00:02] swills: has joined #ruby
[12:00:52] mfaeh: has joined #ruby
[12:02:01] brent__: has joined #ruby
[12:02:11] belmoussaoui: has joined #ruby
[12:04:21] rgtk: has joined #ruby
[12:05:35] Jameser: has joined #ruby
[12:06:07] cagomez: has joined #ruby
[12:06:12] belmoussaoui: has joined #ruby
[12:08:21] Voxxit: has joined #ruby
[12:09:21] morfin: dminuoso, i can try)
[12:13:25] sepp2k: has joined #ruby
[12:13:27] mfaeh: has joined #ruby
[12:15:10] aufi: has joined #ruby
[12:17:02] jottr: has joined #ruby
[12:17:26] naprimer: has joined #ruby
[12:18:32] belmoussaoui: has joined #ruby
[12:18:40] ElFerna: has joined #ruby
[12:23:12] im0nde: has joined #ruby
[12:27:43] Sylario: has joined #ruby
[12:30:45] kkiero_: has joined #ruby
[12:31:37] synthroid: has joined #ruby
[12:32:18] splitshot: has joined #ruby
[12:32:20] mfaeh: has joined #ruby
[12:32:33] InfinityFye: has joined #ruby
[12:37:05] jottr: has joined #ruby
[12:37:32] yeticry_: has joined #ruby
[12:38:21] high_fiver: has joined #ruby
[12:39:15] hotpancakes: has joined #ruby
[12:42:11] millerti: has joined #ruby
[12:44:03] belmoussaoui: has joined #ruby
[12:44:54] ecuanaso: has joined #ruby
[12:45:42] lacuna: has joined #ruby
[12:49:58] jphase: has joined #ruby
[12:51:25] rfoust: has joined #ruby
[12:52:17] hutch34: has joined #ruby
[12:52:38] Jameser: has joined #ruby
[12:53:55] tacoboy: has joined #ruby
[12:54:42] gr33n7007h: has joined #ruby
[12:55:12] pabloz: has joined #ruby
[12:55:22] ledestin: has joined #ruby
[12:58:39] pabloz: has left #ruby: ()
[12:58:57] morfin: i was so wrong
[12:59:13] morfin: it compiled with GCC 4.9 from ports
[13:07:51] doublemalt_: has joined #ruby
[13:07:53] phinxy: has joined #ruby
[13:08:26] rgtk: has joined #ruby
[13:10:11] shadeslayer: has joined #ruby
[13:10:27] belmoussaoui: has joined #ruby
[13:13:28] bruno-: has joined #ruby
[13:14:37] Tempesta: has joined #ruby
[13:15:35] aupadhye: has joined #ruby
[13:17:56] jaruga: has joined #ruby
[13:18:12] rohitpaulk: has joined #ruby
[13:18:41] ElFerna: has joined #ruby
[13:18:58] dionysus69: has joined #ruby
[13:25:25] milardovich: has joined #ruby
[13:29:33] apparition47: has joined #ruby
[13:29:33] doublemalt_: has joined #ruby
[13:33:04] DLSteve: has joined #ruby
[13:39:18] antgel: has joined #ruby
[13:40:02] mfaeh: has joined #ruby
[13:40:32] Tau: has joined #ruby
[13:41:00] rgtk: has joined #ruby
[13:42:12] mikecmpb_: has joined #ruby
[13:43:51] hahuang65: has joined #ruby
[13:48:03] Shimmy_: has joined #ruby
[13:50:00] dasher00: has joined #ruby
[13:50:31] bronson: has joined #ruby
[13:51:35] rohitpaulk: has joined #ruby
[13:51:42] im0nde: has joined #ruby
[13:52:39] morfin: dminuoso, yes i checked .comment
[13:52:43] ElFerna: has joined #ruby
[13:53:09] morfin: it says GCC 4.9.4 from ports
[13:55:11] chouhoulis: has joined #ruby
[13:56:00] morfin: he-he with clang 3.8(pretty old) works
[13:59:30] chouhoulis: has joined #ruby
[14:00:31] hotpancakes: has joined #ruby
[14:05:22] Jameser: has joined #ruby
[14:07:10] hotpancakes: has joined #ruby
[14:07:53] uZiel: has joined #ruby
[14:08:15] Jameser: has joined #ruby
[14:10:07] mim1k: has joined #ruby
[14:10:37] mfaeh: has joined #ruby
[14:11:14] rohitpaulk: has joined #ruby
[14:11:50] jdawgaz: has joined #ruby
[14:13:52] polishdub: has joined #ruby
[14:16:22] Rapture: has joined #ruby
[14:17:02] Jameser: has joined #ruby
[14:17:47] Teemo: has joined #ruby
[14:18:24] mfaeh: has joined #ruby
[14:20:56] jdawgaz: has joined #ruby
[14:20:58] oleo: has joined #ruby
[14:26:57] theunraveler: has joined #ruby
[14:30:53] high_fiver: has joined #ruby
[14:33:15] mikecmpbll: has joined #ruby
[14:33:41] ElFerna: has joined #ruby
[14:34:13] rfoust: has joined #ruby
[14:35:32] kculpis: has joined #ruby
[14:38:56] jphase: has joined #ruby
[14:39:09] AxelAlex: has joined #ruby
[14:39:37] take5: has joined #ruby
[14:39:59] chouhoulis: has joined #ruby
[14:40:09] shiranuidong: has joined #ruby
[14:41:44] brent__: has joined #ruby
[14:43:14] impermanence: has joined #ruby
[14:44:47] impermanence: I know that in the core and stdlib methods an exclamation mark after a method name means it's a mutator...but I'm looking at some code online and the author has put an exclamation point after a method they wrote and it isn't a mutator. Is there some significance to this exclamation point?
[14:44:54] impermanence: puts 'whatever'
[14:47:17] Papierkorb: impermanence: Nothing to do with mutations, the bang just indicates that this method may do something unexpected, and advises the user to look up in the docs.
[14:48:04] impermanence: oh, you mean in general?
[14:48:20] impermanence: huh. contrary...
[14:48:25] yokel: has joined #ruby
[14:48:39] impermanence: afk for ten minutes
[14:48:40] Nightmare: has joined #ruby
[14:48:41] __Yiota: has joined #ruby
[14:48:53] impermanence: has joined #ruby
[14:49:39] im0nde: has joined #ruby
[14:51:32] j0bk: has joined #ruby
[14:53:30] Jameser: has joined #ruby
[14:56:17] konsolebox: has joined #ruby
[14:56:36] impermanence: has joined #ruby
[14:58:31] danguita: has joined #ruby
[14:59:39] hotpancakes: has joined #ruby
[14:59:54] lacuna: has joined #ruby
[15:00:21] ElFerna: has joined #ruby
[15:03:01] rippa: has joined #ruby
[15:03:43] bkxd: has joined #ruby
[15:03:46] bkxd_: has joined #ruby
[15:04:06] coenraad: has joined #ruby
[15:04:21] rundor: has joined #ruby
[15:07:56] jackjackdripper: has joined #ruby
[15:08:09] Teemo: has left #ruby: ()
[15:09:08] bkxd: has joined #ruby
[15:09:10] bkxd_: has joined #ruby
[15:09:12] millerti: has joined #ruby
[15:09:17] mfaeh: has joined #ruby
[15:09:27] insane_tesla: has joined #ruby
[15:09:56] insane_tesla: Omg... Where can I find support for 1.8.7
[15:10:01] patarr: has joined #ruby
[15:11:30] Guest83: has joined #ruby
[15:13:00] mtkd: has joined #ruby
[15:13:31] konsolebox: has joined #ruby
[15:14:16] mfaeh: has joined #ruby
[15:15:17] synthroid: has joined #ruby
[15:16:51] Bish: Orxata_: 2006 called, they want their interpreter back
[15:19:46] ar1a: has joined #ruby
[15:20:50] ski7777: has joined #ruby
[15:22:29] leah2: Orxata_: what do you need?
[15:22:42] enterprisey: has joined #ruby
[15:23:32] morfin: interesting
[15:23:47] nowhere_man: has joined #ruby
[15:23:55] morfin: miniruby do not explode with clang 3.8
[15:24:01] morfin: i gotta valgrinbd it
[15:24:19] mikecmpbll: has joined #ruby
[15:24:59] morfin: ==31343== ERROR SUMMARY: 1685 errors from 29 contexts (suppressed: 0 from 0)
[15:25:23] morfin: same problems
[15:25:27] Guest83: has joined #ruby
[15:25:29] morfin: wrong read of 8 bytes
[15:25:42] morfin: Use of uninitialised value of size 8 etc etc
[15:25:46] morfin: lots OF UB
[15:26:32] chouhoulis: has joined #ruby
[15:27:09] cagomez: has joined #ruby
[15:28:37] VladGh: has joined #ruby
[15:32:50] rfoust: has joined #ruby
[15:33:53] rgtk: has joined #ruby
[15:34:41] Silthias: has joined #ruby
[15:34:50] cagomez: has joined #ruby
[15:35:05] hotpancakes: has joined #ruby
[15:35:21] ski7777: has joined #ruby
[15:36:13] ski4x7: has joined #ruby
[15:36:28] Silthias1: has joined #ruby
[15:37:11] ElFerna: has joined #ruby
[15:37:46] brent__: has joined #ruby
[15:39:33] coenraad: has joined #ruby
[15:42:37] rohitpaulk: has joined #ruby
[15:43:59] Silthias: has joined #ruby
[15:44:56] hahuang65: has joined #ruby
[15:45:15] jdawgaz: has joined #ruby
[15:46:21] high_fiver: has joined #ruby
[15:49:34] SK_: has joined #ruby
[15:51:09] bronson: has joined #ruby
[15:52:09] SK_: Can someone help me with this github application -> https://github.com/jmopr/job-hunter
[15:52:37] SK_: I was able to run bundle install on Linux but now I do not know what to do. My output -> https://paste.ubuntu.com/25036134/
[15:52:53] Rodya_: has joined #ruby
[15:53:39] ski7777: has joined #ruby
[15:55:28] Mon_Ouie: has joined #ruby
[15:56:39] hotpancakes: has joined #ruby
[15:57:46] bruno-: has joined #ruby
[15:58:11] amclain: has joined #ruby
[15:58:50] ski7777: has joined #ruby
[15:59:26] dviola: has joined #ruby
[16:01:35] cdg: has joined #ruby
[16:02:10] Guest83: has joined #ruby
[16:02:30] mkaito: sk_: looks like a bug in capybara. they need to `require 'timeout'`, most likely.
[16:02:59] mkaito: either that, or there's a conflict somewhere
[16:03:10] mkaito: something is providing 'timeout' that does not provide Timeout::Error.
[16:03:26] ski7777: has joined #ruby
[16:03:33] ahrs: has joined #ruby
[16:03:48] cdg_: has joined #ruby
[16:06:51] cagomez: if I group Foo's by name, what's a good variable name for it? 'foos_grouped_by_name'?
[16:10:03] ski7777: has joined #ruby
[16:10:11] take5: cagomez, without anymore context, I might go with "foos_by_name"
[16:12:07] chouhoulis: has joined #ruby
[16:15:01] Kyle__: has joined #ruby
[16:15:22] Kyle__: If you're on an older box, is there a way to install gems with whatever the latest version will work is?
[16:15:35] gothicsouth: has joined #ruby
[16:15:49] Kyle__: ie: gem install rubocop on an older centos server complains that rake require ruby version 1.9.3, instead of just grabbing the latest this ancient ruby can use
[16:17:09] cagomez: I need to check if my Foo objects, each with an array of Bars, have a certain bar id. I'll be building a hash with keys `myhash[[foo.name, bar.id]]` with values set to True. Should I just use a set?
[16:17:32] mkaito: kyle__: you can install specific versions of a gem, but you'll need to see which one will work yourself.
[16:18:17] cagomez: looks like set implementations are based on a hash with values set to true? https://www.ruby-forum.com/topic/98113
[16:18:43] gusrub: has joined #ruby
[16:19:21] ldnunes: has joined #ruby
[16:20:10] SK_: I am not on an older linux os. I am able to install the gems but for some reason it still gives me that output?
[16:20:25] pecan: has joined #ruby
[16:21:08] Kyle__: sk_: Do you have multiple versions of ruby installed? IIRC each one will have it's own 'gem' script, and its own set of gems.
[16:21:21] pmden: has joined #ruby
[16:21:38] pmden: has joined #ruby
[16:21:42] SK_: No I do not
[16:21:43] Kyle__: On most distros 'gem' is a symlink to whatever is the system default, and gem1.8 gem1.9 gem2.0 etc are the ones for specific versions.
[16:21:48] Kyle__: I dunno then.
[16:21:52] pmden: has left #ruby: ()
[16:22:14] SK_: let me see one guy yesterday said he was able to figure it out but left no instructions
[16:22:28] ascarter: has joined #ruby
[16:22:35] ansraliant: has joined #ruby
[16:22:48] SK_: He said -> Locally, when I run Delayed::Job.enqueue TestJob.new, it is automatically deleted by delayed job, and not executed (DELETE FROM "delayed_jobs" ...)
[16:22:55] SK_: But when I run this type of job via #delay DelayableTasks.new.delay.tmp and AFTERWARDS run Delayed::Job.enqueue TestJob.new, it runs fine.
[16:23:11] SK_: there was a dependency needed in the job that was failing autoload in dev that dependency is loaded in the first job
[16:23:24] duderonomy: has joined #ruby
[16:25:08] mwlang: has joined #ruby
[16:25:24] SK_: Were any of you guys able to get it to run on your OS? If any of you were able to figure it out on those I would rather do that.
[16:25:25] cagomez: if I add objects to a Set, are copies of the objects added to the set? What happens if I add objects to a Set and mutate them outside? Will calling `member?` not find the object in the set?
[16:25:30] br0d1n: has joined #ruby
[16:25:43] cagomez: or will mutating the object outside the Set also mutate the object inside the Set?
[16:26:04] SK_: I am not sure cagomez
[16:28:11] SK_: I do not own the code I am simply trying to figure out how to run it and use it
[16:31:40] _moep_: when I tried to run in my redmine dir: bundle install and it fetch everything. when I do bundle exec gem install unicorn I get this error: https://paste.debian.net/hidden/cc65ed70/
[16:33:27] ColeHub: has joined #ruby
[16:34:46] Ishido: has joined #ruby
[16:34:49] mwlang: _moep_: review contents of unicorn-5.3.0/gem_make.out to see what specifically failed
[16:36:21] mwlang: on second thought, re-reading the error chain, if I had to guess, you’re using bundle exec and the unicorn gem isn’t listed there.
[16:36:36] mwlang: “there” meaning the project’s Gemfile
[16:36:59] dionysus69: has joined #ruby
[16:37:07] Kyle__: has left #ruby: ("WeeChat 1.6")
[16:37:08] _moep_: mwlang: unicorn is listed in the gem.local file
[16:38:24] mwlang: _moep_: what’s the output of: bundle list | grep unicorn
[16:38:47] _moep_: could not found in sources
[16:39:06] _moep_: Could not find unicorn-5.3.0 in any of the sources
[16:39:47] mwlang: _moep_: yet, “bundle install” worked previously?
[16:40:33] _moep_: ok now unicorn is listed
[16:40:47] chouhoul_: has joined #ruby
[16:40:52] _moep_: so I dont have to do bundle exec gem install unicorn right?
[16:42:15] benlieb: has joined #ruby
[16:42:49] chouhoul_: has joined #ruby
[16:43:57] AxelAlex: has joined #ruby
[16:45:19] tvon: has joined #ruby
[16:50:49] mim1k: has joined #ruby
[16:53:32] mwlang: _moep_: no. bundle install does it for you
[16:54:32] milardovich: has joined #ruby
[16:55:46] lacuna: has joined #ruby
[16:57:22] nofxx: has joined #ruby
[16:58:37] jdawgaz: has joined #ruby
[16:59:06] gusrub: has joined #ruby
[16:59:32] _moep_: mwlang: ah ok thx
[16:59:58] Guest83: has joined #ruby
[17:03:14] cpruitt: has joined #ruby
[17:05:10] sha-7: has joined #ruby
[17:05:39] sha-7: Is there a way I can automatically log all the errors that get raised?
[17:06:32] hotpancakes: has joined #ruby
[17:08:37] Rodya_: has joined #ruby
[17:10:45] hahuang65: has joined #ruby
[17:11:52] ski4x7: has joined #ruby
[17:12:04] kspencer: I'm trying to conditionally either return a given string if it doesn't have a newline, or return only the string upto the first \n then cut the rest, but currently its just clearing out the line, I currently have 'some string'.lines[0].chomp!, but that kinda kills the line when it doesn't have a newline,so I'm trying to figure a really easy to do that
[17:12:21] synthroid: has joined #ruby
[17:12:58] kspencer: use case being commit messages
[17:14:52] ahrs: has joined #ruby
[17:15:03] hotpancakes: has joined #ruby
[17:15:53] pkmoore: has joined #ruby
[17:16:05] wilbert: has joined #ruby
[17:16:06] al2o3-cr: sha-7: you could take a look at tracepoint
[17:17:28] ascarter: has joined #ruby
[17:18:41] jdawgaz: has joined #ruby
[17:20:31] sarmiena_: has joined #ruby
[17:21:37] apeiros: kspencer: chomp if you want the return value, chomp! is only for when you want to mutate in-place.
[17:21:46] apeiros: many core bang! methods return nil if nothing changed.
[17:24:23] sgen: has joined #ruby
[17:27:49] milardovich: has joined #ruby
[17:29:50] kspencer: I see, I'll a change of that out then
[17:30:23] kies: has joined #ruby
[17:31:22] cagomez: has joined #ruby
[17:34:39] Orxata_: has joined #ruby
[17:35:56] mtkd: has joined #ruby
[17:45:28] high_fiver: has joined #ruby
[17:52:19] shinnya: has joined #ruby
[17:52:35] rohitpaulk: has joined #ruby
[17:52:47] bronson: has joined #ruby
[17:58:03] TomyLobo: has joined #ruby
[17:58:12] Aromn: has joined #ruby
[18:00:15] rundor: has joined #ruby
[18:00:54] hotpanca_: has joined #ruby
[18:01:14] rundor: has joined #ruby
[18:01:41] chmurifree: has joined #ruby
[18:01:50] rundor: has joined #ruby
[18:02:15] deep-book-gk_: has joined #ruby
[18:02:39] rundor: has joined #ruby
[18:03:24] rundor: has joined #ruby
[18:03:43] deep-book-gk_: has left #ruby: ()
[18:04:33] jenrzzz: has joined #ruby
[18:04:34] jenrzzz: has joined #ruby
[18:05:05] jackjackdripper: has joined #ruby
[18:05:50] nebiros: has joined #ruby
[18:05:56] benlieb_: has joined #ruby
[18:06:10] SeepingN: has joined #ruby
[18:08:54] benlieb: has joined #ruby
[18:11:22] ElFerna: has joined #ruby
[18:14:09] guymanndude: has joined #ruby
[18:14:55] guymanndude: hi, is there a way to both dump with YAML.dump && append to the same file, in one line?
[18:15:49] guymanndude: basically, I'm trying to get this down to a oneliner:
[18:15:52] guymanndude: content = YAML.dump(yml) content << "stuff"
[18:15:56] postmodern: has joined #ruby
[18:20:33] Papierkorb: `content << yml.to_yaml`
[18:21:19] vuoto: has joined #ruby
[18:21:42] Ishido: has joined #ruby
[18:21:51] benlieb: has joined #ruby
[18:22:03] jenrzzz: has joined #ruby
[18:22:03] jenrzzz: has joined #ruby
[18:22:30] cagomez: has joined #ruby
[18:23:03] cagomez: has joined #ruby
[18:23:17] Dimik: has joined #ruby
[18:24:04] guymanndude: Papierkorb: thanks, however that would still necessitate doing two lines to write to my content variable
[18:24:25] guymanndude: is there a way to do this in a oneliner? both dump the YAML to content, as well as a string?
[18:24:58] havenwood: guymanndude: content = yml.to_yaml << 'stuff'
[18:25:05] havenwood: guymanndude: But oneliners are overrated.
[18:25:24] havenwood: guymanndude: It's nicer to interpolate.
[18:25:42] havenwood: It saves a string allocation.
[18:25:51] guymanndude: havenwood: thanks! and I agree, but I am trying to appease rubocop...
[18:25:52] havenwood: guymanndude: content = "#{yml.to_yaml}stuff"
[18:26:04] havenwood: guymanndude: What angers the lings about that ^.
[18:26:06] ltem: has joined #ruby
[18:26:26] havenwood: guymanndude: Oh, you mean file or method or class length lints?
[18:27:01] guymanndude: havenwood: yeah kindof, apparently my "Assignment Branch Condition size for main is too high"
[18:27:13] havenwood: You might consider extracting methods.
[18:27:42] havenwood: for main? is this top level?
[18:27:44] guymanndude: I have, this is the last place I can possibly optimize
[18:27:52] guymanndude: to get a perfect score :)
[18:28:01] havenwood: guymanndude: Give an interpolation a go.
[18:28:07] guymanndude: thanks, I'll that
[18:29:58] mrgrieves: has joined #ruby
[18:32:15] guymanndude: havenwood: from 16.4/15 complexity to 16.31/15 ...
[18:32:29] havenwood: guymanndude: inching towards perfection
[18:33:24] camilasan: has joined #ruby
[18:33:33] guymanndude: haha yeah. I think this is the point I step back for a sanity check...code looked cleaner before this
[18:33:42] guymanndude: two lines are fine
[18:34:34] havenwood: guymanndude: time for acceptable complexity to be 17? ;-)
[18:34:51] guymanndude: I can live with 16.4 :)
[18:38:44] havenwood: guymanndude: Funny thing is the app I'm working on at the moment has it set to 17.
[18:39:01] havenwood: Metrics/PerceivedComplexity: Max: 17
[18:39:22] sha-7: has left #ruby: ()
[18:39:46] jdawgaz: has joined #ruby
[18:42:51] morfin: ok, i think i should look where is problem in that code
[18:44:01] morfin: because "it works" but GCC 7.1 just made a problem more obvious
[18:44:10] guymanndude: havenwood: naughty naughty
[18:45:11] cagomez: has joined #ruby
[18:45:51] __Yiota: has joined #ruby
[18:47:35] watersoul: has joined #ruby
[18:48:32] johnny56_: has joined #ruby
[18:50:37] romankapitonov: has joined #ruby
[18:51:40] mechanicles: has joined #ruby
[18:53:46] gothicsouth: has joined #ruby
[18:57:45] mtkd: has joined #ruby
[19:00:11] pkmoore: has joined #ruby
[19:00:24] wilbert: has joined #ruby
[19:01:01] jdawgaz: has joined #ruby
[19:03:03] dmtd: has joined #ruby
[19:03:38] psychicist__: has joined #ruby
[19:03:51] cagomez: has joined #ruby
[19:04:21] benlieb: has joined #ruby
[19:04:39] belmoussaoui: has joined #ruby
[19:11:03] Guest83: has joined #ruby
[19:13:58] sepp2k: has joined #ruby
[19:16:00] dasher00: has joined #ruby
[19:16:01] Renich: has joined #ruby
[19:16:31] theunrav_: has joined #ruby
[19:21:09] cagomez: has joined #ruby
[19:24:44] Tau: has joined #ruby
[19:24:48] skweek: has joined #ruby
[19:24:57] cagomez: how do I do a .find().group_by {} ? I get an error `NoMethodError: undefined method `call' for {:foo => "bar"}:Hash`
[19:26:02] tAn: has joined #ruby
[19:26:14] swills: has joined #ruby
[19:27:02] Guest83: has joined #ruby
[19:27:55] spiette: has joined #ruby
[19:30:24] tAn: has joined #ruby
[19:31:27] koldbrutality: has joined #ruby
[19:31:32] gusrub: has joined #ruby
[19:33:39] cagomez: has joined #ruby
[19:35:15] havenwood: cagomez: Show the real line of code?
[19:35:42] havenwood: I suspect `.()` version of `.call`.
[19:35:59] havenwood: >> -> n { n }.(42)
[19:36:04] ruby[bot]: havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[19:36:10] havenwood: >> -> n { n }.(42)
[19:36:16] ruby[bot]: havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[19:36:29] havenwood: ?cookie ruby[bot]
[19:36:30] ruby[bot]: ruby[bot]: here's your cookie: 🍪
[19:36:42] ElFerna: has joined #ruby
[19:38:09] t-recx: has joined #ruby
[19:38:09] cam27: has joined #ruby
[19:39:45] noizex: is there a way to exclude some gem if one group is present?
[19:39:55] hahuang65: has joined #ruby
[19:40:15] noizex: like, I have :development and :remote_debugging and I'd like to skip one gem in :development group if :remote_debugging is not disabled
[19:41:11] belmoussaoui: has joined #ruby
[19:46:27] ascarter: has joined #ruby
[19:49:13] cagomez: has joined #ruby
[19:52:29] belmoussaoui: has joined #ruby
[19:53:23] bronson: has joined #ruby
[19:53:37] _sfiguser: has joined #ruby
[19:56:29] cagomez: has joined #ruby
[20:01:58] emilkarl: has joined #ruby
[20:02:07] tAn: has joined #ruby
[20:02:08] lxsameer: has joined #ruby
[20:03:26] cagomez: has joined #ruby
[20:04:25] Guest83: has joined #ruby
[20:05:04] Rapture: has joined #ruby
[20:06:48] ElFerna: has joined #ruby
[20:09:24] Jayson_Virissimo: has joined #ruby
[20:09:43] workmad3: has joined #ruby
[20:18:35] doublemalt_: has joined #ruby
[20:19:39] nadir: has joined #ruby
[20:21:54] iceden|2: has joined #ruby
[20:22:23] benlieb: has joined #ruby
[20:23:56] cagomez: has joined #ruby
[20:26:11] HoierM: has joined #ruby
[20:29:55] Rodya_: has joined #ruby
[20:34:11] ElFerna: has joined #ruby
[20:34:41] Nicmavr: has joined #ruby
[20:36:52] rundor: has joined #ruby
[20:38:57] jdawgaz: has joined #ruby
[20:40:04] ur5us: has joined #ruby
[20:41:00] Guest89630: has joined #ruby
[20:42:36] rundor: has joined #ruby
[20:46:33] Fire-Dragon-DoL: hello, anyone with experience using net/imap can confirm that when fetching messages, the returned strings are always US-ASCII (which needs to be parsed later on)?
[20:48:14] ptx0: has joined #ruby
[20:50:02] jdawgaz: has joined #ruby
[20:50:22] mtkd: has joined #ruby
[20:51:48] canton7: Fire-Dragon-DoL, rfc3508 section 1.2 does indeed suggest that
[20:52:40] jdawgaz: has joined #ruby
[20:52:41] Fire-Dragon-DoL: canton7: thanks, I agree. I hope I'm not opening a can of worms :P
[20:54:56] ascarter_: has joined #ruby
[20:55:33] gusrub: has joined #ruby
[20:59:11] belmoussaoui_: has joined #ruby
[20:59:36] rundor: has joined #ruby
[20:59:58] millerti: has joined #ruby
[21:00:59] pwnd_nsfw: has joined #ruby
[21:03:10] mim1k: has joined #ruby
[21:05:37] ascarter_: has joined #ruby
[21:18:18] quobo: has joined #ruby
[21:18:18] hutch34: has joined #ruby
[21:20:06] hotpancakes: has joined #ruby
[21:23:28] gusrub: has joined #ruby
[21:27:57] milardovich: has joined #ruby
[21:28:43] tvon: has joined #ruby
[21:31:34] tAn: has joined #ruby
[21:31:58] jnollette: has joined #ruby
[21:32:28] Rodya_: has joined #ruby
[21:32:31] jdawgaz: has joined #ruby
[21:32:46] alex``: has joined #ruby
[21:33:14] tvon_: has joined #ruby
[21:35:05] Mon_Ouie: has joined #ruby
[21:35:08] Tau: has joined #ruby
[21:36:18] jdawgaz: has joined #ruby
[21:38:30] hotpancakes: has joined #ruby
[21:41:11] rundor: has joined #ruby
[21:41:49] hotpanca_: has joined #ruby
[21:43:53] Asher: has joined #ruby
[21:47:02] jackjackdripper1: has joined #ruby
[21:48:14] ElFerna: has joined #ruby
[21:52:05] kobain: has joined #ruby
[21:54:19] bronson: has joined #ruby
[21:55:27] BSaboia: has joined #ruby
[21:56:14] s2013: has joined #ruby
[21:57:47] rundor: has joined #ruby
[21:58:14] s2013: im trying to format a an array of hash.. something like [ {"name": "john", "city": "la"}, {"name": "mike", "city": "ny"}] into lets say [{"full_name": "john", "from": "la"}, {"full_name": "mike", "from": "ny"}]
[21:58:22] s2013: i can use map for that simple
[21:59:05] s2013: but what im confused about is that if lets say there was a field called age, but it wasnt available in every hash, how would i make sure that only age appears in the hash where there is age
[21:59:08] s2013: if that makes sense
[21:59:24] s2013: so {"name": "john", "city": "la"}, {"name": "mike", "city": "ny", "age": 20}] into lets say [{"full_name": "john", "from": "la", "age": 20}, {"full_name": "mike", "from": "ny"}]
[21:59:42] s2013: i can go through and remove all nil, etc but still
[22:01:32] jdawgaz: has joined #ruby
[22:02:51] cagomez: has joined #ruby
[22:04:47] gusrub: has joined #ruby
[22:06:58] havenwood: >> changes = {"name"=>"full_name", "city"=>"from"}; people.map { |person| person.map { |k, v| [changes[k] || k, v] }.to_h } # s2013
[22:06:59] ruby[bot]: havenwood: # => undefined local variable or method `people' for main:Object (NameError) ...check link for more (https://eval.in/834172)
[22:07:09] havenwood: #=> [{"full_name"=>"john", "from"=>"la"}, {"full_name"=>"mike", "from"=>"ny", "age"=>20}]
[22:07:25] s2013: yeah i have something similar to that
[22:07:56] havenwood: fetch is nicer than #[] with ||
[22:08:15] cagomez: has joined #ruby
[22:08:40] havenwood: changes.fetch(k, k)
[22:08:41] cagomez: has joined #ruby
[22:09:24] cagomez: has joined #ruby
[22:09:44] rundor: has joined #ruby
[22:10:07] cagomez: has joined #ruby
[22:11:24] Rodya_: has joined #ruby
[22:16:59] hahuang65: has joined #ruby
[22:21:47] ElFerna: has joined #ruby
[22:27:49] jdawgaz: has joined #ruby
[22:27:54] Rodya_: has joined #ruby
[22:28:37] cagomez: has joined #ruby
[22:29:39] cagomez: has joined #ruby
[22:31:00] dstrunk: has joined #ruby
[22:32:45] Guest83: has joined #ruby
[22:33:31] hahuang65: has joined #ruby
[22:33:31] rohitpaulk: has joined #ruby
[22:34:07] sleepee: has joined #ruby
[22:34:11] Lyubo1: has joined #ruby
[22:36:30] sepp2k: has joined #ruby
[22:42:42] BTRE: has joined #ruby
[22:43:26] hotpancakes: has joined #ruby
[22:45:00] ascarter: has joined #ruby
[22:45:44] ascarter_: has joined #ruby
[22:46:59] cagomez: has joined #ruby
[22:48:24] hkdsun: has joined #ruby
[22:54:32] milardovich: has joined #ruby
[22:57:16] charliesome: has joined #ruby
[23:01:00] aaa: has joined #ruby
[23:01:48] benlieb: has joined #ruby
[23:03:28] jdawgaz: has joined #ruby
[23:03:39] mim1k: has joined #ruby
[23:03:39] brian_penguin: has joined #ruby
[23:06:03] astrobunny: has joined #ruby
[23:07:12] impermanence: has joined #ruby
[23:08:11] rfoust: has joined #ruby
[23:09:21] tAn: has joined #ruby
[23:09:47] milardovich: has joined #ruby
[23:11:39] miah_: has joined #ruby
[23:13:16] patarr: Hi. I'm using a gem that 'require's a file that installs a Sidekiq middleware for me, and provides no facility of disabling it.
[23:13:19] patarr: How can I monkey patch this out?
[23:14:00] Guest83: has joined #ruby
[23:14:19] knechtrootrecht: has joined #ruby
[23:15:16] Radar: patarr: it would help if you mentioned which gem
[23:15:59] knechtrootrecht: has left #ruby: ()
[23:21:30] rohitpaulk: has left #ruby: ()
[23:23:19] landon_: has joined #ruby
[23:23:29] cseder: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[23:27:08] someuser: has joined #ruby
[23:29:06] Guest83: has joined #ruby
[23:30:03] RahulT: has joined #ruby
[23:31:02] alveric4: has joined #ruby
[23:32:35] cdg: has joined #ruby
[23:34:26] ruby[bot]: -b *!*@124.171.235.172$#ruby-banned
[23:37:31] ascarter: has joined #ruby
[23:37:54] patarr1: has joined #ruby
[23:44:42] charliesome: has joined #ruby
[23:47:03] cagomez: has joined #ruby
[23:54:40] cagomez: has joined #ruby
[23:54:53] dstrunk: has joined #ruby
[23:55:34] bronson: has joined #ruby
[23:55:56] jdawgaz: has joined #ruby
[23:56:46] jdawgaz: has joined #ruby
[23:57:28] belmoussaoui_: has joined #ruby
[23:57:31] jdawgaz: has joined #ruby
[23:58:03] gothicsouth: has joined #ruby
[23:59:44] jackjackdripper: has joined #ruby