« Back to channel list

#ruby - 25 July 2017

« Back 1 day Forward 1 day »
[00:01:56] SteenJobs_: has joined #ruby
[00:03:15] SteenJobs_: has joined #ruby
[00:03:16] hutch34_: has joined #ruby
[00:08:38] jenrzzz: has joined #ruby
[00:08:38] jenrzzz: has joined #ruby
[00:14:28] tAn: has joined #ruby
[00:18:09] nadir: has joined #ruby
[00:19:01] mim1k: has joined #ruby
[00:20:40] bronson: has joined #ruby
[00:23:11] zebird: has joined #ruby
[00:27:28] jenrzzz: has joined #ruby
[00:28:57] __Yiota: has joined #ruby
[00:29:53] hutch34_: has joined #ruby
[00:37:50] blindMoe: has joined #ruby
[00:39:12] blindMoe: Is there a trick to checking the existing of a variable deep down into an array stack without checking every step? Ie: if !session[:foobar][:this][:that]['test'].nil? In this case if session[:foobar] is nil it throws an error and checking if every level is defined does not seem very elegant
[00:39:33] havenwood: blindMoe: #dig
[00:40:11] blindMoe: thank you very much
[00:40:29] havenwood: you're welcome. happy coding!
[00:40:35] blindMoe: so essentially if session.dig(:foobar, :this, :that, 'test') ?
[00:40:59] blindMoe: my god that is so much cleaner :)
[00:41:53] jenrzzz: has joined #ruby
[00:41:53] jenrzzz: has joined #ruby
[00:42:32] Renich: has joined #ruby
[00:43:12] boombox_: has joined #ruby
[00:47:26] blindMoe: havenwood: any method that compares for ruby < 2.3 ?
[00:47:32] millerti: has joined #ruby
[00:47:45] eckhardt: has joined #ruby
[00:47:58] olivier__: has joined #ruby
[00:48:51] blindMoe: found a gem for it.. thanks again!
[00:49:54] SteenJobs_: has joined #ruby
[00:55:04] Rodya_: has joined #ruby
[00:57:31] kculpis: has joined #ruby
[00:59:25] wingedsnake: has joined #ruby
[01:00:53] enterprisey: has joined #ruby
[01:03:14] BlkDynmt: has joined #ruby
[01:06:37] gusrub: has joined #ruby
[01:07:14] tacoboy: has joined #ruby
[01:08:22] cagomez: has joined #ruby
[01:08:32] cagomez: has joined #ruby
[01:09:53] cagomez: has joined #ruby
[01:11:16] ar1a: has joined #ruby
[01:14:00] wnd: has joined #ruby
[01:21:25] bronson: has joined #ruby
[01:26:49] naprimer: has joined #ruby
[01:30:24] swills: has joined #ruby
[01:30:24] swills: has joined #ruby
[01:33:43] muzik: has joined #ruby
[01:34:18] veex: has joined #ruby
[01:35:50] nacsurte: has joined #ruby
[01:40:17] d^sh_: has joined #ruby
[01:40:51] Pacra: has joined #ruby
[01:41:33] gizmore|2: has joined #ruby
[01:45:42] olivier__: has joined #ruby
[01:50:27] sarmiena_: has joined #ruby
[01:51:32] olivier__: has joined #ruby
[01:54:52] veex: has joined #ruby
[01:54:58] punnie: has joined #ruby
[01:55:44] shiranuidong: has joined #ruby
[01:57:06] digitalnomad: has joined #ruby
[01:57:14] Rodya_: has joined #ruby
[01:57:30] mostlybadfly: has joined #ruby
[02:01:03] olivier__: has joined #ruby
[02:01:47] olivier__: has joined #ruby
[02:03:17] cagomez: has joined #ruby
[02:04:02] oleingem_: has joined #ruby
[02:04:43] bruno-: has joined #ruby
[02:14:15] cdg: has joined #ruby
[02:15:29] charliesome: has joined #ruby
[02:15:54] rundor: has joined #ruby
[02:16:02] tAn: has joined #ruby
[02:18:38] digitalnomad: has joined #ruby
[02:21:36] Jameser: has joined #ruby
[02:22:15] bronson: has joined #ruby
[02:23:16] Jameser: has joined #ruby
[02:27:26] rundor: has joined #ruby
[02:28:09] guardianxx: has joined #ruby
[02:33:09] hutch34_: has joined #ruby
[02:33:09] AxelAlex: has joined #ruby
[02:35:06] mim1k: has joined #ruby
[02:38:22] rundor: has joined #ruby
[02:39:43] wilbert: has joined #ruby
[02:40:04] Rodya_: has joined #ruby
[02:45:57] Dreamer3_: has joined #ruby
[02:49:14] eckhardt: has joined #ruby
[02:49:44] rundor: has joined #ruby
[02:49:48] gibranlp: has joined #ruby
[02:50:36] haylon: has joined #ruby
[02:54:20] Dreamer3_: has joined #ruby
[02:55:16] ElFerna: has joined #ruby
[02:55:32] Jameser: has joined #ruby
[02:58:07] skweek: has joined #ruby
[03:00:40] lacuna: has joined #ruby
[03:01:14] SeepingN: has joined #ruby
[03:01:35] Jameser: has joined #ruby
[03:02:54] ur5us: has joined #ruby
[03:16:45] tAn: has joined #ruby
[03:21:52] uZiel: has joined #ruby
[03:22:54] gix: has joined #ruby
[03:23:27] bronson: has joined #ruby
[03:26:00] sleepee: has joined #ruby
[03:29:39] sleepee: has joined #ruby
[03:32:51] enterprisey: has joined #ruby
[03:37:27] kwesidev: has joined #ruby
[03:37:59] wilbert: has joined #ruby
[03:40:51] jenrzzz: has joined #ruby
[03:40:51] jenrzzz: has joined #ruby
[03:51:01] kies: has joined #ruby
[03:52:53] guardianxx: has joined #ruby
[03:53:25] Rodya_: has joined #ruby
[03:53:42] hutch34_: has joined #ruby
[03:58:32] uZiel: has joined #ruby
[04:06:44] ramfjord: has joined #ruby
[04:07:36] renchan: has joined #ruby
[04:12:13] _whitelogger_: has joined #ruby
[04:13:11] ar1a_: has joined #ruby
[04:15:58] Ropeney: has joined #ruby
[04:17:04] jenrzzz: has joined #ruby
[04:17:04] jenrzzz: has joined #ruby
[04:20:54] SteenJobs_: has joined #ruby
[04:24:17] bronson: has joined #ruby
[04:25:34] ur5us: has joined #ruby
[04:27:49] scott4000: has joined #ruby
[04:32:50] digitalnomad: has joined #ruby
[04:35:37] mim1k: has joined #ruby
[04:38:38] kwesidev: has joined #ruby
[04:42:16] digitalnomad: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[04:47:47] __Yiota: has joined #ruby
[04:54:50] patrontechnosoft: has joined #ruby
[04:55:08] Ropeney: has joined #ruby
[04:57:47] mim1k: has joined #ruby
[04:58:28] Rodya_: has joined #ruby
[05:05:22] sarbs: has joined #ruby
[05:09:33] jaruga: has joined #ruby
[05:09:51] Rodya_: has joined #ruby
[05:18:18] tAn: has joined #ruby
[05:19:10] aurelien`: has joined #ruby
[05:19:28] Jameser: has joined #ruby
[05:23:38] high_fiver: has joined #ruby
[05:23:53] bruno-: has joined #ruby
[05:24:39] Bock: has joined #ruby
[05:25:08] bronson: has joined #ruby
[05:30:02] Jameser: has joined #ruby
[05:35:32] Dimik: has joined #ruby
[05:40:38] high_fiver: has joined #ruby
[05:41:26] jenrzzz: has joined #ruby
[05:41:26] jenrzzz: has joined #ruby
[05:44:56] nunchuck: has joined #ruby
[05:47:40] rabajaj: has joined #ruby
[05:54:28] jaruga: has joined #ruby
[05:56:27] sarmiena_: has joined #ruby
[05:57:08] KeyJoo: has joined #ruby
[05:57:53] anisha: has joined #ruby
[05:59:06] grant: has joined #ruby
[06:02:15] minimalism: has joined #ruby
[06:03:29] uZiel: has joined #ruby
[06:16:55] AxelAlex: has joined #ruby
[06:18:11] TomyLobo2: has joined #ruby
[06:21:16] lxsameer: has joined #ruby
[06:23:58] djbkd: has joined #ruby
[06:25:56] bronson: has joined #ruby
[06:26:49] hutch34_: has joined #ruby
[06:35:55] nacsurte: has joined #ruby
[06:40:16] antgel: has joined #ruby
[06:46:16] uZiel: has joined #ruby
[06:47:46] andikr: has joined #ruby
[06:49:51] jinie_: has joined #ruby
[06:50:53] tAn: has joined #ruby
[06:51:44] apofis: has joined #ruby
[06:52:28] aurelien`: has joined #ruby
[06:58:32] aufi: has joined #ruby
[06:59:05] mzelin: has joined #ruby
[07:00:10] high_fiver: has joined #ruby
[07:01:10] alveric: has joined #ruby
[07:01:58] Asher: has joined #ruby
[07:02:15] mzelin: hey. I wanna mount a usb stick via my ruby script, when it gets unplugged it should get umounted. this works already. Then, when mounted, I want to write into a file on it. Works too. Problem: when I exit my program while mounted, it gets umounted and the file is saved. good. But when I unplug while running, the file is not permanently saved. While
[07:02:15] mzelin: it is plugged in, the file content is what it should be, looking at it with an external editor. But when unplugging, the file modification is lost. why? script: https://bpaste.net/show/dbc5c516ef6e
[07:03:04] mzelin: in line 22 i write to it and close the file, so it should be saved, and like i told you already, watching the file tells me that it is saved ...
[07:03:14] dminuoso: mzelin: Stop abusing Ruby for this.
[07:03:25] mzelin: Sorry? what you mean?
[07:03:43] dminuoso: mzelin: Look at udev.
[07:04:00] mzelin: okay, but i still wanna know what I've done wrong
[07:04:11] dminuoso: mzelin: The entire attempt is ill-conceived in my perspective.
[07:04:37] mzelin: nono, cause the log file is getting bigger and bigger all time, so i need handling what is on stick already and waht not
[07:04:38] olivier__: has joined #ruby
[07:04:55] dminuoso: mzelin: Sure, but the interaction to figure out when devices are mounted or not is something you should do with udev rules.
[07:05:01] opekktar_: has joined #ruby
[07:05:05] dminuoso: It's trivial.
[07:05:21] mzelin: dminuoso: my mounting works, so this is no topic. saving the file is a topic or not?
[07:05:51] dminuoso: Sorry I'm not going to assist in writing horrible system scripts. I've seen far too much bullshit like that in our infrastructure from admins that are no longer around.
[07:06:04] dminuoso: Use udev rules.
[07:06:11] mzelin: for what? mounting?
[07:07:00] dminuoso: Or autofs perhaps.
[07:08:03] mzelin: oh i jsut need to mount it with -o sync ... i forgot about that option. thanks anyway dminuoso ;)
[07:08:34] mzelin: of course i'll listen to you, but I don't understand why i should do it complicated when I can use my already-working-stuff
[07:09:37] dminuoso: mzelin: That thing will clog up CPU by permanently doing a system("") calls, which in turn use `ls` for absolutely no good reason.
[07:10:51] mzelin: dminuoso: you are right, for performance reasons it is bullshit. but it is a hacking script. I don't know why, but i like such hacks
[07:10:52] aaoiki: has joined #ruby
[07:11:10] dminuoso: mzelin: It's not a hack.
[07:11:24] mzelin: sure it is
[07:11:32] dminuoso: mzelin: There's nothing even remotely elegant about the solution. You could do it in _half_ the code by just using udev rules to take care of the mounting part.
[07:11:38] kahra: has joined #ruby
[07:11:43] dminuoso: Or autofs, but I think udev might be a bit shorter.
[07:11:54] mzelin: okay, so you think at least the mounting i should do in duev rules?
[07:12:04] ShekharReddy: has joined #ruby
[07:12:26] dminuoso: mzelin: mounting/unmounting. have the "manager" emit a pid file, on unmount you can then just signal the process to terminate.
[07:13:00] mzelin: maybe you convinced me .. but so, you need to explain me more detailed
[07:13:03] dminuoso: And then the manager can just a simple loop {} with lines 21-23
[07:13:14] mzelin: I haven't understand how I should realizhe that
[07:13:23] mzelin: so, udev is mounting and umounting automatically, well
[07:13:32] mzelin: how let my program determine that?
[07:13:37] mzelin: i mean if it is mounted
[07:13:42] dminuoso: your program does not care
[07:13:50] dminuoso: It just runs when it is mounted.
[07:13:59] dminuoso: and udev will ensure that your program only runs when it is.
[07:14:02] mzelin: this could be an idea, yeah
[07:14:17] mzelin: dminuoso: this is a good solution, wow
[07:15:40] mzelin: one problem: i am working on a freebsd system, there is no udev ...
[07:17:37] ineb: lol, what a twist.
[07:18:21] vuoto: has joined #ruby
[07:20:50] ineb: there is /etc/devd.conf on freebsd for such things. but i dont know much about that
[07:20:51] hkdsun: has joined #ruby
[07:22:51] Silthias: has joined #ruby
[07:26:18] high_fiver: has joined #ruby
[07:26:39] mark_66: has joined #ruby
[07:26:51] bronson: has joined #ruby
[07:27:53] Mortomes|Work: has joined #ruby
[07:29:08] cgfbee: has joined #ruby
[07:30:09] nofxxxx: has joined #ruby
[07:33:27] djbkd: has joined #ruby
[07:47:17] charliesome: has joined #ruby
[07:52:33] muzik: has joined #ruby
[07:59:40] ur5us: has joined #ruby
[08:01:14] mikecmpbll: has joined #ruby
[08:01:56] Terens: has joined #ruby
[08:04:00] rundor: has joined #ruby
[08:07:13] Terens: Which is a good way to get progress for a future in concurrent ruby/
[08:08:24] Silthias1: has joined #ruby
[08:09:56] ruby[bot]: Terens: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[08:10:31] cagomez: has joined #ruby
[08:11:28] marr: has joined #ruby
[08:11:58] mim1k: has joined #ruby
[08:12:10] Terens: Ok I will give an example. I create a Future that downloads a file and I can get how many bytes are downloaded. What is the best way to share its progress?
[08:15:36] jackjackdripper: has joined #ruby
[08:16:42] garethrees: has joined #ruby
[08:17:30] herwin: the future doesn't have any notion of the amount of downloaded bytes
[08:17:36] herwin: or even that it's downloading
[08:18:28] Terens: Using threads i could store a local variable with progress self[:progress]=.... . Any other suggestion then?
[08:20:35] aufi: has joined #ruby
[08:25:21] sysvalve: has joined #ruby
[08:27:58] bronson: has joined #ruby
[08:29:11] rundor: has joined #ruby
[08:31:24] dminuoso: Terens: I don't think a Future is a good fit for that.
[08:32:02] Terens: which one is?
[08:33:57] djbkd: has joined #ruby
[08:34:04] DoubleMalt: has joined #ruby
[08:35:09] SirFunk: has joined #ruby
[08:35:19] Utkarsh: has joined #ruby
[08:37:05] Gnubie_: has joined #ruby
[08:38:36] ljarvis: "Using threads i could ..." -- but you don't want to use threads directly?
[08:38:59] Utkarsh: has joined #ruby
[08:39:01] ironcamel: has joined #ruby
[08:39:04] webnanners: has joined #ruby
[08:39:09] gnarld_: has joined #ruby
[08:39:10] sindork: has joined #ruby
[08:39:12] rundor: has joined #ruby
[08:39:25] Sirecote: has joined #ruby
[08:39:40] \13k: has joined #ruby
[08:39:55] Beams: has joined #ruby
[08:40:01] Muz: has joined #ruby
[08:40:11] forgot: has joined #ruby
[08:40:15] g3funk: has joined #ruby
[08:40:44] jasondotstar: has joined #ruby
[08:40:52] qmr: has joined #ruby
[08:41:22] bodie_: has joined #ruby
[08:41:57] kitallis: has joined #ruby
[08:43:07] InfinityFye: has joined #ruby
[08:43:20] brixen: has joined #ruby
[08:46:52] clamstar: has joined #ruby
[08:46:53] dminuoso: Or better yet.. coroutines!
[08:47:05] dminuoso: Never not Fiber in Ruby I say.
[08:48:32] aufi: has joined #ruby
[08:50:07] TomyWork: has joined #ruby
[08:52:47] rundor: has joined #ruby
[08:53:34] rundor: has joined #ruby
[08:53:36] workmad3: has joined #ruby
[09:00:31] rundor: has joined #ruby
[09:02:06] rundor_: has joined #ruby
[09:03:02] rundor_: has joined #ruby
[09:06:30] badrsahla: has joined #ruby
[09:10:49] vuoto: has joined #ruby
[09:14:57] rundor: has joined #ruby
[09:15:22] aupadhye: has joined #ruby
[09:19:20] pandaant: has joined #ruby
[09:29:20] bronson: has joined #ruby
[09:36:30] vali: has joined #ruby
[09:42:10] Serpent7776: has joined #ruby
[09:51:16] minimalism: has joined #ruby
[10:08:50] astrobunny: has joined #ruby
[10:10:32] tunaBee__: has joined #ruby
[10:16:16] romankapitonov: has joined #ruby
[10:19:22] umaaji: has joined #ruby
[10:21:12] biberu: has joined #ruby
[10:26:06] tunaBee_: has joined #ruby
[10:28:57] moeabdol: has joined #ruby
[10:29:53] moeabdol: has joined #ruby
[10:30:11] bronson: has joined #ruby
[10:30:24] moeabdol: has joined #ruby
[10:31:59] govg: has joined #ruby
[10:38:38] x0F: has joined #ruby
[10:50:45] roshanavand: has joined #ruby
[10:51:00] rgtk: has joined #ruby
[11:04:27] tvw: has joined #ruby
[11:05:21] antgel: has joined #ruby
[11:09:27] someuser: has joined #ruby
[11:13:01] conta: has joined #ruby
[11:14:35] nicolai86: has joined #ruby
[11:15:02] Ishido: has joined #ruby
[11:18:32] anisha: has joined #ruby
[11:18:38] govg: has joined #ruby
[11:20:20] nicolai86: has joined #ruby
[11:25:00] nicolai86: has joined #ruby
[11:27:02] anisha: has joined #ruby
[11:31:01] bronson: has joined #ruby
[11:32:20] conta: has joined #ruby
[11:32:52] pootiscoder: has joined #ruby
[11:35:06] someuser: has joined #ruby
[11:40:19] VladGh: has joined #ruby
[11:42:41] x0F: has joined #ruby
[11:44:23] snowy: has joined #ruby
[11:45:20] ldnunes: has joined #ruby
[11:51:50] Jameser: has joined #ruby
[11:53:23] rundor: has joined #ruby
[11:53:50] brent__: has joined #ruby
[11:56:18] ar1a: has joined #ruby
[11:57:52] anisha: has joined #ruby
[12:05:26] apparition47: has joined #ruby
[12:05:30] __Yiota: has joined #ruby
[12:05:48] ElFerna: has joined #ruby
[12:06:29] millerti: has joined #ruby
[12:10:30] adlerdias: has joined #ruby
[12:14:10] runescape07rsps: has joined #ruby
[12:16:09] charliesome: has joined #ruby
[12:20:21] Pacra: has joined #ruby
[12:31:01] Jameser: has joined #ruby
[12:31:36] Tungki: has joined #ruby
[12:31:53] fe80: has joined #ruby
[12:32:10] bronson: has joined #ruby
[12:32:37] tvw: has joined #ruby
[12:33:31] charliesome: has joined #ruby
[12:35:14] Jameser: has joined #ruby
[12:35:58] millerti: has joined #ruby
[12:36:27] zapata: has joined #ruby
[12:36:47] ElFerna: has joined #ruby
[12:39:32] aupadhye: has joined #ruby
[12:40:57] alex``: has joined #ruby
[12:41:41] nfk: has joined #ruby
[12:41:52] t-recx: has joined #ruby
[12:41:57] tacoboy: has joined #ruby
[12:43:19] bkxd: has joined #ruby
[12:44:42] AgentVenom: has joined #ruby
[12:47:47] monument: has joined #ruby
[12:48:16] dhaller: has joined #ruby
[12:48:27] synthroid: has joined #ruby
[12:49:29] Jameser: has joined #ruby
[12:51:49] Awsy: has joined #ruby
[12:54:00] ghr: has joined #ruby
[12:54:18] rundor: has joined #ruby
[12:54:40] synthroid: has joined #ruby
[12:54:51] dhaller: has joined #ruby
[12:56:27] synthroid: has joined #ruby
[12:59:16] conta: has joined #ruby
[13:08:00] dh64: has joined #ruby
[13:08:04] gnufied: has joined #ruby
[13:10:30] cagomez: has joined #ruby
[13:13:15] Jameser: has joined #ruby
[13:13:42] eljimbo: has joined #ruby
[13:16:25] Tungki: has joined #ruby
[13:19:36] sleepee: has joined #ruby
[13:20:08] charliesome: has joined #ruby
[13:20:51] olivier__: has joined #ruby
[13:23:28] jphase: has joined #ruby
[13:27:18] olivier__: has joined #ruby
[13:27:22] Jameser: has joined #ruby
[13:32:48] tvw: has joined #ruby
[13:32:53] Xiti`: has joined #ruby
[13:32:55] cagmz_: has joined #ruby
[13:32:55] ForeignBiscuit: has joined #ruby
[13:32:56] BSAlb: has joined #ruby
[13:33:02] bronson: has joined #ruby
[13:33:28] DLSteve_: has joined #ruby
[13:33:44] octomancer: hi, i can't understand something, i'm hoping someone can help ... the following ruby works fine:
[13:33:47] octomancer: out << ("%s %s - %s %s %s") % (l.slice(:one, :two, :three, :four, :five).values)
[13:33:57] octomancer: but this gives an error:
[13:34:04] jamal7_: has joined #ruby
[13:34:06] MyMind: has joined #ruby
[13:34:06] octomancer: puts ("loops %d %d") % (pass_count,loop_count)
[13:34:09] octomancer: i have to use:
[13:34:16] nicolai86_: has joined #ruby
[13:34:19] watersoul_: has joined #ruby
[13:34:20] octomancer: puts "loops %d %d" % [pass_count,loop_count]
[13:34:22] Nahra```: has joined #ruby
[13:34:26] octomancer: i don't understand why
[13:34:32] boto: has joined #ruby
[13:34:37] Awsm: has joined #ruby
[13:34:46] Luyt_: has joined #ruby
[13:34:53] octomancer: the error is:
[13:35:04] PaulCape_: has joined #ruby
[13:35:29] octomancer: code.rb:<line>: syntax error, unexpected ')', expecting '='
[13:35:49] octomancer: %d") % (pass_count,loop_count)
[13:36:20] oleo: has joined #ruby
[13:36:29] webnanners: has joined #ruby
[13:36:37] baweaver: has joined #ruby
[13:36:51] mim1k: has joined #ruby
[13:36:58] shortdudey123: has joined #ruby
[13:37:48] octomancer: btw, this doesn't work either:
[13:37:59] octomancer: out << ("loops %d %d") % (pass_count,loop_count)
[13:38:16] knight-: has joined #ruby
[13:38:19] [reed]: has joined #ruby
[13:38:19] [reed]: has joined #ruby
[13:38:27] Jameser: has joined #ruby
[13:39:57] Vircung: has joined #ruby
[13:43:16] herwin: octomancer: () doesn't create an array, and you need an array here, that's why [] does work
[13:43:19] cam27: has joined #ruby
[13:43:33] herwin: (you can skip the parens in the l.slice-line
[13:43:59] herwin: 'puts ("loops %d %d") % (pass_count,loop_count)' is being executed as '(puts("...")) % ...'
[13:44:26] herwin: the puts first, than the sprintf
[13:45:05] herwin: also: http://batsov.com/articles/2013/06/27/the-elements-of-style-in-ruby-number-2-favor-sprintf-format-over-string-number-percent/
[13:45:11] herwin: which makes the code much more readable
[13:48:09] Jameser: has joined #ruby
[13:52:12] nfk: has joined #ruby
[13:54:02] polishdub: has joined #ruby
[13:56:02] dviola: has joined #ruby
[13:57:41] seas: has joined #ruby
[14:02:10] adlerdias: has left #ruby: ()
[14:04:19] Rapture: has joined #ruby
[14:05:49] antgel: has joined #ruby
[14:07:11] ltem: has joined #ruby
[14:09:01] barx: has joined #ruby
[14:10:35] lewls: has joined #ruby
[14:11:10] barx: why would one put a colon after function arguments? e.g. http://bit.ly/2v4rHzV
[14:11:29] lewls: has joined #ruby
[14:12:57] herwin: barx: https://robots.thoughtbot.com/ruby-2-keyword-arguments
[14:13:16] moeabdol: has joined #ruby
[14:13:31] barx: aaaahhhhhhh, thank you herwin
[14:15:53] bruno-: has joined #ruby
[14:16:13] dminuoso: I want methods with pattern matching.
[14:16:26] lewls: has joined #ruby
[14:16:57] chouhoulis: has joined #ruby
[14:16:58] lewls: has joined #ruby
[14:17:52] SteppenII: has joined #ruby
[14:17:59] chouhoul_: has joined #ruby
[14:18:12] mim1k: has joined #ruby
[14:18:55] octomancer: ACTION rewrites % to sprintf calls
[14:18:58] octomancer: herwin: thanks again
[14:19:08] mark_66: has joined #ruby
[14:20:12] ElFerna: has joined #ruby
[14:20:58] dminuoso: I want to be able to do something like.... defmethod(:length, []) &-> { 0 }; defmethod(:length, [:first, :"*Rest"]) &-> { (first, rest) 1 + length(rest) }
[14:21:31] pootiscoder: why isn't there a fat arrow function like javascript in ruby? it's so much faster
[14:21:32] olivier__: has joined #ruby
[14:21:37] dminuoso: pootiscoder: ther eis.
[14:21:40] dminuoso: pootiscoder: I just used it in fact.
[14:21:55] dminuoso: pootiscoder: ruby blocks/procs/lambdas are the equivalent.
[14:22:14] pootiscoder: like this (arg1, arg2) => {}
[14:22:16] dminuoso: not too terribly different.
[14:22:38] pootiscoder: can you do it with do/end?
[14:22:40] dminuoso: I suck at Ruby.
[14:22:52] dminuoso: pootiscoder: You can use them interexchangablebalbly
[14:22:55] Papierkorb: of course. `lambda do |x| .. end`
[14:23:12] dminuoso: pootiscoder: it's just common to use do/end for multiline things
[14:23:14] pootiscoder: interexchangablebalby
[14:23:27] Papierkorb: though if you want to pass in some logic, you probably meant to use a block
[14:23:31] dminuoso: pootiscoder: I started typing and couldn't figure out the spelling.
[14:23:40] dminuoso: Just added enough letters until it looked about right.
[14:23:56] dminuoso: use pattern matching!
[14:24:20] pootiscoder: dminuoso you probably know cos you are in #reactjs too, you were just answering someone
[14:24:20] dminuoso: defmethod(:length, []) &->() { 0 }; defmethod(:length, [:first, :"*Rest"]) &->(first, rest) { 1 + length(rest) }
[14:24:22] theunraveler: has joined #ruby
[14:24:25] Papierkorb: I must say, I had a Haskell course last semester, and I wasn't impressed
[14:24:36] dminuoso: Papierkorb: haskell people would eat me for breakfast on that one
[14:24:39] dminuoso: because its not curried
[14:24:40] pootiscoder: rubymasterrace
[14:24:56] dminuoso: Papierkorb: I just started with elixir :)
[14:25:10] pootiscoder: ACTION coughs 
[14:25:19] pootiscoder: i meant to say:
[14:25:26] pootiscoder: pythonmasterrace
[14:26:57] octomancer: herwin: now i remember why i wrote it with % ... i couldn't get sprintf to work! please tell me what's wrong with this:
[14:26:59] octomancer: out << sprintf("%s %s - %s %s %s", l.slice(:neigh, :asn, :asname, :time, :pfx).values)
[14:27:13] octomancer: i get "too few arguments (ArgumentError)"
[14:27:37] dminuoso: octomancer: you need to splat the array
[14:27:44] Papierkorb: octomancer: Is there a reason you don't use string interpolation?
[14:27:52] dminuoso: Papierkorb: Are you crazy?
[14:28:04] mim1k: has joined #ruby
[14:29:47] dminuoso: >> printf("%s %s", *[1,2]) # octomancer
[14:29:48] ruby[bot]: dminuoso: # => 1 2nil (https://eval.in/837399)
[14:30:46] olivier__: has joined #ruby
[14:32:24] dhaller: has joined #ruby
[14:32:37] octomancer: dminuoso: idgi ... a) what does the * do and b) how does that apply to my line of code ;-)
[14:33:31] bronson: has joined #ruby
[14:34:00] octomancer: i've written a lot of perl, where there is a subtle difference between a list and an array, am i falling foul of something similar in ruby?
[14:34:11] Papierkorb: Thankfully, not
[14:34:21] Papierkorb: Ruby is funny, but not insane like perl
[14:35:14] mikecmpbll: has joined #ruby
[14:36:00] hutch34_: has joined #ruby
[14:36:41] Papierkorb: octomancer: The leading star is the (unary) splat operator. it takes the following array and 'expands' it on the stack, effectively turning the array into a list of arguments you can pass into a method.
[14:36:46] ytti: python is the new perl
[14:36:59] ytti: first langauge people pick-up, not because they want to program
[14:37:03] ytti: but because they have to automate something
[14:37:22] ytti: consequently like perl, there is tons of really poor quality python code
[14:37:33] ytti: no classes, long functions
[14:37:49] ytti: but this of course also means python won
[14:37:54] ytti: which makes me sad
[14:37:58] octomancer: Papierkorb: that sounds exactly like the Perlish difference between a list and an array which you denied i was falling foul of ;-)
[14:38:16] Papierkorb: octomancer: The difference is, that ruby has no "list"
[14:38:47] Papierkorb: octomancer: you can't accidentally splat something, like you can use a list without even knowing in Perl
[14:39:25] warrshrike: has joined #ruby
[14:39:49] polishdub: ytti: If There was more of a push to use Ruby beyond RoR, then Ruby might see more usage
[14:40:22] octomancer: well, stap me vitals, this worked: out << sprintf("%s %s - %s %s %s", *l.slice(:neigh, :asn, :asname, :time, :pfx).values)
[14:40:24] polishdub: but because people only see it as a single purpose, they discard it
[14:40:24] octomancer: thanks all :-)
[14:40:48] Papierkorb: polishdub: I'm not even sure if loosing cargo-cult developers is such a bad thing
[14:41:10] Papierkorb: They moved on to NodeJS, and probably then to whatever is hip after that. Eh.
[14:41:52] octomancer: i'm of the opinion that if you are coding for fun then the concept of cargo-culting does not even exist. not saying people should get paid for it though
[14:42:43] Papierkorb: When I code for fun, I don't get paid. When I get paid, coding is hopefully fun, but it's not the main objective. (Do not mis-read that as "if it's never fun, that's fine")
[14:46:01] octomancer: i tend to agree. work should be as much fun as possible, but sometimes it's just work
[14:50:24] dminuoso: octomancer: * is kind of like ... in javascript
[14:50:33] dminuoso: it kind of can be used in all the same places and it usually has the same effect everywhere
[14:51:49] dminuoso: Papierkorb: Im not sure why you think that node js has lots of cargo cult programming
[14:52:26] Papierkorb: dminuoso: I don't care and only used nodejs as example.
[14:52:33] dminuoso: Fair enough
[14:53:12] rippa: has joined #ruby
[14:53:51] d4ybl1nd: has joined #ruby
[14:55:35] tvw: has joined #ruby
[14:56:08] mikecmpbll: has joined #ruby
[15:05:24] [Butch]: has joined #ruby
[15:11:25] wisegopher: has joined #ruby
[15:12:01] wisegopher: has left #ruby: ()
[15:12:06] veex: has joined #ruby
[15:14:25] Toledo: has joined #ruby
[15:15:00] bruno-: has joined #ruby
[15:15:30] barx: has joined #ruby
[15:17:11] someuser: has joined #ruby
[15:18:30] radic: has joined #ruby
[15:20:32] ramfjord: has joined #ruby
[15:20:42] mim1k: has joined #ruby
[15:23:59] rgtk: has joined #ruby
[15:26:56] synthroid: has joined #ruby
[15:28:50] cagomez: has joined #ruby
[15:28:52] code_zombie: has joined #ruby
[15:32:37] nicolai86: has joined #ruby
[15:34:53] anisha: has joined #ruby
[15:35:01] bronson: has joined #ruby
[15:35:49] eelster: has joined #ruby
[15:36:22] brent__: has joined #ruby
[15:37:51] brent__: has joined #ruby
[15:38:56] TomyLobo2: has joined #ruby
[15:40:10] eelster_: has joined #ruby
[15:40:28] Brent___: has joined #ruby
[15:42:02] ledestin: has joined #ruby
[15:43:50] sepp2k: has joined #ruby
[15:46:20] [Butch]: has joined #ruby
[15:46:27] cdg: has joined #ruby
[15:48:17] cdg_: has joined #ruby
[15:48:55] nacsurte: has joined #ruby
[15:56:54] kwesidev: has joined #ruby
[15:57:45] naprimer2: has joined #ruby
[15:58:03] jackjackdripper: has joined #ruby
[15:58:16] eelster_: has joined #ruby
[15:58:23] rundor: has joined #ruby
[16:00:50] nicolai86_: has joined #ruby
[16:00:58] amclain: has joined #ruby
[16:01:51] gusrub: has joined #ruby
[16:01:53] rundor: has joined #ruby
[16:02:09] Phage-: has joined #ruby
[16:03:22] ramfjord: has joined #ruby
[16:04:33] artmann__: has joined #ruby
[16:04:38] Dimik: has joined #ruby
[16:06:21] rcs-: has joined #ruby
[16:06:23] uZiel: has joined #ruby
[16:06:27] mayamai: has joined #ruby
[16:07:08] salih: has joined #ruby
[16:07:50] chrisarcand: has joined #ruby
[16:07:50] hkri: has joined #ruby
[16:08:01] rundor: has joined #ruby
[16:08:21] rundor: has joined #ruby
[16:08:22] chouhoulis: has joined #ruby
[16:08:48] hkri: has joined #ruby
[16:09:20] \13k: has joined #ruby
[16:09:26] snowy: has joined #ruby
[16:09:58] rundor: has joined #ruby
[16:09:59] bokayio: has joined #ruby
[16:12:14] rabajaj: has joined #ruby
[16:12:33] jinie_: has joined #ruby
[16:12:38] rundor: has joined #ruby
[16:12:59] cjk101010: has joined #ruby
[16:13:04] A124: has joined #ruby
[16:13:34] anisha: has joined #ruby
[16:13:34] hkri: has left #ruby: ()
[16:17:35] olivier__: has joined #ruby
[16:17:52] apeiros: has joined #ruby
[16:17:55] Tralin: has joined #ruby
[16:17:56] guacamole: has joined #ruby
[16:18:00] graft: has joined #ruby
[16:18:00] graft: has joined #ruby
[16:18:16] futilegames: has joined #ruby
[16:18:24] MarcWeber: has joined #ruby
[16:18:51] \13k: has joined #ruby
[16:19:19] rundor: has joined #ruby
[16:21:43] ElFerna: has joined #ruby
[16:24:14] someuser: has joined #ruby
[16:24:40] pwned: has joined #ruby
[16:26:26] baweaver: has joined #ruby
[16:27:13] jinie_: has joined #ruby
[16:27:35] gf3: has joined #ruby
[16:28:50] uZiel: has joined #ruby
[16:29:58] pecan: has joined #ruby
[16:30:10] tacoboy: has joined #ruby
[16:33:15] enterprisey: has joined #ruby
[16:33:17] tynamite: has joined #ruby
[16:33:35] MarcWebe1: has joined #ruby
[16:33:51] ihme-TTilus: has joined #ruby
[16:34:28] rundor: has joined #ruby
[16:35:03] rundor: has joined #ruby
[16:35:20] tynamite: How can I add ruby to my wamp server? http://imgur.com/a/ahW8D
[16:35:32] bronson: has joined #ruby
[16:35:34] tynamite: I'm on my windows laptop, for windows
[16:36:10] chouhoulis: has joined #ruby
[16:36:21] rundor: has joined #ruby
[16:36:41] Bish: has joined #ruby
[16:36:50] nishiki: has joined #ruby
[16:37:54] adlerdias: has joined #ruby
[16:37:59] havenwood: tynamite: A UniServer? An X away from greatness!
[16:38:26] havenwood: tynamite: https://rubyinstaller.org/
[16:38:28] tynamite: uniform server for windows, it's portable
[16:38:36] tynamite: yes but ruby installer wants me to use WEBrick
[16:38:53] tynamite: I'm thinking more of adding ruby on windows to an existing server
[16:38:59] havenwood: Install the Puma gem. WEBrick is just he dumb default.
[16:39:16] tynamite: How is puma better than webrick?
[16:39:39] Snowy_: has joined #ruby
[16:40:13] havenwood: tynamite: The typical setup is to reverse proxy from Nginx/Apache/whatev to a port or socket running WEBrick/Puma/Unicorn/etc.
[16:40:16] dionysus69: has joined #ruby
[16:40:26] tynamite: I'm not a sysadmin so I wouldn't know how to do that.
[16:40:30] tynamite: Is there a tutorial somewhere?
[16:40:42] havenwood: tynamite: Puma adds multi-process via workers, threads via thread pool, and event machines on each thread.
[16:40:57] havenwood: tynamite: http://puma.io/
[16:41:07] havenwood: tynamite: It's as simple as adding Puma to your Gemfile typically.
[16:41:18] tynamite: I'm a web developer, not a sysadmin so I wouldn't know about how to reverse proxy all that stuff and set it up. Is there a tutorial somewhere?
[16:41:23] apeiros: has joined #ruby
[16:41:30] rundor: has joined #ruby
[16:41:36] jinie_: has joined #ruby
[16:42:35] rundor: has joined #ruby
[16:42:51] _sfiguser: has joined #ruby
[16:43:05] rundor: has joined #ruby
[16:44:42] hurricanehrndz: has joined #ruby
[16:46:31] ldnunes: has joined #ruby
[16:47:24] rgtk: has joined #ruby
[16:50:01] havenwood: tynamite: Are you using Windows Server or Apache or?
[16:50:15] tynamite: on my windows laptop
[16:50:30] olivier__: has joined #ruby
[16:50:40] tynamite: I'll use puma in future thank you havenwood
[16:50:41] bonhoeffer: has joined #ruby
[16:50:54] havenwood: tynamite: You should find a bunch of options if you search for: reverse proxy apache puma
[16:51:06] havenwood: tynamite: no prob, you're welcome
[16:51:31] olivier__: has joined #ruby
[16:51:34] havenwood: tynamite: Puma is the Rails default option now. Unicorn, Passenger, Thin, etc are nice alternatives.
[16:51:39] tynamite: I'll look into that now. Lots of good results I think came up.
[16:51:46] tynamite: I don't use Rails I use Ramaze.
[16:51:59] tynamite: Because I can't find any good rails tutorials smh
[16:52:10] havenwood: tynamite: Ah, nice. Even Rack itself should choose Puma when available.
[16:52:33] tynamite: Looks like I'm going to change from webrick to puma
[16:52:36] havenwood: tynamite: The Rails docs themselves are very polished. There could be more of them but they are solid.
[16:52:52] tynamite: Maybe they've improved it since I checked 5 years ago.
[16:53:05] havenwood: tynamite: Switching from WEBrick to Puma is a good idea! It should be more reliable and faster.
[16:54:49] guacamole: hi friends, does anyone have a good recommendation for a gem that will format phone #s based on country? looked into carr/phone and floere/phoney but wondering if there are other good alternatives out there
[16:55:47] mtkd: has joined #ruby
[16:56:29] olivier__: has joined #ruby
[16:57:41] havenwood: guacamol_: Another to consider: https://github.com/mobi/telephone_number
[16:58:18] havenwood: guacamol_: And hi!
[16:58:30] guacamole: havenwood hello!
[16:58:34] guacamole: thank you looking into it
[17:03:21] olivier__: has joined #ruby
[17:07:11] __Yiota: has joined #ruby
[17:14:23] chouhoulis: has joined #ruby
[17:21:49] duderonomy: has joined #ruby
[17:23:25] olivier__: has joined #ruby
[17:25:34] tynamite: I can't figure out how to change my ramaze app from webrick to puma
[17:26:01] mim1k: has joined #ruby
[17:26:10] enterprisey: has joined #ruby
[17:26:56] adlerdias: has joined #ruby
[17:31:15] guacamole: tynamite i'm not that familiar with ramaze, does it have a gem file?
[17:32:09] kamilkucharski: has joined #ruby
[17:35:42] tynamite: It doesn't come with a gemfile but you can create one if your web host requires one.
[17:36:42] bronson: has joined #ruby
[17:37:03] guacamole: puma isn't listed as an adapter on the ramaze docs, but Thin is (also better than webrick)
[17:37:56] guacamole: also there's a #ramaze channel, have you checked it out tynamite?
[17:38:50] guacamole: tynamite https://github.com/manveru/ramaze-wiki-pages/blob/master/en/Innate.org under "usage" you can see how to switch your adapter
[17:39:17] tynamite: https://gist.github.com/desbest/a761e9686b8aacf8e98dd6c24e686c04
[17:39:29] tynamite: I'll ask there.
[17:40:11] guacamole: has joined #ruby
[17:40:18] guacamole: tynamite good luck!
[17:40:27] olivier__: has joined #ruby
[17:40:32] tynamite: Looking at the code in the link I gave you, it looks like all you have to do is change :webrick to :puma but that doesn't work.
[17:40:54] guacamole: i think you need the puma gem to do that, maybe try making that gemfile?
[17:40:58] tynamite: Ramaze isn't very active so I suppose I'll email manveru instead.
[17:41:20] tynamite: I've put puma in my gemfile and my app.rb file
[17:41:26] guacamole: did you bundle?
[17:42:11] tynamite: I'll do that now.
[17:42:12] guacamole: out of curiousity, does it work if you change :webrick to :thin? just asking because that's on the list of adapters in the docs (puma isn't listed there)
[17:42:13] havenwood: tynamite: gem install bundler && bundle
[17:42:19] manveru: tynamite: yo
[17:42:39] manveru: I didn't think anyone still users it
[17:42:48] tynamite: hello manveru
[17:43:07] tynamite: I use ramaze for my debate and Q&A website.
[17:43:15] tynamite: I suppose that's the only active use for it to my knowledge.
[17:45:30] manveru: well for puma you might need to fork Ramaze
[17:45:44] manveru: because innate uses very old rack
[17:46:30] sarmiena_: has joined #ruby
[17:47:47] manveru: I'm mobile at the moment. but I can maybe help you tonight
[17:49:41] kies: has joined #ruby
[17:50:37] raspado: has joined #ruby
[17:51:13] MichaelBurge: has joined #ruby
[17:52:18] tynamite: gem rdiscount failed to install
[17:54:26] tynamite: Here's the error from the log file.
[17:54:27] tynamite: C:\mowes\ruby\lib\ruby\gems\1.9.1\gems\rdiscount-2.1.8\ext/conftest.c:8: undefined reference to `random'
[17:56:12] tynamite: I'm going to have to use an old version of rdiscount to work with ruby 1.9.3
[17:56:19] eckhardt: has joined #ruby
[17:59:34] MrBismuth: has joined #ruby
[18:01:16] cdg__: has joined #ruby
[18:01:26] cam27: has joined #ruby
[18:03:23] Eiam: has joined #ruby
[18:03:58] MrBusiness: has joined #ruby
[18:04:43] olivier__: has joined #ruby
[18:05:45] mikecmpbll: has joined #ruby
[18:07:04] bayed: has joined #ruby
[18:07:05] high_fiver: has joined #ruby
[18:09:15] csk: has joined #ruby
[18:16:17] high_fiver_: has joined #ruby
[18:16:46] jackjackdripper: has joined #ruby
[18:18:41] olivier__: has joined #ruby
[18:19:16] chouhoulis: has joined #ruby
[18:20:23] ur5us: has joined #ruby
[18:25:53] dionysus70: has joined #ruby
[18:26:40] ozcanesen: has joined #ruby
[18:26:42] SeepingN: has joined #ruby
[18:27:45] jaruga: has joined #ruby
[18:28:00] guacamole: has joined #ruby
[18:29:11] tynamite: How do I change my ramaze adapter from webrick to thin manveru?
[18:34:14] wilbert: has joined #ruby
[18:37:31] bronson: has joined #ruby
[18:39:30] xuanrui: has joined #ruby
[18:39:55] tynamite: has left #ruby: ()
[18:42:20] jackjackdripper: has joined #ruby
[18:43:21] gusrub: has joined #ruby
[18:51:36] Prutheus: has joined #ruby
[18:52:38] Prutheus: Hello! I am working with https://github.com/gushonorato/google-scraper ... wanna run their example, but get an error: /lib/capybara/node/finders.rb:49:in `block in find': Unable to find css "#pnnext" (Capybara::ElementNotFound)
[18:53:00] Prutheus: this should be a mistake, google has the element #pnnext at its page
[18:53:05] Prutheus: what should i do?
[18:54:03] conta3: has joined #ruby
[18:54:57] eelster: has joined #ruby
[18:56:58] rundor: has joined #ruby
[18:59:46] Prutheus: could someone please tell me why this error occurs?
[18:59:54] eelster: has joined #ruby
[19:02:05] adam12: Prutheus: Maybe it actually doesn't, when the scraper sees it. Maybe the scraper sees the captcha/bot activity page.
[19:04:15] Prutheus: adam12: the what?
[19:04:25] adam12: Prutheus: I don't know what your code looks like, but you could try rescuing Capybara::ElementNotFound and outputting the HTML of what is currently being parsed.
[19:04:43] adam12: Prutheus: You've never seen it? Google can spot scrapers and forces a captcha.
[19:04:55] adam12: I see it all the time if I'm using DuckDuckGo and using the !g bang too often.
[19:07:17] Fraeon: has joined #ruby
[19:08:43] jtd: has joined #ruby
[19:09:11] ledestin: has joined #ruby
[19:09:14] enterprisey: has joined #ruby
[19:09:40] Eiam: has joined #ruby
[19:10:16] guacamole: has joined #ruby
[19:10:29] cagomez: has joined #ruby
[19:11:28] salih: has left #ruby: ("Leaving")
[19:11:33] havenwood: naitian: 'readonly' option is set (add ! to override)
[19:12:51] domgetter: has joined #ruby
[19:13:18] quobo: has joined #ruby
[19:14:45] jenrzzz: has joined #ruby
[19:19:03] gusrub: has joined #ruby
[19:24:50] _sfiguser: has joined #ruby
[19:25:35] gusrub: has joined #ruby
[19:26:45] raspado_: has joined #ruby
[19:28:01] romankapitonov: has joined #ruby
[19:29:37] Prutheus: adam12: i am using the example posted on their github, can't modify the lib code right now, no access, could you please check this up for me?
[19:34:43] ElFerna: has joined #ruby
[19:38:02] bronson: has joined #ruby
[19:39:15] lxsameer: has joined #ruby
[19:41:48] snowy: has joined #ruby
[19:42:38] InfinityFye: has joined #ruby
[19:49:59] MrBusiness: has joined #ruby
[19:54:23] cagomez: has joined #ruby
[19:54:53] cdg: has joined #ruby
[19:56:46] Rapture: has joined #ruby
[20:01:39] cdg_: has joined #ruby
[20:01:59] Asher: has joined #ruby
[20:03:27] tAn: has joined #ruby
[20:04:46] mtkd: has joined #ruby
[20:05:19] eckhardt: has joined #ruby
[20:10:19] Dbugger: has joined #ruby
[20:14:28] brent__: has joined #ruby
[20:14:54] rRru: has joined #ruby
[20:16:27] rRru: has left #ruby: ()
[20:17:32] pwned: has joined #ruby
[20:23:45] jtd: has joined #ruby
[20:26:10] t-recx: has joined #ruby
[20:26:38] cagomez: has joined #ruby
[20:26:50] jtd: has joined #ruby
[20:30:13] loincloth: has joined #ruby
[20:30:18] cagomez: has joined #ruby
[20:31:49] romankapitonov: has joined #ruby
[20:33:07] HoierM: has joined #ruby
[20:35:24] tunaBee_2: has joined #ruby
[20:37:09] MrBusiness: has joined #ruby
[20:38:53] bronson: has joined #ruby
[20:42:55] dviola: has joined #ruby
[20:43:49] moeabdol: has joined #ruby
[20:50:19] ElFerna: has joined #ruby
[21:00:23] tAn: has joined #ruby
[21:01:37] DoubleMalt: has joined #ruby
[21:02:27] cagomez: has joined #ruby
[21:09:09] milardovich: has joined #ruby
[21:09:28] jenrzzz: has joined #ruby
[21:10:01] gusrub: has joined #ruby
[21:11:51] raspado: has joined #ruby
[21:12:18] herbmillerjr: has joined #ruby
[21:13:23] cagomez: has joined #ruby
[21:13:27] hays: has joined #ruby
[21:16:43] milardov_: has joined #ruby
[21:17:16] knight33: has joined #ruby
[21:18:13] dmtd: has joined #ruby
[21:19:52] Xentil: has joined #ruby
[21:23:13] rundor: has joined #ruby
[21:28:46] Mrgoose2: has joined #ruby
[21:29:07] Mrgoose2: im using GRPC and getting a return object of type :Google::Protobuf::RepeatedField . How do i turn that into json?
[21:31:20] ur5us: has joined #ruby
[21:34:38] mim1k: has joined #ruby
[21:34:48] anjen: has joined #ruby
[21:35:19] romankapitonov: has joined #ruby
[21:40:02] bronson: has joined #ruby
[21:40:03] Murda: has joined #ruby
[21:41:39] jenrzzz: has joined #ruby
[21:42:30] gizmore: has joined #ruby
[21:45:29] KeyJoo: has joined #ruby
[21:46:49] moei: has joined #ruby
[22:01:35] electrostat: has joined #ruby
[22:02:41] jenrzzz_: has joined #ruby
[22:06:18] ramfjord: has joined #ruby
[22:07:23] elcontrastador: has joined #ruby
[22:09:30] futilegames: has joined #ruby
[22:11:40] johnny56: has joined #ruby
[22:13:39] caffeinate_360: has joined #ruby
[22:17:06] MrBusiness: has joined #ruby
[22:17:11] gusrub: has joined #ruby
[22:18:38] anjen: has joined #ruby
[22:21:44] elcontrastador: I'm struggling with ERB newline suppression with both ERB and Erubis. Any help would be appreciated: https://gist.github.com/elcontrastador/f0fb129de07477d80c3d618abc29404b
[22:22:27] guacamole: has joined #ruby
[22:28:17] mtkd: has joined #ruby
[22:28:28] eckhardt: has joined #ruby
[22:29:08] iloveitaly: has joined #ruby
[22:30:34] olivier__: has joined #ruby
[22:31:05] Moosashi: has joined #ruby
[22:38:54] tAn: has joined #ruby
[22:40:53] bronson: has joined #ruby
[22:41:33] olivier__: has joined #ruby
[22:42:34] olivier__: has joined #ruby
[22:48:08] nowhere_man: has joined #ruby
[22:48:30] theunraveler: has joined #ruby
[22:49:42] setient: has joined #ruby
[22:52:02] ElFerna: has joined #ruby
[22:54:19] olivier__: has joined #ruby
[22:54:32] olivier__: has joined #ruby
[22:56:51] ecuanaso: has joined #ruby
[22:58:35] eckhardt: has joined #ruby
[23:03:03] cagomez_: has joined #ruby
[23:04:24] eljimbo: has joined #ruby
[23:04:28] cagomez: has joined #ruby
[23:04:42] ramfjord: has joined #ruby
[23:05:04] eljimbo: has joined #ruby
[23:06:08] olivier__: has joined #ruby
[23:06:34] olivier__: has joined #ruby
[23:08:24] AxelAlex: has joined #ruby
[23:10:53] ramfjord: has joined #ruby
[23:16:46] zenspider: no commit in 2 years. readme says: Future: Add tests, Improve this README... seems legit
[23:17:57] olivier__: has joined #ruby
[23:18:24] zenspider: elcontrastador: nil lines aren't nil. they're (usually) nil.to_s, which is ""
[23:18:37] olivier__: has joined #ruby
[23:19:06] elcontrastador: stdlib CSV returns nil
[23:19:06] zenspider: you could post-process between the eval and the puts. a simple gsub should suffice
[23:19:19] zenspider: that doesn't matter
[23:19:28] elcontrastador: https://gist.github.com/elcontrastador/f0fb129de07477d80c3d618abc29404b#file-ert_test-rb-L23-L25
[23:19:31] zenspider: `<%= nil ->` is what you're doing
[23:20:12] elcontrastador: i found a workaround but interested in what you're saying here... so gsub for ""?
[23:21:27] segmond: has joined #ruby
[23:21:45] eckhardt: has joined #ruby
[23:23:13] zenspider: <%= "callgroup = #{@l.call_group}" if @l.call_group %> -> <%= "callgroup = #{@l.call_group}" if false %> -> <%= nil %> ...
[23:23:20] zenspider: >> require "erb"; ERB.new("<%= nil %>\n<%= nil %>\n").src
[23:23:21] ruby[bot]: zenspider: # => "#coding:UTF-8\n_erbout = ''; _erbout.concat(( nil ).to_s); _erbout.concat \"\\n\"\n; _erbout.concat ...check link for more (https://eval.in/837658)
[23:24:22] Pacra: has joined #ruby
[23:24:54] havenwood: #=> "#coding:UTF-8\n" + "..."
[23:25:26] zenspider: >> require "erb"; ERB.new("<%= nil %>\n<%= nil %>\n").result
[23:25:28] ruby[bot]: zenspider: # => "\n\n" (https://eval.in/837660)
[23:25:32] ecuanaso: has joined #ruby
[23:26:36] deep-book-gk_: has joined #ruby
[23:28:15] boombox_: has joined #ruby
[23:28:34] zenspider: elcontrastador: you should probably be using .result instead of eval
[23:28:38] deep-book-gk_: has left #ruby: ()
[23:29:19] cagomez: has joined #ruby
[23:29:57] olivier__: has joined #ruby
[23:30:25] elcontrastador: I was using erb.result(binding) when i was using ERB... this example is shown using Erubis as described in their docs. I agree, thought that was odd using eval
[23:30:37] olivier__: has joined #ruby
[23:32:02] Jameser: has joined #ruby
[23:34:21] cagomez: has joined #ruby
[23:35:02] gusrub: has joined #ruby
[23:35:02] mim1k: has joined #ruby
[23:40:06] Jameser: has joined #ruby
[23:41:43] bronson: has joined #ruby
[23:42:19] olivier__: has joined #ruby
[23:42:32] zenspider: elcontrastador: I was looking at the erubis tutorial when I suggested you should use result.
[23:42:35] olivier__: has joined #ruby
[23:42:36] rundor: has joined #ruby
[23:43:21] elcontrastador: interesting...ok. will do. I think i got that from the erubis readme on github. Thanks for suggestion.
[23:44:54] alveric1: has joined #ruby
[23:48:21] eckhardt: has joined #ruby
[23:52:12] __Yiota: has joined #ruby
[23:53:54] Jameser: has joined #ruby
[23:54:12] phinxy: has joined #ruby
[23:55:48] olivier__: has joined #ruby
[23:56:33] olivier__: has joined #ruby