« Back to channel list

#ruby - 07 December 2018

« Back 1 day Forward 1 day »
[00:00:23] beowuff: has left #ruby: ()
[00:00:44] beowuff: has joined #ruby
[00:01:22] jenrzzz: has joined #ruby
[00:02:24] vikaton: has joined #ruby
[00:02:31] beowuff: has left #ruby: ("http://quassel-irc.org - Chat comfortably. Anywhere.")
[00:03:45] houhoulis: has joined #ruby
[00:03:49] lucasb: which formats the tarball are available? :) https://www.ruby-lang.org/en/news/2018/12/06/ruby-2-6-0-rc1-released/
[00:04:41] lucasb: ^^ must have been a copy-paste error
[00:04:50] havenwood: lucasb: I've been about to PR a fix all day. Busy day.
[00:05:04] havenwood: I got as far as starting a branch >.>
[00:05:17] lucasb: ah, ok. It was seen already. thanks :)
[00:05:47] lucasb: anyway, just download my prefered flavour: tar.xz
[00:05:57] lucasb: *I downloaded
[00:06:17] havenwood: lucasb: haha, aye - I'll PR a fix momentarily
[00:07:52] Scriptonaut: has left #ruby: ()
[00:08:59] nchambers: has joined #ruby
[00:09:52] lucasb: havenwood: https://github.com/ruby/www.ruby-lang.org/commit/aae76c9f90e6d98fe4d4160192cd6b5ef1da382a
[00:10:14] lucasb: someone looked to the left, but didn't look to the right
[00:10:17] havenwood: lucasb: hah
[00:10:25] ur5us: has joined #ruby
[00:10:28] cnsvc: has joined #ruby
[00:12:06] havenwood: lucasb: submitted: https://github.com/ruby/www.ruby-lang.org/pull/1911/files
[00:12:36] lucasb: I hope the extensions matchs the checksums :)
[00:12:42] lucasb: havenwood: thanks!
[00:20:33] sameerynho: has joined #ruby
[00:25:12] xealits: has joined #ruby
[00:25:57] graphene: has joined #ruby
[00:26:34] xealits: has left #ruby: ()
[00:29:14] Renich: has joined #ruby
[00:32:59] themsay: has joined #ruby
[00:55:26] peirama: has joined #ruby
[00:59:07] hutch: has joined #ruby
[01:00:02] dviola: has joined #ruby
[01:04:30] peirama: has joined #ruby
[01:07:02] bijan_: has joined #ruby
[01:13:40] peirama: has joined #ruby
[01:16:18] jenrzzz: has joined #ruby
[01:18:13] hutch: has joined #ruby
[01:19:26] bijan_: has joined #ruby
[01:22:44] peirama: has joined #ruby
[01:23:43] jenrzzz: has joined #ruby
[01:25:54] yqrashawn: has joined #ruby
[01:27:29] weird_error: has joined #ruby
[01:27:51] graphene: has joined #ruby
[01:31:54] peirama: has joined #ruby
[01:33:34] CrazyEddy: has joined #ruby
[01:40:59] peirama: has joined #ruby
[01:46:23] chens: has joined #ruby
[01:49:31] bijan_: has joined #ruby
[01:49:56] peirama: has joined #ruby
[01:50:09] jenrzzz: has joined #ruby
[01:59:14] peirama: has joined #ruby
[02:00:34] agent_white: has joined #ruby
[02:02:28] bijan_: has joined #ruby
[02:03:49] cnsvc: has joined #ruby
[02:06:38] bijan__: has joined #ruby
[02:08:12] peirama: has joined #ruby
[02:11:09] hutch: has joined #ruby
[02:15:10] bijan_: has joined #ruby
[02:17:20] peirama: has joined #ruby
[02:18:57] hutch: has joined #ruby
[02:19:28] bijan__: has joined #ruby
[02:21:11] lambarena: has joined #ruby
[02:23:34] arescorpio: has joined #ruby
[02:26:26] peirama: has joined #ruby
[02:28:00] bijan_: has joined #ruby
[02:31:29] cnsvc: has joined #ruby
[02:32:00] esrse: has joined #ruby
[02:32:31] cnsvc: has joined #ruby
[02:32:39] bijan__: has joined #ruby
[02:35:30] peirama: has joined #ruby
[02:44:32] bijan_: has joined #ruby
[02:44:48] peirama: has joined #ruby
[02:48:32] bijan__: has joined #ruby
[02:48:43] ChanServ: +o havenwood
[02:49:02] havenwood: -b *!*@unaffiliated/fowlmouth$#ruby-banned
[02:50:03] graphene: has joined #ruby
[02:50:22] fowl: has joined #ruby
[02:50:22] ChanServ: ChanServ kicked fowl: Obsessive troll, see http://logs.ryanbigg.com/p/fowl
[02:51:48] graphene: has joined #ruby
[02:52:36] jenrzzz: has joined #ruby
[02:53:55] peirama: has joined #ruby
[02:54:21] Ookma-Kyi: has joined #ruby
[02:54:48] Ookma-Kyi: Is this RoR too?
[02:55:28] ChanServ: -o havenwood
[02:55:35] havenwood: Ookma-Kyi: There's a #rubyonrails channel.
[02:55:53] havenwood: Ookma-Kyi: If it's the Ruby side you're asking about, here is perfect.
[02:56:32] bijan_: has joined #ruby
[03:01:00] Ookma-Kyi: https://gist.github.com/337077bb44a327319cff28ba791c3848
[03:01:38] blackswan: has joined #ruby
[03:01:53] havenwood: Ookma-Kyi: Did you mean to link a README gist?
[03:01:56] Ookma-Kyi: Is that correct grammar: "Ruby and Ruby on Rails implementation of...."
[03:02:26] havenwood: Ookma-Kyi: Yes, that sounds find to me.
[03:02:50] havenwood: Ookma-Kyi: That sentence does seem to be missing a period.
[03:03:00] peirama: has joined #ruby
[03:03:17] Ookma-Kyi: Ok wanna make sure it was the "Ruby way"
[03:03:26] havenwood: Ookma-Kyi: If you wanna be nitpicky, "play by mail" should be "play-by-mail"
[03:04:03] havenwood: Ookma-Kyi: The last sentence isn't a complete sentence. Otherwise looks good.
[03:04:30] havenwood: From a Ruby perspective it sounds right. Usually I say "Ruby and Rails" instead of "Ruby and Ruby on Rails"
[03:09:33] bijan_: has joined #ruby
[03:09:42] dbz: has joined #ruby
[03:12:08] peirama: has joined #ruby
[03:14:09] bijan_: has joined #ruby
[03:14:15] Swyper: has joined #ruby
[03:14:21] Ookma-Kyi: https://gist.github.com/337077bb44a327319cff28ba791c3848
[03:21:14] peirama: has joined #ruby
[03:22:20] bijan_: has joined #ruby
[03:26:47] bijan__: has joined #ruby
[03:26:48] Fusl: has joined #ruby
[03:30:21] peirama: has joined #ruby
[03:39:07] bijan_: has joined #ruby
[03:39:30] peirama: has joined #ruby
[03:48:39] peirama: has joined #ruby
[03:48:43] dbz: has joined #ruby
[03:49:43] dbz_: has joined #ruby
[03:51:34] dbz__: has joined #ruby
[03:51:37] bijan_: has joined #ruby
[03:57:35] peirama: has joined #ruby
[03:57:53] larissa: has joined #ruby
[04:04:24] bijan_: has joined #ruby
[04:05:56] white_lilies: has joined #ruby
[04:06:49] peirama: has joined #ruby
[04:07:26] Renich_: has joined #ruby
[04:09:57] braincrash: has joined #ruby
[04:12:26] bijan_: has joined #ruby
[04:12:53] dbz: has joined #ruby
[04:15:56] peirama: has joined #ruby
[04:16:02] malen: has joined #ruby
[04:19:20] cnsvc: has joined #ruby
[04:25:06] peirama: has joined #ruby
[04:29:34] bijan_: has joined #ruby
[04:33:54] bijan__: has joined #ruby
[04:34:13] peirama: has joined #ruby
[04:42:27] bijan_: has joined #ruby
[04:43:21] peirama: has joined #ruby
[04:46:55] bijan_: has joined #ruby
[04:52:23] peirama: has joined #ruby
[04:53:37] white_lilies: has joined #ruby
[04:54:43] bijan_: has joined #ruby
[04:58:38] bijan_: has joined #ruby
[04:58:57] hurricanehrndz: has joined #ruby
[05:00:54] sp3ncer: has joined #ruby
[05:01:34] peirama: has joined #ruby
[05:03:38] awkwords: has joined #ruby
[05:11:32] bijan_: has joined #ruby
[05:15:37] KeyJoo: has joined #ruby
[05:18:12] sauvin: has joined #ruby
[05:20:25] Freshnuts: has joined #ruby
[05:28:34] SeepingN: has joined #ruby
[05:36:28] bijan_: has joined #ruby
[05:36:41] za1b1tsu: has joined #ruby
[05:40:51] shakes: has joined #ruby
[05:40:55] bijan__: has joined #ruby
[05:44:24] cajone: has joined #ruby
[05:51:06] aupadhye: has joined #ruby
[05:53:42] bijan_: has joined #ruby
[05:54:05] teardown: has joined #ruby
[05:54:45] dbz: has joined #ruby
[06:02:53] reber: has joined #ruby
[06:03:36] cajone: has left #ruby: ()
[06:04:24] reber__: has joined #ruby
[06:05:44] cajone: has joined #ruby
[06:06:34] cajone: has left #ruby: ()
[06:06:38] bijan_: has joined #ruby
[06:23:24] jenrzzz: has joined #ruby
[06:25:57] dbz: has joined #ruby
[06:26:50] bijan_: has joined #ruby
[06:31:11] Xiti: has joined #ruby
[06:35:07] bijan_: has joined #ruby
[06:38:54] reber: has joined #ruby
[06:39:42] bijan__: has joined #ruby
[06:48:47] bijan_: has joined #ruby
[06:53:37] bijan__: has joined #ruby
[07:06:42] bijan_: has joined #ruby
[07:07:49] Aqo: has joined #ruby
[07:08:02] dellavg_: has joined #ruby
[07:09:14] peirama: has joined #ruby
[07:09:29] Furai: has joined #ruby
[07:10:55] peirama: has left #ruby: ()
[07:11:00] bijan__: has joined #ruby
[07:19:15] HailTheRobots: has joined #ruby
[07:23:21] awkwords: has joined #ruby
[07:28:22] bijan_: has joined #ruby
[07:37:14] bijan_: has joined #ruby
[07:41:02] bijan__: has joined #ruby
[07:45:19] jenrzzz: has joined #ruby
[07:46:32] za1b1tsu: has joined #ruby
[07:49:33] bijan_: has joined #ruby
[07:52:15] jenrzzz: has joined #ruby
[07:53:25] bijan__: has joined #ruby
[08:02:08] bijan_: has joined #ruby
[08:05:27] znz_jp: has joined #ruby
[08:05:59] bijan_: has joined #ruby
[08:09:36] clemens3: has joined #ruby
[08:18:53] bijan_: has joined #ruby
[08:23:08] piks3l_: has joined #ruby
[08:28:54] makara: has joined #ruby
[08:29:12] piks3l_: has joined #ruby
[08:29:54] makara: how can I overload +- operator? I can do + and - separately.
[08:30:37] baweaver: makara: Do you have an example of what you want to do?
[08:30:59] cnsvc: has joined #ruby
[08:31:06] Guest14049: has joined #ruby
[08:31:09] baweaver: you probably mean prefix operators
[08:32:03] bijan_: has joined #ruby
[08:32:12] baweaver: Unary methods - https://ruby-doc.org/core-2.2.0/Numeric.html#method-i-2B-40
[08:33:26] makara: @baweaver, I think I understand now. +- is not an operator, so I can't overload it. I was wanting to create a new operator, but i don't see how the Ruby parser would understand how to tokenize it in the first place
[08:33:43] baweaver: you'd have to screw with the actual parser to make that happen
[08:34:15] baweaver: parser.y if I remember
[08:35:13] makara: @baweaver, its ok, I'm just learning Ruby
[08:35:34] baweaver: Then I'd focus on learning basics instead of trying to get too much into that type of thing quite yet.
[08:38:05] bga57: has joined #ruby
[08:39:09] bijan__: has joined #ruby
[08:42:32] HailTheRobots: has joined #ruby
[08:44:36] bijan_: has joined #ruby
[08:46:35] burgestrand: has joined #ruby
[08:51:26] za1b1tsu: has joined #ruby
[09:01:13] vondruch: has joined #ruby
[09:02:06] bijan_: has joined #ruby
[09:04:49] roshanavand: has joined #ruby
[09:08:21] aufi: has joined #ruby
[09:16:10] phaul: has joined #ruby
[09:19:27] serard: has joined #ruby
[09:27:08] bijan_: has joined #ruby
[09:31:57] bijan_: has joined #ruby
[09:36:12] bijan__: has joined #ruby
[09:39:18] Freshnuts: has joined #ruby
[09:40:33] jenrzzz: has joined #ruby
[09:47:43] burgestrand: has joined #ruby
[09:48:01] keden: has joined #ruby
[09:48:55] HailTheRobots: has joined #ruby
[09:52:16] HailTheRobots: has joined #ruby
[09:54:18] HailTheRobots: has joined #ruby
[09:56:01] sir_tune: has joined #ruby
[09:56:44] moei: has joined #ruby
[09:57:46] vende: has joined #ruby
[10:01:38] slowmow: has joined #ruby
[10:01:41] slowmow: Hello folks,
[10:01:42] HailTheRobots: has joined #ruby
[10:01:46] slowmow: Anypone around ?
[10:01:54] phaul: hello slowmow
[10:02:30] bijan_: has joined #ruby
[10:02:41] slowmow: Hey there,
[10:02:42] slowmow: https://pastebin.com/gwNRAWgM
[10:02:43] ruby[bot]: slowmow: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
[10:02:48] slowmow: I don't get is
[10:04:14] phaul: '/path' is not a file or directory on your computer. That's what it says
[10:06:07] phaul: Im guessing you have to fill in 'path' with actual value rather than passing the literal value '/path'
[10:07:32] Mike11: has joined #ruby
[10:08:05] LinuxKnight: has joined #ruby
[10:10:34] slowmow: The path for realpath_rec ?
[10:13:00] lucasb: has joined #ruby
[10:15:14] bijan_: has joined #ruby
[10:16:57] jenrzzz: has joined #ruby
[10:20:42] horst_: has joined #ruby
[10:21:39] slowmow: I don't have any "/path" in the code
[10:22:02] phaul: slowmow: can you paste the code?
[10:23:31] slowmow: https://pastebin.com/pHTNz0F0
[10:23:31] ruby[bot]: slowmow: as I told you already, please use https://gist.github.com
[10:23:59] slowmow: I didn't see your message sorry
[10:24:04] slowmow: reading...
[10:24:16] slowmow: Won't happen again
[10:24:19] bijan_: has joined #ruby
[10:24:24] phaul: slowmow: it's a bot, ignore him for now
[10:25:52] phaul: but the previous link doesn't work any more, so I can't see the error and code together ...
[10:26:48] slowmow: Traceback (most recent call last):
[10:26:48] slowmow: 4: from pipal.rb:179:in `<main>'
[10:26:48] slowmow: 3: from pipal.rb:179:in `each'
[10:26:48] slowmow: 2: from pipal.rb:184:in `block in <main>'
[10:26:48] slowmow: 1: from pipal.rb:184:in `realpath'
[10:26:49] slowmow: pipal.rb:184:in `realpath': No such file or directory @ realpath_rec - /path (Errno::ENOENT)
[10:28:17] bijan__: has joined #ruby
[10:29:57] paranoicsan: has joined #ruby
[10:30:15] slowmow: Any hintg ?
[10:31:36] phaul: requires some debug... Can you insert a puts fn.inspect in @ line 183 and rerun ?
[10:32:09] phaul: puts fn.inspect # < the new bit of code
[10:34:44] AJA4350: has joined #ruby
[10:37:14] awkwords: has joined #ruby
[10:37:32] cnsvc: has joined #ruby
[10:37:37] bijan_: has joined #ruby
[10:44:23] phaul: btw what OS are you using?
[10:45:42] HailTheRobots: has joined #ruby
[10:47:48] bijan_: has joined #ruby
[10:50:33] weird_error: has joined #ruby
[10:54:58] slowmow: installing a script
[10:55:06] slowmow: apparently it should solve it
[10:55:07] slowmow: https://github.com/adon90/openssl_wfuzz.git
[10:55:22] slowmow: I am mixing things
[10:55:32] slowmow: Thank you for your help
[10:59:29] HailTheRobots: has joined #ruby
[11:03:50] lucasb: RubyVM::AbstractSyntaxTree!
[11:04:22] lucasb: look at the size of the that word :) I guess they didn't wanted just "RubyVM::AST"
[11:07:38] leftylink: maybe they had A STringent requirement on minimum length
[11:07:42] leftylink: ... I am sorry
[11:08:20] lucasb: it seems it was AST before... https://github.com/ruby/ruby/commit/1d7d08262e07b7d0d11ec2d4efa29ad2b52c565a
[11:08:41] lucasb: IMO shorter names are better. anyway, just a detail I spotted on the RC1 announcement
[11:10:05] RedNifre: has joined #ruby
[11:17:09] lxsameer: has joined #ruby
[11:18:08] LinuxKnight: has joined #ruby
[11:23:21] Emmanuel_Chanel: has joined #ruby
[11:29:46] RedNifre: has joined #ruby
[11:31:11] SeepingN_: has joined #ruby
[11:36:39] bijan_: has joined #ruby
[11:40:04] bijan_: has joined #ruby
[11:50:31] bijan_: has joined #ruby
[11:52:18] HailTheRobots: has joined #ruby
[11:54:37] HailTheRobots: has joined #ruby
[11:55:52] bijan_: has joined #ruby
[12:01:06] cnsvc: has joined #ruby
[12:03:58] bijan_: has joined #ruby
[12:08:03] bijan__: has joined #ruby
[12:11:27] RedNifre: has joined #ruby
[12:11:55] bijan_: has joined #ruby
[12:13:44] vonfry: has joined #ruby
[12:21:17] bijan_: has joined #ruby
[12:25:18] bijan__: has joined #ruby
[12:26:26] Nicmavr: has joined #ruby
[12:26:47] dbz: has joined #ruby
[12:32:14] jaddison_: has joined #ruby
[12:34:04] sina: has joined #ruby
[12:34:05] bijan_: has joined #ruby
[12:35:41] timeless: has joined #ruby
[12:38:11] bijan__: has joined #ruby
[12:40:01] paranoicsan: has joined #ruby
[12:49:32] roshanavand: has joined #ruby
[12:50:15] mostlybadfly: has joined #ruby
[12:51:33] bijan_: has joined #ruby
[13:04:12] blackmesa: has joined #ruby
[13:04:28] bijan_: has joined #ruby
[13:09:03] bijan__: has joined #ruby
[13:10:43] go|dfish: has joined #ruby
[13:13:08] camilasan: has joined #ruby
[13:13:52] bijan_: has joined #ruby
[13:14:59] jcalla: has joined #ruby
[13:16:20] Dbugger: has joined #ruby
[13:18:21] rippa: has joined #ruby
[13:19:15] awkwords_: has joined #ruby
[13:24:49] arooni: has joined #ruby
[13:25:38] bijan_: has joined #ruby
[13:30:05] bijan__: has joined #ruby
[13:34:14] awkwords: has joined #ruby
[13:38:43] bijan_: has joined #ruby
[13:46:48] bijan_: has joined #ruby
[13:48:32] agent_white: has joined #ruby
[13:50:50] bijan_: has joined #ruby
[13:57:30] RedNifre: has joined #ruby
[13:59:19] bijan_: has joined #ruby
[14:03:14] awkwords_: has joined #ruby
[14:08:05] bijan_: has joined #ruby
[14:12:57] Inline: has joined #ruby
[14:14:31] bijan_: has joined #ruby
[14:21:42] bijan_: has joined #ruby
[14:22:48] Mike11: has joined #ruby
[14:25:57] bijan__: has joined #ruby
[14:27:16] bijan_: has joined #ruby
[14:30:37] white_lilies: has joined #ruby
[14:33:33] cnsvc: has joined #ruby
[14:36:00] bijan_: has joined #ruby
[14:41:04] awkwords: has joined #ruby
[14:42:50] bijan_: has joined #ruby
[14:52:55] bijan_: has joined #ruby
[14:57:38] bijan__: has joined #ruby
[15:01:46] bijan_: has joined #ruby
[15:05:32] blackmesa: has joined #ruby
[15:06:28] bak1an: has joined #ruby
[15:08:24] Tau: has joined #ruby
[15:09:20] paranoicsan: has joined #ruby
[15:09:20] polishdub: has joined #ruby
[15:13:58] themsay: has joined #ruby
[15:21:16] RedNifre: has joined #ruby
[15:23:07] bijan_: has joined #ruby
[15:23:19] JjOtt: has joined #ruby
[15:24:11] code_zombie: has joined #ruby
[15:28:02] JjOtt: Does anyone experience errors like this on MacOS Mojave ....
[15:28:08] JjOtt: ruby(36489,0x1030375c0) malloc: *** error for object 0x7fca5c06a0f8: pointer being freed was not allocated
[15:28:09] JjOtt: ruby(36489,0x1030375c0) malloc: *** set a breakpoint in malloc_error_break to debug
[15:28:51] Mike11: has joined #ruby
[15:30:07] Blaguvest: has joined #ruby
[15:30:19] hutch: has joined #ruby
[15:32:36] blood: has joined #ruby
[15:32:52] eldritch2: has joined #ruby
[15:33:11] blood: How do I prevent ruby from resolving environment variables passed to shell execute? If I run my script manually, everything works as expected
[15:33:33] blood: I'm currently passing env vars as %%ENV%%
[15:35:49] bijan_: has joined #ruby
[15:39:29] crankharder: has joined #ruby
[15:40:17] bijan__: has joined #ruby
[15:42:28] serard: has joined #ruby
[15:43:08] leitz: has joined #ruby
[15:43:57] piks3l: has joined #ruby
[15:45:12] HailTheRobots: has joined #ruby
[15:48:54] bijan_: has joined #ruby
[15:51:23] discopatrick: has joined #ruby
[15:53:09] bijan__: has joined #ruby
[15:53:56] chouhoulis: has joined #ruby
[15:56:12] al2o3-cr: has joined #ruby
[15:56:23] roshanavand: has joined #ruby
[16:01:09] serard_: has joined #ruby
[16:01:31] havenwood: lucasb: The switch to AbstractSyntaxTree was for parity with InstructionSequence.
[16:02:12] havenwood: lucasb: They could be AST and IR, of course.
[16:02:33] gix: has joined #ruby
[16:05:44] bijan_: has joined #ruby
[16:07:43] blackmesa1: has joined #ruby
[16:10:44] krawchyk: has joined #ruby
[16:13:53] bijan_: has joined #ruby
[16:18:22] serard__: has joined #ruby
[16:21:34] bijan_: has joined #ruby
[16:23:48] dviola: has joined #ruby
[16:26:05] bijan__: has joined #ruby
[16:35:05] bijan_: has joined #ruby
[16:40:40] dbz: has joined #ruby
[16:42:52] bijan_: has joined #ruby
[16:49:16] serard__: has joined #ruby
[16:54:59] vdl: has joined #ruby
[16:55:08] serard: has joined #ruby
[16:56:05] bijan_: has joined #ruby
[16:56:08] RedNifre: has joined #ruby
[16:57:28] zapata: has joined #ruby
[16:57:46] KeyJoo: has joined #ruby
[17:00:07] Guest14049: has joined #ruby
[17:00:57] bijan_: has joined #ruby
[17:04:35] awkwords_: has joined #ruby
[17:05:05] Swyper: has joined #ruby
[17:09:17] bijan_: has joined #ruby
[17:13:48] bijan__: has joined #ruby
[17:14:43] roshanavand: has joined #ruby
[17:21:29] raulp: has joined #ruby
[17:22:50] bijan_: has joined #ruby
[17:23:52] bijan_: has joined #ruby
[17:25:16] nchambers: has joined #ruby
[17:29:35] blackmesa: has joined #ruby
[17:30:43] cow[moo]: has joined #ruby
[17:30:45] Swyper: has joined #ruby
[17:32:18] alan_w: has joined #ruby
[17:34:52] blackmesa1: has joined #ruby
[17:35:42] serard: has joined #ruby
[17:43:08] chongtxtx: has joined #ruby
[17:56:39] chongtxtx: has joined #ruby
[17:57:39] Renich_: has joined #ruby
[17:59:41] salasrod: has joined #ruby
[18:01:15] raulp: has joined #ruby
[18:07:36] eckhardt_: has joined #ruby
[18:08:03] orbyt_: has joined #ruby
[18:29:38] cnsvc: has joined #ruby
[18:31:17] bambanx: has joined #ruby
[18:37:27] Freshnuts: has joined #ruby
[18:38:21] \void: has joined #ruby
[18:47:46] hutch: has joined #ruby
[18:47:53] blackmesa1: has joined #ruby
[18:51:14] burgestrand: has joined #ruby
[19:02:23] themsay: has joined #ruby
[19:02:23] clemens3: has joined #ruby
[19:05:05] Eldritch: has joined #ruby
[19:06:29] Puffball: has joined #ruby
[19:15:45] jenrzzz: has joined #ruby
[19:16:45] elcontrastador: has joined #ruby
[19:17:31] agent_white: has joined #ruby
[19:17:54] uplime: has joined #ruby
[19:34:50] knight33: This question might be a little abstract, but where to begin writing an application? I've no issue looking at other Ruby applications, and understanding the majority of code, conditionals, variables, scopes, objects, etc. I've fixed so many bugs at work. However, when I sit and stare at a blank terminal in Vim, trying to write an API or web app or
[19:34:50] knight33: something, I don't know what to do. I keep finding tutorials on Rails that teach you how to generate controllers and skip the learning part. Any suggestions?
[19:41:38] GinoMan: has joined #ruby
[19:47:26] hutch: has joined #ruby
[20:02:40] Eiam: JjOtt: means what it says on the tin, you over released something
[20:02:44] Eiam: oh they left
[20:05:09] desperek: has joined #ruby
[20:06:32] jenrzzz: has joined #ruby
[20:08:59] serard: has joined #ruby
[20:10:15] serard_: has joined #ruby
[20:16:20] relyks: has joined #ruby
[20:32:02] Scriptonaut: has joined #ruby
[20:33:17] Scriptonaut: hey I was just wondering if any of you know an array method similar to .find, but rather than returning the first element that satisfies the condition, it returns a property/value of that element. So like if I had an array of object, I would want to return object.some_value of the first object that satisfies the condition, rather than returning the object itself
[20:33:49] Scriptonaut: I could easily do this in two lines, but I'm wondering if there's a shorthand oneliner way
[20:34:42] Scriptonaut: actually I might just change it to an each loop and then return the element explicitly, I just usually liek to avoid explicit return statements when it's at the tail-end of a method
[20:35:57] graphene: has joined #ruby
[20:36:05] uplime: you could use map
[20:36:29] Scriptonaut: I only want the first element that satisfies the condition
[20:36:33] Scriptonaut: map would give me an array
[20:37:19] Scriptonaut: I could do `next if blah?` and then chain a `compact` to the end of the block but that would be janky
[20:38:39] woodruffw: Scriptonaut: enumerable.find { |x| x.blah? }
[20:38:49] Scriptonaut: that returns the element
[20:39:04] GinoMan2440: has joined #ruby
[20:39:04] woodruffw: you want the index?
[20:39:08] Scriptonaut: I need a method like find, but rather than returning the element, it returns a result I calculate in the block
[20:39:26] woodruffw: hmm, you could do find + tap probably
[20:39:42] woodruffw: err sorry no, that wouldn't work
[20:39:51] Scriptonaut: https://gist.github.com/robins35/0ebbd6086a082dd35d9f7d3688b8ed16
[20:39:54] Scriptonaut: that's the method
[20:40:01] Scriptonaut: I need to return snomed_record.first
[20:41:27] woodruffw: return `enumerable.find { |x| x.blah? }.first` maybe?
[20:41:50] darkhanb: has joined #ruby
[20:48:05] Eiam: hmm select and break?
[20:48:22] Eiam: oh that'll give you the object not its value
[20:48:59] Eiam: oh, just use reduce and break?
[20:49:04] SeepingN: has joined #ruby
[20:49:28] Eiam: set your memo to the value you want 'returned'
[20:49:30] Eiam: and break out
[20:50:33] Scriptonaut: woodruffw: find won't work
[20:50:48] Scriptonaut: find returns the element in the array, not a different value calculated from the element
[20:51:02] Scriptonaut: ya reduce was something I was thinking of
[20:51:13] woodruffw: right, i'm saying that you should return the element and then chain the calculation after it
[20:51:51] Scriptonaut: I need the calculation in order to determine if it satisfies the condition, which is an expensive database lookup, I don't want to have to do that calculation twice. I think I'm just going to do an each loop and do an explicit return
[20:51:57] Scriptonaut: was just looking for a more 'ruby way' of doing it
[20:52:05] Eiam: reduce imo
[20:52:09] woodruffw: yeah, reduce then
[20:52:12] Scriptonaut: I'll checkout reduce
[20:52:13] Eiam: given your constraints defined
[20:52:20] Scriptonaut: haven't used that in a while
[20:52:52] havenwood: Scriptonaut: Have you tried just selecting them mapping? Does that incur a penalty in your case?
[20:53:34] Scriptonaut: selecting then mapping would incur a penalty because then the alg would become 2n rather than n (O)
[20:53:51] Eiam: why is the map touching the DB at that point?
[20:53:58] bambanxx: has joined #ruby
[20:53:58] Eiam: do the DB lookup and then work with local data
[20:54:06] Eiam: those transforms shouldn't incur db hits..
[20:54:25] Eiam: depends on your ORM or whatever though too I suppose
[20:54:31] Scriptonaut: Eiam: because I'm looping over an array of object, then doing a db lookup for each one, then determining if the lookup yielded a sufficient result. If it did, then I need to return that result
[20:54:45] Scriptonaut: so I would have to calculate the result a second time once I returned teh element
[20:54:55] Eiam: why not get array of object, get all data and do a single lookup, then filter that?
[20:55:37] Scriptonaut: the lookup api can't take more than one param at a time
[20:55:42] Eiam: you are paying the price of an array of unknown size DB lookups one at a time but if you've already got the data..
[20:55:49] Scriptonaut: so I can't do like Datasets::ICD10.snomedct_map([list, of, codes])
[20:55:56] Eiam: well that sucks =)
[20:55:59] Scriptonaut: I have to do it one by one
[20:56:01] Eiam: get a better DB? =)
[20:56:19] Scriptonaut: lol, it's postgres, but the module was written that way
[20:56:23] Eiam: (i realize its probably not your endpoint and beyond your control)
[20:57:45] StarLord__: has joined #ruby
[20:59:06] StarLord__: has joined #ruby
[21:00:37] StarLord__: has joined #ruby
[21:05:57] havenwood: Scriptonaut: FWIW, #select_map is easy to implement: https://gist.github.com/havenwood/4fdea01e423b96c5457fc959f33cfc08
[21:06:04] havenwood: Scriptonaut: You could do a refinement. ;)
[21:08:11] cd: has joined #ruby
[21:09:33] jenrzzz: has joined #ruby
[21:15:17] Scriptonaut: ya, true, that's a decent solution, though I'd have to tack a .first on the end of it
[21:18:27] phaul: has joined #ruby
[21:21:22] Swyper: has joined #ruby
[21:21:26] havenwood: Scriptonaut: oh, you want select_map_first?
[21:21:46] havenwood: Scriptonaut: that's more like find_map, I suppose, sec.
[21:22:12] havenwood: Scriptonaut: (This is why we don't implement these all. They're too custom. Elixir deprecated select_map for that reason iir.)
[21:23:58] havenwood: Scriptonaut:
[21:24:00] havenwood: https://gist.github.com/havenwood/27a5850b99bb35f855b079038664b120
[21:24:39] Scriptonaut: that wouldn't be a find_map would it?
[21:24:41] Scriptonaut: since each returns the whole list
[21:24:58] havenwood: err, it finds the first thing and maps
[21:25:06] havenwood: (just updated a typo)
[21:25:47] havenwood: Scriptonaut: all Enumerable methods are implemented off #each
[21:25:47] RedNifre: has joined #ruby
[21:25:48] havenwood: Scriptonaut: #find included
[21:26:18] Scriptonaut: havenwood: that would return nil
[21:26:20] Scriptonaut: the thing you wrote
[21:26:31] Scriptonaut: oh n evermind
[21:26:36] Scriptonaut: I had no idea each worked that way
[21:26:47] Scriptonaut: I thought each always returned the original array
[21:26:52] Scriptonaut: unless the block specifies otherwise
[21:26:56] havenwood: [0, 0, 42].find_map &:nonzero? #=> 42
[21:27:08] Scriptonaut: I didn't know you could pass an argument to break, that's awesome
[21:27:49] Scriptonaut: I use break all the time, but I didn't know if you passed it a value it would break from the block and return that value
[21:27:57] Scriptonaut: Does next also take a value?
[21:28:48] havenwood: Scriptonaut: fixed it to return `nil` instead of the receiver if nothing found
[21:29:13] Scriptonaut: that's literally exactly how I solved my problem lol
[21:29:15] Scriptonaut: what your code is now
[21:29:47] havenwood: Scriptonaut: makes sense
[21:29:52] Scriptonaut: https://gist.github.com/robins35/5da99e35442ebfc220118c33fc07cb07
[21:30:18] Scriptonaut: havenwood: do you contribute to ruby?
[21:30:26] Scriptonaut: you were saying "we" when talking about removing features like that
[21:31:08] havenwood: Scriptonaut: I do contribute to a couple implementations of Ruby, as a hobbyist not core of anything.
[21:31:25] DTZUZO: has joined #ruby
[21:34:46] havenwood: Scriptonaut: commented on your gist with a couple nit suggestions
[21:35:15] Tau: has joined #ruby
[21:36:51] Scriptonaut: havenwood: nice. You mixed up the dx_code.code and dx_code.code_type in the else statement, but I like that idea better than mine (having an assignment operation inside a conditional)
[21:36:55] Scriptonaut: and ya, I shoulda used .any?
[21:40:41] jordanm: has joined #ruby
[21:41:44] coltkirk: has left #ruby: ("ERC (IRC client for Emacs 26.1)")
[21:50:19] blackswan: has joined #ruby
[22:01:57] DTZUZO: has joined #ruby
[22:11:30] roshanavand: has joined #ruby
[22:14:56] Swyper: has joined #ruby
[22:21:18] dviola: has joined #ruby
[22:54:33] Guest14049: has joined #ruby
[23:03:36] graphene: has joined #ruby
[23:06:11] Nicmavr: has joined #ruby
[23:07:00] agent_white: has joined #ruby
[23:08:51] piks3l: has joined #ruby
[23:09:37] jenrzzz: has joined #ruby
[23:14:04] Paraxial: has joined #ruby
[23:14:33] jenrzzz: has joined #ruby
[23:18:08] DTZUZO: has joined #ruby
[23:30:56] ellcs: has joined #ruby
[23:38:22] clemens3: has joined #ruby
[23:39:22] Swyper: has joined #ruby
[23:57:11] _whitelogger: has joined #ruby