« Back to channel list

#ruby - 29 December 2018

« Back 1 day Forward 1 day »
[00:01:11] laaron: has joined #ruby
[00:02:30] cschneid: has joined #ruby
[00:10:25] ogres: has joined #ruby
[00:12:09] Guest44017: has joined #ruby
[00:12:49] cschneid: has joined #ruby
[00:17:24] sarink: has joined #ruby
[00:20:40] davidw_: has joined #ruby
[00:27:13] mspo: justache: where can I find a channel who answers "no" to that question? :)
[00:27:51] justache: mspo: #reddit
[00:28:36] mspo: I'm in #redditaquariums and it's pretty friendly
[00:28:59] Renich: has joined #ruby
[00:31:51] cthu|: now it becomes irritating
[00:32:11] mspo: cthu|: try antifungal cream
[00:32:27] cthu|: don't call ruby fungus
[00:32:40] cthu|: def qwe(a: "foo") byebug()
[00:32:53] cthu|: why don't I see a from that byebug's perspective?
[00:34:29] cthu|: I think I know why...
[00:35:37] mspo: I've never used byebug
[00:36:09] cthu|: yes, it was my mistake
[00:36:50] cthu|: I forgot that It sees only immediate context. And I forgot that I actually don't call it directly but rather a proxy method that does some sugar :)
[00:40:22] sanscoeur: has joined #ruby
[00:40:25] cthu|: I love byebug
[01:01:06] laaron-: has joined #ruby
[01:10:07] cthu|: what is ?-mix:
[01:15:19] garyserj: has joined #ruby
[01:19:17] tiff: has joined #ruby
[01:21:15] connermcd: has joined #ruby
[01:21:19] sarink: has joined #ruby
[01:24:02] r29v: has joined #ruby
[01:27:58] havenwood: cthu|: the regexp options m, i and x
[01:28:35] cthu|: ah, interesting
[01:28:41] cthu|: weird, too
[01:28:48] cthu|: that puts does it to //
[01:28:54] havenwood: cthu|: multiline is default in Ruby unlike some langs
[01:29:01] cthu|: yeah, I got it
[01:29:15] cthu|: it's just I expect to see the keys at the end of the regex
[01:29:20] cthu|: where I usually set them
[01:29:35] cthu|: puts puts them at the beginning
[01:29:45] cthu|: what a weirdo
[01:33:57] Guest44017: has joined #ruby
[01:34:24] havenwood: cthu|: you can have a single regexp with different delimiters in different parts
[01:34:44] cthu|: delimiters?
[01:34:48] havenwood: cthu|: (except `o`, for compiling the Regexp once, which is the whole thing or nothign)
[01:34:51] havenwood: cthu|: mixo
[01:35:03] cthu|: what is a delimiter?
[01:35:31] havenwood: cthu|: end delmiters, the mix thing you noticed
[01:36:41] havenwood: I guess I should say oxim, since that's a word
[01:36:48] havenwood: an instrument for measuring the proportion of oxygenated hemoglobin in the blood.
[01:37:05] bmurt: has joined #ruby
[01:37:06] havenwood: ^ acc'd to dictionary
[01:37:11] cthu|: fascinating
[01:40:35] havenwood: adding the `o` delimiter would be a good regexp cop when just constants are interpolated into a regexp
[01:50:40] cschneid: has joined #ruby
[01:53:43] Guest44017: has joined #ruby
[02:05:01] laaron: has joined #ruby
[02:09:11] _whitelogger: has joined #ruby
[02:11:05] orbyt_: has joined #ruby
[02:18:31] dysfigured: has joined #ruby
[02:42:56] Guest58: has joined #ruby
[02:48:28] sidepocket: has joined #ruby
[02:51:54] Guest44017: has joined #ruby
[03:01:55] laaron-: has joined #ruby
[03:07:28] r29v: has joined #ruby
[03:08:15] darkhanb: has joined #ruby
[03:10:29] spacesuitdiver: has joined #ruby
[03:20:18] Guest44017: has joined #ruby
[03:21:57] hutch: has joined #ruby
[03:33:10] kapil____: has joined #ruby
[03:39:21] cschneid: has joined #ruby
[03:41:41] garyserj: has joined #ruby
[03:43:35] nowhere_man: has joined #ruby
[03:44:10] s2013: has joined #ruby
[03:47:52] tdy: has joined #ruby
[03:50:44] hays: POODR seems to be one of the few up to date books
[03:51:00] hays: eloquent ruby is 1.9, pickaxe also
[03:51:49] EXCHGR: has joined #ruby
[03:55:04] quipa: has joined #ruby
[04:01:10] laaron: has joined #ruby
[04:09:10] _whitelogger: has joined #ruby
[04:10:39] braincrash: has joined #ruby
[04:18:27] Iambchop: Isn't pickaxe 4th edition is 1.9 and 2.0? :-)
[04:30:00] cschneid: has joined #ruby
[04:32:15] hutch: has joined #ruby
[04:46:25] tdy: has joined #ruby
[04:48:00] Azure|dc: has joined #ruby
[04:51:22] sauvin: has joined #ruby
[05:00:58] cschneid: has joined #ruby
[05:01:26] laaron-: has joined #ruby
[05:04:30] JoeA2552: has joined #ruby
[05:25:03] rippa: has joined #ruby
[05:39:30] _whitelogger: has joined #ruby
[05:41:39] hutch: has joined #ruby
[05:43:56] tiff: has joined #ruby
[05:48:21] r3m: has joined #ruby
[06:01:20] laaron: has joined #ruby
[06:02:55] cschneid: has joined #ruby
[06:07:24] garyserj: I am having difficulty programmatically sending the ENTER key. I am using IRB (ruby interactive). If I do driver.find_element(:name, "q").send_keys("aaa\n"); it sends the aaa but not the ENTER. If I do driver.action.send_keys("\n").perform. That doesn’t do it either. And if I do \u0006 and \u0007 instead of \n, it still doesn’t work. i’ve also tried b=driver.find_element(:tag_name, "body”); b.send_key “\n”; b.send_keys
[06:07:25] garyserj: “n”; but it hasn’t worked either.
[06:07:56] garyserj: (using Selenium and the firefox browser. sendkeys to the searchbox on google.com.
[06:09:28] hutch: has joined #ruby
[06:16:11] sarink: has joined #ruby
[06:19:52] laaron: has joined #ruby
[06:22:47] tdy: has joined #ruby
[06:29:11] Uptime: is there a way to tell if a file is requirable besides just doing a require + rescue
[06:37:01] JoeA2552: has joined #ruby
[06:46:33] hutch: has joined #ruby
[07:01:26] laaron-: has joined #ruby
[07:04:13] Fusl: has joined #ruby
[07:05:42] Nicmavr: has joined #ruby
[07:19:00] MasterAsia: has joined #ruby
[07:19:23] Fusl: has joined #ruby
[07:34:02] Fusl: has joined #ruby
[07:36:10] _whitelogger: has joined #ruby
[07:47:41] RougeR: has joined #ruby
[07:52:32] reber: has joined #ruby
[07:54:19] tdy: has joined #ruby
[08:02:07] laaron: has joined #ruby
[08:05:37] dellavg_: has joined #ruby
[08:13:05] cschneid: has joined #ruby
[08:16:16] hutch: has joined #ruby
[08:19:08] za1b1tsu: has joined #ruby
[08:33:58] gix: has joined #ruby
[08:35:02] nanothief: has joined #ruby
[08:40:04] nanothief: Is there a shortcut in pry (or irb) to reload the last loaded file? E.g. if I start pry then `load "my_file.rb"`. After editing the file I want to reload it without having to type out that load statement again
[09:02:13] laaron-: has joined #ruby
[09:03:37] nanothief: Never mind, solved this myself by writing a custom pry command: https://pastebin.com/HAwYeHfV
[09:03:38] ruby[bot]: nanothief: 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
[09:09:49] ujjain: has joined #ruby
[09:18:58] ur5us: has joined #ruby
[09:19:36] tiff: has joined #ruby
[09:20:23] tiff: has joined #ruby
[09:21:55] daqing: has joined #ruby
[09:24:03] daqing: hello everyone, I'm using rbenv with systemd. when my service starts, rbenv reports error with "rbenv: version '2.6.0' not found"
[09:24:16] daqing: so how to fix it
[09:29:18] Fernando-Basso: has joined #ruby
[09:30:02] daqing: has joined #ruby
[09:31:59] fountainpuppy: by quitting 4 minutes in
[09:32:02] DTZUZO: has joined #ruby
[09:33:49] vonfry: has joined #ruby
[09:48:22] jusss: has joined #ruby
[09:52:35] bga57: has joined #ruby
[10:02:10] laaron: has joined #ruby
[10:08:26] mikecmpbll: has joined #ruby
[10:24:16] Emmanuel_Chanel: has joined #ruby
[10:36:34] Menteb: has joined #ruby
[10:37:23] Menteb: has joined #ruby
[10:41:18] hays: i didn't know rbenv was tied to systemd
[10:41:22] vonfry1: has joined #ruby
[10:41:47] cschneid: has joined #ruby
[10:46:43] JoeA2552: has joined #ruby
[10:47:41] reber: has joined #ruby
[10:48:05] dinfuehr_: has joined #ruby
[10:53:05] dinfuehr: has joined #ruby
[10:59:06] nowhere_man: has joined #ruby
[10:59:18] Mike11: has joined #ruby
[11:06:21] DTZUZO: has joined #ruby
[11:08:36] dinfuehr: has joined #ruby
[11:15:56] clemens3: has joined #ruby
[12:20:56] szulak_: has joined #ruby
[12:43:20] AJA4350: has joined #ruby
[12:48:44] lucasb: has joined #ruby
[12:50:52] jottr: has joined #ruby
[13:05:16] kapil____: has joined #ruby
[13:06:21] Madmanden: has joined #ruby
[13:12:48] cschneid: has joined #ruby
[13:15:59] garyserj: has joined #ruby
[13:31:38] sarink: has joined #ruby
[13:32:59] garyserj: has joined #ruby
[13:33:52] nowhere_man: has joined #ruby
[13:35:21] Inline: has joined #ruby
[13:51:42] tdy: has joined #ruby
[14:07:18] clemens3_: has joined #ruby
[14:07:19] dinfuehr: has joined #ruby
[14:19:50] dinfuehr: has joined #ruby
[14:23:15] nowhere_man: has joined #ruby
[14:49:59] garyserj: has joined #ruby
[14:52:16] davidw_: has joined #ruby
[14:59:54] dinfuehr: has joined #ruby
[15:02:24] garyserj: has joined #ruby
[15:06:43] RougeR: has joined #ruby
[15:07:57] Fernando-Basso: has joined #ruby
[15:10:42] jinie: has joined #ruby
[15:13:29] roshanavand1: has joined #ruby
[15:14:47] za1b1tsu: has joined #ruby
[15:16:56] dinfuehr: has joined #ruby
[15:23:42] nchambers: has joined #ruby
[15:31:28] Mike11: has joined #ruby
[15:48:42] ellcs: has joined #ruby
[15:50:54] cschneid: has joined #ruby
[15:56:19] RougeR: has joined #ruby
[15:57:46] beastiero: has joined #ruby
[16:03:41] tdy: has joined #ruby
[16:06:11] szulak_: has joined #ruby
[16:06:56] garyserj: has joined #ruby
[16:13:11] davidw_: has joined #ruby
[16:18:23] MasterAsia: has joined #ruby
[16:46:49] LightStalker: has joined #ruby
[16:50:40] rubydoc: has joined #ruby
[17:01:01] garyserj: has joined #ruby
[17:24:13] tdy1: has joined #ruby
[17:25:41] Inline: has joined #ruby
[17:37:25] armyriad: has joined #ruby
[17:38:45] solocshaw: has joined #ruby
[17:43:31] za1b1tsu: has joined #ruby
[17:47:22] orbyt_: has joined #ruby
[17:49:39] RougeR: has joined #ruby
[17:50:48] RougeR: has joined #ruby
[17:55:30] ellcs: has joined #ruby
[18:01:25] za1b1tsu: has joined #ruby
[18:13:39] donofrio: has joined #ruby
[18:16:05] cschneid: has joined #ruby
[18:16:08] status402: has joined #ruby
[18:25:24] mikecmpbll: has joined #ruby
[18:27:02] mikecmpb_: has joined #ruby
[18:43:05] davidw_: has joined #ruby
[18:53:33] Renich: has joined #ruby
[18:57:48] spiette: has joined #ruby
[19:00:34] tdy1: has joined #ruby
[19:00:37] donofrio: has joined #ruby
[19:00:38] harmaahylje: has left #ruby: ()
[19:03:53] ellcs: has joined #ruby
[19:04:39] laaron: has joined #ruby
[19:10:45] hutch: has joined #ruby
[19:25:47] connermcd: has joined #ruby
[19:27:46] mikecmpbll: has joined #ruby
[19:29:44] kapil____: has joined #ruby
[19:32:10] solocshaw: has joined #ruby
[19:33:22] tdy: has joined #ruby
[19:45:52] Renich_: has joined #ruby
[19:54:45] planigan: has joined #ruby
[20:01:18] laaron-: has joined #ruby
[20:02:43] Renich_: has joined #ruby
[20:08:07] infernix: has joined #ruby
[20:11:14] hutch: has joined #ruby
[20:14:41] reber: has joined #ruby
[20:31:42] dviola: has joined #ruby
[20:41:46] hiroaki: has joined #ruby
[20:48:29] ellcs: has joined #ruby
[20:58:39] laaron: has joined #ruby
[21:01:44] cschneid: has joined #ruby
[21:02:45] laaron-: has joined #ruby
[21:07:08] RougeR: has joined #ruby
[21:12:47] za1b1tsu: has joined #ruby
[21:23:58] sarink: has joined #ruby
[21:28:36] cow[moo]: has joined #ruby
[21:33:20] cschneid: has joined #ruby
[21:38:27] hays: is there any way to make sure code is run before an object is destroyed?
[21:38:35] hays: kind of like a destructor
[21:41:02] tdy1: has joined #ruby
[21:41:49] sarink: has joined #ruby
[21:43:37] Calinou: has joined #ruby
[21:52:26] Inline: has joined #ruby
[21:52:31] hays: i have an object that creates some stuff at the system level that i'd like to ensure gets cleaned up
[21:56:09] MasterAsia: has joined #ruby
[21:56:49] hays: i guess i could have the user deal with it by having a method they call in an ensure block or something..
[21:57:42] phaul: hays: look at File.open API as an example
[21:57:52] MyMind: has joined #ruby
[21:58:01] phaul: &ri File.open
[21:58:02] rubydoc: https://ruby-doc.org/core-2.6/File.html#method-c-open
[21:59:44] hays: phaul: that indicates if you don't pass it a block the file doesn't close?
[22:00:16] phaul: yeah, true, then the user has to close it.
[22:00:31] phaul: but if you don't like that you can mimick the block API
[22:01:54] hays: seems reasonable
[22:02:17] hays: so in that case you pass it a block an then run .close after the yield I guess
[22:02:38] hays: or maybe just in an ensure block
[22:03:17] phaul: ensure is better, with ensure it will run even if one jumps out somehow, throwing exception etc
[22:03:58] hays: and as a user if I want to have a bunch of objects like this and don't want nested blocks, I can just use begin/ensure/end to manage the resources
[22:04:45] RougeR: has joined #ruby
[22:04:49] laaron: has joined #ruby
[22:05:12] phaul: yes, even File gives two APIs, leaves the choice to the user
[22:07:57] laaron: has joined #ruby
[22:08:23] ellcs: has joined #ruby
[22:12:22] cd: has joined #ruby
[22:16:12] laaron-: has joined #ruby
[22:17:28] laaron: has joined #ruby
[22:17:59] agent_white: has joined #ruby
[22:24:31] hays: I guess something like this
[22:24:32] hays: https://dpaste.de/JWmC
[22:26:08] havenwood: you can check #block_given? and omit `&block` when you use yield
[22:26:41] havenwood: hays: or don't use yield and do: block.call self
[22:28:18] MasterAsia: has joined #ruby
[22:34:27] hays: might be nice to have a class method with a list of open objects
[22:34:44] hays: so you could do B.close_all or something
[22:35:40] d^sh: has joined #ruby
[22:43:12] za1b1tsu: has joined #ruby
[22:43:33] hutch: has joined #ruby
[22:50:13] zapata: has joined #ruby
[22:51:34] gix: has joined #ruby
[22:53:01] hutch: has joined #ruby
[23:04:45] nowhere_man: has joined #ruby
[23:07:28] rexmie: has joined #ruby
[23:07:35] rexmie: hello world
[23:09:44] nchambers: has joined #ruby
[23:10:00] powerbit: has joined #ruby
[23:10:46] ellcs: has joined #ruby
[23:15:35] houhoulis: has joined #ruby
[23:17:03] garyserj: has joined #ruby
[23:22:52] phaul: hi rexmie
[23:24:19] rexmie: howz life? having a great holiday?
[23:33:15] cschneid: has joined #ruby
[23:40:48] garyserj: has joined #ruby
[23:44:37] cschneid: has joined #ruby
[23:55:41] donofrio: has joined #ruby
[23:57:10] ogres: has joined #ruby