« Back to channel list

#ruby - 20 June 2018

« Back 1 day Forward 1 day »
[00:00:39] havenwood: Eiam_: I recall it worked last I tried it. I'd suggest pinging the good folk in the #jruby channel.
[00:00:57] havenwood: Eiam_: What version of JRuby?
[00:01:02] Eiam_: oh its a different community? =/
[00:01:25] Eiam_: latest, 9.2.0.0
[00:01:29] havenwood: Eiam_: It's just a more specific subset of the community. The core devs hangout there.
[00:01:37] havenwood: They're often here too!
[00:01:49] shinnya: has joined #ruby
[00:01:54] Eiam_: im just ttrying to explore migrating from ruby to jruby
[00:02:01] dogweather: has joined #ruby
[00:02:03] havenwood: Eiam_: ah, neat
[00:02:23] OneNeptune: has joined #ruby
[00:03:27] havenwood: Eiam_: In my experience, if you say "JRuby" three times in any channel, headius will appear. :-D
[00:03:45] Eiam_: ill wait to9 gwt back to my desk
[00:04:44] havenwood: JRuby with invoke dynamic and graal seems really promising. The speed...
[00:08:49] cbz: has joined #ruby
[00:08:54] nowhere_man: has joined #ruby
[00:09:42] Eiam: okay, back
[00:12:46] Eiam: jruby jruby jruby!
[00:13:08] Eiam: havenwood: I'm just being selfish and trying to produce a product that fits through some of my pipelines easier (.jars)
[00:13:26] Eiam: there was nothing wrong with the MRI ruby I've used for a decade =p
[00:15:35] moei: has joined #ruby
[00:17:26] Guest58336: has joined #ruby
[00:21:53] OneNeptune: has joined #ruby
[00:24:51] StarSeed0000: has joined #ruby
[00:25:22] cagomez: has joined #ruby
[00:28:16] havenwood: Eiam: I forget sometimes that Clojure is just a jar. Neat you can just use it from JRuby: https://gist.github.com/havenwood/5654484
[00:32:26] Guest58336: has joined #ruby
[00:32:47] dogweather: has joined #ruby
[00:49:00] dar123: has joined #ruby
[00:54:10] SeepingN: has joined #ruby
[01:03:50] Eiam: havenwood: so some of my peers were uhm, convincing me that step 1 was to get me to use JRuby, step 2 was to get me to stop using Ruby and instead use Scala/Clojure or something else that just targets the JVM
[01:06:01] nythalcrow: has joined #ruby
[01:06:46] Eiam: I don't think I'm big data/enterprise-y enough to follow them onto that path, but ruby to jruby I think I'm alright with =p
[01:07:20] giraffe: has joined #ruby
[01:08:27] tpendragon: has joined #ruby
[01:08:43] jenrzzz_: has joined #ruby
[01:09:53] workmad3: has joined #ruby
[01:17:27] Guest58336: has joined #ruby
[01:23:00] orbyt_: has joined #ruby
[01:23:52] bmurt: has joined #ruby
[01:25:09] jrafanie: has joined #ruby
[01:27:29] Guest58336: has joined #ruby
[01:31:09] grilix: has joined #ruby
[01:31:15] Vingador: has joined #ruby
[01:32:08] bmurt: has joined #ruby
[01:42:54] white_lilies: has joined #ruby
[01:43:34] ElFerna: has joined #ruby
[01:50:07] gizmore|2: has joined #ruby
[02:02:53] dogweather: has joined #ruby
[02:04:50] cschneid: has joined #ruby
[02:10:16] konsolebox: has joined #ruby
[02:10:39] cschneid: has joined #ruby
[02:14:15] erlend: has joined #ruby
[02:14:35] chamar: has joined #ruby
[02:43:52] cschneid: has joined #ruby
[02:44:25] akaiiro: has joined #ruby
[02:49:03] herbmillerjr: has joined #ruby
[03:00:21] cadillac_: has joined #ruby
[03:04:27] dogweather: has joined #ruby
[03:05:05] cschneid: has joined #ruby
[03:08:53] Guest58336: has joined #ruby
[03:09:50] braincrash: has joined #ruby
[03:10:11] workmad3: has joined #ruby
[03:16:40] zenspider: rescue Support::AllExceptionsExceptOnesWeMustNotRescue => e
[03:16:44] zenspider: ACTION weeps
[03:24:08] kapil___: has joined #ruby
[03:26:49] sauvin: has joined #ruby
[03:27:06] shinnya: has joined #ruby
[03:31:49] MRd1: has joined #ruby
[03:33:57] roamingdog: has joined #ruby
[03:34:07] MRd1: Wellcome
[03:34:56] Nicmavr: has joined #ruby
[03:40:42] dogweather: has joined #ruby
[03:42:08] wontruefree: has joined #ruby
[03:43:37] cadillac_: has joined #ruby
[03:43:50] dreamthese: has joined #ruby
[03:45:40] mrsolo: has joined #ruby
[03:45:47] machty: has joined #ruby
[03:45:49] bove: has joined #ruby
[03:45:50] hsiktas: has joined #ruby
[03:45:51] ams__: has joined #ruby
[03:45:52] foamz: has joined #ruby
[03:46:02] yo61: has joined #ruby
[03:46:16] orbyt_: has joined #ruby
[03:46:18] surminus: has joined #ruby
[03:46:27] Lloyd: has joined #ruby
[03:46:28] epochwolf: has joined #ruby
[03:46:28] rann: has joined #ruby
[03:46:30] aarongodin: has joined #ruby
[03:46:35] DarkUnicorn: has joined #ruby
[03:46:36] jetpack_joe: has joined #ruby
[03:46:40] caw________: has joined #ruby
[03:46:40] kevinburke: has joined #ruby
[03:46:42] pmarreck: has joined #ruby
[03:46:43] JackMc: has joined #ruby
[03:46:45] kapil___: has joined #ruby
[03:46:54] justache: has joined #ruby
[03:47:34] Guest58336: has joined #ruby
[03:48:50] jnollette: has joined #ruby
[03:49:40] cschneid: has joined #ruby
[03:55:25] thinkpad: has joined #ruby
[03:55:28] tekk: has joined #ruby
[03:55:47] zenspider: daaamn https://gist.github.com/3d50b232a96c03314f9746b64c1a6569
[03:56:19] zenspider: the hoops I'm jumping through... even the code is roughly 1:10
[04:00:21] gix-: has joined #ruby
[04:02:26] __goodnight__: has joined #ruby
[04:09:17] cass_j: has left #ruby: ()
[04:09:48] tdy: has joined #ruby
[04:09:58] wontruefree: has joined #ruby
[04:14:44] akaiiro: has joined #ruby
[04:19:36] ciscam: has joined #ruby
[04:27:25] Guest58336: has joined #ruby
[04:27:51] RougeR: has joined #ruby
[04:29:31] ltd: has joined #ruby
[04:32:27] Guest58336: has joined #ruby
[04:36:22] cschneid: has joined #ruby
[04:36:31] darkhanb: has joined #ruby
[04:45:33] dogweather: has joined #ruby
[04:48:32] r29v: has joined #ruby
[04:51:27] r29v: has joined #ruby
[04:52:28] dogweather: has joined #ruby
[04:52:54] dogweather: has joined #ruby
[04:56:13] DTZUZO: has joined #ruby
[05:10:17] ur5us: has joined #ruby
[05:10:39] workmad3: has joined #ruby
[05:14:45] apeiros: has joined #ruby
[05:17:26] Guest58336: has joined #ruby
[05:21:44] podman: has joined #ruby
[05:21:47] andersh: has joined #ruby
[05:21:56] schleppel: has joined #ruby
[05:22:10] Lloyd: has joined #ruby
[05:22:21] DarkUnicorn: has joined #ruby
[05:22:47] darthThorik: has joined #ruby
[05:22:50] Flabbergazta_: has joined #ruby
[05:22:51] [diecast]: has joined #ruby
[05:23:04] koenrh: has joined #ruby
[05:23:05] andywojo: has joined #ruby
[05:23:12] HashNuke: has joined #ruby
[05:23:13] jxf: has joined #ruby
[05:23:20] lesce: has joined #ruby
[05:23:58] Eising: has joined #ruby
[05:24:07] colstrom: has joined #ruby
[05:24:16] Guest21194: has joined #ruby
[05:24:17] craysiii: has joined #ruby
[05:24:25] Mutsuhito: has joined #ruby
[05:24:26] Chew: has joined #ruby
[05:24:30] ircmaxell: has joined #ruby
[05:24:35] gmcintire: has joined #ruby
[05:24:40] maciuszek: has joined #ruby
[05:24:40] fury: has joined #ruby
[05:24:40] codepete: has joined #ruby
[05:24:45] umesh: has joined #ruby
[05:24:52] rjungemann: has joined #ruby
[05:25:01] justizin: has joined #ruby
[05:25:16] Fenhl: has joined #ruby
[05:25:40] KnownSyntax: has joined #ruby
[05:26:30] justache: has joined #ruby
[05:26:32] Guest74533_: has joined #ruby
[05:26:39] daxroc1: has joined #ruby
[05:26:41] unsymbol: has joined #ruby
[05:26:49] jmhmccr: has joined #ruby
[05:27:01] solidsnack: has joined #ruby
[05:27:16] kireevco_: has joined #ruby
[05:27:28] Guest58336: has joined #ruby
[05:27:41] afisher: has joined #ruby
[05:27:42] aufi: has joined #ruby
[05:27:43] WA9ACE: has joined #ruby
[05:27:49] Travis-42: has joined #ruby
[05:28:05] untitaker: has joined #ruby
[05:29:17] JJonah: has joined #ruby
[05:29:46] nebben: has joined #ruby
[05:29:54] schaary: has joined #ruby
[05:29:56] anisha: has joined #ruby
[05:30:02] DukeDave: has joined #ruby
[05:30:28] t0xik: has joined #ruby
[05:30:47] Tony-St4rk: has joined #ruby
[05:30:58] rflot: has joined #ruby
[05:31:29] BuildTheRobots: has joined #ruby
[05:31:30] oblak: has joined #ruby
[05:31:32] cstrahan_: has joined #ruby
[05:31:38] mitsuhiko: has joined #ruby
[05:31:42] err_ok: has joined #ruby
[05:31:44] charles81_: has joined #ruby
[05:31:45] kaia: has joined #ruby
[05:32:00] justinweiss: has joined #ruby
[05:32:04] devlaf: has joined #ruby
[05:32:25] Iambchop_: has joined #ruby
[05:32:31] deimos: has joined #ruby
[05:32:40] surminus: has joined #ruby
[05:32:45] sparc: has joined #ruby
[05:32:46] seanh: has joined #ruby
[05:32:49] aarongodin: has joined #ruby
[05:32:57] adambeynon: has joined #ruby
[05:32:59] drakan: has joined #ruby
[05:33:15] mroth: has joined #ruby
[05:33:19] mr-robert: has joined #ruby
[05:33:30] mattwc: has joined #ruby
[05:33:51] kapil___: has joined #ruby
[05:33:52] manveru: has joined #ruby
[05:34:18] zipkid: has joined #ruby
[05:34:42] Flashynuff: has joined #ruby
[05:35:45] Yonk__: has joined #ruby
[05:35:50] dmnd: has joined #ruby
[05:36:05] danzilio: has joined #ruby
[05:36:06] rfv: has joined #ruby
[05:36:09] avdi: has joined #ruby
[05:36:12] raggi: has joined #ruby
[05:36:21] michaelmeep__: has joined #ruby
[05:37:43] Diabolik: has joined #ruby
[05:37:49] skmp: has joined #ruby
[05:37:58] Vingador_: has joined #ruby
[05:39:06] barq: has joined #ruby
[05:41:23] conta: has joined #ruby
[05:42:09] pmarreck: has joined #ruby
[05:42:23] hsiktas: has joined #ruby
[05:43:17] kevinburke: has joined #ruby
[05:43:49] foamz: has joined #ruby
[05:47:33] rann: has joined #ruby
[05:50:18] jetpack_joe: has joined #ruby
[05:50:19] JackMc: has joined #ruby
[05:50:30] surminus: has joined #ruby
[05:51:08] SeepingN: has joined #ruby
[05:51:12] howdoi: has joined #ruby
[05:51:20] conta: has joined #ruby
[05:52:14] cjs226: has joined #ruby
[05:52:45] boxrick: has joined #ruby
[05:53:30] dogweather: has joined #ruby
[05:54:01] HalcyonicStorm__: has joined #ruby
[05:54:03] jnix: has joined #ruby
[05:57:17] aupadhye: has joined #ruby
[06:09:16] Mike11: has joined #ruby
[06:09:51] KnownSyntax: has joined #ruby
[06:09:55] howdoi: has joined #ruby
[06:10:05] kspencer: has joined #ruby
[06:10:41] kevinburke: has joined #ruby
[06:10:54] machty: has joined #ruby
[06:11:01] justache: has joined #ruby
[06:11:07] hsiktas: has joined #ruby
[06:11:07] kapil___: has joined #ruby
[06:11:25] foamz: has joined #ruby
[06:11:50] rjungemann: has joined #ruby
[06:12:06] Lloyd: has joined #ruby
[06:12:23] Guest58336: has joined #ruby
[06:12:30] Flashynuff: has joined #ruby
[06:12:36] surminus: has joined #ruby
[06:12:45] t0xik: has joined #ruby
[06:12:50] pmarreck: has joined #ruby
[06:13:21] JackMc: has joined #ruby
[06:15:04] umesh: has joined #ruby
[06:15:08] caw________: has joined #ruby
[06:17:12] iamdevnul: has joined #ruby
[06:17:12] epochwolf: has joined #ruby
[06:17:25] conta: has joined #ruby
[06:17:40] aarongodin: has joined #ruby
[06:17:47] nebben: has joined #ruby
[06:17:48] jwheare: has joined #ruby
[06:17:51] jetpack_joe: has joined #ruby
[06:18:55] ams__: has joined #ruby
[06:19:11] kapowaz: has joined #ruby
[06:19:17] mrsolo: has joined #ruby
[06:19:31] bove: has joined #ruby
[06:19:31] jnix: has joined #ruby
[06:19:59] micalexander: has joined #ruby
[06:20:10] andywojo: has joined #ruby
[06:20:13] yo61: has joined #ruby
[06:20:14] justizin: has joined #ruby
[06:20:15] skryking_: has joined #ruby
[06:20:20] Meow-J___: has joined #ruby
[06:20:25] jabreity: has joined #ruby
[06:20:26] zipkid: has joined #ruby
[06:20:29] solidsnack: has joined #ruby
[06:20:31] gmcintire: has joined #ruby
[06:20:32] Tony-St4rk: has joined #ruby
[06:20:37] Guest53256: has joined #ruby
[06:20:43] cjs226: has joined #ruby
[06:20:47] boxrick: has joined #ruby
[06:20:47] Brak____________: has joined #ruby
[06:20:49] mitsuhiko: has joined #ruby
[06:20:50] ckrailo: has joined #ruby
[06:20:57] fury: has joined #ruby
[06:21:00] drakan: has joined #ruby
[06:21:02] mattwc: has joined #ruby
[06:21:03] maciuszek: has joined #ruby
[06:21:03] colstrom: has joined #ruby
[06:21:07] adambeynon: has joined #ruby
[06:21:08] codepete: has joined #ruby
[06:21:09] thi: has joined #ruby
[06:21:26] rflot: has joined #ruby
[06:21:26] HalcyonicStorm__: has joined #ruby
[06:21:27] elliottcable: has joined #ruby
[06:21:35] manveru: has joined #ruby
[06:21:36] bcavileer: has joined #ruby
[06:21:38] justinweiss: has joined #ruby
[06:21:48] jmhmccr: has joined #ruby
[06:21:51] ewilliam_: has joined #ruby
[06:21:54] pizzaops: has joined #ruby
[06:21:55] tycoon177: has joined #ruby
[06:21:56] Mutsuhito: has joined #ruby
[06:21:56] Eising: has joined #ruby
[06:21:56] Flabbergazta_: has joined #ruby
[06:21:56] Flabbergazta_: has joined #ruby
[06:21:57] WA9ACE: has joined #ruby
[06:21:57] daxroc1: has joined #ruby
[06:21:57] oblak: has joined #ruby
[06:21:57] amitchellbullard: has joined #ruby
[06:21:57] JJonah: has joined #ruby
[06:21:58] [diecast]: has joined #ruby
[06:21:58] [diecast]: has joined #ruby
[06:21:58] seanh: has joined #ruby
[06:21:59] BuildTheRobots: has joined #ruby
[06:21:59] devlaf: has joined #ruby
[06:22:00] afisher: has joined #ruby
[06:22:00] knowtheory_: has joined #ruby
[06:22:00] Majost: has joined #ruby
[06:22:00] jimeh: has joined #ruby
[06:22:00] WA9ACE: has joined #ruby
[06:22:01] devlaf: has joined #ruby
[06:22:01] oblak: has joined #ruby
[06:22:01] JJonah: has joined #ruby
[06:22:02] [diecast]: has joined #ruby
[06:22:02] BuildTheRobots: has joined #ruby
[06:22:02] amitchellbullard: has joined #ruby
[06:22:03] seanh: has joined #ruby
[06:22:04] devlaf: has joined #ruby
[06:22:04] afisher: has joined #ruby
[06:22:04] Majost: has joined #ruby
[06:22:04] knowtheory_: has joined #ruby
[06:22:05] jimeh: has joined #ruby
[06:22:06] barq: has joined #ruby
[06:22:14] nickjj_: has joined #ruby
[06:22:15] kspencer-: has joined #ruby
[06:22:30] kaia: has joined #ruby
[06:22:31] Guest74533_: has joined #ruby
[06:22:37] rfv: has joined #ruby
[06:22:38] danzilio: has joined #ruby
[06:22:39] dmnd: has joined #ruby
[06:22:43] Travis-42: has joined #ruby
[06:22:53] charles81_: has joined #ruby
[06:22:56] michaelmeep__: has joined #ruby
[06:22:58] ReinH: has joined #ruby
[06:23:00] jxf: has joined #ruby
[06:23:06] cstrahan_: has joined #ruby
[06:23:07] peteretep: has joined #ruby
[06:23:14] kireevco_: has joined #ruby
[06:23:17] kspencer-: has joined #ruby
[06:23:19] schaary: has joined #ruby
[06:23:22] mroth: has joined #ruby
[06:23:28] fury: has joined #ruby
[06:23:30] DukeDave: has joined #ruby
[06:23:31] err_ok: has joined #ruby
[06:23:32] sparc: has joined #ruby
[06:23:36] rflot: has joined #ruby
[06:23:36] pizzaops: has joined #ruby
[06:23:43] [diecast]: has joined #ruby
[06:23:54] Diabolik: has joined #ruby
[06:23:59] avdi: has joined #ruby
[06:24:00] daxroc1: has joined #ruby
[06:24:01] skmp: has joined #ruby
[06:24:02] Yonk__: has joined #ruby
[06:24:03] raggi: has joined #ruby
[06:24:09] Meow-J___: has joined #ruby
[06:24:09] deimos: has joined #ruby
[06:24:13] yo61: has joined #ruby
[06:24:20] BuildTheRobots: has joined #ruby
[06:24:25] koenrh: has joined #ruby
[06:24:27] ams__: has joined #ruby
[06:24:30] barq: has joined #ruby
[06:24:39] Travis-42: has joined #ruby
[06:24:47] rfv: has joined #ruby
[06:24:53] Guest74533_: has joined #ruby
[06:25:04] rflot: has joined #ruby
[06:25:06] lesce: has joined #ruby
[06:25:07] elliottcable: has joined #ruby
[06:25:13] rann: has joined #ruby
[06:25:15] DukeDave: has joined #ruby
[06:25:19] podman: has joined #ruby
[06:25:20] [diecast]: has joined #ruby
[06:25:26] pizzaops: has joined #ruby
[06:25:37] craysiii: has joined #ruby
[06:25:44] deimos: has joined #ruby
[06:25:45] cstrahan_: has joined #ruby
[06:25:55] HashNuke: has joined #ruby
[06:26:02] darthThorik: has joined #ruby
[06:26:06] DarkUnicorn: has joined #ruby
[06:26:18] Chew: has joined #ruby
[06:26:22] andersh: has joined #ruby
[06:26:23] BuildTheRobots: has joined #ruby
[06:26:28] mr-robert: has joined #ruby
[06:26:34] Hobbyboy: has joined #ruby
[06:26:35] unsymbol: has joined #ruby
[06:26:37] rfv: has joined #ruby
[06:26:57] pizzaops: has joined #ruby
[06:27:00] dogweather: has joined #ruby
[06:27:02] Fenhl: has joined #ruby
[06:27:05] Guest21194: has joined #ruby
[06:27:15] Travis-42: has joined #ruby
[06:27:17] Iambchop_: has joined #ruby
[06:27:31] HashNuke: has joined #ruby
[06:27:33] untitaker: has joined #ruby
[06:30:02] pizzaops: has joined #ruby
[06:31:22] ircmaxell: has joined #ruby
[06:31:37] andikr: has joined #ruby
[06:32:39] haxx0r: has joined #ruby
[06:32:50] haxx0r: is there a hash-merge that adds values to each other?
[06:33:08] haxx0r: {a: 0} + {a: 20} + {a: 11}
[06:35:59] kevinburke: has joined #ruby
[06:36:19] Radar: haxx0r: each_with_object.
[06:39:55] baweaver: Radar / haxx0r: merge :)
[06:40:06] Radar: baweaver: does that take a block?
[06:40:24] Radar: Ah yeah it does :D
[06:40:48] baweaver: really danged handy too
[06:40:51] Radar: >> a = { a: 1 }; b = { a: 2 }; c = a.merge(b) { |_k, old, new| old + new }
[06:40:52] ruby[bot]: Radar: # => {:a=>3} (https://eval.in/1024837)
[06:42:02] baweaver: >> [{a: 0}, {a: 20}, {a: 11}].reduce { |a, h| a.merge(h) { |key, old_val, new_val| old_val + new_val } }
[06:42:03] ruby[bot]: baweaver: # => {:a=>31} (https://eval.in/1024838)
[06:42:19] baweaver: Reduce is the swiss army knife of Enumerable :D
[06:42:27] suukim: has joined #ruby
[06:43:05] baweaver: Though if we're feeling frolicky tonight
[06:44:28] reber: has joined #ruby
[06:45:50] baweaver: >> hs = [{a: 0}, {a: 20}, {a: 11}]; adds_values = -> *, o, n { o + n }; merges_with = -> fn { -> a,b { a.merge(b, &fn) } }; hs.reduce(&merges_with[adds_values])
[06:45:51] ruby[bot]: baweaver: # => {:a=>31} (https://eval.in/1024839)
[06:46:40] baweaver: I almost prefer * to _ now.
[06:46:54] baweaver: because it truly ignores arguments instead of blitzing underscore
[06:48:15] ciscam: has joined #ruby
[06:52:02] pwillard: has joined #ruby
[06:52:47] Guest58336: has joined #ruby
[06:55:21] jhill__: has joined #ruby
[06:55:31] graingert: has joined #ruby
[06:55:37] stephenh: has joined #ruby
[06:56:05] arcturiaen_: has joined #ruby
[06:56:09] cttttt: has joined #ruby
[06:56:19] mostlybadfly: has joined #ruby
[06:58:23] olivierjanss: has joined #ruby
[06:59:10] doesntbyte: has joined #ruby
[07:02:24] Guest58336: has joined #ruby
[07:09:28] clemens3: has joined #ruby
[07:09:46] TomyWork: has joined #ruby
[07:11:03] workmad3: has joined #ruby
[07:13:30] bobdobbs`: has joined #ruby
[07:17:28] incomprehensibly: has joined #ruby
[07:17:40] claudiuinberlin: has joined #ruby
[07:17:44] Zinder: has joined #ruby
[07:20:14] konsolebox: has joined #ruby
[07:22:25] Guest58336: has joined #ruby
[07:22:55] Xiti`: has joined #ruby
[07:25:25] biberu: has joined #ruby
[07:32:39] yohji: has joined #ruby
[07:33:09] ellcs: has joined #ruby
[07:35:58] saTchymoto: has joined #ruby
[07:36:58] sysvalve: has joined #ruby
[07:42:30] Guest58336: has joined #ruby
[07:43:52] Xiti: has joined #ruby
[07:46:54] dr3wo: has joined #ruby
[07:48:22] DTZUZO: has joined #ruby
[07:49:10] ignujee[m]: has joined #ruby
[07:52:24] Guest58336: has joined #ruby
[07:53:46] Mike11: has joined #ruby
[07:57:39] Beams: has joined #ruby
[08:02:24] nowhere_man: has joined #ruby
[08:02:34] burgestrand: has joined #ruby
[08:04:46] p4p0l0: has joined #ruby
[08:05:47] venmx: has joined #ruby
[08:09:23] conta: has joined #ruby
[08:11:14] aufi: has joined #ruby
[08:14:18] duderonomy: has joined #ruby
[08:15:18] Mike11: has joined #ruby
[08:15:41] Mike11: has joined #ruby
[08:16:56] ignujee[m]: Need help in fixing the following error
[08:17:11] ignujee[m]: ACTION sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/fHrCPxyLqRFLngaGhaUcsyqA >
[08:26:33] burgestrand: has joined #ruby
[08:40:52] sphenxes: has joined #ruby
[08:42:28] dr3wo: has joined #ruby
[08:47:30] ur5us: has joined #ruby
[08:47:56] ignujee[m]: command used is
[08:47:57] ignujee[m]: `./bin/rake db:migrate db:seed db:test:prepare`
[08:53:41] workmad3: has joined #ruby
[08:55:15] dogweather: has joined #ruby
[08:55:38] soc42: has joined #ruby
[08:59:41] yo61: has joined #ruby
[09:00:33] dr3wo: has joined #ruby
[09:04:44] krandi: has joined #ruby
[09:10:06] ishe: has joined #ruby
[09:12:44] ishe: has joined #ruby
[09:16:50] dogweather: has joined #ruby
[09:24:06] conta1: has joined #ruby
[09:28:46] ishe: has left #ruby: ("Killed buffer")
[09:28:53] ishe: has joined #ruby
[09:31:40] andikr: has joined #ruby
[09:36:39] ishe`: has joined #ruby
[09:42:45] dogweather: has joined #ruby
[09:47:33] AJA4350: has joined #ruby
[09:52:44] arne: how do i get the name of the module i am in
[09:54:13] conta: has joined #ruby
[09:55:30] arne: will i get problems if i overload .name of a module/class
[09:56:35] arne: haha that is odd
[09:58:41] RougeR: has joined #ruby
[09:58:41] RougeR: has joined #ruby
[09:59:25] Megamos: has joined #ruby
[09:59:35] dogweather: has joined #ruby
[10:04:34] ur5us: has joined #ruby
[10:11:36] Puffball: has joined #ruby
[10:14:13] herbmillerjr: has joined #ruby
[10:17:36] soniya29: has joined #ruby
[10:19:47] amar_: has joined #ruby
[10:20:51] anisha: has joined #ruby
[10:23:00] ur5us: has joined #ruby
[10:24:45] soniya29: has joined #ruby
[10:25:23] cyberg: has joined #ruby
[10:29:39] conta: has joined #ruby
[10:35:15] dr3wo: has joined #ruby
[10:39:48] karapetyan: has joined #ruby
[10:48:52] amar_: has joined #ruby
[10:50:54] andikr: has joined #ruby
[10:54:49] tvw: has joined #ruby
[10:59:57] burgestrand: has joined #ruby
[11:01:28] ElFerna: has joined #ruby
[11:05:19] Mike11: has joined #ruby
[11:05:36] Mike11: has joined #ruby
[11:10:48] fmcgeough: has joined #ruby
[11:25:03] jrafanie: has joined #ruby
[11:38:50] jamesaxl: has joined #ruby
[11:44:00] jnollette: has joined #ruby
[11:45:02] chamar: has joined #ruby
[11:45:18] apparition47: has joined #ruby
[11:46:10] biberu\: has joined #ruby
[11:55:00] konsolebox: has joined #ruby
[11:55:37] cthomas: has joined #ruby
[11:56:39] cthomas: Please help me how, can i define a button size in pixel with ruby tk/tcl
[12:02:46] synthroid: has joined #ruby
[12:06:30] conta: has joined #ruby
[12:07:24] Guest58336: has joined #ruby
[12:14:23] karapetyan: has joined #ruby
[12:17:28] Guest58336: has joined #ruby
[12:22:05] maxirater: has joined #ruby
[12:26:35] cagomez: has joined #ruby
[12:27:26] Guest58336: has joined #ruby
[12:33:26] hightower2: has joined #ruby
[12:35:34] Guest58336: has joined #ruby
[12:41:39] Sembei: has joined #ruby
[12:47:52] bmurt: has joined #ruby
[12:53:26] chat: has joined #ruby
[12:56:18] k0mpa: has joined #ruby
[12:57:51] arne: how would one cut a 16 byte string into 4 4 pieces?
[12:58:02] arne: i can't come up with something better than each_cons and join
[12:59:15] arne: oh and thats even wrong
[12:59:37] arne: im stupid, nvm
[13:01:38] dminuoso: arne: unpack('a4a4a4a4')?
[13:02:55] arne: "Cr24\x02\x00\x00\x00&\x01\x00\x00\x00\x01\x00\x00"
[13:03:06] arne: s[0...16].each_char.each_slice(4).to_a.map(&:join)[3].unpack("V")
[13:03:11] arne: this what i was searching
[13:04:05] dminuoso: arne: you know that s[0..16] wont give you 16 bytes unless the encoding is in binary right?
[13:04:11] dminuoso: arne: why not simply go the unpack route?
[13:04:51] arne: dminuoso: yes
[13:04:56] arne: dminuoso: because i am stupid
[13:05:01] arne: forgot unpack works block-wise, too
[13:06:17] dr3wo: has joined #ruby
[13:07:11] arne: why doesnt every language has something like (un)pack
[13:07:21] arne: as an internal feature, jesus
[13:07:51] arne: who wants to a[0] == x && a[1] == y...
[13:10:18] dr3wo: has joined #ruby
[13:13:39] dr3wo: has joined #ruby
[13:15:02] OneNeptune: has joined #ruby
[13:22:43] jzhu: has joined #ruby
[13:25:27] roamingdog: has joined #ruby
[13:26:25] vonfry: has joined #ruby
[13:27:34] roamingdog: has joined #ruby
[13:28:19] roamingdog: has joined #ruby
[13:29:15] roamingdog: has joined #ruby
[13:29:55] roamingdog: has joined #ruby
[13:30:36] vonfry_: has joined #ruby
[13:30:45] roamingdog: has joined #ruby
[13:33:26] roamingdog: has joined #ruby
[13:33:38] gizmore: has joined #ruby
[13:34:36] roamingdog: has joined #ruby
[13:34:38] lbracher: has joined #ruby
[13:35:21] roamingdog: has joined #ruby
[13:36:04] dr3wo: has joined #ruby
[13:36:10] roamingdog: has joined #ruby
[13:36:39] cadillac_: has joined #ruby
[13:36:59] roamingdog: has joined #ruby
[13:37:44] roamingdog: has joined #ruby
[13:41:23] dendazen: has joined #ruby
[13:43:21] fluxAeon_: has joined #ruby
[13:43:23] fluxAeon_: if i need to do a check to see if a var is nil or not before displaying it in an .erb do i do that in the .erb or in the controller?
[13:44:07] elomatreb: Depends on what you want to do "instead" I'd say
[13:44:14] synthroid: has joined #ruby
[13:44:15] fluxAeon_: display a 0
[13:44:40] fluxAeon_: <td class="number"><%= @member_demographics.find{|x| x['gender'] == 'F'}['Pct']%>%</td>. that's coming back nil sometimes because it doesn't exist in the data so i need to display a 0 instead
[13:44:49] elomatreb: If your variable doesn't have to be able to contain false (the boolean value) you can just to `your_variable || 0` in the view
[13:44:55] havenwood: >> nil.to_i
[13:44:56] ruby[bot]: havenwood: # => 0 (https://eval.in/1025098)
[13:45:43] elomatreb: But e.g. if you wanted to load another model instead that would not belong in the controller
[13:45:48] elomatreb: *in the view
[13:49:04] OneNeptune: has joined #ruby
[13:49:19] PsionTheory: has joined #ruby
[13:51:19] vonfry: has joined #ruby
[13:51:58] Inline: has joined #ruby
[13:52:24] houhoulis: has joined #ruby
[13:54:20] shinnya: has joined #ruby
[13:55:55] ldnunes: has joined #ruby
[13:57:41] ishe`: has joined #ruby
[13:58:34] fluxAeon_: i don't want to load anything else just say 0 otherwise
[13:58:39] Rapture: has joined #ruby
[13:58:53] fluxAeon_: so nil.to_i will return 0?
[13:59:42] jottr: has joined #ruby
[14:00:21] Asher: has joined #ruby
[14:04:49] wald0: has joined #ruby
[14:10:04] desperek: has joined #ruby
[14:15:18] Nicmavr: has joined #ruby
[14:18:46] grilix: has joined #ruby
[14:19:41] jrafanie: has joined #ruby
[14:20:38] karthik__: has joined #ruby
[14:21:11] houhoulis: has joined #ruby
[14:21:36] havenwood: karthik__: hi
[14:21:51] karthik__: can anyone help me with cross compiling a ruby gem using rakefile
[14:22:09] havenwood: karthik__: what's going wrong?
[14:22:32] karthik__: to start with i am using Rakefile for the first time.
[14:22:53] karthik__: I have my cross compiler varibales exported to my linux environment
[14:23:04] karapetyan: has joined #ruby
[14:23:06] karthik__: but the same is not getting reflected in the build
[14:23:29] nicht: has joined #ruby
[14:23:48] nicht_: has joined #ruby
[14:24:47] karthik__: @havenwood did i answer your question ?
[14:25:30] dogweather: has joined #ruby
[14:29:18] quobo: has joined #ruby
[14:29:59] ishe`: has joined #ruby
[14:34:25] havenwood: kar, oh, they left
[14:36:05] gizmore: i rejoined
[14:36:16] gizmore: rake is killing me
[14:36:18] arne: i need a name for a ruby project, the software should DO EVERYTHING a developer does besides writing lines of codes
[14:36:32] arne: so it's a eierlegende wollmilchsau, how would i name ith
[14:36:33] gizmore: CommonDevTasks
[14:36:49] arne: well make it less german
[14:36:58] arne: i mean the name can be funny
[14:37:00] arne: like, rails.
[14:37:02] gizmore: Frommage de quatre
[14:37:24] bhaak: EverythingAndTheKitchenSinkWithBells
[14:37:53] Asher: has joined #ruby
[14:38:09] arne: no for real
[14:38:15] arne: and it has to be short
[14:38:20] arne: one guess i had was "shed" as in toolshed
[14:38:33] arne: and that i thought it would be funny if it was named "chad"
[14:38:40] arne: like it's your mate, doing your work with you
[14:38:57] havenwood: gizmore: yeah, that helps show what's going wrong, but from what you've said I have no idea what the issue is
[14:39:20] arne: no, anyone? :(
[14:39:23] bhaak: shed could also derive from "bikeshed"
[14:39:54] gizmore: class Object; include ::Bikeshed; extend ::Bikeshed end;
[14:40:24] arne: well, yeh it can
[14:41:23] arne: im open for ideas, pliz help
[14:41:46] amar_: has joined #ruby
[14:43:44] bhaak: easily verbed, in English and German
[14:43:44] havenwood: arne: I'd call it "impossible"
[14:43:48] bhaak: "dings that"
[14:43:55] bhaak: dings this, dings it all around
[14:44:13] konsolebox: "like it's your mate, doing your work with you" ProgMate, or maybe, ProgSlave
[14:44:27] gizmore: call it "MEH"
[14:44:49] bhaak: yeah, that would have been my next suggestion. use a slightly derogative term for "being that is called to fetch stuff"
[14:46:20] akaiiro: has joined #ruby
[14:54:42] jrich523: has joined #ruby
[14:56:29] fluxAeon: has joined #ruby
[14:58:21] jrich523: hey guys, im using dotenv to load some vars up, what would be the prefered way to check for no value? .nil?
[15:00:41] havenwood: jrich523: If I'm expecting an env var to definitely be set, I use #fetch
[15:01:14] jrich523: well, as much as i full expect it to be there, it is in a config file... so... could get lost
[15:01:29] havenwood: jrich523: if it gets lost, do you want an error to be raised?
[15:01:41] jrich523: nope, want it to default
[15:02:07] jrich523: actually this was more so for the default check
[15:02:23] jrich523: @timeout = timeout.empty? ? 120 : timeout.to_i
[15:02:31] jrich523: also i think empty is horrible in this case right?
[15:02:45] havenwood: jrich523: ENV.fetch('MAYBE', 120).to_i
[15:03:15] dogweather: has joined #ruby
[15:03:24] jrich523: that seems... to easy
[15:04:35] OneNeptune: has joined #ruby
[15:07:34] dhollinger: has joined #ruby
[15:08:00] cschneid: has joined #ruby
[15:10:42] flips: has joined #ruby
[15:13:19] guille-moe: has joined #ruby
[15:14:24] fluxAeon: oh boy. so i don't know ruby at all but i'm trying to update someone elses rails site. they're building a page off of an object that has json data in it. in all but one of the cases there are F and M dictionaries in the json. in the one case there's only an M
[15:14:40] fluxAeon: for context: https://www.dropbox.com/s/jn9u16lbmgbpntr/Screenshot%202018-06-20%2011.14.33.png?dl=0
[15:14:59] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[15:15:12] fluxAeon: well it's a regular ruby q. not rails specific
[15:15:18] Zarthus: fair enough
[15:15:22] fluxAeon: https://www.dropbox.com/s/r98n4p1twk1i0ny/Screenshot%202018-06-20%2011.15.19.png?dl=0
[15:15:32] fluxAeon: there's the one outlier json object... there's no F dictionary in it
[15:15:40] Zarthus: why can't you just use a pastebin like normal people :P
[15:15:52] fluxAeon: because it's easier to see if the json is parsed right
[15:16:01] Zarthus: disagreed :P
[15:16:10] Zarthus: gender sounds rather non-mandatory anywho
[15:16:20] dogweather: has joined #ruby
[15:16:30] fluxAeon: how do i check to see if gender F exists, and if it doesn't append the dictionary to include it
[15:16:45] fluxAeon: along with all the other vars that M has
[15:16:50] fluxAeon: and just set them all to 0.
[15:17:47] cagomez: has joined #ruby
[15:17:47] Zarthus: an easy way is to loop over the objects you have and check obj.values.include? 'f'
[15:18:22] Zarthus: though i don't know at all what your code looks like..
[15:18:29] Zarthus: This shouldn't really be that challenging.
[15:18:38] fluxAeon: i don't know ruby
[15:18:54] havenwood: >> [{m: 1, f: 2}, {m: 2}].map { |h| h[:f] ||= 0; h[:m] ||= 0; h }
[15:18:56] ruby[bot]: havenwood: # => [{:m=>1, :f=>2}, {:m=>2, :f=>0}] (https://eval.in/1025129)
[15:19:16] fluxAeon: but am trying to make my way through it
[15:20:20] havenwood: fluxAeon: Are you familiar with `map`, from another language?
[15:21:38] havenwood: fluxAeon: In Ruby we call the basic dictionary class a Hash. Its literal is: {}
[15:23:29] havenwood: >> [{}, {}].each { |h| h[:ribbit] = true }
[15:23:30] ruby[bot]: havenwood: # => [{:ribbit=>true}, {:ribbit=>true}] (https://eval.in/1025132)
[15:23:42] havenwood: >> [{}, {}].map { |h| h[:ribbit] = true; h }
[15:23:43] ruby[bot]: havenwood: # => [{:ribbit=>true}, {:ribbit=>true}] (https://eval.in/1025133)
[15:24:41] havenwood: fluxAeon: Note in the first example above, it's mutating the instance of Array that is the receiver to the #each method.
[15:25:04] havenwood: fluxAeon: The second example creates a new Array.
[15:25:46] havenwood: fluxAeon: If you don't know filter and map from other languages, they're worth learning!
[15:26:11] havenwood: filter/map/reduce
[15:26:24] havenwood: We don't actually get the #filter alias for #select until Christmas. ;-)
[15:27:13] synthroid: has joined #ruby
[15:27:31] havenwood: fluxAeon: If you have trouble mapping, show us a gist of what you're trying.
[15:27:34] ruby[bot]: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[15:27:44] fluxAeon: okay let me spend some time on this
[15:27:51] fluxAeon: thanks for being so helpful!
[15:28:27] synthroid: has joined #ruby
[15:31:48] houhoulis: has joined #ruby
[15:32:02] cagomez: has joined #ruby
[15:33:47] dogweather: has joined #ruby
[15:35:08] amarks: has joined #ruby
[15:38:28] orbyt_: has joined #ruby
[15:38:59] icy`: looks like array of two hashes where the female one comes first. Just prepend it if doesn't exist
[15:39:30] havenwood: icy`: good point - i didn't look closely enough at the image
[15:40:11] havenwood: fluxAeon: i misread your example, icy`'s right that you have a separate Hash for M and F inside the Array
[15:43:02] dogweather: has joined #ruby
[15:43:21] cadillac_: has joined #ruby
[15:43:41] wald0_: has joined #ruby
[15:44:05] havenwood: fluxAeon: [[{a: 1}, {b: 1}], [{a: 1}]].map { |a| a.prepend({a: 1}) if a.none? { |h| h.key? :a }; a.append({b: 1}) if a.none? { |h| h.key? :b }; a }
[15:44:41] havenwood: you could do it based on position if those are regular
[15:46:22] DTZUZO: has joined #ruby
[15:54:05] roamingdog: has joined #ruby
[15:56:02] dogweather: has joined #ruby
[15:58:48] StarSeed0000: has joined #ruby
[15:59:56] orbyt_: has joined #ruby
[16:01:02] rippa: has joined #ruby
[16:01:49] vikaton: has joined #ruby
[16:02:13] StarSeed0000: /join #devops
[16:03:56] amar_: has joined #ruby
[16:05:44] cagomez: has joined #ruby
[16:11:33] twobitsprite: has joined #ruby
[16:12:37] wontruefree: has joined #ruby
[16:13:00] twobitsprite: I've read a couple of posts about this on stackexchange, but I figured I'd ask here to see if there's a better ruby-specific solution: anyone know of a good way to do something like "#!/usr/bin/env ruby -ni" on linux?
[16:15:09] Asher: has joined #ruby
[16:18:07] ha: has joined #ruby
[16:18:46] twobitsprite: nm, just found a post demonstrating the -x trick :)
[16:19:05] dreamthese: has joined #ruby
[16:19:19] jcarl43: has joined #ruby
[16:21:15] konsolebox: twobitsprite: that would still require 3 arguments, no?
[16:22:31] dionysus69: has joined #ruby
[16:22:39] orbyt_: has joined #ruby
[16:26:16] biberu: has joined #ruby
[16:26:26] synthroid: has joined #ruby
[16:29:18] Megamos: has joined #ruby
[16:30:18] cagomez: has joined #ruby
[16:30:36] shinnya: has joined #ruby
[16:35:53] brandon: has joined #ruby
[16:37:17] orbyt_: has joined #ruby
[16:38:12] claudiuinberlin: has joined #ruby
[16:40:38] dr3wo: has joined #ruby
[16:42:01] dogweather: has joined #ruby
[16:43:18] za1b1tsu: has joined #ruby
[16:43:26] troulouliou_div2: has joined #ruby
[16:47:47] eckhardt_: has joined #ruby
[16:49:14] sysvalve: has joined #ruby
[16:49:19] jjman: has joined #ruby
[16:49:38] amar_: has joined #ruby
[16:51:17] cthulchu: has joined #ruby
[16:54:20] OneNeptune: has joined #ruby
[16:57:12] wontruefree: has joined #ruby
[16:59:33] mjolnird: has joined #ruby
[17:00:10] wontruefree: has joined #ruby
[17:02:53] ldepandis: has joined #ruby
[17:04:10] amar_: has joined #ruby
[17:05:31] codymj: has joined #ruby
[17:06:14] soniya29: has joined #ruby
[17:10:40] bmurt: has joined #ruby
[17:12:39] Guest58336: has joined #ruby
[17:18:07] Asher: has joined #ruby
[17:22:44] hahuang65: has joined #ruby
[17:22:47] Guest58336: has joined #ruby
[17:23:36] apeiros_: has joined #ruby
[17:30:37] cagomez: has joined #ruby
[17:32:34] Guest58336: has joined #ruby
[17:36:06] havenwood: has joined #ruby
[17:36:06] havenwood: has joined #ruby
[17:37:30] psychicist__: has joined #ruby
[17:39:17] baweaver: havenwood: keyword params work in arguments
[17:40:35] twobitsprite: has joined #ruby
[17:42:10] baweaver: either that or have a defaults hash to merge from.
[17:42:36] Guest58336: has joined #ruby
[17:42:54] havenwood: well, looky there: warning: flip-flop is deprecated
[17:43:18] havenwood: >> 1.upto(30).select { |n| n if n % 5 == 0 .. n % 10 == 0 }
[17:43:19] ruby[bot]: havenwood: # => [5, 6, 7, 8, 9, 10, 15, 16, 17, 18, 19, 20, 25, 26, 27, 28, 29, 30] (https://eval.in/1025184)
[17:45:22] baweaver: They've been flip flopping on that for a long time
[17:45:23] baweaver: Do you have the announcement / bug for it?
[17:45:31] havenwood: https://bugs.ruby-lang.org/issues/5400
[17:45:54] havenwood: baweaver: https://github.com/ruby/ruby/commit/bae638ad5b782c44c80efe33834cb9039279af46
[17:46:31] Hanmac: only hipster try to code with flip-flop ;P
[17:46:39] RougeT430: has joined #ruby
[17:46:42] havenwood: How would you rewrite the above without flipflop?
[17:46:52] havenwood: ACTION waxes his mustache
[17:47:35] RougeT430: has joined #ruby
[17:47:46] r29v: has joined #ruby
[17:48:03] baweaver: havenwood: why modulo?
[17:48:13] havenwood: just a contrived example
[17:48:29] rouget430__: has joined #ruby
[17:49:02] baweaver: Well I'm being overly dramatic in work channels with it XD
[17:49:18] rouget430__: has joined #ruby
[17:49:27] baweaver: Rickroll works fine by the way.
[17:49:30] havenwood: ACTION goes back to using the sandals operator
[17:52:27] Guest58336: has joined #ruby
[17:52:55] Eiam: has joined #ruby
[17:54:13] nowhere_man: has joined #ruby
[17:55:07] mjolnird: has joined #ruby
[18:01:11] dr3wo: has joined #ruby
[18:02:39] Guest58336: has joined #ruby
[18:03:42] jrich523: female coming first?
[18:03:57] jrich523: man, scrolling up can be scary :)
[18:06:34] nicht_: has joined #ruby
[18:07:00] nicht_: has joined #ruby
[18:07:08] jrich523: mostly im an idiot, i had the window way scrolled up
[18:07:25] jrich523: some a nutty comment about a hash, a female and coming first
[18:07:59] KeyJoo: has joined #ruby
[18:10:14] dionysus70: has joined #ruby
[18:13:59] Guest58336: has joined #ruby
[18:15:29] theRoUS: working with rails 5 (after a long absence). i want to implement an import method that will loop through the array of item hashes in its params, and do #create or #update as appropriate before moving on to the next item in the import array.
[18:16:38] theRoUS: is this something easily done, or do i need to replicate the create/update logic in my #import method? i'm having trouble figuring out how to reset the params structure appropriate for each iteration..
[18:16:50] amar: has joined #ruby
[18:17:26] StarSeed0000: theRoUS, are you worried about validations preventing any object to save?
[18:18:06] theRoUS: i have separate validators for the #import and the #update/#create methods, so i don't think so
[18:19:40] theRoUS: which is why i'd prefer to work within the #create/#update methods rather than try to recreate them
[18:19:43] JamJam_kid: has joined #ruby
[18:19:52] nowhere_man: has joined #ruby
[18:20:19] pastorinni: has joined #ruby
[18:23:49] eckhardt_: has joined #ruby
[18:24:05] cagomez: has joined #ruby
[18:24:46] claudiuinberlin: has joined #ruby
[18:24:48] apeiros_: theRoUS: as long as it's limited to what you've described, then that's rather trivial
[18:25:35] dogweather: has joined #ruby
[18:28:37] theRoUS: apeiros_: that's what i hoped. any pointers to howtos?
[18:28:39] dhollinger: has joined #ruby
[18:28:59] apeiros_: theRoUS: what more than .each and .create do you think you need?
[18:29:41] theRoUS: well, resetting params between each call, since #create depends upon it
[18:30:05] apeiros: params? as in Rails' ApplicationController#params ?
[18:31:58] grilix_: has joined #ruby
[18:35:37] apeiros: dumm di dumm…
[18:37:44] postmodern: has joined #ruby
[18:41:07] skryking_: has joined #ruby
[18:42:02] cthulchu: I have a quick question
[18:42:37] cthulchu: I think I can ask the console here
[18:42:57] cthulchu: >>puts(puts "123" if 1=1)
[18:42:58] ruby[bot]: cthulchu: # => /tmp/execpad-c1f3d2c4f952/source-c1f3d2c4f952:2: syntax error, unexpected modifier_if, expecting ')' ...check link for more (https://eval.in/1025227)
[18:42:59] theRoUS: apeiros: yes
[18:43:19] apeiros: ?experiments
[18:43:20] ruby[bot]: Please use your local irb or pry (see ?pry) to experiment, ruby[bot]'s eval functionality is for demonstration purposes only.
[18:43:44] cthulchu: I know, I know
[18:43:49] cthulchu: It was my question
[18:43:56] cthulchu: whether this will work: events = data_layer.select { |object| puts object.to_json if object.has_key?(data_layer_var_name) }
[18:44:15] Unknown2: has joined #ruby
[18:44:19] cthulchu: and I want that object that it puts in my events
[18:44:25] apeiros: "work" depends on what you expect. but puts returns nil. always. so probably no.
[18:44:27] cthulchu: so I expect puts to return true
[18:45:00] cthulchu: I think it should, right?
[18:45:08] apeiros: also select is not map. your to_json is rather pointless there.
[18:45:21] apeiros: you think wrong. and I just said so :)
[18:45:39] cthulchu: my to_json has no relation to the funciton outside
[18:45:43] cthulchu: it's about puts
[18:45:46] apeiros: "work" depends on what you expect. but *****puts returns nil*****. always. so probably no. (emphasis added)
[18:45:50] cthulchu: ir doesn't mutate the object
[18:45:52] RougeR: has joined #ruby
[18:45:52] RougeR: has joined #ruby
[18:45:58] cthulchu: I wrote above what I expected
[18:46:07] apeiros: yeah, then your to_json is indeed more pointless.
[18:46:23] apeiros: the result of it is not used anywhere.
[18:46:44] cthulchu: puts won't output it?
[18:46:44] apeiros: not at all.
[18:46:57] apeiros: stupid keyboard.
[18:47:28] cthulchu: I treat blocks as functions
[18:47:31] apeiros: yes, puts will output it.
[18:47:47] cthulchu: does puts have embeded .to_json?
[18:47:53] cthulchu: I tested it
[18:47:59] cthulchu: so why are you saying it does nothing?
[18:48:05] zachk: has joined #ruby
[18:48:05] zachk: has joined #ruby
[18:48:06] cthulchu: it does exactly wht I want
[18:48:14] cthulchu: flattens my hash to a string
[18:48:27] cthulchu: so I could print it
[18:48:47] cthulchu: I don't need a string in events and I don't expect to_json to mutate my object
[18:48:53] cthulchu: I would be very surprised if it did
[18:48:58] apeiros: no. but puts always returns nil. so that puts there is wrong. if you indeed want to print your object, ok, then that to_json isn't pointless. but your code makes little sense.
[18:49:25] cthulchu: I didn't know puts returned nil
[18:49:33] cthulchu: I thought it returned 1 if it worked
[18:49:37] cthulchu: just like assignment does
[18:49:40] apeiros: it's only the third time I say that :-p
[18:49:45] apeiros: also, docs. really.
[18:49:55] apeiros: assignment does not return 1.
[18:50:04] apeiros: (or rather, evaluate to)
[18:50:26] cthulchu: I meant true
[18:50:35] apeiros: >> result = (x = "hi dude"); result
[18:50:35] cthulchu: I read about it yesterday
[18:50:36] ruby[bot]: apeiros: # => "hi dude" (https://eval.in/1025239)
[18:50:45] apeiros: assignment always returns rhs.
[18:50:50] apeiros: *evaluates to
[18:50:55] cthulchu: maybe it casts into truthy
[18:51:05] jenrzzz: has joined #ruby
[18:51:05] jenrzzz: has joined #ruby
[18:51:06] cthulchu: what's rhs?
[18:51:11] ruby[bot]: apeiros: I don't know anything about rhs
[18:51:22] cthulchu: high five, bot!
[18:51:36] apeiros: !fact add rhs RHS is short for "right hand side", the expression to the right of an assignment
[18:51:37] ruby[bot]: apeiros: I will remember that rhs is RHS is short for "right hand side", the expression to the right of an assignment
[18:51:40] ruby[bot]: RHS is short for "right hand side", the expression to the right of an assignment
[18:51:59] cthulchu: omg this is good
[18:52:06] apeiros: !fact add lhs LHS is short for "left hand side", the expression to the left of an assignment
[18:52:06] ruby[bot]: apeiros: I will remember that lhs is LHS is short for "left hand side", the expression to the left of an assignment
[18:52:15] cthulchu: thanks, apeiros, you're very helpful.
[18:52:31] apeiros: you can use any expression in an if. and everything except false and nil is truthy.
[18:52:47] apeiros: hence `if x = nil` will not evaluate the branch.
[18:52:54] cthulchu: oh very good
[18:53:07] cthulchu: (I will never use assingment in if though)
[18:53:16] apeiros: that's a good decision.
[18:56:49] cthulchu: so I'm gonna use each then. I just need to iterate through all the folks and print those who satisfy a condition.
[18:57:23] apeiros: events = blah.select { |x| yourcond(x) }; puts events.map(&:to_json)
[18:58:28] RougeR: has joined #ruby
[18:58:28] RougeR: has joined #ruby
[18:58:45] cthulchu: you closed the block
[18:59:05] cthulchu: ah, that's select
[18:59:15] cthulchu: nah, looks like redundant work
[18:59:22] cthulchu: I think each is more elegant and faster
[18:59:25] cthulchu: in this case
[18:59:37] cthulchu: also eats less memory
[19:00:10] cthulchu: blah.each{ |x| p x if condition}
[19:00:57] cthulchu: I'm getting used to not using parenthesis and spaces
[19:01:47] cthulchu: also it says each returns `ary` when a block is given
[19:01:53] ruby[bot]: cthulchu: I don't know anything about ary
[19:02:03] apeiros: each returns the receiver
[19:02:17] apeiros: foo.each { … } # => foo
[19:02:26] cthulchu: why does it say ary?
[19:02:50] apeiros: probably the code example was supposed to read `ary.each …`
[19:02:58] raynold: has joined #ruby
[19:03:07] cthulchu: no, it calls arrays ary, I think
[19:03:10] cthulchu: it's the documentation
[19:03:13] cthulchu: https://ruby-doc.org/core-2.2.0/Array.html#method-i-each
[19:04:02] jenrzzz_: has joined #ruby
[19:11:16] dhollinger: has joined #ruby
[19:16:37] samosaphile: has joined #ruby
[19:16:37] dr3wo: has joined #ruby
[19:17:18] r29v: has joined #ruby
[19:20:35] p4p0l0: has joined #ruby
[19:23:12] arne: havenwood: i will show you
[19:26:12] synthroid: has joined #ruby
[19:34:47] tdy: has joined #ruby
[19:35:40] ElFerna: has joined #ruby
[19:41:09] dendazen: has joined #ruby
[19:42:36] sameerynho: has joined #ruby
[19:46:20] Lytol: has joined #ruby
[19:49:15] dogweather: has joined #ruby
[19:49:56] dviola: has joined #ruby
[19:55:50] ElFerna: has joined #ruby
[19:55:56] _aeris_: has joined #ruby
[19:56:37] workmad3: has joined #ruby
[20:03:19] camonz: has joined #ruby
[20:05:54] cagomez: has joined #ruby
[20:06:10] ElFerna: has joined #ruby
[20:08:21] Guest58336: has joined #ruby
[20:13:09] t0xik: has joined #ruby
[20:17:27] Guest58336: has joined #ruby
[20:20:56] eckhardt_: has joined #ruby
[20:22:59] cagomez: has joined #ruby
[20:25:29] twobitsp1ite: has joined #ruby
[20:27:23] Guest58336: has joined #ruby
[20:28:03] clemens3: has joined #ruby
[20:29:10] p4p0l0: has joined #ruby
[20:34:51] dogweather: has joined #ruby
[20:35:01] samosaphile: that book by chris pine is good
[20:36:48] zleap: has joined #ruby
[20:37:28] Guest58336: has joined #ruby
[20:38:41] eam: uh ok, UNIXSocket.new() - how do I set the socktype to DGRAM?
[20:39:04] eam: I'm reading ext/socket/unixsocket.c and still not seeing it
[20:39:15] claudiuinberlin: has joined #ruby
[20:40:13] elomatreb: There is an extra UDPSocket, UNIXSocket is only for Unix Domain Sockets I think?
[20:41:19] drona6: has joined #ruby
[20:41:37] jenrzzz: has joined #ruby
[20:41:37] jenrzzz: has joined #ruby
[20:41:54] venmx: has joined #ruby
[20:42:03] samosaphile: not too sure what this rubykoans stuff is about but do you really need to ruby installed locally for this, or would repl.it be fine?
[20:43:04] r29v: has joined #ruby
[20:45:34] havenwood: eam: do you maybe have to construct it from socket to get that combo?: Socket.new :UNIX, :DGRAM, 0
[20:45:50] havenwood: eam: Socket.new Socket::AF_UNIX, Socket::SOCK_DGRAM, 0
[20:47:29] Guest58336: has joined #ruby
[20:47:40] pastorinni: has joined #ruby
[20:48:30] pastorinni: has joined #ruby
[20:49:01] tvw: has joined #ruby
[20:50:58] cthulchu_: has joined #ruby
[20:51:53] fartymcfly: has joined #ruby
[20:52:18] fartymcfly: hey all. is it okay to add folders to a mac root directory? will i break anything?
[20:53:48] twobitsp1ite: Anyone have any idea why this matches? " # service: name=unseal-vault enabled=true" =~ /([\s-]*)(\S+?:)( [^"']\S+?=.*)$/
[20:53:59] fartymcfly: has left #ruby: ()
[20:54:01] tobiasvl: fartymcfly: it won't break anything as far as I'm aware. can't imagine it does. but: why?
[20:54:26] fartymcfly: has joined #ruby
[20:54:37] twobitsp1ite: ohh, nm... guess I should put a ^ at the beginning :P
[20:55:45] elomatreb: fartymcfly: You probably don't have the permissions to do that unless you're running scripts as root, which usually indicates deeper problems
[20:57:27] Guest58336: has joined #ruby
[20:58:31] havenwood: fartymcfly: but no, it won't break anything
[20:58:32] havenwood: oh, tobiasvl already said
[20:58:36] apeiros: twobitsp1ite: you probabbly want \A, not ^
[20:58:57] havenwood: twobitsp1ite: ^ is beginning of *line*
[20:59:08] apeiros: and *any* line at that
[20:59:28] havenwood: "\n\noops".match? /^oops/ #=> true
[20:59:45] havenwood: twobitsp1ite: \A and \z ftw
[21:00:47] fartymcfly: i need to put a file in the Vamp directory of `Library/Audio/Plugins/Vamp` but i don't have a Vamp directory on my machine yet. following these directions: https://vamp-plugins.org/download.html#install
[21:01:27] Serpent7776: has joined #ruby
[21:02:36] \void: has joined #ruby
[21:03:23] vagrant5: has joined #ruby
[21:04:33] OneNeptune: has joined #ruby
[21:04:43] dogweather: has joined #ruby
[21:05:04] vagrant5: fartymcfly: it looks like you can put it in the home directory instead?
[21:05:26] Guest58336: has joined #ruby
[21:06:43] hph^: has joined #ruby
[21:08:38] fartymcfly: vagrant5: yeah. i'll probably do that. just wondering what the implications were of using root directory. it feels weird to add anything to it, but no one can put into words why exacly
[21:09:50] dionysus69: has joined #ruby
[21:11:33] subroot: has joined #ruby
[21:11:38] subr: has joined #ruby
[21:12:48] p4p0l0: has joined #ruby
[21:24:18] jjman: has left #ruby: ("WeeChat 1.6")
[21:25:24] ElFerna: has joined #ruby
[21:25:38] amar_: has joined #ruby
[21:33:11] jenrzzz_: has joined #ruby
[21:37:17] ur5us: has joined #ruby
[21:39:46] RougeR: has joined #ruby
[21:42:07] pastorinni: has joined #ruby
[21:44:44] dgaff: has joined #ruby
[21:44:52] dogweather: has joined #ruby
[21:44:54] dgaff: is rbenv preferred over rvm these days?
[21:47:37] Guest58336: has joined #ruby
[21:47:53] __goodnight__: has joined #ruby
[21:51:41] Eiam: I think is preferred over either
[21:51:47] Eiam: (I still use rbenv tho)
[21:52:35] Eiam: I never had problems with rvm fwiw and have no issues with rbenv, I just moved to it when setting up a new machine cause everyone said i was weird for using rvm and I figured I'd try out something new to see what the dealio was
[21:56:43] nicht_: has joined #ruby
[21:56:56] dgaff: Am I that old now
[21:57:01] workmad3: has joined #ruby
[21:57:04] dgaff: where RVM is the weird one
[21:57:15] dgaff: It's been a while but back in the day wasn't rvm the go-to?
[21:57:37] Guest58336: has joined #ruby
[21:58:29] eam: havenwood: I think you're right
[21:59:01] eam: elomatreb: DGRAM/STREAM distinguishes between tcp/udp for an IP socket, but they apply to unix sockets too
[21:59:15] eam: with similar semantic differences
[21:59:20] Eiam: dgaff: it was the original, yes
[21:59:24] Mike11: has joined #ruby
[21:59:32] Eiam: I think it was falling out of favor because it was mucking with paths and impacting other products
[21:59:43] Eiam: and chruby was more self contained to just ruby
[21:59:50] Eiam: there are many blogs on this, google away.
[22:07:15] shinnya: has joined #ruby
[22:07:20] jenrzzz: has joined #ruby
[22:07:43] Guest58336: has joined #ruby
[22:13:42] matled: has joined #ruby
[22:15:20] donnie_2: has joined #ruby
[22:17:41] Guest58336: has joined #ruby
[22:20:20] jenrzzz: has joined #ruby
[22:27:46] Guest58336: has joined #ruby
[22:32:53] dogweather: has joined #ruby
[22:37:21] Guest47756: has joined #ruby
[22:37:45] Guest58336: has joined #ruby
[22:44:33] amar: has joined #ruby
[22:47:27] Guest58336: has joined #ruby
[22:50:00] cschneid_: has joined #ruby
[22:54:39] dogweather: has joined #ruby
[22:56:16] ElFerna: has joined #ruby
[22:57:40] Guest58336: has joined #ruby
[23:00:12] whathappens: has joined #ruby
[23:01:42] nythalcrow: has joined #ruby
[23:07:43] Guest58336: has joined #ruby
[23:07:55] white_lilies: has joined #ruby
[23:13:33] cschneid: has joined #ruby
[23:16:20] roamingdog: has joined #ruby
[23:17:35] Guest58336: has joined #ruby
[23:19:59] dogweather: has joined #ruby
[23:27:32] Guest58336: has joined #ruby
[23:34:04] jenrzzz: has joined #ruby
[23:34:05] jenrzzz: has joined #ruby
[23:34:44] matcouto: has joined #ruby
[23:35:12] roamingdog: has joined #ruby
[23:35:45] solocshaw: has joined #ruby
[23:35:56] roamingdog: has joined #ruby
[23:36:47] roamingdog: has joined #ruby
[23:37:26] Guest58336: has joined #ruby
[23:37:32] roamingdog: has joined #ruby
[23:38:22] roamingdog: has joined #ruby
[23:38:52] jzhu: has joined #ruby
[23:39:12] roamingdog: has joined #ruby
[23:43:47] zenspider: mmmm... rspec's describe seems to have a feature where additional args CAN(?) be used as a shared context thingy.... but I can't find that described anywhere in the "relish" doco thingy at all. Can someone clue me ins?
[23:47:27] Guest58336: has joined #ruby
[23:50:49] venmx: has joined #ruby
[23:54:46] weaksauce: has joined #ruby
[23:57:26] workmad3: has joined #ruby
[23:57:30] Guest58336: has joined #ruby
[23:58:11] ur5us: has joined #ruby