« Back to channel list

#ruby - 05 October 2015

« Back 1 day Forward 1 day »
[00:00:01] platzhirsch: has joined #ruby
[00:02:20] jun_: has joined #ruby
[00:02:29] freerobby: has joined #ruby
[00:06:18] ramfjord: has joined #ruby
[00:10:14] unix_: has joined #ruby
[00:10:19] tkuchiki: has joined #ruby
[00:11:55] allomov: has joined #ruby
[00:15:13] NeverDie: has joined #ruby
[00:16:59] aerozeppelin: has joined #ruby
[00:17:08] _blizzy_: has joined #ruby
[00:17:59] aerozeppelin: has joined #ruby
[00:18:29] aerozeppelin: has joined #ruby
[00:18:42] freerobby: has joined #ruby
[00:20:08] aerozeppelin: has joined #ruby
[00:21:18] bb010g: has joined #ruby
[00:21:38] aerozeppelin: has joined #ruby
[00:21:41] ramfjord: has joined #ruby
[00:24:01] deavid: has joined #ruby
[00:24:02] netmask: has joined #ruby
[00:25:09] ankhers: has joined #ruby
[00:25:33] _blizzy_: has joined #ruby
[00:25:55] unix_: has joined #ruby
[00:26:06] unix_: Is there an environment variable for ruby's load path?
[00:26:19] Marsupermammal: has joined #ruby
[00:26:47] zhkirill: There is global variable $LOAD_PATH
[00:27:13] unix_: zhkirill: yeah but what about an env variable?
[00:27:14] TheNet: has joined #ruby
[00:28:19] ankhers: has joined #ruby
[00:28:23] unix_: Is the load path only defined in a ruby file? It doesn't exist outside of a script?
[00:29:25] zhkirill: You can do like that: ruby -e 'puts $LOAD_PATH'
[00:30:14] zhkirill: $LOAD_PATH is dependent on Ruby you are using.
[00:31:03] zhkirill: Like I may have many versions of Ruby installed, and $LOAD_PATH will be different for every version.
[00:31:22] Radar: unix_: there is not an environment variable for it, since it is defined at runtime.
[00:31:31] wookiehangover: has joined #ruby
[00:31:40] Radar: unix_: When you are using tools like Bundler, it alters the load path to include only the right dependencie.s
[00:32:44] michael_mbp: has joined #ruby
[00:33:06] unix_: Radar: So whenever ruby looks for files to load, it looks in the array $:, which is the load path. Outside of that array it doesn't exist, correct?
[00:33:24] Radar: unix_: "it"?
[00:33:36] Radar: What is "it" after "array" referring to?
[00:33:45] unix_: it, the load path.
[00:36:55] ankhers: has joined #ruby
[00:37:18] unix_: has left #ruby: ()
[00:37:53] ankhers: has joined #ruby
[00:38:03] bronson: has joined #ruby
[00:38:08] htmldrum: has joined #ruby
[00:41:19] workmad3: has joined #ruby
[00:41:27] aerozeppelin: has joined #ruby
[00:42:23] senayar: has joined #ruby
[00:42:40] tkuchiki: has joined #ruby
[00:43:44] QKO: has joined #ruby
[00:44:06] ankhers: has joined #ruby
[00:44:48] elperdut_: has joined #ruby
[00:44:54] arooni: has joined #ruby
[00:46:18] solocshaw: has joined #ruby
[00:46:51] davedev24: has joined #ruby
[00:47:22] haraoka: has joined #ruby
[00:55:22] evanjs: has joined #ruby
[00:58:09] solocshaw1: has joined #ruby
[00:58:42] freerobby: has joined #ruby
[00:59:26] Ox0dea: has joined #ruby
[01:00:28] platzhirsch: has left #ruby: ()
[01:00:30] amoeba: has joined #ruby
[01:01:49] blackmesa: has joined #ruby
[01:04:19] aerozeppelin: has joined #ruby
[01:04:34] aerozeppelin: has joined #ruby
[01:04:49] aerozeppelin: has joined #ruby
[01:08:39] Ox0dea: >> :![42]
[01:08:41] ruboto_: Ox0dea # => nil (https://eval.in/444734)
[01:08:45] Ox0dea: What's happening there?
[01:09:11] Ox0dea: It should be a syntax error or a Symbol, surely?
[01:09:25] CloCkWeRX: has joined #ruby
[01:09:35] freerobby: has joined #ruby
[01:09:38] CloCkWeRX: has left #ruby: ()
[01:10:58] deavid: has joined #ruby
[01:12:26] craysiii: has joined #ruby
[01:12:50] skweek: has joined #ruby
[01:13:09] jerseybyte: has joined #ruby
[01:13:26] stardiviner: has joined #ruby
[01:15:28] Radar: I am utterly convinced you just type random characters into Ruby just to see what it will do.
[01:16:19] Ox0dea: Well, I admit I half-expected :![] to be a valid Symbol.
[01:16:34] Ox0dea: When it raised an ArgumentError, curiosity got the better of me.
[01:17:54] skweek: has joined #ruby
[01:21:31] baweaver: Radar: I share this belief
[01:22:37] Ox0dea: Nobu is going to be upset with me.
[01:23:04] aerozeppelin: has joined #ruby
[01:23:28] aerozeppelin: has joined #ruby
[01:23:49] Ox0dea: Then again, Enumerator.new(&:foo) is pretty unorthodox.
[01:24:54] senayar: has joined #ruby
[01:27:07] Maletor: has joined #ruby
[01:28:45] chipotle: has joined #ruby
[01:29:02] netmask: has joined #ruby
[01:30:06] wmoxam: Ox0dea: >> :![0]
[01:30:13] ruboto_: wmoxam # => "!" (https://eval.in/444738)
[01:30:28] Ox0dea: Oh, right.
[01:30:34] senayar: has joined #ruby
[01:30:56] houhoulis: has joined #ruby
[01:31:20] astrobunny: has joined #ruby
[01:31:40] msyvich: has joined #ruby
[01:32:43] decoponio: has joined #ruby
[01:34:00] gadavid-helpa: has joined #ruby
[01:35:07] bruno-: has joined #ruby
[01:38:58] bronson: has joined #ruby
[01:41:25] aerozeppelin: has joined #ruby
[01:46:06] GnuYawk: has joined #ruby
[01:47:53] CloCkWeRX: has joined #ruby
[01:49:41] aerozeppelin: has joined #ruby
[01:51:45] aerozeppelin: has joined #ruby
[01:53:11] wildlander: has joined #ruby
[01:54:21] wildlander: has joined #ruby
[01:55:14] wildlander: has joined #ruby
[01:57:26] ruby-lang238: has joined #ruby
[01:57:39] netmask: has joined #ruby
[01:57:50] ruby-lang238: Hello I am looking to make a ruby calculator that takes input in form route and displays in result route.
[01:58:12] ericjphillips: has joined #ruby
[01:58:12] tkuchiki: has joined #ruby
[01:58:13] ruby-lang238: I am getting this error def result result = @meal_cost * @tip_percent/100 render result end
[01:58:19] ruby-lang238: please help me fix this
[01:59:19] wmoxam: ruby-lang238: that's not an error message ;)
[01:59:29] ruby-lang238: ill make a gist with the error message
[01:59:40] wmoxam: ruby-lang238: great
[02:00:35] crdpink2: has joined #ruby
[02:01:34] pwnd_nsfw: has joined #ruby
[02:02:34] stardiviner: has joined #ruby
[02:03:40] ruby-lang238: https://gist.github.com/sqfmason/924e633e6bfadb7ad446
[02:03:42] blackmesa: has joined #ruby
[02:03:50] ruby-lang238: wmoxam- please see this https://gist.github.com/sqfmason/924e633e6bfadb7ad446
[02:05:14] A124: has joined #ruby
[02:06:12] agent_white: Evenin folks!
[02:06:24] wmoxam: ruby-lang238: the problem is that the meal_cost and tip_percentage are defined in the 'form' method, but used in the 'result' method
[02:06:33] wmoxam: ruby-lang238: so they are nil
[02:07:28] wmoxam: ruby-lang238: in the channel please, no pms ;)
[02:07:29] Maletor: has joined #ruby
[02:07:37] ruby-lang238: or should i define them both in both the "form" and "result"
[02:07:45] ruby-lang238: sorry about that
[02:07:54] wmoxam: ruby-lang238: yeah, for sure
[02:08:58] Ox0dea: >> 2236081408416666 ** 2
[02:08:58] wmoxam: ruby-lang238: you'll also probably want to cast them to integers
[02:08:59] ruboto_: Ox0dea # => 5000060065066660656065066555556 (https://eval.in/444741)
[02:09:03] Ox0dea: Kinda spooky, that.
[02:09:15] skweek: has joined #ruby
[02:09:34] Ox0dea: It's only 0s, 5s, and 6s.
[02:11:29] Oog: has joined #ruby
[02:12:46] PhantomS_: has joined #ruby
[02:12:47] allomov: has joined #ruby
[02:13:12] ruby-lang238: https://gist.github.com/sqfmason/a1568e6fc22149c905e4 This is the error now :/
[02:14:18] Ox0dea: I think you need to use #to_i some more.
[02:14:32] Ox0dea: Try chaining them for best results.
[02:15:35] ruby-lang238: what is the method to do that?
[02:15:44] Ox0dea: You just keep tackin' em on the end.
[02:15:47] Ox0dea: 42.to_i.to_i.to_i
[02:16:32] ruby-lang238: so chain the .to_i on all of them?
[02:16:38] Ox0dea: No, I'm being facetious.
[02:16:48] Ox0dea: wmoxam's advice to use #to_i was misguided, I think.
[02:16:55] Ox0dea: In this case, it's just hiding the fact that you've still got nils.
[02:17:00] Ox0dea: >> nil.to_i
[02:17:01] ruboto_: Ox0dea # => 0 (https://eval.in/444742)
[02:17:20] Ox0dea: You're converting some nil to 0 and then trying to divide by it, thus the ZeroDivisionError.
[02:17:22] DmitryBochkarev: has joined #ruby
[02:17:42] wmoxam: Ox0dea: the nils previously were because the variables were uninitialized ;)
[02:17:54] wmoxam: now it's a different problem
[02:18:47] Ox0dea: Well, there's an interesting philosophical consideration: are there different kinds of nonexistence?
[02:19:11] wmoxam: Ox0dea: yes. Known unknowns & unknown unknowns
[02:19:35] ruby-lang238: I was going to say that! the aware non existence & non aware non existence
[02:20:09] Ox0dea: >> '2deep4me'.gsub /\d/, &:succ
[02:20:10] ruboto_: Ox0dea # => "3deep5me" (https://eval.in/444743)
[02:20:12] havenwood: has joined #ruby
[02:20:29] sankaber: has joined #ruby
[02:21:54] htmldrum: has joined #ruby
[02:23:32] wmoxam: ruby-lang238: so you should be able to see which params are being passed to your result method in the log file (if any).
[02:25:47] aerozeppelin: has joined #ruby
[02:26:22] aerozeppelin: has joined #ruby
[02:27:01] ruby-lang238: https://gist.github.com/sqfmason/2a1affece5c67488edc4 is this the log file?
[02:27:07] ruby-lang238: in the terminal?
[02:27:50] TheNet: has joined #ruby
[02:27:59] ruby-lang238: Request Parameters: {"tip"=>"15"}
[02:28:46] Ox0dea: ruby-lang238: Well, looks like you're missing some, eh?
[02:29:25] workmad3: has joined #ruby
[02:30:18] skweek: has joined #ruby
[02:30:56] SpikeMaster: has joined #ruby
[02:31:16] CloCkWeRX: has left #ruby: ()
[02:31:41] aerozeppelin: has joined #ruby
[02:31:46] SpikeMaster: has left #ruby: ()
[02:32:20] govg: has joined #ruby
[02:32:28] TheNet: has joined #ruby
[02:33:10] ruby-lang238: am i missing something in the controller ?
[02:35:39] baweaver: has joined #ruby
[02:36:16] Ox0dea: ruby-lang238: Does your form not have fields for meal and amount?
[02:37:16] ruby-lang238: in the form.html.erb ?
[02:37:56] ruby-lang238: the form has fields for amount, tip percentage, amount of people
[02:38:10] ruby-lang238: in order to find out the tip amount to be paid per person
[02:39:58] bronson: has joined #ruby
[02:40:30] zenguy_pc: has joined #ruby
[02:41:38] rushed: has joined #ruby
[02:41:57] AndroUser2: has joined #ruby
[02:43:16] wmoxam: ruby-lang238: as per what you pasted above, only tip is being passed
[02:43:43] wmoxam: ruby-lang238: so there must be something wrong with the form html
[02:44:57] junior: has joined #ruby
[02:45:01] cih: has joined #ruby
[02:45:49] TheNet_: has joined #ruby
[02:47:51] ivanf: has left #ruby: ()
[02:48:05] arescorpio: has joined #ruby
[02:48:06] arooni: has joined #ruby
[02:48:07] Guest42223: has joined #ruby
[02:49:10] ruby-lang238: https://gist.github.com/sqfmason/72b664815dc4f211a216 this is what's in form and results
[02:49:53] govg: has joined #ruby
[02:50:04] Ox0dea: ruby-lang238: The fields missing from your params are doing so because you've given them ids, but not names.
[02:50:36] Ox0dea: The name attribute is the one used in constructing query strings.
[02:51:43] ruby-lang238: can you please explain the difference between names and ids?
[02:52:05] ruby-lang238: like meal:amount ?
[02:52:20] Ox0dea: <foo name="bar" /> != <foo id="bar" />
[02:52:48] ruby-lang238: ok ill brb thanks for your help so far
[02:53:57] ledestin: has joined #ruby
[02:54:00] dcarmich: has joined #ruby
[02:55:09] NightMonkey: has joined #ruby
[02:59:58] User458764: has joined #ruby
[03:00:14] Meow-J: has joined #ruby
[03:00:54] gener1c: has joined #ruby
[03:01:11] mrtomme: has joined #ruby
[03:02:41] skweek: has joined #ruby
[03:04:12] favadi: has joined #ruby
[03:04:25] rickmasta: has joined #ruby
[03:07:15] baweaver: anyone good with hacking around sublime? I'll figure it out eventually but trying to tie macros into code execution
[03:08:09] Ox0dea: I only ever wrote a rainbow parentheses thing for Sublime.
[03:08:33] Ox0dea: I'm sure the plugin architecture has gotten better since then, but Python.
[03:08:44] baweaver: which is why I mentioned it in there too.
[03:09:49] braincrash: has joined #ruby
[03:11:10] baweaver: though they're more touchy about being on topic
[03:11:22] baweaver: python being obsessed with rules and formalities.
[03:11:42] baweaver: couldn't help a good jab there :P
[03:11:54] Hyperfocal: has joined #ruby
[03:12:14] Ox0dea: > Special cases aren't special enough to break the rules.
[03:12:15] Soda: has joined #ruby
[03:13:30] baweaver: yeah, they're straight ignoring me in there :P
[03:14:20] zenguy_pc: has joined #ruby
[03:17:22] lotherk: has joined #ruby
[03:17:32] darkf: has joined #ruby
[03:18:54] zenguy_pc: has joined #ruby
[03:19:19] finisherr: has joined #ruby
[03:20:08] Fezzler: has joined #ruby
[03:22:55] gix: has joined #ruby
[03:23:29] zenguy_pc: has joined #ruby
[03:23:44] moeabdol: has joined #ruby
[03:27:26] baweaver: probably going to just steal stuff from https://github.com/jcartledge/sublime-worksheet or sublime yardoc
[03:28:12] skweek: has joined #ruby
[03:35:06] Diitto: has left #ruby: ("Leaving")
[03:35:13] zenguy_pc: has joined #ruby
[03:38:20] zenguy_pc: has joined #ruby
[03:39:33] pontiki: has joined #ruby
[03:40:52] bronson: has joined #ruby
[03:43:54] netmask: has joined #ruby
[03:47:51] pontiki: has joined #ruby
[03:48:32] hfp_work: has joined #ruby
[03:49:30] Maletor: has joined #ruby
[03:49:31] netmask: has joined #ruby
[03:51:09] skade: has joined #ruby
[03:51:45] datanoise: has joined #ruby
[03:52:15] martin_work: has joined #ruby
[03:52:31] martin_work: home come this returns empty for index 0
[03:52:32] martin_work: pp "07:05:45AM".split(/(\d+):(\d+):(\d+)(PM|AM)/);
[03:52:33] martin_work: ["", "07", "05", "45", "AM"]
[03:53:05] Radar: martin_work: first match in the group is at index 1
[03:53:12] Ox0dea: martin_work: You shouldn't be using the #split method there.
[03:53:43] cantaberry: Stupid time again... I can't figure out why I am only getting one ball or why they don't have random starting poitns... https://gist.github.com/anonymous/f9bb4f83d874780966d4
[03:54:44] martin_work: Ox0dea: what would you recommend
[03:54:51] Ox0dea: martin_work: #match, in this case.
[03:54:56] cantaberry: I'm stupd. Was running the wrong program from the command line.
[03:55:22] zenguy_pc: has joined #ruby
[03:55:33] hfp_work: has joined #ruby
[03:55:57] EminenceHC: has joined #ruby
[03:57:03] junior: has joined #ruby
[03:58:05] tawaffan: has joined #ruby
[03:59:04] amystephen: has joined #ruby
[03:59:05] freerobby: has joined #ruby
[03:59:05] DocMAX: has joined #ruby
[04:02:09] skweek: has joined #ruby
[04:03:48] krz: has joined #ruby
[04:04:27] blackmesa: has joined #ruby
[04:06:06] iateadonut: has joined #ruby
[04:07:23] lkba_: has joined #ruby
[04:11:15] spuk: has joined #ruby
[04:11:48] allomov: has joined #ruby
[04:14:10] kriskropd: has joined #ruby
[04:17:34] workmad3: has joined #ruby
[04:17:37] pwnd_nsfw: has joined #ruby
[04:20:30] skade: has joined #ruby
[04:20:38] mondongo: has joined #ruby
[04:20:56] seaned__: has joined #ruby
[04:21:55] keen___________3: has joined #ruby
[04:25:53] decoponio: has joined #ruby
[04:27:05] kp666: has joined #ruby
[04:27:07] hfp_work: has joined #ruby
[04:33:05] Maletor: has joined #ruby
[04:36:37] hfp_work: has joined #ruby
[04:37:13] skade: has joined #ruby
[04:40:33] LBRapid: has joined #ruby
[04:41:52] bronson: has joined #ruby
[04:42:05] aerozeppelin: has joined #ruby
[04:42:20] aerozeppelin: has joined #ruby
[04:43:12] astrobun_: has joined #ruby
[04:43:37] hfp_work: has joined #ruby
[04:44:31] EminenceHC: has joined #ruby
[04:45:23] psye: has joined #ruby
[04:49:25] psye: has joined #ruby
[04:49:26] DocMAX2: has joined #ruby
[04:50:29] psye: has joined #ruby
[04:51:04] rickmasta: has joined #ruby
[04:51:20] aerozeppelin: has joined #ruby
[04:54:06] martin_work: has joined #ruby
[04:55:11] kies^: has joined #ruby
[04:55:13] agent_white: has joined #ruby
[04:58:20] edwardly: has joined #ruby
[04:58:20] edwardly: has joined #ruby
[05:00:18] NeverDie: has joined #ruby
[05:01:25] [k-: has joined #ruby
[05:04:10] EminenceHC: has joined #ruby
[05:04:39] hephaestus_rg: has joined #ruby
[05:06:17] ponga: has joined #ruby
[05:12:23] DocMAX: has joined #ruby
[05:12:32] zenguy_pc: has joined #ruby
[05:13:13] aerozeppelin: has joined #ruby
[05:16:27] Moonman420: has joined #ruby
[05:16:27] ChanServ: +b *!*@gateway/web/freenode/ip.198.105.210.247
[05:16:27] ChanServ: ChanServ kicked Moonman420: is banned from this channel
[05:17:08] aerozeppelin: has joined #ruby
[05:17:22] dhjondoh: has joined #ruby
[05:18:21] edwardly: has joined #ruby
[05:18:34] edwardly: has joined #ruby
[05:19:18] luckyme: has joined #ruby
[05:20:10] sanguisdex: has joined #ruby
[05:23:03] aganov: has joined #ruby
[05:24:06] mary5030: has joined #ruby
[05:25:35] htmldrum: has joined #ruby
[05:27:24] sanjayu: has joined #ruby
[05:27:45] pawnbox: has joined #ruby
[05:28:02] astrobun_: has joined #ruby
[05:29:19] martin_work: has joined #ruby
[05:31:47] charliesome: has joined #ruby
[05:33:16] aerozeppelin: has joined #ruby
[05:33:30] allomov: has joined #ruby
[05:35:08] mloy: has joined #ruby
[05:35:41] martin_work: has joined #ruby
[05:37:37] bruno-: has joined #ruby
[05:38:01] baweaver: has joined #ruby
[05:38:12] timonv: has joined #ruby
[05:39:10] vdamewood: has joined #ruby
[05:40:29] Gnomethrower: has joined #ruby
[05:40:29] Gnomethrower: has joined #ruby
[05:41:42] pontiki: has joined #ruby
[05:42:49] bronson: has joined #ruby
[05:45:01] Pharaoh2: has joined #ruby
[05:45:48] [k-: Ox0dea!
[05:46:29] tagrudev: has joined #ruby
[05:46:40] Pharaoh2: has joined #ruby
[05:47:29] last_staff: has joined #ruby
[05:48:52] astrobun_: has joined #ruby
[05:49:10] yellowgh0st: has joined #ruby
[05:50:38] yellowgh0st: has joined #ruby
[05:53:45] felixrsmith: has joined #ruby
[05:56:10] pepperbreath: has left #ruby: ()
[05:58:41] ruby878: has joined #ruby
[06:02:28] dionysus69: has joined #ruby
[06:04:25] ndrei: has joined #ruby
[06:05:38] workmad3: has joined #ruby
[06:06:28] blackmesa: has joined #ruby
[06:07:24] skade: has joined #ruby
[06:08:15] codecop: has joined #ruby
[06:09:00] t3rm: has joined #ruby
[06:10:48] eGGsha: has joined #ruby
[06:11:07] darkxploit: has joined #ruby
[06:12:47] nisstyre: has joined #ruby
[06:13:00] lsmola: has joined #ruby
[06:16:40] wallerdev: has joined #ruby
[06:16:46] lxsameer: has joined #ruby
[06:16:47] lxsameer: has joined #ruby
[06:19:33] NeverDie: has joined #ruby
[06:19:40] bronson: has joined #ruby
[06:21:14] Gnomethrower: has joined #ruby
[06:21:14] Gnomethrower: has joined #ruby
[06:23:19] riotjones: has joined #ruby
[06:23:48] jgt: has joined #ruby
[06:25:05] emilkarl: has joined #ruby
[06:25:44] DocMAX: has joined #ruby
[06:26:51] karapetyan: has joined #ruby
[06:27:03] leafybasil: has joined #ruby
[06:30:21] cih: has joined #ruby
[06:32:08] Pumukel: has joined #ruby
[06:33:18] Spami: has joined #ruby
[06:34:27] firstdayonthejob: has joined #ruby
[06:39:58] herbst: has joined #ruby
[06:40:14] sphex: has joined #ruby
[06:40:29] pawnbox: has joined #ruby
[06:40:42] jas02: has joined #ruby
[06:41:58] ruurd: has joined #ruby
[06:42:29] DoubleMalt: has joined #ruby
[06:43:16] bondibox: has joined #ruby
[06:45:48] DTSCode: has joined #ruby
[06:46:24] DTSCode: hello guys... I was curious how well gui's in ruby work? ie are they really resource heavy?
[06:46:53] yeticry: has joined #ruby
[06:46:55] arup_r: has joined #ruby
[06:50:19] DEA7TH: has joined #ruby
[06:56:01] haxrbyte: has joined #ruby
[06:56:42] ndrei: has joined #ruby
[06:59:05] unshadow: has joined #ruby
[06:59:48] andikr: has joined #ruby
[07:00:12] inanepenguin: has joined #ruby
[07:01:20] skade: has joined #ruby
[07:05:02] howdoi: has joined #ruby
[07:05:45] yfeldblum: has joined #ruby
[07:07:20] blackmesa: has joined #ruby
[07:08:51] cih: has joined #ruby
[07:10:12] anisha: has joined #ruby
[07:10:50] trautwein: has joined #ruby
[07:13:47] workmad3: has joined #ruby
[07:15:57] pawnbox: has joined #ruby
[07:15:59] SCHAAP137: has joined #ruby
[07:18:46] shredding: has joined #ruby
[07:20:47] NeverDie: has joined #ruby
[07:21:51] simplyianm: has joined #ruby
[07:23:11] minotep: has joined #ruby
[07:23:17] ddv: fighting with libv8 on el capitan :(
[07:23:36] blackmesa: has joined #ruby
[07:27:13] herbst: i never know how dependency hell really looked like until i worked on a mac. (coming from linux :)
[07:27:44] Ropeney: has joined #ruby
[07:27:58] craysiii: in that regard linux really is king IMO
[07:30:13] ddv: usually I don't have any problems
[07:30:26] ddv: herbst: what dependency hell?
[07:31:06] herbst: try installing v8 on a mac for example, especially if you dont actually need it, but just dont want to mess with the projects Gemfile
[07:31:12] datanoise: has joined #ruby
[07:31:16] ddv: herbst: oh homebrew, macports or fink
[07:31:16] herbst: thats hell
[07:31:29] dikaio: has joined #ruby
[07:31:49] Balzrael: has joined #ruby
[07:31:49] herbst: yeah homebrew is what i did, still took a while longer than expected to get the project running
[07:31:55] apeiros: OH: acts_as_bug
[07:32:07] ddv: apeiros: have upgraded to el capitan?
[07:32:16] apeiros: nope. only downloaded.
[07:32:36] apeiros: waiting for all the horror stories to come in.
[07:32:54] ddv: still fighting with libv8, won't compile :p
[07:33:15] herbst: we had a custom building system completely break because of the xcode update. i am to scared to update currently
[07:33:22] pecpec: has joined #ruby
[07:34:08] zenguy_pc: has joined #ruby
[07:38:22] yeticry: has joined #ruby
[07:38:42] platzhirsch: has joined #ruby
[07:40:44] karapetyan: has joined #ruby
[07:40:53] astrobun_: has joined #ruby
[07:40:53] consti: has joined #ruby
[07:41:34] senayar: has joined #ruby
[07:41:53] yfeldblum: has joined #ruby
[07:42:43] livathinos: has joined #ruby
[07:43:16] atomical: has joined #ruby
[07:45:56] terlar: has joined #ruby
[07:46:08] giuseppesolinas: has joined #ruby
[07:46:09] giuseppesolinas_: has joined #ruby
[07:46:48] Musashi007: has joined #ruby
[07:46:54] Freeaqingme: has joined #ruby
[07:50:55] sundhell: has joined #ruby
[07:51:26] yfeldblum: has joined #ruby
[07:52:06] zenguy_pc: has joined #ruby
[07:53:19] n008f4g_: has joined #ruby
[07:53:29] Silox|: has joined #ruby
[07:53:58] Hounddog: has joined #ruby
[07:55:53] Rollabunna: has joined #ruby
[07:56:02] joonty: has joined #ruby
[07:57:14] rocknrollMarc: has joined #ruby
[07:57:43] leafybasil: has joined #ruby
[07:58:25] rocknrollMarc: has joined #ruby
[07:59:25] Axy: has joined #ruby
[07:59:25] Axy: has joined #ruby
[07:59:52] rushed: has joined #ruby
[08:00:43] platzhirsch: Why is there a .ruby-version in my Android project directory?
[08:00:47] platzhirsch: Who put it there?
[08:00:49] terlar: has joined #ruby
[08:02:21] maloik: I doubt anyone here knows
[08:02:31] maloik: that said, try `git blame` on it and find out
[08:04:25] awk: hmm, out of interest, does anyone have a ruby script to export all google sheets to csv ;)
[08:04:45] KnownSyntax: has joined #ruby
[08:05:35] arup_r: maloik: Good morning .. :)
[08:06:28] maloik: let's stick to morning
[08:06:37] maloik: I feel terrible
[08:07:01] eGGsha: has joined #ruby
[08:07:59] solars: has joined #ruby
[08:09:19] arup_r: Did you sleep today ?
[08:09:28] nfk|laptop: has joined #ruby
[08:09:45] kies^: has joined #ruby
[08:10:54] krisquigley: has joined #ruby
[08:10:59] ddv: herbst: you could have checked that with the beta releases a few months back
[08:11:42] karapetyan: has joined #ruby
[08:12:22] herbst: i didnt, i assume my co workers did. I a just a ruby monkey in the company. I have nothing depending on xCode. Just heard the others raging a whole afternoon
[08:12:35] adaedra: Hello everyone
[08:14:24] vondruch: has joined #ruby
[08:15:22] skade: has joined #ruby
[08:16:41] certainty: hello you specific one
[08:16:56] DEA7TH: has joined #ruby
[08:19:02] giuseppesolinas: has joined #ruby
[08:19:10] giuseppesolinas_: has joined #ruby
[08:19:29] arup_r: certainty: :D
[08:20:15] bronson: has joined #ruby
[08:23:12] rubybeginner: has joined #ruby
[08:23:54] Kendos-Kenlen: has joined #ruby
[08:24:57] yfeldblum: has joined #ruby
[08:25:24] zenguy_pc: has joined #ruby
[08:28:12] cih_: has joined #ruby
[08:28:33] araujo: has joined #ruby
[08:28:34] araujo: has joined #ruby
[08:29:04] maloik: arup_r: not that well... it's weird though, everything hurts, but only a little bit
[08:29:23] maloik: I feel something is up in my stomache, my head, my throat... but no proper headache or sore throat to speak of
[08:29:30] maloik: and my eyes and skin hurts :D
[08:29:57] yfeldblum: has joined #ruby
[08:30:01] lalalaaa: has joined #ruby
[08:30:11] niko: has joined #ruby
[08:30:26] haraoka: has joined #ruby
[08:31:31] giuseppesolinas: has joined #ruby
[08:31:33] giuseppesolinas_: has joined #ruby
[08:32:47] arup_r: maloik: :( But what is the reason of these many hurts ... ?
[08:33:56] maloik: no clue, I'm guessing it's just my body fighting something off
[08:34:14] maloik: either that or I'm too tired, I did just run a conference past few days and felt kind of drained
[08:34:43] blackmesa: has joined #ruby
[08:36:24] jenrzzz: has joined #ruby
[08:38:02] arup_r: maloik: you need a proper sleep.. may be don't come to IRC .. atleast 3 days..
[08:38:53] lalalaaa: Hi! Trying to output some stuff randomly according to probabilities, but having some trouble preventing the same thing from being repeated twice: https://gist.github.com/dt1973/0f48bc9e8abdc1d462c2 -- airplane.rb:35:in `include?': no implicit conversion of Float into String (TypeError) -- anybody know?
[08:39:22] maloik: which line is airplane.rb:35 ?
[08:40:02] lalalaaa: maloik: Sorry about that, it's `if range.include?(random)`
[08:40:06] maloik: lalalaaa: you really should paste your code in there and call it foo.rb so that we get proper code styles applied
[08:42:16] mattprelude: has joined #ruby
[08:42:19] arup_r: maloik: that is why you are ill! take rest :)
[08:42:35] dmolina: has joined #ruby
[08:43:14] lalalaaa: maloik: https://gist.github.com/dt1973/0f48bc9e8abdc1d462c2
[08:43:30] c0m0: has joined #ruby
[08:43:40] adaedra: arup_r: don't come to IRC for 3 days!? Stop this crazy talk!
[08:43:53] TheWhip: has joined #ruby
[08:44:14] maloik: I don't like rest
[08:44:21] f4cl3y: has joined #ruby
[08:44:38] maloik: although, if my ISP hadn't told me there'd be no internet for the whole day... i might have stayed home
[08:44:56] maloik: lalalaaa: im not getting that error
[08:45:12] dbussink: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[08:45:13] arup_r: adaedra: you jumped in between without knowing any context.. Don't reply me on the plase
[08:45:25] arup_r: *that please
[08:45:29] maloik: ughh I am now.. hold on
[08:46:28] adaedra: arup_r: I see the context, don't worry.
[08:46:44] arup_r: come on... adaedra no more.
[08:48:18] rdark: has joined #ruby
[08:48:23] maloik: lalalaaa: seems your variables are messed up... memo is a range, range is 0.5, airplane is nil
[08:48:48] maloik: you'll probably need to run through the program using something like pry and figure out where something is not what you expect it to be
[08:51:39] lalalaaa: hmmm.. ok..
[08:51:48] lalalaaa: maloik: is that whole memo thing the best way to go about preventing repetition though?
[08:53:40] maloik: I can see a couple weird things about this code but that's mostly because there's no context... for instance I don't get why you'd represent airplane as a float
[08:54:03] maloik: the hash seems overkill too, an array should do the trick and then just call .to_s on it when you need to
[08:55:06] adaedra: I feel like someone was too short to catch the joke. Oh, well.
[08:55:48] lalalaaa: maloik: one sec please
[08:55:57] lalalaaa: adaedra: lol
[08:56:05] lalalaaa: adaedra: at least you didn't talk directly to him this time :)
[08:56:38] arup_r: adaedra: then sorry! :) I am not a native english speaker .. so that is the problem really.
[08:57:26] adaedra: Not the first time such a thing happens, and definitely not the last one.
[08:57:27] ljarvis: maloik: how was arrrrcamp?
[09:01:26] rockngo: has joined #ruby
[09:01:49] workmad3: has joined #ruby
[09:03:48] maloik: pretty good :) heard nothing but good comments
[09:04:32] atomical: has joined #ruby
[09:04:43] maloik: im getting older quickly, I remember the first one I did I slept like 10-11h over 3 nights... this year I never stayed past midnight except for the first day :D
[09:05:11] adaedra: I slept really badly this night :(
[09:05:34] maloik: you too? time to start thinking up conspiracy theories
[09:06:13] adaedra: Good thing I overslept sunday
[09:06:15] dmolina: has joined #ruby
[09:06:31] ljarvis: glad to hear it went well
[09:07:22] scottymeuk: has joined #ruby
[09:07:50] galeido: has joined #ruby
[09:07:56] DEA7TH: What does 123[5] do?
[09:08:10] apeiros: &ri Fixnum#[]
[09:08:10] `derpy: http://www.rubydoc.info/stdlib/core/Fixnum#%5B%5D-instance_method
[09:08:29] apeiros: documentation, how does it work?
[09:08:33] ruby-lang693: has joined #ruby
[09:08:38] lalalaaa: maloik: hopefully it makes more sense now: https://gist.github.com/dt1973/0f48bc9e8abdc1d462c2
[09:10:24] lalalaaa: The context incase somebody missed it: Trying to run some stuff randomly according to probabilities, but having some trouble preventing the same thing from being repeated twice: https://gist.github.com/dt1973/0f48bc9e8abdc1d462c2 -- airplane.rb:31:in `include?': no implicit conversion of Float into String (TypeError)
[09:10:47] lalalaaa: * airplane2.rb
[09:11:53] lalalaaa: maloik: the float / hash overkill thing still applies?
[09:12:29] lalalaaa: <3 http://code.runnable.com :)
[09:13:01] pecpec: has joined #ruby
[09:18:11] mike___1234: has joined #ruby
[09:18:15] _blizzy_: has joined #ruby
[09:18:25] User458764: has joined #ruby
[09:18:40] voker57: has joined #ruby
[09:18:41] eGGsha: has joined #ruby
[09:19:15] n008f4g_: has joined #ruby
[09:21:24] bronson: has joined #ruby
[09:22:08] Ropeney: has joined #ruby
[09:23:01] apeiros: lalalaaa: what's 0.5+0.4+0.3?
[09:23:33] adaedra: a miserable pile of floats.
[09:24:06] lubarch: has joined #ruby
[09:26:00] Gottaname|Mobili: has joined #ruby
[09:26:24] Gottaname|Mobili: has left #ruby: ()
[09:27:34] lalalaaa: apeiros: nothing really.. should have just said "Lorem", "Ipsum", "Dolor"
[09:27:56] User4587_: has joined #ruby
[09:28:22] apeiros: I'm sorry. to me not replying to direct questions like that translates to "I don't want/need help".
[09:29:02] apeiros: (there's a point to my question)
[09:30:04] lalalaaa: apeiros: im sorry? i thought you were asking about the meaning of the puts "0.5" etc.
[09:30:43] lalalaaa: ok well they're probabilities i guess.. 0.5 would be 50% chance of running etc.
[09:31:14] apeiros: I understand that
[09:31:38] apeiros: your probabilities are 0.3, 0.4 and 0.5. and I ask you again for the sum of those probabilities.
[09:31:40] allomov: has joined #ruby
[09:31:52] nettoweb: has joined #ruby
[09:32:22] apeiros: I guess you've seen the point of my question now :-p
[09:32:50] lalalaaa: apeiros: i was under the impression that the `airplanes_probabalized` wouldn't summarize the probabilities but instead let each work independently
[09:32:55] lalalaaa: yeah sorta :)
[09:32:58] karapetyan: has joined #ruby
[09:32:59] lalalaaa: im in way over my head here though..
[09:33:19] apeiros: lalalaaa: hm, ok. not sure then whether you've seen it.
[09:33:27] NeverDie: has joined #ruby
[09:33:29] apeiros: you should inspect the keys of your airplanes_probabalized hash
[09:33:40] apeiros: and then think about what the max value of `random = Kernel.rand` is
[09:36:12] ddv: lalalaaa: try to understand the math first
[09:36:27] lalalaaa: good idea guys, thanks
[09:36:31] blaxter: has joined #ruby
[09:40:54] arup_r: has joined #ruby
[09:41:23] datanoise: has joined #ruby
[09:41:29] haxrbyte: has joined #ruby
[09:41:30] CanTonic: has joined #ruby
[09:42:23] arup_r1: has joined #ruby
[09:49:54] NeverDie: has joined #ruby
[09:53:00] NeverDie: has joined #ruby
[09:54:19] tomphp: has joined #ruby
[09:54:29] User458764: has joined #ruby
[09:54:59] User458764: Hi, how do I serve a static PDF document with Rack?
[09:55:21] nateberkopec: has joined #ruby
[09:58:17] NeverDie: has joined #ruby
[10:05:37] shredding: has joined #ruby
[10:06:19] zenguy_pc: has joined #ruby
[10:08:33] varunwachaspati: has joined #ruby
[10:11:05] Lycanii: has joined #ruby
[10:11:40] Lycanii: has left #ruby: ()
[10:12:17] s2013: has joined #ruby
[10:12:42] mike___1234: has joined #ruby
[10:15:30] freezevee: has joined #ruby
[10:15:46] freezevee: every rspec I run, I get the message "Killed"
[10:15:58] freezevee: does anyone have any idea what might be happening ?
[10:16:11] bougyman: freezevee: you're out of memory
[10:16:21] bougyman: That's my initial guess.
[10:16:29] bougyman: you'd see it there.
[10:17:14] freezevee: I don't find anything
[10:17:27] bougyman: then I don't know.
[10:17:29] enylcanment: has joined #ruby
[10:17:32] freezevee: it doesn't output any error
[10:17:33] bougyman: something external is whacking it.
[10:17:48] freezevee: how do I see the errors ? a log maybe ? a -v verbose output
[10:17:53] freezevee: must be something
[10:17:55] bougyman: 'killed' means it was sent a signal by something else. most commonly the kernel is what will do that.
[10:18:19] freezevee: well I updated all my gems in the Gemfile
[10:18:28] freezevee: and until then it was working fine
[10:18:39] enylcanment: has joined #ruby
[10:19:00] freezevee: this is my gemfile https://gist.github.com/chrisvel/6165b32c4b213be16255
[10:19:09] awk: Anyone use google_drive ruby gem? I have finally got it to auth and have it download the ID of the google sheet to CSV.. the problem is the whole Tile: Blah has 10 sheets, it only downloads the first sheet, any advice
[10:19:52] freezevee: bougyman: there is a "[12926.495838] Out of memory: Kill process 16930 (ruby) score 493 or sacrifice child " inside dmesg
[10:20:00] freezevee: bougyman: it might be it
[10:20:08] bougyman: freezevee: yes, that's exactly what I expected.
[10:20:14] bougyman: you are out of memory.
[10:20:17] freezevee: bougyman: but it's weird how it appeared after I have been working like this for months
[10:20:21] rickmasta: has joined #ruby
[10:20:27] freezevee: bougyman: only thing changed, the gemfile
[10:20:35] bougyman: freezevee: nothing weird about that when you're running such a heavy stack of stuff.
[10:20:37] bronson: has joined #ruby
[10:21:36] freezevee: bougyman: do you think I should start removing things ?
[10:21:49] freezevee: to spot the root of the issue
[10:22:43] tvw: has joined #ruby
[10:22:48] freezevee: there must be a log or something somewhere
[10:25:14] bougyman: freezevee: it depends.
[10:25:21] bougyman: you can't remove stuff you're using in your app.
[10:25:37] bougyman: this is the point where you decide you need more ram, usually.
[10:25:46] bougyman: how much ram are you running on?
[10:26:01] User458764: has joined #ruby
[10:26:03] bougyman: maybe your specs are doing something stupid and gobbling up your ram
[10:26:40] yfeldblum: has joined #ruby
[10:26:51] pawnbox: has joined #ruby
[10:27:06] haxrbyte: has joined #ruby
[10:27:39] enlycanment: has joined #ruby
[10:27:54] shevy: hey girls
[10:28:05] PhantomSpank: has joined #ruby
[10:28:27] ddv: shevy....
[10:28:42] yorickpeterse: shevy: hey babe
[10:28:46] [k-: shevy is a \girl/
[10:28:54] ddv: sevenseacat is nothere
[10:29:04] yorickpeterse: shevy: what are you wearing?
[10:29:11] Xeago: has joined #ruby
[10:29:12] adaedra: \girl: unknown escape sequence.
[10:29:20] yorickpeterse: or should I ask, what are you _not_ wearing? (???? ???? ????)
[10:29:25] [k-: it's girl/
[10:29:44] ddv: sexism in the ruby community
[10:29:46] yorickpeterse: unless shevy is also underaged the word is "woman"
[10:30:28] [k-: shevy is a male
[10:31:03] yorickpeterse: do you have reproducable scientific evidence for that?
[10:31:07] shevy: ddv she abandoned us and now hangs out with the cool folks on #rubyonrails :(
[10:31:29] shevy: yorickpeterse you are way too cheeky
[10:31:39] kinlo: has left #ruby: ()
[10:31:43] freezevee: bougyman: I am running everything on a vagrant ubuntu box with 512mb
[10:31:47] vondruch: has joined #ruby
[10:31:55] freezevee: bougyman: haven't have a problem since today
[10:32:28] trautwein: has joined #ruby
[10:32:33] shevy: a full day without problems
[10:32:58] [k-: your face is a full day with/out problems
[10:33:15] adaedra: This is a [k- point
[10:33:33] ddv: freezevee: figure what is taking all the ram
[10:33:50] [k-: profiling!
[10:33:52] ddv: do I need to wipe your butt too?
[10:34:14] freezevee: but you could help me on something I never did before
[10:34:30] freezevee: like fguring out what is abusing the ram !
[10:34:40] enlycanment: has joined #ruby
[10:36:05] [k-: yes, the method is called profiling
[10:36:22] shevy: ddv can others accept your offer?
[10:36:38] ndrei: has joined #ruby
[10:36:40] shevy: freezevee abusing the ram is to use strings rather than symbols as hash keys!!!
[10:36:41] freezevee: [k-: htop ?
[10:36:43] bougyman: freezevee: 512MB is easily grabbable by a rails stack.
[10:36:45] bougyman: 1 Gig, even.
[10:36:53] shevy: god, rails is so hungry
[10:37:18] bougyman: let me guess, the specs run with an sqlite in memory: mode, too?
[10:37:30] NeverDie: has joined #ruby
[10:38:02] [k-: what is htop
[10:38:07] bougyman: no, I guess not, no sqlite in your gemfile
[10:38:12] [k-: i did not profile Ruby before
[10:38:32] freezevee: never done this before but interesting to know
[10:38:48] freezevee: bougyman: I'll try with 1024
[10:41:42] shevy: this is htop http://hisham.hm/htop/releases/1.0.3/htop-1.0.3.tar.gz written by the original dude who created gobolinux!
[10:42:02] bougyman: i really prefer atop.
[10:42:57] datanoise: has joined #ruby
[10:43:10] catphish: has joined #ruby
[10:43:15] catphish: is there a configure option i can use to prevent ruby building against libyaml?
[10:43:18] stamina: has joined #ruby
[10:44:19] NeverDie: has joined #ruby
[10:44:53] awk: has nobody here used the ruby google_drive gem ? I really need help spreadsheet_by_key .... export_as_file only takes the first sheet
[10:44:56] awk: not all of them
[10:45:45] ddv: no one has used it
[10:46:02] ddv: awk: why not debug?
[10:46:17] Testo: has joined #ruby
[10:46:53] NeverDie: has joined #ruby
[10:47:26] shevy: catphish you could perhaps remove the ext/psych directory. I don't think there is an explicit configure option, but in that case, you can suggest this to ruby-core to add it, at: bugs.ruby-lang.org/projects/ruby-trunk
[10:49:13] catphish: shevy: looking more closely, i think i'm asking the wrong question, perhaps what i want is for psych to compile agsinst an internal libyaml, instead of an external one, i have 2 build hosts, one of them has libyaml installed and seems to create a dependency, the other doesn't but still seems to provide psych with no external dependency
[10:49:37] blackmesa: has joined #ruby
[10:49:57] workmad3: has joined #ruby
[10:50:07] shevy: what is an "internal" libyaml?
[10:50:21] shevy: as far as I know the only real libyaml is http://pyyaml.org/download/libyaml/yaml-0.1.6.tar.gz
[10:51:21] catphish: yes, my psych appears to be compiling against yaml-0.1.6 - but i'm not sure where it's getting it from
[10:51:56] awk: ddv I am... I can only get the first sheet. I'm not 100% ssure how to use this gem and there is not much examples out there
[10:52:23] ddv: awk: the source is available, put a break point in there or use byebug to see what happens
[10:52:47] shevy: you can easily find out when you are on linux: updatedb; locate libyaml.so
[10:53:10] shevy: unless you used a packaged ruby perhaps
[10:53:38] catphish: i have no libyaml.so :(
[10:53:44] sepp2k: has joined #ruby
[10:53:51] catphish: but Psych::LIBYAML_VERSION returns "0.1.6"
[10:54:10] catphish: hence why i thought it might be using an internal (bundled) version
[10:54:12] shevy: ok I assume you use a packaged ruby then right?
[10:54:34] shevy: let me try what happens when I get rid of ext/psych
[10:54:38] Testo: has joined #ruby
[10:54:52] catphish: it's just 2.2.3 from source
[10:56:03] casadei: has joined #ruby
[10:56:31] catphish: there's "/root/ruby-2.2.3/ext/psych/yaml/" could that be libyaml?
[10:56:40] shevy: now that you said it, I remember that indeed ruby can be compiled without libyaml
[10:57:00] shevy: I actually don't use psych myself, I use syck :)
[10:57:08] catphish: i don't actually want it without libyaml, rather i don't want it to use an external dependency
[10:57:38] bhaak: sometimes, you don't know where you should blame
[10:57:46] bhaak: require 'date'; Date.today.to_time == Date.today # => false
[10:57:51] Affix: has joined #ruby
[10:58:08] Couch: has joined #ruby
[10:58:38] [k-: there is nothing wrong with that
[10:58:39] bhaak: Ruby for being so expressive or your co-worker who wrote the shitty code that resulted in 300_000 wrong db entries
[10:58:44] tvw: has joined #ruby
[10:58:50] catphish: Date.today.to_time.to_date == Date.today => true
[10:59:30] yardenbar: has joined #ruby
[10:59:43] bhaak: yeah, I know that is not really wrong but when you juggle data from and to the db, you can easily lose sight what is date field and what is a datetime field in the db.
[11:00:28] catphish: yeah, that's annoying, best to be explicit always
[11:00:32] bhaak: if you only have "record[:start_date] <= other_date_or_time" you don't see the problem at a glance
[11:01:10] bhaak: at least with ruby, I can override the comparison and raise an error for seeing where the problematic code is sprinkled all over the place :-)
[11:01:57] solars: has joined #ruby
[11:02:12] shevy: It seems your ruby installation is missing psych (for YAML output).
[11:02:12] shevy: To eliminate this warning, please install libyaml and reinstall your ruby.
[11:02:58] shevy: catphish ok when I get rid of ext/psych Psych::LIBYAML_VERSION does not work because Psych no longer is a known thing
[11:03:30] shevy: but otherwise that ruby variant works fine, I am in irb, eating cats \o/
[11:03:52] catphish: so, it seems ruby 2+ does have a bundled libyaml
[11:04:02] catphish: but i don't know how to make it use it :(
[11:04:07] shevy: I assume it uses some kind of stub/placeholder
[11:04:27] zenguy_pc: has joined #ruby
[11:04:32] shevy: yeah, there really should be a configure option to tell ruby what you want, I assume nobody was thinking of it because most everyone will just use psych anyway
[11:04:43] spider-mario: has joined #ruby
[11:05:40] catphish: so my question becomes "how can i force ruby to compile against bundled libyaml instead of external libyaml"
[11:06:09] rodfersou: has joined #ruby
[11:06:13] catphish: maybe "gem install psych -- --enable-bundled-libyaml"
[11:07:11] catphish: yes, i think that works :D
[11:07:15] lubarch: has joined #ruby
[11:07:45] catphish: this causes it to use a libyaml 0.1.6 that comes with psych instead of my system's 0.1.4
[11:07:50] ddtblues: has joined #ruby
[11:07:58] catphish: and removed the external binary dependency entirely
[11:09:03] shevy: catphish this really worked?
[11:09:17] phutchins: has joined #ruby
[11:09:18] shevy: but where from was the libyaml 0.1.6
[11:10:04] catphish: shevy: see https://github.com/yaml/libyaml/tree/master/src - then see https://github.com/tenderlove/psych/tree/master/ext/psych/yaml
[11:10:11] catphish: it's in the psych gem
[11:10:37] shevy: oh cool you are right
[11:10:42] catphish: but it defaults to using an external dependency when available
[11:10:43] shevy: essentially a copy/paste!
[11:11:10] catphish: there's a discussion here: https://bugs.ruby-lang.org/issues/7375
[11:11:27] shevy: I actually find that funny :)
[11:11:58] catphish: most people don't like it, because it's much better to let the system manage such dependencies
[11:12:19] catphish: but for others, it's a nice way to just make things work
[11:12:34] catphish: hence why it only uses it when no system dev version is available
[11:12:47] shevy: I can see that it could add a burden on maintaining a second variant, but from your two links, it's more like a copy/paste :D
[11:15:05] workmad3: has joined #ruby
[11:17:25] beast: has joined #ruby
[11:18:04] nfk|laptop: has joined #ruby
[11:19:30] EXID123: has joined #ruby
[11:20:34] beast: has joined #ruby
[11:21:37] bronson: has joined #ruby
[11:23:17] catphish: shevy: i believe the reason it's discouraged is because if there's ever a security issue in a library, it only has to be patched in one place, rather than having to upgrade everything where its bundled
[11:25:52] adaedra: one of the reasons*
[11:25:57] charliesome: has joined #ruby
[11:27:20] atomical: has joined #ruby
[11:27:21] catphish: there are plenty of other reasons why it's not ideal, particularly in an environment with managed packages
[11:28:21] gagrio_: has joined #ruby
[11:31:08] rodfersou: has joined #ruby
[11:31:36] gagrio: has joined #ruby
[11:31:56] voker57: has joined #ruby
[11:31:57] p0wn3d_: has joined #ruby
[11:33:57] ldnunes: has joined #ruby
[11:34:05] haxrbyte: has joined #ruby
[11:34:18] Total_noob: has joined #ruby
[11:34:54] giuseppesolinas: has joined #ruby
[11:34:54] giuseppesolinas_: has joined #ruby
[11:34:54] decoponyo: has joined #ruby
[11:38:27] wookiehangover: has joined #ruby
[11:40:42] User458764: has joined #ruby
[11:40:46] leafybasil: has joined #ruby
[11:42:54] marr: has joined #ruby
[11:43:33] moss: has joined #ruby
[11:44:03] ruurd: has joined #ruby
[11:44:23] elperdut: has joined #ruby
[11:50:09] sdothum: has joined #ruby
[11:50:21] blackmesa: has joined #ruby
[11:50:26] ekinmur: has joined #ruby
[11:53:24] voker57: has joined #ruby
[11:53:40] Pupp3tm4st3r: has joined #ruby
[11:55:05] IceyEC: has joined #ruby
[11:56:11] towski_: has joined #ruby
[11:57:13] catphish: so, my problem isn't 100% solved, psych is installed as a "default gem" and i don't know how to pass options to it :(
[11:57:27] ddv: what is the real problem?
[11:58:15] ddv: yes? what are you trying to achieve and why?
[11:58:38] catphish: ddv: i'm trying to get ruby to compile psych against its bundled libyaml instead of having an external dependency
[11:58:55] workmad3: has joined #ruby
[11:59:11] ddv: catphish: oh why?
[11:59:14] joonty: has joined #ruby
[11:59:35] ddv: catphish: why deviate from the default?
[11:59:44] ddv: do you a good reason?
[11:59:48] shredding: has joined #ruby
[12:00:15] adaedra: did you a word?
[12:00:17] catphish: because i'm building a bundled binary ruby, and i would like to avoid the extra dependency, the default behaviour is only the default because i happen to have libyaml-dev installed on my build host, if i didn't the default would be to use the bundled one
[12:01:07] catphish: i might be able to install a new psych gem over the top of the "default gem" one
[12:02:05] jhass: catphish: you looked at traveling ruby?
[12:02:28] catphish: jhass: i have, but it's not very flexible with binary gems
[12:03:43] catphish: my build worked perfectly until i tried to do the build on a server with libyaml-dev installed, at which point ruby picked up the external library and made it a dependency :(
[12:04:19] catphish: hopefully "gem install psych -v 2.0.8 -- --enable-bundled-libyaml" will sort it out and replace the gem
[12:04:48] darkxploit: has joined #ruby
[12:06:13] pawnbox: has joined #ruby
[12:06:30] skade: has joined #ruby
[12:06:36] vdamewood: has joined #ruby
[12:08:13] sankaber: has joined #ruby
[12:08:35] asad: has joined #ruby
[12:09:27] Guest97495: has left #ruby: ()
[12:09:27] jenrzzz: has joined #ruby
[12:10:37] JDiPierro: has joined #ruby
[12:11:07] pecpec: has joined #ruby
[12:11:52] lxsameer: has joined #ruby
[12:12:31] catphish: nah, didn't work :(
[12:13:26] yalue: has joined #ruby
[12:13:44] krisquigley: has joined #ruby
[12:15:55] NeverDie: has joined #ruby
[12:16:37] s00pcan: has joined #ruby
[12:17:09] prestorium: has joined #ruby
[12:17:28] Sembei: has joined #ruby
[12:17:30] raphagodoi: has joined #ruby
[12:19:04] gagrio: has joined #ruby
[12:19:09] gusTester: has joined #ruby
[12:22:32] bronson: has joined #ruby
[12:24:01] giuseppesolinas: has joined #ruby
[12:24:04] giuseppesolinas_: has joined #ruby
[12:25:03] pawnbox_: has joined #ruby
[12:25:58] catphish: i'll try shevy's approach of deleting ext/psych, then install it separately
[12:26:04] blackmesa: has joined #ruby
[12:26:12] catphish: since i can't find a way to pass build options to default gems
[12:27:15] buck_: has joined #ruby
[12:28:16] haxrbyte: has joined #ruby
[12:29:08] Jardayn: has joined #ruby
[12:29:53] kapoenator: has joined #ruby
[12:30:43] buck_: Hi. How does changing the value of a global variable inside a ruby script affect that variable inside required ruby scripts?
[12:30:45] decoponio: has joined #ruby
[12:32:50] catphish: buck_: it changes it for the whole process, that's what makes it global :)
[12:32:52] mike___1234: has joined #ruby
[12:33:32] ddv: still don't understand what you are trying to achieve catphish
[12:33:53] catphish: ddv: i'm trying to prevent my ruby binary depending on libyaml
[12:33:59] catphish: it's that simple
[12:34:02] buck_: If I have a file called main.rb that has a global variable of $main set to "main" and if a required file has "puts $main" in it, it will print out "main"...
[12:34:08] _blizzy_: has joined #ruby
[12:34:10] Testo: has joined #ruby
[12:34:32] ddv: catphish: why?
[12:34:33] catphish: buck_: yes, it will apply to all code in all files
[12:34:54] buck_: catphish: How? What's the process of this working?
[12:35:15] buck_: catphish: I was reading that required files are executed in another top-level namespace. What does this mean?
[12:35:32] catphish: buck_: global variables exist across ALL namespaces, that's their purpose
[12:36:00] catphish: buck_: you can set and retrieve a global variable absolutely anywhere in your program, however normally you should avoid doing so
[12:36:21] catphish: ddv: because i don't want the extra dependency for my application
[12:36:42] dorei: has joined #ruby
[12:36:52] ddv: catphish: well it will save you a few kilobytes
[12:37:12] TomyWork: has joined #ruby
[12:37:14] ddv: catphish: you could have spent your time on something more usefull
[12:37:19] buck_: So if I change $: variable in one file, it will be changed in all required files? And I mean files that depend on others. So all these files will have the $: variable changed?
[12:37:48] TomyWork: can i somehow tell ruby 1.9.3 not to barf "invalid multibyte char (US-ASCII)" at me when i use a non-us-ascii character in a string?
[12:38:06] j416: TomyWork: # encoding: utf-8
[12:38:09] j416: TomyWork: at top of file
[12:38:09] jhass: TomyWork: where does the string come from? why isn't it in the right encoding in the first place?
[12:38:32] karapetyan: has joined #ruby
[12:38:37] jhass: note that'll only fix it for literals, maybe
[12:38:41] j416: TomyWork: assuming you use utf-8, if you're not you should
[12:38:52] j416: s/you use/you're using/
[12:38:57] TomyWork: i always thought that was some vim thing, not for ruby itself
[12:39:04] TomyWork: i've seen it in people's files
[12:39:39] ddv: silly editors
[12:39:42] jhass: TomyWork: also note that all supported Ruby versions (1.9 is EOL) default to utf-8 for the file encoding if no system encoding is present
[12:39:59] catphish: TomyWork: i try to avoid non-ascii in source code, but if your editor is using utf8 then #encoding: utf-8 will sort it
[12:40:05] TomyWork: jhass tell ubuntu :)
[12:40:07] Ox0dea: has left #ruby: ("WeeChat 1.4-dev")
[12:40:11] jhass: buck_: it's a global variable, it changes globally
[12:40:36] jhass: TomyWork: pretty sure there's ruby2.0 or something, also have a look at the brightbox ruby packages for ubuntu
[12:40:49] TomyWork: catphish this file to be kinda readable, so i cant use escape sequences or something
[12:40:53] catphish: ubuntu still support 1.9.3, their support cycle is somewhat longer than ruby's, it's kind of annoying, but unavoidable
[12:41:14] catphish: TomyWork: then the #encoding thing should be fine
[12:41:28] TomyWork: catphish i'm using that now
[12:41:47] Peg-leg: has joined #ruby
[12:42:35] joonty: has joined #ruby
[12:42:41] yashinbasement: has joined #ruby
[12:43:33] ruurd: has joined #ruby
[12:44:15] datanoise: has joined #ruby
[12:44:32] dravine: has joined #ruby
[12:45:17] m8: has joined #ruby
[12:45:25] casadei: has joined #ruby
[12:47:30] PhantomS_: has joined #ruby
[12:47:53] buck_: has left #ruby: ()
[12:48:13] PhantomSpank: has joined #ruby
[12:48:44] PhantomSpank: has joined #ruby
[12:48:56] catphish: so, it seems my psych only depends on libyaml when it's loaded by bundler, weird
[12:49:39] PhantomSpank: has joined #ruby
[12:51:42] cassioscabral: has joined #ruby
[12:55:04] sgambino: has joined #ruby
[12:55:04] Xeago: has joined #ruby
[12:55:27] Pupeno: has joined #ruby
[12:55:27] Pupeno: has joined #ruby
[12:56:08] PhantomSpank: has joined #ruby
[12:56:15] blaxter: has joined #ruby
[12:56:55] elperdut_: has joined #ruby
[12:57:30] sanjayu: has joined #ruby
[12:57:54] Cyther: has joined #ruby
[12:58:23] sdwrage: has joined #ruby
[12:58:34] sanjayu: has joined #ruby
[12:59:30] sanjayu: has joined #ruby
[13:00:43] havenwood: has joined #ruby
[13:01:53] User4587_: has joined #ruby
[13:02:46] jgpawletko: has joined #ruby
[13:04:33] jordanm: has joined #ruby
[13:05:08] dhjondoh: has joined #ruby
[13:06:11] gagrio: has joined #ruby
[13:06:29] solocshaw: has joined #ruby
[13:06:56] solocshaw: has joined #ruby
[13:06:59] nateberkopec: has joined #ruby
[13:07:04] ponga: has joined #ruby
[13:08:42] decoponio: has joined #ruby
[13:09:32] mikey: has joined #ruby
[13:09:56] sanguisdex: has left #ruby: ()
[13:10:14] A124: has joined #ruby
[13:10:55] Kendos-Kenlen: has joined #ruby
[13:11:05] atmosx: has joined #ruby
[13:11:29] [k-: has joined #ruby
[13:13:18] Guest14791: How are constants defined in a top-level scope visible inside the scope of a method? https://eval.in/445104
[13:14:47] skweek: has joined #ruby
[13:16:25] Guest53: has joined #ruby
[13:16:55] `tim`: has joined #ruby
[13:17:35] WizJin: has joined #ruby
[13:17:36] Guest14791: Whilst local-variables defined in the top-level scope are not. (which is expected) I'm trying to understand ruby's scoping rules.
[13:17:41] devoldmx: has joined #ruby
[13:18:19] lkjhf: has joined #ruby
[13:19:35] jhass: Guest14791: they are because they are defined to be, there's not much more to it
[13:19:53] luksaur: has joined #ruby
[13:20:27] RegulationD: has joined #ruby
[13:20:30] Guest14791: has left #ruby: ()
[13:20:47] pecpec: has joined #ruby
[13:22:29] Cyther_: has joined #ruby
[13:23:32] bronson: has joined #ruby
[13:23:42] PhantomSpank: has joined #ruby
[13:24:21] TPBallbag: has joined #ruby
[13:25:37] prestorium: has joined #ruby
[13:25:39] krz: has joined #ruby
[13:25:50] djcp: has joined #ruby
[13:26:04] cih: has joined #ruby
[13:26:33] syath: has joined #ruby
[13:26:39] gagrio: has joined #ruby
[13:27:24] PhantomSpank: has joined #ruby
[13:27:50] Guest53: has joined #ruby
[13:27:59] freerobby: has joined #ruby
[13:28:08] amystephen: has joined #ruby
[13:29:19] umgrosscol: has joined #ruby
[13:30:57] balazs_: has joined #ruby
[13:31:33] hfp_work: has joined #ruby
[13:33:02] A124: has joined #ruby
[13:33:04] balazs_: What is the a way to execute code in a ternary operator ? Something like: answer = S == 'yes' ? 1 : S == 'no' ? 0 : {puts "Illegal answer"; continue}
[13:33:14] cazrin: has joined #ruby
[13:33:49] adaedra: >> 1 == 0 ? true : puts "Illegal answer"
[13:33:50] ruboto: adaedra # => /tmp/execpad-d6359edba6f1/source-d6359edba6f1:2: syntax error, unexpected tSTRING_BEG, expecting key ...check link for more (https://eval.in/445117)
[13:34:01] adaedra: >> 1 == 0 ? true : puts("Illegal answer")
[13:34:02] ruboto: adaedra # => Illegal answer ...check link for more (https://eval.in/445118)
[13:34:10] adaedra: put parenthesis
[13:35:16] adaedra: but you may want to do too short
[13:36:25] jhass: balazs_: please don't use ternary for side effects
[13:36:40] jhass: just give it its four lines
[13:37:08] psye: has joined #ruby
[13:38:14] psye: has joined #ruby
[13:38:45] gregf__: >>puts 1 == 0 ? true : "Illegal answer"
[13:38:46] ruboto: gregf__ # => Illegal answer ...check link for more (https://eval.in/445126)
[13:39:04] evanjs: has joined #ruby
[13:39:26] adaedra: gregf__: it's the puts that is conditional, here you puts either way
[13:39:45] kobain: has joined #ruby
[13:39:47] balazs_: jhass: thanks
[13:40:18] tomphp: has joined #ruby
[13:41:56] skade: has joined #ruby
[13:43:24] devdazed: has joined #ruby
[13:44:38] lalalaaa: has joined #ruby
[13:45:33] bkulbida: has joined #ruby
[13:45:39] rushed: has joined #ruby
[13:45:47] dionysus69: has joined #ruby
[13:46:49] Silicium_: i'am using ruby 2.0.0p247 on passenger/nginx. i have to configure the heap so i set the env vars... In the application i can read the env vars, they exist and they are set correctly but the the app still uses 1500heaps, i configured it in a way it should only use 1 heap after startup, but it seems that the environment variables are ignored. is there a way to debug that?
[13:46:50] lalalaaa: Hi! Does anyone know why the 2nd script (airplane2.rb) at https://gist.github.com/dt1973/0f48bc9e8abdc1d462c2 is not working?
[13:46:53] lalalaaa: Basically it's a script to randomly and infinitely run other scripts according to probabilities. That part is fine, however I'm trying to prevent it from repeating the same item consecutively and that part is not working.
[13:46:55] datanoise: has joined #ruby
[13:50:02] gregf__: adaedra: true
[13:50:14] boxrick1: has joined #ruby
[13:50:19] skade: has joined #ruby
[13:50:54] ddv: lalalaaa: dejavu
[13:51:06] boxrick1: Afternoon, I am having some issues with passenger and foreman after removing some temp files
[13:51:23] symbol: has joined #ruby
[13:51:35] chipotle: has joined #ruby
[13:51:38] boxrick1: Can anyone give me a hand ?
[13:51:39] jhass: lalalaaa: explain why and what you don on line 32
[13:51:43] skweek: has joined #ruby
[13:51:48] boxrick1: [ 2015-10-05 15:48:33.0119 10070/7ff7511e8700 Pool2/Implementation.cpp:1174 ]: [App 10235 stderr] : Permission denied - /usr/share/foreman/PassengerTeeInput-0.738844345172722 (Errno::EACCES) Is the error I am getting :(
[13:52:03] renancarvalho: has joined #ruby
[13:52:22] TheWhip: has joined #ruby
[13:52:51] krisquigley: has joined #ruby
[13:52:52] Silicium_: i'am using ruby 2.0.0p247 on passenger/nginx. i have to configure the heap so i set the env vars... In the application i can read the env vars, they exist and they are set correctly but the the app still uses 1500heaps, i configured it in a way it should only use 1 heap after startup, but it seems that the environment variables are ignored. is there a way to debug that?
[13:53:09] karapetyan: has joined #ruby
[13:53:11] patchedmonkey: has joined #ruby
[13:53:23] whippythellama: has joined #ruby
[13:53:29] jhass: Silicium_: it came through the first time
[13:54:17] Silicium_: ok good to know! thank you! :)
[13:54:31] chipotle_: has joined #ruby
[13:54:35] pandaant: has joined #ruby
[13:55:18] maloik: jhass: tried to help him/her this morning, some of those values are probably not what they expect
[13:55:28] terlar: has joined #ruby
[13:55:31] maloik: I suggested using pry to figure it out but yea..
[13:55:42] jhass: maloik: look at the current code, in particular the line I hinted
[13:55:57] jhass: it's not unobvious really
[13:56:13] jhass: will get to the logic fail afterwards
[13:56:36] maloik: not sure what you mean by that
[13:57:07] jhass: airplanes_probabalized.each do |memo, (range, airplane)|
[13:57:16] jhass: not .inject, not each_with_object or anything
[13:57:30] jhass: that decomposition doesn't make any sense
[13:57:36] maloik: ah, yea gotcha
[13:57:54] casadei: has joined #ruby
[13:59:29] i8igmac: has joined #ruby
[13:59:40] n008f4g_: has joined #ruby
[13:59:41] lalalaaa: maloik: greetings! i was unable to figure much out using pry, but as you can see i've added it to the runnable
[14:00:31] cubicme: has joined #ruby
[14:00:43] huddy: has joined #ruby
[14:00:53] lalalaaa: jhass: i got the code by some guy on StackOverflow, however he's declined to go into detail about what it does or why it currently doesn't work
[14:01:08] hj2007: has joined #ruby
[14:01:10] jhass: that version?
[14:01:15] jhass: throw it away then
[14:01:17] sanguisdex: has joined #ruby
[14:01:18] lalalaaa: jhass: so as for line 32.. hold up
[14:01:35] lalalaaa: hmm.. yeah might as well throw it away
[14:01:51] jhass: I mean you got the second version from there?
[14:01:54] jhass: the first one is fine
[14:01:57] lalalaaa: yup the second one
[14:02:04] lalalaaa: first one is all good
[14:02:08] jhass: okay, where can I downvote?
[14:02:28] luksaur: has joined #ruby
[14:02:47] decoponio: has joined #ruby
[14:03:05] lalalaaa: jhass: http://stackoverflow.com/questions/32231759/array-making-sure-item-isnt-repeated-twice
[14:03:07] Testo: has joined #ruby
[14:04:37] arup_r: has joined #ruby
[14:05:11] jhass: the general approach works but the example is just wrong and confusing
[14:05:24] jhass: did you try what the second comment on your OP said?
[14:05:34] jhass: working from the first version you posted
[14:07:05] lalalaaa: "to capture the previous result and handle a duplicate occurrence" not quite sure where to start to be honest
[14:07:25] jhass: the beginning
[14:07:30] jhass: how would you capture the previous result?
[14:07:51] lalalaaa: also by taking this approach, doesnt it mean the running of a script could be considerably delayed depending on how many consecutive runs there are?
[14:07:58] jhass: another term we could use here is "remember" or "memoize"
[14:08:10] lalalaaa: i like "remember"
[14:08:12] ruboto: I don't know anything about random
[14:08:17] lalalaaa: i would save it to a variable right?
[14:08:28] jhass: lalalaaa: right
[14:08:30] jhass: so do that
[14:08:50] [k-: the real random number is 4
[14:09:06] zenguy_pc: has joined #ruby
[14:09:11] InternetFriend: has joined #ruby
[14:09:44] tenderlove: has joined #ruby
[14:09:44] [k-: insert relevant xkcd here
[14:10:08] maloik: I thought that was 9
[14:10:19] jhass: 9 is dilbert
[14:10:47] maloik: the amount of mostly useless knowledge here is staggering
[14:10:58] [k-: dilbert is 99999999999999999999999999999
[14:12:02] Xeago: has joined #ruby
[14:13:03] [k-: according to rfc 1459.5?
[14:13:43] lalalaaa: jhass: here's me making a big fool of myself but: https://gist.github.com/dt1973/0f48bc9e8abdc1d462c2#file-airplane2-rb
[14:13:45] [spoiler]: has joined #ruby
[14:14:53] jhass: lalalaaa: almost there. Can you tell me the difference between = and ==?
[14:15:13] lalalaaa: uh wait one sec please
[14:15:48] [k-: do not look it up!
[14:16:59] lalalaaa: jhass: == is for checking values, whereas = is for assigning.. got it!
[14:17:01] certainty: the latter is a stuttered version of =?
[14:17:17] jhass: lalalaaa: right. So look at line 40 again
[14:17:57] [k-: very check values
[14:18:04] [k-: check values for what?
[14:18:04] lalalaaa: it has now been set to `unless last_call == current_airplane`
[14:18:12] devoldmx: has joined #ruby
[14:18:15] jhass: does it work now?
[14:19:36] i: has joined #ruby
[14:20:12] lalalaaa: jhass: no, it doesn't seem to do anything by the looks of it: http://code.runnable.com/VhI98_g33A1QxEme/probabilities-script
[14:20:25] uberjar: has joined #ruby
[14:20:34] RegulationD: has joined #ruby
[14:20:53] jhass: that site is annoying, sorry
[14:21:10] jhass: don't want to use it
[14:21:22] lalalaaa: i've learned to ignore its bad sides, just like two lovers would
[14:21:37] felixrsmith: has joined #ruby
[14:22:18] uberjar: Hi. I have a quick question about Celluloid IO actors. (nobody is around in #celluloid) : Should I only ever create X celluloid IO actors in my program where X equals the number of CPU cores, or is it OK to have one for each subsystem ?
[14:22:24] davedev24: has joined #ruby
[14:22:51] uberjar: in other words is the only cost some extra memory and startup time for each reactor ? or does it waste CPU somehow
[14:23:01] jhass: lalalaaa: right, let's think about it for a sec, what do we do here
[14:23:27] jhass: lalalaaa: we get a random airplane. We set last_call to it. We then check if last_call is the current_airplane
[14:23:45] jhass: well, it always is, we just set them equal, right?
[14:24:29] bronson: has joined #ruby
[14:24:46] lalalaaa: we have got ourselves a problem there..
[14:24:48] jhass: uberjar: don't know about celluloid, but that's thread thinking. Limiting the amount of actors to the number of cores/parallel tasks kinda defeats the entire actor model
[14:25:15] jhass: it's task centric, not thread centric
[14:25:24] lalalaaa: jhass: so we need a `previous_airplane` too then maybe?
[14:25:37] jhass: lalalaaa: last_call should be our previous airplane
[14:25:47] jhass: lalalaaa: and you just got the better name for it, so rename
[14:25:59] pawnbox: has joined #ruby
[14:25:59] jhass: but think about _when_ to set it
[14:26:07] spider-mario: has joined #ruby
[14:26:10] catphish: has left #ruby: ("Leaving")
[14:26:17] chouhoulis: has joined #ruby
[14:27:03] chouhoulis: has joined #ruby
[14:27:24] lalalaaa: maybe i should move `previous_airplane = current_airplane` inside the `unless previous_airplane == current_airplane` block?
[14:27:57] jhass: please list out the conditions that would need to be met for it to run then
[14:27:58] uberjar: jhass: hrm.. that's an interesting perception. I'm still fuzzy on the actor model to be honest. But if I understand it correctly celluloid IO is the "reactor" model but implemented within the actor paradigm which makes it more tricky
[14:28:04] [k-: lalalaaa sounds like shevy
[14:28:23] uberjar: I'll go read more about actors in general until I understand what a "task" is supposed to be. cheers
[14:29:58] aerozeppelin: has joined #ruby
[14:30:05] jhass: uberjar: the classic task centric model is that you have a pool of thread workers and (a bunch of) queues on which you push workloads for the threads to process. Those workloads are called tasks
[14:30:30] pawnbox_: has joined #ruby
[14:30:31] atomical: has joined #ruby
[14:30:35] lalalaaa: jhass: if the previous airplane is not the current air plane, then run the current airplane and set it to the previous airplane?
[14:31:29] lalalaaa: good lord i think it works?? https://gist.github.com/dt1973/0f48bc9e8abdc1d462c2
[14:31:35] jhass: sounds about right ;)
[14:31:59] lalalaaa: was it really that simple? what the hell was that dude on SO thinking
[14:31:59] UtkarshRay: has joined #ruby
[14:32:27] p0wn3d__: has joined #ruby
[14:32:27] jhass: his code does basically the same. Just with some messed up each and convoluted construction of it in general
[14:32:37] jhass: "look how smart I am, I know inject", basically
[14:32:54] lalalaaa: jhass: thanks for not just helping me but for like.. taking the whole teacher approach and believing in me
[14:33:07] TheWhip: has joined #ruby
[14:33:19] lalalaaa: learned a valuable lesson.. _and_ i fixed my code yay
[14:33:30] renancarvalho: hello everybody
[14:33:40] renancarvalho: i'm starting programming ruby
[14:34:02] jhass: lalalaaa: the more people I can help to help themselves, the more people can be helped, both by myself and eventually the people I did help in the past ;) After all teaching is still the best way to learn something yourself actually
[14:34:04] certainty: arms raised in a V
[14:34:10] chthon: has joined #ruby
[14:34:34] adaedra: certainty: now do the rest of the alphabet
[14:35:09] certainty: adaedra: no, now i've got distracted. Gotta hear jeremy from pearl jam
[14:35:47] p0wn3d_: has joined #ruby
[14:36:06] sanguisdex: has joined #ruby
[14:36:24] lalalaaa: jhass: cheers :)
[14:39:02] ekinmur: has joined #ruby
[14:39:56] [spoiler]: has joined #ruby
[14:42:18] karapetyan: has joined #ruby
[14:42:24] [k-: code is like violence
[14:42:33] [k-: if it doesn't work, you need more of it
[14:42:45] [k-: change it a little here and there and somehow it works
[14:43:01] [k-: (or add more if checks)
[14:43:07] ksteck: has joined #ruby
[14:43:07] p0wn3d_: has joined #ruby
[14:43:28] zenguy_pc: has joined #ruby
[14:43:36] [k-: if something_that_leads_to_bug28482 then do something else do normal stuff
[14:43:51] Zarthus: you write bugs in your code?
[14:43:54] Aria: I think my approach to code is a lot like my approach to violence: Less, please.
[14:43:54] Zarthus: i think there is your problem
[14:44:03] Aria: Take time and understand what's going on.
[14:44:32] [k-: you write bugs in your code too!
[14:44:47] Zarthus: i never write bugs
[14:44:47] enigmaty: has joined #ruby
[14:44:51] Zarthus: they are called features
[14:45:39] pwnd_nsfw: has joined #ruby
[14:46:05] [k-: less talking more code slinging!
[14:46:41] zapata: has joined #ruby
[14:47:32] pawnbox: has joined #ruby
[14:47:45] datanoise: has joined #ruby
[14:48:03] lubarch: has joined #ruby
[14:49:01] dfinninger: has joined #ruby
[14:49:23] certainty: code like violence breaks the silence
[14:49:34] mary5030: has joined #ruby
[14:49:58] paulcsmith: has joined #ruby
[14:50:15] EminenceHC: has joined #ruby
[14:50:37] mary5030: has joined #ruby
[14:51:01] jessemcgilallen: has joined #ruby
[14:51:47] [k-: much rhyme
[14:51:58] certainty: stolen from depeche mode
[14:52:17] dionysus69: has joined #ruby
[14:53:02] _joes__: has joined #ruby
[14:53:33] _blizzy_: has joined #ruby
[14:53:41] elperdut: has joined #ruby
[14:53:42] cball: has joined #ruby
[14:54:50] ndrei: has joined #ruby
[14:56:40] bigmac: has joined #ruby
[14:58:10] p0wn3d_: has joined #ruby
[14:58:38] [spoiler]: has joined #ruby
[14:58:41] cdg: has joined #ruby
[14:59:29] [spoiler]: has joined #ruby
[14:59:59] Xeago: has joined #ruby
[15:00:01] The_Phoenix: has joined #ruby
[15:00:10] [spoiler]: has joined #ruby
[15:00:22] User458764: has joined #ruby
[15:01:28] skade: has joined #ruby
[15:01:54] snockerton: has joined #ruby
[15:01:56] rippa: has joined #ruby
[15:02:05] _blizzy_: has joined #ruby
[15:03:24] troulouliou_div2: has joined #ruby
[15:05:41] ekinmur: has joined #ruby
[15:09:01] DoubleMalt: has joined #ruby
[15:09:03] pwnd_nsfw: has joined #ruby
[15:10:03] newdan: has joined #ruby
[15:10:11] Spami_: has joined #ruby
[15:10:56] blackmesa: has joined #ruby
[15:11:43] chipotle: has joined #ruby
[15:12:42] jpfuentes2: has joined #ruby
[15:13:34] symbole: has joined #ruby
[15:14:15] Guest86944: has joined #ruby
[15:14:55] apfeluser: has joined #ruby
[15:15:28] TheWhip_: has joined #ruby
[15:18:58] devoldmx: has joined #ruby
[15:19:08] aerozeppelin: has joined #ruby
[15:20:17] EminenceHC: has joined #ruby
[15:20:32] inteq: has joined #ruby
[15:22:53] rcvalle: has joined #ruby
[15:23:51] axl_: has joined #ruby
[15:24:00] whippythellama: has joined #ruby
[15:25:04] _Cyther_: has joined #ruby
[15:25:28] bronson: has joined #ruby
[15:26:25] livathinos: has left #ruby: ()
[15:27:16] EminenceHC: has joined #ruby
[15:28:16] dfinning_: has joined #ruby
[15:28:23] |-_-|: has left #ruby: ("-_-")
[15:29:53] shevy: [k- is too young to know depeche mode
[15:30:33] aerozeppelin: has joined #ruby
[15:30:43] morenoh149: has joined #ruby
[15:32:55] larissa: has joined #ruby
[15:33:04] sparr: has joined #ruby
[15:33:07] barhum2013: has joined #ruby
[15:34:13] aerozeppelin: has joined #ruby
[15:35:04] baroquebobcat: has joined #ruby
[15:35:09] Hijiri: has joined #ruby
[15:35:23] aerozeppelin: has joined #ruby
[15:36:25] SenpaiSilver: has joined #ruby
[15:36:37] xcesariox: has joined #ruby
[15:37:25] tjohnson: has joined #ruby
[15:37:34] bashrw: has joined #ruby
[15:39:53] inanepenguin: has joined #ruby
[15:40:41] morenoh149: I'm getting some error with bundler and native extensions. Something about not being able to compile the native extension.
[15:40:57] Tuxero: has joined #ruby
[15:41:00] morenoh149: I'm recompiling ruby on my machine, that's the correct course of action right?
[15:41:06] baroquebobcat: has joined #ruby
[15:41:32] ReK2: has joined #ruby
[15:41:32] ReK2: has joined #ruby
[15:42:09] kalleth: has joined #ruby
[15:42:36] jhass: morenoh149: probably not. What's the full error output? (use gist)
[15:43:51] spcmastertim: has joined #ruby
[15:44:40] morenoh149: https://gist.github.com/morenoh149/6a9ce2a12b662558d944 jhass
[15:44:56] hahuang65: has joined #ruby
[15:45:18] hfp_work: has joined #ruby
[15:45:19] jhass: ld: library not found for -lgmp
[15:45:23] loc22: has joined #ruby
[15:45:23] jhass: try brew install gmp
[15:46:09] morenoh149: well I'll try after recompiling ruby lol
[15:48:41] yokel: has joined #ruby
[15:49:01] genpaku: has joined #ruby
[15:49:54] wookiehangover: has joined #ruby
[15:50:39] loc22: has joined #ruby
[15:51:23] snockerton: has joined #ruby
[15:51:50] ght: Question: I have a Ruby 2.2 application that uses XMLRPC client, and I have the XMLRPC call surrounded in a begin/resuce block, and the rescue is for SocketError, XMLRPC::FaultException => e
[15:52:20] ght: And that normally works good, except, it looks like that XMLRPC call is periodically generating "Error: Authorization failed. HTTP-Error: 401 Unauthorized"
[15:52:26] morenoh149: jhass: Warning: gmp-6.0.0a already installed
[15:52:33] morenoh149: should I try to reinstall it?
[15:52:42] ght: I've been researching and can't seem to find it - how does one rescue such errors for XMLRPC::Client?
[15:53:08] cassioscabral: has joined #ruby
[15:53:13] jhass: morenoh149: maybe, brew docter or brew link stuff might help too, dunno OS X
[15:53:31] morenoh149: might be this el capitan thing
[15:53:43] jhass: ght: that's the full error output?
[15:53:51] Xeago: has joined #ruby
[15:54:07] adaedra: It may lack -L/usr/local/lib
[15:54:23] freerobby: has joined #ruby
[15:55:30] vdamewood: has joined #ruby
[15:55:39] ght: jhass: "Error: Authorization failed. HTTP-Error: 401 Unauthorized"
[15:55:53] jenrzzz: has joined #ruby
[15:55:54] jhass: ght: not even a backtrace?
[15:56:00] ght: I need to be able to rescue that and let the application continue executing as I do with SocketErrors and FaultExceptions
[15:56:09] ght: Yes, there's a backtrace that leads to that specific XMLRPC call.
[15:56:28] ght: where I'm rescuing SocketErrors and FaultExceptions
[15:56:37] ght: but apparently not this
[15:56:46] psye: has joined #ruby
[15:56:49] mxrguspxrt: has joined #ruby
[15:56:50] jhass: I'd like to see the full error output of your script including the backtrace, unmodified. Also include the script if possible
[15:57:03] ght: Well, it's proprietary code, I'd have to modify it.
[15:57:22] jhass: normally the error output would contain the exceptions class
[15:57:27] ght: But the point being, this exception should be caught by rescuing SocketErrors and XMLRPC::FaultExceptions?
[15:57:43] ght: It's coming from a cron job
[15:57:43] jhass: but the backtrace should also lead you to where it's raised, so you can just look at what class is raised
[15:57:50] ght: I don't see the exception class specified
[15:58:01] jhass: then it's RuntimeError
[15:58:09] jhass: (and worth a bug report to the library author)
[15:58:25] ght: Interesting, ok
[15:58:27] jhass: that is if you don't see it at the raise statement
[15:58:41] patchedmonkey: has joined #ruby
[16:03:09] ght: jhass: Here's the backtrace as provided in the local user account's mailbox, since cron generates an email to that user if a job's exit status is error:
[16:03:13] ght: Backtrace: ["/home/tzrd/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/client.rb:491:in `do_rpc'", "/home/tzrd/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/client.rb:286:in `call2'", "/home/tzrd/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/client.rb:267:in `call'"
[16:03:47] ght: and the error is "Authorization failed. HTTP-Error: 401 Unauthorized".
[16:03:52] ght: If that is of any use to you.
[16:04:22] bigmac: has joined #ruby
[16:04:26] ght: And this is an XMLRPC::Client call that is called over and over, and works 99% of the time, it just happens that at some point, the API provider is down or returns that for whatever reason.
[16:04:30] jhass: https://github.com/ruby/ruby/blob/a9721a259665149b1b9ff0beabcf5f8dc0136120/lib/xmlrpc/client.rb#L491
[16:04:35] jhass: so indeed RuntimeError
[16:04:53] ght: Interesting
[16:05:19] ght: So I need to rescue RuntimeError within the begin rescue block surrounding the client call to ensure this exception is handled?
[16:05:22] ght: That seems broad
[16:05:52] ght: I need the app to keep rolling, not crash, as I do with SocketErrors and FaultExceptions
[16:06:20] amclain: has joined #ruby
[16:06:21] bricker: has joined #ruby
[16:06:28] whippythellama: has joined #ruby
[16:06:32] tubuliferous_: has joined #ruby
[16:06:37] moeabdol: has joined #ruby
[16:06:42] fedexo: has joined #ruby
[16:06:56] ght: for what it's worth, this should not be occurring. I always assumed it was the API provider barfing, but this XLMRPC::Client call is called over and over to the same provider with the same credentials, and out of nowhere returns that.
[16:07:05] tubbo: that's pretty lame
[16:07:16] tubbo: that it raises RuntimeError rather than XMLRPC::RuntimeError or something
[16:07:48] wallerdev: has joined #ruby
[16:10:04] Maletor: has joined #ruby
[16:10:24] barhum2013: has joined #ruby
[16:10:27] InternetFriend: has joined #ruby
[16:10:28] ellisTAA: has joined #ruby
[16:10:44] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[16:10:46] gusTester: has joined #ruby
[16:11:50] Xeago: has joined #ruby
[16:12:31] TheWhip: has joined #ruby
[16:12:45] ght: So this discussion about rescuing a specific exception class within my Ruby code is off-topic to Ruby?
[16:12:52] SCHAAP137: has joined #ruby
[16:12:53] SCHAAP137: has joined #ruby
[16:13:26] ght: There's always an issue.
[16:13:59] adaedra: ght: carry on. This probably was aimed at nobody.
[16:14:07] ght: I see, thank you.
[16:15:08] gusTester: has joined #ruby
[16:15:17] ght: So, since I'm at the mercy of XMLRPC::Client here and, even though it probably shouldn't be, it's raising RuntimeError when it hits a 401 unauthorized, is it safe to say that I should simply add RuntimeError to my rescue block to allow code execution to continue?
[16:15:50] ght: Or will that cose other problems in case other aspects of the program fail? It's a small begin / rescue block, it simply encompasses the XMLRPC::Client call itself
[16:16:25] adaedra: RuntimeError is the base of a lot of exception iirc
[16:16:27] zendrix: has joined #ruby
[16:16:45] ght: No doubt.
[16:17:18] adaedra: So I guess that if you use a resuce with specialized exceptions, it's not to catch most exceptions.
[16:17:43] ght: Yes, well normally, the only exceptions I seem to encounter with XMLRPC::Client are SocketError and XMLRPC::FaultException
[16:18:01] rickmasta: has joined #ruby
[16:18:06] ght: but for some reason, this generic RuntimeError pops up from time to time. Not sure why the API provider randomly returns a 401 unauthorized, but, there you have it.
[16:18:25] gusTester1: has joined #ruby
[16:19:43] adaedra: well, either you change - or make changed - the source of the non-specialized exception, either you catch everything, see inside the rescue block if it's for you, and rethrow otherwise
[16:20:07] DmitryBochkarev: has joined #ruby
[16:20:40] elperdut_: has joined #ruby
[16:21:27] towski_: has joined #ruby
[16:21:32] Xeago: has joined #ruby
[16:21:56] zendrix: has joined #ruby
[16:22:23] cih: has joined #ruby
[16:24:04] p0wn3d_: has joined #ruby
[16:25:40] dravine_: has joined #ruby
[16:26:04] MasterPiece: has joined #ruby
[16:26:21] bronson: has joined #ruby
[16:27:36] s2013: has joined #ruby
[16:29:27] null_ref: has joined #ruby
[16:29:50] xcesariox: has joined #ruby
[16:32:10] shinnya: has joined #ruby
[16:32:44] benlieb: has joined #ruby
[16:32:57] gusTester: has left #ruby: ()
[16:34:14] hooper: has joined #ruby
[16:34:36] hooper: has joined #ruby
[16:35:09] ismaelga: has joined #ruby
[16:35:41] gusTester: has joined #ruby
[16:36:53] andyrs: has joined #ruby
[16:37:05] zhkirill: has joined #ruby
[16:38:22] karapetyan: has joined #ruby
[16:39:21] symbole: has joined #ruby
[16:40:21] jgoncalv: has joined #ruby
[16:40:23] krisquigley: has joined #ruby
[16:41:03] willardg: has joined #ruby
[16:41:30] arup_r: has joined #ruby
[16:43:03] Kendos-Kenlen: has joined #ruby
[16:43:08] zhkirill: has joined #ruby
[16:43:22] User458764: has joined #ruby
[16:44:37] diegoviola: has joined #ruby
[16:44:40] paulcsmith: has joined #ruby
[16:46:08] _Cyther_: has joined #ruby
[16:47:01] Testo: has joined #ruby
[16:50:16] arup_r: has joined #ruby
[16:52:48] troyready: has joined #ruby
[16:53:26] hephaestus_rg: has joined #ruby
[16:53:29] freerobby1: has joined #ruby
[16:53:36] moeabdol: has joined #ruby
[16:53:43] noethics: has joined #ruby
[16:55:19] tawaffan: has joined #ruby
[16:55:54] kenichi: has joined #ruby
[16:57:06] jenrzzz: has joined #ruby
[16:58:13] bigmac: has joined #ruby
[17:00:18] firstdayonthejob: has joined #ruby
[17:00:39] mrsolo__: has joined #ruby
[17:01:57] umgrosscol: has joined #ruby
[17:01:57] mxrguspxrt: has joined #ruby
[17:02:07] _djbkd: has joined #ruby
[17:02:34] [Butch]: has joined #ruby
[17:03:24] luckyme: has joined #ruby
[17:03:41] ismaelga: has joined #ruby
[17:06:28] petricore: has joined #ruby
[17:07:13] krisquigley: has joined #ruby
[17:07:14] hahuang61: has joined #ruby
[17:08:09] s2013: has joined #ruby
[17:09:03] subscope: has joined #ruby
[17:10:29] Kendos-Kenlen_: has joined #ruby
[17:10:35] inteq: has joined #ruby
[17:12:17] codecop: has joined #ruby
[17:15:07] rgtk: has joined #ruby
[17:17:47] Hanmac: has joined #ruby
[17:17:53] tomphp: has joined #ruby
[17:18:24] barhum2013: has joined #ruby
[17:19:42] devoldmx: has joined #ruby
[17:19:51] Guest53: has joined #ruby
[17:21:56] jaequery: has joined #ruby
[17:22:47] EminenceHC: has joined #ruby
[17:22:54] last_staff: has joined #ruby
[17:24:31] jimms: has joined #ruby
[17:27:22] bronson: has joined #ruby
[17:30:06] platzhirsch: has left #ruby: ()
[17:31:16] morenoh149: has joined #ruby
[17:31:30] Soda: has joined #ruby
[17:33:48] nettoweb: has joined #ruby
[17:34:14] jamesaxl: has joined #ruby
[17:34:14] tmillc: has joined #ruby
[17:36:19] havenwood: has joined #ruby
[17:37:11] rushed: has joined #ruby
[17:38:11] dfinninger: has joined #ruby
[17:38:24] ndrei: has joined #ruby
[17:38:27] xcesariox: has joined #ruby
[17:39:28] inanepenguin: has joined #ruby
[17:40:38] DEA7TH: has joined #ruby
[17:41:03] fedexo: has joined #ruby
[17:43:17] banjara: has joined #ruby
[17:44:01] hfp__work: has joined #ruby
[17:45:58] rakm: has joined #ruby
[17:46:31] jgt: has joined #ruby
[17:46:36] BraddPitt: good morning all
[17:46:38] kirun: has joined #ruby
[17:50:10] rgtk: Good evening!
[17:50:22] nettoweb: has joined #ruby
[17:50:37] Cyther: has joined #ruby
[17:50:46] hfp_work: has joined #ruby
[17:51:16] krisquigley: has joined #ruby
[17:51:47] Ismael: has joined #ruby
[17:51:58] lalalaaa: has joined #ruby
[17:51:59] shmilan: has joined #ruby
[17:52:11] sleepee: has joined #ruby
[17:52:29] shadoi: has joined #ruby
[17:52:58] ddtblues: has joined #ruby
[17:53:08] hj2007: has joined #ruby
[17:53:09] Pupeno_: has joined #ruby
[17:53:25] hj2007: has joined #ruby
[17:56:19] AlexAltea: has joined #ruby
[17:56:47] hfp__work: has joined #ruby
[17:57:16] morenoh149: has joined #ruby
[17:57:33] casadei: has joined #ruby
[17:57:41] baweaver: has joined #ruby
[17:58:05] fedexo: has joined #ruby
[17:59:00] SHyx0rmZ: has joined #ruby
[17:59:35] lalalaaa: has joined #ruby
[17:59:38] pwnd_nsfw: has joined #ruby
[18:00:22] agit0: has joined #ruby
[18:00:25] _el_fer_: has joined #ruby
[18:00:39] Cyther: has joined #ruby
[18:01:01] baweaver: has joined #ruby
[18:01:42] i: has joined #ruby
[18:04:23] _djbkd: has joined #ruby
[18:04:56] ngscheurich: has joined #ruby
[18:05:05] mondayrain: has joined #ruby
[18:05:20] _djbkd: has joined #ruby
[18:06:02] AlexAltea: has joined #ruby
[18:06:36] jenrzzz: has joined #ruby
[18:07:17] prestorium_: has joined #ruby
[18:09:29] _djbkd: has joined #ruby
[18:09:43] tvw: has joined #ruby
[18:10:10] loc22: has joined #ruby
[18:11:03] freerobby: has joined #ruby
[18:11:36] despai: has joined #ruby
[18:12:25] leafybasil: has joined #ruby
[18:14:15] wallerdev: has joined #ruby
[18:14:19] jessemcgilallen: has joined #ruby
[18:14:29] stamina: has joined #ruby
[18:14:36] havenwood: has joined #ruby
[18:15:10] sleepee: has joined #ruby
[18:16:12] peterhu: has joined #ruby
[18:16:20] ismaelga: has joined #ruby
[18:16:53] EminenceHC: has joined #ruby
[18:17:08] KensoDev: has joined #ruby
[18:17:15] cih_: has joined #ruby
[18:17:25] baweaver: has joined #ruby
[18:18:30] sundhell: has joined #ruby
[18:18:44] yokel: has joined #ruby
[18:19:00] lalalaaa: has joined #ruby
[18:19:51] pwnd_nsfw: has joined #ruby
[18:20:03] cornerma1: has joined #ruby
[18:20:33] inanepenguin: has joined #ruby
[18:20:48] dfinninger: has joined #ruby
[18:21:26] cschneid_: has joined #ruby
[18:22:40] C0L0R: has joined #ruby
[18:23:21] dfockler: has joined #ruby
[18:24:01] lalalaaa: has joined #ruby
[18:24:54] cih: has joined #ruby
[18:28:22] bronson: has joined #ruby
[18:28:44] pwnd_nsfw: has joined #ruby
[18:29:00] lalalaaa: has joined #ruby
[18:29:10] Jackneill: has joined #ruby
[18:30:03] InternetFriend: has joined #ruby
[18:32:51] shmilan: has joined #ruby
[18:33:45] cih: has joined #ruby
[18:35:59] xxneolithicxx: has joined #ruby
[18:37:29] yqt: has joined #ruby
[18:37:45] timonv: has joined #ruby
[18:38:14] jenrzzz: has joined #ruby
[18:38:14] lalalaaa: has joined #ruby
[18:38:59] yqt: has joined #ruby
[18:40:32] Testo: has joined #ruby
[18:40:56] bluOxigen: has joined #ruby
[18:42:39] InternetFriend: has joined #ruby
[18:43:03] toretore: has joined #ruby
[18:43:07] _djbkd: has joined #ruby
[18:44:54] p8952: has joined #ruby
[18:45:26] lalalaaa: has joined #ruby
[18:48:00] despai: has joined #ruby
[18:48:04] hephaestus_rg: has joined #ruby
[18:49:25] sulky: has joined #ruby
[18:49:35] Maletor: has joined #ruby
[18:50:01] yfeldblum: has joined #ruby
[18:50:27] lalalaaa: has joined #ruby
[18:50:57] TheWhip: has joined #ruby
[18:53:14] pwnd_nsfw: has joined #ruby
[18:53:26] barhum2013: has joined #ruby
[18:54:25] leafybasil: has joined #ruby
[18:56:31] benaiah: has left #ruby: ("ERC (IRC client for Emacs 24.5.1)")
[18:56:33] zendrix: has joined #ruby
[18:57:36] pocketprotector2: has joined #ruby
[18:59:35] tvw: has joined #ruby
[18:59:48] karapetyan: has joined #ruby
[19:01:01] EminenceHC: has joined #ruby
[19:02:53] Alina-malina: has joined #ruby
[19:03:36] |ifei5g0_: has joined #ruby
[19:04:44] luckyme: has joined #ruby
[19:05:05] bakedb: has joined #ruby
[19:05:41] TheRinger: has joined #ruby
[19:05:50] barhum2013: has joined #ruby
[19:06:32] hephaestus_rg: has joined #ruby
[19:06:41] minimalism: has joined #ruby
[19:06:43] freerobby: has joined #ruby
[19:06:48] lalalaaa: has joined #ruby
[19:07:52] danielroth: has joined #ruby
[19:09:23] willardg: has joined #ruby
[19:10:23] tehcyx: has joined #ruby
[19:10:31] TheWhip: has joined #ruby
[19:10:51] lenwood: has joined #ruby
[19:11:09] ndrei: has joined #ruby
[19:11:48] dionysus69: has joined #ruby
[19:12:18] tehcyx: hey guys, i recently saw this: value = _array( -> { key "test", value "test2" }) is that _array a ruby function or do i have to look in the repo for that function? can someone explain what it does or post a link to the documentation?
[19:13:06] C0L0R: has joined #ruby
[19:13:21] jhass: not a core method, no
[19:14:22] jhass: if you have a place where you can call it, do puts method(:_array).source_location
[19:14:56] BraddPitt: what is the reason for preceding with an underscore, what does that denote?
[19:15:02] lalalaaa: has joined #ruby
[19:15:19] jhass: we can only guess
[19:15:38] BraddPitt: thought there was a reason behind doing so
[19:15:43] BraddPitt: ive seen it in a few projects and always wondered
[19:15:48] t3rm: has joined #ruby
[19:15:51] BraddPitt: if it crept in from another language idiom or something
[19:16:03] tehcyx: in particular, i'm using sparkleformation to create a cloudformation template, the outcome is expected to be this: "sgwithoutegress": { "Type": "AWS::EC2::SecurityGroup", "Properties": { "GroupDescription": "Limits security group egress traffic", "SecurityGroupEgress": [ { "CidrIp": "127.0.0.1/32", "IpProtocol": "-1" } ], "VpcId": { "Ref": "myVPC"} } }
[19:16:16] d5sx43: has joined #ruby
[19:16:32] tehcyx: the _array( .... ) part generates the securitygroupegress in the resulting json
[19:16:34] craysiii: put it in a gist please.
[19:16:41] axl_: has joined #ruby
[19:16:52] BraddPitt: is it more ruby-like to use single or double quotes on require statements
[19:17:03] tehcyx: https://gist.github.com/tehcyx/237d2c1d957db0f1071f
[19:17:04] pipework: BraddPitt: It doesn't matter.
[19:17:19] BraddPitt: I know it doesn't
[19:17:25] pipework: I use single quotes unless I'm interpolating and need doubles, but I also use the alternative literals for strings.
[19:17:40] pipework: BraddPitt: I mean that people do either, I don't know if one is prevalent.
[19:17:46] pipework: Some people do both sporadically.
[19:18:05] craysiii: and then i run into stupid problems when i go back to C#
[19:18:24] banjara: has joined #ruby
[19:18:34] tehcyx: you can see the _array being used in the sparkleformation repo (https://github.com/sparkleformation/sparkle_formation/search?utf8=%E2%9C%93&q=_array) but i have no clue where it comes from
[19:19:05] sanjayu: has joined #ruby
[19:20:12] jhass: BraddPitt: I guess single quotes still win, but it's like 70%/30% at most. personally I switched to double quotes unless the string contains a double quote (but a single quote) or specifically need to prevent interpolation
[19:20:29] devoldmx: has joined #ruby
[19:20:50] BraddPitt: cool, thanks all
[19:20:52] BraddPitt: was just curious
[19:21:32] pipework: jhass: Where do you get 70/30? 70 for double quotes?
[19:21:59] pipework: Because very popular tools, frameworks, and libraries, use double quotes a lot, and even generate code that uses double quotes.
[19:22:13] jhass: pipework: gut feeling. 70 for single quotes by default
[19:22:14] lalalaaa: has joined #ruby
[19:22:53] jhass: rubocop enforces single quotes in the default config for example
[19:23:08] pipework: Ah, yeah I'm exposed to a lot of newer rubyist code and they tend to double quote.
[19:23:18] postmodern: has joined #ruby
[19:23:34] apeiros: I started to try to use double quotes everywhere. and try because I noticed how inconsistent I am.
[19:23:45] jhass: why did tehcyx quit now m(
[19:24:03] pipework: jhass: Maybe he's using firefox and his browser shit the bag.
[19:24:09] d5sx43: has joined #ruby
[19:24:38] jhass: anyway, found _array: https://github.com/chrisroberts/attribute_struct/blob/master/lib/attribute_struct/attribute_struct.rb#L475
[19:24:45] jhass: I guess the author is just in love with _'s
[19:26:24] pipework: For when you want privacy, but not privacy.
[19:26:44] jhass: idk they're all over the place, in sparke_formation too
[19:27:04] yxhuvud: jhass: eh, a 100 lines long method_missing. *runs*
[19:27:08] pipework: My guess is that they're a JS developer or something like that.
[19:27:38] pipework: Maybe lua? :D
[19:27:47] jhass: I'll open an issue "Please rename to _attribute_struct"
[19:27:49] shevy: I love _ too
[19:27:55] shevy: but only _
[19:27:59] shevy: not any other characters
[19:28:13] jhass: shevy: not even ????
[19:28:21] shevy: only non-unicode characters
[19:28:39] shevy: __ is also ugly
[19:28:43] havenwood: shevy: ????
[19:28:47] jamesaxl|2: has joined #ruby
[19:28:55] shevy: see? this is what happens when they play unicode hangman! :(
[19:29:16] Guest86944: has joined #ruby
[19:29:20] bronson: has joined #ruby
[19:29:30] baweaver: has joined #ruby
[19:29:47] goldfish6744: has joined #ruby
[19:30:14] Guest53: has joined #ruby
[19:30:23] lalalaaa: has joined #ruby
[19:30:42] pipework: I use _whatever in those variables I'm not using, but not for method names or anything else.
[19:31:14] jhass: yeah, same
[19:31:56] symbol: has joined #ruby
[19:32:05] cokehead: has joined #ruby
[19:32:15] diego3: has joined #ruby
[19:32:17] barhum2013: has joined #ruby
[19:32:19] diego3: has joined #ruby
[19:32:28] rgtk: has joined #ruby
[19:33:25] karapetyan: has joined #ruby
[19:33:35] TheWhip: has joined #ruby
[19:33:50] p0wn3d_: has joined #ruby
[19:35:01] dfockler: has joined #ruby
[19:35:09] BraddPitt: what is the ruby reasion for naming a variable _
[19:35:17] BraddPitt: I see it in iterators/enumerables a lot
[19:35:19] Testo: has joined #ruby
[19:35:24] BraddPitt: im only familiar with it from Go as a throwaway val
[19:35:30] pipework: BraddPitt: Same here.
[19:35:33] jhass: it turns of the warning about unusued variables
[19:35:36] pipework: Unused positional variable.
[19:36:15] jstacks: has joined #ruby
[19:36:34] lalalaaa: has joined #ruby
[19:36:35] dstarh: has joined #ruby
[19:36:39] jhass: oh and reusage iirc, eg, foo, foo # warning, _, _ # ok
[19:36:43] InternetFriend: has joined #ruby
[19:36:44] rushed: has joined #ruby
[19:37:09] rgtk_: has joined #ruby
[19:37:15] Kendos-Kenlen: has joined #ruby
[19:37:31] jstacks: has left #ruby: ()
[19:40:03] cokehead: has left #ruby: ()
[19:40:23] atmosx: has joined #ruby
[19:40:23] jhass: too slow, you had 2 seconds!
[19:41:44] Tuxero: has left #ruby: ()
[19:42:07] willardg: has joined #ruby
[19:42:27] atmosx: I have this snippet: https://gist.github.com/atmosx/35491a2bf7ebfedd398e .. @entries has a 'created_at' attributed. What's the fastest way to create a hash which displays the @total for every date?
[19:42:53] Moonman420: has joined #ruby
[19:42:58] dikaio: has joined #ruby
[19:43:11] shevy: pipework I used to do so too
[19:43:13] jhass: group_by ?
[19:43:16] yxhuvud: jhass: ok, so the guy redefines #is_a, #class, #respond_to?, #nil? and also define #method_missing. That seems like playing with scissors.
[19:43:18] shevy: but I found it became ugly, like _tmp
[19:43:33] pipework: shevy: I think we're talking about two different things.
[19:43:53] jhass: yxhuvud: building a transparent proxy is fun though
[19:44:17] jhass: the major thing I'm missing is tricking Module#===
[19:44:22] e4xit: has joined #ruby
[19:44:22] pipework: some_hash_with_hashes.map do {|_key, (_nested_key, value)| value.to_s }
[19:44:47] Moonman420: what is ruby used for?
[19:45:08] jhass: Moonman420: everything
[19:45:11] newdan: Moonman420: programming?
[19:45:12] havenwood: Moonman420: Programming in the general sense.
[19:45:22] Moonman420: but why is it inferior to c?
[19:45:24] jhass: I only use it to save the world!
[19:45:38] jhass: boring troll detected
[19:45:44] newdan: Moonman420: Inferior in what way? Ruby is just higher level
[19:45:48] havenwood: Moonman420: That's like asking why spoons are inferior to forks. They aren't.
[19:45:55] Moonman420: why are most programming languages inferior to c?
[19:45:57] jhass: Moonman420: who said so? ask them
[19:46:03] havenwood: Moonman420: They aren't?
[19:46:09] newdan: jhass was right, good call
[19:46:19] Moonman420: no i am serious
[19:46:24] jhass: Moonman420: though they'll probably talk bullshit
[19:46:25] newdan: Moonman420: that's okay you're still a troll
[19:46:28] allomov: has joined #ruby
[19:46:28] Moonman420: the only thing i used ruby is to make rails apps
[19:46:29] havenwood: Moonman420: Who said this?
[19:46:31] atmosx: jhass: will try that ty
[19:46:32] Moonman420: it's fun to make rails apps
[19:46:43] havenwood: ?rails Moonman420
[19:46:43] ruboto: Moonman420, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[19:46:48] havenwood: Moonman420: Ruby is a general purpose programming language.
[19:46:50] Moonman420: but all the underlying code in the ruby docs uses c
[19:47:01] shevy: Moonman420 oh ruby is written in C!
[19:47:02] havenwood: Moonman420: The reference implementation of Ruby is written in C.
[19:47:27] Moonman420: why not just use c?
[19:47:39] slash_nick: Moonman420: why not just use assembly?
[19:47:43] atmosx: Moonman420: you have to know thw difference between programming paradigms to understand the answer.
[19:47:43] jhass: Moonman420: answer yourself first, why don't you do you rails apps in C?
[19:47:52] slash_nick: Moonman420: must be some reason
[19:47:58] havenwood: Moonman420: You use punchcards. We'll use Ruby. Meet you on the other side!
[19:47:59] jhass: Moonman420: seriously, answer yourself first
[19:48:07] tubbo: Moonman420: you ever use C?
[19:48:11] shevy: Moonman420 don't evade the question
[19:48:19] Moonman420: assembly doesn't take crap or collect garbage and if you don't know what you're doing then you shouldn't be doing it in the first place
[19:48:19] tubbo: because i have, and i'd rather write Ruby
[19:48:21] jhass: I think we're just feeding the troll here
[19:48:23] arup_r: hehe.. Fun begins.......
[19:48:29] jhass: let's stop
[19:48:37] pipework: I'm just not sure why he doesn't use C to write web apps.
[19:48:41] User458764: has joined #ruby
[19:48:46] tubbo: Moonman420: one time i tried to bust assembly's balls. he wasn't having it.
[19:48:51] Moonman420: because c isn't interpreted :(
[19:48:51] lalalaaa: has joined #ruby
[19:48:58] Moonman420: otherwise i'd be using c for everythign
[19:48:59] havenwood: Moonman420: It is actually, that's an option.
[19:49:11] pipework: It's a thing.
[19:49:32] jhass: Moonman420: https://root.cern.ch/cint here's your C interpreter
[19:49:38] havenwood: Moonman420: Give this and related papers a read: http://chrisseaton.com/rubytruffle/modularity15/rubyextensions.pdf
[19:49:45] havenwood: Moonman420: Interpreted C is fast.
[19:49:53] Moonman420: in order to write good c you have to compile it and then benchmark the code and see what kind of hardware your users are going to be using and then optimize the code in assembly for your target audience
[19:49:54] pipework: I wonder when the channel will level up and start encountering high-level trolls
[19:50:07] ruboto: Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[19:50:09] ruboto: Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[19:50:18] atmosx: Moonman420: and avoid some buffer overflow in teh process, mem leaks and so on.
[19:50:21] pipework: tubbo: ?gals
[19:50:23] tubbo: that guys guy though was pretty high level
[19:50:27] atmosx: Moonman420: also you need 5.000 lines of code to write an httpd.
[19:50:35] atmosx: Moonman420: time is money.
[19:50:37] jhass: atmosx: let's just stop feeding
[19:50:45] atmosx: jhass: okay
[19:50:57] jgt: has joined #ruby
[19:51:07] Moonman420: if you're too lazy to write 5000 lines of good code you, then you should be ashamed of even calling yourself a programmer
[19:51:22] tubbo: see this is why i'm not a good programmer, because i don't know the exact hardware specs of every one of the millions of users who visit my site(s) every day.
[19:51:25] jhass: still boring, try something creative
[19:51:38] tubbo: yeah for real, this is old news. i want a better troll
[19:51:48] tubbo: like come in here and be like I JUST CAUGHT DHH FUCKING A 12 YEAR OLD BOY
[19:51:53] tubbo: but don't give me this boring shit
[19:51:54] shevy: Moonman420 you need to write 5000 lines?
[19:52:06] Moonman420: you need to write everything from scratch
[19:52:08] Moonman420: that's the point
[19:52:10] rushed: has joined #ruby
[19:52:11] jhass: shevy: why you feed the boring stuff :(
[19:52:12] krisquigley: has joined #ruby
[19:52:13] havenwood: shevy: I'd prefer removing 5,000 lines. ;)
[19:52:15] Moonman420: not the amount of lines
[19:52:16] shevy: jhass you fed him too!
[19:52:30] baweaver: has joined #ruby
[19:52:33] jhass: shevy: I think a C interpreter is at least interesting
[19:52:34] slash_nick: ACTION hugs Moonman420 
[19:52:37] Moonman420: if you don't know how anything works how are you going to make it work?
[19:52:40] pipework: I wish we had something better to do, collectively.
[19:52:40] shevy: slash_nick lol
[19:53:05] jhass: good call actually, let's all give Moonman420 a hug
[19:53:06] shevy: havenwood yeah but you are sane
[19:53:07] jhass: ACTION hugs Moonman420
[19:53:16] shevy: Moonman420 probably has fleas
[19:53:26] Moonman420: no i have crabs
[19:53:37] shevy: now you are a real programmer
[19:54:50] eam: pipework: sufficiently advanced trolling is indistinguishable from intellectualism
[19:54:51] ruboto: apeiros, Mon_Ouie, fflush, zzak, banisterfiend, Radar, jhass, seanstickle, Havenn, sevenseacat, drbrain, zenspider, slyphon, Coraline, rubyhacker1, workmad3, miah, Aria, ljarvis, baweaver, Adaedra
[19:55:02] jhass: arup_r: really necessary?
[19:55:08] havenwood: arup_r: Need help?
[19:55:10] slash_nick: ACTION hugs arup_r 
[19:55:11] BraddPitt: almost never is
[19:55:20] arup_r: No.. I am fine.. thanks
[19:55:20] eam: rally's on
[19:55:27] baweaver: what are we banning?
[19:55:30] Radar: arup_r: please don't use !ops unless it's necessary
[19:55:35] Aria: whoa, tubbo, that was kinda horrible
[19:55:38] Radar: baweaver: I think arup_r needs a paddlin'
[19:55:44] BraddPitt: also ellipses have 3 dots, not 2
[19:55:44] baweaver: oh, so we're banning arup_r then
[19:55:58] baweaver: self selection it is
[19:55:58] BraddPitt: an ellipsis*
[19:55:59] havenwood: Happy Monday.
[19:56:02] eam: BraddPitt: tell that to Range
[19:56:08] Aria: Though also, Moonman420 ... no need to shame people for the amount of effort they have available. Not everyone is a professional programmer, highly trained, with lots of free time.
[19:56:10] BraddPitt: range != ellipsis though
[19:56:15] eam: news to me
[19:56:18] slash_nick: arup_r: For future reference... you can `/msg ruboto (!)ops` to get the list...
[19:56:22] bronson: has joined #ruby
[19:56:25] sundhell: has joined #ruby
[19:56:32] jhass: or /msg NickServ ACCESS #ruby LIST
[19:56:33] shevy: is it time to do !ops again?
[19:56:40] jhass: shevy: no
[19:56:47] baweaver: !.mute shevy
[19:56:56] slash_nick: shevy: !oops
[19:56:57] sp4rrow_: has joined #ruby
[19:56:59] Moonman420: Aria: if you want to do something (whatever you're interested in and passionate about) it's always in your best interest to do it right and to do it with your best effort and abilities
[19:57:04] lalalaaa: has joined #ruby
[19:57:18] elperdut_: has joined #ruby
[19:57:18] jhass: Aria: see, best just ignore them trolls
[19:57:24] baweaver: !mute Moonman420
[19:57:25] ruboto: +q Moonman420!*@*
[19:57:25] ruboto: -o ruboto
[19:57:31] eam: >> "not" ... "ellipsis?"
[19:57:31] baweaver: we all good now?
[19:57:32] ruboto: eam # => "not"..."ellipsis?" (https://eval.in/445292)
[19:57:35] arup_r: See, he did it.
[19:57:51] arup_r: You guys :(
[19:57:59] bigmac: has joined #ruby
[19:58:02] slash_nick: we <3 you arup_r
[19:58:04] Aria: <3 for not having to be passionate every damn moment.
[19:58:09] baweaver: not all guys <3
[19:58:15] pipework: I'm passionate about being dispassionate.
[19:58:15] arup_r: not me plss :(
[19:59:04] shevy: I am passionate about laziness. we lazy people did invent robots!
[19:59:06] Radar: One day we will get a good troll in here
[19:59:06] _djbkd: has joined #ruby
[19:59:19] eam: Radar: the good trolls aren't considered trolls
[19:59:27] odigity: I don't get it: http://stackoverflow.com/questions/32956801/what-is-the-point-of-setting-testopts-v-with-rake-test
[19:59:28] rushed: has joined #ruby
[19:59:55] eam: generally they run things ;-)
[20:00:07] baweaver: ACTION whistles innocently
[20:00:09] shevy: the boss trolls
[20:00:19] shevy: too much hp to down
[20:01:10] BraddPitt: is there anything gained by running a task as `bundle exec <command>` instead of just running a rake task and requiring whatever things you need inside that rake task?
[20:01:39] baweaver: executes in context of your bundle instead.
[20:01:51] slash_nick: that'd be a cool IRC channel feature, shevy ... new visitors are given 50HP... +10 HP with every non-annoying return visit, +10 HP for every 10 posts that don't get you banned... kick/ban goes through bots, and each op can only take away 50 HP... so...
[20:01:51] poguez_: has joined #ruby
[20:01:55] BraddPitt: right, but what is the bonus of that baweaver ?
[20:02:02] atmosx: Can this be optimized? https://gist.github.com/atmosx/64917884326a20163cbc
[20:02:06] havenwood: BraddPitt: Say you have more versions installed that just the ones that actually work with your app.
[20:02:15] lalalaaa: has joined #ruby
[20:02:47] havenwood: BraddPitt: RubyGems does support dependency resolution if you `gem install -g` and set: export RUBYGEMS_GEMDEPS=-
[20:03:01] pipework: eam: I call them 'channel fixtures', like lighting fixtures, they're necessary for illumination.
[20:03:07] shevy: slash_nick I guess in some ways the karma points on stackoverflow work in a somewhat similar way. like you level up by gaining points which are like XP \o/
[20:03:17] Radar: odigity: probably a legacy option from Test::Unit
[20:03:27] havenwood: BraddPitt: But Bundler is quite popular and Rails hardcodes to Bundler.
[20:03:47] ericjphillips: has joined #ruby
[20:04:09] jhass: "hardcodes"
[20:04:19] odigity: BraddPitt, when you run a command with `bundle exec` or "require 'bundler/setup'" in your file, bundler will look at your Gemfile.lock, and for every gem in there, will add the lib path for the specified version of that gem to $LOAD_PATH, which is what ruby uses when you say 'require'
[20:04:21] jhass: nothing preventing you from dropping the three lines from our config/
[20:04:32] Eiam_: has joined #ruby
[20:04:32] pipework: jhass: Except there's other bundler invocation.
[20:04:36] EminenceHC: has joined #ruby
[20:04:48] pipework: config/application.rb I think, or was it boot or something?
[20:05:00] jaequery_: has joined #ruby
[20:05:02] jhass: hence i didn't say boot.rb or application.rb but config/
[20:05:17] pipework: jhass: Ah, I thought the / was a mistyped period.
[20:05:27] jhass: the setup require is in boot.rb, the Bundler.require call is in application.rb
[20:05:27] pipework: As in your railsrc, rails config.
[20:05:43] odigity: I once spent a day trying to understand the Rails initialization process and gave up. I've since switched to Sinatra, and as a result I've learned a lot more about Ruby, core tools like Rack and Bundler and Minitest, and know exactly how every part of my app works. It feels good.
[20:05:46] cdg: has joined #ruby
[20:05:54] pipework: odigity: There's a rails initialization guide.
[20:05:59] odigity: pipework, I read it
[20:06:16] axl_: has joined #ruby
[20:06:17] pipework: I just manually traced through it a long time ago but after rails 3 dropped.
[20:06:18] odigity: I believe Rails has more lines of code than Sinatra... :)
[20:06:33] pipework: I'm a fan of smaller tools myself
[20:06:55] odigity: And two weeks in, I absolutely adore the sequel gem.
[20:07:03] bruno-: has joined #ruby
[20:07:15] lalalaaa: has joined #ruby
[20:07:22] tvon: has joined #ruby
[20:07:27] odigity: I can't think of any gem (possibly open source project in general) that is better designed, documented, and maintained than the sequel gem.
[20:07:38] Helheim: has joined #ruby
[20:07:55] speakingcode: has joined #ruby
[20:08:34] atmosx: odigity: you're using sinatra MVC?
[20:08:38] havenwood: odigity: Indeed, though you should checkout Roda by the maintainer of Sequel: http://roda.jeremyevans.net
[20:08:48] havenwood: odigity: It's lovely!
[20:09:06] Testo: has joined #ruby
[20:09:49] smathy: has joined #ruby
[20:10:01] willardg: has joined #ruby
[20:10:02] tvon: has joined #ruby
[20:10:13] pipework: havenwood: I was hoping roda would let me mount rack apps at endpoints.
[20:10:14] slash_nick: odigity: i'm pretty fond elasticsearch's ruby gems
[20:10:59] odigity: havenwood, I saw the roda repo in jeremy's account, but I've already got enough on my plate learning and using my current new tool set (including sinatra routing). that's why I'm putting off jumping to padrino. now that I'm using simple, well-designed tools that I can reason about, I've developed a hunger to master them before moving on
[20:11:24] odigity: slash_nick, that's good to know, since I hope to use ES someday
[20:11:35] havenn: has joined #ruby
[20:11:44] odigity: atmosx, not sure what you mean by sinatra MVC
[20:12:02] slash_nick: odigity: they manage it well https://github.com/elastic/elasticsearch-ruby
[20:12:15] lalalaaa: has joined #ruby
[20:12:37] willardg: has joined #ruby
[20:13:04] Coldblackice_: has joined #ruby
[20:13:07] loechel: has joined #ruby
[20:13:17] odigity: slash_nick, that may be true -- but they still have more than zero open issues :) (31 currently) Jeremy maintains a zero-issue policy for sequel. Of course, he achieves it by being a relentless machine of responsiveness...
[20:13:20] neanderslob: has joined #ruby
[20:13:33] EminenceHC: has joined #ruby
[20:13:40] odigity: odigity, it's not a fair comparison -- I've never seen another project attempt such a policy, let alone achieve it -- but you gotta be impressed
[20:14:27] havenn: odigity: Roda's plugin system is killer. I've found porting simple Sinatra apps over to be a positive process. I'd really recommend looking at it closer when you get a chance. :)
[20:14:28] Testo: has joined #ruby
[20:14:45] havenn: odigity: It's just done so well.
[20:14:50] slash_nick: eh, i don't think that's a very useful measurement... number of open issues...
[20:15:16] havenn: slash_nick: There literally aren't any issues with the projects though. It's superhero-level maintainership.
[20:15:18] atmosx: odigity: https://github.com/Phrogz/riblits
[20:15:29] atmosx: odigity: that's a nicely done MVC skeleton
[20:15:32] atmosx: for sinatra
[20:15:32] ismaelga: has joined #ruby
[20:15:33] slash_nick: havenn: where's that, roda?
[20:15:50] odigity: havenn, cool, I'll make a note of it
[20:16:54] odigity: slash_nick, havenn already linked to it above: http://roda.jeremyevans.net
[20:16:56] slash_nick: odigity: when github opens an issue for every pull request, lots of open issues could just mean lots of community contributions
[20:17:12] slash_nick: /involvement
[20:17:15] lalalaaa: has joined #ruby
[20:17:32] odigity: atmosx, I already built a custom app structure from scratch. wanted to learn the core tool well, and figured that was the best way to do it. when I'm ready to upgrade, I'll probably pick something popular and well-maintained like Padrino
[20:17:43] pipework: Also, zero-issue policies don't mean much without the context of the people closing them.
[20:17:52] pipework: Some people just respond and close without providing closure.
[20:18:20] odigity: slash_nick, I believe PRs are counted separately. the elasticsearch-ruby gem, for example, has 31 issues and 13 pull requests. different numbers.
[20:18:25] smathy: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[20:18:48] odigity: pipework, from everything I've seen about jeremy and sequel, if an issue is opened that represents an actual bug, it will get fixed, not rage-closed
[20:18:49] havenn: pipework: Oh I can close all the issues on a project, just you watch me! :P
[20:18:55] havenn: ACTION closes all the issues.
[20:19:22] odigity: as someone said above, it's superhero-level maintainership. like beyond what's reasonable to ask/expect of any project.
[20:19:27] pipework: odigity: I just think that it's a false metric for much more than how involved he stays with the project.
[20:19:39] pipework: It's pretty cool, to be sure.
[20:19:46] havenn: pipework: Monthly release, like clockwork.
[20:19:55] pipework: havenn: I don't care about those myself.
[20:19:57] odigity: if you want the best metric, I encourage you to read the code. I'm traditionally scared to read the code of major projects, but I regularly dip into his.
[20:20:04] pipework: New features and bugfixes constantly is pretty cool.
[20:20:21] shevy: havenwood became a wise man by reading big naughty ruby projects
[20:20:24] pipework: havenn: Ubuntu releases every six months.
[20:20:39] Kendos-Kenlen: has joined #ruby
[20:20:48] pipework: Doesn't say much towards quality, just that people are wiling to do the work to release as often as they do.
[20:20:49] odigity: havenn, yeah, that's another thing. He releases on the first of each month, whatever's ready to go, which a minor version bump (4.26 -> 4.27). pretty awesome.
[20:21:19] odigity: pipework, these are not proofs, these are indicators. you know, the kind of thing you utilize when you have less than complete/perfect information...
[20:21:35] pipework: odigity: Yeah, but they can paint an incorrect picture of reality.
[20:21:42] odigity: quality is ultimately subjective. look at the code and docs and decide
[20:22:01] pipework: middle-managers have perfected the use of indicators to portray the narrative they're most fond of.
[20:22:06] havenwood: has joined #ruby
[20:22:17] pipework: Though I'm not saying jeremy is doing anything like that.
[20:22:27] lalalaaa: has joined #ruby
[20:22:27] havenwood: I'm having such connection trouble today... time for a bouncer.
[20:22:39] pipework: I'm saying that using those things to say much more than what they say is foolhardy.
[20:22:50] toretore: "oh no, there hasn't been a new release in over a month! must be shit then"
[20:22:54] pipework: I met him, he seems like a very great open source developer.
[20:23:00] Soda: has joined #ruby
[20:23:18] odigity: It seems you'd prefer people say nothing, because you can't be suggesting that it is possible to articulate accurately the "quality" of a project.
[20:23:19] pipework: I've been at his talk about roda, it was fantastic, even though I thought it did something a bit different than what it does
[20:23:38] pipework: odigity: I'm saying that a project being great because of the things you mention is a foolish statement.
[20:23:45] TheWhip: has joined #ruby
[20:23:59] odigity: I say those things as indicators because I'm lacking the language to proof "quality" in any objective manner.
[20:24:13] havenwood: pipework: Starting with barebones and adding plugins to compose the app you want is something I really grok. It's a fun project to read the code of. Remarkably flat and simple.
[20:24:13] pipework: For me, I prefer bugfixes, features, and documentation as indicators of worthwhile projects.
[20:24:13] odigity: Whereas at least the things I said above are objectively true.
[20:24:15] shevy: what is the project you people talk about again?
[20:24:20] naftilos76: has joined #ruby
[20:24:27] pipework: havenwood: Yeah, I just wanted to be able to mount rack apps in. :(
[20:24:33] odigity: http://sequel.jeremyevans.net/
[20:24:37] havenwood: pipework: You can! A plugin.
[20:25:01] pipework: havenwood: At only a subset of the routes? I didn't find that when I was looking 6 months ago. I'll look again.
[20:25:16] Guest53: has joined #ruby
[20:25:26] pipework: odigity: They may be truths, but they aren't indicators of a great project, just a great maintainer.
[20:25:31] havenwood: pipework: I'm not sure on timeframe, but yeah good support. The #roda channel is helpful too for finding em.
[20:25:50] havenwood: pipework: It's been too long since I've read through the plugins, maybe I'll do that this week.
[20:26:07] pipework: If a project can be rather crap with those attributes that you mention, then they aren't indicators of a good project.
[20:26:43] pipework: The sky tends to be blue.
[20:26:53] `tim`: has joined #ruby
[20:26:54] morenoh149: has joined #ruby
[20:27:22] toretore: there is only one thing that really matters, and that is the quality of the code
[20:27:25] pipework: havenwood: Ooh, I see router#run!
[20:27:30] lalalaaa: has joined #ruby
[20:27:32] toretore: all the other things in no way indicate this
[20:27:48] odigity: pipework, I will in the future refrain from saying anything that isn't based on 100% causal relationships between A and B -- which means I don't see much conversation in our future.
[20:28:01] pipework: odigity: I don't know why you sound so personally involved here.
[20:28:05] shevy: you two just don't get along
[20:28:10] toretore: you two are made for each other
[20:28:12] pipework: I'm glad you're excited about his work, I think it's pretty great.
[20:28:28] pipework: toretore: And falling short of internal code quality, expectations on public interface and behaviour being met are secondarily appreciable.
[20:29:04] bigmac: has joined #ruby
[20:29:05] toretore: pipework: one could say that external interface is the only thing that matters
[20:29:09] wmoxam: now, kiss!
[20:29:11] sdwrage: has joined #ruby
[20:29:12] skweek: has joined #ruby
[20:29:15] pipework: toretore: It is what I tend to say.
[20:29:31] pipework: But for when the source is open, internal cleanliness is good stuff too
[20:29:44] toretore: what the code does internally is of no interest to the consumer; but if it's shit then it's going to be difficult to develop and stagnate
[20:30:07] toretore: and bugs won't be fixed, features won't be added, etc.
[20:30:26] zotherstupidguy: has joined #ruby
[20:30:38] pipework: I was wrong when I said 'internal code quality', I should have just said code quality.
[20:30:44] toretore: what bothers me about most code is that it doesn't play well with others
[20:30:49] pipework: quality > external quality > internal quality
[20:30:57] toretore: assumptions being made all over the place
[20:31:22] pipework: toretore: You do know what happens when you make an assumption, right? People start thinking about asses.
[20:31:28] toretore: neat looking website > quality
[20:31:45] toretore: i don't have anything against asses
[20:32:16] shevy: I got a paddle
[20:32:33] willardg: has joined #ruby
[20:32:36] lalalaaa: has joined #ruby
[20:32:53] lucasfs7: has joined #ruby
[20:33:39] lucasfs7: has left #ruby: ()
[20:33:57] zotherstupidguy: has joined #ruby
[20:33:59] goldfish6744: *pats on shoulder* Just imagine... asses... asses as far as the eye can see. Now grab that paddle and get to work. :)
[20:34:14] wmoxam: Please don't hit those donkeys
[20:34:16] slash_nick: ACTION quickly builds an ass-raft
[20:34:30] dmolina: has joined #ruby
[20:34:40] zotherstupidguy: has joined #ruby
[20:35:33] slash_nick: 333[>-/o]333333
[20:35:36] pipework: ACTION hides the poor donkeys in a hole.
[20:37:33] ericjphillips: has joined #ruby
[20:37:39] goldfish6744: nature gave donkeys their own tools to protect themselves
[20:37:46] lalalaaa: has joined #ruby
[20:38:21] baweaver: has joined #ruby
[20:39:07] shevy: slash_nick lol
[20:39:30] goldfish6744: had a funny incident with that, though. We were in Spain and in a hotel and I wanted butter for my bread. I speak no Spanish, but obviously I know "butter" in English, then "beurre" in French, also "Butter" in German, so I tried to guesstimate and asked for "burro."
[20:39:31] shevy: now that you mention this... <3 is a heart... I didn't think before what <3 is without the <
[20:40:05] goldfish6744: then the waitress started laughing at me. Well yea, "burro" means "donkey" in Spanish. Butter is called "montequila"
[20:40:23] zcreative: has joined #ruby
[20:40:30] slash_nick: odigity: 0 open issues is cool, especially given there are ~750 closed. 185 contributors is also awesome, it almost accounts for 425 forks. assuming it doesn't look as though it's been written by 185 people, that's definitely something to boast. any one metric is not very useful, they're only useful when corroborated by other metrics
[20:40:42] zcreative: has joined #ruby
[20:40:54] shevy: mon tequila?
[20:40:58] zcreative: has joined #ruby
[20:41:00] krisquigley: has joined #ruby
[20:41:05] slash_nick: odigity: but, i know, you weren't saying "lib x rocks because of y"... you were just saying "lib x rocks... and it has y" :)
[20:41:24] goldfish6744: shevy, yea, it is
[20:41:33] ndrei: has joined #ruby
[20:41:49] toretore: the thing about open issues is people will open an issue about all sort of stupid shit
[20:42:15] d10n-work: has joined #ruby
[20:42:22] slash_nick: toretore: no kidding...
[20:42:31] odigity: slash_nick, yes
[20:42:51] goldfish6744: issue #47617: "Program doesn't do what I want, help." Followup: merged with issues 46821-47491...
[20:43:08] marr: has joined #ruby
[20:43:14] toretore: "please use the mailing list for questions, please use the mailing list for questions, please use the mailing list for questions"
[20:43:38] slash_nick: ACTION nods
[20:44:24] toretore: "Issue #2342: make a dsl for integrating with salesforce and sap"
[20:44:58] slash_nick: Even if there are 5000 closed issues and 0 open... that doesn't mean anything is good. imagine what kind of rube goldberg contraption you might have after 200 people resolve 5000 issues
[20:45:02] pipework: toretore: Protip: Just turn off issues and use librelist
[20:45:09] goldfish6744: couldn't you train some small mammal to post that reply? You could make a keyboard macro to type it all in, it should just push the RED key whenever it sees one.
[20:45:10] pipework: Fuck internet points.
[20:45:27] bougyman: slash_nick: a patchy server was that. is that. always will be that.
[20:45:33] renderful: has joined #ruby
[20:45:41] baweaver: isn't that what interns are for?
[20:46:08] pipework: Hopefully, you'll have a mail client. I hear any software project is incomplete until it includes a mail client.
[20:46:16] pipework: And even then, people still extend emacs.
[20:46:36] goldfish6744: interns tend to use the computer for all other sort of things as well, and are having all sort of unreasonable expectations (human rights etc)
[20:46:59] slash_nick: goldfish6744: paychecks, etc
[20:47:15] slash_nick: this has really been an OT day.
[20:47:25] goldfish6744: squirrels ask for extra peanuts at the end of a busy day, at worst
[20:47:29] djcp: has joined #ruby
[20:47:53] toretore: goldfish6744: http://cdn.makeagif.com/media/7-28-2014/AnSME7.gif
[20:47:55] willardg: has joined #ruby
[20:48:00] ekinmur: has joined #ruby
[20:49:10] goldfish6744: toretore, yea, pretty much what I had in mind. Except that it stops after a while
[20:49:19] goldfish6744: it works based on temperature difference
[20:50:25] Sigma00: put it on one of those usb coffee warmers
[20:50:34] slash_nick: goldfish6744: just position next to the machines fan exhaust
[20:50:55] slash_nick: goldfish6744: use cron to periodically run something expensive
[20:51:13] slash_nick: Sigma00: ^ :)
[20:51:25] Sigma00: that's better
[20:51:26] goldfish6744: the ideas that one picks up in this chan are sometimes nothing short of breathtaking
[20:51:55] slash_nick: rubyists > other problem solvers
[20:52:00] jgt: has joined #ruby
[20:52:10] slash_nick: (only anecdotal evidence to support)
[20:53:44] CooloutAC: has joined #ruby
[20:53:47] balazs_: has joined #ruby
[20:54:17] CooloutAC: can someone tell me what is wrong with my syntax http://dpaste.com/0GRA2QX
[20:54:50] slash_nick: CooloutAC: is an error raised? what's it say?
[20:55:04] CooloutAC: (ruby):12:??syntax??error,??unexpected??$end,??expecting??keyword_end
[20:55:20] slash_nick: CooloutAC: you didn't close your #each block
[20:55:34] slash_nick: if/else/end... but each/<missing end>
[20:56:11] slash_nick: CooloutAC: indent block contents +2 spaces and it'll be more obvious :)
[20:56:18] CooloutAC: right the end for the do, or also i could use { } maybe better for that
[20:56:37] slash_nick: CooloutAC: see https://gist.github.com/rthbound/d1cb23ffb55980526e31 obvious :)
[20:56:54] _djbkd: has joined #ruby
[20:56:59] zendrix: has joined #ruby
[20:57:13] slash_nick: CooloutAC: { } is the equivalent of do/end... typically folks use do/end for blocks that span multiple lines, and { } for one-liners
[20:57:43] CooloutAC: ya i ended up doing words.each do |word| end
[20:57:55] CooloutAC: shoudl of juse used the curly braces i think
[20:58:11] CooloutAC: tks for the tips
[20:58:28] bigmac: has joined #ruby
[21:00:00] baweaver: has joined #ruby
[21:00:02] Guest53: has joined #ruby
[21:00:21] evanjs: has joined #ruby
[21:01:20] NeverDie: has joined #ruby
[21:01:56] ismaelga: has joined #ruby
[21:02:38] cih: has joined #ruby
[21:03:01] phutchins: has joined #ruby
[21:04:44] havenn: has joined #ruby
[21:05:39] _djbkd: has joined #ruby
[21:06:11] spuk: has joined #ruby
[21:06:32] _djbkd: has joined #ruby
[21:09:07] yfeldblum: has joined #ruby
[21:09:25] CooloutAC: slash_nick: oh you were right, i had to to do it that way
[21:09:39] dionysus69: has joined #ruby
[21:11:14] CooloutAC: it wasn't a one liner cause the if/end were part of it, and if i indent them makes it obvious
[21:11:25] leafybasil: has joined #ruby
[21:11:30] evanjs: has joined #ruby
[21:12:02] InternetFriend: has joined #ruby
[21:12:13] slash_nick: CooloutAC: right-o... sorry i wasn't clear, but it sounds like you understand what i was saying now :)
[21:12:13] martinbjeldbak: has joined #ruby
[21:13:49] skade: has joined #ruby
[21:13:55] _blizzy_: has joined #ruby
[21:14:27] shmilan: has joined #ruby
[21:18:11] solocshaw: has joined #ruby
[21:19:14] yfeldblum: has joined #ruby
[21:21:14] devoldmx: has joined #ruby
[21:21:26] ellisTAA: has joined #ruby
[21:21:37] skade: has joined #ruby
[21:21:55] rushed: has joined #ruby
[21:22:11] _blizzy_: has joined #ruby
[21:22:35] s2013: has joined #ruby
[21:22:37] tubuliferous_: has joined #ruby
[21:25:15] shadoi: has joined #ruby
[21:25:43] momomomomo: has joined #ruby
[21:26:11] morenoh149: has joined #ruby
[21:27:08] sepp2k: has joined #ruby
[21:29:32] pecpec: has joined #ruby
[21:30:01] j5s7: has joined #ruby
[21:30:58] ducklobster: has joined #ruby
[21:31:42] zayaman: has joined #ruby
[21:33:59] sepp2k1: has joined #ruby
[21:37:27] jpfuentes2: has joined #ruby
[21:38:33] dagir: has joined #ruby
[21:38:37] barhum2013: has joined #ruby
[21:39:51] charliesome: has joined #ruby
[21:40:07] simpson: has joined #ruby
[21:40:39] skade: has joined #ruby
[21:40:51] simpson: Hi! Thor question: I'm new to Thor but the docs are helpful so far. I know how to specify coercion types for options; how can I do it for positional arguments?
[21:41:52] yodaman: has joined #ruby
[21:42:36] simpson: For example, I want to call my application as `$ bin/app subcommand 42`, and I want to enforce that that positional arg to the subcommand is :numeric. Is there a Thor way to do this or do I have an ad-hoc type check?
[21:43:46] yodaman: https://gist.github.com/anonymous/39893f95efdda891f8fd
[21:43:52] zhkirill: has joined #ruby
[21:44:20] snockerton: has joined #ruby
[21:44:45] zayaman: has joined #ruby
[21:46:00] Eiam_: has joined #ruby
[21:46:02] skade: has joined #ruby
[21:46:14] neanderslob: has joined #ruby
[21:47:43] yfeldblum: has joined #ruby
[21:48:16] bubbys: has joined #ruby
[21:49:22] User458764: has joined #ruby
[21:50:17] musl: has joined #ruby
[21:50:52] baweaver: has joined #ruby
[21:51:41] simplyianm: has joined #ruby
[21:53:00] symm-: has joined #ruby
[21:53:08] jgt: has joined #ruby
[21:55:12] nKulo: has joined #ruby
[21:55:20] allomov: has joined #ruby
[21:56:00] TheWhip: has joined #ruby
[21:56:28] [Butch]: has joined #ruby
[21:57:20] niemcu: has joined #ruby
[21:57:37] gusTester: has left #ruby: ()
[21:57:58] sdwrage: has joined #ruby
[21:58:52] DEA7TH: has joined #ruby
[22:00:05] CloCkWeRX: has joined #ruby
[22:00:14] banister: has joined #ruby
[22:00:46] _djbkd: has joined #ruby
[22:00:58] mondayrain: has joined #ruby
[22:01:32] dfockler: has joined #ruby
[22:02:40] djbkd_: has joined #ruby
[22:02:47] simplyianm: has joined #ruby
[22:03:31] whitby: has joined #ruby
[22:03:58] PaulCapestany: has joined #ruby
[22:04:03] FernandoBasso: has joined #ruby
[22:05:16] _blizzy_: has joined #ruby
[22:08:41] morenoh149: has joined #ruby
[22:09:37] Azure: has joined #ruby
[22:11:26] diegoviola: has joined #ruby
[22:13:52] _blizzy_: has joined #ruby
[22:14:21] Ropeney: has joined #ruby
[22:14:31] stacybird: has joined #ruby
[22:14:35] Eiam_: has joined #ruby
[22:14:48] lkba: has joined #ruby
[22:14:51] CrazyEddy: has joined #ruby
[22:15:40] willardg: has joined #ruby
[22:17:07] David27: has joined #ruby
[22:17:37] aldodelgado: has joined #ruby
[22:18:26] nKulo: has joined #ruby
[22:18:48] symm-: has joined #ruby
[22:19:59] havenwood: yodaman: The outermost one keeps your code separate from other Ruby code, so it's project-wide. Any module or class for your project then goes in that namespace. I'd suggest avoiding further nesting unless you know why you're doing it.
[22:20:57] EminenceHC: has joined #ruby
[22:22:32] freerobby: has joined #ruby
[22:22:54] s00pcan: has joined #ruby
[22:25:30] i: has joined #ruby
[22:26:47] TheWhip: has joined #ruby
[22:28:16] platzhirsch: has joined #ruby
[22:29:14] leafybasil: has joined #ruby
[22:29:53] nKulo: has joined #ruby
[22:30:29] yodaman: havenwood: thanks, I don't know exactly what it means and why it's being done that way thus the question :)
[22:32:47] jgt: has joined #ruby
[22:32:51] InternetFriend: has joined #ruby
[22:33:28] snockerton: has joined #ruby
[22:34:53] uris: has joined #ruby
[22:35:07] wookiehangover: has joined #ruby
[22:37:25] __butch__: has joined #ruby
[22:37:38] freerobby: has joined #ruby
[22:40:33] ^butch^: has joined #ruby
[22:40:57] yfeldblum: has joined #ruby
[22:41:13] shmilan: has joined #ruby
[22:42:15] rickmasta: has joined #ruby
[22:42:54] _djbkd: has joined #ruby
[22:43:35] chandlerbing: has joined #ruby
[22:44:17] bigmac: has joined #ruby
[22:44:18] Guest87318: has joined #ruby
[22:44:30] hydrozen: has joined #ruby
[22:45:26] nKulo: has joined #ruby
[22:45:59] Maletor: has joined #ruby
[22:46:02] Pathfinder_: has joined #ruby
[22:47:05] EminenceHC: has joined #ruby
[22:47:11] Azure: has joined #ruby
[22:47:13] paulcsmith: has joined #ruby
[22:48:10] jobewan: has joined #ruby
[22:48:16] MrJoshua: has joined #ruby
[22:48:58] paulcsmith: has joined #ruby
[22:52:25] hephaestus_rg: has joined #ruby
[22:53:36] Eiam_: hmm, if I had some code like MyClass.some_function({:attr => "stuff"}) and I wanted to be able to... stringify that and let some code elsewhere actually execute it..
[22:54:29] chandlerbing: has joined #ruby
[22:54:32] finisherr: has joined #ruby
[22:54:52] Eiam_: just .send(mystr) ?
[22:55:37] shevy: .send will invoke a method
[22:55:43] shevy: so mystr would have to be a method on your target object
[22:55:58] Eiam_: hmm yeah .send and .call don't seem to be quite what I'm after
[22:56:01] willardg: has joined #ruby
[22:56:14] Eiam_: I guess I could say MyClass.send
[22:56:23] shevy: note that in your example you do not send any arguments to the method that you call via .send()
[22:56:35] Oka: has joined #ruby
[22:56:45] Eiam_: yeah.. that requires breaking it all up. i want to try and maintain exactly what you'd write as code
[22:56:47] zhkirill: Do you mean MyClass.method('some_function').call({:attr => "stuff"}) ?
[22:58:26] Eiam_: I'm looking for a way to turn the code "MyClass.some_function({:attr => "stuff"})" (which written in ruby, would execute) and instead call it later elsewhere
[22:59:09] wookiehangover: has joined #ruby
[22:59:15] Eiam_: .send and .call require breaking it up into distinct parts
[22:59:25] inanepenguin: Turning MyClass.some_function({:attr => "stuff"}) into a string is one thing, but if you have the string you can use Kernel#eval
[22:59:28] zhkirill: By "elsewhere" you mean not from Ruby?
[22:59:33] shevy: .send will make use of already existing methods
[22:59:34] Eiam_: zhkirill: still in ruby
[23:00:04] Eiam_: shevy: I'm writing an ETL source, which will run from a rake task, and I want that source to be something that can be driven by known queries
[23:00:08] zhkirill: Yeah, eval should work
[23:00:15] Eiam_: queries being functions on classes
[23:00:35] elperdut_: has joined #ruby
[23:00:37] Eiam_: methods =)
[23:00:59] paulcsmith: has joined #ruby
[23:01:06] Eiam_: ah yes, eval(mystring) worked
[23:01:14] Eiam_: hmm, now tell me why im stupid for doing this
[23:01:19] zhkirill: Oh, Rubyists don't accept "function"?
[23:01:37] symm-: has joined #ruby
[23:03:25] Eiam_: maybe I'll be safer ,define two paramters. method & values, and just force it to only allow MyClass.<your values>
[23:03:28] Eiam_: some minor protection
[23:03:41] jaequery: has joined #ruby
[23:03:42] weemsledeux: has joined #ruby
[23:03:57] shevy: I don't know why you would need eval for when you have .send already
[23:06:20] Eiam_: shevy: well origially I didn'tw ant to break apart the code
[23:06:26] Eiam_: so eval did exactly what I wanted
[23:06:27] willardg: has joined #ruby
[23:06:44] Eiam_: send requires you name your method then split out the args to it
[23:06:46] shevy: you have quite a lot of constraints there
[23:06:57] Eiam_: shevy: =) without constraints, we could do anything!
[23:07:23] johnzorn: has joined #ruby
[23:07:44] comm64x: has joined #ruby
[23:08:49] comm64x: this may seem like an odd question but, can you assign a value to an instance variable as an argument in a method, like def foo(@bar=nil)
[23:09:21] drbrain: comm64x: no
[23:09:40] shevy: syntax error
[23:09:50] platzhirsch: has joined #ruby
[23:09:58] comm64x: in python you can and I'm trying to find a way to get around this
[23:10:11] Radar: comm64x: assign the instance variable in the method.
[23:11:03] drbrain: >> def m l=(@i = 1); [l, @i]; end; [m, m(2)]
[23:11:04] ruboto: drbrain # => [[1, 1], [2, 1]] (https://eval.in/445318)
[23:11:25] shevy: now that's creative!
[23:11:44] drbrain: so you can only set an ivar to a default value
[23:11:49] jessemcgilallen: has joined #ruby
[23:12:50] comm64x: could you expound upon your syntax
[23:13:36] drbrain: the default value for a method's argument can be any expression
[23:13:36] symbol: has joined #ruby
[23:13:55] Eiam_: yeah im having trouble parsing that syntax
[23:13:58] drbrain: above, `l` is the a method argument and (@i = 1)u is the default value
[23:14:59] drbrain: the default value expression is always evaluated `(@i = 1)`, so @i will always be assigned
[23:15:15] comm64x: ah I see it now
[23:16:21] shevy: Eiam_ just add parens
[23:16:28] shinnya: has joined #ruby
[23:16:54] shevy: def test(l=(@foobar = 1)); [l, @foobar]; end; [test, test(2)] # => [[1, 1], [2, 1]]
[23:17:55] Coraline: I would throw up in my mouth if I found that code somewhere.
[23:18:04] Eiam_: oh i missed that
[23:18:22] drbrain: Coraline: it gets worse
[23:18:32] Coraline: Of course it does
[23:18:39] drbrain: the object the method is defined on may also be an expression
[23:18:51] drbrain: def (your; expression; here).method_name; end
[23:18:55] jgt: has joined #ruby
[23:21:19] platzhirsch: has left #ruby: ()
[23:22:00] devoldmx: has joined #ruby
[23:23:26] _blizzy_: has joined #ruby
[23:23:44] techsethi: has joined #ruby
[23:25:33] havenn: has joined #ruby
[23:26:24] willardg: has joined #ruby
[23:26:57] casadei: has joined #ruby
[23:26:59] shevy: now it's beginning to become really nasty
[23:27:56] workmad3: has joined #ruby
[23:28:05] MyMind: has joined #ruby
[23:28:49] andersoldahl: has joined #ruby
[23:30:00] baweaver: has joined #ruby
[23:30:07] pwnd_nsfw: has joined #ruby
[23:32:04] _blizzy_: has joined #ruby
[23:35:26] zenguy_pc: has joined #ruby
[23:36:42] paulcsmith: has joined #ruby
[23:38:19] Xiti: has joined #ruby
[23:38:39] paulcsmith: has joined #ruby
[23:40:16] paulcsmith_: has joined #ruby
[23:41:32] finisherr: has joined #ruby
[23:42:32] cassioscabral: has joined #ruby
[23:44:11] Cyther_: has joined #ruby
[23:44:38] EminenceHC: has joined #ruby
[23:47:38] hephaestus_rg: has joined #ruby
[23:47:50] EXID123: has joined #ruby
[23:48:21] paulcsmith_: has joined #ruby
[23:48:57] DanielI: has joined #ruby
[23:50:08] User458764: has joined #ruby
[23:53:04] uberjar: expect(Time.now.utc.iso8601).to eql(DateTime.now.utc.iso8601) <--- should that work assuming the clocktime was paused long enough for it to execute concurrently ?
[23:53:39] p0wn3d_: has joined #ruby
[23:53:50] uberjar: what I am seeing here are two different timezone formats for the two method calls so I'm naturally confused
[23:53:57] David27_: has joined #ruby
[23:54:51] ericjphillips: has joined #ruby
[23:55:03] uberjar: so as a result I'm having to use this in my code which is ugly: DateTime.now.to_time.utc.iso8601
[23:55:40] InternetFriend: has joined #ruby
[23:56:33] _blizzy_: has joined #ruby
[23:56:54] drbrain: uberjar: +00:00 and Z are the same time zone
[23:57:38] drbrain: why one uses
[23:57:44] drbrain: Z and the other uses an offset is weird
[23:57:47] bigmac: has joined #ruby
[23:58:04] uberjar: but only the Z is valid iso8601 if I'm interpreting wikipedia correctly
[23:58:10] EXID123: has joined #ruby
[23:58:18] uberjar: sec I'll find the quote
[23:58:38] drbrain: https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC
[23:58:44] uberjar: If the time is in UTC, add a Z directly after the time without a space. Z is the zone designator for the zero UTC offset. "09:30 UTC" is therefore represented as "09:30Z" or "0930Z". "14:45:15 UTC" would be "14:45:15Z" or "144515Z".
[23:58:58] drbrain: last paragraph of that section says "can also be stated numerically"
[23:59:13] SCHAAP137: has joined #ruby
[23:59:26] uberjar: doh! right you are
[23:59:32] luckyme: has joined #ruby
[23:59:46] uberjar: so they're both valid, just using different variations of the standard.. *sigh*
[23:59:58] drbrain: uberjar: let's back up, what are you testing?