« Back to channel list

#ruby - 09 March 2019

« Back 1 day Forward 1 day »
[00:09:57] themsay: has joined #ruby
[00:11:29] emilford: has joined #ruby
[00:13:54] DaRock: has joined #ruby
[00:16:11] cthulchu_: has joined #ruby
[00:26:44] emilford: has joined #ruby
[00:27:16] mangold: has joined #ruby
[00:28:44] Swyper: has joined #ruby
[00:36:19] emilford: has joined #ruby
[00:41:11] Swyper: has joined #ruby
[00:43:01] emilford: has joined #ruby
[00:57:02] mjacob: is it possible to activate a refinement globally for the whole project?
[01:11:55] emilford: has joined #ruby
[01:12:18] tiogrand_: has joined #ruby
[01:13:08] tiogrand_: has joined #ruby
[01:23:54] houhoulis: has joined #ruby
[01:38:54] emilford: has joined #ruby
[01:41:35] symm-: has joined #ruby
[01:41:56] symm-: ruby on windows is such a fragile thing
[01:46:12] Nicmavr: has joined #ruby
[01:46:24] cnsvc: has joined #ruby
[01:48:56] cthulchu_: has joined #ruby
[01:57:53] nwradio: has joined #ruby
[02:00:29] Swyper: has joined #ruby
[02:05:59] eblip: has joined #ruby
[02:06:52] eb0t: has joined #ruby
[02:20:04] apparition: has joined #ruby
[02:20:29] Onwarion_re: has joined #ruby
[02:22:37] mangold: has joined #ruby
[02:23:31] cd: has joined #ruby
[02:24:21] ur5us: has joined #ruby
[02:24:46] emilford: has joined #ruby
[02:34:21] tdy1: has joined #ruby
[02:35:17] ellcs1: has joined #ruby
[02:37:41] SCHAPiE: has joined #ruby
[02:39:37] emilford: has joined #ruby
[02:39:42] themsay: has joined #ruby
[02:42:34] Azure: has joined #ruby
[02:46:10] mangold: has joined #ruby
[02:48:51] emilford: has joined #ruby
[03:03:39] D9: has joined #ruby
[03:08:28] emilford: has joined #ruby
[03:13:26] laaron: has joined #ruby
[03:19:03] crankharder: has joined #ruby
[03:26:13] cnsvc: has joined #ruby
[03:31:19] emilford: has joined #ruby
[03:38:56] crankharder: has joined #ruby
[03:43:33] orbyt_: has joined #ruby
[03:49:11] bruce_lee: has joined #ruby
[03:53:22] duderonomy: has joined #ruby
[03:58:48] crankharder: has joined #ruby
[04:10:19] braincrash: has joined #ruby
[04:10:29] bjpenn: has joined #ruby
[04:18:36] crankharder: has joined #ruby
[04:28:37] emilford: has joined #ruby
[04:33:49] gix-: has joined #ruby
[04:38:28] crankharder: has joined #ruby
[04:45:13] emilford: has joined #ruby
[04:49:42] debajita: has joined #ruby
[04:50:01] laaron: has joined #ruby
[04:50:25] emilford: has joined #ruby
[04:52:52] debajita: has left #ruby: ()
[04:58:22] crankharder: has joined #ruby
[04:59:56] vonfry: has joined #ruby
[05:10:04] emilford: has joined #ruby
[05:16:33] papillon: has joined #ruby
[05:18:11] crankharder: has joined #ruby
[05:20:11] rippa: has joined #ruby
[05:23:58] leftylink: mjacob: I couldn't think of a way to do that, since the docs say that `using` activates a refinement for a lexical scope. unless the entire project is contained within one file, but that probably was not intended by the question
[05:30:16] vonfry: has joined #ruby
[05:38:02] crankharder: has joined #ruby
[05:40:09] mroutis: has joined #ruby
[05:40:39] vonfry: has left #ruby: ("WeeChat 2.4")
[05:41:49] mroutis: howdy, fellas; I was looking for a ruby gem that I can include to my rails app to show the loading time and queries of each view (it is similar to "peek" but a more old)
[05:47:49] themsay: has joined #ruby
[05:57:52] crankharder: has joined #ruby
[05:58:56] schleppel: has joined #ruby
[06:10:26] emilford: has joined #ruby
[06:17:44] crankharder: has joined #ruby
[06:33:08] elcontrastador: Is there a pure ruby to modify file mtimes in the past (not using a system call)? I develop on a mac and deploy on both mac and linux. Need something more portable than using the system's 'touch', for instance
[06:42:27] platinum50: has joined #ruby
[06:47:50] evdubs: has joined #ruby
[06:48:28] elcontrastador: Ignore....touch options are similar enough between macos and linux.
[06:56:52] segy: has joined #ruby
[07:01:41] emilford: has joined #ruby
[07:15:36] SuperLag: has joined #ruby
[07:25:46] Dbugger: has joined #ruby
[07:28:58] hightower3: has joined #ruby
[07:32:42] tdy: has joined #ruby
[07:35:16] emilford: has joined #ruby
[07:41:24] emilford: has joined #ruby
[07:41:52] kapil____: has joined #ruby
[08:00:35] emilford: has joined #ruby
[08:02:35] spacesuitdiver: has joined #ruby
[08:03:34] sauvin: has joined #ruby
[08:04:05] woodruffw: elcontrastador: File#utime is probably the right way to do this
[08:04:14] woodruffw: https://ruby-doc.org/core-2.6.1/File.html#method-c-utime
[08:06:50] elcontrastador: woodruffw: Yes! Perfect! Can't believe I missed groking thru the docs
[08:07:05] woodruffw: no problem :-)
[08:09:17] sameerynho: has joined #ruby
[08:13:48] v01d4lph4: has joined #ruby
[08:14:31] sgen: has joined #ruby
[08:26:45] emilford: has joined #ruby
[08:32:14] emilford: has joined #ruby
[08:35:44] spacesuitdiver: has joined #ruby
[08:36:48] ravenousmoose: has joined #ruby
[08:40:12] emilford: has joined #ruby
[08:41:59] bjpenn: has joined #ruby
[08:50:51] sgen: has joined #ruby
[08:56:04] DaRock: has joined #ruby
[09:12:15] emilford: has joined #ruby
[09:13:27] dellavg__: has joined #ruby
[09:14:44] mangold: has joined #ruby
[09:18:36] emilford: has joined #ruby
[09:21:25] tdy: has joined #ruby
[09:27:04] emilford: has joined #ruby
[09:28:51] luminousnine: has joined #ruby
[09:30:56] conta: has joined #ruby
[09:33:44] Milos: has joined #ruby
[09:41:50] claudiuinberlin: has joined #ruby
[09:54:05] crankharder: has joined #ruby
[09:57:52] sgen: has joined #ruby
[10:17:22] Ai9zO5AP: has joined #ruby
[10:24:45] schleppel: has joined #ruby
[10:28:02] postmodern: has joined #ruby
[10:37:47] laaron: has joined #ruby
[11:02:16] DTZUZO: has joined #ruby
[11:13:20] crankharder: has joined #ruby
[11:17:07] gix: has joined #ruby
[11:26:54] symm-: has joined #ruby
[11:28:16] rubydoc: has joined #ruby
[11:30:24] ur5us: has joined #ruby
[11:37:37] phaul: &ri Digest::SHA2.new, works now
[11:37:38] rubydoc: https://ruby-doc.org/stdlib-2.6/libdoc/digest/rdoc/Digest/SHA2.html#method-c-new, works now
[11:38:10] phaul: but SHA256 is not accessible becasue it's done by const_missing
[11:39:33] phaul: https://github.com/ruby/ruby/blob/trunk/ext/digest/lib/digest.rb#L10
[11:44:28] phaul: (and not documented)
[11:58:07] mangold: has joined #ruby
[12:03:10] _whitelogger: has joined #ruby
[12:03:34] AJA4350: has joined #ruby
[12:04:33] conta1: has joined #ruby
[12:15:50] clemens3: has joined #ruby
[12:22:46] crankharder: has joined #ruby
[12:25:01] Nicmavr: has joined #ruby
[12:28:54] Tau: has joined #ruby
[12:30:53] crankharder: has joined #ruby
[12:33:49] AJA4350: has joined #ruby
[12:34:42] stooj: has joined #ruby
[12:38:27] govg: has joined #ruby
[12:41:18] mikecmpbll: has joined #ruby
[12:43:44] Sylario: has joined #ruby
[12:44:48] stooj: has joined #ruby
[12:51:11] crankharder: has joined #ruby
[12:54:25] lucasb: has joined #ruby
[12:55:30] ravenousmoose: has joined #ruby
[12:55:43] akem: has joined #ruby
[12:58:47] conta: has joined #ruby
[13:06:50] stooj: has joined #ruby
[13:11:31] crankharder: has joined #ruby
[13:18:19] laaron: has joined #ruby
[13:18:39] ravenousmoose: has joined #ruby
[13:20:37] conta: has joined #ruby
[13:24:09] stooj: has joined #ruby
[13:31:57] crankharder: has joined #ruby
[13:34:39] jinie: has joined #ruby
[13:36:09] stooj: has joined #ruby
[13:39:06] tiogrand_: has joined #ruby
[13:44:20] JoL1hAHN: has joined #ruby
[13:45:26] mikecmpbll: has joined #ruby
[13:46:28] conta: has joined #ruby
[13:46:38] stooj: has joined #ruby
[13:51:18] ellcs1: has joined #ruby
[13:52:11] crankharder: has joined #ruby
[13:55:46] za1b1tsu: has joined #ruby
[13:56:08] cd: has joined #ruby
[14:01:02] cisco: has joined #ruby
[14:02:25] crankharder: has joined #ruby
[14:16:11] PasNox: has joined #ruby
[14:22:46] crankharder: has joined #ruby
[14:43:07] crankharder: has joined #ruby
[14:49:32] Swyper: has joined #ruby
[14:54:30] Dbugger: has joined #ruby
[14:58:00] AJA4351: has joined #ruby
[14:59:17] schleppel: has joined #ruby
[15:03:26] crankharder: has joined #ruby
[15:05:38] apparition: has joined #ruby
[15:09:32] schleppel: has joined #ruby
[15:15:55] hiroaki: has joined #ruby
[15:19:14] Devalo: has joined #ruby
[15:21:39] Swyper: has joined #ruby
[15:24:11] crankharder: has joined #ruby
[15:28:39] millerti: has joined #ruby
[15:30:55] reaVer: has joined #ruby
[15:31:00] nakuku: has joined #ruby
[15:31:34] nakuku: Hello, is it possible to overload `do`? MyModule do ... end
[15:32:21] nakuku: I want to create such DSL that i don't have to do Router.new do ... end. Instead Router do ... end.
[15:32:50] nakuku: I know that it's quite kinky but im just playing with code basically
[15:34:31] crankharder: has joined #ruby
[15:34:34] sgen: has joined #ruby
[15:35:07] jammanbo: has joined #ruby
[15:36:10] yxhuvud: has joined #ruby
[15:36:48] revirt: has joined #ruby
[15:37:21] jammanbo: Just looking at ObjectSpace.count_objects in an MRI Rails app. I realise it's MRI specific and also a "how long is a piece of string" kind of question, but does a T_CLASS count of 15297 seem alarmingly high?
[15:40:26] havenwood: nakuku: Yes, you can define a #Router method that takes a block.
[15:40:45] havenwood: nakuku: (Similar to how #Integer, #String, etc work)
[15:41:18] havenwood: nakuku: https://gist.github.com/havenwood/b28b7fcac46518051b46acd3310ed5d4
[15:42:06] cd: has joined #ruby
[15:42:15] havenwood: phaul: ahh, yeah, that's not the most straightforward thing at all
[15:42:38] havenwood: phaul: nice, thanks for the fix! neat to have &ri work well
[15:42:42] revirt: How many routines do I have to use for a function?
[15:42:55] havenwood: revirt: huh?
[15:43:15] revirt: Please speak up?
[15:44:29] revirt: Oh, that's just a piece of the cherry pod.
[15:44:39] revirt: How come it's only for vars and not ints?
[15:45:03] revirt: Maybe use a method for it...
[15:47:24] revirt: havenwood, Which is... the first piece of how to define a function?????? Right or left?
[15:47:24] ubuntuisloved: has joined #ruby
[15:47:30] jcarl43: has joined #ruby
[15:47:59] nakuku: havenwood: Holly hell! <3
[15:48:11] revirt: Yeah yeah. I might do it.
[15:49:28] revirt: There's no more apocolypto.
[15:50:27] revirt: Forward of reverse?
[15:50:39] havenwood: revirt: I think your markov chain poem is a better fit for #ruby-offtopic.
[15:50:45] revirt: Carry first the message to fix /me up.
[15:50:49] havenwood: ?offtopic revirt
[15:50:49] ruby[bot]: revirt: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[15:50:52] revirt: There's no such channel.
[15:51:01] revirt: That's just the bot.
[15:51:20] revirt: So I'm ready.
[15:52:03] revirt: Hey havenwood. Where'd you get those shades?
[15:52:07] revirt: Cool looking.
[15:53:32] revirt: abcdefghijklmnopqrstuvwxyz123456789.
[15:53:40] havenwood: !kick revirt with a tip of the shades
[15:53:40] ruby[bot]: +bb revirt!*@*$#ruby-banned *!*@112.206.192.193$#ruby-banned
[15:53:40] ruby[bot]: ruby[bot] kicked revirt: a tip of the shades
[15:53:44] ChanServ: +o havenwood
[15:54:41] crankharder: has joined #ruby
[15:54:47] ruby[bot]: -bb revirt!*@*$#ruby-banned *!*@112.206.192.193$#ruby-banned
[15:54:52] ChanServ: -o havenwood
[15:55:46] nowhere_man: has joined #ruby
[15:56:05] iNs: has joined #ruby
[15:58:48] havenwood: jammanbo: no, that doesn't seem alarming for a Rails app
[15:59:09] havenwood: jammanbo: a random sample: :T_CLASS => 13945
[16:01:27] jammanbo: havenwood: Thanks. Was worried I was dynamically creating classes or something stupide.
[16:03:43] sgen: has joined #ruby
[16:12:44] emilford: has joined #ruby
[16:14:50] crankharder: has joined #ruby
[16:15:14] Swyper: has joined #ruby
[16:18:07] Fernando-Basso: has joined #ruby
[16:18:55] conta: has joined #ruby
[16:19:59] jcarl43: has joined #ruby
[16:22:45] mangold: has joined #ruby
[16:43:53] juiko: has joined #ruby
[16:44:28] crankharder: has joined #ruby
[16:46:31] Swyper: has joined #ruby
[16:51:22] sgen: has joined #ruby
[16:54:37] xrexeon: has joined #ruby
[17:04:06] juiko: has joined #ruby
[17:04:22] Swyper: has joined #ruby
[17:04:52] crankharder: has joined #ruby
[17:06:03] sgen: has joined #ruby
[17:06:04] juiko: has left #ruby: ()
[17:09:11] fmccann: has joined #ruby
[17:16:13] cd: has joined #ruby
[17:19:57] dviola: has joined #ruby
[17:25:33] crankharder: has joined #ruby
[17:25:39] Swyper: has joined #ruby
[17:25:55] daemonwrangler: has joined #ruby
[17:28:06] houhoulis: has joined #ruby
[17:30:10] cyberarm: has joined #ruby
[17:32:41] alem0lars: has joined #ruby
[17:33:08] akemot: has joined #ruby
[17:36:03] Devalo: has joined #ruby
[17:37:45] planigan: has joined #ruby
[17:40:10] nowhere_man: has joined #ruby
[17:42:01] tdy: has joined #ruby
[17:45:55] crankharder: has joined #ruby
[17:46:34] tdy1: has joined #ruby
[17:48:31] nwradio: has joined #ruby
[17:48:39] nowhereman: has joined #ruby
[17:51:14] Swyper: has joined #ruby
[17:53:42] aither: has joined #ruby
[17:58:51] nowhere_man: has joined #ruby
[17:59:54] syndikate: has joined #ruby
[18:03:27] schleppel: has joined #ruby
[18:04:34] Devalo: has joined #ruby
[18:05:34] Swyper: has joined #ruby
[18:06:15] crankharder: has joined #ruby
[18:06:19] tdy1: has joined #ruby
[18:07:54] cyberarm_: has joined #ruby
[18:10:42] reber: has joined #ruby
[18:15:11] Swyper: has joined #ruby
[18:18:41] AJA4351: has joined #ruby
[18:18:43] hightower3: has joined #ruby
[18:23:11] aqd: has joined #ruby
[18:24:03] Stan: has joined #ruby
[18:24:26] Swyper: has joined #ruby
[18:24:49] AndreYuhai: has joined #ruby
[18:26:37] crankharder: has joined #ruby
[18:26:43] sgen: has joined #ruby
[18:27:09] planigan: has joined #ruby
[18:36:53] crankharder: has joined #ruby
[18:45:49] v01d4lph4: has joined #ruby
[18:50:35] Tau: has joined #ruby
[18:57:07] crankharder: has joined #ruby
[19:04:15] Swyper: has joined #ruby
[19:05:28] planigan: has joined #ruby
[19:05:32] Swyper: has joined #ruby
[19:06:55] zachk: has joined #ruby
[19:08:15] zachk: has joined #ruby
[19:08:31] zachk: has joined #ruby
[19:17:30] crankharder: has joined #ruby
[19:18:41] rindolf: has joined #ruby
[19:24:51] ravenousmoose: has joined #ruby
[19:29:01] orbyt_: has joined #ruby
[19:37:49] crankharder: has joined #ruby
[19:39:44] dviola: has joined #ruby
[19:46:16] Devalo: has joined #ruby
[19:48:25] AndreYuhai: Hey there, is there any way to open a CSV file and then just fill in the necessary cells? For example the cell at 4th row and 6th column.
[19:48:48] hightower2: has joined #ruby
[19:48:58] AndreYuhai: So far I have been reading the CSV file and then changing whatever I want and then writing the whole file back.
[19:51:33] rindolf: AndreYuhai: hi
[19:52:01] rindolf: AndreYuhai: is the data the same size in bytes?
[19:53:20] alem0lars: has joined #ruby
[19:54:39] AndreYuhai: rindolf: The data to be inserted?
[19:55:45] AndreYuhai: rindolf: if yes, sometimes the cells are empty so it wouldn't be the same size. The cell to be inserted with the new value can be either empty or there may be another value.
[19:56:44] rindolf: AndreYuhai: ah
[19:57:18] rindolf: AndreYuhai: see http://catb.org/~esr/writings/taoup/html/ch20s03.html#id3015538
[19:57:40] Swyper: https://gist.github.com/RickArora/86a82aafee883bd9c87072f651b87601
[19:58:01] Swyper: Dog #initialize should accept a name (string), breed (string), age (number), bark (string), and favorite_foods (array) as arguments
[19:58:01] Swyper: Failure/Error: let(:dog) { Dog.new("Fido", "German Shepard", 3, "Bork!", ["Bacon", "Chicken"])}
[19:58:09] Swyper: any idea why its failing
[19:58:15] Swyper: what did I not initialize correctly? o-o
[19:58:49] luminousnine-: has joined #ruby
[19:58:49] luminousnine-: has joined #ruby
[19:59:24] rindolf: Swyper: can there be more than one initialize()?
[19:59:44] Swyper: I have no idea, its my first time writing a class in Ruby
[19:59:56] rindolf: Swyper: ah
[19:59:57] Swyper: I'm guessing the answer is no, though ?
[20:00:10] rindolf: Swyper: i think so
[20:04:29] canton7: has joined #ruby
[20:05:40] marmotini_: has joined #ruby
[20:06:28] voker57_: has joined #ruby
[20:06:36] Net: has joined #ruby
[20:07:25] russt: has joined #ruby
[20:08:21] sariyar: has joined #ruby
[20:08:25] crankharder: has joined #ruby
[20:09:24] WA9ACE: has joined #ruby
[20:12:29] goez: has joined #ruby
[20:13:02] grvgr: has joined #ruby
[20:13:03] raggi: has joined #ruby
[20:13:14] dviola: has joined #ruby
[20:13:33] code_zombie: has joined #ruby
[20:14:22] EvilJStoker: has joined #ruby
[20:14:26] yokel: has joined #ruby
[20:15:41] conta: has joined #ruby
[20:16:30] fowlduck: has joined #ruby
[20:18:42] sjmbach: has joined #ruby
[20:19:21] rindolf: AndreYuhai: there is some old discussion here - https://perl-begin.org/FAQs/freenode-perl/#How_do_I_prepend_data_to_a_file.2C_take_out.2Fdelete_data_from_the_middle_of_the_file_or_insert_data_into_the_middle_of_the_file.3F
[20:20:28] sgen: has joined #ruby
[20:20:28] AndreYuhai: rindolf: thanks, I am reading it right now ^^
[20:21:59] rindolf: AndreYuhai: you're welcome
[20:27:08] conta: has joined #ruby
[20:28:44] crankharder: has joined #ruby
[20:30:48] wilbert: has joined #ruby
[20:34:26] Inline: has joined #ruby
[20:39:57] agent_white: has joined #ruby
[20:48:34] e: has joined #ruby
[20:49:02] crankharder: has joined #ruby
[20:54:50] zleap: has joined #ruby
[20:58:29] Swyper: has joined #ruby
[21:09:26] crankharder: has joined #ruby
[21:13:34] hightower2: has joined #ruby
[21:29:47] crankharder: has joined #ruby
[21:34:09] ubuntuisloved: has joined #ruby
[21:43:17] Puffball: has joined #ruby
[21:46:36] leavitals: has joined #ruby
[21:50:12] crankharder: has joined #ruby
[21:59:36] Swyper: has joined #ruby
[22:00:20] crankharder: has joined #ruby
[22:06:40] stooj: has joined #ruby
[22:20:36] crankharder: has joined #ruby
[22:24:34] ellcs1: has joined #ruby
[22:30:23] Devalo: has joined #ruby
[22:40:59] crankharder: has joined #ruby
[22:43:41] DaRock: has joined #ruby
[22:54:11] AJA4350: has joined #ruby
[22:54:27] s3nd1v0g1us: has joined #ruby
[23:00:56] ruby[bot]: has joined #ruby
[23:01:05] ChanServ: +o ruby[bot]
[23:01:24] crankharder: has joined #ruby
[23:04:46] Nicmavr: has joined #ruby
[23:06:24] ubuntuisloved: has joined #ruby
[23:11:31] crankharder: has joined #ruby
[23:21:49] crankharder: has joined #ruby
[23:35:08] clemens3_: has joined #ruby
[23:42:01] crankharder: has joined #ruby
[23:55:41] aqd: has joined #ruby
[23:55:53] AJA4351: has joined #ruby