« Back to channel list

#ruby - 04 May 2019

« Back 1 day Forward 1 day »
[00:02:06] rhuang: has joined #ruby
[00:06:48] jenrzzz: has joined #ruby
[00:10:56] rhuang: has joined #ruby
[00:13:07] u0_a238: has joined #ruby
[00:13:57] jottr: has joined #ruby
[00:24:11] jottr: has joined #ruby
[00:33:53] supergeek[m]: has joined #ruby
[00:34:06] houhoulis: has joined #ruby
[00:34:22] jottr: has joined #ruby
[00:37:08] ur5us: has joined #ruby
[00:38:48] gb_away: has joined #ruby
[00:44:37] jottr: has joined #ruby
[00:46:45] bougyman: has joined #ruby
[00:54:49] jottr: has joined #ruby
[01:05:03] jottr: has joined #ruby
[01:06:16] jmcgnh: has joined #ruby
[01:07:01] haengma: has joined #ruby
[01:07:35] ruby-lang974: has joined #ruby
[01:12:51] jmcgnh: has joined #ruby
[01:14:14] haengma: has joined #ruby
[01:19:24] jmcgnh: has joined #ruby
[01:20:18] jottr: has joined #ruby
[01:26:11] haengma: has joined #ruby
[01:26:25] noobineer: has joined #ruby
[01:32:11] arescorpio: has joined #ruby
[01:36:48] jottr: has joined #ruby
[01:39:17] dsmythe: has joined #ruby
[01:47:05] jottr: has joined #ruby
[01:47:25] u0_a238_: has joined #ruby
[01:49:43] Swyper: has joined #ruby
[01:50:38] crankharder: has joined #ruby
[01:52:17] cd: has joined #ruby
[01:57:32] jottr: has joined #ruby
[02:01:51] dsmythe: has joined #ruby
[02:12:01] jottr: has joined #ruby
[02:15:23] _whitelogger: has joined #ruby
[02:28:47] jottr: has joined #ruby
[02:31:20] haengma: has joined #ruby
[02:35:49] noobineer: has joined #ruby
[02:39:00] jottr: has joined #ruby
[02:48:42] rhuang: has joined #ruby
[02:49:14] jottr: has joined #ruby
[02:59:26] jottr: has joined #ruby
[02:59:31] ramfjord: has joined #ruby
[03:09:38] jottr: has joined #ruby
[03:11:31] braincrash: has joined #ruby
[03:15:13] tdy: has joined #ruby
[03:15:48] dsmythe: has joined #ruby
[03:19:53] jottr: has joined #ruby
[03:21:21] zacts: has joined #ruby
[03:27:41] dsmythe: has joined #ruby
[03:28:51] duderonomy: has joined #ruby
[03:36:35] jottr: has joined #ruby
[03:38:36] jenrzzz: has joined #ruby
[03:41:43] arescorpio: has joined #ruby
[03:44:45] ur5us: has joined #ruby
[03:46:48] jottr: has joined #ruby
[03:57:01] jottr: has joined #ruby
[04:04:24] ur5us: has joined #ruby
[04:05:23] mr_rich101: has joined #ruby
[04:05:41] laaron: has joined #ruby
[04:07:15] jottr: has joined #ruby
[04:09:09] ur5us: has joined #ruby
[04:09:33] lipoqil: has joined #ruby
[04:11:11] mostlybadfly: has joined #ruby
[04:13:42] Milos: has joined #ruby
[04:15:15] pwillard: has joined #ruby
[04:25:04] jottr: has joined #ruby
[04:35:17] jottr: has joined #ruby
[04:37:56] Milos: has joined #ruby
[04:45:30] jottr: has joined #ruby
[04:55:43] jottr: has joined #ruby
[04:57:34] d^sh: has joined #ruby
[05:00:56] dsmythe: has joined #ruby
[05:05:56] jottr: has joined #ruby
[05:06:36] haengma: has joined #ruby
[05:22:09] jottr: has joined #ruby
[05:22:38] laaron: has joined #ruby
[05:27:22] aupadhye: has joined #ruby
[05:32:05] dinfuehr: has joined #ruby
[05:33:54] sauvin: has joined #ruby
[05:38:48] jenrzzz: has joined #ruby
[05:38:51] jottr: has joined #ruby
[05:49:05] jottr: has joined #ruby
[05:59:17] jottr: has joined #ruby
[06:04:13] u0_a238: has joined #ruby
[06:09:31] jottr: has joined #ruby
[06:18:02] u0_a238: has joined #ruby
[06:19:43] jottr: has joined #ruby
[06:24:34] jarray52: has joined #ruby
[06:24:47] jarray52: has joined #ruby
[06:29:56] jottr: has joined #ruby
[06:36:53] laaron: has joined #ruby
[06:43:57] Ai9zO5AP: has joined #ruby
[06:46:40] jottr: has joined #ruby
[06:56:19] Milos: has joined #ruby
[06:59:15] laaron: has joined #ruby
[07:00:22] jenrzzz: has joined #ruby
[07:00:28] Ai9zO5AP: has joined #ruby
[07:02:12] reber: has joined #ruby
[07:02:12] jottr: has joined #ruby
[07:02:46] dsmythe: has joined #ruby
[07:05:27] ramfjord: has joined #ruby
[07:07:01] laaron: has joined #ruby
[07:12:35] conta: has joined #ruby
[07:19:13] druonysus: has joined #ruby
[07:19:13] druonysus: has joined #ruby
[07:21:08] Swyper: has joined #ruby
[07:24:40] laaron: has joined #ruby
[07:30:09] jottr: has joined #ruby
[07:33:19] laaron: has joined #ruby
[07:34:20] haengma: has joined #ruby
[07:39:17] flips: has joined #ruby
[07:39:32] flips: has left #ruby: ("BBL")
[07:44:39] laaron: has joined #ruby
[07:45:37] mikecmpbll: has joined #ruby
[07:47:18] jarray52: has left #ruby: ()
[07:53:04] landakram: has joined #ruby
[07:59:27] jottr: has joined #ruby
[08:01:53] laaron: has joined #ruby
[08:06:00] rippa: has joined #ruby
[08:09:39] jottr: has joined #ruby
[08:11:19] mikecmpbll: has joined #ruby
[08:14:07] conta1: has joined #ruby
[08:19:52] jottr: has joined #ruby
[08:26:54] claudiuinberlin: has joined #ruby
[08:28:48] kyrylo: has joined #ruby
[08:30:06] jottr: has joined #ruby
[08:45:32] nowhere_man: has joined #ruby
[08:45:41] jenrzzz: has joined #ruby
[08:48:20] laaron: has joined #ruby
[08:58:15] laaron: has joined #ruby
[09:01:44] jenrzzz: has joined #ruby
[09:05:44] ramfjord: has joined #ruby
[09:08:31] nowhere_man: has joined #ruby
[09:11:57] reber: has joined #ruby
[09:20:23] cek: has joined #ruby
[09:22:23] cek: has left #ruby: ()
[09:26:40] gix: has joined #ruby
[09:30:30] m_antis: has joined #ruby
[09:35:08] fphilipe: has joined #ruby
[09:39:31] jottr: has joined #ruby
[09:39:53] voidwatch: has joined #ruby
[09:43:25] Dbugger: has joined #ruby
[09:43:35] laaron: has joined #ruby
[09:49:45] jottr: has joined #ruby
[09:56:46] fphilipe: has joined #ruby
[10:00:46] jhill: has joined #ruby
[10:02:11] strmpnk: has joined #ruby
[10:02:14] ec: has joined #ruby
[10:03:03] englishm: has joined #ruby
[10:03:35] Swyper: has joined #ruby
[10:03:52] englishm: has joined #ruby
[10:04:38] englishm: has joined #ruby
[10:05:43] jottr: has joined #ruby
[10:15:58] jottr: has joined #ruby
[10:21:45] nowhere_man: has joined #ruby
[10:27:52] Inline: has joined #ruby
[10:30:11] AJA4350: has joined #ruby
[10:31:50] al2o3-cr: has joined #ruby
[10:32:29] jottr: has joined #ruby
[10:38:38] Swyper: has joined #ruby
[10:39:55] dar123: has joined #ruby
[10:40:58] sagax: has joined #ruby
[10:42:42] jottr: has joined #ruby
[10:51:11] kapil____: has joined #ruby
[10:51:39] Swyper: has joined #ruby
[10:52:56] jottr: has joined #ruby
[10:55:41] conta1: has joined #ruby
[10:56:56] Swyper: has joined #ruby
[11:11:55] _whitelogger_: has joined #ruby
[11:20:50] fphilipe: has joined #ruby
[11:22:12] jottr: has joined #ruby
[11:24:06] Research: has joined #ruby
[11:24:29] Research: I'm getting "ERROR: While executing gem ... (NameError)" when trying to use gem uninstall
[11:24:37] Research: Does anyone here know what that means?
[11:25:26] Research: actually nvmd I figured it out
[11:25:37] Research: apparently I had to install rdoc to uninstall gems
[11:25:45] Research: but it installs them just fine without it
[11:35:16] jenrzzz: has joined #ruby
[11:38:25] jottr: has joined #ruby
[11:46:07] Mia: has joined #ruby
[11:46:07] Mia: has joined #ruby
[11:48:40] jottr: has joined #ruby
[11:49:20] d^sh: has joined #ruby
[11:58:54] jottr: has joined #ruby
[12:00:11] nowhere_man: has joined #ruby
[12:06:43] leah2: has joined #ruby
[12:09:07] jottr: has joined #ruby
[12:09:17] ur5us: has joined #ruby
[12:19:26] Xeago: has joined #ruby
[12:21:57] jottr: has joined #ruby
[12:29:32] crova: has joined #ruby
[12:31:25] Xeago: has joined #ruby
[12:41:02] clemens3_: has joined #ruby
[12:47:25] TheBrayn: has joined #ruby
[12:49:14] dellavg_: has joined #ruby
[12:54:32] wallace_mu: has joined #ruby
[12:56:59] kyrylo: has joined #ruby
[12:59:29] ltem: has joined #ruby
[13:06:27] dinfuehr: has joined #ruby
[13:24:22] jottr: has joined #ruby
[13:24:54] fphilipe: has joined #ruby
[13:35:27] ltem: has joined #ruby
[13:35:30] jenrzzz: has joined #ruby
[13:38:30] crawler: has joined #ruby
[13:43:59] zacts: has joined #ruby
[13:48:05] jottr: has joined #ruby
[13:53:36] jottr: has joined #ruby
[13:54:08] _sfiguser: has joined #ruby
[13:58:53] ltem: has joined #ruby
[14:16:04] jottr: has joined #ruby
[14:20:48] vindvaki: has joined #ruby
[14:26:17] jottr: has joined #ruby
[14:29:49] moei: has joined #ruby
[14:36:30] jottr: has joined #ruby
[14:38:48] yaewa: has joined #ruby
[14:46:41] jottr: has joined #ruby
[14:52:16] queip: has joined #ruby
[14:56:55] jottr: has joined #ruby
[15:00:46] UncleCid__: has joined #ruby
[15:04:41] pskosinski: has joined #ruby
[15:16:59] pskosinski: has joined #ruby
[15:17:44] kyrylo: has joined #ruby
[15:19:24] pskosinski: has joined #ruby
[15:20:08] jottr: has joined #ruby
[15:23:23] moei: has joined #ruby
[15:26:14] pskosinski: has joined #ruby
[15:26:41] beeeshk: has joined #ruby
[15:30:19] jottr: has joined #ruby
[15:35:48] jenrzzz: has joined #ruby
[15:45:11] _whitelogger: has joined #ruby
[15:45:12] fphilipe: has joined #ruby
[15:53:24] zacts: has joined #ruby
[15:53:58] jottr: has joined #ruby
[15:55:59] zacts: has joined #ruby
[16:06:53] flatironschool: has joined #ruby
[16:07:31] Inline: has joined #ruby
[16:10:27] mg: has joined #ruby
[16:10:55] jottr: has joined #ruby
[16:13:56] plujon: has joined #ruby
[16:17:02] GodFather: has joined #ruby
[16:17:39] fphilipe: has joined #ruby
[16:17:57] plujon: for i in a b; do echo $i>$i; done; ruby -e 'ARGF.each_line do puts "#{ARGF.filename} #{ARGF.lineno}"; end' a b
[16:18:19] plujon: What is the expected output of that? 'a 1 b 1' or 'a 1 b 2' ?
[16:18:58] Zarthus: latter cause i just ran it
[16:19:03] plujon: I expected the former, but I got the latter.
[16:19:35] laaron: has joined #ruby
[16:20:37] plujon: Doesn't that contradict http://ruby-doc.org/core-2.5.0/ARGF.html#method-i-each ?
[16:21:07] jottr: has joined #ruby
[16:23:18] phaul: "This method allows you to treat the files supplied on the command line as a single file consisting of the concatenation of each named file. "
[16:25:03] plujon: phaul: Hmm. Thanks. I guess it is the example that is confusing.
[16:25:09] phaul: I don't know. I think I agree with you now
[16:25:19] plujon: "For example, the following code prints out each line of each named file ..."
[16:25:58] plujon: "... displaying the filename once per file"
[16:26:11] phaul: displaying the filename once per file: yeah if it works the way it does it would only print the first file
[16:27:00] plujon: I previously thought $. would yield the global line, and ARGF.lineno would return the line inside the current ARGF element.
[16:27:41] phaul: yeah the documentation certeainly suggest that
[16:27:55] plujon: In fact, I vaguely recall seeing this behavior once upon a time (ruby 2.4?). But I'm not sure.
[16:30:18] plujon: It looks like either a ruby bug or a documentation bug. I'm using ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]
[16:31:26] jottr: has joined #ruby
[16:33:24] plujon: I'll file a bug.
[16:34:15] plujon: It is hard to believe ARGF.lineno isn't tested in the ruby build/release process. Perhaps I am mistaken.
[16:36:03] phaul: https://github.com/ruby/ruby/blob/trunk/test/ruby/test_argf.rb
[16:36:17] laaron: has joined #ruby
[16:36:44] phaul: there is explicit tests for line numbers
[16:41:20] plujon: Hmm: ARGF.file.lineno !
[16:41:29] Research: has left #ruby: ("Leaving")
[16:47:51] BTRE: has joined #ruby
[16:50:03] dar123: has joined #ruby
[16:51:15] jottr: has joined #ruby
[16:54:20] TomyLobo: has joined #ruby
[16:56:07] plujon: https://bugs.ruby-lang.org/issues/15823
[16:56:17] plujon: We'll see what the devs say.
[16:59:07] claudiuinberlin: has joined #ruby
[16:59:49] cnsvc: has joined #ruby
[17:01:29] jottr: has joined #ruby
[17:03:06] conta: has joined #ruby
[17:08:46] tdy: has joined #ruby
[17:17:26] jottr: has joined #ruby
[17:18:40] plujon: has joined #ruby
[17:21:50] wald0: has joined #ruby
[17:27:42] jottr: has joined #ruby
[17:28:21] fphilipe: has joined #ruby
[17:36:03] jenrzzz: has joined #ruby
[17:37:54] jottr: has joined #ruby
[17:43:29] flatironschool: has joined #ruby
[17:48:06] jottr: has joined #ruby
[17:57:35] rhuang: has joined #ruby
[17:57:49] desperek: has joined #ruby
[17:58:00] desperek: hi, how do you integrate database into your web app?
[17:58:19] jottr: has joined #ruby
[17:58:36] desperek: is requiring a one file with, umh lets say a database class that handles connecting to db and then querying it a good way
[17:59:34] flatironschool: has joined #ruby
[18:00:05] phaul: depends. There are two main approaches afaict , the repository pattern (prefered by most) vs the active record pattern
[18:00:37] phaul: what you are describing is closer to active record pattern
[18:00:42] phaul: sorry, the other one
[18:00:48] desperek: the repo one?
[18:00:48] phaul: repository pattern
[18:00:59] desperek: and active record pattern is what
[18:01:03] desperek: keeping a persistent connection?
[18:01:42] phaul: having classes per "models" (db tables) whose class methods relate to all entries and instance methods relate to rows
[18:03:09] phaul: the connection can be kept persistent in the app for either solutions
[18:04:08] desperek: oh right i get whats the difference now
[18:06:16] desperek: either way, i dont get how do you keep the connection persistent lol
[18:07:14] phaul: one way: inside Singleton app object, that's created from top level "main"
[18:07:46] desperek: why didnt i think about it :thinking:
[18:07:47] phaul: then you just pass that around. It's a disguised bunch of global vars
[18:08:21] desperek: or wait, app object
[18:08:26] phaul: still you are explicit about passing it, so a bit better than $connection
[18:08:33] jottr: has joined #ruby
[18:11:51] desperek: phaul, well but i could just make like @db on top and then use that, right?
[18:12:01] phaul: that's almsot the same.
[18:12:34] segy: has joined #ruby
[18:12:39] desperek: phaul, the same as $connection or passing the object though
[18:12:59] desperek: well, nvm that question i guess. thanks anyways phaul
[18:14:01] phaul: difference being wehter every place can call $db.close and mess with things, or you can have large chunks of unrelated libraries and codes that simply can't see the db connection
[18:18:45] jottr: has joined #ruby
[18:28:59] jottr: has joined #ruby
[18:35:57] Dbugger: has joined #ruby
[18:36:20] ukd1: has joined #ruby
[18:39:12] jottr: has joined #ruby
[18:40:41] cd: has joined #ruby
[18:42:29] dinfuehr: has joined #ruby
[18:42:51] old_relik: has joined #ruby
[18:43:12] d0liver: has joined #ruby
[18:43:45] old_relik: x-post from #rubyonrails: is there an easy way to get time object for time at a specifc time of the day, like 2pm for today, but give 2pm for next day if it's already past 2pm today
[18:49:29] jottr: has joined #ruby
[18:57:50] AndroidKitKat: has left #ruby: ("Igloo IRC: https://iglooirc.com")
[18:58:51] weteamsteve: has joined #ruby
[18:59:44] jottr: has joined #ruby
[19:04:49] Swyper: has joined #ruby
[19:09:49] Xiti: has joined #ruby
[19:09:55] jottr: has joined #ruby
[19:17:36] nowhere_man: has joined #ruby
[19:18:28] pskosinski: has joined #ruby
[19:20:07] jottr: has joined #ruby
[19:27:46] queip: has joined #ruby
[19:30:25] jmcgnh: has joined #ruby
[19:30:25] jottr: has joined #ruby
[19:30:48] cthulchu_: has joined #ruby
[19:36:15] jenrzzz: has joined #ruby
[19:37:05] jottr: has joined #ruby
[19:41:26] jmcgnh: has joined #ruby
[19:42:15] d^sh: has joined #ruby
[19:46:06] claudiuinberlin: has joined #ruby
[19:46:14] jmcgnh: has joined #ruby
[19:53:32] orbyt_: has joined #ruby
[19:57:44] jottr: has joined #ruby
[20:00:38] fphilipe: has joined #ruby
[20:03:08] jenrzzz: has joined #ruby
[20:03:54] kyrylo: has joined #ruby
[20:04:08] jmcgnh: has joined #ruby
[20:04:13] AJA4350: has joined #ruby
[20:07:58] Swyper: has joined #ruby
[20:07:58] jottr: has joined #ruby
[20:08:38] jmcgnh: has joined #ruby
[20:13:31] jmcgnh: has joined #ruby
[20:16:46] fphilipe: has joined #ruby
[20:18:12] jottr: has joined #ruby
[20:19:14] jmcgnh: has joined #ruby
[20:28:23] jottr: has joined #ruby
[20:38:37] jottr: has joined #ruby
[20:48:50] jottr: has joined #ruby
[20:55:23] u0_a238: has joined #ruby
[20:59:02] jottr: has joined #ruby
[20:59:13] orbyt_: has joined #ruby
[21:00:37] jenrzzz: has joined #ruby
[21:02:12] gix-: has joined #ruby
[21:08:34] Swyper: has joined #ruby
[21:09:16] jottr: has joined #ruby
[21:15:22] jrabe: has joined #ruby
[21:19:28] jottr: has joined #ruby
[21:28:29] haengma: has joined #ruby
[21:29:40] jottr: has joined #ruby
[21:38:46] Swyper: has joined #ruby
[21:39:54] jottr: has joined #ruby
[21:42:36] jenrzzz: has joined #ruby
[21:49:15] Swyper: has joined #ruby
[21:49:44] weteamsteve1: has joined #ruby
[21:50:06] jottr: has joined #ruby
[22:00:18] jottr: has joined #ruby
[22:03:38] Swyper: has joined #ruby
[22:04:01] jrabe: has left #ruby: ()
[22:06:51] Swyper: has joined #ruby
[22:07:12] weteamsteve2: has joined #ruby
[22:08:55] dsmythe: has joined #ruby
[22:10:19] dsmythe_: has joined #ruby
[22:10:32] jottr: has joined #ruby
[22:11:22] Tempesta: has joined #ruby
[22:11:31] orbyt_: has joined #ruby
[22:17:07] fphilipe: has joined #ruby
[22:17:45] Iambchop: old_relik: https://stackoverflow.com/questions/43130646/ruby-how-to-find-the-next-occurrence-of-a-given-hour
[22:19:01] Iambchop: >> require 'time'; Time.parse('2pm')
[22:19:02] ruby[bot]: Iambchop: # => 2019-05-04 14:00:00 +0000 (https://eval.in/1102878)
[22:19:13] Iambchop: >> require 'time'; (t=Time.parse('2pm')) < Time.now ? t+86400 : t
[22:19:14] ruby[bot]: Iambchop: # => 2019-05-05 14:00:00 +0000 (https://eval.in/1102879)
[22:20:46] jottr: has joined #ruby
[22:30:59] jottr: has joined #ruby
[22:34:22] mosh: has joined #ruby
[22:41:12] jottr: has joined #ruby
[22:42:33] zacts: has joined #ruby
[22:44:33] Swyper: has joined #ruby
[22:47:57] AndroidKitKat: has joined #ruby
[22:51:25] jottr: has joined #ruby
[22:59:36] nowhere_man: has joined #ruby
[23:01:36] jottr: has joined #ruby
[23:03:43] RiPuk: has joined #ruby
[23:07:12] RiPuk: has joined #ruby
[23:11:50] jottr: has joined #ruby
[23:22:05] jottr: has joined #ruby
[23:28:56] clemens3: has joined #ruby
[23:29:15] haengma: has joined #ruby
[23:32:18] jottr: has joined #ruby
[23:42:31] jottr: has joined #ruby
[23:51:36] laaron: has joined #ruby
[23:52:45] jottr: has joined #ruby