« Back to channel list

#ruby - 05 December 2018

« Back 1 day Forward 1 day »
[00:15:00] hurricanehrndz: has joined #ruby
[00:20:33] hutch: has joined #ruby
[00:29:08] bak1an: has joined #ruby
[00:34:58] zapata: has joined #ruby
[00:36:37] orbyt_: has joined #ruby
[00:49:44] nicesignal: has joined #ruby
[00:53:50] ansraliant: has joined #ruby
[00:54:03] bambanx: has joined #ruby
[00:56:42] cd: has joined #ruby
[01:00:37] blackmesa: has joined #ruby
[01:06:36] cd: has joined #ruby
[01:09:28] hutch: has joined #ruby
[01:09:41] cschneid: has joined #ruby
[01:24:41] nchambers: has joined #ruby
[01:34:04] hutch: has joined #ruby
[01:41:34] cnsvc: has joined #ruby
[01:51:57] Tau: has joined #ruby
[01:56:58] nchambers: has joined #ruby
[02:02:00] cnsvc: has joined #ruby
[02:30:44] esrse: has joined #ruby
[02:32:25] arescorpio: has joined #ruby
[02:32:38] ivanskie: has joined #ruby
[02:34:09] awkwords: has joined #ruby
[02:53:11] jaddison: has joined #ruby
[02:58:44] cliluw: has joined #ruby
[02:59:44] cliluw: has joined #ruby
[03:07:18] za1b1tsu: has joined #ruby
[03:09:34] segy: has joined #ruby
[03:09:49] crankharder: has joined #ruby
[03:16:16] mitt3ns: has joined #ruby
[03:19:02] white_lilies: has joined #ruby
[03:24:33] graphene: has joined #ruby
[03:29:08] arescorpio: has joined #ruby
[03:32:42] Renich: has joined #ruby
[03:34:36] Nicmavr: has joined #ruby
[03:39:43] arescorpio: has joined #ruby
[03:56:24] Freshnuts: has joined #ruby
[04:02:53] hutch: has joined #ruby
[04:03:13] Freshnuts: has joined #ruby
[04:04:31] ivanskie: has joined #ruby
[04:10:38] braincrash: has joined #ruby
[04:20:33] cschneid: has joined #ruby
[04:20:50] cnsvc: has joined #ruby
[04:25:58] bambanxx: has joined #ruby
[04:29:15] jasmith: has joined #ruby
[04:47:58] sauvin: has joined #ruby
[04:50:13] elcontrastador: has joined #ruby
[04:54:36] Renich: has joined #ruby
[05:00:10] bambanx: has joined #ruby
[05:05:44] dellavg_: has joined #ruby
[05:16:31] perique: has joined #ruby
[05:18:22] Renich: has joined #ruby
[05:24:11] _whitelogger: has joined #ruby
[05:27:40] Renich_: has joined #ruby
[05:36:30] Renich_: has joined #ruby
[05:42:20] ayonkhan: has joined #ruby
[06:05:57] reber: has joined #ruby
[06:17:16] akem: has joined #ruby
[06:18:26] \void: has joined #ruby
[06:19:50] jayjo: can jruby be used as a drop in replacement for ruby?
[06:20:01] gix: has joined #ruby
[06:26:30] conta: has joined #ruby
[06:33:43] aupadhye: has joined #ruby
[06:42:43] cschneid: has joined #ruby
[06:49:31] ur5us: has joined #ruby
[06:50:24] aupadhye: has joined #ruby
[06:53:37] Exuma: has joined #ruby
[06:56:37] za1b1tsu: has joined #ruby
[06:57:29] peirama: has joined #ruby
[07:15:26] mangold: has joined #ruby
[07:27:56] chens: has joined #ruby
[07:29:55] ur5us: has joined #ruby
[07:33:46] clemens3: has joined #ruby
[07:44:10] zenspider: jayjo: often
[07:44:38] yxhuvud: has joined #ruby
[08:09:39] johnny56: has joined #ruby
[08:10:11] aufi: has joined #ruby
[08:14:00] cschneid: has joined #ruby
[08:30:03] blackmesa: has joined #ruby
[08:33:01] blackmesa1: has joined #ruby
[08:37:19] hurricanehrndz: has joined #ruby
[08:44:07] KeyJoo: has joined #ruby
[09:01:15] mangold: has joined #ruby
[09:04:30] mikecmpbll: has joined #ruby
[09:05:24] roshanavand: has joined #ruby
[09:10:33] piks3l: has joined #ruby
[09:16:19] blackmesa1: has joined #ruby
[09:19:45] akem: has joined #ruby
[09:31:41] roshanavand: has joined #ruby
[09:50:42] quipa: has joined #ruby
[09:50:45] blackmesa1: has joined #ruby
[09:55:36] themsay: has joined #ruby
[09:56:04] quipa: Hello, relatively new to Ruby been learning about it the last few weeks and enjoying it very much (I come from Python). I noticed that tk is no longer in the standard library and that the github project hasn't had many commits lately. Has it been abandoned or is it just stable enough that it doesn't get much attention from developers? Planning to develop a desktop GUI app with Ruby, shoes4 looks nice but seems to lack standard aspects like 'native' menu bars,
[09:56:09] quipa: sure it seems I can emulate it in other ways but I would prefer something a bit more familiar.
[09:58:26] themsay: has joined #ruby
[09:59:33] themsay: has joined #ruby
[10:07:18] LinuxKnight: has joined #ruby
[10:17:49] zenspider: quipa: afaik, it ships as a gem now but still is in the standard distro. also, not having many commits lately doesn't mean anything. Does it do what you want? then use it.
[10:18:26] quipa: has joined #ruby
[10:20:12] akem: has joined #ruby
[10:26:21] Ring0`: How can I make 0..INF.lazy.each_with_object(..) { ... }.first(5) lazy? it wont stop after 5 iterations
[10:28:26] Zarthus: haven't done ruby in a while, but it sounds like you can just slice it before you .each_* over it?
[10:29:47] Ring0`: I could but I simplified this example. Assume that thie 5 in .first() is a variable based on what happens in each_with_object
[10:30:05] Ring0`: so the 'slice' must occur after each_with_object
[10:34:39] hurricanehrndz: has joined #ruby
[10:34:50] leftylink: interesting. I wonder if you could do take one elemtn, do the `each_with_object` to figure out how many mor elts to take, then get the rest of them
[10:35:13] Beams: has joined #ruby
[10:39:54] cnsvc: has joined #ruby
[10:45:43] Guest12374: has joined #ruby
[10:53:19] gregf_: has joined #ruby
[10:56:43] piks3l: has joined #ruby
[10:56:59] graphene: has joined #ruby
[11:02:57] dinfuehr: has joined #ruby
[11:04:27] phaul: has joined #ruby
[11:13:13] cnsvc: has joined #ruby
[11:13:43] cschneid: has joined #ruby
[11:13:45] lxsameer: has joined #ruby
[11:14:21] leitz: has joined #ruby
[11:17:02] lucasb: has joined #ruby
[11:25:40] kapil____: has joined #ruby
[11:26:07] Terens: has joined #ruby
[11:26:16] Terens: why this doesn't add a \
[11:26:18] Terens: text.gsub(/([&|!(){}\[\]^"~*?:\\'+-])/, "\\1")
[11:38:06] hurricanehrndz: has joined #ruby
[11:42:00] tjbp: has joined #ruby
[11:50:08] quipa: has joined #ruby
[11:51:02] mangold: has joined #ruby
[11:51:15] jhaig: has joined #ruby
[11:51:27] quipa: has joined #ruby
[11:53:21] TheBloke: has joined #ruby
[11:53:33] jhaig: Hi. Were can I view open issues in core libraries? Specifically logger.rb. Thanks.
[11:58:17] jhass: your best bet is https://bugs.ruby-lang.org/projects/ruby-trunk/search?utf8=%E2%9C%93&q=logger&scope=&all_words=&all_words=1&titles_only=&titles_only=1&issues=1&open_issues=1&attachments=0&options=0&commit=Submit
[11:59:23] jhaig: Thanks, jhass
[12:10:10] dbz: has joined #ruby
[12:11:57] cnsvc: has joined #ruby
[12:19:01] dinfuehr_: has joined #ruby
[12:19:21] paranoicsan: has joined #ruby
[12:32:02] GodFather: has joined #ruby
[12:33:01] jaddison_: has joined #ruby
[12:40:51] dionysus69: so I have this task to solve
[12:41:37] dionysus69: I need to run 6 ssh tunnels from ruby, I can't obviously run them with 6 execs since on the first one, the process will be replaces
[12:41:57] dionysus69: so, do I run first 5 with system and then the last one with exec?
[12:42:35] dionysus69: I don't want to run them in separate rake jobs since it will take abnormaly long and resource spike will be high too
[12:43:28] cschneid: has joined #ruby
[12:50:24] jhaig: Could you fork six times and then use exec in each?
[12:50:38] dionysus69: and how exactly do I do that :D ?
[12:53:16] jhaig: Does this help? https://stackoverflow.com/questions/307070/how-do-you-spawn-a-child-process-in-ruby
[12:53:22] dionysus69: jhaig: so fork 5 times and exec on last one?
[12:54:00] jhaig: Also, do you need to use a system command (with exec or system) or might it be possible to do what you want in Ruby?
[12:54:47] dionysus69: well I am launching an ssh tunnel so in the end it has to be a non ruby process
[12:54:54] dionysus69: I am just using ruby to launch all this
[12:57:47] jhass: 1) why use ruby for this over a shellscript? 2) why can't the ruby process be allowed to live on? 3) fork & exec is just reimplementing system()
[12:57:59] jhaig: Or could you just use system six times, with no forks or execs? Does the system not return?
[12:58:19] jhass: ah right it doesn't, system -> spawn
[12:58:51] reber: has joined #ruby
[12:59:09] jhaig: Unless there is more to do I would agree with jhass, that you could probably do this more easily in a simple shell script.
[12:59:17] dionysus69: I use ruby because I have some secret credentials taken from the rails env, in script I would have to rely on env vars, plus I am not that good at bash
[13:00:17] jhass: for this simple case it'd be just what'd you write on the commandline and tacking an & at the end, but if you need secrets okay
[13:00:56] jhaig: To do it within Ruby this might be helpful - http://www.railstips.org/blog/archives/2011/04/19/ssh-tunneling-in-ruby/ (but I don't know exactly what you are trying to do so it may not be relevant)
[13:01:43] jhass: albeit if it's just one or two secret="$(ruby -ryaml -e "print YAML.load_file('config/secrets.yml')[ENV['RAILS_ENV']['secret']")" isn't too bad
[13:02:13] dionysus69: so I fork 5 times and exec inside each of them and then exec from my main process too. this is so far what I came up with
[13:02:22] jhass: no, use spawn
[13:02:25] jhass: don't reimplement it
[13:02:36] dionysus69: well, I use rails credentials Rails.credentials[:cool_hash]
[13:03:05] dionysus69: ok I will look what spawn does exactly
[13:03:11] dionysus69: but the result will be the same right?>
[13:04:22] blackmesa1: has joined #ruby
[13:05:17] jhass: actually try if you can just spawn six times and let the parent die, I'd expect the childs to get reparented
[13:09:06] roshanavand: has joined #ruby
[13:12:37] cnsvc: has joined #ruby
[13:12:43] dionysus69: couldnt really get how spawn works
[13:12:50] dionysus69: whats wrong with if I use fork :)
[13:15:53] bmurt: has joined #ruby
[13:19:11] mostlybadfly: has joined #ruby
[13:27:22] dionysus69: anyways, thanks for putting mine derailed self back on rails :P
[13:31:58] bhaak: has joined #ruby
[13:34:35] jhass: spawn literally is fork & exec
[13:34:55] jhass: system is fork, exec & waitpid
[13:36:33] jhass: Kernel#` is fork, reopen stdout to a pipe in the parent, exec, read that pipe in the parent a& waitpid
[13:37:14] jhass: and then there's the open3 stdlib giving you a shitload more wrappers and options around doing fork & exec
[13:37:27] jhass: because it's actually hard to catch all the edge cases of doing it proper
[13:39:07] roshanavand: has joined #ruby
[13:42:57] keden: has joined #ruby
[13:46:33] bak1an: has joined #ruby
[13:47:58] bak1an: has joined #ruby
[13:51:59] GodFather: has joined #ruby
[13:52:28] bak1an: has joined #ruby
[13:58:56] roshanavand: has joined #ruby
[14:11:48] apparition: has joined #ruby
[14:13:02] cnsvc: has joined #ruby
[14:14:46] Nicmavr: has joined #ruby
[14:15:03] crankharder: has joined #ruby
[14:16:19] cschneid: has joined #ruby
[14:17:19] eclm: has joined #ruby
[14:24:55] code_zombie: has joined #ruby
[14:46:24] Rapture: has joined #ruby
[14:53:20] lxsameer: has joined #ruby
[14:56:19] cschneid: has joined #ruby
[14:57:12] za1b1tsu: has joined #ruby
[15:02:06] zapata: has joined #ruby
[15:02:54] vondruch_: has joined #ruby
[15:03:35] rippa: has joined #ruby
[15:09:41] jayjo: I'm getting an error when trying to use commands like 'bundle install': Unknown ruby interpreter version (do not know how to handle): >=2.2,<3.0.
[15:10:05] jhass: what's bundle -v?
[15:10:05] jayjo: I'm using the phusion passenger docker image, actually, but not sure where this error comes from
[15:10:23] jhass: maybe something for #passenger or whatever the channel was
[15:10:38] jayjo: Bundler version 1.17.1
[15:10:47] nchambers: has joined #ruby
[15:11:13] jayjo: which is the october 25, 2018 release
[15:12:29] jhass: does your Gemfile have a "ruby" line?
[15:12:35] jhass: if so, what is it?
[15:13:10] jayjo: it is here: https://github.com/helpyio/helpy/blob/master/Gemfile#L210 `ruby '>= 2.2', '< 3.0'`
[15:14:48] jhass: and ypur ruby version is what?
[15:15:31] jayjo: ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-linux]
[15:17:07] crankharder: has joined #ruby
[15:17:41] jhass: mh, seems fine. As a workaround removing that line from the Gemfile should help
[15:21:40] Inline: has joined #ruby
[15:23:27] paranoicsan: has joined #ruby
[15:26:35] salasrod: has joined #ruby
[15:30:52] lxsameer: has joined #ruby
[15:31:23] mangold: has joined #ruby
[15:32:20] hutch: has joined #ruby
[15:35:11] akem: has joined #ruby
[15:36:16] lxsameer: has joined #ruby
[15:44:57] GodFather: has joined #ruby
[15:47:10] lxsameer: has joined #ruby
[15:47:13] cnsvc: has joined #ruby
[15:49:32] Beams: has joined #ruby
[15:49:39] fluxAeon: has joined #ruby
[15:50:12] Renich: has joined #ruby
[15:50:57] sgen: has joined #ruby
[15:56:35] white_lilies: has joined #ruby
[15:59:52] sgen: has joined #ruby
[16:00:03] tjmcginnis: has joined #ruby
[16:00:37] yokel: has joined #ruby
[16:01:46] AJA4350: has joined #ruby
[16:03:33] cschneid: has joined #ruby
[16:05:44] blackmesa1: has joined #ruby
[16:13:10] reber: has joined #ruby
[16:14:58] graphene: has joined #ruby
[16:16:04] awkwords: has joined #ruby
[16:17:43] chouhoulis: has joined #ruby
[16:18:57] Beams: has joined #ruby
[16:23:47] patr0clus: has joined #ruby
[16:32:26] polishdub: has joined #ruby
[16:38:41] Nicmavr: has joined #ruby
[16:40:23] sgen: has joined #ruby
[16:46:29] lxsameer: has joined #ruby
[17:07:50] dr3wo: has joined #ruby
[17:12:00] bambanx: has joined #ruby
[17:15:16] crankharder: has joined #ruby
[17:19:40] cnsvc: has joined #ruby
[17:19:56] cthulchu: has joined #ruby
[17:24:52] fluxAeon: has joined #ruby
[17:36:18] gix: has joined #ruby
[17:36:59] gregf_: has joined #ruby
[17:52:01] ivanskie: has joined #ruby
[17:52:28] Iambchop: has joined #ruby
[17:54:18] scrooloose: has joined #ruby
[17:59:17] eckhardt_: has joined #ruby
[18:02:39] guardian: hello, when using ERB with trim_mode set to '<>', is it expected that the input string "<%= 'foo' %>\n<%= 'bar' %>' produces "foobar" ?
[18:04:53] lucasb: has joined #ruby
[18:12:38] tdy: has joined #ruby
[18:13:13] \void: has joined #ruby
[18:13:42] guardian: in fact where could I get more information about trim_mode and consequences of each value?
[18:14:09] dbz: has joined #ruby
[18:14:48] mikecmpbll: has joined #ruby
[18:14:53] dbz: has joined #ruby
[18:15:58] hutch: has joined #ruby
[18:16:32] blackmesa1: has joined #ruby
[18:17:46] crankharder: has joined #ruby
[18:19:18] al2o3-cr: &ri ERB.new guardian
[18:19:18] rubydoc: guardian: Found no entry that matches class ERB class method new
[18:19:27] al2o3-cr: https://ruby-doc.org/stdlib-2.5.3/libdoc/erb/rdoc/ERB.html#method-c-new
[18:28:59] Aqo: has joined #ruby
[18:29:38] nchambers: has joined #ruby
[18:32:00] rubydoc: Found no entry that matches class ERB
[18:33:12] dellavg_: has joined #ruby
[18:35:22] blackmesa1: has joined #ruby
[18:50:26] Tau: has joined #ruby
[18:52:48] cnsvc: has joined #ruby
[18:58:11] hiroaki: has joined #ruby
[19:00:44] orbyt_: has joined #ruby
[19:11:33] crankharder: has joined #ruby
[19:33:31] mostlybadfly: has joined #ruby
[19:40:37] akem: has joined #ruby
[19:45:19] weaksauce: has joined #ruby
[19:45:56] mochiyoda: has joined #ruby
[19:49:20] white_lilies: has joined #ruby
[19:55:55] cd: has joined #ruby
[20:03:02] Lytol: has joined #ruby
[20:03:32] nolanv: has joined #ruby
[20:09:41] harmaahylje: has joined #ruby
[20:13:05] tdy: has joined #ruby
[20:17:40] Renich: has joined #ruby
[20:19:44] Dbugger: has joined #ruby
[20:23:34] orbyt_: has joined #ruby
[20:31:45] jayjo: what does it mean if I get the error `rake aborted! ArgumentError: non-absolute home`
[20:34:03] Zarthus: sounds like it's given a relative path for the $HOME, a blind guess
[20:43:03] ellcs: has joined #ruby
[21:07:33] cnsvc: has joined #ruby
[21:10:35] nolanv: has joined #ruby
[21:10:50] akem: has joined #ruby
[21:14:00] nolanv: has joined #ruby
[21:17:49] tag: has joined #ruby
[21:22:10] roshanavand: has joined #ruby
[21:27:22] Guest12374: has joined #ruby
[21:30:22] havenwood: jayjo: Are you using something embedding mruby, like H20?
[21:30:58] havenwood: jayjo: https://github.com/mruby/mruby/blob/9516731329a9d43b4aab57a19fb9cfc1b62f11e8/mrbgems/mruby-io/src/file.c#L300
[21:32:40] blackmesa1: has joined #ruby
[21:32:47] blackswan: has joined #ruby
[21:33:13] fluxAeon: has joined #ruby
[21:38:03] Freshnuts: has joined #ruby
[21:43:59] graphene: has joined #ruby
[21:48:20] akem: has joined #ruby
[21:52:14] rkoller: has joined #ruby
[21:59:05] Rapture: has joined #ruby
[22:05:23] graphene: has joined #ruby
[22:30:43] Guest12374: has joined #ruby
[22:34:39] crankharder: has joined #ruby
[22:36:41] serard: has joined #ruby
[22:36:57] serard: I have this : https://pastebin.com/AuxN5ut1 someone can help ? Thank you very much
[22:36:57] ruby[bot]: serard: as I told you already, please use https://gist.github.com
[22:37:17] shenghi: has joined #ruby
[22:37:26] serard: https://gist.github.com/stephaneerard/cafae3a1b81b3fa16f476f3cce2010d1 here it is
[22:48:32] al2o3-cr: serard: hash.each { |k, v| puts k, v }
[22:50:46] al2o3-cr: serard: jenkins_slaves_ips.each { |k, v| puts "#{k}\t#{v}" }
[22:50:52] akem: has joined #ruby
[22:52:50] akem: has joined #ruby
[23:13:28] Tom-_: has joined #ruby
[23:14:36] brandonkal: has joined #ruby
[23:15:54] awkwords: has joined #ruby
[23:21:59] orbyt_: has joined #ruby
[23:29:08] vondruch_: has joined #ruby
[23:31:07] akem: has joined #ruby
[23:34:19] NightMonkey: has joined #ruby
[23:44:55] graphene: has joined #ruby