« Back to channel list

#ruby - 13 August 2017

« Back 1 day Forward 1 day »
[00:00:34] jrabe: has joined #ruby
[00:01:57] knight33: has joined #ruby
[00:05:48] joenas[m]: has joined #ruby
[00:05:48] Giphy[m]: has joined #ruby
[00:05:48] jonjits[m]: has joined #ruby
[00:05:49] M107262[m]: has joined #ruby
[00:05:49] aidalgol: has joined #ruby
[00:05:49] aviraldg: has joined #ruby
[00:05:49] yana[m]: has joined #ruby
[00:05:49] turt2live: has joined #ruby
[00:05:49] lasenna[m]: has joined #ruby
[00:05:49] heftig: has joined #ruby
[00:05:49] dman[m]: has joined #ruby
[00:05:49] torarne: has joined #ruby
[00:05:50] gokul_mr[m]: has joined #ruby
[00:05:50] KevinMGranger: has joined #ruby
[00:05:56] Matt[m]1: has joined #ruby
[00:05:56] aagdbl[m]: has joined #ruby
[00:05:57] velu_aon[m]: has joined #ruby
[00:07:38] beilabs: has joined #ruby
[00:13:04] beilabs: has joined #ruby
[00:18:12] ramfjord: has joined #ruby
[00:22:03] autumncode: has joined #ruby
[00:23:48] funkytwig: has joined #ruby
[00:25:56] elcontrastador: has joined #ruby
[00:27:36] elcontrastador: I'm struggling with Net::SSH on, I'm sure, a simple problem. Here's a pastie showing the two command script and output vs output with interactive: https://pastebin.com/E6XMqeBf
[00:27:37] ruby[bot]: elcontrastador: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/15f7c8f7dc593d130f1a467a413f1257
[00:27:37] ruby[bot]: elcontrastador: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[00:28:44] elcontrastador: https://gist.github.com/elcontrastador/b32325801969b13ab59289d721acfff5
[00:29:23] dc1: has joined #ruby
[00:29:37] elcontrastador: Any help would be appreciated, i'm under pressure...
[00:30:49] MagePsycho_: has joined #ruby
[00:34:43] sp4rrow: has joined #ruby
[00:35:18] sp4rrow_: has joined #ruby
[00:40:08] HTTP_____GK1wmSU: has joined #ruby
[00:43:56] bladdezz: has joined #ruby
[00:46:31] Rodya_: has joined #ruby
[00:47:05] sneakerhax: has joined #ruby
[00:48:09] MrBusiness: has joined #ruby
[00:50:43] m27frogy: has joined #ruby
[00:51:08] jenrzzz: has joined #ruby
[00:51:08] jenrzzz: has joined #ruby
[00:54:56] jphase: has joined #ruby
[00:55:51] baweaver: elcontrastador: https://stackoverflow.com/questions/10327141/using-ruby-gem-net-ssh-to-configure-a-juniper-router
[00:56:13] chouhoulis: has joined #ruby
[00:56:26] baweaver: Thought it might be something like that. Junos doesn't drop you into a straight shell so you need to throw some other stuff through it
[00:56:59] baweaver: https://stackoverflow.com/questions/6806176/ruby-run-linux-commands-one-by-one-by-ssh-and-log-everything/6807178#6807178
[00:57:04] baweaver: Read that for more details
[00:58:00] TomyLobo: has joined #ruby
[00:58:39] ftwig: has joined #ruby
[01:00:11] sp4rrow: has joined #ruby
[01:08:37] mim1k: has joined #ruby
[01:10:42] lupine: has joined #ruby
[01:14:13] noname1: has joined #ruby
[01:15:02] dc1: has joined #ruby
[01:15:14] paradisaeidae: has joined #ruby
[01:15:19] paradisaeidae_: has joined #ruby
[01:15:34] alfiemax: has joined #ruby
[01:18:44] phinxy: has joined #ruby
[01:21:41] gizmore|2: has joined #ruby
[01:22:19] elcontrastador: baweaver: hey, thx man...had to step away (kid issues)...back to try this now
[01:22:57] baweaver: It's either that or some garbage with "expect". Temperamental proprietary tech
[01:26:59] boombox_: has joined #ruby
[01:27:34] charlenopires: has joined #ruby
[01:29:16] Tagami[m]: has joined #ruby
[01:30:31] darix: elcontrastador: depending on your version there might also be an api on the router that you can use
[01:30:39] darix: and there are python libraries for it e.g.
[01:31:59] elcontrastador: yeah...i'll get into NetConf later...that's the way to go. Tonight i have about 100 switches i need to change voice vlans and dhcp option 150's on...this is just a Get this shit done and get back to my voice project kinda night
[01:32:04] elcontrastador: huge weekend cutover
[01:37:44] elcontrastador: Throwing some errors for me...trying to figure it out...deprecation warning for Net::SSH.start and internal to Net::SSH::Telnet, like the library is stale
[01:39:20] wilbert: has joined #ruby
[01:39:49] charlenopires: has joined #ruby
[01:39:53] charlenopires: has left #ruby: ()
[01:40:38] milardovich: has joined #ruby
[01:41:54] armyriad: has joined #ruby
[01:44:26] Tempesta: has joined #ruby
[01:44:26] Tempesta: has joined #ruby
[01:49:06] aidalgol: has joined #ruby
[01:49:06] Giphy[m]: has joined #ruby
[01:49:06] aviraldg: has joined #ruby
[01:49:07] joenas[m]: has joined #ruby
[01:49:07] M107262[m]: has joined #ruby
[01:49:07] yana[m]: has joined #ruby
[01:49:07] jonjits[m]: has joined #ruby
[01:49:07] torarne: has joined #ruby
[01:49:07] lasenna[m]: has joined #ruby
[01:49:07] KevinMGranger: has joined #ruby
[01:49:07] heftig: has joined #ruby
[01:49:08] gokul_mr[m]: has joined #ruby
[01:49:08] dman[m]: has joined #ruby
[01:49:08] turt2live: has joined #ruby
[01:49:14] velu_aon[m]: has joined #ruby
[01:49:14] Matt[m]1: has joined #ruby
[01:49:14] aagdbl[m]: has joined #ruby
[01:49:47] boombox_: has joined #ruby
[01:50:13] sp4rrow: has joined #ruby
[01:50:40] elcontrastador: I get this Net::ReadTimeout error on every option... notice how falling back to Net::SSH exec! comand works but will not let me switch to edit mode... https://gist.github.com/elcontrastador/c4bcaea6c1db23c30060a2fc96a474a6
[01:51:57] elcontrastador: https://gist.github.com/elcontrastador/bbe4f04b980d819252a0f2700ab7b803
[01:52:21] jenrzzz: has joined #ruby
[01:52:21] jenrzzz: has joined #ruby
[01:52:21] boombox_: has joined #ruby
[01:53:30] Bhootrk_: has joined #ruby
[01:53:57] milardovich: has joined #ruby
[01:55:11] boombox_: has joined #ruby
[02:00:41] milardovich: has joined #ruby
[02:02:20] baweaver: elcontrastador: what version of ruby do you have?
[02:02:30] baweaver: and have you tried require 'net/timeout' ?
[02:02:46] baweaver: Ruby 1.9.x and below don't have it.
[02:03:09] digitalnomad: has joined #ruby
[02:03:11] alfiemax: has joined #ruby
[02:03:33] baweaver: So that should work fine. Looking about
[02:03:47] elcontrastador: i'll try require'ing net/timeout
[02:04:56] elcontrastador: net::telnet works so smoothly and easily
[02:05:39] elcontrastador: i'd have to manually ssh and turn it on to each switch tho...ugh...then turn it off via code...lol
[02:08:06] elcontrastador: `require': cannot load such file -- net/timeout (LoadError)
[02:08:21] elcontrastador: not in stdlib and not a gem
[02:08:56] __Yiota: has joined #ruby
[02:15:50] elcontrastador: this script will literally save me 15hrs work...if i just get past this prob very trivial hurdle...
[02:17:36] alfiemax: has joined #ruby
[02:23:00] jinie_: has joined #ruby
[02:25:26] alfiemax: has joined #ruby
[02:32:40] agent_white: has joined #ruby
[02:32:58] agent_white: Evenin' folks
[02:37:54] sp4rrow: has joined #ruby
[02:38:50] enterprisey: has joined #ruby
[02:40:27] enterprisey: has joined #ruby
[02:40:41] bmurt: has joined #ruby
[02:41:01] paradisaeidae: has joined #ruby
[02:41:07] paradisaeidae_: has joined #ruby
[02:42:52] enterprisey: has joined #ruby
[02:48:29] herbmillerjr: has joined #ruby
[02:48:53] brent__: has joined #ruby
[02:50:18] brent__: has joined #ruby
[02:52:21] goyox86_: has joined #ruby
[02:54:18] jenrzzz: has joined #ruby
[02:54:18] jenrzzz: has joined #ruby
[02:58:50] alfiemax: has joined #ruby
[03:00:09] cadillac_: has joined #ruby
[03:05:24] Azure: has joined #ruby
[03:05:35] mim1k: has joined #ruby
[03:12:18] Silthias: has joined #ruby
[03:18:11] _whitelogger: has joined #ruby
[03:21:04] jenrzzz: has joined #ruby
[03:23:13] joast: has joined #ruby
[03:24:23] Puffball: has joined #ruby
[03:25:32] S1kx: has joined #ruby
[03:33:00] dc1: has joined #ruby
[03:34:41] dymaxion: has joined #ruby
[03:46:11] jenrzzz: has joined #ruby
[03:46:11] jenrzzz: has joined #ruby
[03:54:45] smulverine: has joined #ruby
[03:55:09] herbmillerjr: has joined #ruby
[03:55:55] claw: has joined #ruby
[03:59:02] gix: has joined #ruby
[04:04:26] eml: has joined #ruby
[04:10:21] chouhoulis: has joined #ruby
[04:12:19] digitalnomad: has joined #ruby
[04:27:41] S1kx: has joined #ruby
[04:31:54] Antiarc: has joined #ruby
[04:44:31] millerti: has joined #ruby
[04:51:10] juggler: has joined #ruby
[04:55:31] jphase: has joined #ruby
[04:58:01] dymaxion_: has joined #ruby
[05:02:43] sp4rrow: has joined #ruby
[05:13:34] kies: has joined #ruby
[05:15:24] sp4rrow: has joined #ruby
[05:15:46] opekktar: has joined #ruby
[05:16:03] sp4rrow: has joined #ruby
[05:16:40] Ryzokuken: has joined #ruby
[05:16:51] sp4rrow: has joined #ruby
[05:17:40] sp4rrow: has joined #ruby
[05:18:29] sp4rrow: has joined #ruby
[05:21:10] alfiemax: has joined #ruby
[05:23:58] alfiemax_: has joined #ruby
[05:24:54] dymaxion_: has joined #ruby
[05:27:46] digitalnomad: has joined #ruby
[05:37:38] djbkd: has joined #ruby
[05:40:47] knight33: has joined #ruby
[05:42:08] Dimik: has joined #ruby
[05:45:55] mjolnird: has joined #ruby
[05:48:45] alfiemax: has joined #ruby
[05:56:39] autumncode: has joined #ruby
[05:58:01] beilabs: has joined #ruby
[06:09:05] high_fiver: has joined #ruby
[06:09:43] maryo: has joined #ruby
[06:17:03] dymaxion_: has joined #ruby
[06:20:39] Silthias1: has joined #ruby
[06:40:56] alfiemax: has joined #ruby
[06:47:45] Guest41613: has joined #ruby
[06:48:22] harfangk: has joined #ruby
[06:48:34] nofxxx: has joined #ruby
[06:56:06] jphase: has joined #ruby
[07:08:11] S1kx: has joined #ruby
[07:12:07] maryo: has joined #ruby
[07:13:59] runescape07rsps: has joined #ruby
[07:24:51] sp4rrow: has joined #ruby
[07:27:33] djbkd: has joined #ruby
[07:35:15] charliesome: has joined #ruby
[07:36:56] dennisvennink: has joined #ruby
[07:46:12] InfinityFye: has joined #ruby
[07:46:39] Ryzokuken: has joined #ruby
[07:46:40] mathys: has joined #ruby
[07:46:50] beilabs: has joined #ruby
[07:50:29] beilabs_: has joined #ruby
[07:50:59] conta: has joined #ruby
[07:59:14] NeverTired: has joined #ruby
[07:59:16] alfiemax: has joined #ruby
[07:59:42] dennisvennink: has joined #ruby
[08:01:32] hurricanehrndz: has joined #ruby
[08:02:35] VladGh_: has joined #ruby
[08:04:41] yqt: has joined #ruby
[08:09:28] vuoto: has joined #ruby
[08:10:58] cadillac_: has joined #ruby
[08:11:22] phatypus: has joined #ruby
[08:16:26] ltem: has joined #ruby
[08:18:35] marr: has joined #ruby
[08:18:41] rippa: has joined #ruby
[08:22:45] helpa-bot: has joined #ruby
[08:24:44] helpa: has joined #ruby
[08:29:06] charliesome: has joined #ruby
[08:33:40] biberu: has joined #ruby
[08:56:24] KeyJoo: has joined #ruby
[08:59:04] Guest69369: has joined #ruby
[09:04:36] chmurifree: has joined #ruby
[09:08:50] alfiemax: has joined #ruby
[09:11:26] lxsameer: has joined #ruby
[09:12:14] alfiemax: has joined #ruby
[09:33:13] _whitelogger: has joined #ruby
[09:38:31] charliesome: has joined #ruby
[09:40:08] nowhere_man: has joined #ruby
[09:41:11] naprimer: has joined #ruby
[09:46:33] frozengeek_: has joined #ruby
[09:50:34] InfinityFye: has joined #ruby
[09:53:18] sp4rrow: has joined #ruby
[09:57:48] milardovich: has joined #ruby
[10:10:13] mim1k: has joined #ruby
[10:16:50] Mon_Ouie: has joined #ruby
[10:17:46] DTZUZO: has joined #ruby
[10:18:28] uZiel: has joined #ruby
[10:29:35] vuoto: has joined #ruby
[10:32:12] eml: has left #ruby: ("Closing Window")
[10:36:07] marchi: has joined #ruby
[10:44:01] Mia: has joined #ruby
[10:44:01] Mia: has joined #ruby
[10:47:14] tirej: has joined #ruby
[10:49:24] harfangk: has joined #ruby
[10:59:42] funkycrunchy: has joined #ruby
[11:09:09] harfangk: has joined #ruby
[11:14:24] funkycrunchy: has joined #ruby
[11:20:14] dennisvennink: has joined #ruby
[11:29:27] dennisvennink: has joined #ruby
[11:35:11] jenrzzz: has joined #ruby
[11:41:26] dennisvennink: has joined #ruby
[11:43:46] kapil___: has joined #ruby
[11:47:45] VladGh: has joined #ruby
[11:47:48] ShekharReddy: has joined #ruby
[11:49:14] harfangk: has joined #ruby
[11:49:45] gr33n7007h: has joined #ruby
[11:51:23] nowhere_man: has joined #ruby
[11:55:29] funkycrunchy: has joined #ruby
[12:07:48] Puffball: has joined #ruby
[12:08:07] bruno-: has joined #ruby
[12:10:49] mim1k: has joined #ruby
[12:12:23] quobo: has joined #ruby
[12:24:46] sp4rrow: has joined #ruby
[12:27:30] InfinityFye: has joined #ruby
[12:32:20] Mon_Ouie: has joined #ruby
[12:32:34] uZiel: has joined #ruby
[12:34:10] ledestin: has joined #ruby
[12:43:35] feles: has joined #ruby
[12:44:19] jinie_: has joined #ruby
[12:46:08] milardovich: has joined #ruby
[12:47:51] dlitvak: has joined #ruby
[12:49:46] maryo: has joined #ruby
[12:52:54] milardovich: has joined #ruby
[12:53:36] Morrolan: has joined #ruby
[12:55:04] chouhoulis: has joined #ruby
[12:55:57] __Yiota: has joined #ruby
[13:04:45] FernandoBasso: has joined #ruby
[13:06:56] maryo_: has joined #ruby
[13:08:13] faces: has joined #ruby
[13:10:08] HTTP_____GK1wmSU: has joined #ruby
[13:16:02] oleo: has joined #ruby
[13:23:30] millerti: has joined #ruby
[13:24:31] belmoussaoui_: has joined #ruby
[13:26:24] belmoussaoui_: has joined #ruby
[13:31:06] belmoussaoui_: has joined #ruby
[13:38:28] sepp2k: has joined #ruby
[13:38:30] cagmz: has joined #ruby
[13:43:20] FernandoBasso: has joined #ruby
[13:45:04] __Yiota: has joined #ruby
[13:45:30] FernandoBasso: has joined #ruby
[13:46:10] digitalnomad: has joined #ruby
[13:49:13] dennisvennink: has joined #ruby
[13:56:12] bruno-: has joined #ruby
[13:58:00] dennisvennink: has joined #ruby
[13:59:30] knight33: has joined #ruby
[14:00:46] ocpysh: has joined #ruby
[14:01:36] DLSteve: has joined #ruby
[14:02:53] Jack_Ryan: has joined #ruby
[14:04:46] maryo: has joined #ruby
[14:08:33] govg: has joined #ruby
[14:09:08] phinxy: has joined #ruby
[14:09:25] dennisvennink: has joined #ruby
[14:10:39] Dry_Lips: has joined #ruby
[14:10:40] Dry_Lips: has joined #ruby
[14:11:18] mim1k: has joined #ruby
[14:15:41] dennisvennink: has joined #ruby
[14:16:21] mim1k: has joined #ruby
[14:17:46] klaas: has joined #ruby
[14:18:53] goyox86_: has joined #ruby
[14:31:20] MichaelBurge: has joined #ruby
[14:33:06] konsolebox: has joined #ruby
[14:37:21] roboncloud: is there an open source community for designers... or somewhere where developers & designers can meet to collaborate.
[14:37:52] roboncloud: open source software would be so much better if that happened more often -_-
[14:38:12] jphase: has joined #ruby
[14:39:03] kent\n: has joined #ruby
[14:40:17] goyox86: has joined #ruby
[14:40:59] HTTP_____GK1wmSU: has joined #ruby
[14:41:45] alex`: has joined #ruby
[14:42:28] goyox86_: has joined #ruby
[14:42:58] uZiel: has joined #ruby
[14:47:26] xuanrui: has joined #ruby
[14:51:34] HTTP_____GK1wmSU: has joined #ruby
[14:53:05] nowhere_man: has joined #ruby
[14:53:29] epistrephein: has joined #ruby
[14:53:49] HTTP_____GK1wmSU: has left #ruby: ()
[14:53:51] maryo_: has joined #ruby
[14:54:50] leah2: has joined #ruby
[14:54:52] dennisvennink: has joined #ruby
[14:55:14] knight33: has joined #ruby
[14:55:29] Mon_Ouie: has joined #ruby
[15:02:11] bruno-_: has joined #ruby
[15:04:20] danman: has joined #ruby
[15:06:34] Dump_not: has joined #ruby
[15:12:33] ltem: has joined #ruby
[15:25:47] digitalnomad: has joined #ruby
[15:29:01] rtj: has joined #ruby
[15:29:38] nowayoutofthis1: has joined #ruby
[15:35:34] danman: has joined #ruby
[15:37:18] MWM: has joined #ruby
[15:37:35] MWM: Anyone home?
[15:39:12] MWM: I am tryin to figure out why a script wont work... the error directs to a .mkmf to diagnose the issue, but I am not sure how to read it
[15:39:49] havenwood: MWM: Gist the error and paste us a link to it?
[15:41:01] MWM: nokogiri failed to compile check blah/path/to.mkmf to see why
[15:41:52] alex`: has joined #ruby
[15:43:18] MWM: https://pastebin.com/uYAe2p9r
[15:43:20] ruby[bot]: MWM: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/e35d84d01c60c7d1c2346109590a1b1e
[15:43:21] ruby[bot]: MWM: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[15:43:59] adaedra: The interesting bit here is line 47, "conftest.c:3:18: fatal error: zlib.h: No such file or directory"
[15:44:08] MWM: Sorry 'bout the pastebin, I thought you meant give you the "gist" of the situation an then a pastebin
[15:44:12] adaedra: means you don't have zlib development headers
[15:44:33] adaedra: look for a package named zlib-devel or something similar
[15:45:09] havenwood: MWM: What os/distro? How'd you install Ruby?
[15:47:32] t-recx: has joined #ruby
[15:47:39] MWM: havenwood: Ubuntu. apt-get install ruby-bundler and bundle installl is all I have done so far.
[15:48:21] MWM: I gotta say I am definately poking around in the dark here, I am just trying to get one ruby script running for a 1-offf project.
[15:48:46] havenwood: MWM: sudo apt-get install ruby-dev
[15:48:56] cadillac_: has joined #ruby
[15:49:01] havenwood: MWM: or is it ruby-devel on apt? I can't recall
[15:49:16] havenwood: MWM: sudo apt-get install ruby-full
[15:49:36] havenwood: yeah, ruby-dev or ruby-full
[15:49:39] MWM: apt-cache search shows some sort of zlib package: libghc-zlib-dev - Compression and decompression in the gzip and zlib formats
[15:49:45] jphase: has joined #ruby
[15:50:06] MWM: there is another one that refers to lua and something about pipes streams
[15:50:15] HTTP_____GK1wmSU: has joined #ruby
[15:50:29] matthewd: It's definitely not the ghc one
[15:52:10] havenwood: MWM: how about? zlib1g-dev
[15:52:22] MWM: installed ruby-full and still get the same error. not certain of the mkmf contains the same info though
[15:52:44] havenwood: sudo apt-get install zlib1g-dev
[15:53:38] havenwood: MWM: Gist us the new error if it's still borked.
[15:55:19] MWM: the error file matched with my previous paste and after installing the zlib seems like its going to compile. says it "may take awhile" :D
[15:55:44] jokke: i'm trying to pipe the output of one command to another command
[15:55:44] MWM: gem installed! Thanks guys :D
[15:56:33] jokke: so i do IO.popen(['first', 'cmd']) { |first| IO.popen(['second', 'cmd'], 'w+') { |second| IO.copy_stream(first, second) } }
[15:56:54] jokke: but this raises 'IOError: not opened for writing'
[15:57:25] jokke: i tried writing to second with second.puts 'foo' and that works
[15:57:41] jokke: any ideas?
[15:57:48] sp4rrow: has joined #ruby
[16:03:57] konsolebox: jokke: you might have forgotten 'w+'. aslo, it's 'w' that's works for me.
[16:05:05] jokke: konsolebox: awesome! it works with w
[16:05:50] high_fiver: has joined #ruby
[16:08:16] high_fiver_: has joined #ruby
[16:08:28] govg: has joined #ruby
[16:15:25] gr33n7007h: jokke: there is also Open3.pipeline_rw :)
[16:19:45] sonOfRa: has joined #ruby
[16:20:33] alfiemax: has joined #ruby
[16:22:46] dlitvak: has joined #ruby
[16:36:28] funkycrunchy: has joined #ruby
[16:41:45] weems|laptop: has joined #ruby
[16:42:21] maryo: has joined #ruby
[16:49:47] jinie_: has joined #ruby
[16:53:32] fghjb3567: has joined #ruby
[16:53:36] ledestin: has joined #ruby
[16:58:41] sp4rrow: has joined #ruby
[17:00:18] bruno-: has joined #ruby
[17:01:41] yqt: has joined #ruby
[17:02:58] pavelz: has joined #ruby
[17:04:05] pavelz: should i use ctags ir rtags to get tags from my project
[17:04:28] nobitanobi: has joined #ruby
[17:05:15] bruno-: has joined #ruby
[17:06:17] xuanrui: has joined #ruby
[17:08:36] chouhoulis: has joined #ruby
[17:10:19] bruno-: has joined #ruby
[17:11:56] beilabs: has joined #ruby
[17:13:11] konsolebox: pavelz: what tags?
[17:15:20] bruno-: has joined #ruby
[17:15:58] cdg: has joined #ruby
[17:16:58] kn-928: has joined #ruby
[17:17:55] cdg: has joined #ruby
[17:18:11] Mon_Ouie: has joined #ruby
[17:28:05] bruno-: has joined #ruby
[17:30:43] opekktar: has joined #ruby
[17:31:48] Nutzer: has joined #ruby
[17:33:07] bruno-: has joined #ruby
[17:36:04] goyox86_: has joined #ruby
[17:36:19] chouhoulis: has joined #ruby
[17:38:10] bruno-: has joined #ruby
[17:38:47] Rodya_: has joined #ruby
[17:46:45] dviola: has joined #ruby
[17:50:44] bruno-: has joined #ruby
[17:52:01] kapil___: has joined #ruby
[17:52:54] phinxy: has joined #ruby
[17:54:03] Dimik: has joined #ruby
[17:54:55] phinxy: has joined #ruby
[17:55:32] pavelz: ctags seems to work ok
[17:55:37] kkiero: has joined #ruby
[17:55:42] bruno-: has joined #ruby
[17:56:15] pavelz: the kind that index your code so you can zoom right to definion righth awat
[17:56:55] Azure: has joined #ruby
[17:59:30] digitalnomad: has joined #ruby
[17:59:35] sp4rrow: has joined #ruby
[18:02:44] GodFather: has joined #ruby
[18:09:07] jinie_: has joined #ruby
[18:14:24] dennisvennink: has joined #ruby
[18:18:01] Rodya_: has joined #ruby
[18:19:15] phinxy: has joined #ruby
[18:19:38] Hanmac: has joined #ruby
[18:20:16] ruby-lang393: has joined #ruby
[18:22:21] phinxy: has joined #ruby
[18:24:00] ruby-lang826: has joined #ruby
[18:25:27] danman_: has joined #ruby
[18:26:00] mikecmpbll: has joined #ruby
[18:26:16] Rodya_: has joined #ruby
[18:26:39] shwouchk: has joined #ruby
[18:27:50] Xiti: has joined #ruby
[18:27:55] jinie_: has joined #ruby
[18:30:32] marr: has joined #ruby
[18:31:12] bruno-: has joined #ruby
[18:31:16] psychicist__: has joined #ruby
[18:32:50] danman_: has joined #ruby
[18:33:58] jinie_: has joined #ruby
[18:37:26] Rodya_: has joined #ruby
[18:37:42] username1: has joined #ruby
[18:39:10] weems|laptop: has joined #ruby
[18:42:05] jackjackdripper: has joined #ruby
[18:43:11] Moosashi: has joined #ruby
[18:45:40] Mia: has joined #ruby
[18:45:40] Mia: has joined #ruby
[18:53:35] harfangk: has joined #ruby
[18:58:51] Henry151: has joined #ruby
[18:59:31] Henry151: heya #ruby. First time in here! :) I've heard that ruby is amazing, but I've never really played with it at all. However I just downloaded it and installed my first gem, to run wayback_machine_downloader
[18:59:45] _sfiguser: has joined #ruby
[19:00:39] Henry151: however, when I run http://termbin.com/gq94 instead of downloading http://web.archive.org/web/20030215163744/http://www.rompfamily.com/page2.html it downloads a blank page -- I'd love some help figuring this out, even though it may not be a ruby problem; I came here only because the wayback_machine_downloader is written in ruby and thought you guys might be best able to help
[19:00:45] sp4rrow: has joined #ruby
[19:02:57] Papierkorb: Henry151: Welcome! That issue looks more specific to that program than ruby. Have you tried contacting its maintainers and/or community?
[19:03:32] milardovich: has joined #ruby
[19:03:59] Henry151: Papierkorb: Thanks for the welcome! I haven't been able to find much community for it, but I haven't yet reached out to the maintainers; I think it is likely more user error than "bug report" material (though I could be wrong!). The program is seen here https://github.com/hartator/wayback-machine-downloader
[19:05:49] Henry151: I certainly acknowledge that it's not exactly a ruby question. I did also ask in ##linux where I often find help; though I realize it's not really a linux problem either, even though I happen to be encountering it while using linux... So I get it, but if you or anybody can help me figure it out anyway, I'd sure appreciate the assistance. If I can't find any help, I will eventually move on to filing a bug
[19:05:55] Henry151: report and waiting for a response from the creator of the project.
[19:06:24] nowhere_man: has joined #ruby
[19:09:14] Papierkorb: Henry151: Yup, I'd open a github issue, or try contacting (one of) the main contributors. What you're facing is a end-user problem for a very specific program. Though that github project looks healthy, you should be able to get hold of someone
[19:09:55] watersoul: has joined #ruby
[19:10:45] Papierkorb: Henry151: The wayback community may also be able to help, and they should have a community - Though I don't know, never did anything with it
[19:11:39] Henry151: Papierkorb: thanks anyway :) I will look in those directions.
[19:16:02] nowhere_man: has joined #ruby
[19:23:44] high_fiver_: has joined #ruby
[19:26:42] opekktar: has joined #ruby
[19:26:54] boombox_: has joined #ruby
[19:27:49] Moosashi: has joined #ruby
[19:28:18] marchi: has joined #ruby
[19:30:34] lexruee: has joined #ruby
[19:35:06] cdg: has joined #ruby
[19:39:30] gusrub: has joined #ruby
[19:47:40] nobitanobi: has joined #ruby
[19:50:41] kies: has joined #ruby
[19:52:17] digitalnomad: has joined #ruby
[19:57:17] elcontrastador: has joined #ruby
[19:59:03] qwagawaga: has joined #ruby
[19:59:41] qwagawaga: Hi Everyone, I'm starting to learn ruby, and I can't figure out what does `:@foo` do. Could anyone please explain me?
[20:00:00] alamar: has joined #ruby
[20:00:18] adaedra: Do you know what :foo is?
[20:00:26] qwagawaga: a symbol, yes.
[20:00:36] adaedra: :@foo is, too.
[20:00:50] adaedra: The @ is part of the symbol.
[20:01:05] qwagawaga: so :@foo has nothing to do with :foo?
[20:01:12] qwagawaga: sorry, with @foo
[20:01:27] adaedra: it's just a symbol
[20:02:52] sp4rrow: has joined #ruby
[20:04:03] adaedra: You can use this symbol with instance_variable_get / _set to reference @foo, however
[20:10:33] Moosashi: has joined #ruby
[20:10:46] Murda: has joined #ruby
[20:11:27] Fridtjof: has joined #ruby
[20:13:44] qwagawaga: adaedra: could you ellaborate please? I did not understand
[20:14:00] ahrs: has joined #ruby
[20:14:05] skweek: has joined #ruby
[20:14:15] adaedra: `instance_variable_get :@foo` would get you the value of @foo in the current context
[20:14:30] dennisvennink: has joined #ruby
[20:17:21] roboncloud: has left #ruby: ()
[20:19:03] enterprisey: has joined #ruby
[20:20:41] qwagawaga: adaedra: how is ``instance_variable_get :@foo` different from writing @foo? why do both exist?
[20:20:46] opekktar: has joined #ruby
[20:21:03] adaedra: one is dynamic
[20:22:18] adaedra: instance_variable_get is a method, so you can pass it what you want, including a variable
[20:25:29] adaedra: but that's not used so often, just ignore it for now
[20:25:59] JP2017ggg: has joined #ruby
[20:26:38] JP2017ggg: Heyloo. Can anyone help me with an issue around multi-level arrays?
[20:27:03] username: has joined #ruby
[20:27:26] adaedra: Just state your problem
[20:27:58] ur5us: has joined #ruby
[20:29:04] apeiros: qwagawaga: @foo and :@foo do have something to do with each other, though. ruby uses :@foo internally to represent the human readable name of @foo
[20:29:17] jenrzzz: has joined #ruby
[20:29:42] JP2017ggg: E.g. array = [[],[]] array[0].push([data]) results in every position in the subarray of array[0] being overwritten. How can I get around this? At minimum I need an array with arrays e.g. [[res11,res12],[res21,res22]] What happens is res[[res21,res22],[res21,res22]]
[20:29:51] apeiros: same for all other things with human readable names. if you have a local variable `bar`, a Symbol :bar will start to exist. same for a global $baz, will make :$baz to start existing
[20:31:12] apeiros: JP2017ggg: you probably don't have `array = [[], []]` but instead `subarray = []; array = [subarray, subarray]`
[20:31:30] apeiros: i.e. you don't have different subarrays, but the same array in multiple positions as subarray
[20:31:59] apeiros: but that's just an educated guess. please show us a reproducible example case. paste it on gist.github.com
[20:33:42] JP2017ggg: https://gist.github.com/anonymous/1b20b0e7a2e84608c5b7746dfd7b6ebd
[20:34:22] apeiros: if you give the gist a filename ending in .rb, you get syntax highlighting ;-)
[20:34:35] JP2017ggg: Sorry, that's wrong snippet
[20:34:39] JP2017ggg: two seconds.
[20:35:19] JP2017ggg: It's part of an enormous process, will have to unravel a good example
[20:36:15] Phate: has joined #ruby
[20:37:38] kn-928: has joined #ruby
[20:38:46] konsolebox: apeiros: a local variable is also presented internally with a symbol?
[20:39:14] apeiros: as said, everything with a human readable name
[20:39:49] konsolebox: i just kind of doubt it
[20:39:51] apeiros: symbols are rubys internal naming system exposed as a runtime accessible construct
[20:40:07] konsolebox: i know symbols, but i just local variables are also presented with such
[20:40:08] apeiros: that's why they exist at all :)
[20:40:11] konsolebox: *i just doubt
[20:40:16] psychicist__: has joined #ruby
[20:40:23] matthewd: konsolebox: How do you think it works then?
[20:40:25] apeiros: they are not presented, they're identified
[20:40:52] apeiros: I haven't read that much of the source, but I certainly hope that internal access in execution doesn't happen by name
[20:40:52] konsolebox: i know how instance variables, classes, etc. are identified with and ID. but i doubt it's true for local variables
[20:41:21] adaedra: >> foo = 1; binding.local_variables
[20:41:22] ruby[bot]: adaedra: # => [:foo] (https://eval.in/844951)
[20:41:32] apeiros: I'd expect it to be used with things like eval, though
[20:42:11] tacotime: has joined #ruby
[20:42:27] konsolebox: i thought i what read somewhere that describes local variables to be "opaque"
[20:42:33] apeiros: you can use Symbol.all_symbols. be careful though, the interpreter might read ahead :)
[20:42:35] matthewd: I'll grant that "identified with" is a stretch... but they're definitely linked
[20:42:43] konsolebox: *i thought i read
[20:43:52] jenrzzz: has joined #ruby
[20:43:52] jenrzzz: has joined #ruby
[20:44:46] konsolebox: matthewd: yeah maybe that
[20:45:40] JP2017ggg: ah can't believe it, just found a solution, but it's not nice programming (imo)
[20:45:43] high_fiver_: has joined #ruby
[20:46:13] kn-928: has joined #ruby
[20:46:24] JP2017ggg: if I define the subarray within the loop level where it is used to plonk data on end of the perpetual results array, it *then* stops being overwritten in every position
[20:46:30] digitalnomad: has joined #ruby
[20:46:49] gusrub: has joined #ruby
[20:49:01] sneakerhax: has joined #ruby
[20:52:35] high_fiver: has joined #ruby
[20:56:51] Moosashi: has joined #ruby
[20:57:42] herwin: has joined #ruby
[20:58:24] jaequery: has joined #ruby
[20:58:26] yottanami1: has joined #ruby
[20:58:47] yottanami1: I am trying to bundle install but I got this error http://dpaste.com/3R7SYC1
[20:58:51] yottanami1: How should I fix it?
[20:59:10] marchi: has left #ruby: ()
[20:59:57] Moosashi_: has joined #ruby
[21:01:11] yottanami1: lxsameer, ping
[21:01:21] apeiros: yottanami_: use a non-EOL ruby version
[21:01:33] apeiros: and if you insist on using an EOL ruby version, at least use the last patch release
[21:02:19] konsolebox: also, do you really have to use a non-system version? (looks at local)
[21:02:45] marchi: has joined #ruby
[21:04:45] marchi: has joined #ruby
[21:05:02] konsolebox: since when has 2.1 EOL'd? (i'm glad it already did.)
[21:06:23] DLSteve: ACTION looks at his Python 2.7.13 with 3 more years till EoL :(
[21:10:10] Henry151: has joined #ruby
[21:10:19] apeiros: konsolebox: I think when 2.4 was released
[21:11:17] yottanami1: apeiros, I also tried to install 2.0.0-p648 but I got `Segmentation fault (core dumped)`
[21:11:32] yottanami1: I have to use 2.0
[21:12:05] apeiros: hm, well, segmentation faults are as far as I see it necessarily bugs in ruby itself or one of the linked libraries. since 2.0 is EOL, you're probably out of luck for getting a fix.
[21:12:26] apeiros: though… I think there's some 3rd parties which maintain patches for EOLd rubies. don't know names or urls, though :-/
[21:15:10] yottanami1: apeiros, It was working but after updating my OS ot happens
[21:15:50] lxsameer: yottanami_: pong
[21:18:22] nikivi: has joined #ruby
[21:21:38] jackjackdripper: has joined #ruby
[21:22:34] Moosashi_: has joined #ruby
[21:24:34] ramfjord: has joined #ruby
[21:26:19] kn-928: has joined #ruby
[21:29:41] kn-928: has joined #ruby
[21:36:07] kn-928: has joined #ruby
[21:43:38] moei: has joined #ruby
[21:46:17] charliesome: has joined #ruby
[21:46:28] knight33: has joined #ruby
[21:50:39] mtkd: has joined #ruby
[21:51:45] qwagawaga: has joined #ruby
[21:52:09] konsolebox: has joined #ruby
[21:52:10] qwagawaga: Could someone please help me understand what does the following line do and what is the order of execution in it:
[21:52:12] qwagawaga: block or return enum_for(__method__) { size }
[21:52:28] patr0clus: has joined #ruby
[21:52:52] apeiros: ew, people really use `cond or return`?
[21:53:06] patr0clus: has joined #ruby
[21:53:09] apeiros: qwagawaga: if no block is given, it'll return an Enumerator. see Object#enum_for
[21:53:14] qwagawaga: this is taken from csv.rb of ruby github repo
[21:53:38] nobitanobi: has joined #ruby
[21:53:46] digitalnomad: has joined #ruby
[21:54:14] qwagawaga: apeiros: could you explain me what is the order of operations here?
[21:54:42] apeiros: `a or b` executes a first, if it's non-nil/false, execution stops and the expression evaluates to a
[21:54:53] apeiros: otherwise b is executed and the expression evaluates to b
[21:55:05] apeiros: b here is `return enum_for(__method__) { size }`
[21:55:22] apeiros: do you need the order of execution of that part too?
[21:56:31] qwagawaga: I guess it is return (((enum_for(__method__))(size)). Am I right?
[21:56:44] apeiros: blocks are not evaluated, no
[21:56:51] apeiros: they're passed as-is to the method
[21:57:07] apeiros: and evaluated on demand by the method (possibly never)
[21:57:43] apeiros: other than that, yes.
[21:57:44] qwagawaga: { size} is a block?
[21:58:05] qwagawaga: is enum_for(__method__) { size } two function calls or one with two arguments?
[21:58:41] qwagawaga: is enum_for(__method__) { size } making two function calls or one with two arguments?
[21:59:06] apeiros: __method__ is the first method call
[21:59:20] apeiros: the result of which is passed to the method enum_for as argument, along with the special block arg.
[21:59:33] apeiros: so it's two method calls. the block itself is not called. it is passed as is.
[21:59:58] apeiros: try it yourself: `def foo; end; foo do puts "hi" end`
[22:00:04] qwagawaga: isn't __method__ a local variable? you say it's a function call
[22:00:05] apeiros: this will not print anything since the method does not invoke the block.
[22:00:19] apeiros: s/function/method/
[22:00:26] apeiros: I asked ruby. I thought it might be syntax.
[22:00:36] apeiros: >> defined? __method__
[22:00:37] ruby[bot]: apeiros: # => "method" (https://eval.in/844975)
[22:00:49] milardovich: has joined #ruby
[22:01:03] ramfjord: has joined #ruby
[22:01:13] qwagawaga: why does `def foo; end; foo do puts "hi" end` execute in the first place? shouldn't it fail as foo takes 0 arguments?
[22:01:16] apeiros: though it might still be syntax and `defined?` just doesn't distinguish.
[22:01:38] apeiros: as said, blocks are special arguments. you don't have to name them.
[22:01:53] apeiros: and if you do name them, it's with a & in front: `def foo(&block); …; end`
[22:02:10] qwagawaga: if I don't name them, they can't be invoked?
[22:02:23] apeiros: they can. by using the keyword `yield`
[22:02:27] elomatreb: You can give a block to any method, butyou can also call methods that would take one without it, they will only fail once they try to execute it
[22:02:31] apeiros: and you can test whether one was provided using `block_given?`
[22:03:13] matthewd: >> def foo; 123.send :__method__; end; foo
[22:03:18] ruby[bot]: matthewd: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[22:03:21] apeiros: if you use &block, you can invoke it using block.call(), and test for presence by testing block for not being nil
[22:03:42] elomatreb: >> def test(do_yield); yield if do_yield; end; test(false) { puts "asdf"; }; test(true)
[22:03:43] ruby[bot]: elomatreb: # => no block given (yield) (LocalJumpError) ...check link for more (https://eval.in/844983)
[22:03:49] qwagawaga: apeiros: thanks for clarifications! You're helping a lot
[22:04:02] gusrub: has joined #ruby
[22:04:59] qwagawaga: elomatreb: thank you for your example.
[22:05:33] qwagawaga: Is there any place where syntax and evaluation order of ruby is specified? a more recent version of http://docs.huihoo.com/ruby/ruby-man-1.4/yacc.html for example
[22:05:56] qwagawaga: the yacc code in ruby uses multiple hacks with mutable state that are tricky to follow
[22:06:27] matthewd: I imagine that's still fairly accurate, if missing newer features
[22:07:24] apeiros: funny, I use ruby for over a decade now and still don't know the order of a couple of things. e.g. arguments passed to methods. I'd just assume LTR.
[22:07:28] chouhoulis: has joined #ruby
[22:08:04] qwagawaga: matthewd: I've been following it originally, but unfortunatelly it misses a lot. It does not have symbols, does not have ternary operator. Those so far were the most tricky to me, as they are ambigous
[22:08:08] tacotime: has joined #ruby
[22:08:35] qwagawaga: It also does not have HereDocs, which are ambigous with left shift.
[22:08:52] elomatreb: >> def test(*args); args; end; a = 0; test(a += 1, a += 1)
[22:08:53] ruby[bot]: elomatreb: # => [1, 2] (https://eval.in/844987)
[22:09:06] qwagawaga: Either it didn't exist back then or the grammar conviniently didn't cover tricky cases
[22:09:19] elomatreb: The sqiggly ones were new in 2.3 IIRC
[22:09:43] matthewd: Those are precisely the things that make it too complex to present (or implement) as BNF, though ¯\_(ツ)_/¯
[22:10:26] qwagawaga: yup :-), but is there any other presentation then yacc code?
[22:10:34] matthewd: There's https://ruby-doc.org/core/doc/syntax_rdoc.html & friends -- there's an operator precedence table there
[22:11:15] qwagawaga: matthewd: it also does not cover symbols or herdocs...
[22:11:20] matthewd: If there were a legible precise full description of the language, surely that'd be used to derive the parser
[22:11:42] apeiros: the iso spec probably contains it
[22:11:50] apeiros: but the iso spec is for 1.8.6 iirc and costs money
[22:11:59] matthewd: They're both covered under literals
[22:12:01] apeiros: though the draft is freely available
[22:12:30] qwagawaga: spec for free: https://www.ipa.go.jp/files/000011432.pdf
[22:12:45] qwagawaga: apeiros: thanks for telling it exists.
[22:13:32] matthewd: At a certain point, though, unless you're writing a parser (don't write a parser), I'd say it boils down to some combination of 1) experiment in irb, and 2) don't nest things that are particularly ambiguous
[22:13:57] apeiros: I'd not use irb. not that you happen to run into one of its quirks.
[22:14:04] qwagawaga: matthewd: I am writing a parser, indeed. I actually already wrote one and now I'm debugging inconsitencies
[22:14:13] apeiros: they're very rare, but if you test for such things, you might just run into one :)
[22:14:23] matthewd: Wait, you're writing a ruby parser?
[22:14:24] alfiemax: has joined #ruby
[22:14:36] qwagawaga: apeiros: thanks for saying this, I didn't know
[22:15:22] apeiros: qwagawaga: might want to talk to whitequark
[22:15:27] matthewd: And you just learned how block parameters work?
[22:15:30] apeiros: he's even online
[22:16:05] qwagawaga: matthewd: yes. I'm going to be working a ruby company soon, and I have background in compilers. I didn't like error messages that I saw from ruby, so I've started implementing my own parser.
[22:16:10] apeiros: and from what he told me and wrote on twitter, you may want to stop :D
[22:16:23] apeiros: ruby is terrible with consistency of syntax across versions
[22:16:41] apeiros: according to whitequark, they've changes to the syntax even in patch-level releases
[22:17:07] qwagawaga: yes, I've already learned it. Though I don't like this situation, one way to improve it is to make a better parser
[22:17:47] qwagawaga: https://twitter.com/whitequark ?
[22:18:35] Yacker: has joined #ruby
[22:18:58] qwagawaga: is this the right person?
[22:20:10] qwagawaga: The current state is: I took the biggest file in ruby distribution (markdown.rb). On it my parser is consistent with ruby parser, is ~10 times faster and the new design can provide nice error messages.
[22:20:41] elomatreb: That's the right whitequark, yes
[22:20:53] qwagawaga: But yes, this file does not use some of the features of ruby language, so I'm going through all other ruby files to find where I'm inconsistent
[22:21:04] apeiros: qwagawaga: yupp. they're on irc as whitequark as well.
[22:21:11] qwagawaga: so far, I'm having a lot of head-ache with operator precedence
[22:21:39] apeiros: qwagawaga: https://github.com/whitequark/parser relevant
[22:21:47] matthewd: Operator precedence should be the easy part: that, you should be able to copy straight from yacc
[22:25:12] qwagawaga: matthewd: not really. As I intentionally try to work without global mode bits that alter behavior.
[22:25:25] qwagawaga: matthewd: here is an example that was hard to get right
[22:25:26] qwagawaga: (header_or_index.is_a?(Integer) || header_or_index.is_a?(Range)) ? :[] : :assoc
[22:25:38] matthewd: How is that relevant to operator precedence?
[22:25:55] qwagawaga: because you have to decide which : is part of the ternary
[22:26:18] qwagawaga: normally this would be easy as you'll treat : as an unary operator, but that's not how its done
[22:28:35] boombox_: has joined #ruby
[22:28:52] matthewd: I'm pretty sure the only thing you need global state for is heredocs
[22:30:30] qwagawaga: ruby parsser has 13 bits that alter it's behavior
[22:30:40] qwagawaga: it frequently checks multiple at once
[22:30:53] qwagawaga: EXPR_BEG_bit, /* ignore newline, +/- is a sign. EXPR_END_bit, /* newline significant, +/- is an operator. EXPR_ENDARG_bit, /* ditto, and unbound braces. EXPR_ENDFN_bit, /* ditto, and unbound braces. EXPR_ARG_bit, /* newline significant, +/- is an operator. EXPR_CMDARG_bit, /* newline significant, +/- is an operator. EXPR_MID_bit,
[22:31:03] matthewd: https://github.com/matthewd/adelaide/blob/master/adelaide.kpeg -- horribly outdated now (only handled 1.8 syntax), and I haven't touched it in ages, but it definitely worked
[22:31:28] qwagawaga: https://gist.github.com/anonymous/ee655ecc2faa50a5d72abd6f7442bc92
[22:31:38] qwagawaga: here are those bits
[22:32:08] jenrzzz: has joined #ruby
[22:32:08] jenrzzz: has joined #ruby
[22:33:25] matthewd: IIRC most of those are about where the lexer/parser split sits
[22:35:22] Henry151: has joined #ruby
[22:50:27] jphase: has joined #ruby
[22:56:28] digitalnomad: has joined #ruby
[22:58:34] jaequery: has joined #ruby
[23:00:30] Moosashi: has joined #ruby
[23:03:31] laphoraig75: has joined #ruby
[23:04:39] hightower2: has joined #ruby
[23:14:09] m27frogy: has joined #ruby
[23:16:24] sp4rrow: has joined #ruby
[23:26:03] jenrzzz: has joined #ruby
[23:26:21] alfiemax: has joined #ruby
[23:29:03] goyox86_: has joined #ruby
[23:30:16] tohuw: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[23:38:52] laphoraig75: has joined #ruby
[23:39:27] enterprisey: has joined #ruby
[23:44:05] ramfjord: has joined #ruby
[23:47:49] jaequery: has joined #ruby
[23:49:45] m27frogy: has joined #ruby
[23:52:34] anuxivm: has joined #ruby
[23:54:28] kev1n: has joined #ruby
[23:57:18] kev1n: has joined #ruby
[23:59:08] kev1n: has joined #ruby