« Back to channel list

#ruby - 03 April 2019

« Back 1 day Forward 1 day »
[00:00:00] t0xik: has joined #ruby
[00:04:26] jenrzzz: has joined #ruby
[00:09:49] i1nfusion: has joined #ruby
[00:18:58] i1nfusion: has joined #ruby
[00:19:08] Axy: has joined #ruby
[00:22:04] evdubs: has joined #ruby
[00:26:19] Mia: has joined #ruby
[00:26:19] Mia: has joined #ruby
[00:30:08] orbyt_: has joined #ruby
[00:34:57] kapil____: has joined #ruby
[00:47:39] dinfuehr: has joined #ruby
[00:52:22] jenrzzz: has joined #ruby
[00:58:47] xall: has joined #ruby
[01:01:49] xall: What is considered more idiomatic for taking a slice of an Array: array[0..idx] OR array.slice(0..idx) ?
[01:06:10] _whitelogger: has joined #ruby
[01:10:02] cthu|: has joined #ruby
[01:10:08] Tempesta_: has joined #ruby
[01:11:31] rf`: has joined #ruby
[01:11:55] agit0: has joined #ruby
[01:12:39] fmccann: has joined #ruby
[01:12:40] havenwood: has joined #ruby
[01:12:43] havenwood: has joined #ruby
[01:12:52] rubydoc: has joined #ruby
[01:14:00] gb_away: has joined #ruby
[01:14:10] adam12: xall: Array.slice is likely more intent revealing if you're going for that.
[01:14:55] dar123: has joined #ruby
[01:15:37] ricer2: has joined #ruby
[01:16:04] Psy-Q: has joined #ruby
[01:17:20] zenspider: has joined #ruby
[01:17:24] akosednar: has joined #ruby
[01:17:30] Lyubo1: has joined #ruby
[01:17:32] d^sh: has joined #ruby
[01:17:33] tdy: has joined #ruby
[01:17:34] akosednar: has joined #ruby
[01:17:47] daemonwrangler: has joined #ruby
[01:18:25] c0san0stra: has joined #ruby
[01:19:42] xall: adam12: Thanks. I agree
[01:21:21] tdy: has joined #ruby
[01:30:46] uranoss: has joined #ruby
[01:37:03] Dirak: has joined #ruby
[01:40:55] dtzuzu: has joined #ruby
[01:43:40] Axy: has joined #ruby
[01:53:33] raul782: has joined #ruby
[01:56:40] duderonomy: has joined #ruby
[02:11:54] mangold: has joined #ruby
[02:17:38] esrse: has joined #ruby
[02:25:25] hoffentl1chja: has joined #ruby
[02:37:00] sp3ncer: has joined #ruby
[02:41:09] DmitryBochkarev: has joined #ruby
[02:44:03] znz_jp: has joined #ruby
[02:54:48] doodlebug: has joined #ruby
[03:00:04] dar123: has joined #ruby
[03:09:26] Puffball: has joined #ruby
[03:09:34] mangold: has joined #ruby
[03:09:56] braincrash: has joined #ruby
[03:11:02] jenrzzz: has joined #ruby
[03:18:10] _whitelogger: has joined #ruby
[03:25:52] CommanderViral: has joined #ruby
[03:33:12] raul782: has joined #ruby
[03:33:17] CommanderViral: has joined #ruby
[03:34:18] raul782: has joined #ruby
[04:01:04] jenrzzz: has joined #ruby
[04:18:50] ur5us: has joined #ruby
[04:19:46] m27frogy: has joined #ruby
[04:25:01] iMadper: has joined #ruby
[04:28:14] ur5us: has joined #ruby
[04:31:55] StarSeed0000: has joined #ruby
[04:43:46] DmitryBochkarev: has joined #ruby
[04:47:22] ur5us: has joined #ruby
[04:53:05] dar123: has joined #ruby
[04:53:49] symm-: has joined #ruby
[05:00:58] ferr: has joined #ruby
[05:02:29] mangold: has joined #ruby
[05:03:20] Swyper: has joined #ruby
[05:13:33] zlogan: has joined #ruby
[05:15:22] conta: has joined #ruby
[05:15:45] sauvin: has joined #ruby
[05:31:21] Mario60333: has joined #ruby
[05:35:04] raul782: has joined #ruby
[05:38:54] moei: has joined #ruby
[05:42:09] _whitelogger: has joined #ruby
[05:45:29] v01d4lph4: has joined #ruby
[05:46:16] v01d4lph4: has joined #ruby
[05:52:37] Dbugger: has joined #ruby
[05:55:52] reber: has joined #ruby
[05:56:50] govg: has joined #ruby
[05:59:04] Dbugger: has joined #ruby
[06:05:59] schleppel: has joined #ruby
[06:10:04] dionysus69: has joined #ruby
[06:11:07] Ai9zO5AP: has joined #ruby
[06:13:26] aufi: has joined #ruby
[06:16:04] ur5us: has joined #ruby
[06:19:30] Puffball_: has joined #ruby
[06:26:41] mangold: has joined #ruby
[06:27:49] teej: has joined #ruby
[06:28:12] hightower2: has joined #ruby
[06:29:50] Furai: has joined #ruby
[06:30:13] hightower2: has joined #ruby
[06:30:54] ellcs1: has joined #ruby
[06:50:16] doodlebug: has joined #ruby
[06:52:34] segy: has joined #ruby
[06:59:27] skarlso: has joined #ruby
[07:11:28] clemens3: has joined #ruby
[07:12:01] v01d4lph4: has joined #ruby
[07:17:04] TomyWork: has joined #ruby
[07:17:46] shortdudey123: has joined #ruby
[07:24:59] aupadhye: has joined #ruby
[07:26:46] briarcliff: has joined #ruby
[07:30:12] _whitelogger: has joined #ruby
[07:34:58] lxsameer: has joined #ruby
[07:35:51] dionysus69: has joined #ruby
[07:45:15] moei: has joined #ruby
[07:49:31] jmcgnh: has joined #ruby
[07:59:36] mikecmpbll: has joined #ruby
[07:59:37] kyrylo: has joined #ruby
[08:17:25] iMadper: has joined #ruby
[08:25:35] v01d4lph4: has joined #ruby
[08:33:34] briarcliff: has joined #ruby
[08:34:17] ellcs1: has joined #ruby
[08:38:13] chrissofer255: has joined #ruby
[08:38:21] claw: has joined #ruby
[08:41:30] segy: has joined #ruby
[08:51:01] jinie: has joined #ruby
[08:52:43] ur5us: has joined #ruby
[09:01:12] dhollin3: has joined #ruby
[09:11:13] briarcliff: has joined #ruby
[09:33:18] ur5us: has joined #ruby
[09:33:58] Mario60333: has joined #ruby
[09:46:41] Caerus: has joined #ruby
[09:51:51] Nicmavr: has joined #ruby
[09:53:09] v01d4lph4: has joined #ruby
[09:59:33] ur5us: has joined #ruby
[10:02:19] v01d4lph4: has joined #ruby
[10:02:57] sidx64_: has joined #ruby
[10:08:09] RougeR: has joined #ruby
[10:12:37] conta: has joined #ruby
[10:16:23] v01d4lph4: has joined #ruby
[10:20:03] sidx64: has joined #ruby
[10:24:49] keden: ACTION waves at RougeR
[10:30:13] skarlso: hi everyone.
[10:30:26] skarlso: I was wondering if someone also faced this problem.... :)
[10:30:56] skarlso: I have a bundler install and I need to use a specific ruby version. I don't / can't have/use rvm...
[10:31:24] skarlso: The only ways I saw were to either hack a PATH with a ruby binary. ( this is not so good since the binary is not called ruby it's called ruby2.5 )
[10:32:01] skarlso: Or edit the installed bundler's shebang to be not be `#!/usr/bin/env ruby` but rather `#!/usr/bin/env ruby2.5`.
[10:32:24] skarlso: Which is not a nice option either... :/ Is there anything else I might be missing that could be done in a case like this?
[10:32:36] skarlso: I cannot change system ruby.
[10:32:40] skarlso: That's not an option. :(
[10:33:23] skarlso: fyi,system ruby is old as dirt... that's why I need to avoid it but can't change it
[10:36:45] AJA4350: has joined #ruby
[10:45:04] briarcliff: has joined #ruby
[10:46:59] RougeR: skarlso, is rbenv an option
[10:47:08] RougeR: its much less invasive than rvm
[10:47:24] skarlso: I don't know rbenv.
[10:47:29] skarlso: Thanks, let me look it up. :)
[10:47:39] RougeR: it just adds shims to the path rather than overwriting various system methods
[10:47:41] RougeR: i far prefer it
[10:48:36] RougeR: even if its not an option. have a look how it works
[10:48:36] skarlso: Looks very promising!
[10:48:44] skarlso: Thank you. :)
[10:48:51] skarlso: that might just get me out of this ditch
[10:48:51] RougeR: good to hear, have a go with that. i recently swapped to it from RVM
[10:49:00] RougeR: so if you run into issues might be able to help
[10:49:22] skarlso: Thanks! I'll have a go with it. :)
[10:55:37] Ai9zO5AP: has joined #ruby
[11:02:57] sidx64_: has joined #ruby
[11:09:08] akem: has joined #ruby
[11:18:56] ryouba: has joined #ruby
[11:19:26] symm-: has joined #ruby
[11:20:46] apparition: has joined #ruby
[11:21:41] ryouba: in str = "DamaskusLibAssad_1980Hafiz_1", with possibly more stuff after the second _ (even possibly more underscores), do you think "*firsttwo, anythingafter = str.split '_'; firsttwo = firsttwo.join('_');" is the safest way of splitting at the second _?
[11:23:54] phaul: no, that's broken
[11:24:12] phaul: &>> *a, b = [1,2,3,4,5,6] ; a
[11:24:14] rubydoc: # => [1, 2, 3, 4, 5] (https://carc.in/#/r/6n6u)
[11:24:59] ryouba: but your input data is completely different from my input data.
[11:25:32] phaul: but it demonstrates that if you splat the first var, then it can eat more than two array element
[11:26:21] phaul: &>> a, b, * c = [10,20,3,4,5,6] ; a + b
[11:26:22] rubydoc: # => 30 (https://carc.in/#/r/6n6v)
[11:27:18] ryouba: thank you phaul :)
[11:35:08] ellcs1: has joined #ruby
[11:37:30] v01d4lph4: has joined #ruby
[11:42:24] ldnunes: has joined #ruby
[11:42:54] hightower3: has joined #ruby
[11:43:29] mangold: has joined #ruby
[12:05:44] jenrzzz: has joined #ruby
[12:13:30] hightower3: has joined #ruby
[12:15:19] symm-: has joined #ruby
[12:16:13] doodleb25: has joined #ruby
[12:19:01] Swyper: has joined #ruby
[12:20:08] lucasb: has joined #ruby
[12:25:22] griffindy: has joined #ruby
[12:28:25] v01d4lph4: has joined #ruby
[12:36:12] Ai9zO5AP: has joined #ruby
[12:38:51] v01d4lph4: has joined #ruby
[12:40:04] v01d4lph4: has joined #ruby
[12:40:31] v01d4lph4: has joined #ruby
[12:41:17] v01d4lph4: has joined #ruby
[12:41:31] catbusters: has joined #ruby
[12:41:56] v01d4lph4: has joined #ruby
[12:42:33] v01d4lph4: has joined #ruby
[12:47:10] prestorium: has joined #ruby
[12:47:41] prestorium: has joined #ruby
[13:03:30] doodlebug: has joined #ruby
[13:07:37] Ai9zO5AP: has joined #ruby
[13:11:07] doodleb0: has joined #ruby
[13:15:30] doodlebug: has joined #ruby
[13:18:17] AJA4350: has joined #ruby
[13:24:12] v01d4lph4: has joined #ruby
[13:27:38] UncleCid__: has joined #ruby
[13:33:16] shtirlic: has joined #ruby
[13:40:53] dar123: has joined #ruby
[13:55:42] segy: has joined #ruby
[13:57:55] Rapture: has joined #ruby
[14:00:55] vondruch_: has joined #ruby
[14:05:33] i1nfusion: has joined #ruby
[14:06:00] jenrzzz: has joined #ruby
[14:12:04] brool: has joined #ruby
[14:25:28] i1nfusion: has joined #ruby
[14:25:48] conta: has joined #ruby
[14:34:42] Arkentias: has joined #ruby
[14:34:54] kyrylo: has joined #ruby
[14:36:32] Arkentias: Hello guys! Given a multi-dimensional JSON object, I would want to get the list of all the "dead-end" attributes in dot notation. A dead-end attribute being one that is not an object or array (only objects in my case).
[14:36:52] Arkentias: So for example this : { "breadcrumb": { "accueil": "Home" }, "donate_form_block": { "type_text": "Text" } }
[14:37:13] Arkentias: Would just give me : ["breadcrumb.accueil","donate_form_block.type_text"]
[14:37:35] Arkentias: (Sorry I meant dead-end attribute's KEYS)
[14:39:39] Arkentias: It can't be that hard but I wonder if there is a "clean" way to do that and avoid manually looping over everything
[14:42:29] Arkentias: I guess I'll just make a recursive function
[14:43:05] bougyman: That's what I was just about to say
[14:43:40] bougyman: You have to keep doing an #each_key.map onto the arrays so long as the obj responds to #each_key, and just add on to the arrays. At the end, just join the array strings on dots.
[14:44:46] bougyman: [2] pry(main)> s = { "breadcrumb": { "accueil": "Home" }, "donate_form_block": { "type_text": "Text" } }
[14:44:49] bougyman: => {:breadcrumb=>{:accueil=>"Home"}, :donate_form_block=>{:type_text=>"Text"}}
[14:44:52] bougyman: [3] pry(main)> s.each_key.map { |k| a = [k]; next a unless s[k].respond_to? :key?; s[k].each_key { |ik| a << ik }; a }.map { |arr| arr.map(&:to_s).join('.') }
[14:44:55] bougyman: => ["breadcrumb.accueil", "donate_form_block.type_text"]
[14:44:57] bougyman: like that, but recursively
[14:45:22] Arkentias: Thanks! I'll look into that then :)
[14:51:26] gix: has joined #ruby
[14:54:45] Wallace: has joined #ruby
[14:55:53] Wallace: has joined #ruby
[14:56:00] crankharder: has joined #ruby
[14:56:35] Wallace: has joined #ruby
[14:56:56] Wallace: has joined #ruby
[14:59:32] wallace_mu: has joined #ruby
[15:00:51] spacesuitdiver: has joined #ruby
[15:02:07] Pankoek: has joined #ruby
[15:03:03] Wallace: has joined #ruby
[15:04:05] wallace_mu: has joined #ruby
[15:04:18] houhoulis: has joined #ruby
[15:05:23] wallace_mu: has joined #ruby
[15:05:25] prestori_: has joined #ruby
[15:05:28] crankharder: has joined #ruby
[15:05:56] wallace_mu: has joined #ruby
[15:07:28] wallace_mu: has joined #ruby
[15:08:13] i1nfusion: has joined #ruby
[15:08:35] wallace_mu: has joined #ruby
[15:09:57] wallace_mu: has left #ruby: ()
[15:12:40] Swyper: has joined #ruby
[15:14:05] tdy: has joined #ruby
[15:14:32] dionysus70: has joined #ruby
[15:15:06] aufi: has joined #ruby
[15:17:38] orbyt_: has joined #ruby
[15:20:18] wallace_mu: has joined #ruby
[15:22:07] polishdub: has joined #ruby
[15:24:34] tdy: has joined #ruby
[15:26:54] wallace_mu: has joined #ruby
[15:29:46] wallace_mu: has joined #ruby
[15:33:15] wallace_mu: has joined #ruby
[15:33:15] rippa: has joined #ruby
[15:37:36] i1nfusion: has joined #ruby
[15:47:26] crankharder: has joined #ruby
[15:48:22] skarlso: RougeR it ended up being a lot easier
[15:49:00] RougeR: skarlso, rbenv worked for you?
[15:49:24] skarlso: I can call bundle with `/usr/bin/ruby2.5 bundle env` which will use the correct version of Ruby and the correct path and gem file locations.
[15:49:44] skarlso: I mean the bundle that was installed
[15:49:48] RougeR: nice, glad that is working
[15:50:09] skarlso: Yeah it was awesome cause I stole that idea from rbenv
[15:50:14] RougeR: im still trying to get sinatra to work with AR 5.X
[15:50:22] RougeR: yeah thats basically how rbenv works. just shims the paths
[15:51:17] skarlso: Using all these versions is so annoying
[15:51:21] skarlso: And frustrating
[16:06:17] jenrzzz: has joined #ruby
[16:08:45] orbyt_: has joined #ruby
[16:14:18] Inline: has joined #ruby
[16:14:20] StarSeed0000: has joined #ruby
[16:14:43] orbyt_: has joined #ruby
[16:25:33] jcarl43: has joined #ruby
[16:26:13] orbyt_: has joined #ruby
[16:29:39] Swyper: has joined #ruby
[16:39:31] i1nfusion: has joined #ruby
[16:45:18] tin: has left #ruby: ("Leaving")
[16:47:49] symm-: has joined #ruby
[16:52:29] Tau: has joined #ruby
[16:55:21] AzizLight: has joined #ruby
[16:55:57] ravenousmoose: has joined #ruby
[16:56:57] Cthulu201: has joined #ruby
[17:10:06] ldnunes: has joined #ruby
[17:14:59] conta: has joined #ruby
[17:17:40] DmitryBochkarev: has joined #ruby
[17:27:44] dar123: has joined #ruby
[17:41:18] DmitryBochkarev: has joined #ruby
[17:42:13] nowhere_man: has joined #ruby
[17:43:15] ravenousmoose: has joined #ruby
[17:44:05] crankharder: has joined #ruby
[17:44:15] zachk: has joined #ruby
[17:45:23] code_zombie: has joined #ruby
[17:53:15] orbyt_: has joined #ruby
[17:54:56] wildermind: has joined #ruby
[17:56:58] zachk: has joined #ruby
[17:57:36] Dirak: has joined #ruby
[18:06:32] jenrzzz: has joined #ruby
[18:17:09] ellcs1: has joined #ruby
[18:20:13] StarSeed0000: has joined #ruby
[18:25:30] dviola: has joined #ruby
[18:35:18] nowhereman: has joined #ruby
[18:53:14] DmitryBochkarev: has joined #ruby
[19:09:14] alem0lars: has joined #ruby
[19:17:43] sidx64: has joined #ruby
[19:17:43] SeepingN: has joined #ruby
[19:18:29] LtHummus: has joined #ruby
[19:22:51] Xeago_: has joined #ruby
[19:23:28] LtHummus: has joined #ruby
[19:41:28] duderonomy: has joined #ruby
[19:44:59] doodlebug: has joined #ruby
[19:45:27] doodlebug: has joined #ruby
[19:51:23] orbyt_: has joined #ruby
[19:58:56] eckhardt: has joined #ruby
[20:03:34] Dirak: has joined #ruby
[20:04:04] lxsameer: has joined #ruby
[20:07:43] galaxie: has joined #ruby
[20:10:28] jenrzzz: has joined #ruby
[20:11:54] ur5us: has joined #ruby
[20:18:26] PercyThrillingto: has joined #ruby
[20:19:05] PercyThrillingto: Hey there. I've accidentally entered the `erb` instead of the `irb` and I can't figure out how to exit it. Any clues?
[20:19:30] adam12: PercyThrillingto: How about ctrl-d
[20:19:54] PercyThrillingto: Nothing from that
[20:20:07] adam12: PercyThrillingto: Surprising. What OS are you running?
[20:20:11] Swyper: has joined #ruby
[20:20:23] PercyThrillingto: It's a git-bash shell on Windows 10, but I think it should pass through
[20:20:39] PercyThrillingto: The only output I can get is that it intercepts <Ctrl-Z>
[20:20:43] adam12: PercyThrillingto: It should. Ctrl-d is like a universal close STDIN kinda deal.
[20:21:00] adam12: PercyThrillingto: You could ctrl-z, find the job using jobs, then kill -9 %jobid
[20:21:16] PercyThrillingto: 658069555 [sig] env 2892! sigpacket::process: Suppressing signal 18 to win32 process (pid 0)
[20:21:24] PercyThrillingto: It keeps me from backgrounding it
[20:21:39] PercyThrillingto: Tried getting the process id from another git-bash shell and it won't die from kill -9
[20:21:48] adam12: PercyThrillingto: this is likely not an erb issue then, tbh.
[20:22:16] PercyThrillingto: The standard Ctrl commands work for everything else
[20:22:34] PercyThrillingto: I've just mistyped `erb` while trying to get into `irb` a few times
[20:22:47] PercyThrillingto: And have been unable to exit it at all :(
[20:23:55] PercyThrillingto: If I'm not using the erb tool, will Ruby get upset if I remove it from the bin directory of the install?
[20:24:44] adam12: PercyThrillingto: It shouldnt'. You could just alias erb='irb' too.
[20:24:59] PercyThrillingto: oh, that's a better option. Thanks!
[20:25:20] adam12: PercyThrillingto: The fact that ctrl-d and ctrl-z don't work is suspect, but with it being in git-bash .. not likely going to have too many people looking at it.
[20:26:02] PercyThrillingto: Yeah, I don't like the environment either, but it's what I'm deploying to so I'm stuck in it for the moment
[20:26:48] catbusters: has joined #ruby
[20:28:01] Dirak: has joined #ruby
[20:28:24] havenwood: PercyThrillingto: ctrl-\
[20:31:29] Paraxial: has joined #ruby
[20:31:36] Nicmavr: has joined #ruby
[20:32:12] ua: has joined #ruby
[20:33:09] hiroaki: has joined #ruby
[20:34:54] jenrzzz_: has joined #ruby
[20:35:41] Terens: has joined #ruby
[20:40:44] wald0: has joined #ruby
[20:42:22] Mario60333: has joined #ruby
[20:44:05] Paraxial: has joined #ruby
[20:57:15] tweaks: has joined #ruby
[21:23:54] cd: has joined #ruby
[21:24:19] mamantoha: has joined #ruby
[21:25:58] mochiyoda: has joined #ruby
[21:26:14] PercyThrillingto: havenwood: no response for <Ctrl-\> either
[21:27:07] fredolinhares: has joined #ruby
[21:27:28] segy: has joined #ruby
[21:43:43] mamantoha: has joined #ruby
[21:54:37] jenrzzz: has joined #ruby
[22:01:18] shtirlic: has joined #ruby
[22:03:09] druonysus: has joined #ruby
[22:03:09] druonysus: has joined #ruby
[22:03:14] crankharder: has joined #ruby
[22:07:07] orbyt_: has joined #ruby
[22:07:33] ellcs1: has joined #ruby
[22:12:37] doodlebug: has joined #ruby
[22:15:33] reber: has joined #ruby
[22:15:34] shalok: has joined #ruby
[22:16:30] shalok: Is there any way to use additional CA certs without modifying system files?
[22:17:31] shalok: I don't really want to copy it into /usr/lib/ruby/2.5.0/rubygems/ssl_certs because this will break when I upgrade ruby
[22:19:21] shalok: I guess I could a copy of ruby in my $HOME...
[22:23:51] crankharder: has joined #ruby
[22:27:12] vondruch_: has joined #ruby
[22:29:31] phaul: has joined #ruby
[22:29:41] rubydoc: has joined #ruby
[22:38:51] shtirlic: has joined #ruby
[22:44:04] RiPuk: has joined #ruby
[22:51:54] phaul: has joined #ruby
[22:52:13] rubydoc: has joined #ruby
[22:59:29] crankharder: has joined #ruby
[23:00:24] iNs: has joined #ruby
[23:08:21] jottr: has joined #ruby
[23:09:46] StarSeed0000: has joined #ruby
[23:13:08] AJA4351: has joined #ruby
[23:20:06] mistergibson: has joined #ruby
[23:30:06] cliluw: has joined #ruby
[23:31:47] i1nfusion: has joined #ruby
[23:36:39] crankharder: has joined #ruby
[23:38:38] bambanx: has joined #ruby
[23:39:14] jenrzzz_: has joined #ruby
[23:42:08] m27frogy: has joined #ruby
[23:43:37] phaul: has joined #ruby
[23:46:12] violentE: has joined #ruby
[23:58:34] i1nfusion: has joined #ruby