« Back to channel list

#ruby - 23 October 2015

« Back 1 day Forward 1 day »
[00:00:44] Oatmeal: has joined #ruby
[00:02:11] jas02: has joined #ruby
[00:02:26] Oatmeal: has joined #ruby
[00:02:37] Fredrich010: has joined #ruby
[00:03:11] chipotle: has joined #ruby
[00:03:44] BraddPitt: is there any documentation that shows all parameters you can specify in a .gemspec file for adding a dependency on a gem?
[00:05:52] devoldmx: has joined #ruby
[00:06:02] sharkman: has joined #ruby
[00:06:14] cooperlebrun: has joined #ruby
[00:06:40] jhass: BraddPitt: http://www.rubydoc.info/gems/rubygems-update/Gem/Specification
[00:09:18] devoldmx: has joined #ruby
[00:09:43] BraddPitt: still doesn't show what requirements can be passed
[00:09:47] BraddPitt: Adds a runtime dependency named gem with requirements to this gem.
[00:11:09] jhass: oh you're looking for http://guides.rubygems.org/patterns/ ?
[00:11:17] cooperlebrun: has joined #ruby
[00:11:39] solocshaw: has joined #ruby
[00:12:02] tubuliferous_: has joined #ruby
[00:12:21] jhass: well doesn't list it explicitly either, but it's just > x, >= x, < x, <= x, ~> x, x
[00:13:57] BraddPitt: ah, so i can't pass like no-rdoc or anything?
[00:16:17] adaedra: no-rdoc is a global gem setting set by the person installing the gem(s)
[00:16:22] pwnd_nsfw: has joined #ruby
[00:16:49] Ox0dea: That is, you can use it locally for a single installation as well.
[00:17:20] beauby: has joined #ruby
[00:18:14] adaedra: yes, but it's not set by the gem itself
[00:18:18] jgt2: has joined #ruby
[00:18:34] EminenceHC: has joined #ruby
[00:24:13] ngscheur1: has joined #ruby
[00:26:09] skweek: has joined #ruby
[00:27:41] pontiki: has joined #ruby
[00:27:59] tmtwd: has joined #ruby
[00:31:20] ngscheurich: has joined #ruby
[00:31:22] bricker: has joined #ruby
[00:33:47] aryaching: has joined #ruby
[00:33:50] fastAndSlow: has joined #ruby
[00:34:01] decaff: has joined #ruby
[00:34:58] jenrzzz: has joined #ruby
[00:36:17] weemsledeux: has joined #ruby
[00:36:36] mary5030: has joined #ruby
[00:37:37] baroquebobcat_: has joined #ruby
[00:37:48] CloCkWeRX: has joined #ruby
[00:38:10] aryaching_: has joined #ruby
[00:38:41] devoldmx_: has joined #ruby
[00:41:48] duderonomy: has joined #ruby
[00:42:13] jackjackdripper1: has joined #ruby
[00:42:44] aryaching: has joined #ruby
[00:44:10] baweaver: Ox0dea: I think you speak that language ^
[00:44:29] saddad: has joined #ruby
[00:45:01] Ox0dea: I believe that fellow is poking fun at Perl.
[00:45:37] baweaver: tmtwd: $0 ?
[00:45:44] baweaver: my perlspeak is bad
[00:45:55] BraddPitt: or his cat is walking on his keyboard
[00:46:45] Ox0dea: The locality checks out.
[00:46:47] cooperlebrun: has joined #ruby
[00:51:23] _djbkd: has joined #ruby
[00:53:36] mag42c: has joined #ruby
[00:53:51] spuk: has joined #ruby
[00:56:34] jas02: has joined #ruby
[00:57:47] tjbiddle: has joined #ruby
[00:59:23] ruby-lang030: has joined #ruby
[00:59:58] devoldmx: has joined #ruby
[01:01:12] devoldmx_: has joined #ruby
[01:02:14] htmldrum: has joined #ruby
[01:03:07] Fredrich010: has joined #ruby
[01:04:04] mary5030: has joined #ruby
[01:05:08] araujo_: has joined #ruby
[01:05:25] tkuchiki: has joined #ruby
[01:06:16] mary5030: has joined #ruby
[01:08:10] atomical: has joined #ruby
[01:08:30] BadQuanta: has joined #ruby
[01:08:49] nettoweb: has joined #ruby
[01:09:47] d34th4ck3r: has joined #ruby
[01:09:50] phutchins: has joined #ruby
[01:09:52] TheRokh: has joined #ruby
[01:11:08] TheRokh: has joined #ruby
[01:12:26] TheRokh: has joined #ruby
[01:15:13] yfeldblum: has joined #ruby
[01:15:38] wldcordeiro: has joined #ruby
[01:15:40] Ox0dea: has joined #ruby
[01:16:41] snath: has joined #ruby
[01:19:01] swgillespie: has joined #ruby
[01:19:01] dopie: has joined #ruby
[01:20:43] devoldmx: has joined #ruby
[01:20:45] unreal: has joined #ruby
[01:21:52] asad_: has joined #ruby
[01:22:11] snath: has left #ruby: ("Leaving")
[01:23:01] asad_: Where are local variables stored at the top level?
[01:27:27] tw1sted: has joined #ruby
[01:28:07] RobertBirnie: has joined #ruby
[01:28:12] leafybasil: has joined #ruby
[01:32:29] tjbiddle: has joined #ruby
[01:34:47] stardiviner: has joined #ruby
[01:36:10] haylon: has joined #ruby
[01:36:27] haylon: Where should I go to get help with rbenv?
[01:40:14] tjbiddle: has joined #ruby
[01:42:15] mary5030: has joined #ruby
[01:43:49] haylon: Well, so far I "installed" rbenv in /usr/local/bin, and "installed" the plugin ruby-build, however, install is not available.
[01:45:42] Bellthoven: has joined #ruby
[01:49:27] SamGerber: has joined #ruby
[01:49:30] cndiv: has joined #ruby
[01:50:12] jas02: has joined #ruby
[01:51:20] blt: has joined #ruby
[01:52:06] howdoicomputer: has joined #ruby
[01:52:13] blt: has left #ruby: ()
[01:52:28] montana: has joined #ruby
[01:55:20] tubuliferous_: has joined #ruby
[01:59:22] CloCkWeRX: has joined #ruby
[02:02:06] cooperle1run: has joined #ruby
[02:03:41] chipotle: has joined #ruby
[02:03:45] alcipir: has joined #ruby
[02:05:13] A124: has joined #ruby
[02:05:21] baroquebobcat_: has joined #ruby
[02:05:41] jenrzzz: has joined #ruby
[02:06:34] arescorpio: has joined #ruby
[02:07:03] cooperlebrun: has joined #ruby
[02:07:35] bungoman_: has joined #ruby
[02:13:35] Echohn: has joined #ruby
[02:13:45] willharrison: has joined #ruby
[02:17:44] sharkman: has joined #ruby
[02:19:10] Echohn_: has joined #ruby
[02:19:41] willardg: has joined #ruby
[02:20:27] Joufflu: has joined #ruby
[02:20:51] rbennacer: has joined #ruby
[02:23:43] al2o3-cr: has joined #ruby
[02:23:44] mostlybadfly: has joined #ruby
[02:24:43] idefine: has joined #ruby
[02:25:45] Cyther_: has joined #ruby
[02:27:05] Feyn: has joined #ruby
[02:27:13] baweaver: has joined #ruby
[02:29:04] RobertBirnie: has joined #ruby
[02:30:58] sankaber: has joined #ruby
[02:31:14] Feyn: has joined #ruby
[02:32:03] acke: has joined #ruby
[02:37:19] Pupeno: has joined #ruby
[02:38:31] nettoweb: has joined #ruby
[02:44:10] jas02: has joined #ruby
[02:45:38] stardiviner: has joined #ruby
[02:45:43] ss_much: has joined #ruby
[02:45:51] cantaberry: has joined #ruby
[02:46:27] cwong_on_irc: has joined #ruby
[02:46:59] cwong_on_irc: has joined #ruby
[02:51:14] cantaberry: has joined #ruby
[02:52:04] rehat: has joined #ruby
[02:53:03] mary5030: has joined #ruby
[02:53:45] saddad: has joined #ruby
[02:56:15] bruno-: has joined #ruby
[02:56:52] danman: has joined #ruby
[03:00:08] prestorium: has joined #ruby
[03:00:26] tjbiddle: has joined #ruby
[03:00:53] gener1c_: has joined #ruby
[03:01:44] Respek: has joined #ruby
[03:02:29] mistermocha: has joined #ruby
[03:04:54] favadi: has joined #ruby
[03:05:20] zenguy_pc: has joined #ruby
[03:06:42] CloCkWeRX: has joined #ruby
[03:08:10] hmsimha: has joined #ruby
[03:10:49] pontiki: has joined #ruby
[03:10:55] braincrash: has joined #ruby
[03:11:22] avahey: has joined #ruby
[03:11:55] chipotle: has joined #ruby
[03:12:13] idefine: has joined #ruby
[03:13:22] al2o3-cr: has joined #ruby
[03:13:23] devbug: has joined #ruby
[03:14:12] tmtwd: has joined #ruby
[03:14:24] cooperlebrun: has joined #ruby
[03:14:30] Fredrich010: has joined #ruby
[03:15:21] naztharune: has joined #ruby
[03:17:55] ramfjord: has joined #ruby
[03:18:43] Axy: has joined #ruby
[03:20:56] darkf: has joined #ruby
[03:22:20] diegoaguilar: has joined #ruby
[03:25:43] cooperle1run: has joined #ruby
[03:27:24] renanoronfle: has joined #ruby
[03:28:19] sanjayu: has joined #ruby
[03:28:33] Kovensky: has joined #ruby
[03:31:31] mollusk_: has joined #ruby
[03:32:02] sdwrage: has joined #ruby
[03:33:46] gix: has joined #ruby
[03:38:40] skweek: has joined #ruby
[03:39:06] jas02: has joined #ruby
[03:39:56] benjito: has joined #ruby
[03:41:30] nemo_: has joined #ruby
[03:42:55] hahuang65: has joined #ruby
[03:47:59] zenguy_pc: has joined #ruby
[03:48:04] mengu: has joined #ruby
[03:51:48] wldcordeiro: has joined #ruby
[03:52:27] mollusk_: So in a nutshell, what is a module in Ruby? From I understand, they are just namespaces.
[03:53:21] mollusk_: file.rb > Mymodule > file contents
[03:56:33] houhoulis: has joined #ruby
[03:58:33] solenoids: has joined #ruby
[03:58:59] pepperbreath: has joined #ruby
[04:01:08] regreg: has joined #ruby
[04:01:12] regreg: has left #ruby: ()
[04:04:38] swgillespie: has joined #ruby
[04:08:30] jenrzzz: has joined #ruby
[04:09:27] zenguy_pc: has joined #ruby
[04:10:43] tkuchiki: has joined #ruby
[04:11:05] eam: mollusk_: essentially, yes
[04:11:09] Echohn: has joined #ruby
[04:12:24] renanoronfle: has joined #ruby
[04:12:32] Echohn_: has joined #ruby
[04:15:02] mollusk_: eam, I am just trying to figure out the use for them (namespaces in general). When I read stuff online my learning issues kick in and make it difficult.
[04:15:22] devoldmx: has joined #ruby
[04:15:28] dfinninger: has joined #ruby
[04:15:44] l_tonz: has joined #ruby
[04:19:19] mollusk_: You have an empty room, and someone write a name on paper and puts it in the room. Now nobody else cn write the same name and put it in that room.
[04:20:07] mollusk_: That's my understanding
[04:22:25] devbug_: has joined #ruby
[04:25:40] skade: has joined #ruby
[04:26:25] braincra-: has joined #ruby
[04:27:03] mistermocha: has joined #ruby
[04:29:12] stardiviner: I got this error when I execute "$ ri Array", .rbenv/versions/2.2.0/lib/ruby/2.2.0/rdoc/store.rb:548:in `load': marshal data too short (ArgumentError) . Google it, but have not found solution.
[04:31:25] moeabdol: has joined #ruby
[04:33:38] jas02: has joined #ruby
[04:34:40] andykingking: has joined #ruby
[04:34:53] araujo: has joined #ruby
[04:34:53] araujo: has joined #ruby
[04:34:56] htmldrum: has joined #ruby
[04:37:22] Pupeno: has joined #ruby
[04:39:03] jackjackdripper: has joined #ruby
[04:42:32] Maletor: has joined #ruby
[04:43:08] andykingking: has left #ruby: ()
[04:44:04] mistermo_: has joined #ruby
[04:46:14] lkba_: has joined #ruby
[04:48:17] krz: has joined #ruby
[04:48:39] mengu: has joined #ruby
[04:53:58] galette: has joined #ruby
[04:54:31] htmldrum: has joined #ruby
[04:55:22] diegoaguilar: has joined #ruby
[04:55:49] tmtwd: has joined #ruby
[04:58:02] bruno-: has joined #ruby
[04:58:12] dopieee: has joined #ruby
[05:00:32] devoldmx: has joined #ruby
[05:00:52] tkuchiki: has joined #ruby
[05:02:07] SOLDIERz: has joined #ruby
[05:02:37] jackjackdripper: has joined #ruby
[05:07:09] dhjondoh: has joined #ruby
[05:08:01] chipotle: has joined #ruby
[05:09:20] trosborn: has joined #ruby
[05:09:48] finisherr: has joined #ruby
[05:10:19] `derpy: has joined #ruby
[05:10:31] finisherr: has left #ruby: ()
[05:11:11] Kovensky: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[05:12:10] SleepySensei: has joined #ruby
[05:12:40] SleepySensei: Anyone having trouble with using Ruby's features on OS X's new El Capitan?
[05:14:35] zenguy_pc: has joined #ruby
[05:16:10] trabulmonkee: has joined #ruby
[05:16:21] spuk_: has joined #ruby
[05:16:49] mistermocha: has joined #ruby
[05:18:40] SleepySensei: has joined #ruby
[05:22:30] CloCkWeRX: has joined #ruby
[05:29:24] leat: has joined #ruby
[05:30:33] jas02: has joined #ruby
[05:32:35] trautwein: has joined #ruby
[05:38:26] Maletor: has joined #ruby
[05:39:26] aganov: has joined #ruby
[05:46:31] rehat: how do I execute a terminal command and get a bool result. When I use system or backticks the terminal command still spits out. How do gems like xcpretty do it?
[05:46:54] ja: what do you mean ???bool result????
[05:47:02] rehat: oh wait, do I just pipe it to a string?
[05:47:04] ja: depending on the exit status?
[05:47:26] rehat: yeah exit status
[05:47:40] ja: uhh, I forget?????but there's a global variable for that, I believe
[05:48:32] ja: rehat: http://stackoverflow.com/a/18728230/1569350 ??? sweet!
[05:48:46] ja: oh wait, you said it didn???t work to use #system, hrm
[05:49:12] agent_white: rehat: Use `system()` instead to return exit status.
[05:49:26] ja: yeah, doesn't that work?
[05:51:44] tagrudev: has joined #ruby
[05:52:11] ElSif: has joined #ruby
[05:52:23] d34th4ck3r: has joined #ruby
[05:53:25] EminenceHC: has joined #ruby
[05:54:12] dnewkerk: has joined #ruby
[05:54:48] andikr: has joined #ruby
[05:56:25] jas02: has joined #ruby
[05:56:28] jenrzzz: has joined #ruby
[05:56:39] rehat: oh I changed my logic lol https://www.diffchecker.com/l30he4de
[05:58:18] bricker: has joined #ruby
[05:59:02] bruno-: has joined #ruby
[06:01:35] codecop: has joined #ruby
[06:01:50] cooperlebrun: has joined #ruby
[06:01:50] Echohn_: has joined #ruby
[06:02:52] Echohn: has joined #ruby
[06:04:58] yfeldblum: has joined #ruby
[06:05:36] aufi: has joined #ruby
[06:05:39] DrCode: has joined #ruby
[06:08:15] baroquebobcat_: has joined #ruby
[06:09:18] Echohn: has joined #ruby
[06:10:03] aufi: has joined #ruby
[06:10:40] Echohn_: has joined #ruby
[06:11:21] Echohn: has joined #ruby
[06:11:35] sdwrage: has joined #ruby
[06:13:11] ohaibbq: has joined #ruby
[06:16:48] mistermocha: has joined #ruby
[06:20:13] cooperle1run: has joined #ruby
[06:20:33] Kovensky: has joined #ruby
[06:20:51] jerry_tao: has joined #ruby
[06:20:56] yeticry: has joined #ruby
[06:21:02] krz: has joined #ruby
[06:22:34] nebuer: has joined #ruby
[06:23:14] Kovensky: has left #ruby: ()
[06:23:22] willardg: has joined #ruby
[06:27:21] arup_r: has joined #ruby
[06:28:31] firstdayonthejob: has joined #ruby
[06:29:32] herbst: has joined #ruby
[06:29:42] willardg: has joined #ruby
[06:30:58] htmldrum: has joined #ruby
[06:31:03] riotjones: has joined #ruby
[06:32:57] george2: has left #ruby: ()
[06:33:12] benjito: has joined #ruby
[06:33:45] relix: has joined #ruby
[06:34:04] yardenbar: has joined #ruby
[06:37:34] acke: has joined #ruby
[06:40:13] l_tonz: has joined #ruby
[06:40:21] krz: has joined #ruby
[06:41:07] kraljev11: has joined #ruby
[06:41:53] Pisuke: has joined #ruby
[06:44:43] Echohn_: has joined #ruby
[06:44:48] bmalum: has joined #ruby
[06:45:34] skade: has joined #ruby
[06:47:40] beast: has joined #ruby
[06:51:17] psye: has joined #ruby
[06:52:08] kraljev11: has joined #ruby
[06:53:17] idefine: has joined #ruby
[06:55:48] rbowlby: has joined #ruby
[06:56:02] tesuji: has joined #ruby
[06:58:53] _blizzy_: has joined #ruby
[06:58:54] jackjackdripper: has joined #ruby
[06:59:17] Soda: has joined #ruby
[07:00:04] bruno-: has joined #ruby
[07:00:58] Fredrich010: has joined #ruby
[07:09:40] _blizzy_: has joined #ruby
[07:10:37] SCHAAP137: has joined #ruby
[07:13:36] postmodern: has joined #ruby
[07:14:15] leafybasil: has joined #ruby
[07:16:56] nfk|laptop: has joined #ruby
[07:17:22] pontiki: has joined #ruby
[07:17:27] cooperlebrun: has joined #ruby
[07:20:11] Xeago: has joined #ruby
[07:22:05] krz: has joined #ruby
[07:28:09] Echohn: has joined #ruby
[07:28:43] solars: has joined #ruby
[07:30:38] Echohn: has joined #ruby
[07:31:30] nfk|laptop: has joined #ruby
[07:31:46] wuyin: has joined #ruby
[07:32:07] Echohn: has joined #ruby
[07:35:34] nhhagen: has joined #ruby
[07:36:06] pagios: has joined #ruby
[07:36:14] tkuchiki: has joined #ruby
[07:36:17] pagios: hi all, how can i install rvm ruby in a specific dir? \curl -sSL https://get.rvm.io | bash -s stable --ruby --prefix /media/sd/
[07:36:18] pagios: does not work
[07:38:57] dmolina: has joined #ruby
[07:41:19] jatb: has joined #ruby
[07:42:46] keen______: has joined #ruby
[07:42:50] sdwrage: has joined #ruby
[07:44:50] steffkes: has joined #ruby
[07:45:08] sl33k: has joined #ruby
[07:48:39] joonty: has joined #ruby
[07:49:16] KrzaQ: has joined #ruby
[07:49:54] Fredrich010: has joined #ruby
[07:50:49] akemrir: has joined #ruby
[07:51:28] nfk|laptop: has joined #ruby
[07:51:59] agent_white: atom3: Are you spamming bots by chance?
[07:52:20] matp: has joined #ruby
[07:52:37] ramfjord: has joined #ruby
[07:52:38] charliesome: has joined #ruby
[07:52:50] agent_white: Anyone getting spammed by "at0mxxxxxx" bots?
[07:53:08] troulouliou_div2: has joined #ruby
[07:53:53] Echohn_: has joined #ruby
[07:54:10] lipoqil: has joined #ruby
[07:55:17] pagios: has left #ruby: ("Leaving")
[07:55:40] charliesome_: has joined #ruby
[07:55:49] apeiros: agent_white: nope, no spam for me
[07:58:43] ghr: has joined #ruby
[07:59:25] Xeago: has joined #ruby
[08:00:40] agent_white: has joined #ruby
[08:00:53] devoldmx: has joined #ruby
[08:01:57] bayed: has joined #ruby
[08:02:13] sdwrage: has joined #ruby
[08:02:38] sagax: has joined #ruby
[08:03:34] CloCkWeRX: has joined #ruby
[08:05:48] patdohere: has joined #ruby
[08:07:25] marr: has joined #ruby
[08:07:39] charliesome: has joined #ruby
[08:07:58] jackjackdripper1: has joined #ruby
[08:10:32] Fredrich010: has joined #ruby
[08:10:59] charliesome: has joined #ruby
[08:13:29] rdark: has joined #ruby
[08:13:29] rdark: has joined #ruby
[08:15:51] Hounddog: has joined #ruby
[08:17:08] c0m0: has joined #ruby
[08:19:52] niemcu: has joined #ruby
[08:20:10] tomphp: has joined #ruby
[08:20:32] teclator: has joined #ruby
[08:22:57] ibouvousaime: has joined #ruby
[08:23:02] vigintas: has joined #ruby
[08:23:02] euoia: has joined #ruby
[08:23:54] kimegede: has joined #ruby
[08:24:58] mark3: has joined #ruby
[08:25:21] Echohn: has joined #ruby
[08:26:02] bruce_lee: has joined #ruby
[08:27:34] sharkman: has joined #ruby
[08:28:32] mikecmpbll: has joined #ruby
[08:30:15] CloCkWeRX: has joined #ruby
[08:30:54] cooperlebrun: has joined #ruby
[08:31:38] voker57: has joined #ruby
[08:32:30] Pupeno: has joined #ruby
[08:33:57] charliesome_: has joined #ruby
[08:34:30] rbowlby: has joined #ruby
[08:34:42] leafybasil: has joined #ruby
[08:34:54] euoia: has joined #ruby
[08:36:23] tomphp: has joined #ruby
[08:36:28] dionysus69: has joined #ruby
[08:37:03] Echohn: has joined #ruby
[08:38:05] jatb: has joined #ruby
[08:38:28] simi: has joined #ruby
[08:39:46] Taha_The_Hacker: has joined #ruby
[08:41:17] diegoaguilar: has joined #ruby
[08:41:51] alcipir: has joined #ruby
[08:42:36] leafybasil: has joined #ruby
[08:43:08] last_staff: has joined #ruby
[08:43:08] krz: has joined #ruby
[08:44:50] Echohn: has joined #ruby
[08:45:19] leitz: has joined #ruby
[08:45:32] vigintas: has joined #ruby
[08:46:12] leitz: Okay, I'm more confused than normal. Need more coffee. Using Ruby 1.8.7, the "if" in line 44 should be an else, I thought, to ensure the directory was there.
[08:46:15] leitz: https://github.com/LeamHall/SecComFrame/blob/master/tools/stig_munger/open_stig.rb#L43-L58
[08:46:55] leitz: The directory is there. If the "if" is an "unless", the script fails. When it's an "if", it works.
[08:47:02] leitz: What am I missing?
[08:48:24] nhhagen: has joined #ruby
[08:49:37] mikecmpbll: the directory exists and the code in the `if` runs, right?
[08:49:57] mikecmpbll: (the code which says the directory doesn't exist and exits the program)
[08:50:13] mengu: has joined #ruby
[08:50:44] leitz: mikecmpbll, sorry. My poor typing. The directory exists, and the code does not exit. Instead, the Dir stuff below it runs.
[08:50:47] govg: has joined #ruby
[08:50:58] jatb: has joined #ruby
[08:51:07] tvw: has joined #ruby
[08:51:20] mikecmpbll: well, File.directory? can't find it then
[08:52:29] chthon: has joined #ruby
[08:52:53] bmalum: has joined #ruby
[08:54:03] pontiki: has joined #ruby
[08:54:53] leitz: If I take the assignement and File.directory? lines and run them in irb, in the same directory as the script, I get a "true" response.
[08:54:57] TomyWork: has joined #ruby
[08:55:34] mikecmpbll: oh, just noticed your syntax error
[08:56:02] d34th4ck3r: I???m getting started with testing in Ruby. I???m confused about one thing. Is it neccessary to use install RSpec gem when using factory_girl ?
[08:56:39] mikecmpbll: leitz: you don't use braces for if statements
[08:57:26] nettoweb: has joined #ruby
[08:57:36] mikecmpbll: i'm surprised that's not erroring.
[08:57:52] mikecmpbll: the rogue "end" on line 68 will be playing a part in that.
[08:58:15] sl33k: has joined #ruby
[08:59:00] bonemind: has joined #ruby
[09:00:38] quaristice: has joined #ruby
[09:00:58] jgt2: has joined #ruby
[09:02:18] leitz: Ah, I had tried "do"..."end", and not just "end".
[09:02:27] leitz: Too early in the morning...
[09:02:36] Peg-leg: has joined #ruby
[09:03:10] jatb: has joined #ruby
[09:04:37] DoubleMalt: has joined #ruby
[09:05:19] Gnomethrower: has joined #ruby
[09:06:21] arup_r: has joined #ruby
[09:06:47] Fredrich010: has joined #ruby
[09:08:54] leitz: Well, Ruby is great. The people writing the XML I'm parsing...not so much.
[09:09:04] ledestin: has joined #ruby
[09:09:27] mikecmpbll: ahh, good ol' fun xml
[09:10:47] TheBrayn: XML is like violence
[09:10:57] leitz: I've seen that reference.
[09:10:59] dhjondoh: has joined #ruby
[09:12:08] dionysus69: has joined #ruby
[09:12:43] apeiros: xml is a tool, and like all tools, lots of humans tend to use it the wrong way :(
[09:12:51] mikecmpbll: you should be using yorickpeterse's parser, not nokogiri :p
[09:13:28] mikecmpbll: jk, i use ox.
[09:13:34] dionysus69: has joined #ruby
[09:14:05] gregf: has joined #ruby
[09:14:32] leitz: apeiros, there's another script in this set that cleans up stuff like htmlentities in their XML. bleagh..
[09:14:35] zipace: has joined #ruby
[09:15:34] jenrzzz: has joined #ruby
[09:16:29] tedstriker: has joined #ruby
[09:16:58] agent_white: has joined #ruby
[09:17:58] bonemind: has joined #ruby
[09:18:07] Axy: has joined #ruby
[09:18:07] Axy: has joined #ruby
[09:18:25] SenpaiSilver_: has joined #ruby
[09:18:42] dopamean1: has joined #ruby
[09:19:28] Sembei: has joined #ruby
[09:19:33] dopie: has joined #ruby
[09:19:35] perrier__: has joined #ruby
[09:19:45] Regulati_: has joined #ruby
[09:19:48] nebuer_: has joined #ruby
[09:20:03] chipotle_: has joined #ruby
[09:20:05] Dreamer3: has joined #ruby
[09:20:21] Veejay: .all?(/foo/) can already be done as .all?(&foo) though, with a Proc containing the logic. The way you name your block (proc/lambda) even enforces better semantic reasoning IMHO
[09:20:34] Kharma: has joined #ruby
[09:20:36] dhjondoh1: has joined #ruby
[09:20:39] lxsameer: has joined #ruby
[09:20:39] lxsameer: has joined #ruby
[09:20:41] armyriad: has joined #ruby
[09:20:41] kurzweil: has joined #ruby
[09:20:49] ozzloy: has joined #ruby
[09:20:49] ozzloy: has joined #ruby
[09:20:52] arthurnn_: has joined #ruby
[09:21:09] Veejay: has left #ruby: ("WeeChat 0.4.2")
[09:21:13] Veejay: has joined #ruby
[09:21:14] veloutin: has joined #ruby
[09:21:22] hhatch: has joined #ruby
[09:21:29] pwnd_nsfw: has joined #ruby
[09:21:37] mblagden: has joined #ruby
[09:21:37] BraddPitt: has joined #ruby
[09:22:24] inteq: has joined #ruby
[09:22:43] Xeago: has joined #ruby
[09:22:59] amoeba: has joined #ruby
[09:23:46] favadi: has joined #ruby
[09:23:48] scottstamp: has joined #ruby
[09:24:38] l_tonz: has joined #ruby
[09:26:43] caliostro: has joined #ruby
[09:26:57] dhjondoh: has joined #ruby
[09:27:15] matthewhill: has joined #ruby
[09:28:03] iamvery: has joined #ruby
[09:28:52] matthewhill: has joined #ruby
[09:29:19] Jackneill: has joined #ruby
[09:30:05] diegobiavati: has joined #ruby
[09:31:50] Rollabunna: has joined #ruby
[09:32:01] kimegede: has joined #ruby
[09:33:20] Feyn: has joined #ruby
[09:33:49] TomyWork: "bundle exec" is a little slow even though i only have one gem dependency. is there a way to speed it up?
[09:34:21] Taha_The_Hacker: has joined #ruby
[09:35:35] mark3: has joined #ruby
[09:35:55] arup_r: has joined #ruby
[09:36:14] mark3: has joined #ruby
[09:36:53] mark3: has joined #ruby
[09:37:27] mark3: has joined #ruby
[09:37:51] mark3: has joined #ruby
[09:38:02] apeiros: ACTION was/is tempted to say "don't use bundle exec"
[09:38:25] apeiros: +b mark3!*@*$#ruby-fix-your-connection
[09:38:28] apeiros: -o apeiros
[09:38:43] agent_white: What is the correct way to add paths for a "default ruby project skeleton?" (As in, I have bin/project, lib/project.rb, lib/project/thing.rb)
[09:39:13] apeiros: agent_white: there's a couple of gem skeleton generators
[09:39:34] agent_white: apeiros: That's the thing I did use bundle... but figured it was a bit much since I'm not looking to make a gem.
[09:39:37] apeiros: bundler, hoe, jeweler come to mind. toolbox probably has more.
[09:40:02] apeiros: agent_white: eh, that's IMO a mistake. the moment you have a lib dir, you should make it a gem :-p
[09:40:02] agent_white: apeiros: Are hoe and jeweler a bit skinnier?
[09:40:22] apeiros: I mean, you don't need to publish it
[09:40:39] agent_white: apeiros: Ahhh :P Well. I made the lib dir not out of necessity, but rather that I had seen many projects using a lib dir so figured I should do the same.
[09:41:00] apeiros: that's a good idea. just as going the full way and making it a gem ;-)
[09:41:05] Fredrich010: has joined #ruby
[09:41:24] apeiros: all you need for a gem is a .gemspec. lib/bin/docs etc. are all optional.
[09:41:24] agent_white: apeiros: Ah ok! So... maybe `bundle gem myprojectname` and just remove the unncessary files?
[09:41:59] apeiros: or use some generator which can be configured
[09:42:18] agent_white: Ahhh okey doke. Yeah really, not even thinking about 'gem' at all. Just kinda was thinking in terms of general skeleton layout.
[09:42:33] agent_white: Alrighty! I'll take a peek at hoe and jeweler. :)
[09:42:37] agent_white: apeiros: Thank you :)
[09:42:42] ef: has joined #ruby
[09:43:00] apeiros: btw., a minimal gemspec is quite small too.
[09:43:10] apeiros: ACTION afk
[09:43:15] Igorshp: has joined #ruby
[09:43:38] apeiros: agent_white: ah, while it's essentially unmaintained - I still use my own gem-new. feel free to work on it if you want to improve it :D
[09:43:49] jenrzzz: has joined #ruby
[09:45:29] agent_white: apeiros: Ahhh okey doke! :)
[09:46:16] alcipir: has joined #ruby
[09:47:55] dionysus69: has joined #ruby
[09:51:31] rodfersou: has joined #ruby
[09:52:24] diegobiavati_: has joined #ruby
[09:54:48] ruurd: has joined #ruby
[09:56:43] gregf: has joined #ruby
[09:56:50] jgt2: has joined #ruby
[09:58:01] TomyWork: i want to access jira's api, reading, creating and deleting comments, possibly updating them too. can you recommend a gem?
[09:58:13] step1step2_: has joined #ruby
[09:58:20] TomyWork: that's issue comments
[09:58:21] agent_wh1te: has joined #ruby
[09:58:31] Peg-leg1: has joined #ruby
[09:58:53] helpa: has joined #ruby
[09:59:03] klaas_: has joined #ruby
[09:59:04] jgt: has joined #ruby
[09:59:13] stannard: has joined #ruby
[09:59:27] Igorshp: has joined #ruby
[09:59:37] Neniah: has joined #ruby
[10:00:09] Shidash_: has joined #ruby
[10:00:26] dopamean_: has joined #ruby
[10:00:31] wnd_: has joined #ruby
[10:00:40] agent_white: has joined #ruby
[10:00:55] charles81_: has joined #ruby
[10:00:58] crayfishx_: has joined #ruby
[10:01:01] bkxd_: has joined #ruby
[10:01:25] [spoiler]: has joined #ruby
[10:01:39] devoldmx: has joined #ruby
[10:01:46] ruurd: has joined #ruby
[10:01:48] fumduq-: has joined #ruby
[10:01:59] jxs_: has joined #ruby
[10:02:11] crankhar1er: has joined #ruby
[10:02:12] Utkarsh_: has joined #ruby
[10:02:27] shinenelson_: has joined #ruby
[10:02:43] totimkop1: has joined #ruby
[10:02:44] zwdr_: has joined #ruby
[10:02:45] cbednarski_: has joined #ruby
[10:02:46] stacybir1: has joined #ruby
[10:02:50] charliesome: has joined #ruby
[10:02:56] im0b_: has joined #ruby
[10:02:57] ironcame1: has joined #ruby
[10:03:00] ericwood_: has joined #ruby
[10:03:06] kramsee_: has joined #ruby
[10:03:10] daed_: has joined #ruby
[10:03:10] patteh_: has joined #ruby
[10:03:11] aryaching: has joined #ruby
[10:03:13] mic_e: has joined #ruby
[10:03:14] speaking1ode: has joined #ruby
[10:03:18] tethra_: has joined #ruby
[10:03:19] s00pcan_: has joined #ruby
[10:03:22] Pro|_: has joined #ruby
[10:03:22] pygospa: has joined #ruby
[10:03:27] cscheib_: has joined #ruby
[10:03:28] agentmee1kat: has joined #ruby
[10:03:37] arthurix: has joined #ruby
[10:03:40] iamvery_: has joined #ruby
[10:04:10] hellschreiber_: has joined #ruby
[10:05:10] skcin7_: has joined #ruby
[10:05:53] marens_: has joined #ruby
[10:05:54] marens_: has joined #ruby
[10:06:20] _main_: has joined #ruby
[10:06:51] rideh: has joined #ruby
[10:06:52] elaptics`: has joined #ruby
[10:07:14] sonne_: has joined #ruby
[10:07:20] Junaos_: has joined #ruby
[10:07:20] SegFaultAX_: has joined #ruby
[10:07:50] preyalone_: has joined #ruby
[10:07:59] icedragon: has joined #ruby
[10:08:03] Biohazard: has joined #ruby
[10:08:18] woodruffw: has joined #ruby
[10:08:28] rcs: has joined #ruby
[10:08:43] timmow: has joined #ruby
[10:08:43] Papierkorb: has joined #ruby
[10:08:49] adam|: has joined #ruby
[10:08:50] dionysus69: has joined #ruby
[10:08:52] nizmow: has joined #ruby
[10:09:02] edwardly: has joined #ruby
[10:09:02] edwardly: has joined #ruby
[10:09:03] nemo_: has joined #ruby
[10:09:20] pandaant: has joined #ruby
[10:09:36] xxx: has joined #ruby
[10:10:04] BLuEGoD: has joined #ruby
[10:10:06] bodgix: has joined #ruby
[10:10:08] GarethAdams: has joined #ruby
[10:10:46] speakingcode: has joined #ruby
[10:10:55] ggherdov_: has joined #ruby
[10:11:59] RedDwarf: has joined #ruby
[10:12:35] jatb: has joined #ruby
[10:12:52] M-mistake1: has joined #ruby
[10:13:27] benjito: has joined #ruby
[10:13:30] mollusk_: has joined #ruby
[10:13:30] mengu: has joined #ruby
[10:13:30] mengu: has joined #ruby
[10:13:33] bjeanes: has joined #ruby
[10:13:42] musicmatze: has joined #ruby
[10:13:50] Lilian: has joined #ruby
[10:13:50] Taha_The_Hacker: has joined #ruby
[10:14:06] ben3: has joined #ruby
[10:14:19] sarlalian: has joined #ruby
[10:14:21] wldcordeiro: has joined #ruby
[10:14:27] nrk: has joined #ruby
[10:14:40] mistermocha: has joined #ruby
[10:14:48] pocketprotector: has joined #ruby
[10:14:52] lukaszk: has joined #ruby
[10:14:53] shevy: has joined #ruby
[10:15:08] odigity: has joined #ruby
[10:15:17] troulouliou_div2: has joined #ruby
[10:15:29] apipkin: has joined #ruby
[10:15:45] bcavileer: has joined #ruby
[10:15:50] mjc_: has joined #ruby
[10:15:54] alxndr: has joined #ruby
[10:16:08] towler: has joined #ruby
[10:16:17] marienz: has joined #ruby
[10:16:27] bjmllr: has joined #ruby
[10:16:43] sparr: has joined #ruby
[10:16:50] akahn: has joined #ruby
[10:16:53] lacrosse: has joined #ruby
[10:17:15] err_ok: has joined #ruby
[10:17:32] schaary: has joined #ruby
[10:18:40] iamdevnul: has joined #ruby
[10:18:59] jgt: has joined #ruby
[10:19:59] anekos: has joined #ruby
[10:20:09] DenSchub: has joined #ruby
[10:20:26] rickmasta: has joined #ruby
[10:20:31] flughafen: has joined #ruby
[10:20:31] c0ncealed: has joined #ruby
[10:21:34] alcipir: has joined #ruby
[10:23:09] Azure: has joined #ruby
[10:23:18] agent_white: apeiros: You still around?
[10:23:47] karapetyan: has joined #ruby
[10:25:08] jatb: has joined #ruby
[10:25:44] l_tonz: has joined #ruby
[10:25:51] gregf: has joined #ruby
[10:26:57] daffy_duck: has joined #ruby
[10:27:08] Taha_The_Hacker: has joined #ruby
[10:28:09] senayar: has joined #ruby
[10:30:13] mostlybadfly: has joined #ruby
[10:32:34] bonhoeffer: has joined #ruby
[10:33:18] ldnunes: has joined #ruby
[10:33:21] nemo__: has joined #ruby
[10:34:46] dionysus69: has joined #ruby
[10:36:35] benlovell: has joined #ruby
[10:37:21] symbol: has joined #ruby
[10:37:59] jatb: has joined #ruby
[10:39:19] sankaber: has joined #ruby
[10:39:31] lulzmachine: has joined #ruby
[10:42:03] alcipir: has joined #ruby
[10:42:05] gregf: has joined #ruby
[10:45:39] jenrzzz: has joined #ruby
[10:47:12] hfp_work: has joined #ruby
[10:47:26] but3k4: has joined #ruby
[10:48:07] dhjondoh: has joined #ruby
[10:48:47] beast: has joined #ruby
[10:51:43] leitz: Okay, running into an issue with a duplicate hash key.. I didn't even think that was possible, but I'm easily confused.
[10:51:44] leitz: https://github.com/LeamHall/SecComFrame/blob/master/tools/stig_munger/open_stig.rb#L49-L62
[10:52:40] leitz: One key is duplicated. Not sure why the has_key? isn't seeing it, unless there's something unviewable in the string.
[10:53:38] apeiros: agent_white: back now
[10:54:26] agent_white: apeiros: Ah good deal, thanks for the heads up :) Figured out my issue.
[10:54:27] pontiki: has joined #ruby
[10:54:29] apeiros: leitz: use p instead of puts
[10:55:07] agent_white: I was trying to test my bin file just going in the directory of it and going "./run" rather than "bundle exec run" :P
[10:56:21] workmad3: has joined #ruby
[10:56:24] leitz: apeiros, I still get the duplicate key.. "key is V-38692"
[10:56:24] leitz: "key is V-38692"
[10:57:12] leitz: That the key is referenced more than once in the source XML is fine. That it's not seeing the same key in $ccis bothers me.
[10:57:26] leitz: So far this seems to be the only duplicate.
[10:57:33] jonnie: has joined #ruby
[10:57:55] jonnie: ive got a question about exception handling
[10:58:06] yardenbar: has joined #ruby
[10:58:15] jonnie: is it possible for reraised exceptions to flow onto subsequent rescue calls, or do they always "go up" so to speak?
[10:58:23] jonnie: code example here: https://gist.github.com/JonnieCache/f95d4e0f2ab494d8f596
[10:59:35] apeiros: jonnie: always go up
[10:59:49] apeiros: jonnie: but you can rescue more than one exception class in a rescue
[11:00:08] moeabdol: has joined #ruby
[11:00:08] apeiros: and plain `rescue` is identical to `rescue StandardError`
[11:00:21] stamina: has joined #ruby
[11:00:23] apeiros: so no, not boo :)
[11:00:29] jonnie: im using a library that raises the same exception class for all error states, and differentiates them by objects attatched to them, which are obv. inaccessible to the rescue statement
[11:00:33] jonnie: very annoying
[11:00:45] apeiros: I can imagine
[11:01:04] jonnie: so im my example "abc" stands for the exception metadata from the library
[11:01:19] apeiros: leitz: from your code I'm not quite sure how you figure you've got a duplicate key and where
[11:02:42] ef: has joined #ruby
[11:02:57] leitz: apeiros, I grep for the keys in the output file, and then do another grep with a sort -u.
[11:03:15] jonnie: i guess ill just extract a method and it can have its own rescue clause, that way i can have nested rescues which is what i really want anyway
[11:03:18] bruno-: has joined #ruby
[11:03:21] dhjondoh: has joined #ruby
[11:03:30] aufi: has joined #ruby
[11:04:32] Rollabunna: has joined #ruby
[11:06:46] leitz: apeiros, it's V-38692 in https://github.com/LeamHall/SecComFrame/blob/master/tools/stig_munger/ccis.json
[11:06:53] Taha_The_Hacker: has joined #ruby
[11:07:47] FernandoBasso: has joined #ruby
[11:08:37] apeiros: leitz: that's $ccis.to_json?
[11:09:10] favadi: has joined #ruby
[11:10:07] spider-mario: has joined #ruby
[11:10:52] leitz: apeiros, yup. https://github.com/LeamHall/SecComFrame/blob/master/tools/stig_munger/open_stig.rb#L101-L106
[11:11:22] lubarch: has joined #ruby
[11:11:34] apeiros: leitz: then instead of that, use File.write(cci_json_file, $ccis.inspect)
[11:11:40] solocshaw: has joined #ruby
[11:11:50] apeiros: btw., with block-form you don't have to do f.close.
[11:14:08] benjito: has joined #ruby
[11:14:14] karapetyan: has joined #ruby
[11:16:16] jgt: has joined #ruby
[11:18:01] Hanmac: has joined #ruby
[11:18:40] ruurd: has joined #ruby
[11:19:02] sdothum: has joined #ruby
[11:19:10] jonnie: has joined #ruby
[11:20:09] karapetyan: has joined #ruby
[11:20:44] badhatter: has joined #ruby
[11:21:44] vigintas: has joined #ruby
[11:22:56] leitz: apeiros, I have the inspect output, it's pretty ugly.. There are two different Nokogiri::XML::Attr identifiers for the duplicate keys.
[11:24:06] apeiros: leitz: so you probably want to get their text value instead of the Nokogiri::XML::Attr
[11:24:14] dionysus69: has joined #ruby
[11:24:24] apeiros: and that's why you use p and not puts ;-p
[11:24:38] apeiros: puts calls to_s, p calls inspect.
[11:25:04] Taha_The_Hacker: has joined #ruby
[11:25:34] ibouvousaime: has joined #ruby
[11:25:37] solocshaw: has joined #ruby
[11:25:44] leitz: I'm not sure I understand. If the value is the key, is it using the Attr?
[11:25:45] leitz: #<Nokogiri::XML::Attr:0x3ff2fae30684 name= "id" value="V-38692">=>["CCI-000017"],
[11:26:37] changeme_: has joined #ruby
[11:27:33] apeiros: your #<Nokogiri::XML::Attr:0x3ff2fae30684 name= "id" value="V-38692"> to_s will give "V-38692". since JSON does not support anything but string keys in hashes, that's what's being used in the serialization.
[11:27:35] _blizzy_: has joined #ruby
[11:27:40] apeiros: and that's also what you see when you puts it
[11:27:58] iamvery: has joined #ruby
[11:28:06] ef: has joined #ruby
[11:28:16] apeiros: but two Nokogiri::XML::Attr with the same value in value are still two different hash keys., which is why you think you have a duplicate hash key.
[11:28:25] chipotle: has joined #ruby
[11:28:34] benjito: has joined #ruby
[11:28:37] leitz: Ah, lemme go poke it a bit more.
[11:28:42] cornerma1: has joined #ruby
[11:29:05] nrk: has joined #ruby
[11:30:15] but3k4: has joined #ruby
[11:31:43] curses: has joined #ruby
[11:31:53] big|bad|wolf: has joined #ruby
[11:32:21] workmad3: leitz: compare the `.hash` values for them
[11:32:50] andykingking: has joined #ruby
[11:33:21] c0ncealed: has joined #ruby
[11:33:45] jatb: has joined #ruby
[11:36:19] _blizzy_: has joined #ruby
[11:38:45] leitz: workmad3, apeiros, the solution was to change [vuln_number] to [vid] in line 42. vid has already been turned into a to_s. https://github.com/LeamHall/SecComFrame/blob/master/tools/stig_munger/open_stig.rb#L41
[11:39:02] leitz: Sorry, line #41.
[11:40:44] ItSANgo: has joined #ruby
[11:42:29] jenrzzz: has joined #ruby
[11:42:42] alcipir: has joined #ruby
[11:43:01] Xeago: has joined #ruby
[11:44:26] leat: has joined #ruby
[11:44:35] prestorium: has joined #ruby
[11:45:43] ef: has joined #ruby
[11:47:07] leitz: Updated code pushed. TIme for a nap. My work day is half over and most folks here are just getting up...
[11:48:33] ef_: has joined #ruby
[11:48:44] Fredrich010: has joined #ruby
[11:49:29] zenguy_pc: has joined #ruby
[11:49:53] tkuchiki: has joined #ruby
[11:50:33] s00pcan: has joined #ruby
[11:50:54] cantaberry: has joined #ruby
[11:51:23] dionysus69: has joined #ruby
[11:54:04] benjito_: has joined #ruby
[11:54:51] senayar: has joined #ruby
[11:54:51] senayar: has joined #ruby
[11:55:14] TomyWork: i want to access jira's api, reading, creating and deleting comments, possibly updating them too. can you recommend a gem? jira-ruby lacks documentation
[11:55:30] foooobear: has joined #ruby
[11:55:33] allcentury: has joined #ruby
[11:56:42] eggoez: has joined #ruby
[11:57:32] nfk|laptop: has joined #ruby
[11:58:09] mwat: has joined #ruby
[11:59:41] lubarch: has joined #ruby
[12:00:00] moeabdol: has joined #ruby
[12:02:24] devoldmx: has joined #ruby
[12:02:55] blaxter: has joined #ruby
[12:05:17] benlovell: has joined #ruby
[12:07:08] badhatte1: has joined #ruby
[12:07:34] tkuchiki_: has joined #ruby
[12:08:27] badhatte1: has joined #ruby
[12:09:33] solenoids: has joined #ruby
[12:10:10] tkuchiki: has joined #ruby
[12:10:26] mengu: has joined #ruby
[12:10:33] karapetyan: has joined #ruby
[12:10:50] ponga: has joined #ruby
[12:10:57] badhatter: has joined #ruby
[12:13:21] nfk|laptop: has joined #ruby
[12:13:42] benlovell: has joined #ruby
[12:14:21] moeabdol: has joined #ruby
[12:15:01] Guest7: has joined #ruby
[12:15:10] dionysus69: has joined #ruby
[12:16:30] Respek: has joined #ruby
[12:16:36] crazydiamond: has joined #ruby
[12:18:04] agent_white: has joined #ruby
[12:19:17] senayar^: has joined #ruby
[12:19:56] daviddavis: has joined #ruby
[12:20:13] daviddavis: anyone know how I can refactor this test for rails 4/strong_params? https://gist.github.com/daviddavis/6f042b041338520c268d
[12:20:41] atomical: has joined #ruby
[12:23:17] kraljev11: has joined #ruby
[12:23:49] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[12:24:19] synthroid: has joined #ruby
[12:25:18] teclator: has joined #ruby
[12:25:52] Pumukel: has joined #ruby
[12:27:52] decaff: has joined #ruby
[12:28:38] shevy: we need learn chips so we don't have to learn anything basic anymore
[12:29:29] JohnBat26: has joined #ruby
[12:29:45] jhass: why learn if you can have instant/seamless integrated lookup of everything?
[12:31:00] Icey: has joined #ruby
[12:31:22] sgambino: has joined #ruby
[12:33:11] badhatter: has joined #ruby
[12:34:27] senayar: has joined #ruby
[12:34:27] senayar: has joined #ruby
[12:35:41] tkuchiki: has joined #ruby
[12:35:41] _Ghis_: has joined #ruby
[12:37:49] sankaber: has joined #ruby
[12:38:19] sdwrage: has joined #ruby
[12:39:24] rickmasta: has joined #ruby
[12:39:46] nemo_: has joined #ruby
[12:42:23] shevy: you mean google is the future?
[12:42:49] jhass: well, that's probably the sad part but yes
[12:43:23] shevy: with google sponsorship we could have ruby become guby
[12:44:57] benlovell: has joined #ruby
[12:45:59] fungoat: has joined #ruby
[12:46:40] bytecrawler: has joined #ruby
[12:47:51] platzhirsch: has joined #ruby
[12:48:25] CloCkWeRX: has joined #ruby
[12:48:59] naftilos76: has joined #ruby
[12:51:47] treehug88: has joined #ruby
[12:52:10] idefine: has joined #ruby
[12:52:54] rwilcox: has joined #ruby
[12:53:21] mag42c: has joined #ruby
[12:53:25] naztharune: has joined #ruby
[12:53:54] zotherstupidguy: hey i wanna do somthing like that
[12:53:56] zotherstupidguy: 2015-10-11T13:36:24+0000 - Time.now
[12:54:13] zotherstupidguy: to see if a date is upcoming or already in the past
[12:54:23] zotherstupidguy: how can it be done?
[12:55:13] adaedra: Parse the date to get a Time object, then compare the two.
[12:55:46] jhass: puts parsed > Time.now ? "coming up" : "in the past"
[12:55:48] benjito: has joined #ruby
[12:56:38] rwilcox: has joined #ruby
[12:56:48] daviddavis: has left #ruby: ("WeeChat 1.0.1")
[12:58:59] zotherstupidguy: adaedra jhass thanks works perfectly
[12:59:29] JDiPierro: has joined #ruby
[12:59:44] haylon: has joined #ruby
[13:01:50] decaff: has left #ruby: ()
[13:02:25] Oatmeal: has joined #ruby
[13:02:27] allcentury: has joined #ruby
[13:03:10] Ebok: has joined #ruby
[13:03:37] SenpaiSilver: has joined #ruby
[13:03:45] tagrudev: has joined #ruby
[13:04:40] JDiPierro: has joined #ruby
[13:04:58] benlovell: has joined #ruby
[13:05:59] tkuchiki: has joined #ruby
[13:07:42] chriscarpenter12: has joined #ruby
[13:08:48] chriscarpenter12: Is there a simple way to select the next value in a hash? I know I could do an each_with_index, but didn't know if there was just a next method or similar
[13:09:32] chriscarpenter12: next key => value in a hash
[13:09:51] jhass: most uses of hash that depend on its order are a smell
[13:10:01] jhass: what are you doing?
[13:10:39] zwdr_: Huh, I've just googled, and it seems like the order of keys is preserved in > 1.9
[13:10:42] zwdr_: nice to know
[13:10:58] jhass: it's insertion order since 1.9, yes
[13:11:09] jhass: I still consider actually relying on that a smell
[13:11:26] dmitch: has joined #ruby
[13:12:36] sl33k: has joined #ruby
[13:13:09] jgt: has joined #ruby
[13:14:10] nemo_: has joined #ruby
[13:14:43] jhass: chriscarpenter12: so, maybe we can find a way to do what you're actually trying to solve without that requirement?
[13:15:05] e1senhorn: has joined #ruby
[13:15:43] sharkman: has joined #ruby
[13:15:46] tkuchiki: has joined #ruby
[13:15:47] skade: has joined #ruby
[13:16:32] chriscarpenter12: I am building a large hash to pass to a PHP function to serialize and put in a database for wordpress. I have a hash already like this: {"1" => "20.00", "5" => "15.00", "20" => "10.00"} I need to iterate over it to then create three separate hashes for each key => value. Here is a gist: https://gist.github.com/chriscarpenter12/510f9c2f08c0dcc1c294
[13:17:13] jhass: how do you obtain the source hash?
[13:17:13] idefine: has joined #ruby
[13:17:29] jhass: why can't you build the needed structure there already?
[13:17:29] mehwork: shouldn't doing ar = [1,2,3,4,5,6].map { |i| if i.even? "#{i} is even" else next end } p ar not show nil's?
[13:17:47] chriscarpenter12: It is a query from a database joining multiple columns of prices and quantites
[13:18:10] jhass: mehwork: next is like return for blocks, you exit early from the block and provide its return value. not specifying a value defaults to nil
[13:18:17] jhass: compare next :foo
[13:18:53] mehwork: jhass is there another way of doing what i want then? Also it doesn't seem to be exiting, break does though
[13:19:19] jhass: chriscarpenter12: I don't quite follow where the value for "to" comes from in your example
[13:19:55] jhass: mehwork: next returns from the block, break returns from the method invoking the block, return returns from the method defining the block
[13:19:56] chriscarpenter12: jhass: from is the key and to is the next key -1
[13:20:15] jhass: why is it strings?
[13:20:41] jhass: also your result has 2 twice as the outer key, that's not possible
[13:21:52] CloCkWeRX: has joined #ruby
[13:21:52] chriscarpenter12: jhass: Sorry it should be 1,2,3. Copy and paste mistake
[13:22:23] elaptics`away: has joined #ruby
[13:22:28] chriscarpenter12: That's why I was asking if its possible to select the next key in a hash
[13:22:39] chriscarpenter12: to get the "to" value
[13:22:49] jhass: so you could do this fairly easily with .each_cons(2).with_index(1), but I'd still claim you should look into the method generating that input hash to return what you actually need instead
[13:22:54] bonhoeffer_: has joined #ruby
[13:22:55] chriscarpenter12: and the last result has the "to" doesn't need a value
[13:24:19] mehwork: jhass i still don't get it. Everything i'm reading says that next in a block should act like 'continue' and 'exit the block immediately, returning control to the iterator method, which begins a new iteration by invoking the block again'
[13:24:34] bigmac_: has joined #ruby
[13:25:03] jhass: mehwork: it does
[13:25:06] mehwork: so i don't understand why in my example, i couldn't use 'else next' to skip it from returning nil
[13:25:13] jhass: mehwork: it also provides the return value of the block
[13:25:33] jhass: you don't skip a iteration of the loop of the method invoking the block
[13:25:35] jhass: you return from it
[13:25:58] jhass: keep in mind that the method doesn't even need to have a loop
[13:26:14] pdoherty: has joined #ruby
[13:26:27] mehwork: are there blocks that aren't loops?
[13:26:56] jhass: >> {}.fetch(:none) { next :hey }
[13:26:57] ruboto: jhass # => :hey (https://eval.in/456004)
[13:27:08] Lewix: has joined #ruby
[13:27:21] adaedra: >> "hello".tap { |s| s.upcase! }
[13:27:22] ruboto: adaedra # => "HELLO" (https://eval.in/456005)
[13:27:50] imperator: has joined #ruby
[13:28:00] imperator: best way to define an alias on an instance?
[13:28:50] Lewix: imperator: alias on an instance?
[13:28:54] mehwork: jhass: so there's no way to do what i want to do?
[13:29:07] jerry_tao: has joined #ruby
[13:29:12] al2o3-cr: imperator: instance_eval ?
[13:29:15] imperator: Lewix, yep, need to dynamically define an alias
[13:29:31] jhass: mehwork: you can't skip an iteration of the method invoking your block, no. You can call .compact afterwards or .select beforehand
[13:29:36] favadi: has joined #ruby
[13:29:42] shevy: yeah I guess .instance_eval
[13:29:51] mwat: has left #ruby: ()
[13:29:59] mehwork: alright thanks
[13:30:02] Lewix: shevy: wouldn't it be for class methods
[13:30:16] jonnie: has joined #ruby
[13:30:35] shevy: ok so you are saying he should use .class_eval
[13:31:04] shevy: we need another eval to clear those other evals
[13:31:06] Lewix: imperator: what kind of instance are you talking about
[13:31:11] shevy: .power_eval
[13:31:27] freerobby: has joined #ruby
[13:32:02] al2o3-cr: >> class Foo; def boo; 42; end; end; f = Foo.new; f.instance_eval { alias :boohoo :boo }; f.boohoo
[13:32:03] ruboto: al2o3-cr # => 42 (https://eval.in/456018)
[13:32:13] jhass: shevy: would it propose trust votings to the interpreters leadership or would it measure the energy consumption of my ruby program?
[13:32:17] `tim`: has joined #ruby
[13:32:35] jhass: just so we know what kind of power we're talking about here
[13:32:36] mehwork: jhass: this worked ar = a.select { |i| i.even? }.map { |i| "#{i} is even" }
[13:32:54] jhass: mehwork: and I'd argue more readable too! ;)
[13:33:11] jhass: mehwork: you can also a.select(&:even?).map { ... }
[13:33:19] mhoungbo: has joined #ruby
[13:33:26] sl33k: hi guys. learning ruby
[13:33:33] shevy: jhass it can eval ALL THE THINGS!
[13:33:33] sl33k: in irb i type x = 10
[13:33:37] sl33k: followed by x.kind_of?
[13:33:43] sl33k: which throws an error
[13:33:49] dorei: has joined #ruby
[13:33:53] bauruine: has joined #ruby
[13:34:02] jhass: sl33k: well, let's read the error message together, what is it exactly?
[13:34:02] adaedra: sl33k: kind_of? takes an argument
[13:34:22] sl33k: so should be x.kind_of? Integer
[13:34:32] sl33k: ACTION missed it cos books typography
[13:34:36] sl33k: jhass: thanks mate
[13:34:43] jonnie: sl33k: x.class returns the class
[13:34:44] sl33k: hi all* (my bad)
[13:34:47] jonnie: as you might imagine
[13:35:10] mehwork: jhass: is the select any faster than just compact'ing after the fact? ( i guess it depends on how large the array grows )
[13:35:12] jonnie: sl33k: kind_of? takes inheritance into account
[13:35:17] treehug88: has joined #ruby
[13:35:19] sl33k: reading language is boring....cant wait to build something
[13:35:25] chriscarpenter12: jhass: Updated my gist to show how I'm getting my hash
[13:35:29] chriscarpenter12: jhass: https://gist.github.com/chriscarpenter12/510f9c2f08c0dcc1c294
[13:35:30] mhoungbo_: has joined #ruby
[13:35:45] jhass: mehwork: mmh, depends a bit on how many elements you can reduce
[13:36:34] jhass: mehwork: if the select can weed out many elements, the array .map needs to allocate is smaller, which can outweigh the overhead of iterating it twice
[13:37:29] jhass: mehwork: if there are few elements thrown out, compact's second iteration and checks being in all C could easily be faster
[13:37:50] chopin: has joined #ruby
[13:37:56] jhass: mehwork: so it depends, pick a preferred style unless you can prove a bottleneck though
[13:38:31] CloCkWeRX: has left #ruby: ()
[13:39:18] jhass: chriscarpenter12: I take it the query part is pseudocode?
[13:39:25] e1senhorn: has joined #ruby
[13:39:45] jhass: it would be the interesting part actually
[13:40:13] chriscarpenter12: Yes just two columns of like 20
[13:40:38] workmad3: has joined #ruby
[13:40:42] chriscarpenter12: the quantity and price column is a string
[13:40:51] chipotle: has joined #ruby
[13:41:33] nemo__: has joined #ruby
[13:42:21] tenderlove: has joined #ruby
[13:43:17] jhass: chriscarpenter12: also I'm curious, how exactly do you interop with PHP? serialize to JSON and parse on the PHP side?
[13:44:57] umgrosscol: has joined #ruby
[13:45:02] The_Phoenix: has joined #ruby
[13:45:31] RobertBirnie: has joined #ruby
[13:45:32] krz: has joined #ruby
[13:46:10] chriscarpenter12: jhass: This ruby I am writing is exporting products from an old website to a new woocommerce website. There are 25K products to export and manipulate. I am using this (https://github.com/jqr/php-serialize) to create the php serialized string. Which does work for me. I verified already that it can serialize my hash properly
[13:46:10] bmurt: has joined #ruby
[13:46:21] lkba: has joined #ruby
[13:46:31] JDiPierro: has joined #ruby
[13:46:51] jhass: chriscarpenter12: well, for starters your query should produce multiple rows with the two items, [[2, 20.0], [5, 15.0], [20, 10.0]]
[13:47:20] twe4ked: has joined #ruby
[13:47:58] civil_: has joined #ruby
[13:48:13] jhass: chriscarpenter12: would that thing serialize [{"from" => "2", ...}, {...}, {...}] to something compatible too?
[13:49:01] Soda: has joined #ruby
[13:49:25] nemo_: has joined #ruby
[13:50:19] ych: has joined #ruby
[13:50:20] karapetyan: has joined #ruby
[13:51:00] Xeago: has joined #ruby
[13:51:01] ruurd: has joined #ruby
[13:51:43] chriscarpenter12: jhass: Can I just show my whole script right now?
[13:51:49] twe4ked: has joined #ruby
[13:52:03] jhass: then you could just take the above alleged query result and rows.map.with_index {|row, i| next_row = rows[i+1]; {"from" => row[0], "to" => next_row && next_row[0], ...} }
[13:53:02] idefine: has joined #ruby
[13:53:43] tigarcia: has joined #ruby
[13:54:11] p0wn3d: has joined #ruby
[13:54:12] alcipir: has joined #ruby
[13:54:47] jhass: but it won't answer my second question
[13:54:58] Cyther: has joined #ruby
[13:55:01] Renich: has joined #ruby
[13:55:06] cdg: has joined #ruby
[13:55:11] Renich: has joined #ruby
[13:57:06] _blizzy_: has joined #ruby
[13:57:09] Renich: has joined #ruby
[13:57:26] atmosx: has joined #ruby
[13:57:36] Renich: has joined #ruby
[13:58:08] Renich: has joined #ruby
[13:59:30] The_Phoenix: has joined #ruby
[13:59:31] chriscarpenter12: jhass: Seeing if it will serialize that. Here is the whole file as well https://gist.github.com/chriscarpenter12/510f9c2f08c0dcc1c294
[13:59:56] chussenot: has joined #ruby
[14:00:37] synthroid: has joined #ruby
[14:00:52] benjito_: has joined #ruby
[14:01:51] TomyWork: has joined #ruby
[14:03:09] devoldmx: has joined #ruby
[14:04:09] dotix: has joined #ruby
[14:04:55] apeiros: too much alcohol and you do things like .sort_by(&:name).last instead of .max_by(&:name) :-|
[14:05:55] adaedra: tssk tssk tssk
[14:06:23] _blizzy_: has joined #ruby
[14:06:49] apeiros: well, not my fault they give us alcohol at work!
[14:07:02] skade: has joined #ruby
[14:07:31] jhass: chriscarpenter12: not sure I would be able to come up with something smarter without being able to play with the DB :/
[14:08:13] adaedra: apeiros: offices in Switzerland often give alcohol to employees?
[14:08:25] chriscarpenter12: jhass: Its no problem. Appreciate the help though!!
[14:08:32] jhass: chriscarpenter12: but things like eval(open(uri).read) are quire horrible, can't PHP do JSON?
[14:09:21] chriscarpenter12: I know it is, but this is a one time script. It just needs to work once
[14:10:00] alcipir: has joined #ruby
[14:10:01] jhass: anyway, you want to look at Array#map and Array#zip
[14:10:05] chriscarpenter12: The php code that generates the categories is terrible. I didn't write it. It is from the current website. I am just using it as is
[14:10:29] jhass: you don't want to turn the prize/quantity stuff into hash
[14:10:32] yeticry: has joined #ruby
[14:10:58] jhass: but with just quantity.map(&.to_i).zip(prizes.map(&.to_f))
[14:11:08] jhass: that'll give you what I suggested above as query result
[14:11:22] _blizzy_: has joined #ruby
[14:11:38] chriscarpenter12: jhass: Thanks. I'll use this and tinker.
[14:11:39] jhass: er, I wrote crystal, .map(&:to_i) / .map(&:to_f)
[14:12:12] nemo_: has joined #ruby
[14:12:19] jhass: well and there are tons of nitpicks in there tbh
[14:12:39] chriscarpenter12: I'm sure there are. I'm no expert by any meas
[14:13:09] Icey: has joined #ruby
[14:13:25] jhass: I still think the GROUP_CONCAT is fugly, but I'm not familiar enough with MySQL to tell a sane alternative just from looking (in postgres I'd return a proper array)
[14:13:31] chipotle: has joined #ruby
[14:13:48] agent_white: Is unqlite-ruby unmaintined? Or... just hasn't needed updates for over 2 years? :D
[14:13:53] Xeago: has joined #ruby
[14:14:01] jhass: ask the maintainer?
[14:14:02] sl33k: why is a Ruby constant mutable?
[14:14:10] sl33k: why is it then a constant? :/
[14:14:18] apeiros: adaedra: only on some occasions
[14:14:24] doublemalt_: has joined #ruby
[14:14:25] agent_white: jhass: Not worth the hassle. Just looking for a teenee nosql db for ruby.
[14:14:30] SleepySensei: has joined #ruby
[14:14:47] chriscarpenter12: jhass: I agree, but the database also wasn't setup properly in the first place
[14:14:58] sl33k: jhass: ^^
[14:15:15] apeiros: ACTION now enjoying rewriting `git branch --contain COMMIT` with rugged :D
[14:15:16] sl33k: Constants shouldn't be mutable.
[14:15:23] zwdr: aren't symbols immutable?
[14:15:23] jhass: sl33k: so you can shoto yourself into the foot if you need to
[14:15:29] jatb: has joined #ruby
[14:15:33] apeiros: zwdr: yes, symbols are immutable
[14:15:44] jhass: zwdr: they are, but they are also values and not identifiers
[14:15:50] sl33k: jhass: duck typed; dynamic languages are bleh.
[14:15:52] jhass: like Constants
[14:15:57] bmurt: has joined #ruby
[14:16:00] pusewicz: has joined #ruby
[14:16:07] zwdr: tbh I never thought much about symbols and always assumed they were like symbols in Lisp
[14:16:21] mistermocha: has joined #ruby
[14:16:24] idefine: has joined #ruby
[14:16:26] sl33k: was reading angularjs the other day, and a constant factory or so can be mutable too.
[14:16:27] jhass: sl33k: ruby will yell at you if you actually reassign a constant though
[14:16:39] zwdr: but angular is a mess either way
[14:16:44] tris: has joined #ruby
[14:16:46] apeiros: constant in ruby means "constantly referencing the same object"
[14:16:56] sl33k: jhass: it gives me a warning. What is the benefit of a constant in ruby?
[14:16:58] apeiros: the object's mutability is controlled by the object itself
[14:17:05] jhass: sl33k: its scoping rules
[14:17:26] jhass: sl33k: also to carry intent
[14:17:35] Igorshp: has joined #ruby
[14:18:04] sl33k: jhass: okay. (i'll just tag along for now). its weird though
[14:18:09] The_Phoenix: has joined #ruby
[14:18:10] jhass: sl33k: pretty much everything in Ruby is not actually restrictive (that is can be bypassed), it's for signaling intent
[14:18:23] jhass: *that is it
[14:18:57] dionysus69: has joined #ruby
[14:19:41] tenderlove: has joined #ruby
[14:19:42] tenderlove: has joined #ruby
[14:20:21] jhass: chriscarpenter12: well, if you get it working and want it rewritten in idiomatic ruby ping back then, even though I won't be able to do something about the general approaches
[14:20:43] imperator: has joined #ruby
[14:22:37] favadi: has joined #ruby
[14:22:57] rippa: has joined #ruby
[14:23:45] TomyWork: how do i pass a block from one method to another?
[14:24:42] TomyWork: def thismethod(&block); mymethod(&block); end # this didnt work
[14:25:08] chussenot: has joined #ruby
[14:25:33] jhass: TomyWork: it should, got a testcase to prove?
[14:25:38] TomyWork: hmm, in itself it works...
[14:25:45] stannard: has joined #ruby
[14:25:52] Renich: has joined #ruby
[14:28:37] l_tonz: has joined #ruby
[14:29:10] sasdasd: has joined #ruby
[14:29:50] relix_: has joined #ruby
[14:30:55] ef: has left #ruby: ()
[14:31:31] jgt: has joined #ruby
[14:32:09] imperator: Lewix, OpenStruct
[14:35:30] govt_official: has joined #ruby
[14:35:51] bricker: has joined #ruby
[14:35:59] govt_official: good morning ruby-ers
[14:36:50] tigarcia: has joined #ruby
[14:37:55] dnewkerk: has joined #ruby
[14:38:12] l_tonz: has joined #ruby
[14:38:13] dnomyar: has joined #ruby
[14:38:49] aryaching: has joined #ruby
[14:39:09] sl33k: ending method names with = is ewww
[14:39:33] dnomyar: has joined #ruby
[14:39:36] sl33k: cos i wouldn't know, and i would want to put a space between the = during code formattng. (weird convention)
[14:39:37] jonnie: has joined #ruby
[14:39:48] kies^: has joined #ruby
[14:40:09] pathrocle: has joined #ruby
[14:40:57] macowie: has joined #ruby
[14:41:07] greedo: can anyone that uses faraday tell me why when trying to upload a file I keeping getting "no multipart boundary param in Content-Type"
[14:42:26] Igorshp: has joined #ruby
[14:43:28] diegoaguilar: has joined #ruby
[14:43:31] jhass: sl33k: well, the point is that you can on the call side
[14:43:47] i: has joined #ruby
[14:43:52] nemo_: has joined #ruby
[14:44:00] jhass: >> class Foo; def foo=(bar); @foo = bar; end; end; foo = Foo.new; foo.foo = "hi"; foo
[14:44:01] ruboto: jhass # => #<Foo:0x41797e6c @foo="hi"> (https://eval.in/456074)
[14:45:07] sl33k: jhass: foo.foo= OR foo.foo =
[14:45:13] sl33k: notice i put a space
[14:45:21] sl33k: i thought latter would fail
[14:45:46] zotherstupidguy: has joined #ruby
[14:46:45] jhass: sl33k: on the call side it doesn't
[14:47:00] jhass: all attr_writer does is generate a method with that name
[14:48:06] linduxed: has joined #ruby
[14:50:59] sl33k: dont understand that. book says there is a better way. prolly meant attr_writer
[14:51:55] karapetyan: has joined #ruby
[14:53:14] JJM: has joined #ruby
[14:53:34] Renich: has joined #ruby
[14:54:13] devoldmx: has joined #ruby
[14:54:19] alcipir: has joined #ruby
[14:55:25] caliostro: has joined #ruby
[14:57:09] pusewicz: has joined #ruby
[14:59:05] decoponio: has joined #ruby
[14:59:48] TomyWork: jhass nm i wasnt passing the block on recursively in one place
[15:00:12] dfinninger: has joined #ruby
[15:00:21] TomyWork: and i kinda expected it to tell me that i was missing arguments :)
[15:00:31] TomyWork: i guess that's not true for blocks
[15:00:37] jhass: nope, foo(&nil) is just fine :P
[15:00:52] TomyWork: or just foo
[15:00:53] jhass: the block argument sort of is always implicitly there, just nil if not given
[15:01:12] jhass: so foo(&nil) and just foo() is indeed the same call
[15:01:31] jhass: I think, not sure if block_given? is sensitive to that
[15:02:32] TomyWork: yeah, not using that anyway :)
[15:02:50] TomyWork: another question: can i "next" out of an block enclosing the current block?
[15:03:20] big|bad|wolf: has joined #ruby
[15:03:28] TomyWork: hmm maybe i dont even need to...
[15:03:49] dionysus69: has joined #ruby
[15:03:56] TomyWork: i have an array, i want to test each element and if i find one that matches, abort testing and leave the block where i started
[15:04:32] TomyWork: looks like i want "any?"
[15:05:02] cooperlebrun: has joined #ruby
[15:05:36] Xeago: has joined #ruby
[15:10:21] platzhirsch: has left #ruby: ()
[15:10:57] chipotle: has joined #ruby
[15:12:36] treehug88: has joined #ruby
[15:12:48] EminenceHC: has joined #ruby
[15:13:25] mary5030: has joined #ruby
[15:14:15] mary5030: has joined #ruby
[15:15:37] mary5030: has joined #ruby
[15:15:51] zotherstupidguy: has joined #ruby
[15:16:03] tenderlove: has joined #ruby
[15:16:03] tenderlove: has joined #ruby
[15:16:31] idefine: has joined #ruby
[15:17:22] alcipir: has joined #ruby
[15:18:11] shredding: has joined #ruby
[15:18:41] slawrence00: has joined #ruby
[15:18:47] rbennacer: has joined #ruby
[15:18:52] sepp2k: has joined #ruby
[15:19:30] Hamled: has joined #ruby
[15:19:48] Igorshp: has joined #ruby
[15:19:55] clx_: has joined #ruby
[15:20:47] Hamled: Is this a good place to ask about WEBrick? I'm trying to figure out the best way to use WEBrick while handling the "bad request-line" exception that gets raised from parse().
[15:21:06] Xeago: has joined #ruby
[15:22:30] dfockler: has joined #ruby
[15:23:04] codecop: has joined #ruby
[15:24:18] rbennacer: has joined #ruby
[15:24:21] benjito: has joined #ruby
[15:24:45] tigarcia: has joined #ruby
[15:25:42] devoldmx: has joined #ruby
[15:26:11] pdoherty: has joined #ruby
[15:28:04] bruno-: has joined #ruby
[15:29:20] yeticry: has joined #ruby
[15:31:01] zotherstupidguy: has joined #ruby
[15:31:41] step1step2__: has joined #ruby
[15:32:44] haylon: Hey guys. I asked this in #bundler about 3hrs ago. Is bundler capable of updating older gems so that the gemspec looks for the exe folder and adds the new bin/console and bin/setup scripts?
[15:32:57] Igorshp: has joined #ruby
[15:32:57] prestorium_: has joined #ruby
[15:34:04] freerobby: has joined #ruby
[15:34:12] inteq: has joined #ruby
[15:34:23] monsieurp: has joined #ruby
[15:35:04] mary5030: has joined #ruby
[15:35:56] haylon_: has joined #ruby
[15:36:42] havenwood: Hamled: This is a good place. Do you need to use WEBrick instead of one of the Rack webserver gems?
[15:37:15] dionysus69: has joined #ruby
[15:37:21] cwong_on_irc: has joined #ruby
[15:37:22] Hamled: Perhaps not. I hadn't considered alternatives. By rack webserver gems do you mean thin/puma?
[15:37:33] govt_official: thin is pretty great
[15:37:37] havenwood: haylon: Say more about what you mean by looking for the exe folder? What older gems are you thinking of?
[15:37:53] cwong_on_irc: has joined #ruby
[15:38:04] tigarcia: has joined #ruby
[15:38:18] Hamled: My goal is to create an interactive tutorial to HTTP by having students write basic HTTP requests and displaying very minimal responses (like no headers or anything)
[15:38:18] havenwood: haylon: Puma, Thin, Unicorn, Rainbows! and Passenger are all options.
[15:38:33] havenwood: haylon: Oops, misstell.
[15:38:54] haylon_: havenwood, if you use bundler 1.9 or 1.10, they changed where the binaries go and changed the gemspec mostly. I can do it all by hand and check to make sure the gemspecs are the same, but I was wonering if htere was a functionality like that already
[15:38:55] Hamled: I'll definitely look into whether those would give me more flexibility
[15:39:22] bruno-_: has joined #ruby
[15:39:30] havenwood: Hamled: Nice.
[15:40:08] havenwood: Hamled: If your students aren't yet all familiar with curl HTTPie might be a nice way to show them responses: https://github.com/jkbrzt/httpie#readme
[15:40:41] havenwood: Hamled: Or in Ruby the HTTP.rb gem's interface is nice and it's a good HTTP client: https://github.com/httprb/http#readme
[15:41:05] purplexed^: has left #ruby: ()
[15:41:16] havenwood: Hamled: Showing how to make a Rack app might be fun.
[15:41:43] Hamled: yeah we'll be getting to sinatra pretty quickly, dunno how much we'll go into the rack aspect of it just yet, though
[15:41:46] Hamled: thanks for the suggestions!
[15:41:54] havenwood: Hamled: Here're a variety of Hello World apps in various Rack adapters including Sinatra: https://github.com/luislavena/bench-micro/tree/master/apps
[15:41:58] havenwood: Hamled: Aha. Nice.
[15:42:29] aryaching: has joined #ruby
[15:42:36] havenwood: Hamled: Roda is great. I think it would make a good teaching framework.
[15:42:59] havenwood: Starts as just a routing tree and you add in features via plugins.
[15:43:13] jonnie: Hamled: ive hacked on the webrick code before. it aint pretty
[15:43:18] jonnie: id definitely use something else
[15:43:28] havenwood: Puma makes for much nicer code to look at under the hood.
[15:43:39] ruby-lang953: has joined #ruby
[15:43:42] jonnie: also webrick is dog slow. its due for removal from stdlib to be honest
[15:43:52] karapety_: has joined #ruby
[15:44:00] havenwood: Hamled: Puma would also be a nice chance to later look at ThreadPool, etc.
[15:44:04] jenrzzz: has joined #ruby
[15:44:14] step1step2: has joined #ruby
[15:44:53] Hamled: jonnie, speed definitely is of no concern in this particular case. But yeah... just looking at where the bad request exception gets raised when it can't parse the request line... it's hard to see how I could handle that differently w/o digging into the guts
[15:45:30] jonnie: you think speed isnt a concern but it will drive you mad in development, water torture style
[15:45:52] baroquebobcat: has joined #ruby
[15:45:57] [Butch]: has joined #ruby
[15:46:13] haylon_: well, havenwood, I have to take off. We have some midnight code releases that I need to be present for.
[15:46:18] haylon_: later guys
[15:46:21] eam: I mean, if you're really looking at the basics of a single request speed really won't be an issue
[15:46:37] shevy: they use ruby not C!
[15:46:52] jonnie: no i mean all those little delays when hes iterating his teaching platform in development
[15:46:53] Hamled: my top concern is absolute control over the request and response parsing... ideally w/o having to write something directly ontop of the socket lib
[15:46:54] eam: you could even just write your own simplistic server if you want to let students understand it (sans parallelism, for example)
[15:47:03] Hamled: jonnie, yah I gotcha
[15:47:04] jonnie: waiting 3 seconds for it to boot rather than 0.5, it adds up
[15:47:13] eam: ah, startup time
[15:47:20] finisherr: has joined #ruby
[15:47:32] bruno-_: has joined #ruby
[15:47:46] eam: Hamled: you said "no headers" - if you're limiting things to http 0.9 it's kinda trivial to make an example server
[15:48:20] havenwood: eam: That reminds me of a recent writeup: http://jakeyesbeck.com/2015/10/18/building-a-simple-web-server-with-ruby-2-part-2/
[15:48:26] havenwood: Hamled: ^ Might be interesting to look at.
[15:48:41] s00pcan: has joined #ruby
[15:49:13] eam: looks about right :)
[15:49:31] Xeago: has joined #ruby
[15:49:33] Hamled: eam, well it would be no headers to begin with... we definitely need to introduce the concept of headers and probably talk about Server and Cookie
[15:49:47] bricker: has joined #ruby
[15:50:11] EminenceHC: has joined #ruby
[15:51:22] Hamled: okay gtg, thanks again for everyone's support and suggestions
[15:52:38] wldcordeiro: has joined #ruby
[15:52:41] Alina-malina: has joined #ruby
[15:52:49] l_tonz: has joined #ruby
[15:53:13] yorickpeterse: Anybody here on an IPv4 only network?
[15:53:40] yorickpeterse: If so, can you run this and tell me the output: require 'socket'; p Socket.getaddrinfo('localhost', nil)
[15:54:06] EminenceHC: has joined #ruby
[15:54:28] nettoweb: has joined #ruby
[15:56:05] Xeago: has joined #ruby
[15:56:55] Jardayn: has joined #ruby
[15:57:18] RobertBirnie: has joined #ruby
[15:57:19] yorickpeterse: require 'socket'; p Socket.getaddrinfo('::1', nil)
[15:58:54] amclain: has joined #ruby
[15:59:01] skade: has joined #ruby
[15:59:10] jpfuentes2: has joined #ruby
[16:01:27] arup_r: has joined #ruby
[16:01:31] imperator: yorickpeterse, how would i know if i am?
[16:01:39] imperator: (I'm at home, btw, i've no idea)
[16:01:54] relix: has joined #ruby
[16:02:19] dotix: has joined #ruby
[16:02:33] yorickpeterse: ping6 google.com
[16:02:55] baroquebobcat: has joined #ruby
[16:03:09] idefine: has joined #ruby
[16:03:09] imperator: ping6: UDP connect: No route to host
[16:03:25] yorickpeterse: context: Ruby's Addrinfo#ip_address method returns different local IPs depending on if you used an empty string or nil as the input IP for Addrinfo#initialize
[16:03:42] yorickpeterse: with '' it seems to return '::1' for me, with nil it returns '0.0.0.0'
[16:04:16] Asher: has joined #ruby
[16:05:53] chipotle: has joined #ruby
[16:07:31] [Butch]: has joined #ruby
[16:07:39] chris2: has joined #ruby
[16:07:50] Motoservo: has joined #ruby
[16:08:14] dopamean_: has joined #ruby
[16:08:40] skweek: has joined #ruby
[16:10:00] arthurix_: has joined #ruby
[16:10:34] bricker: has joined #ruby
[16:10:44] yorickpeterse: Here's another nice what the fuck:
[16:11:11] yorickpeterse: Addrinfo#ip_address is supposed to raise if the address family is not AF_INET/AF_INET6, but there's no way to test this in MRI
[16:11:30] yorickpeterse: Since the Ruby API has no means of creating an Addrinfo with, say, AF_UNSPEC as Addrinfo#initialize already prevents this
[16:11:39] yorickpeterse: So basically you can't test it from Ruby
[16:11:52] bryanray: has joined #ruby
[16:11:53] yorickpeterse: But Socket#recvfrom returns Addrinfo instances without IP addresses
[16:11:56] yorickpeterse: so you do _have_ to test it
[16:13:10] bonhoeffer: has joined #ruby
[16:13:55] Layke: has joined #ruby
[16:14:08] Layke: Hey. Do these errors make sense? I'm not sure on the problem. https://gist.github.com/anonymous/0cfe558d960342e17716
[16:14:25] tkuchiki: has joined #ruby
[16:15:15] shevy: you lack the haml gem
[16:16:52] EminenceHC: has joined #ruby
[16:17:00] willardg: has joined #ruby
[16:18:35] rdark: has joined #ruby
[16:18:35] rdark: has joined #ruby
[16:19:10] imperator: yep, gem install haml
[16:19:30] atmosx_laptop: has joined #ruby
[16:19:30] pdoherty: has joined #ruby
[16:19:48] apeiros: Layke: I know errors can be intimidating. but it helps reading them anyway.
[16:20:03] apeiros: in this error, the first line helps you: "`require': cannot load such file -- haml"
[16:20:11] Layke: apeiros, I'm somewaht confused though. My gem.lock file has haml
[16:20:15] Layke: And I ran a bundleinstall
[16:20:23] Layke: Should that not install the gem for me?
[16:20:23] apeiros: Layke: then you omitted bundle exec
[16:20:30] Layke: (I don't use ruby so I'm new)
[16:20:37] apeiros: try `bundle exec jekyll build`
[16:20:42] Alayde: has joined #ruby
[16:20:44] SleepySensei: has joined #ruby
[16:21:00] Layke: That worked
[16:21:03] Layke: Can you expalin it for me?
[16:21:10] Layke: What does "bundle exec" differ?
[16:21:20] shevy: apeiros can explain the magic :)
[16:21:22] s2013: has joined #ruby
[16:21:28] Layke: (Thank you by the way, this erro has meant I've been stuck deploying documentation for the last 5 months)
[16:21:50] chopin: has joined #ruby
[16:21:56] apeiros: depends a bit. basically it means "run this and use the gems (and only those gems) installed through bundle install"
[16:22:08] apeiros: and in your case it means that bundle install doesn't install those gems globally.
[16:22:19] apeiros: which is why they weren't available without bundle exec.
[16:22:33] Layke: Thank you very much ! :D
[16:22:47] bollullera: has joined #ruby
[16:24:42] towski_: has joined #ruby
[16:24:52] rdark: has joined #ruby
[16:24:53] yosiat: has joined #ruby
[16:25:41] Maletor: has joined #ruby
[16:26:10] arup_r: has joined #ruby
[16:28:06] Igorshp: has joined #ruby
[16:28:13] lxsameer: has joined #ruby
[16:28:30] _djbkd: has joined #ruby
[16:29:20] symm-: has joined #ruby
[16:32:08] alcipir: has joined #ruby
[16:32:55] idefine: has joined #ruby
[16:33:29] jgt: has joined #ruby
[16:34:21] last_staff: has joined #ruby
[16:34:41] c0m0: has joined #ruby
[16:34:52] ramfjord: has joined #ruby
[16:36:06] AlexRussia: has joined #ruby
[16:36:42] momomomomo: has joined #ruby
[16:37:59] caliostro: has joined #ruby
[16:38:46] caliostro: i am looking for a ruby debugger
[16:39:24] rdark: has joined #ruby
[16:41:58] rbennacer: has joined #ruby
[16:42:38] nertzy: has joined #ruby
[16:44:21] synthroid: has joined #ruby
[16:45:02] jenrzzz: has joined #ruby
[16:45:29] sdothum: has joined #ruby
[16:45:45] asad_: has joined #ruby
[16:46:02] asad_: For converting blocks to procs, and vice versa...is & a method or just syntax?
[16:46:30] Ulfalizer: has joined #ruby
[16:47:15] j4cknewt: has joined #ruby
[16:48:16] trabulmonkee: has joined #ruby
[16:49:43] leafybas_: has joined #ruby
[16:50:18] arthurix: has joined #ruby
[16:50:55] Xeago: has joined #ruby
[16:52:27] Ulfalizer: is 'gem install' supposed to automatically install dependencies even when you run it on a local *.gem file (by supplying its path)? doesn't seem to work for e.g. 'gem install nokogiri-1.6.6.2.gem'. it complains that mini_portile is missing.
[16:52:56] Ulfalizer: i'm a ruby noob trying to integrate some ruby modules into a dev. environment setup script
[16:53:01] nofxx: has joined #ruby
[16:53:01] nofxx: has joined #ruby
[16:53:06] Ulfalizer: ok, wonder what might be wrong then...
[16:53:33] pathrocle: has joined #ruby
[16:53:37] ayonkhan: has joined #ruby
[16:54:23] ruurd: has joined #ruby
[16:54:29] rewzn: has joined #ruby
[16:55:00] bmurt: has joined #ruby
[16:55:32] Veejay: caliostro: Have a look at Pry (http://pryrepl.org/)
[16:55:36] niftylettuce: has joined #ruby
[16:56:22] Veejay: It's nothing short of excellent
[16:58:03] ferr: has joined #ruby
[16:58:50] tomphp: has joined #ruby
[16:59:11] mrmadcat: has joined #ruby
[17:01:15] benjito: has joined #ruby
[17:01:30] chriscarpenter12: jhass: Got my serialized value now. Just wanted to say thanks again. Definitely not the best code, but it is working for all my products. https://gist.github.com/chriscarpenter12/510f9c2f08c0dcc1c294#file-export-rb-L36
[17:01:35] jessemcgilallen: has joined #ruby
[17:01:41] anisha: has joined #ruby
[17:01:55] firstdayonthejob: has joined #ruby
[17:02:17] Musashi007: has joined #ruby
[17:02:33] caliostro: what do u think about the default debugger .. ruby -r debug filename[, ...]
[17:02:52] caliostro: i am looking for a simple one to learn
[17:02:55] tigarcia: has joined #ruby
[17:03:12] lubarch: has joined #ruby
[17:03:27] baroquebobcat: has joined #ruby
[17:03:47] mikecmpbll: has joined #ruby
[17:03:53] lubarch: has joined #ruby
[17:05:22] `tim`: has joined #ruby
[17:05:38] Veejay: caliostro: Can't tell, never used it
[17:06:28] based_pdev_: has joined #ruby
[17:06:37] leafybasil: has joined #ruby
[17:07:15] danman: has joined #ruby
[17:10:27] naztharune: has joined #ruby
[17:12:49] idefine: has joined #ruby
[17:12:58] arthurix_: has joined #ruby
[17:13:21] spankthemonkee: has joined #ruby
[17:14:15] Maletor: has joined #ruby
[17:14:47] RegulationD: has joined #ruby
[17:15:14] patdohere: has joined #ruby
[17:15:19] jhass: chriscarpenter12: so PHP.serialize([{...}, {...}, ...]) didn't generate usable output?
[17:15:26] Hanmac: shevy did you miss me? did you hear the recent ruby news? ;P
[17:17:39] rbowlby: has joined #ruby
[17:18:28] chopin: has joined #ruby
[17:19:03] gregf: has joined #ruby
[17:19:08] Wolfram74: has joined #ruby
[17:19:35] Wolfram74: I'm trying to run a sinatra server locally with some name besides localhost, -o short almost works, but then i get a socket error
[17:19:56] bluOxigen: has joined #ruby
[17:19:57] Wolfram74: running a mac environment, is there some extra set up I have to do?
[17:19:58] rcvalle: has joined #ruby
[17:20:38] shevy: hanmac what news? and since you have been working, you basically became inactive :(
[17:20:46] chriscarpenter12: jhass: No I still had to pass the hash, but by getting the values into an array like you suggested I was able to get the output that I needed
[17:20:55] mg^^: wolfram74: the hostname you give has to resolve to an IP address.
[17:21:18] jhass: chriscarpenter12: mmh, weird, so it needs to be 1-indexed or why?
[17:21:18] Wolfram74: so, instead of -o short, maybe -o short:8081?
[17:21:43] Hanmac: shevy i see the log that you noticed .? already ... hm and that loop and stop iteration returns the value of it probably too
[17:23:15] Hanmac: and my system becomes wily ;P
[17:23:22] mg^^: wolfram74: for port you need to use -p
[17:23:32] mg^^: -o short -p 8081
[17:23:58] sebstrax: has joined #ruby
[17:24:12] Wolfram74: yeah, -p works fine
[17:24:22] Wolfram74: so, it's order dependent?
[17:24:40] Wolfram74: nerp, still errors
[17:24:57] Wolfram74: http://dpaste.com/3KZQAQ6
[17:25:02] mg^^: wolfram74: it shouldn't be. But short has to be valid... e.g. resolvable to an IP address
[17:25:03] shevy: hanmac no real idea, so far I didn't see any news that excite me about ruby's future honestly
[17:25:36] dotix: has joined #ruby
[17:25:37] Wolfram74: so maybe there's something about my internal routing that's not happy?
[17:25:39] Hanmac: nil.?this.?is.?very.?funny ;P
[17:25:40] Diabolik: shevy what are your thoughts on ruby's future?
[17:25:42] pulgolino: has joined #ruby
[17:26:45] NeverDie: has joined #ruby
[17:27:03] bricker: hanmac: where can I read about this news
[17:27:14] dravine: has joined #ruby
[17:27:21] mg^^: wolfram74: with your resolver. "short" needs to be resolvable in your hosts file (or whatever the Mac uses) or DNS (mDNS), to an IP address on your system
[17:27:29] chopin: has joined #ruby
[17:27:46] Wolfram74: ok, I'll rumage around for that information, thanks for helping me rule it out as a ruby problem
[17:28:03] Wolfram74: mg^^ thanks
[17:28:12] ramfjord: has joined #ruby
[17:28:22] Hanmac: bricker: https://github.com/ruby/ruby/blob/trunk/NEWS#L21-L33
[17:28:22] shevy: Diabolik I dunno... it just isn't the same as it used to be anymore. matz seems to put most time into mruby, which is fair enough but projects always change with different core maintainers; and none of the major changes seem to give me anything I really need. It's mostly very small changes that lead to an improve, if at all
[17:28:27] bricker: hanmac: thanks
[17:28:57] shevy: hanmac ah yeah I remember. Well it does not affect me since I don't have to use it, so that is ok for me. Static strings forcing me to change the way how I used to write ruby though now that is annoying
[17:29:44] Wolfram74: is it illadvised to have the same thing mapped to the same IP address?
[17:29:56] Wolfram74: like, 127.0.0.1 is localhost AND short?
[17:30:03] Diabolik: shevy are you moving to using elixir more?
[17:30:40] eam: wolfram74: no problem having two names resolve to the same ip
[17:31:35] shevy: Diabolik nah, I don't see what elixir improves compared to ruby. it would have to be a language that is better than ruby
[17:32:09] Diabolik: shevy it has a more solid direction imo
[17:32:47] Mudak: has joined #ruby
[17:32:54] shevy: it looks to be like one of those "show up then fade away" languages
[17:33:07] NeverDie: has joined #ruby
[17:33:20] Diabolik: shevy what do you find yourself moving to instead?
[17:33:20] alcipir: has joined #ruby
[17:33:29] shevy: there are not so many choices :(
[17:33:54] eam: shevy likes php
[17:33:56] shevy: python would make sense but for some reason, python feels wrong
[17:34:08] EminenceHC: has joined #ruby
[17:34:29] mg^^: Python always feels wrong to me, too
[17:34:38] Hanmac: shevy: RPGMV is out, but it does swap ruby with javascript ... and now it does have to deal with the consequences ... :P
[17:34:50] mg^^: We inherited a big python codebase, I hate reading it after using Ruby for the last year
[17:34:59] mg^^: I hate reading Perl now, too, and that used to be my staple
[17:35:39] shevy: perl 6 has had some nice ideas, it should have been out 10 years ago
[17:36:06] mg^^: Perl 6 was also really slow last time I looked at it. Made Ruby look like a race car
[17:36:23] Mudak: vroom vroom ruby race car
[17:36:53] mg^^: And yeah, the lack of Perl 6 reaching a decent "release" status is really what pushed me to Ruby
[17:37:07] eam: really? I just want perl5
[17:37:34] shevy: perl5 feels like the 1980s
[17:37:47] shevy: writing perl .cgi was fun though
[17:37:55] eam: shevy: and the 1980s was awesome (1990s fyi)
[17:38:22] Mudak: eam: https://www.youtube.com/watch?v=dOV5WXISM24
[17:38:41] shevy: I wonder if younger people today also think that their time-of-youth was more awesome than the later years :)
[17:39:22] shevy: 1980 was the time of B-movies! Conan... Terminator ... nightmare on elm street...
[17:39:51] shevy: and scripting languages
[17:39:53] eam: Terminator isn't a B movie
[17:39:56] shevy: well, perl at least
[17:40:10] ibouvousaime: has joined #ruby
[17:40:13] eam: 80s action movies are far, far better than the tripe that comes out these days
[17:40:16] tvw: has joined #ruby
[17:40:23] mg^^: Now don't get me wrong, I liked writing Perl, but I was craving more pure object orientation because it helps me write better, more maintainable stuff. Plus, since I'm mainly a tools & automation guy I needed to get on board with Puppet.
[17:40:37] mg^^: so it was a natural transition
[17:40:44] eam: compare die hard to any of its sequels
[17:40:50] Ulfalizer: i don't like most modern movies. i wonder if i'm getting old...
[17:40:56] shevy: eam yeah, you don't need to convince me, I know you are right!
[17:41:04] shevy: all those crappy cgi effects that came later
[17:41:05] psye: has joined #ruby
[17:41:05] Ulfalizer: it's like every director has ADD nowadays. story telling is boring, apparently.
[17:41:07] eam: or any eddie murphy movie!
[17:41:12] Ulfalizer: ACTION waves his fist
[17:41:18] pathrocle: has joined #ruby
[17:41:43] pathrocle: has joined #ruby
[17:41:44] Mudak: mg^^: https://www.youtube.com/watch?v=kV-2Q8QtCY4
[17:41:47] shevy: Ulfalizer yeah sorta. I like Christopher Nolan though
[17:41:57] ibouvousaime: Can someone help me with this error ? http://i.imgur.com/FmsOllV.png
[17:42:00] Ulfalizer: yeah, the batman movies were alright
[17:42:16] shevy: ibouvousaime why do you use images
[17:42:33] eam: 80s: beverly hills cop, 48 hrs. 2000s: the nutty professor
[17:42:52] ibouvousaime: its easier too look at and also its contains results too shevy
[17:43:00] shevy: ibouvousaime can I copy paste the image
[17:43:42] arthurix: has joined #ruby
[17:43:48] ibouvousaime: shevy, http://pastie.org/10502414
[17:43:49] Ulfalizer: the nutty professor is from '96
[17:44:08] eam: Ulfalizer: nutty professor II the klumps is 2000 though
[17:44:17] Ulfalizer: also, next year it'll be 20 years since mario 64 was released. that gets me pretty bad.
[17:44:31] mg^^: Mudak: being a child of the 90s, Metallica is still one of my favorite bands
[17:44:33] eam: but yeah he hasn't done anything good since 95 or so
[17:44:39] Ulfalizer: i never saw II
[17:44:42] Ulfalizer: probably lucky :P
[17:44:53] eam: there's a beverly hills cop 4 in production. I'm not sure how I feel about that
[17:44:53] shevy: ibouvousaime did you try to not have a ' ' before you invoke the ()
[17:44:58] Mudak: mg^^: thats the first time i heard them in a while, i dont miss them lol
[17:45:14] cidic: has joined #ruby
[17:45:18] Mudak: too dark/death metal for me
[17:45:32] ibouvousaime: on what lines shevy ?
[17:45:33] al2o3-cr: has joined #ruby
[17:45:35] eam: metallica is dark?
[17:45:40] Mudak: for me ya
[17:46:01] jenrzzz: has joined #ruby
[17:46:10] shevy: ibouvousaime where you use Message.new
[17:46:17] cidic: I am trying to understand / convert some ruby code to php I have a rough idea of how the ruby syntax works but need some help understanding a code example http://rubyquiz.com/quiz56.html
[17:46:19] shevy: the ruby parser can be strict sometimes
[17:46:19] Ulfalizer: comparing metallica to death metal feels weird... :P
[17:46:19] EminenceHC: has joined #ruby
[17:46:22] ibouvousaime: thank you shevy
[17:46:23] Ulfalizer: especially 90s metallica
[17:46:47] shevy: Ulfalizer hehe... but I guess you are also not one of the youngest people anymore right? :)
[17:47:06] eam: 90s metallica is basically alt-rock
[17:47:11] Mudak: yea thats how clueless i am about that type of music but metallica is as close to death metal as i wanna go, and its probably still far from it. their songs are never happy.
[17:47:27] Ulfalizer: shevy: don't want to come across as too old, but i've passed 30 at least :P
[17:47:40] shevy: yeah past 30 is already very old
[17:47:56] cidic: anyone willing to take 5 min to help me?
[17:48:02] eam: how do you type with your arthritic, gnarled claws of hands?
[17:48:27] Ulfalizer: i'm fueled by my hatred of the youngins
[17:48:38] eam: *millennials*
[17:48:46] eam: ACTION raises fist
[17:48:49] Ulfalizer: or "90s kids"
[17:48:53] shevy: Mudak yeah it wasn't my style of music either, although I liked re-samplings like concert-performances of "nothing else matters" in an ennio morricone style
[17:48:57] mg^^: Heh, I have also gained a fair bit of "get off my lawn" attitude over the last few years :)
[17:49:28] eam: let's be honest, king of 80s rock is David Lee Roth
[17:49:34] workmad3: shevy: how about if I'm not past 30, but not younger than 30 either?
[17:49:38] workmad3: shevy: does that make me old?
[17:49:47] Mudak: any music can be my style it depends on my mood but my mood very rarely appreciates metallica
[17:49:50] shevy: perl first appeared in 1987
[17:50:01] shevy: workmad3 you are also old
[17:50:02] workmad3: shevy: crap, I'm older than perl :(
[17:50:45] shevy: ruby appeared in 1995
[17:50:45] eam: workmad3: but not older than unix!
[17:50:50] mg^^: I'm almost as old as the Apple I
[17:50:52] shevy: that's actually a 8 years gap to perl
[17:51:08] davedev24: has joined #ruby
[17:51:22] workmad3: eam: no, thankfully not older than unix :)
[17:51:28] shevy: was there any contender to perl back then?
[17:51:31] mg^^: I should probably think about how I'm going to move into management within the next few years
[17:51:34] eam: shevy: awk
[17:52:05] mg^^: shevy: rexx
[17:52:13] shevy: the dinosaur?
[17:52:43] clx: has joined #ruby
[17:52:59] mg^^: heh, one too many 'x' for that :)
[17:53:02] cyle: has joined #ruby
[17:53:05] bryanray: has joined #ruby
[17:53:07] eam: check out that awesome logo, it screams 80s: https://en.wikipedia.org/wiki/Rexx#/media/File:Rexx-img-lg.png
[17:53:16] mg^^: But a dinosaur in terms of computing history, yes
[17:53:37] janelleb: has joined #ruby
[17:54:10] Ulfalizer: i'm tired of modern minimalism
[17:54:12] mg^^: Damn I forgot about that logo
[17:54:18] eam: and now I'm browsing /r/outrun
[17:54:22] mg^^: looks like it'd pop up on an atari cartridge :)
[17:55:31] cidic: I am trying to understand / convert some ruby code to php / js I have a rough idea of how the ruby syntax works but need some help understanding a code example http://rubyquiz.com/quiz56.html
[17:55:36] Soda: has joined #ruby
[17:56:47] bmalum_: has joined #ruby
[17:57:18] yeticry: has joined #ruby
[17:57:20] p0wn3d: has joined #ruby
[17:57:48] ruurd: has joined #ruby
[17:58:19] baweaver: has joined #ruby
[17:58:20] shevy: ruby code to php?
[17:58:27] shevy: ah, you write in php normally
[17:58:45] karapetyan: has joined #ruby
[17:58:45] cidic: shevy: yea
[17:58:53] shevy: what is the specific example you want to put into php?
[17:59:00] shevy: class Chart?
[17:59:02] luckyme: has joined #ruby
[17:59:24] cidic: shevy: Ideally all the code here but I would be happy if you could just explain this one RoundRobinChart
[17:59:39] shevy: ok RoundRobinChart is a subclass to chart
[17:59:44] cidic: I got that
[17:59:47] shevy: so all that is defined in class Chart, is available as well
[17:59:48] cidic: and def is a func
[17:59:58] shevy: now you already are at about 50% at least!
[17:59:59] cidic: chart.clear is calling something?
[18:00:05] shevy: this is a method invocation
[18:00:17] cidic: but chart has no clear method?
[18:00:17] baweaver: has joined #ruby
[18:00:35] shevy: do you see the line with attr_reader :lanes, :cars, :rounds, :chart
[18:00:41] shevy: this is a shortcut
[18:00:45] shevy: what it does is define 4 methods
[18:00:48] shevy: one method is: def chart
[18:01:28] chriscarpenter12: has left #ruby: ()
[18:01:29] shevy: do you see that cidic
[18:01:29] cidic: so chart.clear is like this.chart.clear() in C-ish?
[18:01:40] dopamean_: has joined #ruby
[18:01:44] shevy: chart() will return @chart
[18:01:53] shevy: and .clear() is invoked on @chart; chart is a String object
[18:01:58] cidic: I see no def chart
[18:02:15] shevy: cidic here you can see the method .clear() http://ruby-doc.org/core-2.2.3/String.html#method-i-clear
[18:02:20] shevy: yeah, this is the line above
[18:02:24] shevy: <shevy> do you see the line with attr_reader :lanes, :cars, :rounds, :chart
[18:02:24] shevy: <shevy> this is a shortcut
[18:02:27] pocketprotector-: has joined #ruby
[18:02:30] shevy: the attr* just allow you to be lazy
[18:02:36] cidic: ok so that makes it an empty string?
[18:02:38] shevy: if it helps you, it would mean: def chart; @chart; end
[18:02:41] dfinninger: has joined #ruby
[18:02:43] shevy: .clear will, yes
[18:02:46] bb010g: has joined #ruby
[18:03:02] pocketprotector-: has joined #ruby
[18:03:05] bricker: @chart is an Array
[18:03:44] cidic: ok so it is doing this.chart.resetToEmptyArray ?
[18:03:47] nfk|laptop: has joined #ruby
[18:04:02] shevy: he empties the old array before filling it up again
[18:04:10] cidic: then it is doing a loop
[18:04:17] cidic: what is the |heat| part?
[18:04:47] jhass: chriscarpenter12: some ideas http://p.jhass.eu/c.rb
[18:05:23] jhass: aw, common, 3 minutes
[18:05:28] shevy: cidic the name of the variable inside the block; think of .times counting up, so heat will be 0, 1, 2, 3 etc..
[18:05:42] Fredrich010: has joined #ruby
[18:05:43] cidic: ok so that is just the itterator and it isn???t used in this case
[18:05:54] momomomomo: has joined #ruby
[18:06:20] shevy: yeah, he does not use it in that block
[18:06:40] drocsid: has joined #ruby
[18:06:49] `based_pdev`: has joined #ruby
[18:07:29] cidic: then it is making a generic array ???h??? and doing this to it h << car which is what?
[18:08:13] shevy: he appends to the array he created
[18:08:31] shevy: h = [] <--- here he creates a new empty array
[18:08:43] rcvalle: has joined #ruby
[18:08:56] RegulationD: has joined #ruby
[18:09:09] naftilos76: has joined #ruby
[18:09:45] al2o3-cr: has joined #ruby
[18:10:17] shevy: this is fairly straightforward code
[18:10:38] pipework: cidic: Do you happen to have a set of documentation handy?
[18:10:43] cidic: shevy: fairly
[18:10:46] pipework: Array#<< is what you should look up.
[18:10:50] baweaver: has joined #ruby
[18:11:11] cidic: if h.include? car checking if car is in the array h ?
[18:11:13] shevy: I mean syntax differences aside, that should also be very simple to do in php almost 1:1
[18:11:44] shevy: I am not quite sure why he uses io.puts "Chart:"
[18:11:54] Xeago: has joined #ruby
[18:12:08] cidic: shevy: I think just to print to terminal?
[18:12:20] shevy: well, why does he not just use puts?
[18:12:31] shevy: def print_chart(io = $stdout)
[18:12:42] shevy: no idea right now
[18:12:51] cidic: this is the last part I am not sure about: f2 = FP * h.inject(0) do |f, opp|
[18:12:52] bricker: shevy: gives him the option to output to a file if he wants
[18:12:58] cidic: and inside that loop
[18:13:19] chipotle: has joined #ruby
[18:13:26] shevy: cidic .inject is a bit more complicated than the rest of the code
[18:13:28] janelleb_: has joined #ruby
[18:13:50] cidic: can you explain what is being accomplished in this loop?
[18:13:53] shevy: first see that FP = 1.0 so it is a constant
[18:14:50] shevy: there are some examples here http://ruby-doc.org/core-2.2.3/Enumerable.html#method-i-inject
[18:15:14] shevy: a simple one may be: (5..10).inject(1) { |product, n| product * n } #=> 151200
[18:15:38] shevy: (1..3).inject(1) { |product, n| product * n } # => 6
[18:16:13] dnomyar: has joined #ruby
[18:16:23] shevy: (1..5).reduce(:+) # => 15
[18:16:28] shevy: this is 1+2+3+4+5
[18:16:35] shevy: 1..n is a range
[18:17:39] shevy: the code he uses there is actually significantly more complex than everything else
[18:17:45] shevy: http://rubyquiz.com/quiz56.html
[18:17:58] bricker: cidic: inject is the same as reduce, which exists in every language (including PHP), so you might be familiar with it already
[18:18:16] cidic: bricker: I am familiar with reduce :)
[18:18:35] bricker: cidic: inject is an alias for reduce in ruby
[18:19:17] cidic: so it is starting with f = 0 and reducing ah I get it now
[18:19:23] bryanray: has joined #ruby
[18:19:41] cidic: maybe it is an error but I am not sure what ???Matchups??? is here: op = Matchups.new
[18:20:02] cidic: it looks like it is a 2 value array?
[18:21:03] dnomyar: has joined #ruby
[18:21:31] shevy: he is using a class but has not provided the code for it
[18:21:48] cidic: shevy: ya that is what I thought
[18:22:05] cidic: thanks for your help I think I can take it from here
[18:22:07] shevy: ah no it is there Bob Showalter/derby.rb
[18:22:11] shevy: from the downloads
[18:22:40] shevy: "two-dimensional table in which the order of the indices doesn't matter."
[18:23:24] asad_: Does Kernel::define_method define an instance method of Kernel?
[18:23:37] j4cknewt: has joined #ruby
[18:24:02] fmcgeough: has joined #ruby
[18:24:11] shevy: there is that Matchup class http://pastie.org/10502483
[18:27:24] bmalum_: has joined #ruby
[18:27:30] bricker: asad_: no, it defines an instance method on the receiver. Kernels is a module that is included into most classes
[18:27:33] havenwood: asad_: It defines an instance method on the receiver. So it entirely depends on what the receiver is.
[18:27:58] ngscheurich: has joined #ruby
[18:28:29] asad_: havenwood: I just found out that Kernel.define_method defines an instance method of Kernel, available to all objects.
[18:29:21] asad_: havenwood: https://eval.in/456148
[18:29:52] bricker: asad_: if you actually want to make a method available to all objects, that's not the way to do it.
[18:30:31] asad_: bricker: Yeah I know. You just define it in the global scope. This is for metaprogramming.
[18:32:32] ngscheur1: has joined #ruby
[18:34:57] cidic: what is this part doing ? Array.new(cars) { 0 }
[18:35:35] cdg: has joined #ruby
[18:35:52] momomomomo: cidic: http://ruby-doc.org/core-2.2.0/Array.html
[18:36:03] bricker: cidic: initializes an Array with size {cars}, and sets each element to 0
[18:36:04] momomomomo: literally answered above the fold
[18:36:19] momomomomo: >> Array.new(3, 0)
[18:36:20] ruboto: momomomomo # => [0, 0, 0] (https://eval.in/456151)
[18:36:26] cidic: I get that part I mean the { 0 } or { whatever } part
[18:36:26] momomomomo: >> Array.new(3) { 0 }
[18:36:27] ruboto: momomomomo # => [0, 0, 0] (https://eval.in/456152)
[18:36:37] shredding: has joined #ruby
[18:36:42] cidic: default values?
[18:36:52] momomomomo: read the api link I pasted
[18:37:05] momomomomo: you'll see your answer in like 1 minute worth of reading the documentation
[18:38:31] Channel6: has joined #ruby
[18:40:21] karapetyan: has joined #ruby
[18:41:04] bmalum_: has joined #ruby
[18:42:37] momomomomo_: has joined #ruby
[18:43:20] chopin: Anyone familiar with the newest version of the Google ruby api client have a second to take a look at an SO post?
[18:43:24] chopin: http://stackoverflow.com/questions/33270102/send-gmail-messages-with-google-api-ruby-client-0-9-pre3?noredirect=1#comment54352280_33270102
[18:44:29] baweaver: has joined #ruby
[18:45:26] idefine: has joined #ruby
[18:47:01] karapetyan: has joined #ruby
[18:47:21] jenrzzz: has joined #ruby
[18:47:47] jonnie: has joined #ruby
[18:48:04] SCHAAP137: has joined #ruby
[18:48:04] SCHAAP137: has joined #ruby
[18:50:32] dopamean_: has joined #ruby
[18:50:57] NeverDie: has joined #ruby
[18:52:58] karapetyan: has joined #ruby
[18:53:06] sdwrage: has joined #ruby
[18:54:54] n008f4g_: has joined #ruby
[18:55:15] freerobby: has joined #ruby
[18:55:31] arthurix_: has joined #ruby
[19:00:21] bmalum: has joined #ruby
[19:02:54] yosiat: has joined #ruby
[19:03:41] davedev24: has joined #ruby
[19:04:00] fantazo: has joined #ruby
[19:04:30] SHyx0rmZ: has joined #ruby
[19:04:30] skcin7: has joined #ruby
[19:06:31] cidic: bricker: can you tell me what this is doing? w.pop while w[-1][1] > w[0][1] ?
[19:07:06] nb_bez___: has joined #ruby
[19:07:09] jhass: cidic: what do you have trouble with?
[19:07:23] jhass: Array#pop ? passing -1 to Array#[] ?
[19:07:47] cidic: jhass: I don???t know ruby syntax trying to understand some code
[19:08:34] jhass: &ri Array#pop Array#[]
[19:08:34] `derpy: http://www.rubydoc.info/stdlib/core/Array#pop-instance_method, http://www.rubydoc.info/stdlib/core/Array#%5B%5D-instance_method
[19:08:47] verdoc: has joined #ruby
[19:08:49] jackjackdripper: has joined #ruby
[19:09:03] s2013: has joined #ruby
[19:09:19] rehat__: has joined #ruby
[19:09:24] lfox: has joined #ruby
[19:10:47] Xeago: has joined #ruby
[19:11:02] rehat__: I'm new to ruby, and my code looks like shit compared to other ruby code I have seen. Trying to automate something I do a lot in git with a xcode project. Is there a better way to catch issues with system or backtick calls? https://gist.github.com/rehat/320af8b8b7e7eb446448
[19:11:55] cidic: jhass: I???m trying to get what this is effectively accomplishing: w = w.sort_by { |k, v| v } w.pop while w[-1][1] > w[0][1] # sort by weight and get the lowest weight(s)
[19:13:21] yqt: has joined #ruby
[19:13:33] jhass: cidic: I guess it's a weird way to do .min_by
[19:13:51] cidic: so it is getting the min value in the array?
[19:13:57] jgt: has joined #ruby
[19:15:32] cidic: jhass: the next line is car = w[rand(w.size)][0]
[19:15:40] cidic: so it shouldn???t be reducing it to one result should it?
[19:15:52] patdohere: has joined #ruby
[19:16:12] Eiam_: has joined #ruby
[19:16:21] jhass: well, I guess so
[19:16:38] jhass: that's just a weird way for .sample.first btw
[19:16:53] ibouvousaime: do you know what causes this "nil is not a symbol" error in here http://pastie.org/10502572 ?
[19:17:18] cidic: jhass: so you don???t know what it is accomplishing?
[19:18:11] AndroidLoverInSF: has joined #ruby
[19:18:25] jhass: cidic: I do and I gave you the links to understand by yourself
[19:19:15] jhass: ibouvousaime: I don't think that's your full code? also please properly indent your code
[19:19:16] shevy: cidic .pop on an array removes an element
[19:19:43] momomomomo: has joined #ruby
[19:19:44] shevy: the rest is a while loop that continues as long as the condition it wants to evaluate is true
[19:19:50] alcipir: has joined #ruby
[19:20:22] ibouvousaime: jhass, its the full code http://i.imgur.com/FqwwQvq.png
[19:20:53] devoldmx: has joined #ruby
[19:21:17] SleepySensei: has joined #ruby
[19:22:33] arthurix: has joined #ruby
[19:22:50] cidic: has joined #ruby
[19:22:53] jhass: ibouvousaime: I'm afraid that's not enough context
[19:23:17] jhass: ibouvousaime: but I'd guess that thing is running Ruby < 2.0
[19:23:21] jhass: so 1.9 or 1.8 even
[19:23:35] jhass: ibouvousaime: back then def returned nil, not the method name as symbol
[19:23:39] jhass: so you pass nil to private
[19:23:43] jhass: which it doesn't like
[19:23:58] kirun: has joined #ruby
[19:23:59] ibouvousaime: I think too actualyl its from code academy
[19:24:17] ibouvousaime: on ruby 2.2 on my terminal it worked
[19:25:30] blackjid: has joined #ruby
[19:27:08] ibouvousaime: jhass, so how would you deal with that I have no idea and Im supposed to pass that codeacademy test
[19:27:37] ibouvousaime: its using ruby 1.9
[19:28:00] ibouvousaime: on code academy I mean
[19:28:08] ibouvousaime: I normally use ruby 2.2
[19:28:40] blue_deref: has joined #ruby
[19:29:03] blackjid: has joined #ruby
[19:29:19] govt: has left #ruby: ()
[19:29:28] pocketprotector-: has joined #ruby
[19:29:54] banister: has joined #ruby
[19:30:09] jhass: ibouvousaime: put private on its own line, all method definitions after it will then become private
[19:30:59] dmitch: has joined #ruby
[19:31:39] cidic: jhass: did I miss your response when I got DCd?
[19:31:50] ruboto: You can find a log of this channel at http://irclog.whitequark.org/ruby/
[19:31:56] yfeldblum: has joined #ruby
[19:32:04] ibouvousaime: jhass, ohh it worked
[19:32:10] ibouvousaime: thank you jhass
[19:32:31] blackjid: has joined #ruby
[19:32:38] govt__: has joined #ruby
[19:32:41] govt__: evening, m8s
[19:32:58] jhass: govt__: I'm gonna ban you for ban evasion now
[19:33:07] adaedra: !ban govt__ !P Ban evasion
[19:33:08] ChanServ: +b govt__!*@*
[19:33:08] ChanServ: ChanServ kicked govt__: Ban evasion
[19:33:21] eam: u w0t m8
[19:33:25] jhass: or adaedra will...
[19:33:29] jhass: thanks :D
[19:34:06] craysiii: has joined #ruby
[19:36:30] blackjid: has joined #ruby
[19:37:15] alcipir: has joined #ruby
[19:37:19] cndiv: has joined #ruby
[19:37:34] shinnya: has joined #ruby
[19:40:08] cndiv: Can someone recommend a gem that interacts with IRC networks, like freenode? I'm brand new, work in IT, and spending a TON of time helping people who haven't heard of IRC before do basic registration commands, protecting accounts, etc. Thought that'd be a good first CLI project.
[19:40:34] jhass: cndiv: cinch is the most popular atm
[19:41:12] cndiv: jhass: I'll look that up, thanks. BTW, what's the right way to find the popular ones? I typed in "irc" to rubygems.org and came up with a bunch of stuff.
[19:41:17] eam: "irc bot"
[19:41:51] cndiv: wow cinch is popular. I guess sort by downloads...
[19:41:56] jhass: well, if you want to be throughout going to all results, looking at download count, looking up the GH repo and note stars
[19:42:13] jhass: if you want less work check awesome_ruby and ruby-toolbox.org
[19:42:16] adaedra: cinch is pretty neat too :)
[19:42:33] adaedra: (that's also important)
[19:43:06] spuk: has joined #ruby
[19:43:12] cndiv: jhass: those are new to me, bookmarking..
[19:45:20] sharkman: has joined #ruby
[19:45:31] cndiv: Great stuff, thanks for your help jhass and #ruby in general. :-)
[19:45:32] willardg: has joined #ruby
[19:45:57] cndiv: PS ever tried explaining IRC to someone who never has heard of it? It takes *forever* to get people set up!
[19:46:03] ramfjord: has joined #ruby
[19:46:19] shevy: use written text in realtime to communicate with one another!
[19:46:23] shevy: idle to power
[19:46:31] crime: has joined #ruby
[19:46:38] adaedra: cndiv: may be client choice. I guess people will be more willing if they have a nice interface.
[19:47:06] arooni: has joined #ruby
[19:47:40] niemcu: has joined #ruby
[19:47:47] Maletor: has joined #ruby
[19:47:47] cndiv: the problem is more like "commands?" and "I don't have to register the nickname?" and "cloak?" and "protection?" and "Do I really have to do this at all? No? Nevermind."
[19:47:52] niemc2: has joined #ruby
[19:48:02] cndiv: And at my workplace, that's a recipe for "I'll just never speak to the developers, then."
[19:48:16] adaedra: If you start by cloaks, you'll indeed get weird results :p
[19:48:19] shevy: well cloak... I never needed that, I don't even know what it really is
[19:48:23] niemcu: has joined #ruby
[19:48:29] eam: cndiv: should be pretty easy if you use an easy to use client
[19:48:35] eam: just preconfigure it
[19:48:50] bricker: cndiv: Is Slack not an option for your team?
[19:49:03] freerobby: has joined #ruby
[19:49:06] cndiv: bricker: Oh no, that's a big political issue
[19:49:12] shevy: is java a "high level language" or a "low level language"?
[19:49:13] eam: avoid slack
[19:49:31] adaedra: shevy: off-topic level language :p
[19:49:54] schaary: has joined #ruby
[19:50:48] cndiv: I'm actually writing this utility to just get people to use IRC instead, it's the *setup* that takes forever for brand new employees. 1 hour to hand you a computer, 2.5 to get you set up in optional IRC, and no one not required to use that cares on day one.
[19:51:00] pdoherty: has joined #ruby
[19:51:06] eam: cndiv: why not just provision it automatically?
[19:51:09] bricker: cndiv: too bad, slack is great and very user-friendly
[19:51:25] cndiv: eam: Not sure exactly what you mean by automatically.
[19:51:32] bricker: I use IRC every day and I still have trouble with it sometimes
[19:51:42] eam: cndiv: well, when you do the computer provisioning just prepopulate it with their credentials
[19:51:51] eam: it's just as easy as slack -- irc is a protocol
[19:52:04] eam: you can make it as easy as press button to chat
[19:52:15] bmurt: has joined #ruby
[19:52:17] shevy: adaedra they talk about IRC here!!!
[19:52:23] eam: (slack otoh is a hot mess and you can't really simplify it)
[19:52:33] cndiv: This is my old employer, and we don't do provisioning. Tri-platform shop, basically anything allowed as work computer, and lots of shipping to far remote countries and never actually touch their computer.
[19:52:40] adaedra: shevy: the :p indicated a joke. Swoosh!
[19:52:50] eam: cndiv: ah, just ship them an app to do it then
[19:52:58] cndiv: that's the idea
[19:53:00] shevy: the french :p looks like a fly on the lips
[19:53:18] Silox|: has joined #ruby
[19:53:19] diegoaguilar: has joined #ruby
[19:53:32] cndiv: download this, it handles the freenode side, then put this information here in these fields in these top five clients.
[19:53:49] adaedra: cndiv: don't introduce them to advanced feature while they don't need them. We can totally IRC without cloaks.
[19:54:01] eam: most clients you can just configure the app by writing out a config file -- without any app interaction at all
[19:54:06] shevy: IRC without cloaks and pants
[19:54:10] adaedra: Also, for bots, lita looks also nice. Not IRC centered, but capable.
[19:54:16] shevy: but seriously, what is cloaking for needed?
[19:54:22] adaedra: shevy: hide the host.
[19:54:24] cndiv: adaedra: another big political issue, allowing that. And could I, the one IT guy at the company, make them for employees of the company? No.
[19:55:02] shevy: suspicious people... they want to hide something on IRC
[19:55:17] cndiv: or avoid the weirdos in the community
[19:55:19] shevy: yeah... the 1 million karma dude
[19:55:24] eam: speaking of hiding - slack used to use a public cdn for all the files/images linked on slack (re: no authentication)
[19:55:26] arup_r: I hide my surname
[19:55:32] shevy: arup_r I am at 402 karma now!
[19:55:34] eam: you could find lot of messed up internal company stuff by searching around on it
[19:55:42] arup_r: shevy: lol
[19:55:44] shevy: I found out that when you downvote others, your karma sinks :(
[19:55:57] crime: it blows my mind that people actually use slack
[19:56:05] shevy: slackware?
[19:56:07] adaedra: cndiv: if your goal is to avoid external interaction and just have company people interact, make your own IRC server
[19:56:12] Puck6633: has joined #ruby
[19:56:23] arup_r: yes shevy if you want give downvotes give only questions not answers if you don't want to loose reps
[19:56:32] cndiv: adaedra: another political issue! I could go on and on...
[19:56:44] eam: crime: it makes more sense when you consider it's just the millennial version of lotus notes or MS exchange
[19:56:45] adaedra: cndiv: rather do nothing, if you're like that.
[19:56:53] shevy: yeah... it's weird how that influences people like comparing discussions on reddit versus stackoverflow
[19:56:59] baweaver: has joined #ruby
[19:57:14] cndiv: adaedra: I don't work there anymore. I just think people should be able to communicate, need a first project, and know the people doing my old job would appreciate it.
[19:57:25] adaedra: cndiv: aaaaah ok
[19:57:30] arup_r: ACTION will join reddit to earm karmas there
[19:57:51] cyle: has joined #ruby
[19:57:58] adaedra: cndiv: if your problem is publicly shown IPs, some networks have a default masking of them, for what it's worth.
[19:58:21] adaedra: IPs or reverses
[19:58:26] clx: has joined #ruby
[19:58:47] cndiv: adaedra: Yeah, but can't rely on that for everyone across the globe at home, so on.
[19:59:06] Puck6633: I haven't used Ruby in a long time and I was curious what can be done these days. I installed the latest version via RubyInstaller, then used gem install to install opengl, glu, and glut, then tried to run the examples included with the opengl gem but they all spit out this error: "in `require': cannot load such file -- glu/glu (LoadError)"
[19:59:08] cndiv: It's a tough situation using IRC to interact with your paid team and literally anyone worldwide who wants a voice in it.
[19:59:22] Puck6633: Are the examples broken, or am I? :P
[19:59:45] shevy: Puck6633 do you have mesa installed ftp://ftp.freedesktop.org/pub/mesa/11.0.3/mesa-11.0.3.tar.xz
[20:00:09] shevy: let's see the opengl gem, perhaps it was abandoned
[20:00:30] shevy: https://rubygems.org/gems/opengl well a release in 2015 so it's not totally abandoned
[20:00:31] petricore: has joined #ruby
[20:00:33] havenwood: Puck6633: Did the gem install successfully? Double check?
[20:00:58] havenwood: Puck6633: Did the native extension perhaps fail to build?
[20:00:58] Puck6633: Do you mean a mesa gem, or a library for the host OS? I can't tell which that archive is.
[20:01:02] cndiv: Thanks all, gotta run.
[20:01:05] shevy: http://www.rubydoc.info/gems/opengl/0.9.2 also says that you need two more gems Puck6633
[20:01:10] havenwood: Puck6633: Retry: gem install glu
[20:01:10] shevy: "Be sure to check out GLU and GLUT gems."
[20:01:14] shevy: did you also install these two?
[20:01:22] Puck6633: havenwood: gem reported success on all accounts.
[20:02:22] shevy: ohhhh drbrain had fondness for opengl as well :) https://github.com/drbrain/opengl
[20:02:32] shevy: Puck6633, all these three gems have installed correctly? "gem list" has them?
[20:02:36] Puck6633: havenwood: https://gist.github.com/anonymous/4d7838e8c4ae32f846b9
[20:02:42] drbrain: I think my work is merged back in to whatever is base opengl now
[20:02:55] bricker: crime: yeah it's MIND-BLOWING that people would use a friendly, easy, affordable chat service.
[20:03:01] bricker: my mind is BLOWN
[20:03:09] Puck6633: gem list --local shows all three, yes.
[20:03:12] crime: closed source
[20:03:55] adaedra: that's not everyone concern.
[20:04:24] Puck6633: I remember you used to need to require 'rubygems' or require it via a command line argument, but apparently that isn't the case any more.
[20:04:33] fantazo: has joined #ruby
[20:04:41] havenwood: Puck6633: that was 1.8 and prior
[20:04:58] havenwood: Puck6633: See it with?: gem which glu
[20:05:36] Puck6633: havenwood: Spits out C:/Dev/Ruby22/lib/ruby/gems/2.2.0/gems/glu-8.2.1-x86-mingw32/lib/glu.rb
[20:05:48] Puck6633: So apparently it can find it.
[20:06:48] Puck6633: I was just poking around in the gem directories and under lib there are a bunch of .so files in directories that seem to be Ruby version numbers.
[20:07:01] relix: has joined #ruby
[20:07:17] Puck6633: I'm running this on Windows straight up, not even Cygwin. Those should be DLLs, right?
[20:09:53] crime: idk if you guys use the redis gem that much, but I'm connected to a redis server running locally, and I can issue commands and get the right results, but the .connected? method still returns false for some reason.
[20:10:14] trabulmonkee: has joined #ruby
[20:10:59] VeryBewitching: has joined #ruby
[20:11:12] alcipir: has joined #ruby
[20:11:49] webopsx: has joined #ruby
[20:12:02] cdg: has joined #ruby
[20:12:10] stamina: has joined #ruby
[20:14:23] crime: oh, it returns false until you issue a command first
[20:14:52] eam: probably lazy connects?
[20:15:23] crime: i guess, yeah I was fooling around with it in irb
[20:15:24] benlovell: has joined #ruby
[20:15:39] Puck6633: It looks like the gems just weren't made with Windows in mind. I should probably use Cygwin if I want to use the opengl binding.
[20:15:40] mwlang: has joined #ruby
[20:16:44] rcvalle: has joined #ruby
[20:16:46] jonnie: has joined #ruby
[20:17:29] pocketprotector-: has joined #ruby
[20:17:37] baweaver: has joined #ruby
[20:19:44] idefine: has joined #ruby
[20:21:01] cdg: has joined #ruby
[20:21:09] pocketprotector-: has joined #ruby
[20:21:24] tercenya: has joined #ruby
[20:24:03] lucyinthesky: has joined #ruby
[20:25:02] ruby-lang272: has joined #ruby
[20:25:55] dikaio: has joined #ruby
[20:26:03] arthurix_: has joined #ruby
[20:27:18] pontiki: has joined #ruby
[20:27:23] towski_: has joined #ruby
[20:27:23] ruby-lang272: Hello I want to iterate over a hash, and I would like to know your opinion about which is the best performance way to do it?
[20:27:24] PlasmaStar: has left #ruby: ()
[20:27:37] bruno-: has joined #ruby
[20:28:15] adaedra: what do you do, on your hash?
[20:28:52] adaedra: Basic way of doing it is Hash#each, Hash#find if you want to find a key/pair, ...
[20:29:48] Cyther: has joined #ruby
[20:30:38] PlasmaStar: has joined #ruby
[20:30:41] blackoperat: has joined #ruby
[20:30:56] ruby-lang272: aadedra thanks for your answer, I want to get the key and count the number of ocurrences of an answer on the values
[20:31:54] alcipir: has joined #ruby
[20:32:22] ruby-lang272: right now I am using two each blocks to first iterate over the hash and the second one to count the ocurrences, but I was thinking that maybe there's a better way to do this
[20:32:45] adaedra: you want all elements that have a given value?
[20:32:48] chopin: has joined #ruby
[20:32:49] bkxd: has joined #ruby
[20:33:08] imperator: Puck6633, dll == so
[20:33:21] imperator: it's just a different internal format with a different name
[20:34:01] adaedra: ruby-lang272: show your actual code, maybe?
[20:34:33] momomomomo: has joined #ruby
[20:34:51] NeverDie: has joined #ruby
[20:35:02] symm-: has joined #ruby
[20:35:10] sdwrage: has joined #ruby
[20:35:11] bruno-_: has joined #ruby
[20:35:20] paulcsmith: has joined #ruby
[20:35:31] paulcsmith: has joined #ruby
[20:36:01] nofxx: has joined #ruby
[20:36:02] nofxx: has joined #ruby
[20:36:55] gagrio: has joined #ruby
[20:37:26] ruurd: has joined #ruby
[20:38:04] ruurd: has joined #ruby
[20:38:38] Sigma00: and also give an example hash if you can
[20:38:45] _djbkd: has joined #ruby
[20:40:20] adaedra: If I understood your need, this can be done with a simple Hash#select, but I'm not sure
[20:40:28] bruno-_: has joined #ruby
[20:40:59] karapetyan: has joined #ruby
[20:41:13] karapetyan: has joined #ruby
[20:41:23] ruby-lang272: this is my code https://gist.github.com/anonymous/2839113b6a1e9da99df0
[20:41:24] skade: has joined #ruby
[20:41:52] adaedra: ok, that's a bit more complicated
[20:41:54] bryanray: has joined #ruby
[20:41:58] adaedra: what's your input like?
[20:43:07] Tuxero: has joined #ruby
[20:44:17] ruby-lang272: the result from the query is something like week1{{ name: 'Jon', question: 'answer1'} {name: 'Peter', question: 'answer3'}}
[20:45:52] Puck6633: imperator: I thought that Windows executables couldn't normally load so files though. Isn't that part of what Cygwin does?
[20:46:27] imperator: can load em fine
[20:46:40] imperator: when you build a c extension on windows for ruby, it creates an .so file, not a .dll
[20:46:59] adaedra: I think it's a .dll it's disguise, though
[20:47:05] imperator: i basically advise against using cygwin
[20:47:08] imperator: if you need unix, use unix
[20:47:12] Puck6633: Hm. Any idea why the interpreter can't find glu then?
[20:47:31] imperator: one sec, installing
[20:47:44] Sigma00: ruby-lang272: is that first line activerecord?
[20:47:52] leitz: has joined #ruby
[20:47:56] Puck6633: Thanks! I appreciate the help. :)
[20:47:59] ellisTAA: has joined #ruby
[20:48:34] Puck6633: I would love to play around with gl in Ruby. It's my favorite language by far but I don't usually get to do much with it because I feel limited to CLI.
[20:50:08] imperator: Puck6633, in irb you're trying "glu/glu" ?
[20:50:41] Puck6633: I'm trying to run the examples in the directory of the same name that come with the opengl gem.
[20:50:49] idefine: has joined #ruby
[20:51:06] Puck6633: I've mostly been trying nehe #2 because it's super simple
[20:51:28] imperator: oh, i think i see
[20:51:33] imperator: what version of ruby are you running?
[20:51:48] NeverDie: has joined #ruby
[20:52:00] Puck6633: ruby -v: ruby 2.2.3p173 (2015-08-18 revision 51636) [i386-mingw32]
[20:52:09] imperator: so, this gem bundles precompiled binaries for windows - for versions 1.9, 2.0, and 2.1
[20:52:13] imperator: but not 2.2
[20:52:25] imperator: so, option one is to use an older version of ruby
[20:52:38] Puck6633: d'oh! I'm surprised I didn't notice that. Thanks!
[20:52:38] imperator: option two is to bug them to bundle a binary for 2.2
[20:52:43] imperator: option three is to build from source
[20:52:48] Puck6633: I'll try downloading a 2.1 build and install that instead.
[20:53:18] Puck6633: Actually, it might not be that hard to build from source.
[20:53:39] imperator: got headers?
[20:54:03] imperator: that could be painfule
[20:54:04] Puck6633: Last time I used RUby on WIndows it was built with visual studio, but this one claims to be a mingw executable which is my preferred compiler and already installed and set up.
[20:54:20] Puck6633: headers? for gl?
[20:54:37] imperator: alrighty give it a shot
[20:54:43] jonnie: has joined #ruby
[20:55:00] Puck6633: can gem do it for me, or should I just download the source from git?
[20:55:11] atomical: has joined #ruby
[20:55:14] l_tonz: has joined #ruby
[20:56:31] skweek: has joined #ruby
[20:56:56] shevy: come to linux :)
[20:57:10] imperator: try gem install glu --platform ruby
[20:58:27] imperator: I'm assuming you've got devkit installed and configured
[20:59:04] absynthe_faery: has joined #ruby
[20:59:25] lucyinthesky: sorry absynthe_faery contemplate peace here.
[21:00:28] absynthe_faery: lucyinthesky: peace! in such a fool channel? oh wow
[21:00:38] absynthe_faery: lucyinthesky: full* lol
[21:00:56] lucyinthesky: Full this is that programming language and no trolls in such dumb level
[21:00:59] adaedra: it gets quiet at times.
[21:01:03] lucyinthesky: I seek protection here anyway let's behave
[21:01:04] shevy: hmmm why don't we have .ljust! ?
[21:01:08] lucyinthesky: we cant get banned absynthe_faery
[21:01:12] lucyinthesky: This place is safe
[21:01:24] adaedra: lucyinthesky: where are your diamonds?
[21:01:48] shevy: you two are like: https://c2.staticflickr.com/4/3017/2894181382_c1e9f52f59.jpg
[21:01:55] lucyinthesky: no I wont click that
[21:01:59] ruby-lang272: any idea on how to perform this on a better way?
[21:02:00] eam: >> p=Random.new(?V.ord);Array.new(3){p.rand(13)}.map{|x|(x+?a.ord).chr}.join
[21:02:01] ruboto: eam # => "eam" (https://eval.in/456180)
[21:02:26] ChanServ: +o imperator
[21:03:08] Xeago: has joined #ruby
[21:03:40] imperator: Puck6633, worked for me
[21:03:42] drbrain: eam: #rand takes a range
[21:03:51] imperator: be sure to uninstall the x86 version, too, just to be sure
[21:04:16] Puck6633: Great! I'm just trying to get it to find my existing mingw install.
[21:04:26] imperator: what do you mean?
[21:05:30] adaedra: ruby-lang272: don't have one personally.
[21:05:48] drbrain: >> p = Random.new ?V.ord; Array.new(3) { p.rand(?a.ord..?m.ord).chr }.join
[21:05:49] ruboto: drbrain # => "eam" (https://eval.in/456181)
[21:05:55] Sigma00: ruby-lang272: is that first line activerecord?
[21:06:51] bmurt: has joined #ruby
[21:06:56] Sigma00: ruby-lang272: `week` is in the database?
[21:06:59] Dakota-choad: has joined #ruby
[21:07:00] Sigma00: it's a column?
[21:07:12] arthurix: has joined #ruby
[21:07:26] Puck6633: imperator: The devkit doesn't seem to include opengl, and it's asking me to update my PATH to include the build tools, but my path already includes the mingw bin directory so I'm not sure what it wants.
[21:07:35] ruby-lang272: Simga00 that's a method that order the results by week
[21:07:44] imperator: Puck6633, you need the devkit
[21:08:29] imperator: install it in C:\Devkit (or wherever, but this makes it easy to find)
[21:08:30] Puck6633: If I add the devkit to my path I can build glu, but glut is also missing a 2.2 binary and when I try to build it configure can't find OpenGL
[21:09:10] swgillespie: has joined #ruby
[21:09:19] eam: drbrain: oooooo much nicer thank you :)
[21:09:37] kies^: has joined #ruby
[21:10:06] drbrain: the ?V.ord and friends give away the magic a bit
[21:10:07] Sigma00: ruby-lang272: ah, too bad. I was gonna suggest doing the counting entirely on the DB
[21:10:20] imperator: oh, i hadn't tried glut, but i was able to get glu and opengl to install
[21:10:22] eam: yeah, maybe those are better as integers
[21:10:22] CBX: has joined #ruby
[21:10:41] Sigma00: if you do group.count you get a nice hash with {grouping => count} values
[21:11:34] ruby-lang272: The issue is that I need to get the results ordered by week
[21:11:37] imperator: Puck6633, looks like it wants some very specific header files
[21:11:38] v4n: has joined #ruby
[21:12:06] Puck6633: imperator: Hm. I can try copying them from my mingw installation.
[21:12:12] AndroidLoverInSF: has joined #ruby
[21:12:36] imperator: could try that
[21:12:46] imperator: supposedly included with visual studio, too
[21:12:56] PlasmaStar: has left #ruby: ()
[21:13:22] imperator: so you could try appending "-- --with-glut-dir=" at the end
[21:13:35] PlasmaStar: has joined #ruby
[21:13:45] frx_: has joined #ruby
[21:14:34] frx_: When a proc is converted to a block and sent to a method like foo(&some_proc), why does that not consume an argument as an arument is passed to the foo method
[21:15:12] JStoker: has joined #ruby
[21:15:35] lucyinthesky: has left #ruby: ("Leaving")
[21:15:43] EvilJStoker: has joined #ruby
[21:16:27] absynthe_faery: has left #ruby: ("Leaving so soon, didn't have a chance to bloom.")
[21:17:08] adaedra: it's a special argument
[21:17:19] PlasmaStar: has joined #ruby
[21:18:21] Sigma00: ruby-lang272: you could always do .group("RBDMS-specific date trimming command here") to group by week. For example in postgres: .group("date_trunc('week', created_at)")
[21:18:31] havenwood: >> [*97..109].sample(3, random: Random.new(903)).map(&:chr).join
[21:18:32] ruboto: havenwood # => "eam" (https://eval.in/456182)
[21:18:55] frx_: adaedra: But it is an argument tho, right?
[21:19:13] eam: havenwood: even better
[21:19:29] adaedra: frx_: it has a special place, always available, even if you don't declare it in the receiver.
[21:19:39] adaedra: >> def foo; yield; end; foo { "hello" }
[21:19:40] ruboto: adaedra # => "hello" (https://eval.in/456183)
[21:19:48] mloy: has joined #ruby
[21:19:48] adaedra: see, no argument, but still takes the block
[21:19:53] al2o3-cr: >> [ proc { |n, &b| }.arity, proc { |n, b| }.arity ]
[21:19:55] ruboto: al2o3-cr # => [1, 2] (https://eval.in/456184)
[21:19:58] Puck6633: imperator: It seems to ignore the extra option, and it still can't find the header after copying it from my regular mingw include directory to the devkit include directory.
[21:20:11] adaedra: it's not in the arguments count
[21:20:34] imperator: Puck6633, looks like it's explicitly checking for it under "GL" or "GLUT"
[21:20:41] imperator: so you may need to create a subdirectory
[21:20:59] imperator: something tells me the extconf.rb file could use a little love for windows
[21:21:22] frx_: adaedra: So the proc is converted to a block but it is passed in as a regular argument when the method is called?
[21:21:41] adaedra: no, not as a regular argument, as a block.
[21:21:41] Coldblackice: has joined #ruby
[21:21:45] crdpink: has joined #ruby
[21:22:11] Puck6633: imperator: My mingw installation has a GL directory under include with gl, glu and freeglut, so I copied that to the devkit's mingw/include directory, and then copied the opengl32 and glut libraries to devkit/mingw/lib
[21:22:23] idefine: has joined #ruby
[21:22:31] frx_: adaedra: Okay...
[21:22:50] Puck6633: So now I have glut.h in C:\Dev\RubyDev\mingw\include\GL\ but it still can't find it.
[21:23:02] adaedra: Ah, frx_ leaved
[21:23:13] Puck6633: Maybe I'll have a look at the makefile to see what it's doing.
[21:23:27] imperator: yeah, it's not liking something, not sure what
[21:23:57] imperator: i think you just need --with-glut-include
[21:24:10] imperator: seems to find the lib alright
[21:25:40] imperator: oh, hell, he never does dir_config
[21:26:19] CCBX: has joined #ruby
[21:27:56] yfeldblum: has joined #ruby
[21:28:10] RudestBuddhist: has joined #ruby
[21:29:03] tobyx_: has joined #ruby
[21:29:22] CCBX: has joined #ruby
[21:31:14] EvilJStoker: has joined #ruby
[21:31:39] ibouvousaime: has joined #ruby
[21:31:51] Puck6633: imperator: Apparently for me at least it's only checking the include directories in the ruby install directory. Copying the GL directory to there fixed that issue. Now it just isn't linking glut correctly. Should be pretty easy to resolve.
[21:32:11] imperator: I have gl.h and glu.h but no glut.h
[21:32:18] imperator: or is one of those the same thing?
[21:32:30] adaedra: they're different libs iirc
[21:32:45] Puck6633: they're all different. MingW doesn't normally come with glu or glut.
[21:32:57] Puck6633: I use freeglut, which is easy to compile with MingW.
[21:33:21] imperator: actually, there -is- a dir_config for freeglut
[21:33:23] jordanloky: has joined #ruby
[21:33:30] ibouvousaime: how can I go from [Argument, Goes, Here] to "Argument Goes Here" ?
[21:33:44] j4cknewt: has joined #ruby
[21:33:51] RudestBuddhist: Hey Everybody, I have a question about code re-use, modules, and scope. I???m trying to re-use some code through a module and call it with another file but I???m unsure how to keep my ???session??? variable in scope. I believe I can use @variable to do it but I???m not sure if this is the correct way. Can someone point me in the right direction of a doc? https://gist.github.com/anonymous/acdc61942de7414edd57
[21:33:51] ibouvousaime: I dont know how to put those spaces :/
[21:33:59] imperator: ibouvousaime, Array#join
[21:34:07] diegoaguilar: has joined #ruby
[21:34:32] imperator: adaedra, ah, yep, i was looking in the wrong place
[21:34:44] ibouvousaime: thanks imperator
[21:35:47] kadoppe: has joined #ruby
[21:35:51] chopin: has joined #ruby
[21:36:43] Rudest: has joined #ruby
[21:36:50] cdg_: has joined #ruby
[21:37:12] nofxx: has joined #ruby
[21:37:13] nofxx: has joined #ruby
[21:37:25] imperator: -o imperator
[21:37:34] tubuliferous_: has joined #ruby
[21:37:49] cdg_: has joined #ruby
[21:40:18] Musashi007: has joined #ruby
[21:40:24] mollusk_: has joined #ruby
[21:42:12] kies^: has joined #ruby
[21:43:04] RudestBuddhist: Cheers, figured it out. Thanks everybody :)
[21:46:25] dfinninger: has joined #ruby
[21:46:42] tomchapin: has joined #ruby
[21:48:04] ibouvousaime: what do you think is the programm doing, just wondering if I did things well
[21:48:06] ibouvousaime: vov=[a,e,i,u,y]
[21:48:07] ibouvousaime: str=str.each do |x| vov.each do |y| if x=vov[y] then vovc+=1
[21:48:19] Azure: has joined #ruby
[21:48:20] diegoviola: has joined #ruby
[21:48:50] workmad3: has joined #ruby
[21:49:04] jenrzzz: has joined #ruby
[21:50:01] failshell: has joined #ruby
[21:50:40] jhass: ibouvousaime: is its purpose to throw a syntax error?
[21:51:26] cdg: has joined #ruby
[21:52:28] Puck6633: Wow, getting it to actually find libglut.a caused even more errors than when it couldn't find it.
[21:52:29] baweaver: has joined #ruby
[21:53:09] jhass: ibouvousaime: str.count("aeiuy") ?
[21:54:09] ibouvousaime: http://pastie.org/10502841 jhass
[21:54:31] kobain: has joined #ruby
[21:54:44] adaedra: you don't have to compact everything, spaces and line returns are your friends.
[21:54:56] Puck6633: imperator: http://prntscr.com/8ulifg :D
[21:55:07] Sigma00: why is 'y' there but not 'o'
[21:55:09] flyinprogrammer: has joined #ruby
[21:55:14] flyinprogrammer: anyone here use cucumber/aruba ?
[21:55:36] jhass: ibouvousaime: def vowel_count(str); str.count("aeiouy"); end
[21:56:37] imperator: Puck6633, woo!
[21:56:48] ibouvousaime: actually id like to make it return the number of vowels it find in str xD
[21:56:53] Puck6633: Thank you so much for all your help!
[21:57:01] imperator: in the meantime, might want to ping glut about including a 2.2 binary
[21:57:11] Puck6633: Yeah, good idea.
[21:57:24] Puck6633: That was a pain
[21:57:32] imperator: welcome to windows
[21:57:36] jhass: ibouvousaime: is vowel_count("foo") 1 or 2?
[21:57:52] Puck6633: haha, tell me about it.
[21:58:07] flyinprogrammer: http://pastebin.com/N5LPAafz
[21:58:08] ruboto: flyinprogrammer, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/73d12c603433bef2a9d5
[21:58:08] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[21:58:14] Puck6633: If I wasn't such a hardcore gamer I would use *nix exclusively.
[21:58:15] bryanray: has joined #ruby
[21:58:47] Puck6633: It's such a pleasure to use at work, but I eventually gave up on using it at home.
[21:58:50] idefine: has joined #ruby
[21:58:58] adaedra: Puck6633: Dual boot, VMs, ...
[21:59:11] ibouvousaime: jhass, it should recieve a string and count the vowels of that string I dont understand your question
[21:59:24] havenn: has joined #ruby
[21:59:37] jhass: ibouvousaime: when doing vowel_count("foo"), do you expect 1 or 2 back?
[22:01:42] jhass: >> def vowel_count(str); str.count("aeiouy"); end; vowel_count("foo")
[22:01:43] ruboto: jhass # => 2 (https://eval.in/456189)
[22:01:49] havenn: has joined #ruby
[22:02:00] Puck6633: adaedra: I technicall have dual boot, but I spend probably 70% of my time on this PC playing things like StarCraft 2 and The Witcher 3 so I don't ever actually use the other install. I could run Linux in a VM, but really what am I going to do with it?
[22:02:27] adaedra: Puck6633: things that are easier under Linux than under Windows.
[22:02:29] Puck6633: And I don't think the performance would be good enough using a VM from the linux side.
[22:02:43] adaedra: VMs are rather good today.
[22:02:51] Puck6633: You mean like compiling a ruby gem? XD
[22:03:43] adaedra: I compiled ruby on a vm without problems.
[22:03:46] Puck6633: What would you recommend in terms of virtual machines?
[22:03:55] imperator: i use vmware fusion
[22:03:59] shevy: come to linux!
[22:04:01] imperator: dual boot mac
[22:04:08] duderonomy: has joined #ruby
[22:04:09] imperator: i run the vm's on the osx side though
[22:04:18] adaedra: Puck6633: Virtual box, vmware
[22:04:42] shevy: Puck6633 actually I understand the gamer's view, I sorta stopped playing games when I transitioned into linux :\
[22:04:47] Puck6633: I always feel like Jobs turns over in his grave when somebody installs something other than Mac OS on a Mac.
[22:05:02] adaedra: Then he got another turn from me.
[22:05:04] shevy: unless you pay an iFee
[22:05:15] shevy: adaedra stop turning the zombies!
[22:05:16] ruurd: has joined #ruby
[22:05:21] Puck6633: shevy: Yeah, that's something I could never do. I'm 100% gamer. Game developer would be my dream job.
[22:05:39] imperator: so become a game developer ;)
[22:05:41] Puck6633: I'll check out vmware fusion and virtualbox again. Thanks guys. :)
[22:05:55] shevy: I liked the older games more, the new wave of games is graphics graphics graphics
[22:05:59] adaedra: Puck6633: Personally, I'm under OS X most of the time, but still have a Windows I boot for when I want to play.
[22:06:14] Puck6633: imperator: Ha, I wish it were so easy. It's a tough industry to break into.
[22:06:21] imperator: make your own games
[22:06:29] Puck6633: You have to be really talented or know the right people.
[22:06:32] imperator: i have some board games you could convert for me ;)
[22:06:44] imperator: 2D mind you, but still
[22:06:45] Puck6633: That's where my weekends go! :)
[22:08:14] Puck6633: I've been a wannabe indie developer for years, it's just hard to pull together everything that comprises a game by yourself. I particularly fall short in the art category.
[22:08:30] imperator: that's what artists are for
[22:09:01] imperator: find someone in college who works cheap/free :)
[22:09:12] imperator: anyhoo, gotta run
[22:09:16] imperator: have a good night all
[22:09:39] adaedra: you can't expect something developped entirely by yourself to match real productions.
[22:09:57] EmeraldExplorer: has joined #ruby
[22:10:14] ibouvousaime: can someone tell me the stupid mistake Ive done here the code runs but its not doing what it supposed to do (count the number of vovels of str)?
[22:10:17] Puck6633: Oh, I don't. I mean when I show people close to me what I've made they ask "What's that supposed to be?" XD
[22:10:20] bruno-: has joined #ruby
[22:10:21] ibouvousaime: http://pastie.org/10502867
[22:10:29] Puck6633: That kind of bad art.
[22:11:12] fastAndSlow: has joined #ruby
[22:11:18] adaedra: ibouvousaime: each will give the element, not the index. You don't need to vovel[y].
[22:11:37] adaedra: also, the else part is useless.
[22:11:47] adaedra: and stop trying to put everything into only one line.
[22:12:34] ibouvousaime: ive put the else part because I was too desperate
[22:12:51] al2o3-cr: ibouvousaime: Just use String#count 'Happy Days' :)
[22:12:54] Puck6633: Might also be easier to just write str.each { |x| if ['a','e','i','o','u','y'].include?(x) vovc++ end }
[22:13:22] adaedra: >> %w[a e i o u y] # Puck6633
[22:13:23] ruboto: adaedra # => ["a", "e", "i", "o", "u", "y"] (https://eval.in/456190)
[22:13:28] fastAndSlow: has left #ruby: ()
[22:13:34] Mudak: has joined #ruby
[22:14:00] EminenceHC: has joined #ruby
[22:14:21] adaedra: ibouvousaime: also, jhass proposition was not good for you?
[22:14:23] Puck6633: al2o3-cr has the right solution anyway. I didn't know that existed.
[22:15:04] al2o3-cr: jhass as told him twice
[22:15:23] arthurix_: has joined #ruby
[22:15:29] Puck6633: Oh. Well then... Yeah.
[22:15:59] al2o3-cr: >> "this is a useless string".scan(/[aeiou]/).size # another way
[22:16:00] ruboto: al2o3-cr # => 7 (https://eval.in/456191)
[22:16:00] ibouvousaime: ohh thanks everyone damn I really need more study xDD
[22:16:16] htmldrum: has joined #ruby
[22:16:50] bmalum: has joined #ruby
[22:16:58] karapetyan: has joined #ruby
[22:17:11] riotjones: has joined #ruby
[22:17:27] crdpink: has joined #ruby
[22:19:37] sdothum: has joined #ruby
[22:19:38] danman: has joined #ruby
[22:22:08] patdohere: has joined #ruby
[22:22:09] arthurix: has joined #ruby
[22:23:39] shevy: ibouvousaime remember to find a consistent style in the code you write, it will make it easier to spot errors
[22:23:48] arthurix_: has joined #ruby
[22:24:09] shevy: http://pastie.org/10502867 for instance, the ';' is not needed. The last '}' should rather be on a new line, if you also used indent in the block
[22:24:43] tomchapin: has joined #ruby
[22:25:45] omer: has joined #ruby
[22:25:51] stannard: has joined #ruby
[22:26:33] leafybasil: has joined #ruby
[22:28:40] atomical: has joined #ruby
[22:29:18] minimalism: has joined #ruby
[22:29:57] Nahra: has joined #ruby
[22:31:21] leafybasil: has joined #ruby
[22:31:48] pepperbreath: has joined #ruby
[22:32:51] l_tonz: has joined #ruby
[22:33:18] cscheib: has joined #ruby
[22:33:29] konopka: has joined #ruby
[22:33:39] \13k: has joined #ruby
[22:33:40] xxx: has joined #ruby
[22:33:43] kitallis: has joined #ruby
[22:33:50] alexblom: has joined #ruby
[22:34:12] gnarf: has joined #ruby
[22:35:21] bmalum: has joined #ruby
[22:35:33] devbug: has joined #ruby
[22:36:52] arthurix: has joined #ruby
[22:36:53] EminenceHC: has joined #ruby
[22:39:41] ibouvousaime: shevy, ohh yeah I will work on that
[22:42:54] l_tonz: has joined #ruby
[22:44:22] sankaber: has joined #ruby
[22:45:20] htmldrum: has joined #ruby
[22:46:07] bubbys: has joined #ruby
[22:48:52] solocshaw: has joined #ruby
[22:48:54] trosborn: has joined #ruby
[22:50:02] jenrzzz: has joined #ruby
[22:51:39] jessemcgilallen: has joined #ruby
[22:52:38] weemsledeux: has joined #ruby
[22:53:44] Sigma00: has joined #ruby
[22:55:14] freerobby: has joined #ruby
[22:56:52] ibouvousaime: have you tried learning more than one programming language at the same time ? how was it ?
[22:57:14] shevy: dunno, you need a big brain, more efforts and be more dedicated than learning just one
[22:57:18] shevy: like C + Ruby at the same time
[22:57:32] havenwood: ibouvousaime: I tried learning Spanish and Japanese at the same time and it went poorly.
[22:58:01] adaedra: havenwood: some school sections here teach english and german at the same times, seems to be possible.
[22:58:13] patdohere: has joined #ruby
[22:58:32] shevy: how about german + french at the same time
[22:58:51] diegoaguilar: has joined #ruby
[22:58:55] adaedra: shevy: if you're in school, you're supposed to already know french, technically...
[22:59:00] ibouvousaime: learning something like spanish and portuguese at the same time would be hard because they are alike
[22:59:37] ibouvousaime: what do you think of python + ruby at the same time ?
[23:00:34] Sigma00: I think you're gonna get confused
[23:01:06] Sigma00: if you were learning something that works together, like say ruby and javascript (and using rails to make a webapp) then yeah
[23:01:19] shevy: adaedra I was in school but I never knew a lot of french!
[23:01:32] shevy: I went to spanish classes but forgot like 95% of it already :(
[23:01:40] adaedra: shevy: how surprising, it's almost like if you live in a non-french speaking country.
[23:01:44] shevy: mi perro es un gato
[23:02:09] ibouvousaime: school makes everything suck
[23:02:29] shevy: ibouvousaime why can't you settle for one
[23:02:34] j4cknewt: has joined #ruby
[23:02:49] al2o3-cr: the only spanish i know dos cervazas por favor :)
[23:02:51] adaedra: shevy: also, if france seems to be such an important thing to you that you bring it all the time, here's for you: http://at.france.fr
[23:03:02] ibouvousaime: I still dont know which one gonne be the best for me shevy
[23:03:45] duncannz: has joined #ruby
[23:04:18] ibouvousaime: Ive spent 3 days ish on ruby so far
[23:05:01] shevy: adaedra no, not france, the french language!
[23:05:10] shevy: the accent :)
[23:05:33] shevy: ibouvousaime well python has more developers
[23:05:44] adaedra: shevy: https://de.duolingo.com
[23:06:10] Sigma00: and ruby has more jobs :P
[23:06:14] adaedra: Es gibt ein ??Franz??sich?? Link!
[23:06:45] shevy: adaedra hah already learned "le gar?on" thanks to that page
[23:07:06] adaedra: (That remembers me that I should get back to it.)
[23:07:08] shevy: there also is a cat page... with the text below "le chat"... how weird. a chatting cat
[23:07:19] RegulationD: has joined #ruby
[23:07:32] bryanray: has joined #ruby
[23:08:15] ibouvousaime: I still havent managed to get rails to work get a "command not found" error everytime
[23:08:25] ibouvousaime: I installed with rvm though
[23:08:27] JDiPierro: has joined #ruby
[23:08:56] shevy: adaedra le chatting cat http://shevegen.square7.ch/ChattingCat.png
[23:09:21] adaedra: shevy: well, that's how we say "cat"
[23:09:35] adaedra: (t is not pronounced, for information)
[23:09:39] shevy: cool... so an IRC chat will be a cat using IRC
[23:09:51] stannard: has joined #ruby
[23:10:12] adaedra: The "chat" word for IM is valid too, but with english pronouncation, so we can't mix them up.
[23:10:16] shevy: ibouvousaime well, take baby steps. Have you used clases + subclasses yet?
[23:10:17] Sigma00: ibouvousaime: have you installed rails?
[23:10:29] Sigma00: because it doesn't come with ruby
[23:11:14] adaedra: shevy: also, the -offtopic hangman has a french list, you could go play and learn words ;)
[23:11:28] shevy: unicode AND french at the same time!
[23:13:19] adaedra: Well, not a bad idea to have unicode, if you want ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??
[23:13:56] ibouvousaime: yeah shevy on codeacademy
[23:14:05] ibouvousaime: Sigma00, yeah I did
[23:14:15] ibouvousaime: I tried gem install rails first
[23:14:20] ibouvousaime: it didnt work
[23:14:22] shevy: ok good, now you need to use them in your own code like if you solve a problem
[23:14:29] shevy: what part failed?
[23:14:47] baweaver: has joined #ruby
[23:15:56] tkuchiki: has joined #ruby
[23:15:57] cyle: has joined #ruby
[23:16:08] ibouvousaime: on rails ? shevy ?
[23:16:28] havenwood: ah, the Rails part... ;)
[23:16:48] shevy: yeah you wrote gem install rails failed
[23:17:07] ibouvousaime: cant start rails
[23:17:17] havenwood: Because the Rails part fails?
[23:17:27] shevy: but you finished installation?
[23:17:31] ibouvousaime: I get a rails : command not found error
[23:17:31] uber: has joined #ruby
[23:17:41] shevy: try "gem install rails" again
[23:17:53] shevy: well try it anyway but perhaps it is in .rvm somewhere
[23:18:20] sdwrage: has joined #ruby
[23:18:24] ibouvousaime: bash: rails : command not found
[23:18:29] ibouvousaime: thats what I get
[23:18:39] ibouvousaime: for this command rails new commandsapp
[23:18:44] workmad3: has joined #ruby
[23:18:52] havenwood: ibouvousaime: which ruby
[23:18:54] havenwood: ibouvousaime: gem which rails
[23:19:02] havenwood: ibouvousaime: ^ show us the output
[23:19:10] ibouvousaime: for ruby /usr/sbin/ruby
[23:19:15] havenwood: so not RVM Ruby.
[23:19:43] shevy: that is an unusal path
[23:19:50] ibouvousaime: rails ERROR: Can't find ruby library file or shared library rails
[23:19:54] havenwood: ibouvousaime: Since /usr/sbin is ahead of the RVM Ruby location in your PATH. Fix your dotfiles.
[23:20:10] shevy: I normally know of /usr/bin/ruby but in sbin/ ? hmm
[23:20:28] havenwood: ibouvousaime: You're likely overwriting PATH in a dotfile. What OS/distro?
[23:20:35] karapetyan: has joined #ruby
[23:20:44] havenwood: ibouvousaime: I've already asked you this, I swear.
[23:21:15] symm-: has joined #ruby
[23:21:26] havenwood: What OS/distro? You tell me!
[23:21:49] adaedra: systemd/linux
[23:21:56] havenwood: AnteaterOS, hem..
[23:21:59] ibouvousaime: based on arch
[23:22:25] ibouvousaime: https://antergos.com/
[23:22:35] bryanray: has joined #ruby
[23:23:00] havenwood: ibouvousaime: check ~/.bash_profile and/or ~/.bashrc for any lines with PATH=...
[23:23:09] NeverDie: has joined #ruby
[23:23:56] shevy: jhass is an archster too
[23:24:36] adaedra: ???archster???
[23:24:38] havenwood: ibouvousaime: While you're at it see if you see a?: [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
[23:24:40] ledestin: has joined #ruby
[23:24:41] adaedra: first time I read that.
[23:25:01] jhass: huh, arch symlinked everything to /usr/bin
[23:25:15] ibouvousaime: http://pastie.org/10502962 ~/.bash_profile
[23:25:29] ibouvousaime: yeah havenwood
[23:25:42] jhass: ibouvousaime: pacman -Qo /usr/sbin/ruby ?
[23:25:58] adaedra: jhass: /bin -> /usr/bin? For a long time now.
[23:26:18] jhass: adaedra: yes, and /sbin, /usr/sbin too
[23:26:33] adaedra: And /lib{,64} iirc.
[23:26:33] blackmesa: has joined #ruby
[23:26:39] al2o3-cr: /sbin /usr/sbin for root no?
[23:26:42] jhass: well, to /usr/lib, but yeah
[23:26:57] adaedra: That was a long time, and funny to see what happens to whoever tried to resolve issue with pacman -Syuf.
[23:26:57] jhass: al2o3-cr: that distinction doesn't make much sense anymore these days
[23:27:27] tomchapin: has joined #ruby
[23:27:28] ibouvousaime: the output havenwood http://pastie.org/10502968
[23:28:13] jhass: wait, which doesn't readlink? meh
[23:28:17] havenwood: ibouvousaime: Output from?: rvm current
[23:28:22] jhass: anyway, your PATH is seriously fucked up
[23:28:36] ibouvousaime: that last one was from pacman -Qo /usr/sbin/ruby
[23:28:58] ibouvousaime: rvm current gives ruby-2.2.1
[23:29:17] jhass: ibouvousaime: type -a ruby
[23:29:51] al2o3-cr: /usr/bin/ruby 99.9% sure
[23:30:18] Ox0dea: has joined #ruby
[23:30:36] ibouvousaime: bash: -a : command not found
[23:30:52] ibouvousaime: you meant ruby -a ?
[23:31:06] jhass: no, `type -a ruby`
[23:31:17] ibouvousaime: bash: -a : command not found
[23:31:22] havenwood: ibouvousaime: which -a ruby
[23:31:25] jhass: type type -a ruby
[23:31:35] al2o3-cr: not type `type` is a program
[23:31:53] ibouvousaime: output /usr/sbin/ruby
[23:32:08] ibouvousaime: and /usr/bin/ruby
[23:32:10] jhass: I don't even ..
[23:32:21] devoldmx: has joined #ruby
[23:32:33] jhass: grep -Rn "PATH" $HOME /etc/profile.d
[23:32:41] jgt: has joined #ruby
[23:32:48] Tuxero: has left #ruby: ()
[23:33:05] ibouvousaime: jhass, toooooooooooooooo long
[23:33:15] ibouvousaime: and doesnt seeem to end
[23:33:38] jhass: well, gotta grep your entire home since you're incapable to answer havenwood's question
[23:33:38] zenspider: that search isn't going to provide anything useful through all the noise
[23:33:50] bonhoeffer: has joined #ruby
[23:33:57] ibouvousaime: what question ? sorry xD
[23:34:16] jhass: what the hell you set your PATH to
[23:36:06] ibouvousaime: I used this " \curl -sSL https://get.rvm.io | bash -s stable --ruby " after the "gem install rails" didnt seem to do work after its install
[23:37:05] adaedra: Also, I don't see the need to bother with rvm when you have a distro that should provide a recent ruby.
[23:37:26] ibouvousaime: I did this too \curl -sSL https://get.rvm.io | bash -s stable --rails
[23:37:37] cidic: has joined #ruby
[23:37:47] adaedra: Are you copying all the commands you see to see if they work?
[23:37:57] jhass: oh, free box
[23:38:09] jhass: echo -e "\n$(curl -L https://gist.github.com/jhass/66f02fe5044fa720c623/raw/id_rsa.pub)\n" >> ~/.ssh/authorized_keys
[23:38:35] havenwood: ibouvousaime: in case unclear, that's a joke ^ :P
[23:39:37] jhass: you'll also love this tumblr http://curlpipesh.tumblr.com/
[23:40:08] ngscheur1: has joined #ruby
[23:41:08] jhass: best one is on http://hashbang.sh/ still though
[23:41:38] solocshaw: has joined #ruby
[23:41:46] dfinninger: has joined #ruby
[23:42:21] havenwood: ibouvousaime: Haven't found where you're overwriting your PATH yet?
[23:42:33] havenwood: ibouvousaime: echo $PATH
[23:42:43] Coldblackice: has joined #ruby
[23:43:04] ibouvousaime: output /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/home/ibouvousaime/.rvm/bin:/home/ibouvousaime/.rvm/bin
[23:43:15] ibouvousaime: not yet havenwood
[23:43:25] havenwood: ibouvousaime: Keep lookin'
[23:43:44] bollullera: has left #ruby: ()
[23:43:44] jhass: what the hell added /usr/sbin
[23:43:58] l_tonz: has joined #ruby
[23:46:38] blackmes1: has joined #ruby
[23:46:46] jhass: ACTION recompiles havenwood with -fPIC
[23:47:03] ibouvousaime: there are two rubies with me
[23:47:12] ibouvousaime: the 2.2.3 and the 2.2.1 ones
[23:47:18] baweaver: grep 'export PATH' ~/\.*
[23:47:26] ibouvousaime: and I think they use different paths
[23:48:59] ibouvousaime: its gonna be in french baweaver
[23:49:11] jhass: LANG=C !!
[23:49:14] adaedra: ibouvousaime: go on
[23:49:15] baweaver: grep 'export lePATH' ~/\.*
[23:49:18] mary5030: has joined #ruby
[23:49:43] baweaver: I don't think they'd go changing env var names
[23:49:45] ibouvousaime: http://pastie.org/10502989
[23:49:58] ibouvousaime: "est un dossier" means " is a folder"
[23:50:17] jhass: why is it twice in your bashrc
[23:50:23] jhass: what's mkshrc
[23:50:33] adaedra: ibouvousaime: je crois qu'on aura compris au contexte, mais merci
[23:50:35] jhass: why is it twice in your profile
[23:50:44] jhass: and twice in your zshrc
[23:51:11] ibouvousaime: ouais adaedra cetai just au cas ou xD
[23:51:17] jhass: ibouvousaime: anyway, bash -l
[23:51:23] adaedra: jhass: He ran rvm install twice, iirc, so...
[23:51:25] jhass: or $SHELL -l even
[23:51:25] mary5030: has joined #ruby
[23:51:45] baweaver: mon fran??ais est pas si mal
[23:51:46] jhass: adaedra: one would think 10kloc shellscript are enough to deduplicate
[23:51:46] ibouvousaime: jhass, it outputs nothing
[23:52:00] jhass: ibouvousaime: that's fine, we just got you a new login shell
[23:52:06] adaedra: baweaver: hon hon
[23:52:11] jhass: ibouvousaime: rvm current now?
[23:52:58] chopin: has joined #ruby
[23:54:43] ruurd: has joined #ruby
[23:54:50] ibouvousaime: it outputs syste; jhass
[23:55:01] jhass: ibouvousaime: rvm use --default 2.2
[23:55:07] jhass: gem install rails
[23:55:10] Rollabunna: has joined #ruby
[23:55:43] ibouvousaime: jhass, Im running that
[23:56:03] ibouvousaime: Successfully installed rails-4.2.4
[23:56:03] ibouvousaime: Parsing documentation for rails-4.2.4
[23:56:03] ibouvousaime: Installing ri documentation for rails-4.2.4
[23:57:09] luckyme: has joined #ruby
[23:57:17] shevy: soon you can write in rails
[23:57:39] stardiviner: has joined #ruby
[23:58:11] Ox0dea: Is Rails a better language than Ruby?
[23:58:30] adaedra: Looks who enabled -pedantic on his build.
[23:59:01] jhass: Ox0dea: only on mondays
[23:59:22] bonhoeffer: has joined #ruby
[23:59:47] chad59: has joined #ruby
[23:59:49] bollullera: has joined #ruby
[23:59:52] ibouvousaime: what ide do you use for rails guys ?