« Back to channel list

#ruby - 15 February 2019

« Back 1 day Forward 1 day »
[00:04:16] ngw: has joined #ruby
[00:06:17] orbyt_: has joined #ruby
[00:12:26] conta: has joined #ruby
[00:12:28] mitescugd: has joined #ruby
[00:14:21] johnny56_: has joined #ruby
[00:18:02] ansraliant: has joined #ruby
[00:20:32] Renich_: has joined #ruby
[00:24:06] ngw: has joined #ruby
[00:28:15] gravitation: has joined #ruby
[00:40:49] Azure: has joined #ruby
[00:43:56] ngw: has joined #ruby
[00:46:28] cthulchu: has joined #ruby
[00:46:50] octos: has joined #ruby
[00:47:37] Puffball: has joined #ruby
[01:03:38] ngw: has joined #ruby
[01:10:44] AJA4350: has joined #ruby
[01:21:42] orbyt_: has joined #ruby
[01:23:28] ngw: has joined #ruby
[01:31:25] r29v: has joined #ruby
[01:41:56] blackmesa1: has joined #ruby
[01:43:28] ngw: has joined #ruby
[01:47:41] blackmesa1: has joined #ruby
[01:48:04] conta: has joined #ruby
[01:50:58] t0xik: has joined #ruby
[01:56:40] dinfuehr: has joined #ruby
[02:03:22] ngw: has joined #ruby
[02:05:53] blackmesa1: has joined #ruby
[02:12:56] valadares: has joined #ruby
[02:18:56] conta: has joined #ruby
[02:20:31] AJA4351: has joined #ruby
[02:23:10] ngw: has joined #ruby
[02:27:55] orbyt_: has joined #ruby
[02:43:03] ngw: has joined #ruby
[02:46:28] GodFather: has joined #ruby
[02:48:22] skyikot: has joined #ruby
[02:48:24] \void: has joined #ruby
[02:58:04] orbyt_: has joined #ruby
[03:02:52] ngw: has joined #ruby
[03:22:45] ngw: has joined #ruby
[03:27:12] AJA4351: has joined #ruby
[03:33:32] sgen: has joined #ruby
[03:33:47] ogres: has joined #ruby
[03:37:20] ramfjord: You guys know the only thing that sucks about ruby?
[03:38:53] maryo: has joined #ruby
[03:39:49] evdubs: has joined #ruby
[03:42:37] ngw: has joined #ruby
[03:43:35] leftylink: NOW WE'LL NEVER KNOW
[03:46:14] ramfjord_: has joined #ruby
[03:47:28] ramfjord_: is when your coworkers create a nice ruby project, and over the years other coworkers unfamiliar with ruby modify that project, trying to use for loops, creating spaghetti code, and convincing everyone else at your company that ruby is an unreadable language
[03:54:35] Puppet`: doesnt sound like a ruby problem
[03:57:04] oosehedaiphequag: has joined #ruby
[03:58:13] orbyt_: has joined #ruby
[03:58:32] oosehedaiphequag: has left #ruby: ()
[04:01:22] dinfuehr: has joined #ruby
[04:02:31] ngw: has joined #ruby
[04:10:04] braincrash: has joined #ruby
[04:18:13] AJA4351: has joined #ruby
[04:22:20] ngw: has joined #ruby
[04:22:57] pedahzur: has joined #ruby
[04:27:57] conta: has joined #ruby
[04:42:11] ngw: has joined #ruby
[05:01:52] ngw: has joined #ruby
[05:21:52] ngw: has joined #ruby
[05:29:02] conta: has joined #ruby
[05:41:46] ngw: has joined #ruby
[05:50:55] cthulchu: has joined #ruby
[05:56:59] Tempesta: has joined #ruby
[05:58:21] Forager: has joined #ruby
[05:58:47] cthulchu_: has joined #ruby
[06:04:24] cthulchu: has joined #ruby
[06:08:04] sleetdrop: has joined #ruby
[06:13:11] mike`: has joined #ruby
[06:13:52] Guest83485: has left #ruby: ()
[06:15:01] sauvin: has joined #ruby
[06:25:40] conta: has joined #ruby
[06:26:30] ramfjord: has joined #ruby
[06:29:00] tdy1: has joined #ruby
[06:42:51] Mike479: has joined #ruby
[06:43:27] Mike479: pty doesn't work on BSD
[06:43:34] Mike479: any other choice ?
[06:50:49] DTZUZO: has joined #ruby
[07:04:00] aufi: has joined #ruby
[07:14:56] tdy2: has joined #ruby
[07:19:14] Renich: has joined #ruby
[07:22:21] uplime: has joined #ruby
[07:46:43] esrse: has joined #ruby
[07:52:10] dionysus69: has joined #ruby
[07:52:41] CrazyEddy: has joined #ruby
[08:07:54] GinoMan: has joined #ruby
[08:09:10] skryking: has joined #ruby
[08:12:36] ByronJohnson: has joined #ruby
[08:20:33] clemens3: has joined #ruby
[08:21:22] tdy3: has joined #ruby
[08:21:36] prestorium: has joined #ruby
[08:44:28] jinie_: has joined #ruby
[09:13:32] mikecmpbll: has joined #ruby
[09:14:21] blackmesa1: has joined #ruby
[09:25:07] kapil____: has joined #ruby
[09:31:19] lxsameer: has joined #ruby
[09:33:03] deathwishdave: has joined #ruby
[09:39:38] clemens3: has joined #ruby
[09:46:51] ngw: has joined #ruby
[09:53:05] jinie: has joined #ruby
[09:57:35] RougeR: has joined #ruby
[10:11:51] RougeR: anyone able to help with this
[10:11:52] RougeR: https://dpaste.de/fAWf
[10:12:02] RougeR: i want to mock this JobRequest using mocha/minitest
[10:12:18] RougeR: settings is a sinatra feature that i cant figure out how to stub
[10:13:26] RougeR: or i need a way to do this
[10:13:36] RougeR: http://sinatrarb.com/configuration.html
[10:16:43] RougeR: or this maybe
[10:16:43] RougeR: https://www.rubydoc.info/github/floehopper/mocha/Mocha%2FParameterMatchers:has_entries
[10:23:59] mostlybadfly: has joined #ruby
[10:24:45] RougeR: that took all last afternoon
[10:25:24] RougeR: i ended up creating a mock class and including the modules i needed. then stubbing settings to return Sinatra.settings which expects logger
[10:26:54] ramfjord: has joined #ruby
[10:27:18] RougeR: https://dpaste.de/stko
[10:35:57] sagax: how to dump only schema from sqlite3 ?
[10:36:05] sagax: schema without any data
[10:41:10] d^sh: has joined #ruby
[10:42:18] tbuehlmann: sagax: in rails?
[10:44:06] sagax: just in sqlite3 tool
[10:44:59] nowhere_man: has joined #ruby
[10:48:20] tbuehlmann: try this: sqlite3 database.sqlite3 .schema > schema.sql
[10:49:24] tbuehlmann: what does this have to do with ruby in the first place?
[10:51:33] sagax: i use sqlite with ruby
[10:55:09] dostoyevsky: > Exception `SyntaxError' at /home/sck/.gem/ruby/2.3.0/gems/method_source-0.9.0/lib/method_source/code_helpers.rb:71 - (eval):26: syntax error, unexpected end-of-input, expecting keyword_end
[10:55:31] dostoyevsky: pry tells me there is a syntax error in my code?
[10:55:39] conta: has joined #ruby
[10:55:52] dostoyevsky: how did it execute pry in the first place?
[10:57:02] wesley479: has joined #ruby
[10:57:26] wesley479: is there a way to store stderr from system(command) ?
[10:58:32] darix: wesley479: popen3/4 maybe
[11:00:39] wesley479: already tried, with open3, i can store stderr, but stdout is empty (the command is interactive)
[11:00:52] wesley479: using system i can get stdout
[11:01:00] darix: popen should also give you stdout
[11:01:01] wesley479: but no way to store stderr
[11:01:12] wesley479: yes but the command write to tty
[11:01:15] wesley479: so no stdout
[11:01:38] darix: but for driving some interactive program
[11:01:38] wesley479: see it : https://gist.github.com/wesley974/0b398ea078fa06dac8bee06fa277c205
[11:01:44] darix: why not use something like expect
[11:02:05] darix: wesley479: https://stackoverflow.com/questions/7142978/is-there-an-expect-equivalent-gem-for-ruby
[11:02:35] wesley479: i already try expect with pty, i use OpenBSD as system, pty package doesn't work
[11:03:37] darix: and rexpect gem as mentioned at the end?
[11:05:00] wesley479: i'm going to try thks!
[11:06:09] wesley479: darix: rexpect doesn't appear in rubgems.org
[11:06:14] wesley479: and the link doesn't work
[11:06:28] darix: and parley?
[11:06:33] darix: the comment below that
[11:07:44] wesley479: already tried; use pty
[11:08:33] darix: and i guess the expect module in the stdlib does too
[11:08:40] darix: so maybe you should fix PTY :P
[11:08:45] darix: or use a proper OS :P *scnr*
[11:15:23] deathwishdave: has joined #ruby
[11:20:32] markoong: has joined #ruby
[11:23:13] wesley479: darix: how can i fix pty ?
[11:27:40] v01d4lph4: has joined #ruby
[11:43:50] TheBrayn: Where can I find the documentation for the options here: https://ruby-doc.org/stdlib-2.5.3/libdoc/psych/rdoc/Psych.html#method-c-dump
[11:55:16] ellcs: has joined #ruby
[11:57:45] donofrio_: has joined #ruby
[12:02:04] bender_unit: has joined #ruby
[12:06:00] al2o3-cr: TheBrayn: https://ruby-doc.org/stdlib-2.6.1/libdoc/psych/rdoc/Psych.html#method-c-dump these docs show options
[12:11:11] TheBrayn: canonical: true is quite the thing
[12:15:44] lucasb: has joined #ruby
[12:19:18] akem: has joined #ruby
[12:22:21] akem: has joined #ruby
[12:26:18] akem: has joined #ruby
[12:30:09] ngw: has joined #ruby
[12:36:48] AJA4350: has joined #ruby
[12:40:43] xrexeon: has joined #ruby
[12:41:13] ngw: I hate having to find configurations and other assets using __FILE__ and by dealing with a million of ../../.., do you set a project root inside .env of what other improvements you do?
[12:41:21] Cork: is there a way to get DS record data (doesn't have to be parsed) with Resolv::DNS ?
[12:41:25] xrexeon: has joined #ruby
[12:43:51] xrexeon: has joined #ruby
[12:50:09] houhoulis: has joined #ruby
[12:50:18] tdy4: has joined #ruby
[12:57:27] Mike11: has joined #ruby
[12:57:38] tdy: has joined #ruby
[13:18:45] al2o3-cr: has joined #ruby
[13:27:29] darix: Cork: getresource(name, typeclass)
[13:27:35] darix: typeclass can be a string too
[13:27:37] rippa: has joined #ruby
[13:27:40] darix: so I guess the answer is "yes"
[13:28:09] bmurt: has joined #ruby
[13:28:52] Cork: darix: TypeError: "DS" is not a class/module
[13:29:18] Cork: also https://ruby-doc.org/stdlib-2.0.0/libdoc/resolv/rdoc/Resolv/DNS.html#method-i-getresource list a limited list of what you can enter there
[13:29:51] GinoMan2440: has joined #ruby
[13:32:34] Cork: only way to do it that i've found currently is to use the gem dnsruby, but it feels kinda weird that the built in one can't do it
[13:36:27] spiette: has joined #ruby
[13:41:19] darix: Cork: well you can send a patch to ruby-core to add more classes to Resolv::DNS::Resource:: :)
[13:44:50] catbusters: has joined #ruby
[13:46:24] AJA4351: has joined #ruby
[13:59:54] ngw: has joined #ruby
[14:06:32] orbyt_: has joined #ruby
[14:26:40] c-c: has left #ruby: ("ta!")
[14:32:27] KindOna: >> x = "aa"; x.next
[14:32:31] KindOna: what's the inverse of that
[14:32:38] KindOna: (it outputs "ab"
[14:34:10] al2o3-cr: KindOna: there isn't one, #pred is for integers.
[14:34:12] awkwords: has joined #ruby
[14:34:14] krawchyk: has joined #ruby
[14:34:30] KindOna: that's very mildly interesting i suppose
[14:34:45] DTZUZO: has joined #ruby
[14:41:28] al2o3-cr: &>> "zz".succ
[14:41:30] rubydoc: # => "aaa" (https://carc.in/#/r/697q)
[14:42:52] al2o3-cr: the C function str_succ is quite complex for what it does.
[14:43:37] phaul: &>> 'aag!!'.succ
[14:43:39] rubydoc: # => "aah!!" (https://carc.in/#/r/697t)
[14:44:27] al2o3-cr: &>> "\x7f".succ
[14:44:27] rubydoc: # => "\x01\x00" (https://carc.in/#/r/697v)
[14:48:39] KindOna: Yeah, I just want to do the inverse, count down from BCJN and get the number of iterations required
[14:48:49] KindOna: (to reach A)
[14:49:08] KindOna: but I didn't care enough to spend more than a minute on it, just was surprised there is no #back or #previous
[14:49:29] Megamos: has joined #ruby
[14:49:56] al2o3-cr: KindOna: yeah, you're kinda of stuck on this one :(
[14:50:38] KindOna: I guess I could start from A until I reach BCJN :)
[14:51:16] fluxAeon: has joined #ruby
[14:52:09] KindOna: (the answer is 37453)
[14:55:04] phaul: &>> x = Enumerator.new { |y| a = 'a'; loop { y << a; a.succ! } }; x.find_index('zzz')
[14:55:05] rubydoc: # => 18277 (https://carc.in/#/r/6980)
[14:57:59] AJA4350: has joined #ruby
[15:03:03] maryo: has joined #ruby
[15:04:46] Rapture: has joined #ruby
[15:07:59] Mike11: has joined #ruby
[15:08:47] valadares: has joined #ruby
[15:10:15] skryking: has joined #ruby
[15:25:10] szulak_: has joined #ruby
[15:28:12] conta: has joined #ruby
[15:34:26] vdl: has joined #ruby
[15:36:25] cthulchu: has joined #ruby
[15:40:07] fredolinhares: has joined #ruby
[15:43:44] maryo: has joined #ruby
[15:45:38] Solifugus: has joined #ruby
[15:46:03] Solifugus: Can anyone tell me how to start a Ruby on Rails program? It seems to have "gem" and "yarn" in it..
[15:46:12] Solifugus: I don't know Ruby at all...
[15:47:00] Solifugus: yarn doesn't work because there is no start script in the package.json file.... I tried things like: gem start .... google keeps giving me articles on getting started with ruby on rails..
[15:52:44] ramfjord: has joined #ruby
[16:09:10] KindOna: try #rubyonrails
[16:10:07] maryo: has joined #ruby
[16:15:22] Inline: has joined #ruby
[16:15:45] Dbugger: has joined #ruby
[16:16:16] conta2: has joined #ruby
[16:23:39] AJA4350: has joined #ruby
[16:25:00] al2o3-cr: KindOna: you've got more nicks than freddie laker had flights :p
[16:26:02] KindOna: al2o3-cr: This is weak compared to what I do on other networks.
[16:30:54] KindOna: i've been trying to crash people's clones.pl scripts by nicking daily
[16:38:42] agent_white: has joined #ruby
[16:45:42] tdy: has joined #ruby
[16:53:01] \void: has joined #ruby
[17:01:13] nowhere_man: has joined #ruby
[17:03:54] krawchyk: has joined #ruby
[17:07:44] tdy: has joined #ruby
[17:10:59] AJA4351: has joined #ruby
[17:13:11] Eldritch: has joined #ruby
[17:16:40] catbusters: has joined #ruby
[17:25:14] cthulchu_: has joined #ruby
[17:31:27] jcarl43: has joined #ruby
[17:37:10] r29v: has joined #ruby
[17:45:08] Nicmavr: has joined #ruby
[17:50:03] millerti: has joined #ruby
[17:53:44] orbyt_: has joined #ruby
[17:54:27] yokel: has joined #ruby
[17:58:09] cthulchu_: has joined #ruby
[18:00:55] tdy: has joined #ruby
[18:15:48] akem: has joined #ruby
[18:19:43] gix: has joined #ruby
[18:32:06] awkwords: has joined #ruby
[18:36:41] sgen: has joined #ruby
[18:44:32] fanta7531: has joined #ruby
[18:58:19] ramfjord: has joined #ruby
[18:58:53] postmodern: has joined #ruby
[19:01:18] valadares: has joined #ruby
[19:06:36] lxsameer: has joined #ruby
[19:14:32] orbyt_: has joined #ruby
[19:14:33] jaequery: has joined #ruby
[19:14:48] havenwood: 'helloooooo'.squeeze 'o'
[19:16:17] txdv: helloooooo'.squeeze 'lo'
[19:18:46] ravenousmoose: has joined #ruby
[19:18:50] Inline: has joined #ruby
[19:20:49] Inline: has joined #ruby
[19:26:44] orbyt_: has joined #ruby
[19:33:34] v01d4lph4: has joined #ruby
[19:36:24] mitescugd: has joined #ruby
[19:37:12] fanta7531: does crystal have anything in common with ruby except "familiar syntax" ?
[19:51:41] Rapture: has joined #ruby
[19:52:14] comstar: has joined #ruby
[19:56:57] mozzarella: familiar vocabulary
[20:09:52] Eiam_: creators like gemstones
[20:12:11] DTZUZO: has joined #ruby
[20:14:09] perique: has joined #ruby
[20:14:13] cubillosxy_py: has joined #ruby
[20:16:10] cubillosxy_py: hi there, i want to send my logs to sentry, someone knows the config?
[20:21:07] lytol_: has joined #ruby
[20:21:24] fanta7531: good evening, sir
[20:23:02] cubillosxy_py: good afternoon ,
[20:23:09] cubillosxy_py: i want to ask somenone
[20:23:51] cubillosxy_py: i want to send my logs to sentry, someone knows the config?
[20:27:44] superscott: has joined #ruby
[20:29:16] cubillosxy_py: has joined #ruby
[20:45:01] Mike11: has joined #ruby
[20:49:10] Rapture: has joined #ruby
[20:53:42] orbyt_: has joined #ruby
[20:55:39] havenwood: cubillosxy_py: What about the config? What're you having trouble with? Getting an error?
[20:55:50] havenwood: &>> Math::E ** (Math::PI * 1i) + 1
[20:55:52] rubydoc: # => (0.0+0.0i) (https://carc.in/#/r/69cf)
[20:58:08] fluxAeon: has joined #ruby
[21:01:53] tdy: has joined #ruby
[21:05:07] cthulchu_: has joined #ruby
[21:06:20] cubillosxy_py: havenwood, i did find info about config logs with sentry,
[21:08:08] eblip: has joined #ruby
[21:11:20] priodev: has joined #ruby
[21:11:28] conta: has joined #ruby
[21:25:21] markong: has joined #ruby
[21:29:05] SeepingN: has joined #ruby
[21:39:45] mikecmpbll: has joined #ruby
[21:42:10] istrasci: has joined #ruby
[21:49:19] dinfuehr: has joined #ruby
[21:52:09] istrasci: When calling #any? or #all? on an Array, is there a guarantee of consistent evaluation order?
[21:53:02] orbyt_: has joined #ruby
[21:53:52] phaul: on mri at least
[21:54:51] phaul: I don't know if the order is actually specced. as blocks there are supposed to be without side effects
[21:55:07] phaul: but MRI goes left to right
[21:55:58] istrasci: phaul: OK, thank you.
[21:56:10] phaul: hint: pry. pry-doc. > $ Array#all?
[21:56:45] phaul: shows the C source, and you can see the iteration from 0 to arr_length - 1
[21:58:31] istrasci: What is that pry command?
[21:58:54] phaul: gem install pry
[21:59:10] phaul: it's a gem a better irb
[21:59:33] istrasci: I have it installed. Is that an executable, or a command to run inside pry?
[22:00:12] phaul: you need to install pry-doc as well
[22:00:25] phaul: then at pry prompt just do $ Array#all?
[22:01:48] istrasci: Ah, thanks. Didn't know about pry-doc gem.
[22:07:20] kapil____: has joined #ruby
[22:08:20] tdy: has joined #ruby
[22:16:48] awkwords: has joined #ruby
[22:21:54] Inline: has joined #ruby
[22:25:06] orbyt_: has joined #ruby
[22:25:09] Inline: has joined #ruby
[22:27:57] Inline: has joined #ruby
[22:30:54] Inline: has joined #ruby
[22:31:46] sgen: has joined #ruby
[22:32:07] SeepingN: has joined #ruby
[22:33:45] Inline: has joined #ruby
[22:35:50] havenwood: istrasci: It's confirmed by specs in ruby/spec, so there'll be common behavior between MRI, JRuby, TruffleRuby and Opal: https://github.com/ruby/spec/blob/master/core/enumerable/all_spec.rb#L93-L98
[22:36:53] Inline: has joined #ruby
[22:40:20] Inline: has joined #ruby
[22:40:47] SeepingN: has joined #ruby
[22:42:47] fluxAeon: has joined #ruby
[22:43:41] Inline: has joined #ruby
[22:46:54] Inline: has joined #ruby
[22:49:36] t0xik: has joined #ruby
[22:50:17] Inline: has joined #ruby
[22:53:34] Inline: has joined #ruby
[22:57:02] Inline: has joined #ruby
[23:00:35] Inline: has joined #ruby
[23:03:20] tdy1: has joined #ruby
[23:03:45] baweaver: !connection Inline
[23:04:01] Inline: has joined #ruby
[23:04:05] baweaver: !connection Inline
[23:04:25] baweaver: ACTION stares at bot
[23:07:31] phaul: yeah. it's been like that for some time now
[23:07:48] Inline: has joined #ruby
[23:07:51] ramfjord: has joined #ruby
[23:07:55] phaul: we need apeiros to restart it
[23:08:13] baweaver: He's on vacation / break last I knew
[23:08:19] al2o3-cr: phaul: operators can do it manually
[23:08:58] al2o3-cr: oh, restarting, i see.
[23:10:35] Inline: has joined #ruby
[23:13:22] Inline: has joined #ruby
[23:24:54] fluxAeon: has joined #ruby
[23:32:18] fluxAeon: has joined #ruby
[23:41:03] druonysus: has joined #ruby
[23:52:01] conta: has joined #ruby
[23:53:53] SeepingN: has joined #ruby