« Back to channel list

#ruby - 20 March 2017

« Back 1 day Forward 1 day »
[00:01:10] vikaton: has joined #ruby
[00:07:55] Joufflu: RIP irc2000
[00:08:20] Joufflu: anyone available to help with a noob, question ?
[00:09:15] rgtk: has joined #ruby
[00:09:51] djbkd: has joined #ruby
[00:10:37] Radar: Joufflu: what's up?
[00:10:38] cschneid_: has joined #ruby
[00:10:46] Joufflu: So I am playing with arrays in ruby and trying to understand each_with_index. I currently have https://repl.it/GX66/4
[00:10:52] Joufflu: Radar, thanks!
[00:11:25] Joufflu: and I wondering I can get the output in a new array
[00:11:44] Radar: Without modifying r?
[00:11:53] esObe_: has joined #ruby
[00:12:18] Radar: https://repl.it/GX66/4
[00:12:26] Joufflu: I"m thinking of just putting an empty array = []
[00:12:47] charliesome: has joined #ruby
[00:12:56] Joufflu: Radar, i think you have to hit save then share the link
[00:14:35] bkxd: has joined #ruby
[00:17:56] JeanCarloMachado: has joined #ruby
[00:19:28] skweek: has joined #ruby
[00:20:38] __Yiota: has joined #ruby
[00:20:59] Lord_of_Life: has joined #ruby
[00:27:31] JeanCarloMachado: has joined #ruby
[00:29:52] sebd: has joined #ruby
[00:32:29] dh64: has joined #ruby
[00:33:57] roamingdog: has joined #ruby
[00:40:15] mesamoo: has joined #ruby
[00:40:39] nOwz: has joined #ruby
[01:00:28] cschneid_: has joined #ruby
[01:02:19] cschneid_: has joined #ruby
[01:17:06] JeanCarloMachado: has joined #ruby
[01:21:35] montanonic: has joined #ruby
[01:25:12] BTRRY: has joined #ruby
[01:25:47] arescorpio: has joined #ruby
[01:30:09] Trynemjoel: has joined #ruby
[01:31:55] lightheaded: has joined #ruby
[01:32:02] milardovich: has joined #ruby
[01:34:21] knight33: has joined #ruby
[01:36:29] ElDoggo: has joined #ruby
[01:37:37] usrben: has joined #ruby
[01:40:23] HoierM: has joined #ruby
[01:41:11] prometheanfire: has left #ruby: ()
[01:45:25] bkxd: has joined #ruby
[01:55:01] nowhereman: has joined #ruby
[01:59:57] cschneid_: has joined #ruby
[02:03:23] enterprisey: has joined #ruby
[02:08:02] lightheaded: has joined #ruby
[02:15:55] pytuger: I was using the class example in irb from https://www.ruby-lang.org/en/ and failed to get the posted output. I used 2 spaces for indentation after class and function definition statements, and typed the code exactly as it was
[02:16:10] pytuger: is my irb version to old? or is there a common logical mistake I am overlooking
[02:18:39] jnr: has joined #ruby
[02:18:43] jnr: has left #ruby: ()
[02:19:08] pytuger: SyntaxError: (irb):24: class/module name must be CONSTANT
[02:19:46] d^sh: has joined #ruby
[02:19:47] nowhereman: has joined #ruby
[02:20:19] havenwood: pytuger: It sounds like the "g" in your `class Greeter` isn't uppercase?
[02:20:49] pytuger: havenwood, you'd be correct. a major mistake on my part
[02:34:47] Jameser: has joined #ruby
[02:41:27] nOwz: has joined #ruby
[02:43:01] hahuang65: has joined #ruby
[02:46:16] shinnya: has joined #ruby
[02:51:06] oetjenj: has joined #ruby
[02:51:16] opt: has joined #ruby
[02:53:51] enterprisey: has joined #ruby
[02:55:22] cschneid_: has joined #ruby
[02:56:41] Derperperd: has joined #ruby
[03:00:23] minimalism: has joined #ruby
[03:01:18] houhoulis: has joined #ruby
[03:02:18] shakes: has joined #ruby
[03:03:38] mzo: has joined #ruby
[03:04:42] libastral: has joined #ruby
[03:05:47] __Yiota: has joined #ruby
[03:06:31] mula: has joined #ruby
[03:11:32] ozcanesen: has joined #ruby
[03:19:35] Limix: has joined #ruby
[03:26:16] jenrzzz: has joined #ruby
[03:26:48] Trynemjoel: has joined #ruby
[03:27:14] Derperperd: has joined #ruby
[03:31:08] bkxd: has joined #ruby
[03:37:50] howdoi: has joined #ruby
[03:38:33] Trynemjoel: has joined #ruby
[03:43:49] pwnd_nsfw: has joined #ruby
[03:45:06] jamesaxl: has joined #ruby
[03:45:06] Blacink: has joined #ruby
[03:54:15] charliesome: has joined #ruby
[03:57:06] chouhoulis: has joined #ruby
[04:01:49] hahuang65: has joined #ruby
[04:06:21] roamingdog: has joined #ruby
[04:09:08] tristanp: has joined #ruby
[04:13:44] chagel: has joined #ruby
[04:16:29] roamingdog: has joined #ruby
[04:24:37] gix: has joined #ruby
[04:28:48] jane_booty_doe: has joined #ruby
[04:35:55] jeyraof^mbpr: has joined #ruby
[04:41:03] ahrs: has joined #ruby
[04:42:08] nOwz: has joined #ruby
[04:42:33] Derperperd: has joined #ruby
[04:51:07] jshjsh: has joined #ruby
[04:51:27] pwnd_nsfw`: has joined #ruby
[04:53:06] tmtwd: has joined #ruby
[04:56:18] cschneid_: has joined #ruby
[05:01:54] bkxd: has joined #ruby
[05:06:15] roamingdog: has joined #ruby
[05:07:00] roamingdog: has joined #ruby
[05:07:50] roamingdog: has joined #ruby
[05:08:36] roamingdog: has joined #ruby
[05:29:17] dionysus69: has joined #ruby
[05:31:03] HippoDippo: has joined #ruby
[05:32:14] HippoDippo: I have not learned rails yet, and was wondering what people mean when they say "Rails has alot of magic".
[05:32:42] HippoDippo: are they saying that it is very abstract and is hard to tell why things do what they do
[05:33:26] Gigi12: has joined #ruby
[05:35:46] Gigi12: Hi. Question: when an equal sign '=' appears inside a block comment, is the line following that equal sign actually evaluated?
[05:36:27] elomatreb: Gigi12: Nothing in a comment should be evaluated
[05:37:21] anisha: has joined #ruby
[05:40:16] Gigi12: Thanks elomatreb. So for instance, in a rails proj, in app/assets/stylesheets/application.css , where there's a line: '*= require_tree' - that bit isn't evaluated. That's just another bit of comment?
[05:41:01] HippoDippo: has joined #ruby
[05:42:58] renchan: has joined #ruby
[05:43:59] elomatreb: Oh, that's something else. You're in a css file and (presumably) using Sprockets, that bit will include some other files.
[05:44:12] elomatreb: It's not a Ruby comment however
[05:45:31] Gigi12: elomatreb: sorry. of course! thanks for the clarification!
[05:47:37] v1n: has joined #ruby
[06:12:12] _whitelogger: has joined #ruby
[06:15:25] jgt: has joined #ruby
[06:17:44] bkxd: has joined #ruby
[06:18:45] dionysus69: has joined #ruby
[06:19:11] Derperperd: has joined #ruby
[06:25:12] __Yiota: has joined #ruby
[06:31:51] lightheaded: has joined #ruby
[06:40:49] nowhereman: has joined #ruby
[06:42:54] nOwz: has joined #ruby
[06:43:13] rhyselsmore: has joined #ruby
[06:43:34] Alina-malina: has joined #ruby
[06:47:15] astrobunny: has joined #ruby
[06:54:54] nowhereman: has joined #ruby
[06:55:27] lightheaded: has joined #ruby
[06:57:57] CloCkWeRX: has joined #ruby
[06:58:42] jnoob22: has joined #ruby
[06:59:43] jshjsh: has joined #ruby
[07:05:44] Alina-malina: has joined #ruby
[07:08:43] al2o3-cr: has joined #ruby
[07:12:06] UserJosh: has joined #ruby
[07:13:01] tomphp: has joined #ruby
[07:16:12] willardg: has joined #ruby
[07:16:14] Pumukel: has joined #ruby
[07:16:50] roamingdog: has joined #ruby
[07:17:37] roamingdog: has joined #ruby
[07:18:31] bkxd: has joined #ruby
[07:20:04] CloCkWeRX: has joined #ruby
[07:33:16] bigkevmcd: has joined #ruby
[07:40:05] last_staff: has joined #ruby
[07:40:32] cschneid_: has joined #ruby
[07:42:59] kernelPaniq: has joined #ruby
[07:43:19] conta: has joined #ruby
[07:46:12] __Yiota: has joined #ruby
[07:48:09] dionysus69: has joined #ruby
[07:51:38] yaewa: has joined #ruby
[07:52:39] teclator: has joined #ruby
[07:55:11] uncertainty: has joined #ruby
[08:00:11] mark_66: has joined #ruby
[08:00:24] Mortomes|Work: has joined #ruby
[08:01:45] lightheaded: has joined #ruby
[08:03:22] andikr: has joined #ruby
[08:03:51] jaruga________: has joined #ruby
[08:10:50] pandaant: has joined #ruby
[08:12:20] nOwz: has joined #ruby
[08:16:14] jestjb: has joined #ruby
[08:17:15] tAn: has joined #ruby
[08:21:53] antgel: has joined #ruby
[08:25:23] esObe_: has joined #ruby
[08:30:47] Stan: has joined #ruby
[08:32:08] maattdd: has joined #ruby
[08:33:29] lenwood: has joined #ruby
[08:34:57] aganov: has joined #ruby
[08:35:00] vondruch: has joined #ruby
[08:38:45] peirama: has joined #ruby
[08:40:47] Stan: has joined #ruby
[08:41:11] ddffg: has joined #ruby
[08:41:58] charliesome: has joined #ruby
[08:42:56] uncertainty: has joined #ruby
[08:43:12] __Yiota: has joined #ruby
[08:43:20] Qommand0r: has joined #ruby
[08:43:48] fivmo: has joined #ruby
[08:45:58] peirama: has joined #ruby
[08:46:05] SCHAAP137: has joined #ruby
[08:48:47] maloik: has joined #ruby
[08:51:03] lightheaded: has joined #ruby
[08:56:31] ElDoggo: has joined #ruby
[08:56:36] teclator: has joined #ruby
[09:03:22] peirama: has joined #ruby
[09:03:31] TheVip: has joined #ruby
[09:04:32] aufi: has joined #ruby
[09:04:34] uncertainty: has joined #ruby
[09:05:36] burgestrand: has joined #ruby
[09:08:04] itarato: has joined #ruby
[09:19:20] bkxd: has joined #ruby
[09:20:39] tomphp: has joined #ruby
[09:24:34] toretore: has joined #ruby
[09:30:44] itarato: has joined #ruby
[09:33:23] kies: has joined #ruby
[09:33:55] jsrn_: has joined #ruby
[09:36:39] flying: has joined #ruby
[09:38:45] maattdd_: has joined #ruby
[09:38:49] adgtl: has joined #ruby
[09:38:52] charliesome: has joined #ruby
[09:39:41] vali: has joined #ruby
[09:40:44] tens0r: has joined #ruby
[09:42:17] dionysus69: has joined #ruby
[09:47:20] Beams: has joined #ruby
[09:48:14] nofxxx: has joined #ruby
[09:48:42] burgestrand: has joined #ruby
[09:50:40] marr: has joined #ruby
[09:51:16] uncertainty: has joined #ruby
[09:51:23] dionysus69: has joined #ruby
[09:56:31] vondruch: has joined #ruby
[09:56:51] xenops: has joined #ruby
[09:57:06] mark_66: has joined #ruby
[09:57:16] charliesome: has joined #ruby
[09:57:59] gregf_: has joined #ruby
[10:01:55] yqt: has joined #ruby
[10:03:49] rhyselsmore: has joined #ruby
[10:04:32] nobitanobi: has joined #ruby
[10:04:51] GinoManWrx: has joined #ruby
[10:05:45] Kug3lis: has joined #ruby
[10:06:21] DoubleMalt: has joined #ruby
[10:12:03] xen0fon: has joined #ruby
[10:14:15] tvw: has joined #ruby
[10:17:04] ferr1: has joined #ruby
[10:18:42] snickers: has joined #ruby
[10:20:17] snickers: has joined #ruby
[10:21:46] rhyselsmore: has joined #ruby
[10:24:17] snickers: Hi I try to extend migration generator for some model and I write something like this https://gist.github.com/pwojcieszonek/63923c58347039084adf5cc3e250ba40, but i get error like in last line
[10:24:37] xen0fon: has joined #ruby
[10:29:00] czeq: has joined #ruby
[10:31:17] herwin: sounds like a question for #rails
[10:32:01] edliss: has joined #ruby
[10:33:41] flying: has joined #ruby
[10:37:05] harfangk: has joined #ruby
[10:40:14] xen0fon: has joined #ruby
[10:41:20] chagel: has joined #ruby
[10:45:23] GodFather: has joined #ruby
[10:50:09] bkxd: has joined #ruby
[10:52:18] lenwood: has joined #ruby
[10:53:39] chagel: has joined #ruby
[10:55:15] araujo: has joined #ruby
[11:04:47] larcara: has joined #ruby
[11:05:18] disem: has joined #ruby
[11:06:00] coatezy: has joined #ruby
[11:07:43] Fernando-Basso: has joined #ruby
[11:08:34] huddy: has joined #ruby
[11:10:24] ghoti: has joined #ruby
[11:13:18] chagel: has joined #ruby
[11:14:04] milardovich: has joined #ruby
[11:14:46] lxsameer: has joined #ruby
[11:17:28] flying: has joined #ruby
[11:18:13] xen0fon: has joined #ruby
[11:20:45] __Yiota: has joined #ruby
[11:22:12] tvw: has joined #ruby
[11:22:23] larcara: has joined #ruby
[11:23:03] Jameser: has joined #ruby
[11:29:21] Bish: since webassembly is here, has anyone ever tried compiling ruby to it?
[11:29:30] Bish: i googled for it , ofc, but it's all pretty fishy
[11:29:49] Bish: there is opal, which is really great, i tried doing things with it, but i ended up having super large .js files, which made it impractical
[11:30:31] Bish: so, if there is webassembly, pretty soon, i wonder if there could be the all-ruby-webapplication, without disadvantages
[11:40:22] uncertainty: has joined #ruby
[11:40:43] ldnunes: has joined #ruby
[11:43:00] HoierM: has joined #ruby
[11:44:56] CloCkWeRX: has left #ruby: ()
[11:45:42] Jameser: has joined #ruby
[11:47:24] bkxd: has joined #ruby
[11:49:18] cullaloe: has joined #ruby
[11:49:19] JeanCarloMachado: has joined #ruby
[11:54:52] Jameser: has joined #ruby
[11:55:34] coatezy: has joined #ruby
[11:56:57] larcara: has joined #ruby
[11:58:53] dionysus69: has joined #ruby
[12:00:17] synthroid: has joined #ruby
[12:01:40] allisio: Bish: Did you try passing the Opal-generated JS through Google's Closure Compiler?
[12:01:40] synthroid: has joined #ruby
[12:01:51] edliss: has joined #ruby
[12:02:15] astrobunny: has joined #ruby
[12:02:15] uncertainty: has joined #ruby
[12:04:07] umdstu: has joined #ruby
[12:04:20] umdstu: how would I convert a datetime value to a 64bit unsigned integer
[12:04:51] raul782: has joined #ruby
[12:07:29] herbmillerjr: has joined #ruby
[12:09:10] Bish: allisio: would that make it 1/10 of the size?
[12:09:19] allisio: Bish: Try it.
[12:09:21] Bish: otherwise, not feasible
[12:09:32] Bish: is that the correct word, no clue
[12:10:37] Jameser: has joined #ruby
[12:11:32] allisio: umdstu: To what end?
[12:12:12] Qchmqs: has joined #ruby
[12:12:25] burgestrand: umdstu DateTime doesn't necessarily have a numerical representation. Time does, however, and you can #to_time on DateTime.
[12:14:39] lhambley: has joined #ruby
[12:15:06] lhambley: hi all, looking for a sanity check - Time.strptime(Time.now.strftime('%s%6N'), "%s%6N") blows up with 'ArgumentError: invalid strptime format - `%s%6N'' how else is one supposed to parse microseconds without losing resolution ?
[12:15:17] __Yiota: has joined #ruby
[12:15:26] edliss: has joined #ruby
[12:16:32] allisio: Everything has a numerical representation.
[12:17:57] cibs: has joined #ruby
[12:23:06] Kug3lis: has joined #ruby
[12:23:18] burgestrand: lhambley Can't tell you why you receive that error, but you can get creative and use Time.at with Rational.
[12:23:41] burgestrand: lhambley Rational allows you to express a fractional value without losing precision.
[12:24:02] Jameser: has joined #ruby
[12:24:32] burgestrand: >> Time.at(Rational(Time.now.strftime("%s%6N"), "1000000"))
[12:24:33] ruby[bot]: Burgestrand: # => 2017-03-20 12:24:32 +0000 (https://eval.in/757549)
[12:26:29] lhambley: thanks, that looks interesting
[12:26:45] lhambley: another thing that works is:
[12:26:52] lhambley: >> Time.strptime(Time.now.strftime('%s%6N')*1000, "%N")
[12:26:53] ruby[bot]: lhambley: # => undefined method `strptime' for Time:Class (NoMethodError) ...check link for more (https://eval.in/757550)
[12:28:00] lightheaded: has joined #ruby
[12:29:17] Derperperd: has joined #ruby
[12:29:59] daBee: has joined #ruby
[12:33:26] swills: has joined #ruby
[12:36:47] pwnd_nsfw`: has joined #ruby
[12:37:32] burgestrand: lhambley Wow, that's so obvious I find it funny I didn't think of it :)
[12:37:56] lhambley: I suppose "%s" is "greedy", hence the problem parsing things back in
[12:38:24] burgestrand: lhambley Just make sure you convert it to an integer first, or you'll get quite a surprising result!
[12:38:28] burgestrand: >> "Hello" * 5
[12:38:33] ruby[bot]: Burgestrand: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[12:39:12] burgestrand: lhambley Maybe, but my version of Ruby complains about "%6N" but it's lonesome too.
[12:39:44] lhambley: I think then the simpler answer might be that strptime doesn't accept all the same tokens as strftime, which is a shame, since they link each other in the docs
[12:39:51] lhambley: but fair enough, we both learned something today ;-)
[12:40:18] larcara: has joined #ruby
[12:40:23] raul782: has joined #ruby
[12:41:08] burgestrand: lhambley Yeah, it's possible that the documented supported formats contains a copy-paste error :)
[12:41:18] burgestrand: lhambley i.e. the documentation lies
[12:41:25] lhambley: documentation always lies :D
[12:43:25] nobitanobi: has joined #ruby
[12:46:05] edliss: has joined #ruby
[12:46:07] cibs: has joined #ruby
[12:49:31] t-recx: has joined #ruby
[12:55:28] sepp2k: has joined #ruby
[12:59:54] hutch34: has joined #ruby
[13:00:14] Kug3lis: has joined #ruby
[13:01:10] bkxd: has joined #ruby
[13:01:44] psychicist__: has joined #ruby
[13:01:45] unshadow: has joined #ruby
[13:02:38] Derperperd: has joined #ruby
[13:05:59] edliss: has joined #ruby
[13:07:30] hutch34: has joined #ruby
[13:09:35] unshadow: Hi Guys, looking at the chan's rules I dont see any issues with writing thise here (If i'm mistaken please notify me and I wont do it again), The company I work at is looking for a "pure" Ruby dev, no rails, no web, full back-end and network, we are ok with working remote. see job desc here: https://www.linkedin.com/jobs/view/249908166/ (cv can be sent to hr@safe-t.com)
[13:09:53] raul782: has joined #ruby
[13:10:06] mzo: has joined #ruby
[13:10:43] bmurt: has joined #ruby
[13:12:33] rgr: has joined #ruby
[13:12:42] uncertainty: has joined #ruby
[13:16:16] houhoulis: has joined #ruby
[13:17:44] dionysus69: has joined #ruby
[13:18:37] yeticry: has joined #ruby
[13:19:35] chouhoulis: has joined #ruby
[13:20:30] teddysmoker: has joined #ruby
[13:21:30] Tempesta: has joined #ruby
[13:21:40] raul782: has joined #ruby
[13:22:21] Bish: i like how job offers in irc are getting more common
[13:23:10] dionysus69: has joined #ruby
[13:27:25] hutch34: has joined #ruby
[13:29:06] Olipro: has joined #ruby
[13:32:43] DLSteve: has joined #ruby
[13:34:32] baked__beans: has joined #ruby
[13:36:33] ElDoggo: has joined #ruby
[13:36:55] sleetdrop: has joined #ruby
[13:36:58] ElDoggo: has joined #ruby
[13:37:15] GodFather: has joined #ruby
[13:37:42] unshadow: Bish: do they ?
[13:37:48] jpleau: they think that if you can connect to irc chances are you might maybe have a brain!
[13:38:03] patarr: has joined #ruby
[13:38:27] unshadow: Hm... TBH it's just a big group I usually hang in and It's a Ruby group , which is what we are serching for :)
[13:40:33] larcara: has joined #ruby
[13:44:59] Pumukel: has joined #ruby
[13:45:59] Lord_of_Life: has joined #ruby
[13:46:49] mwlang: has joined #ruby
[13:47:32] atom3_: has joined #ruby
[13:49:53] ozcanesen: has joined #ruby
[13:50:34] millerti: has joined #ruby
[13:51:04] tomphp: has joined #ruby
[13:52:49] Pumukel: has joined #ruby
[13:56:10] agent_white: has joined #ruby
[13:59:04] mula: has joined #ruby
[14:03:47] Derperperd: has joined #ruby
[14:04:08] gnufied: has joined #ruby
[14:04:09] moei: has joined #ruby
[14:06:36] bkxd: has joined #ruby
[14:08:29] govg: has joined #ruby
[14:08:30] chagel: has joined #ruby
[14:09:04] charliesome: has joined #ruby
[14:09:57] raul782: has joined #ruby
[14:10:04] hutch34: has joined #ruby
[14:13:05] Bish: unshadow: well, i saw it yesterday and today, so i figured maybe it's just luck
[14:13:53] agent_white: Mornin' folks
[14:18:35] mostlybadfly: Might be more a Ruby thing. In case rails isn't the correct channel
[14:18:38] mostlybadfly: 9:09 AM <mostlybadfly> hello all, I keep getting this error when installing puma, but haven't been able to get a good response with info by googling, any thoughts? https://gist.github.com/mostlybadfly/5b06f3ac0320bc3670352f1ee7e16254
[14:19:25] mostlybadfly: I thought based on looking online that openssl needs to be installed but it is, but perhaps I have this installed incorrectly
[14:20:45] esObe_: has joined #ruby
[14:20:54] ElDoggo: has joined #ruby
[14:21:39] vifino: has joined #ruby
[14:21:52] duckpuppy: has joined #ruby
[14:22:22] matthewd: mostlybadfly: Yeah, sounds like it doesn't like your openssl. Might be happier with 1.0?
[14:23:16] herwin: yes, openssl 1.1.0 introduced a number of backwards incompatibilities
[14:24:15] ghoti: has joined #ruby
[14:26:19] esObe_: has joined #ruby
[14:26:23] mostlybadfly: I see , I'll give that a shot thanks!
[14:27:25] Kug3lis: has joined #ruby
[14:29:36] burgestrand: has joined #ruby
[14:30:18] lenwood: has joined #ruby
[14:32:02] lmc: has joined #ruby
[14:33:45] chouhoulis: has joined #ruby
[14:35:44] chouhoul_: has joined #ruby
[14:35:58] tvw: has joined #ruby
[14:37:31] muelleme: has joined #ruby
[14:37:56] yehowyada: has joined #ruby
[14:41:26] milardovich: has joined #ruby
[14:45:10] akahn: has joined #ruby
[14:45:10] Kug3lis: has joined #ruby
[14:46:34] hxegon: has joined #ruby
[14:47:32] patarr1: has joined #ruby
[14:48:21] beermouse: has joined #ruby
[14:48:44] raspado: has joined #ruby
[14:49:31] chouhoulis: has joined #ruby
[14:50:23] ngqvhx: has joined #ruby
[14:50:36] synthroid: has joined #ruby
[14:50:54] rippa: has joined #ruby
[14:51:30] Derperperd: has joined #ruby
[14:51:30] LyndsySimon: has joined #ruby
[14:52:02] uncertainty: has joined #ruby
[14:52:57] LyndsySimon: Is it possible to delete a class after you're created it in Ruby?
[14:53:15] LyndsySimon: I'm testing a metaclass, and I want to create a new subclass for each test run.
[14:55:43] hxegon: LyndsySimon: Maybe an anonymous class would work. What test framework you using?
[14:55:57] LyndsySimon: rspec. I'm 99% sure anonymous classes are the way.
[14:56:22] LyndsySimon: I can set the test subject to be a "fresh" subclass each time.
[14:57:49] hxegon: LyndsySimon: probably, can you link to a gist?
[14:59:34] mim1k: has joined #ruby
[15:01:45] yeticry_: has joined #ruby
[15:01:57] LyndsySimon: hxegon: Yep, as soon as I get a working spec here, I can at least paste the spec. I don't know if I can paste the object under test or not.
[15:02:07] milardovich: has joined #ruby
[15:03:30] centrx: has joined #ruby
[15:03:30] centrx: has joined #ruby
[15:03:34] Blacink: has joined #ruby
[15:04:50] montanonic: has joined #ruby
[15:06:10] cibs: has joined #ruby
[15:06:59] mula: has joined #ruby
[15:07:02] yeticry: has joined #ruby
[15:07:24] bkxd: has joined #ruby
[15:08:27] ElDoggo: has joined #ruby
[15:09:49] Cohedrin: has joined #ruby
[15:10:04] raul782: has joined #ruby
[15:10:16] LyndsySimon: hxegon: Here you go - it's just the spec, but it works. I get a "fresh" subclass for each example: https://gist.github.com/lyndsysimon/dd979841a23e4f3794aadb4f9a78df5a
[15:11:38] LyndsySimon: The `class_eval` blocks are spurious for this, but I wanted the syntax of the tests to mirror the actual usage as closely as possible so they can also serve as documentation.
[15:12:00] BSaboia: has joined #ruby
[15:15:09] skweek: has joined #ruby
[15:18:08] snickers: has joined #ruby
[15:18:16] Derperperd: has joined #ruby
[15:18:36] cdg: has joined #ruby
[15:21:14] SuperLag: has joined #ruby
[15:21:40] naprimer_2: has joined #ruby
[15:21:40] snowy: has joined #ruby
[15:22:57] bmurt_: has joined #ruby
[15:23:09] pandaant: has joined #ruby
[15:24:43] hxegon: LyndsySimon: so BaseDatatable is intended to be a superclass?
[15:25:10] LyndsySimon: hxegon: Correct. Never instantiated or used directly.
[15:25:58] roger_rabbit: has joined #ruby
[15:26:04] LyndsySimon: hxegon: If I were writing Python, BaseDatatable would be an ABC (Abstract Base Class). I don't know of an analogue to that in Ruby though.
[15:27:43] BSAlb: has joined #ruby
[15:28:07] hxegon: LyndsySimon: Looks good to me
[15:28:49] LyndsySimon: I'm going to write up a quick Jupyter Notebook showing how it works - it wasn't very easy to search for a solution.
[15:29:19] brent__: has joined #ruby
[15:29:59] brent__: has joined #ruby
[15:31:09] hxegon: LyndsySimon: Just for my own personal curiosity, can I see the BaseDatatable class?
[15:32:05] LyndsySimon: It's a mess, contains a bit of business logic, and has a couple of TODOs left. If you're OK with that, I can strip the business logic and send you a link. One sec.
[15:33:41] minimalism: has joined #ruby
[15:37:17] LyndsySimon: hxegon: Here you go: https://gist.github.com/lyndsysimon/33c4693bd3e64207a886b45c8a931952
[15:37:57] LyndsySimon: There is also a view helper that builds a <table> element, and an associated javascript file that initializes it properly and hooks it up to the AJAX data source.
[15:38:53] marr123: has joined #ruby
[15:40:28] tvw: has joined #ruby
[15:42:33] milardovich: has joined #ruby
[15:42:41] username1: has joined #ruby
[15:42:42] username2: has joined #ruby
[15:43:27] Cohedrin: has joined #ruby
[15:43:51] hxegon: LyndsySimon: I've seen far worse messes :)
[15:45:11] hxegon: LyndsySimon: I would suggest a couple of things though; remove get_ from method names, and think about extracting a column class
[15:46:02] LyndsySimon: OOoh, I like the idea of extracting a column class. I'm doing quite a bit of logic on manipulating what would be its internal data, and I see more logic like that in the near future. That would make it much easier to test.
[15:46:47] LyndsySimon: I agree on get_*, but I'm extended a gem with this work (ajax-datatables-rails). They're using that convention so I stuck with it.
[15:47:13] LuckyABA: has joined #ruby
[15:47:56] benlieb: has joined #ruby
[15:48:07] LyndsySimon: Generally speaking if I have setters/getters on a class I prefer to hide that from the consumer. In Ruby that means writing `*=` methods; in Python that means writing property methods and setters.
[15:49:04] LyndsySimon: I went ahead and wrote up a generalized example. PRs welcome: https://github.com/lyndsysimon/jupyter-notebooks/blob/master/ruby/Rspec%20-%20testing%20base%20classes%20with%20anonymous%20subclasses.ipynb
[15:51:43] amclain: has joined #ruby
[15:52:09] antoniobeyah: has joined #ruby
[15:53:41] chouhoulis: has joined #ruby
[15:53:44] Alina-malina: has joined #ruby
[15:54:04] mwlang: has joined #ruby
[15:54:25] hxegon: yw LyndsySimon, I'll have to look into juypter notebooks more.
[15:54:31] d0nn1e: has joined #ruby
[15:54:46] chouhoulis: has joined #ruby
[15:55:22] raul782: has joined #ruby
[15:57:40] Alina-malina: has joined #ruby
[16:01:01] synthroid: has joined #ruby
[16:03:20] marxarelli: has joined #ruby
[16:03:44] viuo: has joined #ruby
[16:04:18] sid_fules: has joined #ruby
[16:04:39] LyndsySimon: hxegon: I use them extensively for learning, teaching, and for recording ideas that I might want to refer to later.
[16:04:58] LyndsySimon: It's easier to push a new notebook file to GitHub than to write a blog post :)
[16:06:16] hxegon: My programmer instincts say, why not both? Make a script that uploads to github and publishes to blog :)
[16:08:35] SeepingN: has joined #ruby
[16:10:00] Antiarc: has joined #ruby
[16:13:04] baweaver: LyndsySimon: http://nbviewer.jupyter.org/url/norvig.com/ipython/Advent%20of%20Code.ipynb
[16:13:11] baweaver: Norvig does it a lot
[16:15:12] LyndsySimon: baweaver: I actually didn't know that. That's awesome :)
[16:15:25] LyndsySimon: I've been using Jupyter since it was iPython, before the notebook functionality was available.
[16:15:58] LyndsySimon: hxegon: Well... my blog is mostly dead. At some point I'll get around to revitalizing it, and once I do I'm not sure if it will still be a traditional blog.
[16:16:16] milardovich: has joined #ruby
[16:16:45] LyndsySimon: hxegon: I'm thinking it will be more like a tumblog, but with content ranging from code snippets to programming essays to photography to random jokes and such.
[16:17:04] saneax-_-|AFK: has joined #ruby
[16:17:09] LyndsySimon: hxegon: I'd actually like to abandon Facebook at that point.
[16:18:09] raspado: has joined #ruby
[16:23:48] Pumukel: has joined #ruby
[16:24:48] gusrub: has joined #ruby
[16:25:00] doublemalt_: has joined #ruby
[16:25:53] lightheaded: has joined #ruby
[16:27:15] rgr: has joined #ruby
[16:29:42] rgr: has joined #ruby
[16:30:25] lenwood: has joined #ruby
[16:31:37] milardovich: has joined #ruby
[16:33:19] milardovich: has joined #ruby
[16:34:42] Pumukel: has joined #ruby
[16:36:54] dlitvak: has joined #ruby
[16:39:17] FooMunki: has joined #ruby
[16:41:13] tlaxkit: has joined #ruby
[16:41:27] lacrymology: has joined #ruby
[16:41:46] lacrymology: does anyone know what's going on here? http://dpaste.com/3151PTC
[16:42:39] enterprisey: has joined #ruby
[16:43:28] baweaver: bundle exec rake --version
[16:46:25] teclator: has joined #ruby
[16:49:25] mminski: has joined #ruby
[16:51:08] hutch34: has joined #ruby
[16:52:19] mminski: any awesome ruby progammers here?
[16:52:54] Eiam: awesome, definitely not
[16:52:57] Eiam: did you have an actual question though?
[16:53:09] ytti_: my mom says i'm awesome
[16:53:18] ytti_: pretty sure she's authority on the matter
[16:53:20] Eiam: (I mean, im not awesome, I'd say baweaver, radar and some others are pretty awesome tho)
[16:53:48] Eiam: mminski: but I bet someone, regardless of how awesome they are, might be able to answer a question with more substance =)
[16:54:29] mminski: i want to program a ruby game
[16:54:37] mminski: educational game
[16:54:53] mminski: need some people who want to join the project
[16:54:58] mminski: using 'gosu' gem
[16:56:16] lightheaded: has joined #ruby
[16:56:44] lightheaded: has joined #ruby
[16:56:55] FooMunki: has joined #ruby
[16:57:09] lightheaded: has joined #ruby
[16:57:12] xen0fon: has joined #ruby
[16:57:42] mminski: https://github.com/rapid7/metasploit-framework/wiki/Why-Ruby%3F
[16:58:13] mminski: https://github.com/gosu
[17:00:43] blackmesa: has joined #ruby
[17:01:07] [Butch]: has joined #ruby
[17:01:14] hxegon: mminski: what are you trying to teach with it? Do you have a game design in mind?
[17:02:19] Beams_: has joined #ruby
[17:02:19] mminski: yeah teaching ruby game
[17:02:39] hxegon: ah, I see what you mean.
[17:02:58] mminski: i already scrabed the data for it
[17:03:17] mminski: from rubydocs
[17:03:20] AnomalousBit: has joined #ruby
[17:03:46] mminski: datamined it
[17:04:58] hxegon: mminski: do you have a game design in mind?
[17:05:17] mminski: hxegon: yes
[17:06:07] HoierM: has joined #ruby
[17:06:50] djbkd: has joined #ruby
[17:07:00] HoierM: has joined #ruby
[17:07:21] hxegon: could you describe it?
[17:08:03] mminski: youre in or out?
[17:08:08] bkxd: has joined #ruby
[17:08:17] graft: has joined #ruby
[17:08:37] mminski: we could just open a bitbucket repo (git) or subversion whatever
[17:08:40] aufi: has joined #ruby
[17:08:58] mminski: and start coding ^__^
[17:09:18] canton7: noone's going to commit their time without more info :P
[17:10:28] hxegon: mminski: depends on the game design. I don't need a technical document, but I'd like to know what you're idea for it is before I commit to anything :)
[17:12:56] fearoffish: has joined #ruby
[17:14:53] mminski: something like super mario
[17:16:14] Bish: i remember someone saying there is a shortcut to get the folder of the running file
[17:16:17] muelleme: has joined #ruby
[17:16:18] Bish: something like __DIR__
[17:16:42] matthewd: Bish: __dir__
[17:17:04] mminski: File.dirname(__FILE__)
[17:17:08] adam12: I wonder the logic behind the downcase version
[17:17:19] Bish: minimalism: >shortcut
[17:17:46] Bish: matthewd: *
[17:17:46] mula: has joined #ruby
[17:17:48] anisha: has joined #ruby
[17:17:54] Bish: sorry minimalism your nick would've told me that you know
[17:18:09] hahuang65: has joined #ruby
[17:18:26] mminski: the game should teach the player all ruby objects and their methods
[17:18:45] mminski: collecting the right method-to-object relations
[17:20:34] hxegon: mminski: hmm... alright, I'm at least a bit in. Can't promise much because I'm busy right now, but if you want to start a github or bitbucket repo or whatever, we can start making a design doc
[17:21:01] mminski: awesome programmer
[17:21:07] mminski: i'll send you the link
[17:21:18] snowy: has joined #ruby
[17:21:59] gregf_: has joined #ruby
[17:22:25] mula: has joined #ruby
[17:22:49] Snowy_: has joined #ruby
[17:23:45] jgnagy: has joined #ruby
[17:25:03] canton7: adam12, __FILE__ is a constant, __dir__ is a method
[17:25:17] adam12: canton7: Makes sense - thanks for the clarification.
[17:26:05] hahuang61: has joined #ruby
[17:26:14] jamesaxl: has joined #ruby
[17:28:36] lacrymology: baweaver: sorry, didn't see that
[17:28:40] lacrymology: 14:00 $ bundle exec rake --version
[17:28:40] lacrymology: rake, version 10.5.0
[17:29:19] baweaver: bundle exec rails s
[17:29:38] rt: has joined #ruby
[17:30:24] kirun: has joined #ruby
[17:30:57] havenwood: https://i.imgur.com/2Hlpoov.png
[17:31:29] dminuoso: baweaver: That is not needed.
[17:31:35] dminuoso: baweaver: Rails will hold your hands for you.
[17:31:47] dminuoso: Just to be sure you really never know when to need bundle exec and when not.
[17:35:04] edliss: has joined #ruby
[17:36:46] Pumukel: has joined #ruby
[17:36:59] drale2k: has joined #ruby
[17:40:47] lacrymology: baweaver: that seems to work
[17:42:22] JeanCarloMachado: has joined #ruby
[17:43:19] montanonic: has joined #ruby
[17:45:46] TomyLobo2: has joined #ruby
[17:49:13] baked__beans: has joined #ruby
[17:49:49] kith: has joined #ruby
[17:50:12] ElDoggo: has joined #ruby
[17:52:27] hahuang62: has joined #ruby
[17:54:55] millerti: has joined #ruby
[17:55:36] cibs: has joined #ruby
[17:55:52] blackmesa: has joined #ruby
[17:57:26] tomphp: has joined #ruby
[17:59:17] _whitelogger: has joined #ruby
[17:59:56] JeanCarloMachado: has joined #ruby
[18:00:05] milardovich: has joined #ruby
[18:00:11] jenrzzz: has joined #ruby
[18:00:11] jenrzzz: has joined #ruby
[18:03:20] mistym: has joined #ruby
[18:03:20] mistym: has joined #ruby
[18:04:34] cdg: has joined #ruby
[18:05:26] Limix: has joined #ruby
[18:05:54] kies: has joined #ruby
[18:08:27] millerti: has joined #ruby
[18:08:30] patarr: has joined #ruby
[18:10:24] benlieb: has joined #ruby
[18:12:05] ramfjord: has joined #ruby
[18:12:09] snowy: has joined #ruby
[18:16:24] xen0fon: has joined #ruby
[18:17:29] ElDoggo: has joined #ruby
[18:17:53] kristofferR: has joined #ruby
[18:18:03] cpruitt: has joined #ruby
[18:20:07] renchan: has joined #ruby
[18:21:08] patarr: has joined #ruby
[18:21:12] esObe_: has joined #ruby
[18:22:07] A124: has joined #ruby
[18:26:47] graft: has joined #ruby
[18:31:14] hutch34: has joined #ruby
[18:31:58] millerti: has joined #ruby
[18:32:29] mminski: has joined #ruby
[18:32:39] ElDoggo: has joined #ruby
[18:33:02] ElDoggo: has joined #ruby
[18:35:41] rahul_bajaj: has joined #ruby
[18:36:14] catenthusiast: has joined #ruby
[18:38:55] Vingador: has joined #ruby
[18:39:33] mula: has joined #ruby
[18:39:45] edliss: has joined #ruby
[18:45:27] bastrud: has joined #ruby
[18:46:02] muelleme: has joined #ruby
[18:47:24] dionysus69: has joined #ruby
[18:53:55] Mia: has joined #ruby
[18:53:55] Mia: has joined #ruby
[18:56:21] JeanCarl1Machado: has joined #ruby
[18:56:43] sergio_101: has joined #ruby
[18:59:40] xzhao: has joined #ruby
[19:01:14] __Yiota: has joined #ruby
[19:01:42] [Butch]: has joined #ruby
[19:03:04] jenrzzz: has joined #ruby
[19:03:14] marr: has joined #ruby
[19:03:37] nobitanobi: has joined #ruby
[19:08:58] bkxd: has joined #ruby
[19:09:10] bmurt: has joined #ruby
[19:10:24] lxsameer: has joined #ruby
[19:10:27] psychicist__: has joined #ruby
[19:14:56] Derperperd: has joined #ruby
[19:15:07] Blacink: has joined #ruby
[19:15:34] bastrud: has joined #ruby
[19:16:26] raul782: has joined #ruby
[19:19:51] uncertainty: has joined #ruby
[19:21:44] rgtk: has joined #ruby
[19:21:48] psychicist__: has joined #ruby
[19:24:31] hutch34: has joined #ruby
[19:27:15] snickers: What is the correct approach to test unit which connect to external api. Should it be tested on real api, or better monkey patch function that connect to api that it will return expected value?
[19:27:50] cfec0b8d: has joined #ruby
[19:30:32] Fin1te: has joined #ruby
[19:31:25] devyn: has joined #ruby
[19:34:18] failshell: has joined #ruby
[19:35:54] failshell: hello. i need to send commands into an interactive prompt from Ruby. the CLI is similar to the MySQL cli, run the command, then you get to run commands. is there a gem that exists to wrap this ? i could do it with bash and EOFs, but meh
[19:37:16] bastrud: has joined #ruby
[19:38:04] bastrud: has joined #ruby
[19:38:07] patarr: has joined #ruby
[19:38:24] postmodern: has joined #ruby
[19:39:17] enterprisey: has joined #ruby
[19:39:48] Kug3lis: has joined #ruby
[19:39:59] Pumukel: has joined #ruby
[19:41:47] nobitanobi: has joined #ruby
[19:42:54] haylon: has joined #ruby
[19:45:36] matthewd: failshell: Open3, in stdlib
[19:46:38] rob_: failshell: look up REPL (read-eval-print loop) - should give you lots of information about how to write what you want
[19:46:54] failshell: thanks guys, googling
[19:47:14] millerti: has joined #ruby
[19:49:25] allisio: failshell: Because we appreciate that sort of thing around here: https://eval.in/757891
[19:49:29] allisio: Gotta love the symmetry.
[19:50:07] failshell: i need to write some ruby to run some python. that's how meta my day is so far hehe
[19:50:24] xenops: has joined #ruby
[19:50:30] RenatoSilva: has joined #ruby
[19:52:28] baweaver: Snickers: VCR
[19:52:39] baweaver: Record a response from the actual and use that to replay to tests.
[19:52:41] jenrzzz: has joined #ruby
[19:52:58] baweaver: Also I tend to put all external calls into their own methods so they're easier to stub
[19:53:53] MasterNayru: has joined #ruby
[19:54:20] lacrymology: has joined #ruby
[19:55:25] lightheaded: has joined #ruby
[19:56:32] cdg: has joined #ruby
[19:57:36] cdg: has joined #ruby
[19:59:46] ramfjord: has joined #ruby
[20:00:07] nobitanobi: has joined #ruby
[20:00:25] nobitanobi: has joined #ruby
[20:03:00] username: has joined #ruby
[20:03:10] edliss: has joined #ruby
[20:04:12] Xeago: has joined #ruby
[20:05:26] username1: has joined #ruby
[20:05:29] zapata: has joined #ruby
[20:05:49] lhambley: has joined #ruby
[20:06:22] dminuoso: baweaver: That's like.. efficient. What excuse do you have to slack off when your boss comes in?
[20:06:39] dminuoso: It can't be "its compiling" because it's ruby, and it can't be "it's testing" because you use VCR..
[20:07:03] chouhoul_: has joined #ruby
[20:07:04] baweaver: I finished everything
[20:07:18] baweaver: So now I get to watch conference talks and experiment for a bit
[20:08:14] chouhoul_: has joined #ruby
[20:09:14] tAn: has joined #ruby
[20:11:23] Fernando-Basso: has joined #ruby
[20:11:47] xen0fon: has joined #ruby
[20:14:01] BSAlb: has joined #ruby
[20:14:04] jshjsh: has joined #ruby
[20:16:10] drale2k_: has joined #ruby
[20:16:15] zenguy_pc2: has joined #ruby
[20:16:39] kenichi_: has joined #ruby
[20:16:45] agent_wh1te: has joined #ruby
[20:16:45] eboaz_: has joined #ruby
[20:16:55] Pisuke: has joined #ruby
[20:16:58] FooMunki: has joined #ruby
[20:17:13] knowtheory_: has joined #ruby
[20:17:24] maattdd: has joined #ruby
[20:17:57] gsnedder1: has joined #ruby
[20:18:00] baked__b1ans: has joined #ruby
[20:18:15] badeball_: has joined #ruby
[20:18:21] phansch_: has joined #ruby
[20:18:22] ichthys: has joined #ruby
[20:18:27] wnd_: has joined #ruby
[20:18:41] cout_: has joined #ruby
[20:18:42] knight-: has joined #ruby
[20:18:51] vadviktor_: has joined #ruby
[20:18:59] D9-: has joined #ruby
[20:19:01] Utkarsh_: has joined #ruby
[20:19:11] teotwaki_: has joined #ruby
[20:19:17] _chee: has joined #ruby
[20:19:19] Toledo: has joined #ruby
[20:19:19] coatezy_: has joined #ruby
[20:19:28] dyyylan-: has joined #ruby
[20:19:31] gbailey-: has joined #ruby
[20:19:32] ishigoya-: has joined #ruby
[20:19:33] alphoro: has joined #ruby
[20:19:47] atmosx_aws: has joined #ruby
[20:19:54] nowhereman: has joined #ruby
[20:19:57] shadeslayer_: has joined #ruby
[20:19:58] d0nn1e_: has joined #ruby
[20:20:01] ccooke_: has joined #ruby
[20:20:06] NightMonkey_: has joined #ruby
[20:20:09] bauruine_: has joined #ruby
[20:20:19] optiz0r_: has joined #ruby
[20:20:21] DefV_: has joined #ruby
[20:20:26] gse_: has joined #ruby
[20:20:29] prions_: has joined #ruby
[20:20:33] psychicist__: has joined #ruby
[20:20:34] apeiros_: has joined #ruby
[20:20:42] PaulePan1er: has joined #ruby
[20:20:45] caw__: has joined #ruby
[20:20:57] darix-: has joined #ruby
[20:21:02] DenSchub_: has joined #ruby
[20:21:14] mistym-: has joined #ruby
[20:21:31] FastJack_: has joined #ruby
[20:21:31] byyte512: has joined #ruby
[20:22:01] sonOfRa_: has joined #ruby
[20:22:16] cyphase_eviltwin: has joined #ruby
[20:22:19] adgtl-: has joined #ruby
[20:22:23] BackEndCoder_: has joined #ruby
[20:22:25] certainty: has joined #ruby
[20:22:35] dcluna_: has joined #ruby
[20:22:40] snowy: has joined #ruby
[20:22:53] daed_: has joined #ruby
[20:23:11] varesa_: has joined #ruby
[20:23:12] ahrs_: has joined #ruby
[20:23:22] jokke1: has joined #ruby
[20:23:29] scottschecter_: has joined #ruby
[20:23:40] psmolen_: has joined #ruby
[20:23:41] thejoecarroll_: has joined #ruby
[20:23:48] crankhar1er: has joined #ruby
[20:23:57] yorickpeterse1: has joined #ruby
[20:24:03] matthewd_: has joined #ruby
[20:24:26] Rodya_: has joined #ruby
[20:24:31] leah2_: has joined #ruby
[20:24:42] iooner-: has joined #ruby
[20:24:58] mlehrer_: has joined #ruby
[20:25:27] KrzaQ-: has joined #ruby
[20:25:36] dminuoso_: has joined #ruby
[20:25:38] soulcutter: has joined #ruby
[20:25:42] sonne_: has joined #ruby
[20:25:53] veloutin_: has joined #ruby
[20:25:57] kke: has joined #ruby
[20:26:05] sheepman_: has joined #ruby
[20:26:16] Elysia: has joined #ruby
[20:26:33] vqrs: has joined #ruby
[20:26:44] yo61_: has joined #ruby
[20:26:45] nekomune_: has joined #ruby
[20:27:15] JeanCarloMachado: has joined #ruby
[20:27:34] tekku: has joined #ruby
[20:27:35] bastilian_: has joined #ruby
[20:27:48] banisterfiend: has joined #ruby
[20:28:26] danzilio_: has joined #ruby
[20:28:50] TheMoonMaster_: has joined #ruby
[20:29:25] herbmillerjr: has joined #ruby
[20:29:26] bastilian_: has joined #ruby
[20:30:01] araujo: has joined #ruby
[20:30:01] araujo: has joined #ruby
[20:30:59] roger_rabbit: has joined #ruby
[20:31:21] skmp: has joined #ruby
[20:31:35] sepp2k: has joined #ruby
[20:31:59] johnkpaul: has joined #ruby
[20:32:44] boxrick1: has joined #ruby
[20:34:05] Iacobus: has joined #ruby
[20:34:18] Fin1te: has joined #ruby
[20:34:19] despai: has joined #ruby
[20:34:43] jenrzzz: has joined #ruby
[20:34:43] jenrzzz: has joined #ruby
[20:34:47] davidmichaelkarr: has joined #ruby
[20:34:58] nachoman: has joined #ruby
[20:35:05] ahrs: has joined #ruby
[20:35:37] jhill__: has joined #ruby
[20:36:31] username2: has joined #ruby
[20:39:18] xelkarin: has joined #ruby
[20:40:07] tessi_zz: has joined #ruby
[20:40:07] KillerFox: has joined #ruby
[20:41:41] jamesaxl: has joined #ruby
[20:41:59] jottr: has joined #ruby
[20:42:05] millerti: has joined #ruby
[20:42:36] lacrymology: what's a good interactve debugger? I'm used to pdb in python, which is very much like gdb
[20:43:00] montanonic: has joined #ruby
[20:43:12] lacrymology: they use pry in my project, but I can't figure out how to step out of the current method, navigate the stacktrace, etc
[20:43:15] Disavowed: lacrymology: I like pry.
[20:43:18] Pumukel: has joined #ruby
[20:43:24] matthewd: pry-byebugf
[20:43:25] lacrymology: Disavowed: any good use guides?
[20:43:27] nofxxx: lacrymology, test > debugging ... but in anyways.. binding.irb (2.4.0) or pry
[20:43:48] nofxxx: or byebug
[20:44:00] Disavowed: lacrymology: I think you want this: https://github.com/deivid-rodriguez/pry-byebug
[20:44:05] chouhoulis: has joined #ruby
[20:44:07] Disavowed: as matthewd noted
[20:44:13] Disavowed: (don't want to take credit!)
[20:44:19] is_null: has joined #ruby
[20:44:45] nofxxx: test also keeps paying dividends... =D
[20:45:11] forgot: has joined #ruby
[20:45:16] dagelf: has joined #ruby
[20:46:53] vqrs: has joined #ruby
[20:49:51] SCHAAP137: has joined #ruby
[20:50:51] snowy: has joined #ruby
[20:51:21] lacrymology: Disavowed, matthewd: it's weird, it seems like it's installed but some documented commands don't work: up, down, backtrace
[20:52:07] matthewd: Maybe it hasn't been required?
[20:53:48] jaequery: has joined #ruby
[20:54:41] szulak: has joined #ruby
[20:56:35] flopsec: has joined #ruby
[20:58:15] mzo: has joined #ruby
[20:59:15] zeroDi: has joined #ruby
[21:04:50] Rodya_: has joined #ruby
[21:07:23] jenrzzz: has joined #ruby
[21:07:23] jenrzzz: has joined #ruby
[21:09:01] gigetoo: has joined #ruby
[21:09:51] cdg: has joined #ruby
[21:09:54] rgtk: has joined #ruby
[21:10:10] lacrymology: matthewd: "including" is doing `gem 'byebug'` somewhere appropriate in the Gemfile, right?
[21:10:17] shintaro: has joined #ruby
[21:10:39] cdg: has joined #ruby
[21:10:45] matthewd: No, for several reasons
[21:11:03] matthewd: Firstly, if you want debugger commands in pry, you need pry-byebug, not regular byebug
[21:14:37] bkxd: has joined #ruby
[21:16:40] lacrymology: ah, gotcha. Sorry
[21:18:07] tolerablyjake: has joined #ruby
[21:20:19] xen0fon: has joined #ruby
[21:21:04] nofxxxx: has joined #ruby
[21:22:11] workmad3: has joined #ruby
[21:23:29] Limix: has joined #ruby
[21:26:10] brent__: has joined #ruby
[21:26:25] brent__: has joined #ruby
[21:27:17] bastrud: has joined #ruby
[21:27:38] __Yiota: has joined #ruby
[21:33:56] ramfjord_: has joined #ruby
[21:35:10] jsaak: has joined #ruby
[21:40:27] mikeric: has joined #ruby
[21:41:14] blackmesa: has joined #ruby
[21:44:26] enterprisey: has joined #ruby
[21:44:37] Pumukel: has joined #ruby
[21:47:45] oncall-pokemon: has joined #ruby
[21:49:22] nowhereman: has joined #ruby
[21:50:38] anisha: has joined #ruby
[21:57:59] Lord_of_Life: has joined #ruby
[21:58:32] hutch34: has joined #ruby
[22:00:00] JeanCarloMachado: has joined #ruby
[22:01:04] __Yiota: has joined #ruby
[22:02:53] devyn: has joined #ruby
[22:04:33] nobitanobi: has joined #ruby
[22:11:43] ddffg: why i needto return hash value in the end of block
[22:11:44] ddffg: text.scan(/\w/).inject(Hash.new(0)){|h, c| h[c] += 1; h}
[22:12:09] ddffg: code doesnt work without 'h'
[22:12:23] alibby1: has joined #ruby
[22:12:30] baweaver: inject / reduce set the last implied return value as the new accumulator (in this case h)
[22:12:41] baweaver: use #each_with_object if you want to invert that
[22:12:53] tomphp: has joined #ruby
[22:13:14] baweaver: text.scan(/\w/).each_with_object(Hash.new(0)) { |c, h| h[c] += 1 }
[22:13:20] baweaver: notice the args are reversed though
[22:14:18] kristofferR: has joined #ruby
[22:17:15] bkxd: has joined #ruby
[22:22:25] tmtwd: has joined #ruby
[22:29:02] LuckyABA: has joined #ruby
[22:39:52] dviola: has joined #ruby
[22:41:52] unknown1: has joined #ruby
[22:45:13] Pumukel: has joined #ruby
[22:45:30] workmad3: has joined #ruby
[22:51:12] unknown1_: has joined #ruby
[22:52:34] allisio: Ruby needs `flip`.
[22:52:47] Radar: what does flip do>?
[22:52:57] unknown__: has joined #ruby
[22:53:05] baweaver: ACTION shakes fist at Radar
[22:53:08] allisio: https://www.haskell.org/hoogle/?hoogle=flip
[22:53:15] lupine: "u".flip => "n"
[22:53:24] Radar: lupine: lol
[22:53:52] eam: allisio: isn't #reverse a general case of #flip?
[22:54:03] allisio: eam: Is there a Proc#reverse?
[22:54:03] baweaver: Unless you're programming with straight lambdas, not easily.
[22:54:11] SeepingN: ʎʃʃıs ʎʃǝʇǝʃdɯoɔ sı ʇɐɥʇ
[22:54:18] __Yiota: has joined #ruby
[22:54:25] Silthias: has joined #ruby
[22:54:53] eam: why would it be on Proc?
[22:55:13] allisio: No, yeah, dedicated syntax for flipping blocks would be even better.
[22:55:34] JeanCarloMachado: has joined #ruby
[22:55:42] rizonz: I'm sooo Ruby today
[22:55:45] mikecmpbll: has joined #ruby
[22:57:24] baweaver: >> class Proc; def reverse; -> (*args) { self.call(args.reverse) } end; end; pr=Proc.new{|x,y|x**y}; [pr.call(2,3),pr.reverse.call(2,3)]
[22:57:27] ruby[bot]: baweaver: # => [8, 9] (https://eval.in/757983)
[22:57:42] matthewd: Doesn't seem very useful to me.. I think you'd need dedicated syntax for partial function application first
[22:58:06] `derpy: http://ruby-doc.org/core-2.4.0/Method.html#method-i-curry
[22:58:27] allisio: matthewd: We can just abuse the fact that Procs don't check arity?
[22:59:04] matthewd: allisio: Doesn't that make it *harder*?
[22:59:18] allisio: It's really not an improvement without syntactic support, though: https://eval.in/757985
[23:00:47] davidmichaelkarr: has joined #ruby
[23:00:47] jhill__: has joined #ruby
[23:00:47] tessi_zz: has joined #ruby
[23:00:47] szulak: has joined #ruby
[23:00:48] flopsec: has joined #ruby
[23:00:48] oncall-pokemon: has joined #ruby
[23:00:48] Lord_of_Life: has joined #ruby
[23:00:55] allisio: Plus, y'know, the argument order for #each_with_object makes perfect sense.
[23:03:40] unknown1: has joined #ruby
[23:06:05] claw: has joined #ruby
[23:08:52] Derperperd: has joined #ruby
[23:08:56] rkoller: has joined #ruby
[23:12:21] JeanCarloMachado: has joined #ruby
[23:14:12] rhyselsmore: has joined #ruby
[23:17:16] montanonic: has joined #ruby
[23:28:02] JeanCarloMachado: has joined #ruby
[23:29:06] hutch34: has joined #ruby
[23:31:57] CloCkWeRX: has joined #ruby
[23:33:49] kristofferR: has joined #ruby
[23:37:04] hutch34: has joined #ruby
[23:38:31] alan_w: has joined #ruby
[23:40:16] prometheanfire: has joined #ruby
[23:40:55] prometheanfire: trying to figure out why I'm getting 'undefined method '[]' for nil.NilClass for this line of code :|
[23:40:58] prometheanfire: result_fields = %w{category pn pv pr slot pfx sfx}
[23:41:58] choke: has joined #ruby
[23:43:18] SeepingN: must not be for that line
[23:43:47] SeepingN: or if you're in irb/rails console, restart
[23:44:11] prometheanfire: search_output = qatom_bin *([@resource[:name], '--format', output_format])
[23:44:29] minimalism: has joined #ruby
[23:44:37] pytuger: has joined #ruby
[23:45:10] pytuger: has joined #ruby
[23:45:51] Vingador: has joined #ruby
[23:46:32] prometheanfire: seems it can't access @resource
[23:47:38] JeanCarloMachado: has joined #ruby
[23:48:30] prometheanfire: so, how do I access outer variables and methods when making a 'self' method
[23:52:25] charliesome: has joined #ruby
[23:52:40] __Yiota: has joined #ruby
[23:57:38] duderonomy: has joined #ruby
[23:59:10] allisio: prometheanfire: Instance variables belong to instances.
[23:59:19] BadAtom: has joined #ruby