« Back to channel list

#ruby - 05 July 2015

« Back 1 day Forward 1 day »
[00:00:21] baweaver: granted, which is why that's filed under hard tasks
[00:00:34] Pupeno: has joined #ruby
[00:00:34] Pupeno: has joined #ruby
[00:00:37] baweaver: the gist right now is to get application structure generated at least.
[00:01:06] pontiki: i did preface my comment with "these are theoreticals"...
[00:01:16] baweaver: I caught it :)
[00:01:46] hotpancakes: has joined #ruby
[00:03:20] workmad3: has joined #ruby
[00:03:41] senayar: has joined #ruby
[00:03:44] senayar: has joined #ruby
[00:04:32] vyorkin2: has joined #ruby
[00:07:10] baweaver: aha, define_method
[00:07:13] baweaver: that I can hack
[00:07:48] baweaver: just throw it through a class eval to intercept constants with new called to define an OpenStruct with method missing to 'define' the code
[00:07:54] baweaver: ....easier said than done though
[00:10:07] pontiki: doggone it, i think i left my flex pen at work
[00:11:00] lupine: has joined #ruby
[00:11:13] pontiki: crud crud crud :(
[00:12:12] stylus: has joined #ruby
[00:12:58] dgutierrez1287: has joined #ruby
[00:13:54] Rollabunna: has joined #ruby
[00:14:43] sharpmachine: has joined #ruby
[00:15:28] entropie: has joined #ruby
[00:16:24] j4cknewt: has joined #ruby
[00:26:33] Pupeno: has joined #ruby
[00:26:33] Pupeno: has joined #ruby
[00:27:52] MasterPiece: has joined #ruby
[00:32:14] j4cknewt: has joined #ruby
[00:33:31] Musashi007: has joined #ruby
[00:33:36] allomov: has joined #ruby
[00:33:51] RobertBirnie: has joined #ruby
[00:34:53] chris2: has joined #ruby
[00:36:26] war_pigs: has joined #ruby
[00:36:32] finisherr: has joined #ruby
[00:38:26] war_pigs: has joined #ruby
[00:38:55] CloCkWeRX: has joined #ruby
[00:40:22] war_pigs: has joined #ruby
[00:42:13] kjones_: has joined #ruby
[00:42:15] war_pigs: has joined #ruby
[00:44:23] ivanskie: has joined #ruby
[00:44:31] coffeecupp: has joined #ruby
[00:46:22] whiteline: has joined #ruby
[00:46:42] workmad3: has joined #ruby
[00:47:15] chris2: has joined #ruby
[00:47:23] GPrime: has joined #ruby
[00:48:40] vyorkin2: has joined #ruby
[00:55:46] kjones_: has joined #ruby
[00:56:13] CloCkWeRX: has joined #ruby
[00:58:08] hotpancakes: has joined #ruby
[01:00:08] j4cknewt: has joined #ruby
[01:01:44] hotpanca_: has joined #ruby
[01:01:53] adamski2600: has joined #ruby
[01:04:50] dgutierrez1287: has joined #ruby
[01:06:35] jesterfraud: has joined #ruby
[01:08:00] jesterfraud: has joined #ruby
[01:08:11] Rollabunna: has joined #ruby
[01:08:17] nahtnam: has joined #ruby
[01:11:37] RobertBirnie: has joined #ruby
[01:12:21] eggoez: has joined #ruby
[01:12:32] michael_mbp: has joined #ruby
[01:15:23] sharpmachine: has joined #ruby
[01:15:25] yh: has joined #ruby
[01:20:09] rodfersou: has joined #ruby
[01:24:01] adamski2600: has joined #ruby
[01:30:05] jesterfraud: has joined #ruby
[01:31:35] postmodern: refresh my memory, how do you yield and capture output in plain Erb?
[01:32:02] bronson: has joined #ruby
[01:37:08] kephra: has left #ruby: ("Leaving")
[01:37:48] crazydiamond: has joined #ruby
[01:38:39] sarkyniin: has joined #ruby
[01:39:53] chipotle: has joined #ruby
[01:40:40] blue_deref: has joined #ruby
[01:45:06] war_pigs: has joined #ruby
[01:47:32] bruno-: has joined #ruby
[01:48:27] dgutierrez1287: has joined #ruby
[01:49:28] war_pigs: has joined #ruby
[01:50:20] adamski2600: has joined #ruby
[01:51:52] war_pigs: has joined #ruby
[01:53:09] balazs: has joined #ruby
[01:54:17] war_pigs: has joined #ruby
[01:56:17] war_pigs: has joined #ruby
[01:58:30] war_pigs: has joined #ruby
[01:58:31] mfranzwa: has joined #ruby
[01:58:43] vyorkin3: has joined #ruby
[02:00:08] speaking1ode: has joined #ruby
[02:01:22] war_pigs: has joined #ruby
[02:02:29] Rollabunna: has joined #ruby
[02:03:00] hotpancakes: has joined #ruby
[02:03:19] renderful: has joined #ruby
[02:03:53] war_pigs: has joined #ruby
[02:06:18] serivich: has joined #ruby
[02:06:20] davedev24_: has joined #ruby
[02:07:18] speaking1ode: has joined #ruby
[02:07:47] luriv_: has joined #ruby
[02:11:14] JDiPierro: has joined #ruby
[02:13:11] xxneolithicxx: has joined #ruby
[02:13:55] _whitelogger: has joined #ruby
[02:14:11] drPoggs: has joined #ruby
[02:14:50] sarkyniin: has joined #ruby
[02:14:54] [k-: has joined #ruby
[02:15:15] elektronaut: has joined #ruby
[02:16:09] sharpmachine: has joined #ruby
[02:16:36] crdpink: has joined #ruby
[02:18:10] chouhoulis: has joined #ruby
[02:20:20] dgutierrez1287: has joined #ruby
[02:31:55] psye: has joined #ruby
[02:33:57] kies^: has joined #ruby
[02:34:37] lessless: has joined #ruby
[02:35:33] workmad3: has joined #ruby
[02:36:56] arescorpio: has joined #ruby
[02:39:00] kjones_: has joined #ruby
[02:39:51] TimeTime: has joined #ruby
[02:42:48] TimeTime: DO YOU KNOW WHAT YOUR DOMAIN NAME IS WORTH??? -> VALUE YOUR DOMAIN @ >>> WWW.VALBOT.COM <<< OR GOOGLE >>> VALBOT.COM <<<
[02:47:46] bronson: has joined #ruby
[02:50:16] _blizzy_: has joined #ruby
[02:54:38] nobitanobi: has joined #ruby
[02:54:41] Musashi007: has joined #ruby
[02:54:44] sarkyniin: has joined #ruby
[02:56:57] Rollabunna: has joined #ruby
[02:57:04] xcesariox: has joined #ruby
[02:57:29] eggoez: has joined #ruby
[02:57:37] CloCkWeRX: has joined #ruby
[02:58:24] penzur: has joined #ruby
[02:59:41] flaf: has joined #ruby
[03:00:33] jamesaxl|2: has joined #ruby
[03:02:05] kjones_: has joined #ruby
[03:02:44] flaf: Hi, I have a question about 'ipaddr' lib. With a = IPAddr.new('172.31.0.1/16') I have this object #<IPAddr: IPv4:172.31.0.0/255.255.0.0>. b = a.succ is a different object => #<IPAddr: IPv4:172.31.0.1/255.255.0.0>. Is it possible to instance b = a.succ directly ?
[03:03:05] drewvanstone: has joined #ruby
[03:04:41] mdz: has joined #ruby
[03:05:15] mdz: has left #ruby: ()
[03:05:57] flaf: Maybe it will be clearer with this paste => http://paste.alacon.org/37768
[03:06:12] devdazed: has joined #ruby
[03:08:03] flaf: In fact, from a CIDR string, I would like to get netmask and broadcast without know it the address is ipV4 or V6.
[03:09:35] xxneolithicxx: has joined #ruby
[03:10:39] flaf: *if the address...
[03:11:23] braincrash: has joined #ruby
[03:11:42] [k-: IPAddr.new("172.31.0.1") => #<IPAddr: IPv4:172.31.0.1/255.255.255.255>
[03:12:09] [k-: I'm not sure about the 2nd part of your question though
[03:12:54] darkf: has joined #ruby
[03:12:54] flaf: [k-: IPAddr.new("172.31.0.1") is different of my "b" object in my example.
[03:13:10] flaf: (netmask is different)
[03:13:59] penzurx: has joined #ruby
[03:14:55] [k-: maybe IPAddr.new('172.31.0.1/16').succ will do?
[03:15:14] war_pigs: has joined #ruby
[03:15:27] flaf: [k-: no unfortunately
[03:15:44] radialneon: has joined #ruby
[03:15:45] flaf: irb(main):007:0> IPAddr.new('172.31.0.1/16')
[03:15:48] flaf: => #<IPAddr: IPv4:172.31.0.0/255.255.0.0>
[03:16:51] sharpmachine: has joined #ruby
[03:17:12] kkeuning: has joined #ruby
[03:17:53] [k-: I have no idea then :(
[03:18:29] nobitanobi: has joined #ruby
[03:19:13] flaf: [k-: in fact, you are right for IPAddr.new('172.31.0.1/16').succ, but in fact I would like to create instances like #<IPAddr: IPv4:172.31.100.12/255.255.0.0> etc.
[03:19:30] war_pigs: has joined #ruby
[03:19:42] flaf: And with the `.succ` method, it could be long. :)
[03:20:22] flaf: but the `.succ` method is the only way I have found to instance this kind of object.
[03:21:06] ivanskie: has joined #ruby
[03:21:29] [k-: 12.times.to_a.reduce(IPAddr
[03:22:19] war_pigs: has joined #ruby
[03:22:44] flaf: I think I have missed something very simple, but I can't find.
[03:22:53] brain_shim: has joined #ruby
[03:23:29] bosma: has joined #ruby
[03:24:44] hotpancakes: has joined #ruby
[03:25:25] kjones_: has joined #ruby
[03:25:54] war_pigs: has joined #ruby
[03:28:54] war_pigs: has joined #ruby
[03:32:14] war_pigs: has joined #ruby
[03:34:59] genpaku: has joined #ruby
[03:40:22] kjones_: has joined #ruby
[03:40:30] radialneon: has joined #ruby
[03:41:44] xxneolithicxx: has joined #ruby
[03:42:16] j4cknewt: has joined #ruby
[03:42:25] Feyn: has joined #ruby
[03:43:35] gix: has joined #ruby
[03:44:16] penzur: has joined #ruby
[03:46:32] revath: has joined #ruby
[03:51:06] Rollabunna: has joined #ruby
[03:52:04] hotpancakes: has joined #ruby
[03:57:05] tkuchiki: has joined #ruby
[03:58:31] yh: has joined #ruby
[04:00:20] charliesome: has joined #ruby
[04:02:20] senayar: has joined #ruby
[04:04:11] bb010g: has joined #ruby
[04:14:43] tkuchiki: has joined #ruby
[04:17:14] platosha: has joined #ruby
[04:17:32] eGGshke: has joined #ruby
[04:17:41] sharpmachine: has joined #ruby
[04:24:05] Oog: has joined #ruby
[04:24:17] workmad3: has joined #ruby
[04:32:57] bronson: has joined #ruby
[04:35:13] balazs: has joined #ruby
[04:36:04] baweaver: has joined #ruby
[04:36:35] allomov: has joined #ruby
[04:37:17] babykosh: has joined #ruby
[04:37:32] houhoulis: has joined #ruby
[04:38:26] GitGud: has joined #ruby
[04:38:32] icebourg: has joined #ruby
[04:38:53] chinmay_dd: has joined #ruby
[04:38:59] tkuchiki: has joined #ruby
[04:41:16] serivich: has joined #ruby
[04:41:22] tkuchiki: has joined #ruby
[04:45:25] Rollabunna: has joined #ruby
[04:49:36] tkuchiki: has joined #ruby
[04:52:24] jbw_: has joined #ruby
[04:53:36] Musashi007: has joined #ruby
[05:00:37] acke: has joined #ruby
[05:03:57] CloCkWeRX: has joined #ruby
[05:04:07] SpikeMaster: has joined #ruby
[05:04:27] SpikeMaster: has left #ruby: ()
[05:06:11] jbwiv: has joined #ruby
[05:13:17] mleung: has joined #ruby
[05:16:46] devbug: has joined #ruby
[05:18:31] sharpmachine: has joined #ruby
[05:19:35] riotjones: has joined #ruby
[05:20:36] BillSussman: has joined #ruby
[05:21:07] Spami: has joined #ruby
[05:23:18] eGGshke: has joined #ruby
[05:24:00] j4cknewt: has joined #ruby
[05:25:18] davedev24_: has joined #ruby
[05:26:25] solocshaw: has joined #ruby
[05:26:45] Hanmac: has joined #ruby
[05:27:20] tkuchiki: has joined #ruby
[05:27:59] nofxx: flaf, when you use a netmask it;s no longer a IP, it's a subnet
[05:28:31] nofxx: check out IPAddr.new x vs same with netmask
[05:29:37] flaf: nofxx: but how can I instance this object #<IPAddr: IPv4:172.31.100.12/255.255.0.0> ?
[05:30:17] flaf: (except with IPAddr.new('172.31.0.1/16').succ.succ....[snip]...succ)
[05:30:35] araujo_: has joined #ruby
[05:30:52] yh: has joined #ruby
[05:31:53] nofxx: flaf, why do you need the netmask?
[05:32:47] flaf: It's a little dev in a personal puppet module.
[05:36:43] Soda: has joined #ruby
[05:38:04] flaf: If I take this o = IPAddr.new('172.31.0.0/16').succ, it seems to be an IP in a subnet, not a subnet (o.to_s give me => '172.31.0.1' not '172.31.0.0')
[05:39:34] tkuchiki: has joined #ruby
[05:39:37] railsraider: has joined #ruby
[05:39:37] Rollabunna: has joined #ruby
[05:39:50] kies^: has joined #ruby
[05:46:23] byroniczero: has joined #ruby
[05:46:58] tlolczyk: has joined #ruby
[05:48:26] tlolczyk: According to the pry docs, typing next will cause the debugger to step to the next line. But I keep getting "can't escape from eval with next".
[05:52:50] sevenseacat: has joined #ruby
[05:54:03] baweaver: http://baweaver.com/blog/2015/07/04/the-clairvoyant-project/ - New article out on what madness I'm planning with Clairvoyant
[05:59:03] kotk: has joined #ruby
[06:00:53] araujo: has joined #ruby
[06:01:13] tkuchiki: has joined #ruby
[06:01:22] alexa_: has joined #ruby
[06:02:10] alexa_: Hey guys, I just noticed a few places saying rbenv is recommended over rvm. Any particular reasoning? I ask because I'm used to rvm but would consider switching
[06:03:17] araujo: has joined #ruby
[06:03:50] tkuchiki: has joined #ruby
[06:06:24] bl4ckdu5t: has joined #ruby
[06:13:04] workmad3: has joined #ruby
[06:13:55] postmodern: alexa_, mostly that RVM is big and being replaced by RVM2
[06:14:03] postmodern: alexa_, there's also chruby+ruby-install
[06:14:22] sevenseacat: an unbiased +1 for chruby/ruby-install ;)
[06:14:24] postmodern: alexa_, if RVM is still working for you, keep using it
[06:15:19] postmodern: sevenseacat, not that i'd know anything about this chruby thing http://gifrific.com/wp-content/uploads/2012/07/homer-plays-with-mustache-simpsons.gif
[06:16:30] Rollabunna: has joined #ruby
[06:18:03] tkuchiki: has joined #ruby
[06:19:11] sharpmachine: has joined #ruby
[06:22:42] elektronaut: has joined #ruby
[06:23:01] drPoggs: has joined #ruby
[06:23:34] _whitelogger: has joined #ruby
[06:24:13] Ox0dea: has joined #ruby
[06:26:53] Ox0dea: What's going on here? https://gist.github.com/0x0dea/951145cfe4b402a2fb9d
[06:27:10] railsraider: has joined #ruby
[06:27:10] Ox0dea: Is there really no way to capture missing constants at the top level other than defining Object.const_missing? :/
[06:27:48] lxsameer: has joined #ruby
[06:27:58] tvw: has joined #ruby
[06:28:53] Musashi007: has joined #ruby
[06:31:40] sphex: Ox0dea: hrm. I think I sort of see why this is a problem; constants are lexically bound aren't they? so FOO is is looked up in the top-level environment. I would assume that const_missing is only used when explicitly accessing a module/class' scope with "::"... but it's the first time I hear about this method.
[06:32:45] krz: has joined #ruby
[06:33:43] Ox0dea: sphex: That would certainly explain it, and it does make some sense, but it's a regrettable shortcoming nonetheless.
[06:33:47] baweaver: has joined #ruby
[06:33:53] bronson: has joined #ruby
[06:34:07] yh: has joined #ruby
[06:36:54] sphex: Ox0dea: I'd say that's usually the right thing for blocks in general. but I see how it could be limiting when making DSLs and stuff. passing a string to instance_eval prolly does it differently?
[06:37:50] keen__________12: has joined #ruby
[06:38:56] Ox0dea: sphex: Indeed it does, but that'll of course defeat the point for this particular use case.
[06:42:27] hotpancakes: has joined #ruby
[06:42:38] Ox0dea: https://gist.github.com/0x0dea/34fd31966fb13773e46d
[06:42:54] Ox0dea: That seems like it ought to work, and that it doesn't feels like a bug to me.
[06:43:26] yh: has joined #ruby
[06:43:43] Ox0dea: baweaver: I wonder whether RubyVM::InstructionSequence.of might play some advantageous role in making Clairvoyant live up to her name.
[06:43:55] sphex: ooh fancy
[06:44:07] baweaver: I'll have to poke that
[06:44:42] baweaver: Right now the next two tasks are learning enough Prolog to be dangerous and a bit on Lexers and autonamas
[06:44:52] baweaver: (probably butchered that spelling)
[06:45:55] sphex: eh. maybe the constants have already been resolved (during compilation) by the time "using" is executed? maybe const_missing is only for "::" lookups?
[06:46:13] jbw_: has joined #ruby
[06:46:26] sphex: since "using" is given a value, I'm guessing its effects are at run-time
[06:46:54] sphex: oh wait.. unless it only accepts constants. then it could be lexical I guess.
[06:47:02] Ox0dea: sphex: Well, but defining const_missing on Object's singleton class does provide the desired behavior.
[06:47:13] Ox0dea: It just doesn't work inside a refinement for some reason.
[06:48:54] vikaton: has joined #ruby
[06:49:00] Ox0dea: baweaver: I suspect applying the principles of logic programming to Ruby, perhaps the most dynamic language ever, is going to be heaps of fun.
[06:49:12] baweaver: it's already been done
[06:49:19] baweaver: and Lisp is far more so
[06:49:47] eGGshke: has joined #ruby
[06:50:08] bruno-: has joined #ruby
[06:50:21] Ox0dea: Well, I meant more for your use case of determining how to build a method which meets some constraints.
[06:50:34] Ox0dea: There are just so many different directions from which those constraints can come in Ruby code.
[06:50:46] ledestin: has joined #ruby
[06:50:54] baweaver: which is why I have a spark cluster eating ruby projects
[06:51:16] baweaver: If I can't guess what it should look like I steal ideas
[06:51:25] baweaver: that's the Machine Learning part, and dang hard
[06:51:28] baweaver: mostly above my head
[06:51:33] baweaver: though that's what makes it so fun.
[06:51:43] Ox0dea: I suppose you could take the stacksort approach. :)
[06:51:56] baweaver: I'm training it on good repos rspec vs implementation
[06:52:02] jbwiv: has joined #ruby
[06:52:52] Ox0dea: The input being S-expressions?
[06:53:18] baweaver: zenspider: I'm going to make use of some of your work on that
[06:53:35] baweaver: the ruby builtin is a bit unwieldy honestly.
[06:54:09] sulky: has joined #ruby
[06:55:08] sphex: maybe const_missing only happens when lexical lookup failed for the module that was current at the time the block was compiled (or the LHS of "::"). this really confusing... lexical lookups could happen at parse/compile-time, but const_missing happens at run-time.
[06:55:38] jesterfraud: has joined #ruby
[06:55:41] sphex: wait no.. then refining/using should just work :/
[06:56:16] cschneid: has joined #ruby
[06:56:22] Ox0dea: sphex: `def Object.const_missing...` can appear anywhere, after which it will receive all unresolved constants that aren't picked up by a more specific module. :/
[06:57:50] Ox0dea: >> foo = -> { FOO }; def Object.const_missing(c) 42 end; foo[]
[06:57:51] ruboto: Ox0dea # => 42 (https://eval.in/392672)
[06:58:16] sphex: but which module does it ask specifically? what if you added some debug prints that would identify the module? (I'm not sure how to do that... :/)
[06:59:03] Ox0dea: sphex: Constant resolution is pretty much the same as method resolution; it just walks up the ancestor chain until it finds out, or else bails with the relevant _missing hook.
[06:59:19] Ox0dea: s/out/it (the constant)/
[06:59:56] Ox0dea: baweaver: You're probably going to end up learning a lot about strength reduction for this project. :)
[07:00:09] baweaver: strength reduction?
[07:00:18] Ox0dea: Turning complex expressions into their simpler forms.
[07:00:29] Ox0dea: To better infer relationships between specs and implementations.
[07:00:39] baweaver: any suggested reading there?
[07:00:54] baweaver: Already going to go back over Understanding Computation
[07:00:59] Ox0dea: Well, the Dragon Book comes to mind, but that's probably overkill.
[07:01:25] acke: has joined #ruby
[07:01:41] hotpancakes: has joined #ruby
[07:01:49] Ox0dea: Fun fact: Tom Stuart finally joined the issue tracker the other day to voice his support of Proc#compose.
[07:02:00] Ox0dea: Well, "Callable"#compose, really.
[07:02:29] baweaver: Ox0dea: I guess you could say
[07:02:33] baweaver: there be dragons there
[07:02:53] baweaver: ACTION knows _of_ the dragon book
[07:03:12] sevenseacat: I've read the dragon book
[07:03:16] Ox0dea: ACTION has a mostly untouched copy. :/
[07:03:28] baweaver: http://www.amazon.com/gp/product/0321486811/ - this one right?
[07:03:30] roolo: has joined #ruby
[07:03:40] Ox0dea: That be the one.
[07:04:06] Ox0dea: Aho is the A in AWK, incidentally.
[07:04:08] sevenseacat: I have the older version
[07:04:18] yardenbar: has joined #ruby
[07:04:48] Ox0dea: sevenseacat: Worked with LLVM any?
[07:04:56] rht: has joined #ruby
[07:05:01] sevenseacat: the book was a uni textbook :)
[07:05:21] DexterLB: has joined #ruby
[07:07:07] hotpancakes: has joined #ruby
[07:07:25] baweaver: My CS education was a bit lackluster
[07:07:40] baweaver: more engineered towards making cheap replicas of ideal workers for local companies.
[07:07:57] baweaver: hence me knowing RPG and COBOL
[07:07:59] sevenseacat: mine was all theory-based, and very little practical work.
[07:08:23] The_Phoenix: has joined #ruby
[07:08:44] adamski2600: has joined #ruby
[07:08:49] sevenseacat: though we did learn tools like gdb and cvs, which is apparently quite uncommon.
[07:09:18] jesterfraud: sevenseacat: we covered rcs for our version control, I believe
[07:09:24] baweaver: fair warning, I'll probably have a good deal of meta / compiler type questions later on
[07:09:27] jesterfraud: ridiculously antiquated
[07:09:36] sevenseacat: ouch. we did rcs first, then cvs
[07:10:05] sevenseacat: we spent more time trying to get the cvs repo up and running than we did actually using it
[07:10:57] Rollabunna: has joined #ruby
[07:11:03] baweaver: Ox0dea: under what context would I _need_ to read the Dragon book?
[07:11:36] baweaver: I should probably stop specifically name tagging those. Anyways
[07:11:44] niemcu: has joined #ruby
[07:11:44] tkuchiki: has joined #ruby
[07:13:04] intyl: has joined #ruby
[07:13:35] bronson: has joined #ruby
[07:14:26] dfockler: has joined #ruby
[07:14:57] peter_paule: has joined #ruby
[07:14:59] uptownhr: has joined #ruby
[07:17:28] The_Phoenix: has joined #ruby
[07:18:45] Ox0dea: baweaver: Well, I don't doubt it touches on strength reduction, but perhaps that's not the best description of what Clairvoyant will need to do. In the final analysis, you're going to need to figure out which methods called with which arguments on which objects produce the expected value, and doing that efficiently will come down to paring the solution space as much as possible.
[07:19:11] tmtwd: has joined #ruby
[07:20:04] Ox0dea: Given that there are infinitely many ways to arrive at the same result, you'll want to have some way of choosing the simplest one(s).
[07:20:43] vyorkin3: has joined #ruby
[07:21:16] baweaver: Probably the cheapest way is to standardize RSPEC
[07:21:51] baweaver: If I know I can put keywords in there it's a lot easier.
[07:22:34] Ox0dea: As you noted elsewhere, making people rewrite their specs kinda defeats the point.
[07:22:35] baweaver: The further out I go to generalizing the more Natural Language Comprehension I'll need
[07:23:19] baweaver: I could make a "Cold Reader" that asks leading questions
[07:23:53] [k-: 2 + 2 should equal 4. class Fixnum alias_method :old+, :+; def + other; return 4 if self == 2 && other == 2;end;end
[07:24:11] [k-: I forgot to call old+ but anyways
[07:24:20] Ox0dea: It's not even a legal method name, so it's okay.
[07:27:16] solocsha1: has joined #ruby
[07:29:07] valeriansaliou: has joined #ruby
[07:29:30] gianlucadv: has joined #ruby
[07:33:52] jesterfraud: has joined #ruby
[07:35:21] senayar: has joined #ruby
[07:35:22] riotjones: has joined #ruby
[07:36:55] gagrio_: has joined #ruby
[07:39:45] eGGshke: has joined #ruby
[07:39:59] platosha: has joined #ruby
[07:42:18] hotpancakes: has joined #ruby
[07:42:19] pengin: has joined #ruby
[07:51:00] abuzze: has joined #ruby
[07:52:14] ndrei: has joined #ruby
[07:52:46] Musashi007: has joined #ruby
[07:54:43] SCHAAP137: has joined #ruby
[07:58:02] sameerynho: has joined #ruby
[07:59:37] allomov: has joined #ruby
[08:00:44] daas: has joined #ruby
[08:01:49] workmad3: has joined #ruby
[08:02:49] hotpancakes: has joined #ruby
[08:03:06] daas: I'm relatively new to Ruby, I've thought about doing something like this as a first project: http://www.kershner.org/scrape
[08:03:30] daas: I've familiarized myself with basic Ruby syntax, but I have no idea where to start on making something like that
[08:05:04] Rollabunna: has joined #ruby
[08:06:02] daas: any pointers would be really helpful
[08:06:52] daas: I'm already familiar with HTML/CSS/JS, just not sure how to use API's with Reddit and creating a web app in general
[08:07:49] chinmay_dd: has joined #ruby
[08:08:38] [k-: 1. you need a http library (or you can write one yourself)
[08:08:39] Ox0dea: daas: You asked about this almost two weeks ago and haven't made any progress? :(
[08:09:12] [k-: shouldn't shevy be doing that ^
[08:09:32] daas: Ox0dea: Actually took a detour from it lol
[08:10:05] [k-: I read Ox0dea as shevy but realised it was Ox0dea...
[08:12:06] Jackneill: has joined #ruby
[08:13:14] Pupeno: has joined #ruby
[08:13:47] shevy: look at his sentences
[08:13:55] shevy: he properly uses a '.' to terminate
[08:14:02] shevy: look at my sentences
[08:14:05] shevy: free chaos, no grammar
[08:14:29] [k-: if I looked at that minor a detail I would go crazy
[08:14:29] bronson: has joined #ruby
[08:14:40] [k-: I don't like semicolons, though
[08:15:11] workmad3: has joined #ruby
[08:15:32] TheHodge: has joined #ruby
[08:17:22] Ox0dea: Complex language is the only thing that truly distinguishes our species from the lower animals; I try not to forsake that gift by using it properly.
[08:18:00] [k-: oooooo buuuuuuurn
[08:19:34] acke: has joined #ruby
[08:21:35] shevy: see how long the sentences are, and they terminate properly [k-
[08:21:50] timonv: has joined #ruby
[08:21:51] shevy: that's true, animals don't have abstract
[08:22:00] shevy: through words
[08:23:18] Ox0dea: shevy: We are animals.
[08:23:46] [k-: dun dun dun
[08:24:04] Ox0dea: [k-: 3spooky5u?
[08:26:03] peter_paule: has joined #ruby
[08:26:12] [k-: what is a rimshot again
[08:26:17] [k-: is this appicable
[08:26:35] Ox0dea: It's a drum technique, but I'm not sure it applies here.
[08:27:42] Ox0dea: To be honest, I'm not sure how to interpret that "dun dun dun".
[08:27:42] abuzze: has joined #ruby
[08:28:33] shevy: rand(300) == 0 # means 1 in 300 chance to finish?
[08:29:03] Ox0dea: The Mersenne twister has its shortcomings, but yes.
[08:29:37] shevy: [k- lol with german translation, this comes up what a rimshot is supposed (?) to be: http://www.rewel.com/Bilder/MTB/MTB_01.gif
[08:29:55] shevy: Ox0dea you know that you sound like an oracle?
[08:30:10] Ox0dea: Capable of telling the future and such?
[08:30:13] lordkryss: has joined #ruby
[08:31:02] shevy: "Ox0dea, what will the weather be tomorrow." "Ox0dea: The weather dynamics fluctuate between the butterfly effect and mankind's attempt of self-destruction through climate change, but I sense slight rain"
[08:32:12] [k-: that sounds like Ox0dea alright
[08:32:43] shevy: yeah and mystic symbols that become working ruby code
[08:33:07] shevy: like those $____ -> ___ {} things
[08:33:14] [k-: I still don't know how that quick sort worked
[08:33:21] Ox0dea: shevy: You got all that from my reminding you that you're flesh and bone?
[08:33:36] shevy: I got it from long standing observations of patterns!
[08:33:48] Ox0dea: [k-: Hey, when did you discover it contains Quicksort?
[08:33:59] shevy: he googled it
[08:34:08] Ox0dea: Oh, never mind. I thought you were referring to the Quicksort implementation hidden inside the variadic anagram checker.
[08:36:19] [k-: you said that it was a quicksort algorithm!
[08:36:25] senayar: has joined #ruby
[08:36:30] spider-mario: has joined #ruby
[08:37:08] shevy: >> "Ox0dea".tr('x','r').tr('d','c').tr('e','l').tr('a','e').tr('0','a')
[08:37:09] ruboto: shevy # => "Oracle" (https://eval.in/392696)
[08:37:15] shevy: omg look [k- the nick is a dead giveaway!
[08:37:18] acke: has joined #ruby
[08:37:45] shevy: I am stuck rewriting old boring code; IRC is more fun
[08:39:00] lkba_: has joined #ruby
[08:39:55] [k-: >> "Ox0dea".tr "xdea0", "rclea"
[08:39:57] ruboto: [k- # => "Oracle" (https://eval.in/392697)
[08:40:14] intinig: has joined #ruby
[08:40:26] [k-: except that you changed his nick totally
[08:40:39] [k-: you obfuscated it so I wouldn't know!
[08:41:22] shevy: I give you a ruby award [k- the haskell has not yet ruined your ruby powers
[08:41:47] [k-: tr is basically much faster than using a key-value or an array
[08:41:51] [k-: strings FTW!
[08:41:56] solars: has joined #ruby
[08:42:11] CloCkWeRX: has joined #ruby
[08:43:22] [k-: >> "Ox0dea".gsub /[^O]+/, "racle"
[08:43:23] ruboto: [k- # => "Oracle" (https://eval.in/392700)
[08:43:31] yfeldblum: has joined #ruby
[08:43:33] [k-: is this shortet
[08:43:49] [k-: boo it's longer
[08:44:38] [k-: >> "Ox0dea".new("Oracle")
[08:44:39] ruboto: [k- # => undefined method `new' for "Ox0dea":String (NoMethodError) ...check link for more (https://eval.in/392703)
[08:45:01] Ox0dea: [k-: You wanted String#replace.
[08:45:30] Ox0dea: [k-: I've written up a demystification of the anagram checker, but I'm waiting for baweaver to concede defeat before posting it.
[08:46:04] shevy: that beaver is a winner
[08:46:18] [k-: anagrams are what again?
[08:46:55] Ox0dea: [k-: "Penis", "spine", and "pines" are all anagrams of each other.
[08:47:03] shevy: "An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase, using all the original letters exactly once"
[08:47:23] j4cknewt: has joined #ruby
[08:47:42] [k-: penis even
[08:47:48] Ox0dea: >> @_,$_,@__=->_,__{_==''?_:(__[_[$_-$_]]?_[$_-$_]:'')+@_[_[$_..-$_],__]},$$/$$,@__=->_{__,___=_[$_-$_],_[$_..-$_];_==''?_:@__[@_[___,->_{_<__}]]+__+@__[@_[___,->_{_>=__}]]};($__=->*_{__=@__[_[$.]];$*[$_-$_]==__ ?_:$*<<__;_[$.+=$_]?$__[*_]:!$*[$_]})['allergy', 'gallery', 'largely', 'regally']
[08:47:49] ruboto: Ox0dea # => true (https://eval.in/392704)
[08:48:10] Ox0dea: I found a few groups of five, but they contained some pretty obscure words, so I went with those four.
[08:48:11] [k-: oh gosh
[08:48:34] Ox0dea: >> @_,$_,@__=->_,__{_==''?_:(__[_[$_-$_]]?_[$_-$_]:'')+@_[_[$_..-$_],__]},$$/$$,@__=->_{__,___=_[$_-$_],_[$_..-$_];_==''?_:@__[@_[___,->_{_<__}]]+__+@__[@_[___,->_{_>=__}]]};($__=->*_{__=@__[_[$.]];$*[$_-$_]==__ ?_:$*<<__;_[$.+=$_]?$__[*_]:!$*[$_]})['penis', 'spine', 'pines', 'snipe']
[08:48:35] ruboto: Ox0dea # => true (https://eval.in/392705)
[08:49:07] [k-: demystify
[08:49:07] [k-: di????m??st??f????/
[08:49:08] [k-: make (a difficult subject) clearer and easier to understand.
[08:49:19] [k-: you aren't doing that!
[08:49:53] shevy: but what did you expect from an Oracle
[08:50:17] howdoi: has joined #ruby
[08:50:18] Ox0dea: Fine, fine: https://gist.github.com/0x0dea/4178cbfe1729e989e564
[08:50:55] bruno-: has joined #ruby
[08:51:14] sevenseacat: I love that you're using the term 'muggle' for the readable version :D
[08:51:45] Ox0dea: sevenseacat: baweaver's idea. :)
[08:52:01] arooni-mobile: has joined #ruby
[08:52:03] [k-: >> %w(cry yrc ycr).map(&:sort).tap { |o| o.all? { |p| p == o.first } }
[08:52:04] ruboto: [k- # => undefined method `sort' for "cry":String (NoMethodError) ...check link for more (https://eval.in/392706)
[08:52:11] Ox0dea: Feckin' pleb.
[08:53:25] duderonomy: has joined #ruby
[08:54:45] roolo: has joined #ruby
[08:55:04] Ox0dea: >> !%w(cry yrc ycr).uniq { |w| w.chars.sort }[1]
[08:55:05] ruboto: Ox0dea # => true (https://eval.in/392707)
[08:55:18] Ox0dea: That's pretty much the sane version of my crazy one.
[08:56:09] duderonomy: has joined #ruby
[08:56:11] Ox0dea: How people have conflated my shenanigans with golfing is beyond me.
[08:57:10] [k-: ooooooo
[08:57:26] adamski2600: has joined #ruby
[08:57:52] [k-: if it has 2 elements, then it's false
[08:58:08] [k-: if it has 1, it returns !nil
[08:58:46] Ox0dea: What would we do without nil, eh?
[08:59:21] Rollabunna: has joined #ruby
[09:00:45] Ox0dea: Somebody posted on /r/ruby the other day their ideas for "class composition". It's a pretty interesting idea, at least insofar as it would let us represent things like Maybe String pretty cleanly.
[09:01:44] [k-: modifying the kernel?
[09:02:12] Ox0dea: Not at all necessary.
[09:02:32] Ox0dea: class Class; def * other; magic goes here; end end
[09:02:35] Atlantean: has joined #ruby
[09:02:36] daas: has joined #ruby
[09:02:37] Atlantean: has left #ruby: ()
[09:02:41] acke: has joined #ruby
[09:03:10] Ox0dea: [k-: What would you say is None's "type"?
[09:03:29] [k-: you mean nothing?
[09:03:50] Ox0dea: It seems I do.
[09:03:58] [k-: NothingClass just like NilClass TrueClass FalseClass, etc
[09:04:53] Ox0dea: Well, I meant Haskell's Nothing, but Maybe a does make sense after giving it a bit of thought.
[09:05:08] [k-: Nothing.is_a? Maybe a should be true
[09:05:30] [k-: Nothing.is_a? Maybe is also true
[09:06:52] [k-: we should have #<Maybe:String @value="test"> or #<Maybe:Nothing>
[09:07:27] daas: [k-: You recommended me to get an HTTP library
[09:07:39] daas: I've started learning Sinatra, will I still need something else for HTTP?
[09:07:54] [k-: Sinatra != http library
[09:08:30] tbuehlmann: sinatra is indeed an HTTP library
[09:08:45] meph: has joined #ruby
[09:08:54] tbuehlmann: had this conversation often times, but you might ask konstantin about that :p
[09:11:11] lavros: has joined #ruby
[09:11:19] j4cknewt: has joined #ruby
[09:11:49] Ox0dea: tbuehlmann: Is it also an FTP library?
[09:11:52] [k-: fun fact: defining #call allows you to use .()
[09:11:59] Ox0dea: [k-: As well as #[].
[09:12:04] Ox0dea: Erm, maybe not.
[09:12:10] Ox0dea: Yeah, not.
[09:12:45] [k-: hue hue
[09:12:48] Ox0dea: On a related note, there are four ways to call Procs.
[09:12:59] Ox0dea: #call, #[], .(), and...
[09:13:28] Ox0dea: >> x { x * 2 } === 21
[09:13:29] ruboto: Ox0dea # => undefined method `x' for main:Object (NoMethodError) ...check link for more (https://eval.in/392715)
[09:13:35] Ox0dea: >> -> x { x * 2 } === 21
[09:13:36] [k-: >> (proc { :Hi })()
[09:13:36] ruboto: Ox0dea # => 42 (https://eval.in/392717)
[09:13:37] ruboto: [k- # => /tmp/execpad-f8e442c0393f/source-f8e442c0393f:2: syntax error, unexpected '(', expecting keyword_end ...check link for more (https://eval.in/392717)
[09:13:51] [k-: it worked for literal lambdas
[09:14:21] ljarvis: ACTION would prefer first-class funcs and enforced parenthesis 
[09:14:35] shevy: enforced lisps
[09:14:41] [k-: he is looking at you, Ox0dea
[09:14:53] shevy: Ox0dea uses lots of parens
[09:15:03] shevy: well perhaps not
[09:15:06] [k-: not with the literal lambda syntax
[09:15:18] shevy: {_==''?_:(__[_[$_-$_]]?_[$_-$_]:'')
[09:15:19] [k-: he just drops it like nobody's business!
[09:15:21] shevy: I sense one lisp!
[09:15:39] [k-: that's not a lisp
[09:15:44] [k-: it is ? :
[09:15:46] shevy: it's one layer of (lisp)
[09:15:46] ljarvis: in a new language I'm working on, *every* object is "callable"
[09:15:50] [k-: so Ruby doesn't get confised
[09:15:57] Ox0dea: ljarvis: What can I call 4 with?
[09:16:08] shevy: yeah ruby does not get confised a lot but [k- does
[09:16:12] ljarvis: Ox0dea: no args, 4() == 4
[09:16:20] [k-: Ruby does get confused a lot!
[09:16:34] DLSteve: has joined #ruby
[09:16:34] shevy: you would too if you'd be run by such a long grammar rule
[09:16:34] [k-: ljarvis you mean, like Scala?
[09:16:37] Ox0dea: ljarvis: Hashes are functions of their keys, presumably?
[09:16:37] ljarvis: Ox0dea: although as a side-effect, 4(+, 4) would work
[09:16:47] ljarvis: [k-: not exactly
[09:17:06] Ox0dea: Clojure gets "callable" right, I think.
[09:17:10] [k-: operators are not special, yay
[09:17:23] ljarvis: Ox0dea: pretty much, currently
[09:17:24] Ox0dea: Hashes are functions of their keys, keys are functions "into" hashes.
[09:17:38] eGGshke: has joined #ruby
[09:17:44] [k-: >> (-> { 42 })()
[09:17:45] ruboto: [k- # => /tmp/execpad-0ee5477ff935/source-0ee5477ff935:2: syntax error, unexpected '(', expecting keyword_end ...check link for more (https://eval.in/392718)
[09:18:05] Ox0dea: [k-: What are you even?
[09:18:15] ljarvis: foo = SomeObj.new; foo() == foo # true or define #call and it'll override it
[09:18:21] [k-: >> a = -> { 42 }; a()
[09:18:22] ruboto: [k- # => undefined method `a' for main:Object (NoMethodError) ...check link for more (https://eval.in/392719)
[09:18:34] ljarvis: [k-: seriously, it doesn't work
[09:18:38] [k-: ?experiment [k-
[09:18:38] ruboto: [k-, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
[09:18:51] [k-: I swear it did!
[09:19:00] Ox0dea: You just didn't notice the period.
[09:19:14] Ox0dea: I don't even know why that's a feature.
[09:19:21] pgatt: has joined #ruby
[09:19:43] Ox0dea: It's almost like it's trying to cover over the lack of first-class functions.
[09:19:51] ljarvis: heh pretty much
[09:20:00] [k-: at least they tried
[09:21:23] alex88: has joined #ruby
[09:21:36] sharpmachine: has joined #ruby
[09:22:09] hotpancakes: has joined #ruby
[09:22:44] ljarvis: it shouldn't have been added imo, but go figure. I'd like a Ruby with first-class functions. Though I know a lot of people love not having to add parens to method calls
[09:23:16] vdamewood: has joined #ruby
[09:23:23] Ox0dea: I'd like a Ruby with awesome destructuring for more than just Arrays.
[09:23:27] Ox0dea: >> _,(_,_,((_,(foo,_)),_)) = [1, [2, [3, 4], [[5, [:target], 6], [7], 8, [9], 10]]]; foo
[09:23:28] ruboto: Ox0dea # => :target (https://eval.in/392720)
[09:23:52] ljarvis: elixir/erlang gets this right imo
[09:23:59] ljarvis: right for me, anyway
[09:24:04] sphex: ljarvis: as it is, you can have variables with the same name as methods, and they are syntactically distinguishable. calling variables with just parentheses would be ambiguous.
[09:24:08] ljarvis: where = isn't an assignment orderator
[09:24:37] [k-: ljarvis = sandwich pls
[09:24:38] Ox0dea: Do E/E add anything to Haskell's destructuring semantics?
[09:24:46] sphex: I'd like Ruby to have real multiple return values, and make flat_map unnecessary with it :/
[09:25:26] [k-: it combines them into an array and you can destructure it
[09:25:28] ljarvis: Ox0dea: I haven't dived deep enough to know that yet. Started on Elixir yesterday and never got into Erlang because the syntax makes me want to rip my face off
[09:25:29] Ox0dea: sphex: In light of parallel assignment, what's the practical difference?
[09:27:22] ljarvis: Elixir is probably the most exciting language for me since Ruby. I love some other languages but I'm rarely excited to use them. Then again I've spent like 2 hours with Elixir so maybe that's premature
[09:27:50] [k-: data Person = Person String Int String String String String String String String
[09:27:55] shevy: sevenseacat is a cat that drinks elixir
[09:28:16] CloCkWeRX: has joined #ruby
[09:28:25] norc_: has joined #ruby
[09:28:33] [k-: f (Person name _ _ _ _ _ _ _ _ _ _ _) = name
[09:28:43] Ox0dea: Looks totally idiomatic!
[09:28:56] norc_: Right channel now. So - I would like to do private inheritance (create a custom class that dervies from Array) without exposing the Array functionality to the outside.
[09:28:59] norc_: Is that possible?
[09:29:21] ljarvis: norc_: you should just encapsulate an internal array
[09:29:23] jbw_: has joined #ruby
[09:29:45] norc_: ljarvis: Yeah but I dont want to specify the extra sender object every time :D
[09:30:11] [k-: private(*[Array.instance_methods - Object.instance_methods])
[09:30:13] ljarvis: norc_: what do you mean?
[09:30:23] shevy: you can use .send still or?
[09:30:24] ljarvis: norc_: you want to expose some methods?
[09:30:45] norc_: ljarvis: Yeah.
[09:30:49] ljarvis: norc_: you could use Delegator
[09:31:01] [k-: wait, that should be () in place of []
[09:31:11] ljarvis: but you mentioned "without exposing the Array functionality to the outside" so that confuses me a bit
[09:31:12] Ox0dea: [k-: Or you could put the * inside the [].
[09:31:40] [k-: does that splat
[09:31:53] ljarvis: >> [*1..10]
[09:31:54] ruboto: ljarvis # => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] (https://eval.in/392721)
[09:31:54] Ox0dea: Well, it splats Ranges, but maybe not subtraction.
[09:32:16] ljarvis: prob need another ()
[09:32:17] norc_: ljarvis: That was phrased a bit badly I admit. Basically I want to enforce using my own methods that can manipulate the array.
[09:32:35] Ox0dea: ljarvis: Nope.
[09:32:37] [k-: I mean, pass multiple arguments without array
[09:32:37] ljarvis: norc_: in which case you could have to write your own methods anyway
[09:32:42] ljarvis: Ox0dea: heh, go figure
[09:32:43] norc_: ljarvis: Now I know I can just redefine them.
[09:32:43] Ox0dea: >> x = [1, 2, 3]; y = [1]; [*x - y]
[09:32:44] ruboto: Ox0dea # => [2, 3] (https://eval.in/392722)
[09:32:48] Ox0dea: Ruby so cray.
[09:33:04] ljarvis: norc_: could you provide an example?
[09:33:06] norc_: ljarvis: It just made me think whether it was possible in general to get the same inheritance behavior, that they get declared as private by default.
[09:33:27] Ox0dea: [k-: Heh, the brackets aren't even necessary.
[09:33:47] ljarvis: norc_: yeah that doesn't exist via inheritance
[09:34:00] Ox0dea: >> def foo a, b; a + b end; a = [1, 2, 3]; b = [1]; foo(*a - b)
[09:34:01] ruboto: Ox0dea # => 5 (https://eval.in/392723)
[09:34:10] ljarvis: cray cray cray
[09:34:25] ljarvis: parse.y. not even once.
[09:34:55] chinmay_dd: has joined #ruby
[09:35:06] Ox0dea: I've tried twice now to get everything straight to add %d(1 2 3), but there's just so much going on in there.
[09:35:25] [k-: >> class Array;private *(Array.instance_methods - Object.instance_methods) end; [].new.each {}
[09:35:26] ruboto: [k- # => undefined method `new' for []:Array (NoMethodError) ...check link for more (https://eval.in/392724)
[09:35:40] ljarvis: Ox0dea: check out the commit where aaron (I think) adds %I -- I remember it being quite succinct
[09:36:25] norc_: ljarvis: Oh boy. Look at what I found: https://github.com/objects-on-rails/fig-leaf/blob/master/lib/fig_leaf.rb
[09:36:30] towski_: has joined #ruby
[09:37:16] [k-: >> class Array;private *(Array.instance_methods - Object.instance_methods) end; [].each {}
[09:37:17] ruboto: [k- # => private method `each' called for []:Array (NoMethodError) ...check link for more (https://eval.in/392725)
[09:38:02] CloCkWeRX: has left #ruby: ()
[09:38:04] Ox0dea: norc_: Are you sure it wouldn't be wiser to delegate?
[09:38:24] ljarvis: [k-: instance_methods(false) removes superclass methods
[09:38:35] [k-: it's basically what I done, but with more functionality!
[09:38:55] [k-: cool, ljarvis
[09:38:59] norc_: Ox0dea: Delegation is a bit cumbersome if you have a lot of methods.
[09:39:05] ljarvis: although it doesn't do exactly what yours does
[09:39:08] ljarvis: norc_: huh, how?
[09:39:18] Miron: has joined #ruby
[09:39:19] ljarvis: you don't have to write the methods
[09:40:19] [k-: method_missing => delegate
[09:41:01] norc_: And that is what private inheritance tries to avoid in the first place.
[09:41:13] ljarvis: you don't need to mess with method_missing
[09:41:37] norc_: ljarvis: For a second I was thinking "that is a bold thing to say in #RubyOnRails" until I realized it was a different channel. Heh.
[09:41:49] [k-: but Rails does it *all* the time
[09:42:19] Jackneill: has joined #ruby
[09:42:45] daas: is there a channel for sinatra
[09:42:53] [k-: Ruby provides hooks on method added deleted and whatnot
[09:43:07] [k-: you could call private immediately using those hooks
[09:43:11] ljarvis: daas: did you try #sinatra?
[09:43:26] daas: i was worried about joining a Frank Sinatra fan chat
[09:43:39] ljarvis: aha, why worried? that might be fun
[09:43:41] norc_: [k-: Well either way. The gem I found up there seems to accomplish private inheritance.
[09:43:54] norc_: daas: If you are worried about that, you shouldnt be using Sinatra.
[09:44:21] daas: fair enough lol
[09:46:36] [k-: why do you want inheritance again
[09:47:22] Ox0dea: norc_: Could you explain why you're not just backing your thing with an Array under the hood?
[09:49:13] darkf_: has joined #ruby
[09:49:25] sdothum: has joined #ruby
[09:49:49] Tarkers34: has joined #ruby
[09:50:03] Ox0dea: ljarvis: Thoughts? https://gist.github.com/0x0dea/34fd31966fb13773e46d
[09:51:02] Ox0dea: I think it might be a bug.
[09:51:39] yfeldblum: has joined #ruby
[09:51:39] Ilyas: has joined #ruby
[09:51:39] bruno-: has joined #ruby
[09:52:52] norc_: Ox0dea: Because composition does not allow you to change the behavior of internal methods.
[09:53:14] towski__: has joined #ruby
[09:53:23] norc_: Ox0dea: If you inherit, you can do something along these lines: http://pastie.org/10273874
[09:53:42] Rollabunna: has joined #ruby
[09:54:18] edb__: has joined #ruby
[09:54:38] Ox0dea: That's not at all demonstrative of why you can't just use an internal array, but all right.
[09:55:12] jamesaxl: has joined #ruby
[09:55:20] norc_: Ox0dea: Overriding methods is not demonstrative of why inheritance can be useful?
[09:55:29] norc_: That is quite an interesting opinion.
[09:56:15] Ox0dea: norc_: Is your thing not sufficiently Array-like that you could define the methods you're overriding in terms of an underlying array?
[09:56:27] norc_: Ox0dea: Oh I think you misunderstood my example with the Array. I dont have the actual need to do private inheritance for the case with Array. It was just what got me thinking if you read back.
[09:56:42] norc_: So my question was in general, not specific to what Im doing with the Array.
[09:56:53] towski_: has joined #ruby
[09:57:14] norc_: Ox0dea: Not sure what you mean by that..
[09:57:26] ljarvis: Ox0dea: yeah seems weird to me
[09:57:46] Ox0dea: norc_: I'm sure your rationale is much easier to follow in light of being able to see the actual code, so I'll leave you to it.
[09:58:14] [k-: isn't the purpose of subclassing to augment
[09:58:18] dgutierrez1287: has joined #ruby
[09:58:30] mandarinkin: has joined #ruby
[09:58:35] shevy: isn't this the purpose of modules
[09:58:39] towski__: has joined #ruby
[09:59:23] Ox0dea: They're probably mathematically equivalent, in some sense.
[09:59:32] michael_mbp: has joined #ruby
[09:59:57] abuzze: has joined #ruby
[10:00:29] towski___: has joined #ruby
[10:01:23] norc_: I guess Array is actually a bad example since it is a built-in class.
[10:02:28] shevy: look how angry they got here when you said you wanna subclass Array
[10:02:35] [k-: is it time for ?fake?
[10:02:38] ruboto: Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
[10:02:49] shevy: what is fake code
[10:03:01] jesterfraud: shevy not real code
[10:03:04] [k-: maybe jhass would explain!
[10:03:05] shevy: my code is real!
[10:03:14] [k-: no its not
[10:03:18] [k-: if cake isn't real
[10:03:20] [k-: code isn't too!
[10:03:24] shevy: you can't have cake anymore [k-
[10:03:34] [k-: :( I never did
[10:03:56] shevy: hah... been a long time since I ate cake too, it's usually way too much sugar
[10:04:01] workmad3: has joined #ruby
[10:04:06] towski_: has joined #ruby
[10:04:51] shevy: now I shall find out when Hello World was first issued to the world
[10:04:57] mhib: has joined #ruby
[10:05:41] shevy: hmm... "Kernighan's 1972 A Tutorial Introduction to the Language B"
[10:05:45] Ox0dea: That's the one.
[10:06:02] towski_: has joined #ruby
[10:06:33] renderful: has joined #ruby
[10:06:44] Ox0dea: >> class Fixnum; def [] o; o[self] end end; foo = [1, 2, 3]; 1[foo]
[10:06:45] ruboto: Ox0dea # => 2 (https://eval.in/392731)
[10:06:48] Ox0dea: Just like C!
[10:06:55] peter_paule: has joined #ruby
[10:06:55] shevy: extrn a,b,c; putchar(a); putchar(b); putchar(c); putchar('!*n');
[10:06:57] shevy: B is strange
[10:07:00] [k-: disgusting
[10:07:23] shevy: good code is hard
[10:07:41] towski_: has joined #ruby
[10:07:52] [k-: hard code (as in solid code) is good
[10:08:36] jesterfraud: hard code (as in the Mohs scale) is a concern
[10:08:41] Ox0dea: Lisp is old as dirt and yet more powerful than anything we've devised since; I wish more people agreed that it's also beautiful, but alas.
[10:08:53] shevy: didn't lisp feature a hello world example?
[10:08:55] jesterfraud: if only they would lispen
[10:09:04] shevy: (hello (world))
[10:09:06] Ox0dea: shevy: That would require McCarty to have been a time traveller, no?
[10:09:10] Ox0dea: *McCarthy
[10:09:14] tkuchiki: has joined #ruby
[10:09:19] shevy: is that the father of the NSA
[10:09:27] [k-: oh gosh
[10:09:38] towski_: has joined #ruby
[10:09:43] lkba: has joined #ruby
[10:09:52] Ox0dea: I wonder if he's the father of the FSA.
[10:09:56] Ox0dea: Doubtful.
[10:09:58] shevy: there must be older examples of hello world than B
[10:09:58] lkba: has joined #ruby
[10:10:07] Ox0dea: shevy: Nope, it was Kernighan's idea.
[10:10:21] shevy: Ox0dea you weren't even born in 1972!!!
[10:10:28] Ox0dea: You're not wrong.
[10:10:29] arup_r: has joined #ruby
[10:10:37] Ox0dea: But there are people who were.
[10:10:50] sevenseacat: 1972 was a thing?
[10:10:58] [k-: people born in 1972 didn't know about hello world!
[10:11:11] shevy: [k- well perhaps if they would have known B
[10:11:17] towski_: has joined #ruby
[10:11:24] shevy: hacking back then must have been fun
[10:11:51] [k-: yes, searching the cables for bugs must be fun
[10:11:51] Ox0dea: shevy: Writing assembly really does have its charms.
[10:12:12] Outlastsheep: Or having one of your bloody punch-cards bent slightly.
[10:12:18] shevy: [k-, a short history of hacking http://www.onlinemba.com/images/hacking.jpg
[10:12:26] [k-: clojure or lisp
[10:12:45] Ox0dea: Clojure is a Lisp.
[10:13:15] towski_: has joined #ruby
[10:13:43] [k-: the lispers don't agree
[10:13:47] jesterfraud: I remember one of my CS lecturers talking about the sysadmins cutting the cable for the 'halt' command to stop people using it at the end of their script
[10:13:59] arup_r: currently I am making a url string by hand.. any way to build it dynamically, when I have an array ["https://", "example.com", "80", "context"]
[10:13:59] [k-: especially the common lisp people
[10:14:02] jesterfraud: because if they did that, you had to restart it manually
[10:14:23] shevy: good old days
[10:14:27] arup_r: I tried URI.join(*["https://", "example.com", "80", "context"]).to_s .. but it is giving something which I don't want
[10:14:54] adamski2600: has joined #ruby
[10:14:56] towski_: has joined #ruby
[10:15:04] arup_r: Am I blocked to send here in this channe any FQDN ?
[10:15:17] [k-: your array consists of port
[10:15:18] multi_io: has joined #ruby
[10:15:23] arup_r: Yes.. I know
[10:15:24] shevy: how should the final URL look like arup_r
[10:15:26] Ox0dea: [k-: What do they say makes Clojure a not-Lisp?
[10:15:26] bronson: has joined #ruby
[10:15:44] [k-: URI doesn't know that "80" is the port
[10:15:52] arup_r: shevy: 'https://example.com:447/context'
[10:15:54] [k-: so you are doing it wrong
[10:16:03] arup_r: I am currently making by hand
[10:16:06] shevy: arup_r I think you have to write a method that does that, with the entry at position [2] in your array, add a :
[10:16:35] [k-: Ox0dea I would recall if I cared :p
[10:16:37] arup_r: manual way I am doing ... just was checking if any inbuilt method is present in Ruby
[10:16:38] towski_: has joined #ruby
[10:16:50] Ox0dea: arup_r: Is the port going to be the only numeric part of the URL?
[10:16:52] shevy: don't think there is a method that checks for ports there :)
[10:17:19] arup_r: no.. that I don't know
[10:17:35] [k-: something about... zilch, I recall none of the arguments
[10:17:49] Ox0dea: arup_r: Is the domain name going to contain any digits?
[10:17:57] arup_r: it is like <protocol>//:<domain>:<port>/<context>
[10:18:10] Ox0dea: arup_r: That doesn't answer my question, though.
[10:18:24] arup_r: as of now domain name has only characters
[10:18:28] Ox0dea: If the port is going to be the first numeric part of the URL, you could do foo.join.sub(/\d+/, ':\1/')
[10:18:31] arup_r: Ox0dea: ^^
[10:18:35] towski_: has joined #ruby
[10:18:36] Ox0dea: arup_r: ^
[10:18:54] [k-: eww, disgusting
[10:19:03] Ox0dea: Better than mucking about with foo[2].
[10:19:16] workmad3: has joined #ruby
[10:19:34] railsraider_: has joined #ruby
[10:19:45] yfeldblum: has joined #ruby
[10:20:19] arup_r: I was doing "%{protocol}//:%{domain}:%{port}/%{context}" % hash_of_url_parts
[10:20:26] towski_: has joined #ruby
[10:20:29] Ox0dea: That's certainly more readable.
[10:20:39] Tarkers34: has joined #ruby
[10:20:41] Ox0dea: To some eyes, anyhow.
[10:20:48] [k-: or you could just have a hash { protocol: "http", domain: "example.com", port: "80"---
[10:20:56] arup_r: thing is I need to check the trailing/leading `/` which is annoying :/
[10:21:06] [k-: I was in the midst of typing that :(
[10:21:14] arup_r: [k-: yes that is what i am doing
[10:21:15] shevy: you are too slowy [k-
[10:21:29] [k-: I'm on mobile!
[10:21:37] arup_r: This checks I am talking about https://gist.github.com/aruprakshit/ba7b0eb50c4c1ff418f3#file-e24-php-L437
[10:21:50] [k-: you were the person who ewwed coding on mobile!
[10:22:05] arup_r: I though we have something like `File.join()` for `URI` also..
[10:22:06] towski_: has joined #ruby
[10:22:12] [k-: oh gosh, php
[10:22:18] [k-: you have ruined my eyes
[10:22:20] hotpancakes: has joined #ruby
[10:22:20] arup_r: but I think we have.. UIR.join don't understand port
[10:22:23] CloCkWeRX: has joined #ruby
[10:22:23] sharpmachine: has joined #ruby
[10:22:40] arup_r: [k-: Yes.. I am using my second eyes :)
[10:22:46] allomov: has joined #ruby
[10:22:49] [k-: it wasn't designed to handle ports :(
[10:22:57] arup_r: php code is horrible
[10:23:06] arup_r: humm,.. I see that
[10:23:21] bruno-: has joined #ruby
[10:23:25] woodennails: has joined #ruby
[10:23:44] arup_r: I checked Rails API also... as I am writing code for Rails only.. But didn't notice any method there too.. atleast I didn't find
[10:23:51] towski__: has joined #ruby
[10:23:57] shevy: arup_r did you finish porting the php code? :)
[10:24:00] [k-: http://ruby-doc.org/stdlib-2.2.0/libdoc/uri/rdoc/URI.html#method-c-parse
[10:24:05] arup_r: hahah 40%
[10:24:30] arup_r: my understanding of PhP is slowwwwwwww
[10:24:37] [k-: http://ruby-doc.org/stdlib-2.2.0/libdoc/uri/rdoc/URI.html#method-c-split
[10:24:45] arup_r: yes split does
[10:24:52] arup_r: but join don't :/
[10:25:51] towski__: has joined #ruby
[10:27:17] krz: has joined #ruby
[10:27:31] towski_: has joined #ruby
[10:28:13] arup_r: Rails have the reverse of what I want btw.. ;) http://api.rubyonrails.org/classes/ActionDispatch/Http/URL.html#method-i-host
[10:30:19] alex88: has joined #ruby
[10:31:07] towski_: has joined #ruby
[10:31:27] serivich: has joined #ruby
[10:32:21] Papierkorb: has joined #ruby
[10:33:05] stylus: has joined #ruby
[10:33:05] towski_: has joined #ruby
[10:34:26] oylm: has joined #ruby
[10:34:52] towski_: has joined #ruby
[10:34:55] [k-: if array use "%s://%s:%d/%s" % [v.shift, v.shift, v.shift, v.join ?/]
[10:34:58] vyorkin3: has joined #ruby
[10:35:21] [k-: that's worser than your hash
[10:35:28] shevy: disgusting
[10:35:36] shevy: <[k-> disgusting
[10:35:57] shevy: arup_r let [k- port the php code to ruby
[10:36:09] cpruitt: has joined #ruby
[10:36:10] shevy: distribute one-method (of php) per channel user
[10:36:17] [k-: Ox0dea will do a better job!
[10:36:29] Ox0dea: I've already suggested using a very simple substitution.
[10:36:39] towski_: has joined #ruby
[10:36:59] Ox0dea: If it's a Hash, foo.values.join.sub(/(\d+)/, ':\1/') is a nice, simple approach that doesn't require much thinking.
[10:37:05] [k-: well it was less terrible than mine
[10:37:08] bruno-: has joined #ruby
[10:37:09] DexterLB: has joined #ruby
[10:37:22] Miron: has joined #ruby
[10:38:04] shevy: how weird
[10:38:15] shevy: when [k-'s code becomes less readable than Ox0dea's code
[10:38:27] Ox0dea: What a time to be in #ruby!
[10:38:27] towski_: has joined #ruby
[10:38:42] [k-: isn't that Ox0dea's job as well? :o
[10:39:13] [k-: he even did $_ = $$ / $$ to get 1
[10:39:44] Ox0dea: >> ' '=~/$/
[10:39:45] ruboto: Ox0dea # => 1 (https://eval.in/392747)
[10:39:51] timonv: has joined #ruby
[10:39:53] [k-: next time you see $$/$$ you know it's 1
[10:40:25] [k-: >> '' =~ /^/
[10:40:26] ruboto: [k- # => 0 (https://eval.in/392748)
[10:40:36] Ox0dea: But 0 is useless for deriving other numbers.
[10:40:38] [k-: now, why doesn't that work
[10:40:47] tno: has joined #ruby
[10:40:50] [k-: I mean, for 1
[10:40:56] Ox0dea: Because the start of the string is at index 0.
[10:41:06] Muhannad: has joined #ruby
[10:41:19] shevy: you even analyze his code [k-
[10:41:32] Ox0dea: It's not like there's nothing to learn from it.
[10:41:36] [k-: that's the way to learn!
[10:41:52] Ox0dea: A lot of the tricks I'm using are quite useful when used without crazy variable names.
[10:41:54] towski_: has joined #ruby
[10:42:22] Ox0dea: [k-: String#=~ returns the index at which the regex matched.
[10:43:06] [k-: so if you have 2 spaces, it will be 2?
[10:43:17] Ox0dea: Ffor /$/, yes.
[10:43:28] Ox0dea: $ is the end-of-string anchor.
[10:43:40] [k-: he uses Array#* instead of Array#join ;-;
[10:43:44] arup_r: Ox0dea: I am not much good with with Regex.. so I went with Hash.. https://gist.github.com/aruprakshit/41e698c43a21e535a80e#file-e24_payment_pipe-rb-L90
[10:44:35] Abhijit: has joined #ruby
[10:44:36] Ox0dea: Whatever tickles your fancy.
[10:44:55] Abhijit: gem is independent of distro specific repos right? my gem cant find localtunnel in cestos7
[10:45:07] arup_r: Ox0dea: I just want my code work properly end of the day :)
[10:45:08] Abhijit: flask tutorial says to install gem install localtunnel
[10:45:26] towski_: has joined #ruby
[10:45:51] yaw: has joined #ruby
[10:46:07] Ox0dea: Abhijit: Flask is Python?
[10:46:29] Abhijit: I knew my question will go wrong.
[10:46:41] Ox0dea: The tutorial for a Python Web framework is telling you to install a gem?
[10:46:54] [k-: >> !%($).length * %w(:()
[10:46:55] ruboto: [k- # => /tmp/execpad-5a17447c2039/source-5a17447c2039:2: unterminated string meets end of file ...check link for more (https://eval.in/392749)
[10:47:14] towski_: has joined #ruby
[10:47:15] Abhijit: Ox0dea, so can you "imagine" what gem i am talking about?
[10:47:16] arup_r: shevy: pointer to build this part https://gist.github.com/aruprakshit/ba7b0eb50c4c1ff418f3#file-e24-php-L454-L473 what module of Ruby stdlib I should look into .. O God! :/
[10:47:54] Rollabunna: has joined #ruby
[10:48:00] Ox0dea: Abhijit: I suspect you are powerfully confused.
[10:48:12] Asher: has joined #ruby
[10:48:13] Abhijit: I am confident that you are 100% powerfully confused.
[10:48:24] Abhijit: Ox0dea, read the question properly.
[10:48:43] Ox0dea: Abhijit: Good luck installing a yanked gem, bud: https://rubygems.org/gems/localtunnel
[10:48:53] [k-: https://eval.in/392752
[10:49:03] towski_: has joined #ruby
[10:49:14] Abhijit: Ox0dea, so answer about that gem status inntead of talking about my confidence and knowledge.
[10:49:35] workmad3: has joined #ruby
[10:49:52] [k-: arup_r good luck getting anyone to willingly read php
[10:49:58] Ox0dea: Abhijit: Why on earth does your firewall block access to rubygems.org?
[10:50:30] Abhijit: Ox0dea, how on earth I would know this when using Centos 7 which is not built by me but community?
[10:50:57] Abhijit: and I never touched any firewall setting. how do you know this is a firewall causing issue?
[10:51:03] towski_: has joined #ruby
[10:51:05] [k-: https://eval.in/392755
[10:51:15] Abhijit: ERROR: Could not find a valid gem 'localtunnel' (>= 0) in any repository is the error I get. what firewall has to do with it?
[10:51:32] Ox0dea: Abhijit: The gem has been yanked; it cannot be installed by anybody anymore.
[10:51:59] Abhijit: thats fine. i came here to know that only. Thank you for that.
[10:52:32] Ox0dea: Abhijit: So, to be clear, you didn't know of the existence of rubygems.org prior to your joining the channel?
[10:52:48] towski_: has joined #ruby
[10:54:39] towski_: has joined #ruby
[10:56:18] towski_: has joined #ruby
[10:58:12] towski__: has joined #ruby
[10:59:13] shevy: arup_r omg that looks awful
[10:59:44] shevy: arup_r I think that is just a wrapper over curl; not sure what you need, either open-uri in ruby, or perhaps a gem that wraps over curl very closely
[10:59:50] narph: has joined #ruby
[11:00:01] towski__: has joined #ruby
[11:00:03] shevy: apparently with ssl support CURLOPT_SSL_VERIFYHOST
[11:00:07] arup_r: I think Net::HTTPS I can use
[11:00:12] Ox0dea: Net::HTTPS would do just fine.
[11:00:24] arup_r: I think so
[11:00:43] shevy: arup_r that php code has no comments/documentation?
[11:00:44] arup_r: but needs to lookinto the parameters they use there
[11:00:45] Ox0dea: arup_r: A line being 189 characters long doesn't bother you?
[11:00:50] arup_r: Nothing it has
[11:01:26] arup_r: Ox0dea: yes it does.. are you talking about https://gist.github.com/aruprakshit/41e698c43a21e535a80e#file-e24_payment_pipe-rb-L90 ?
[11:01:41] towski_: has joined #ruby
[11:01:45] arup_r: I don't know how to make cute .. so I kept it that ugly
[11:02:07] arup_r: shevy: reading http://php.net/manual/en/function.curl-init.php
[11:02:46] [k-: arup_r: this is how you can break a line into multiple: https://eval.in/392766
[11:03:41] arup_r: thanks.. let me do it
[11:03:43] towski_: has joined #ruby
[11:03:50] sulky: has joined #ruby
[11:05:21] towski_: has joined #ruby
[11:05:57] tkuchiki: has joined #ruby
[11:07:14] towski_: has joined #ruby
[11:09:07] towski_: has joined #ruby
[11:09:56] lkba_: has joined #ruby
[11:10:56] towski_: has joined #ruby
[11:12:32] towski_: has joined #ruby
[11:14:31] towski__: has joined #ruby
[11:14:46] symm-: has joined #ruby
[11:16:08] towski__: has joined #ruby
[11:16:23] davedev24_: has joined #ruby
[11:16:50] edb__: has joined #ruby
[11:16:55] arup_r: Ox0dea: beautified https://gist.github.com/aruprakshit/41e698c43a21e535a80e#file-e24_payment_pipe-rb-L91
[11:17:48] [k-: you have not learnt
[11:18:03] [k-: you can use \ to extend the line
[11:18:07] towski_: has joined #ruby
[11:18:19] [k-: the code I showed you was purposeful!
[11:19:09] hotpancakes: has joined #ruby
[11:19:23] narph: has left #ruby: ()
[11:19:46] towski_: has joined #ruby
[11:20:21] arup_r: [k-: I used that too... but was not looks good with `\` or may be I couldn't built it up with it .. so I deleted and used the `heredoc` style
[11:21:41] towski__: has joined #ruby
[11:22:26] [k-: "%{protocol:// \
[11:22:49] [k-: %{blah} \
[11:23:14] [k-: hmm, you're right
[11:23:22] towski_: has joined #ruby
[11:24:30] sharpmachine: has joined #ruby
[11:24:56] [k-: since you have the <<-
[11:25:06] [k-: split the parts to each line
[11:25:20] towski_: has joined #ruby
[11:27:07] doublemalt_: has joined #ruby
[11:27:12] towski_: has joined #ruby
[11:27:31] Pupeno: has joined #ruby
[11:27:31] Pupeno: has joined #ruby
[11:27:34] tkuchiki: has joined #ruby
[11:27:46] arup_r: if I split.. then I am getting something like `=> "https:// example.com: 447/ azs/ servlet/ aa"`
[11:28:21] [k-: doesnt <<- solve that :o
[11:28:23] [k-: time to revise
[11:28:32] CloCkWeRX: has joined #ruby
[11:28:49] towski_: has joined #ruby
[11:29:39] arup_r: [k-: https://gist.github.com/aruprakshit/f1db39377884c20ced62
[11:29:39] [k-: oops, here docs aren't the right tool
[11:30:45] arup_r: Ox0dea: should I use Net::HTTPS or Httparty ...?
[11:30:47] towski_: has joined #ruby
[11:34:07] Ox0dea: arup_r: That's not my decision to make, but it seems you're making pretty simple requests, for which Net:HTTPS should serve just fine.
[11:34:14] Ox0dea: No sense brining in a dependency you don't really need.
[11:34:53] arup_r: I just need to read the reponse after doing the POST
[11:36:14] Indian: has joined #ruby
[11:39:55] mahmoudmahfouz: has joined #ruby
[11:42:12] Rollabunna: has joined #ruby
[11:43:39] [k-_: has joined #ruby
[11:45:17] peter_paule: has joined #ruby
[11:46:36] jpfuentes2: has joined #ruby
[11:48:05] ndrei: has joined #ruby
[11:48:53] arup_r: I have to POST to the url `https://example.com:447/azs/servlet/aa` .. but http://docs.ruby-lang.org/en/2.0.0/Net/HTTP.html#method-c-new supports only `addrs, posrt`.. how should I pass other parts of my url ?
[11:49:40] Akagi201: has joined #ruby
[11:52:52] abuzze: has joined #ruby
[11:53:01] yh: has joined #ruby
[11:55:33] peter_paule: has joined #ruby
[11:57:36] [k-: Net::HTTPS.new("https://example.com", 447).post("azs/server/aa", ...)
[11:58:08] FernandoBasso: has joined #ruby
[11:58:56] [k-: oh, you must have the / in front of azs
[12:00:11] arup_r: thanks u meant this method http://docs.ruby-lang.org/en/2.0.0/Net/HTTP.html#method-i-post
[12:01:19] [k-: at the top of the page, you will see examples of how to use Net::HTTP
[12:05:14] arup_r: [k-: yes i am following this http://www.sitepoint.com/ruby-net-http-library/ (Advanced: SSL) and http://stackoverflow.com/a/17164002/2767755
[12:07:11] kirun: has joined #ruby
[12:08:19] c355E3B: has joined #ruby
[12:10:23] vdamewood: has joined #ruby
[12:10:36] krz: has joined #ruby
[12:12:01] lxsameer_: has joined #ruby
[12:12:30] jpfuentes2: has joined #ruby
[12:13:21] war_pigs: has joined #ruby
[12:15:28] Jackneill: has joined #ruby
[12:16:16] bronson: has joined #ruby
[12:17:36] tkuchiki: has joined #ruby
[12:22:27] FernandoBasso: has joined #ruby
[12:26:07] CatMartyn: has joined #ruby
[12:26:20] jesterfraud: has joined #ruby
[12:27:04] arup_r: has joined #ruby
[12:28:14] aryaching: has joined #ruby
[12:31:12] Papierkorb_: has joined #ruby
[12:31:22] hotpancakes: has joined #ruby
[12:31:36] arup_r: am I visible here ?
[12:32:33] apeiros: who's talking?
[12:32:45] tsvenson: has left #ruby: ("Leaving")
[12:34:23] serivich: has joined #ruby
[12:34:25] arup_r: me ........ :)
[12:34:35] arup_r: thanks for confirming...
[12:34:57] arup_r: I saw something like *User mode for arup_r is now +Zi* ... so thought I got banned :/
[12:36:43] Rollabunna: has joined #ruby
[12:37:44] [k-: we aren't evil bastards!
[12:38:00] [k-: Z means you are connecting via SSL
[12:38:06] [k-: i means invisible
[12:38:27] workmad3: has joined #ruby
[12:38:42] [k-: #ruby +b arup_r means you are banned
[12:41:23] SolarSailor: has joined #ruby
[12:41:45] [k-: don't worry, no one gets banned from #ruby
[12:41:53] [k-: except spammers
[12:42:02] shevy: and people with a big nose
[12:42:28] [k-: like shevy >:D
[12:42:40] Ox0dea: I turned Ruby into Assembly: https://gist.github.com/0x0dea/45aae87c0180d36b6f0c
[12:43:55] [k-: would it kill you to use the `then` keyword specially reserved for this purpose
[12:43:58] skmp: oh look, a stack based vm
[12:44:47] iateadonut: has joined #ruby
[12:45:04] shevy: random fun changelog of today
[12:45:11] shevy: guess who may be the author without googling!
[12:45:14] shevy: "the original array may not be embedded even if a substitution array is embedded, as it is embedded when the original array is short enough but not embedded."
[12:45:27] brain_shim: has joined #ruby
[12:45:48] shevy: I am not sure what is happening, but I think it has something to do with embedding
[12:46:05] shevy: https://github.com/ruby/ruby/blob/trunk/ChangeLog
[12:46:10] Ox0dea: skmp: Please defend register VMs.
[12:46:38] xxneolithicxx: has joined #ruby
[12:46:39] shevy: [k- but ; is shorter than then :)
[12:46:47] Ox0dea: "then" is just noise, always.
[12:46:53] shevy: don't let apeiros read that!
[12:46:58] warriorkitty: has joined #ruby
[12:47:07] [k-: he is showering, its ok
[12:47:12] shevy: haha how do you know
[12:47:16] shevy: you damn peeking?
[12:47:18] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[12:47:31] warriorkitty: Hi, what is the easiest way to check if the Ruby 2D array is a matrix/squared... (if its NxN). Thank you.
[12:47:55] Ox0dea: warriorkitty: foo.all? { |row| row.size == foo.size }
[12:48:15] [k-: s/foo/col
[12:48:26] warriorkitty: Ox0dea: Thank you! I knew it must be something easier then two each. :D
[12:48:34] icedragon: Ox0dea: only under the assumption that all elements are Arrays (strings would work too)
[12:49:13] ytti: Ox0dea, did sometihng similiar for friend's geo cache challenge, which required runnning Z80 code, implemented relevant part of it in sruby
[12:49:20] Rollabunna: has joined #ruby
[12:49:26] ytti: Ox0dea, but i think i only needed sub and rlca implementation
[12:50:42] NeverDie: has joined #ruby
[12:50:56] war_pigs: has joined #ruby
[12:51:29] Rollabun_: has joined #ruby
[12:54:11] [k-: square = false; !foo.map(&:size).uniq.tap { |o| square = o[0].size == foo.size }[1]
[12:54:14] bmurt: has joined #ruby
[12:54:25] shevy: what are you doing [k-
[12:54:31] [k-: that doesn't work
[12:55:16] [k-: square = false; !foo.map(&:size).uniq.tap { |o| square = o[0].size == foo.size }[1] && square
[12:55:22] [k-: that should do the trick!
[12:55:27] JDiPierro: has joined #ruby
[12:55:34] [k-: I learnt, Ox0dea!
[12:56:12] shevy: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
[12:56:27] shevy: Ada: Ranked 3
[12:57:29] shevy: I should have started to program in 1985
[12:57:33] [k-: look, haskell!
[12:58:29] shevy: I can't overcome the monad barrier
[12:59:06] tkuchiki: has joined #ruby
[12:59:30] [k-: just read more
[12:59:35] [k-: then sleep
[12:59:44] [k-: then read another monad tutorial
[12:59:45] Ox0dea: I do wish Ruby had Haskell's ability to define arbitrary symbolic methods and specify their fixation.
[12:59:46] [k-: then sleep
[12:59:55] [k-: and you will get it eventually
[12:59:56] shevy: the oracle has spoken
[13:00:11] shevy: [k- I have no time to sleep!
[13:00:29] Ox0dea: [k-: If you weren't having a laugh back there, I must observe that I'm having a detrimental effect on the quality of your Ruby code.
[13:00:33] Ox0dea: /whisper All is going to plan...
[13:00:39] mleung: has joined #ruby
[13:00:48] shevy: he said your code sucks [k- :(
[13:00:49] abuzze: has joined #ruby
[13:01:05] [k-: that is probably true x10
[13:01:08] Ox0dea: I need a translator?
[13:01:16] shevy: a simplifier
[13:01:32] Ox0dea: [k-: He said you don't speak English.
[13:01:49] [k-: >> "shevy".sub /[^s]+/, "haman"
[13:01:51] ruboto: [k- # => "shaman" (https://eval.in/392811)
[13:02:08] hotpancakes: has joined #ruby
[13:02:14] [k-: I speak basic English
[13:02:31] sevenseacat: re: tiobe index - boo Java
[13:02:37] Ox0dea: >> 'landline'.tr('denial', '-/ fmr')
[13:02:37] tkuchiki: has joined #ruby
[13:02:38] ruboto: Ox0dea # => "rm -rf /" (https://eval.in/392813)
[13:02:53] sevenseacat: what on earth is ABAP
[13:03:17] Ox0dea: GitHub gave it a specific color in Linguist, so apparently somebody's using it.
[13:03:17] shevy: sounds like a song
[13:03:40] sevenseacat: ABAP (Advanced Business Application Programming, originally Allgemeiner Berichts-Aufbereitungs-Prozessor, German for "general report creation processor") is a high-level programming language created by the German software company SAP.
[13:03:43] sevenseacat: SAP. there we go.
[13:03:48] shevy: hahaha oh my god
[13:03:59] shevy: Allgemeiner Berichts-Aufbereitungs-Prozessor - now that is awesome
[13:04:29] shevy: general report-recycle-processor # what the ...
[13:05:19] [k-: >> "shevy!".tr "y!ev", "anam"
[13:05:20] ruboto: [k- # => "shaman" (https://eval.in/392814)
[13:05:40] shevy: I find .tr very arcane
[13:05:49] shevy: gsub is so much nicer!
[13:05:52] sevenseacat: tiobe list needs more elixir
[13:06:00] [k-: it is more powerful than all my code combined!
[13:06:00] shevy: elixir is too hipster young
[13:06:25] [k-: go is too hipster young
[13:06:36] shevy: "All Elixir code runs inside lightweight threads of execution (called processes) that are isolated and exchange information via messages"
[13:06:38] sepp2k: has joined #ruby
[13:06:42] shevy: ruby needs that
[13:06:42] j4cknewt: has joined #ruby
[13:07:08] [k-: >> Thread.current
[13:07:09] ruboto: [k- # => #<Thread:0x41ec5a54 run> (https://eval.in/392815)
[13:07:16] idafyaid: has joined #ruby
[13:07:25] shevy: import Supervisor.Spec
[13:07:36] shevy: damn, they have import... ruby may be the last language on earth to not have import
[13:07:53] [k-: require "supervisor/spec"
[13:08:09] shevy: am I wrong or is the elixir syntax heavily ruby inspired?
[13:08:14] shevy: def serve_drinks(%User{age: age}) when age >= 21 do
[13:08:22] Ox0dea: You derpin'.
[13:08:22] [k-: you are right
[13:08:22] shevy: %User{name: name, age: age} = User.get("John Doe")
[13:08:44] shevy: ruby makes children
[13:08:56] [k-: Ruby has a lot of children
[13:08:59] shevy: hmm babies... so crystal, elixir...
[13:09:19] shevy: some things are weird: defmodule MathTest do
[13:09:35] [k-: data User = { name :: String, age :: Int }
[13:09:50] shevy: name is a string and age is an integer [k-
[13:09:57] [k-: Ox0dea do you prefer : or ::
[13:10:07] shevy: Tools like IEx (Elixir's interactive shell)
[13:10:12] shevy: irb <- -> iex !!!
[13:10:24] shevy: what does haskell use?
[13:10:28] dgutierrez1287: has joined #ruby
[13:10:38] shevy: I mean to denote types
[13:10:51] shevy: ghci is like 10 terabytes or something
[13:11:05] shevy: https://www.haskell.org/ghc/download_ghc_7_10_1
[13:11:17] DexterLB: has joined #ruby
[13:11:17] [k-: I'm outdated!
[13:11:26] shevy: ah ok... the source is at around 10 MB
[13:11:48] shevy: compiled ghc-7.10.1-i386-unknown-linux-deb7.tar.xz is at 69 MB so that is not that bad
[13:12:23] Ox0dea: ~ $ pacman -Qql ghc | xargs stat -c '%s' | paste -sd + | bc
[13:12:25] Ox0dea: 943868136
[13:12:41] Ox0dea: Shit is massive.
[13:12:44] [k-: Ox0dea you haven't answered :(
[13:12:52] Ox0dea: [k-: Whichever, really.
[13:13:18] [k-: Elm does it the other way round
[13:13:21] [k-: Haskell or Elm!
[13:13:31] Ox0dea: TypeScript!
[13:13:32] _blizzy_: back to square one with no project ideas.
[13:13:41] _blizzy_: I wanna make something in ruby. :/
[13:13:49] Ox0dea: _blizzy_: Did you make that humanized time difference thing?
[13:14:19] shevy: the oracle uses archlinux
[13:14:21] [k-: TypeScript is basically java and JavaScript, like I have said
[13:14:21] _blizzy_: Ox0dea, no, I was tired when I got home from locals/yugioh.
[13:14:30] Ox0dea: _blizzy_: Then you're all set.
[13:14:40] shevy: _blizzy_ do it like I do; I wrote so much ruby code that I literally now spend most of my time rewriting old code!
[13:14:50] _blizzy_: shevy, good idea!
[13:14:54] [k-: shevy is crazy
[13:15:03] _blizzy_: oh I remembered that I started a django project that I need to finish.
[13:15:09] Ox0dea: ?ot _blizzy_
[13:15:09] ruboto: _blizzy_, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[13:15:13] shevy: <_blizzy_> I wanna make something in ruby. :/
[13:15:22] _blizzy_: Ox0dea, ok. c:
[13:15:25] [k-: ?it ruboto
[13:15:25] ruboto: ruboto, I don't know anything about it
[13:15:27] shevy: j/k I don't use rails
[13:15:41] Ox0dea: _blizzy_: Really, though, human time difference is pretty nifty; if there really aren't any good libraries for it, you should totally go for it.
[13:15:53] _blizzy_: Ox0dea, I might.
[13:16:01] [k-: you should make a relative time logger too
[13:16:03] shevy: translation: the oracle sees good luck in your future ways
[13:16:06] [k-: so I don't have to
[13:16:19] Ox0dea: _blizzy_: You really ought to provide accuracy to the femtosecond, though.
[13:16:21] shevy: someone still has to port arup_r's php code to ruby
[13:16:23] _blizzy_: slightly off topic, but I found this. https://github.com/stevenlordiam/logos if you ever need vectors of web dev logos. it has ruby.
[13:16:50] _blizzy_: php to ruby doesn't sound that bad.
[13:17:02] rodfersou: has joined #ruby
[13:17:03] [k-: ?ot pho
[13:17:03] ruboto: pho, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[13:17:21] [k-: actually, don't even dare move it there
[13:17:27] _blizzy_: ruby to ruby doesn't sound that bad.
[13:17:51] arup_r: shevy: what are you checking here https://gist.github.com/aruprakshit/ba7b0eb50c4c1ff418f3#file-e24-php-L345 :) my little test not telling me that http://codepad.org/3CFvTWBu
[13:18:20] arup_r: `-1` means ?
[13:18:28] _blizzy_: oh cool, php. -1 means false I'm assuming.
[13:18:45] arup_r: me too .. but tried to confirm myself
[13:18:55] arup_r: couldn't confirm
[13:18:59] [k-: _blizzy_ will handle your php issues!
[13:19:00] Ox0dea: -1 means "not found".
[13:19:05] sevenseacat: arup_r: why are you seeking php help here?
[13:19:11] _blizzy_: I can finally use this
[13:19:16] ruboto: arup_r, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[13:19:37] _blizzy_: I feel like I'm part of the #ruby family now
[13:19:40] shevy: arup_r what the ... is this ... if ($i == -1) {
[13:20:01] shevy: _blizzy_ yeah - you successfully managed to use the spambot :D
[13:20:17] _blizzy_: shevy, yep.
[13:20:32] shevy: arup_r I'd probably remove all .php files and rewrite in ruby from scratch :D
[13:20:39] [k-: ?ot ruboto
[13:20:39] ruboto: ruboto, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[13:21:02] _blizzy_: why not keep it in php. c:
[13:21:04] shevy: yeah ruboto go over
[13:21:13] arup_r: I'll use String#include? hehehe
[13:21:14] Ox0dea: He's already there.
[13:21:43] shevy: well that's a lot of php code to port, like more than 2000 lines...
[13:21:54] _blizzy_: then I would keep it in said language.
[13:21:57] [k-: ruboto says hi from #ruby-offtopic
[13:22:05] _blizzy_: I say hi back.
[13:22:05] sevenseacat: arup_r: don't ask PHP questions here.
[13:22:13] _blizzy_: ##php is better for this
[13:22:23] _blizzy_: or should I say self
[13:23:17] arup_r: sevenseacat: is silent learner..
[13:23:48] [k-: sevenseacat is the master of all Ruby related things!
[13:24:00] [k-: and php is not related to Ruby
[13:24:06] _blizzy_: if so, what's the value of a ruby in this current market? :o
[13:24:08] Ox0dea: Well, there's Phuby.
[13:24:27] shevy: sevenseacat is the master of elixir code
[13:24:43] _blizzy_: I wish I was a master of java or scala
[13:24:50] [k-: ugh java
[13:25:00] ruboto: I don't know anything about java
[13:25:12] shevy: we need brainchips so that we don't have to learn boring languages
[13:25:20] _blizzy_: java isn't boring to me
[13:25:27] _blizzy_: inb4 ?ot _blizzy_
[13:25:45] shevy: java is a very exciting language
[13:25:47] [k-: ?ot _blizzy_ your wish is granted
[13:25:47] ruboto: _blizzy_, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[13:25:48] Pisuke: has joined #ruby
[13:25:50] _blizzy_: so, about them rubies.
[13:25:55] _blizzy_: [k-, I'm psychic. :D
[13:26:04] shevy: [k- just loves that bot here
[13:26:20] [k-: yes, I use it _all_ the time
[13:26:28] [k-: I have the command reference memorised
[13:26:57] _blizzy_: ruby doesn't have a process.uptime() like in node, doesn't it?
[13:27:22] sharpmachine: has joined #ruby
[13:28:05] jesterfraud: has joined #ruby
[13:28:35] _blizzy_: my battle bot is almost out of alpha.
[13:29:06] Ox0dea: _blizzy_: You could set a global variable to Time.now in a BEGIN block.
[13:29:24] _blizzy_: Ox0dea, I thought g variables were bad.
[13:29:38] Ox0dea: They have their use cases.
[13:29:55] jesterfraud: has joined #ruby
[13:30:02] [k-: Thread.current[:local]= value
[13:30:05] Ox0dea: You could just as well make it a constant, I suppose.
[13:30:29] Ox0dea: [k-: But then it'd only be accessible from the main thread.
[13:30:51] [k-: Thread.main
[13:31:10] Rollabunna: has joined #ruby
[13:31:45] digifiv5e: has joined #ruby
[13:32:18] warriorkitty: has joined #ruby
[13:32:37] Rollabun_: has joined #ruby
[13:32:52] Ox0dea: It's basically a global variable then, but it's true that it'd be much less likely to be modified by something else.
[13:33:12] warriorkitty: Hi again, just another question. I have an array and I need to check if inside that array are values between 1 and N.
[13:33:23] Ox0dea: warriorkitty: Array#all? again.
[13:33:31] Ox0dea: But you've got to figure out the predicate this time. :)
[13:33:53] chouhoulis: has joined #ruby
[13:33:53] warriorkitty: Ox0dea: Haha that's the problem.
[13:33:57] Ox0dea: Do you know about Ranges?
[13:34:05] Rollabun_: has joined #ruby
[13:34:19] warriorkitty: Yes, but my array doesn't have contain? for Ranges.
[13:34:29] shevy: >> (1..5).include? 3
[13:34:30] ruboto: shevy # => true (https://eval.in/392823)
[13:36:07] warriorkitty: Ox0dea: Please, tell me the predicate! xD
[13:36:17] Ox0dea: warriorkitty: Someday (https://bugs.ruby-lang.org/issues/11286#change-53064), you might be able to say Array.all?(1..N), but until such time comes you'll have to open a block and check each element against a Range.
[13:36:22] Ox0dea: shevy demonstrated how to do so.
[13:36:41] warriorkitty: Oh, thank you very much.
[13:36:55] Ox0dea: We should totally be able to say Array.all?(1..N)!
[13:37:11] shevy: oracle-lang
[13:37:22] Ox0dea: But it's such a "Ruby" way to do it.
[13:37:23] [k-: Array#min == 1 && Array#max == N
[13:37:57] Ox0dea: [k-: Not quite.
[13:38:09] [k-: why ever not
[13:38:25] Ox0dea: Because it doesn't actually check that all of the elements are between 1 and N?
[13:38:57] [k-: if the list is all numbers, it will work?
[13:39:09] [k-: yes it will!
[13:39:20] Ox0dea: Oh, jeeze. I'm tired.
[13:39:23] Ox0dea: That was bad.
[13:40:10] [k-: I thought my brain stopped working ;-;
[13:40:10] [k-: I was doing absolute graphs
[13:40:13] [k-: and my mind went blank
[13:40:25] Ox0dea: In my defense, it should be Array.min >= 1 && Array.max <= N.
[13:40:45] [k-: Well, true
[13:40:49] kobain: has joined #ruby
[13:40:55] arup_r: shevy: 70% done.. :)
[13:41:14] [k-: it's less efficient tho
[13:41:18] michael_mbp: has joined #ruby
[13:41:27] Ox0dea: But it gives the correct answer.
[13:41:48] [k-: is it more expressive?
[13:41:55] Ox0dea: [2, 3, 4] satisfies all?(1..5), but just checking for min=1 and max=N would fail.
[13:42:33] [k-: (I was talking about min max vs range#include)
[13:42:43] eggoez: has joined #ruby
[13:42:48] Ox0dea: I think Range#include? is pretty expressive.
[13:43:13] [k-: seems so
[13:43:51] [k-: but is it shorter?
[13:43:59] Ox0dea: warriorkitty: Now that I look back at it, your question isn't entirely clear. Are you wanting to check that all of the elements are between 1 and N, or that the array contains all of the numbers from 1 to N?
[13:45:08] jesterfr_: has joined #ruby
[13:45:23] MEATCHICKEN: has joined #ruby
[13:48:35] Ox0dea: [k-: From a performance perspective, #min + #max is not that great because both of them have to walk the entire collection to compute the result, whereas #all? + Range#include? stops as soon as an element fails the predicate.
[13:48:49] artmann: has joined #ruby
[13:49:27] mustmodify: has joined #ruby
[13:50:23] jbwiv: has joined #ruby
[13:50:27] GarethAdams: has joined #ruby
[13:50:35] blue_deref: has joined #ruby
[13:50:48] G: has joined #ruby
[13:50:56] chris2: has joined #ruby
[13:51:57] bmurt: has joined #ruby
[13:51:59] [k-: i agree
[13:52:07] towski_: has joined #ruby
[13:52:13] mustmodify: has left #ruby: ()
[13:52:42] Rollabunna: has joined #ruby
[13:52:44] krz: has joined #ruby
[13:52:59] [k-: for the second part: array.uniq.sort == *1..N
[13:53:24] [k-: that is if the array is a array of numbers only
[13:53:35] hotpancakes: has joined #ruby
[13:54:16] retornam: has joined #ruby
[13:54:31] xcesariox: has joined #ruby
[13:54:43] rmoriz: has joined #ruby
[13:54:50] drewo: has joined #ruby
[13:55:27] warriorkitty: Ox0dea: Sorry for late reply. I need to ask if every element in array is between 1..N.
[13:55:46] warriorkitty: Ox0dea: If one is not in that range, return false.
[13:56:26] Ox0dea: warriorkitty: Are you able to say which is more likely?
[13:56:50] havenwood: has joined #ruby
[13:57:06] jenksy: has joined #ruby
[13:57:13] [k-: (returns true more often | returns false more often)
[13:57:55] bf4: has joined #ruby
[13:58:56] warriorkitty: Ox0dea: It's more likely that every record will be in that range.
[13:59:22] rippa: has joined #ruby
[13:59:35] Ox0dea: warriorkitty: Then [k-'s suggestion of checking that the minimum is >= 1 and the maximum is <= N is a good one.
[14:00:40] warriorkitty: Ox0dea: Thank you very much, I appreciate your help.
[14:00:45] Ox0dea: Sure thing.
[14:01:16] [k-: :o it is?
[14:01:53] warriork1tty: has joined #ruby
[14:01:58] Ox0dea: Well, the optimal approach would be defining the range outside of the #all? loop and checking against it inside, but I didn't want to complicate things.
[14:02:37] Ox0dea: #all? + Range#include? probably creates a new Range object for every iteration, which isn't great.
[14:03:00] [k-: all?.with_object ?
[14:03:04] hotpancakes: has joined #ruby
[14:03:27] Ox0dea: Yeah, that'd be a nice way to avoid explicitly defining the Range.
[14:03:45] Ox0dea: You think like a Haskeller. :P
[14:04:20] [k-: I learnt that from you :o
[14:04:39] Ox0dea: Ack, it doesn't work, though. :( #all? without a block returns true if all of the elements are truthy.
[14:05:59] Rixius: has joined #ruby
[14:06:00] xcesariox: has joined #ruby
[14:06:37] Ox0dea: Of course, if the sequence predicates provided case equality (!), the answer would've been obvious from the start.
[14:07:11] Ox0dea: matz was assigned to it almost as soon as I proposed it; I wonder why he's not voiced his opinion yet. :/
[14:07:13] peter_paule: has joined #ruby
[14:10:51] [k-: it's 11pm in Japan now
[14:11:22] krz: has joined #ruby
[14:13:01] Ox0dea: I proposed it two weeks ago. :(
[14:15:13] Jackneill: has joined #ruby
[14:15:49] [k-: I don't get your phrasing :s
[14:16:53] Ox0dea: I submitted a patch to Ruby that lets you say, for instance, foo.all?(Fixnum) instead of foo.all? { |f| Fixnum === f }.
[14:17:12] yh: has joined #ruby
[14:17:15] bronson: has joined #ruby
[14:17:26] Ox0dea: One of the core team assigned it to matz on the issue tracker, and I'm sure that gave him a notification, but he hasn't said yet whether or not he likes the idea and wants it to go into core.
[14:18:13] [k-: interesting
[14:18:24] [k-: it would be nice to have that
[14:18:31] [k-: especially for code golfing
[14:19:26] radialneon: has joined #ruby
[14:19:36] [k-: this would be a non existent problem in Haskell because all elements of a list has the same type!
[14:20:11] Ox0dea: No, it's much more than just for types, though. It uses the case equality operator (===) to do its checking.
[14:20:26] Ox0dea: #=== does something useful for several classes.
[14:20:34] Ox0dea: It's an alias for #include? on Ranges, for instance.
[14:20:39] Ox0dea: >> (1..5) === 3
[14:20:40] ruboto: Ox0dea # => true (https://eval.in/392851)
[14:20:48] [k-: amazing!
[14:21:51] Ox0dea: Also Regexps, so you can quickly check that all of the strings in an array match: foo.all?(/bar/) is much nicer than foo.all? { |f| /bar/ === f }, in my opinion.
[14:22:14] Ox0dea: Not even from a golfing perspective; it's just a much cleaner and more expressive way to say the same thing.
[14:22:21] Jackneill: has joined #ruby
[14:22:39] [k-: you have my vote!
[14:23:32] michael_mbp: has joined #ruby
[14:24:11] JDiPierro: has joined #ruby
[14:24:41] s00pcan: has joined #ruby
[14:27:07] workmad3: has joined #ruby
[14:28:15] sharpmachine: has joined #ruby
[14:29:10] Ox0dea: Rebooting for kernel 4.1; wish me luck.
[14:29:28] dfockler: has joined #ruby
[14:30:23] [k-: kernel 4.1? :o
[14:31:34] Ox0dea: has joined #ruby
[14:32:34] shevy: the oracle goes down for maintenance work
[14:34:12] iamninja: has joined #ruby
[14:34:18] [k-: The Earth has rotated around the axis and now the Moon faces us. It is time to cease but to repair.
[14:34:37] chouhoulis: has joined #ruby
[14:34:46] Ox0dea: [k-: Good night.
[14:34:58] [k-: :o you are back
[14:35:27] [k-: #ruby-offtopic in your channel autojoin plz
[14:36:13] Ox0dea: I secretly enjoy when things get off-topic in #ruby.
[14:36:40] niemcu: has joined #ruby
[14:36:55] [k-: you still have to maintain a presence in #ruby-offtopic!
[14:37:27] woodennails: has joined #ruby
[14:37:36] dagda1: has joined #ruby
[14:38:13] djellemah: has joined #ruby
[14:39:30] [k-: I wish my scrollback was long
[14:39:50] [k-: then I could laugh at shevy's imitation of Ox0dea
[14:40:01] [k-: time to increase it
[14:40:32] [k-: my scroll back buffer size is 20000 o_O
[14:41:39] Ox0dea: [k-: You don't keep logs?
[14:42:08] [k-: logs are silly waste of space, especially on mobile, where you are constantly fighting
[14:42:19] [k-: [for space]
[14:43:59] eggoez: has joined #ruby
[14:44:34] djellemah: has joined #ruby
[14:45:56] [k-: found it: <shevy> "Ox0dea, what will the weather be tomorrow." "Ox0dea: The weather dynamics fluctuate between the butterfly effect and mankind's attempt of self-destruction through climate change, but I sense slight rain"??
[14:47:04] arup_r: has joined #ruby
[14:47:04] yh: has joined #ruby
[14:47:05] Muhannad: has joined #ruby
[14:47:24] shevy: the oracle
[14:47:47] Rollabunna: has joined #ruby
[14:49:40] shevy: now I am compiling kernel 4.1.1 as well, following the footsteps of the Ox0dea oracle \o/
[14:49:54] mleung: has joined #ruby
[14:50:04] shevy: and then ruby 2.3.0
[14:50:25] [k-: shevy: how many babies will be born tomorrow in the whole world?
[14:50:39] Ox0dea: shevy: I figured you already kept abreast with trunk given your poking fun at nobu's wording in the ChangeLog.
[14:50:40] shevy: I once read 3 new ones get in per second
[14:50:40] [k-: assuming 24h from this message
[14:51:10] shevy: Ox0dea not really, I am too lazy to use the latest git checkouts; I use tarballs
[14:51:15] Ox0dea: Isn't it, on average, one birth every three seconds and one death every five?
[14:52:21] [k-: I implore you guys to word it in an Oracle-like manner.
[14:52:40] Ox0dea: ACTION still doesn't quite get the "oracle" thing.
[14:53:03] shevy: now he wants us to collect all his oracle-like quotes
[14:53:08] shevy: I can't scrollback that much!
[14:53:22] Jackneill: has joined #ruby
[14:53:23] shevy: <Ox0dea> What a time to be in #ruby!
[14:53:30] [k-: #ruby has a log bot, thankfully
[14:53:50] ruboto: I don't know anything about oracle
[14:53:58] shevy: that bot is so useless
[14:54:13] [k-: ?rude shevy
[14:54:13] ruboto: shevy, I don't know anything about rude
[14:54:19] Ox0dea: "Eat the rude."
[14:54:36] shevy: someone needs to update the bot knowledge base
[14:54:56] alexa_: has joined #ruby
[14:55:18] [k-: Rude is when a twister takes out your house.
[14:55:46] shevy: we don't really have twisters in europe :(
[14:57:27] camonz: has joined #ruby
[14:57:28] krz: has joined #ruby
[14:57:33] [k-: you don't have rudeness then
[14:57:37] [k-: good for you!
[14:58:53] shevy: nature doesn't chase us down
[14:58:58] shevy: the one or other taifun would be great
[14:59:06] shevy: especially when you don't have access to an ocean, like here!
[14:59:12] [k-: typhoon*
[14:59:22] abuzze: has joined #ruby
[14:59:24] chipotle: has joined #ruby
[15:00:53] Ox0dea: Functional programming is happy programming: http://i.imgur.com/hmawWPd.png
[15:01:10] adaedra: <[k-> you don't have rudeness then
[15:01:20] [k-: ACTION throws a potato at Ox0dea
[15:01:39] Ox0dea: ACTION remembers his potato from last night.
[15:01:41] [k-: I'm glad you like the joke
[15:01:44] Ox0dea: Food time.
[15:01:49] Rollabun_: has joined #ruby
[15:01:50] sarkyniin: has joined #ruby
[15:03:06] Ox0dea: I'm a Python guy if yesterday wasn't a quintessential case of Too Many Cooks.
[15:05:12] peter_paule: has joined #ruby
[15:06:05] riotjones: has joined #ruby
[15:07:58] alexa_: has left #ruby: ("WeeChat 0.4.2")
[15:08:39] mfranzwa: has joined #ruby
[15:09:48] shakes: has joined #ruby
[15:10:41] krz: has joined #ruby
[15:10:43] urbanmonk: has joined #ruby
[15:14:48] chinmay_dd: has joined #ruby
[15:16:24] brain_shim: has joined #ruby
[15:16:46] war_pigs: has joined #ruby
[15:16:54] shevy: oracle time again
[15:18:02] [k-: Time is sacred. Please try again later.
[15:20:45] JDiPierro: has joined #ruby
[15:22:52] timonv: has joined #ruby
[15:25:22] nobitanobi: has joined #ruby
[15:29:00] sharpmachine: has joined #ruby
[15:29:35] yaw: has joined #ruby
[15:29:35] tkuchiki: has joined #ruby
[15:31:39] ndrei: has joined #ruby
[15:32:51] codecop: has joined #ruby
[15:32:54] codecop_: has joined #ruby
[15:36:30] bf4: has joined #ruby
[15:37:51] niemcu: has joined #ruby
[15:38:02] hotpancakes: has joined #ruby
[15:38:02] krz: has joined #ruby
[15:41:30] s2013: has joined #ruby
[15:41:34] arup_r: has joined #ruby
[15:41:43] Indian: has joined #ruby
[15:42:34] roolo: has joined #ruby
[15:42:41] Ox0dea: >> require 'fiddle'; magic =->o { Fiddle::Pointer.new(o.__id__*2)[4,4] = [Fixnum.__id__*2].pack ?Q }; str = 'foo'; magic[str]; str
[15:42:42] ruboto: Ox0dea # => 546603210 (https://eval.in/392984)
[15:43:09] alphaatom: has joined #ruby
[15:43:19] leonardoajim: has joined #ruby
[15:44:14] mandarinkin: has joined #ruby
[15:45:20] acke: has joined #ruby
[15:46:01] roolo_: has joined #ruby
[15:46:07] [k-: str was changed!
[15:46:43] abuzze: has joined #ruby
[15:47:05] Channel6: has joined #ruby
[15:47:24] Ox0dea: Fiddle is voodoo.
[15:47:46] [k-: this is legit Ruby: ->o{
[15:48:17] bronson: has joined #ruby
[15:48:34] Jonah11_: has joined #ruby
[15:48:52] havenwood: has joined #ruby
[15:49:43] al2o3-cr: [k-: stubby lambda
[15:49:45] [k-: ->{ looks like a flower
[15:50:04] yaw: has joined #ruby
[15:50:10] Ox0dea: al2o3-cr: "Stabby", because it looks sharp.
[15:50:18] Ox0dea: >> require 'fiddle'; thaw=->o{Fiddle::Pointer.new(o.__id__*2)[1]^=8}; [s = 'foo'.freeze, s.frozen?, thaw[s], s.frozen?]
[15:50:19] ruboto: Ox0dea # => ["foo", true, -64, false] (https://eval.in/392985)
[15:50:29] Ox0dea: We can even thaw objects with Fiddle! That's just crazy.
[15:51:15] CloCkWeRX: has joined #ruby
[15:51:26] crazydiamond: has joined #ruby
[15:51:44] [k-: >> [self.object_id, self.__id__]
[15:51:45] ruboto: [k- # => [549631770, 549631770] (https://eval.in/392986)
[15:51:49] yeticry: has joined #ruby
[15:52:02] [k-: they are the same o_O
[15:52:03] Ox0dea: [k-: You get a warning when overriding __id__.
[15:52:34] Ox0dea: object_id, rather.
[15:53:20] Ox0dea: __id__ is an "internal method" because of the underscores; I guess that's why they don't warn when you override it.
[15:53:47] cir0x: has joined #ruby
[15:54:47] [k-: is there __equal__
[15:55:11] Ox0dea: Nah, but equal? is the one you're never supposed to redefine.
[15:55:55] [k-: we could try it out in refinements and see what happens :>
[15:56:44] wallerdev: has joined #ruby
[15:59:06] vdamewood: has joined #ruby
[15:59:42] [k-: isn't it weird that -> doesn't follow { | | }
[16:00:53] cpruitt: has joined #ruby
[16:01:17] lictor36: has joined #ruby
[16:01:32] lictor36: has left #ruby: ()
[16:01:41] shevy: -> is evil
[16:03:56] cpruitt: has joined #ruby
[16:04:48] Symbiosisz: has joined #ruby
[16:05:15] kies^: has joined #ruby
[16:05:53] JDiPierro: has joined #ruby
[16:06:46] bronson: has joined #ruby
[16:07:30] Symbiosisz: has joined #ruby
[16:08:59] renderful: has joined #ruby
[16:09:24] T3: has joined #ruby
[16:09:46] hotpancakes: has joined #ruby
[16:10:04] chris2: has joined #ruby
[16:15:59] workmad3: has joined #ruby
[16:17:08] Ox0dea: I like that it looks like it's pushing its parameter list into the block.
[16:17:19] Ox0dea: "Get in there, arguments!"
[16:17:57] sarkyniin: has joined #ruby
[16:18:32] arup_r: has joined #ruby
[16:19:00] Meow-J: has joined #ruby
[16:20:06] rickmasta: has joined #ruby
[16:26:05] ivanskie: has joined #ruby
[16:26:29] [k-: then it's not idiomatic
[16:26:38] [k-: we use << !
[16:29:32] Ox0dea: >> class Object; def >> o; o << self end end; ?a >> ?b >> ?c >> []
[16:29:34] ruboto: Ox0dea # => ["cba"] (https://eval.in/392997)
[16:29:53] sharpmachine: has joined #ruby
[16:30:22] [k-: that's wrong!
[16:30:42] [k-: a:b:c[] == [a,b,c]!
[16:30:45] Ilyas_: has joined #ruby
[16:31:00] [k-: infixr pls
[16:31:19] bf4: has joined #ruby
[16:31:37] [k-: class Object; def >> o; o << self end end; ?a >> (?b >> (?c >> []))
[16:31:50] [k-: >> class Object; def >> o; o << self end end; ?a >> (?b >> (?c >> []))
[16:31:50] Ox0dea: It's not necessarily meant to be cons, though.
[16:31:51] ruboto: [k- # => ["c", "b", "a"] (https://eval.in/392998)
[16:31:55] Ox0dea: It's just "reverse shovel".
[16:32:29] [k-: oh that looks right if you say it that way
[16:33:15] [k-: class Object; def >> o; o.unshift self end end; ?a >> (?b >> (?c >> []))
[16:33:29] [k-: >> class Object; def >> o; o.unshift self end end; ?a >> (?b >> (?c >> []))
[16:33:29] ruboto: [k- # => ["a", "b", "c"] (https://eval.in/392999)
[16:33:35] [k-: turdurr
[16:33:52] rehat: has joined #ruby
[16:38:45] [k-: >> def :;test end
[16:38:46] ruboto: [k- # => /tmp/execpad-6da833522458/source-6da833522458:2: syntax error, unexpected tSYMBEG ...check link for more (https://eval.in/393000)
[16:38:50] christiandsg: has joined #ruby
[16:39:04] ruboto: [k- # => /tmp/execpad-31fa2469af66/source-31fa2469af66:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/393001)
[16:41:05] bronson: has joined #ruby
[16:42:26] Carnage\: has joined #ruby
[16:42:40] wallerdev: has joined #ruby
[16:43:15] [k-: I need to stop wasting time on weekends :(
[16:43:59] Ox0dea: [k-: No current projects?
[16:44:39] shevy: no girlfriend!
[16:44:50] [k-: I waste so much time on weekends (by not doing my homework) that I do my home work now
[16:45:04] [k-: causing a great lack of time
[16:45:06] ljarvis: What's a better hash key for a non-mandatory "thing", I'm trying to avoid; mandatory: true
[16:45:15] ljarvis: because the word sucks and I think it could be simplified
[16:45:26] [k-: required
[16:45:27] shevy: obligatory: true
[16:45:29] [k-: optional
[16:45:35] [k-: compulsory
[16:45:35] hotpancakes: has joined #ruby
[16:45:36] shevy: do_or_die: true
[16:45:49] shevy: must_have
[16:45:49] [k-: should_specify
[16:46:02] Ox0dea: The paradox of choice.
[16:46:03] ljarvis: thought about compulsory but it's no better. required is probably better though
[16:46:07] shevy: so many possibilities :)
[16:46:41] bmurt: has joined #ruby
[16:47:25] [k-: must_state
[16:47:34] [k-: must_input
[16:47:42] [k-: input_required
[16:47:50] [k-: required_field
[16:47:55] [k-: I could go on
[16:48:08] cir0x: has joined #ruby
[16:48:29] solocsha1: has joined #ruby
[16:48:41] Ox0dea: >> def foo bar: mandatory; end
[16:48:42] ruboto: Ox0dea # => :foo (https://eval.in/393002)
[16:48:55] Ox0dea: That way the client has to pass the parameter or else the code explodes.
[16:49:07] [k-: !important
[16:49:30] ljarvis: https://github.com/leejarvis/slop/issues/178#issuecomment-118629273
[16:49:56] lavros: has joined #ruby
[16:50:13] [k-: required is better
[16:50:22] chouhoulis: has joined #ruby
[16:50:35] [k-: the rest are bossy
[16:50:50] ljarvis: I agree, thanks for the suggestions
[16:51:16] Ox0dea: ljarvis: "Mandatory" is really standard nomenclature for CLIs, for what it's worth.
[16:51:50] [k-: the arguments supplied are provided "as is" without any guarantee
[16:51:50] shevy: The Oracle has decided.
[16:52:09] shevy: guarantee for what :)
[16:52:18] ljarvis: I don't think mandatory options themselves are very common, though
[16:52:19] shevy: awesomeness?
[16:52:25] ljarvis: in fact I'm struggling to find an example
[16:52:30] [k-: that your program doesn't explode
[16:52:51] [k-: ruby -llib?
[16:53:11] ljarvis: they take arguments, this discussion isn't about mandatory arguments
[16:53:15] ljarvis: slop already has those
[16:53:27] Ox0dea: ~ $ zgrep -i mandatory /usr/share/man/man1/* | wc -l
[16:53:32] ljarvis: this issue brings up mandatory options. i.e the script will fail if --file is not passed
[16:53:35] ljarvis: right, another bad example ;)
[16:53:43] Biohazard: has joined #ruby
[16:54:02] [k-: such unrobust code
[16:54:10] prasselpikachu: has joined #ruby
[16:54:13] NeverDie: has joined #ruby
[16:54:33] Tarkers34|2: has joined #ruby
[16:54:41] ljarvis: tbh I still think just checking ARGV is more explicit
[16:54:46] [k-: on_missing do fail "Missing argument" end
[16:54:54] Ox0dea: It's rarely the correct thing to make a script fail if not given an explicit file argument.
[16:55:13] Ox0dea: ARGF is a blessing.
[16:55:13] ljarvis: hence the name "option"
[16:55:28] ljarvis: I think I've rejected this feature idea before
[16:55:33] jeanlinux: has joined #ruby
[16:55:55] sarkyniin: has joined #ruby
[16:56:25] nfk: has joined #ruby
[16:57:05] [k-: should options be mandatory at all
[16:57:09] aryaching: has joined #ruby
[16:57:20] ljarvis: that's.. the discussion
[16:57:32] [k-: if you have --version why would you need --file
[16:58:32] Tarkers34|2: is there a way to permantly increment the counter variable inside a loop based on a condition set inside the loop? Example: https://gist.github.com/anonymous/5fca06cf9104a9b027c5
[16:58:54] ljarvis: Tarkers34|2: don't use each_with_index
[16:59:02] ljarvis: Tarkers34|2: use each and provide your own integer
[16:59:13] ljarvis: right, for that
[16:59:28] Tarkers34|2: haha yeah nothing wrong with each_with_integer good save
[16:59:39] apeiros: ACTION totally sees future Tarkers34|2 telling people how somebody on IRC told him each_with_index was bad :D
[16:59:51] ljarvis: each_with_index <333333
[16:59:54] ljarvis: clarified.
[17:00:24] Tarkers34|2: haha I was worried for a second it took up mad memory or something weird :P okay I'll roll my own int in this case, thanks
[17:00:44] ljarvis: mad memory, is that like a lot or like really angry
[17:01:10] ljarvis: nope, you're fine
[17:01:18] [k-: i =! 100!
[17:01:26] [k-: screw the world!
[17:01:26] bf4: has joined #ruby
[17:01:45] [k-: i.assign! 100
[17:02:35] DLSteve: has joined #ruby
[17:04:02] Ox0dea: >> iota = (0..1/0.0); [*?a..?f].zip(iota)
[17:04:03] ruboto: Ox0dea # => [["a", 0], ["b", 1], ["c", 2], ["d", 3], ["e", 4], ["f", 5]] (https://eval.in/393003)
[17:04:07] ljarvis: https://gist.github.com/leejarvis/6045d4e2b9e830c9ebc1
[17:04:10] ljarvis: what have i done
[17:04:41] Ox0dea: ljarvis: Your language is called Tiger?
[17:04:56] [k-: it looks like lisp
[17:04:58] ljarvis: currently yes, but because I haven't thought of anything better
[17:05:01] [k-: at least it composes!
[17:05:10] ljarvis: [k-: that syntax is a side-effect really
[17:05:12] Ox0dea: You're writing it on top of Ruby?
[17:05:25] ljarvis: no, the vm is written in C but I've been porting it to Go
[17:05:37] [k-: >> 1/0.0
[17:05:38] ruboto: [k- # => Infinity (https://eval.in/393004)
[17:05:45] ljarvis: eh, "the vm" lol.. the entire thing since the vm is tiny
[17:05:49] [k-: Ox0dea your trick is revealed
[17:06:12] Ox0dea: Gadzooks!
[17:06:31] [k-: <`derpy> https://devdocs.io/ruby/float#method-i--2F
[17:07:39] dgutierrez1287: has joined #ruby
[17:07:59] [k-: I will now take my leave :)
[17:08:43] hotpancakes: has joined #ruby
[17:09:20] nfk: has joined #ruby
[17:09:37] wallerdev: has joined #ruby
[17:10:36] mhib: has joined #ruby
[17:11:28] RobertBirnie: has joined #ruby
[17:15:09] RobertBirnie: has joined #ruby
[17:17:24] cytoskeletor: has joined #ruby
[17:17:31] demoph01n: has joined #ruby
[17:17:45] Agoldfish: has joined #ruby
[17:19:06] last_staff: has joined #ruby
[17:20:01] blackmesa: has joined #ruby
[17:21:58] hotpancakes: has joined #ruby
[17:22:14] peter_paule: has joined #ruby
[17:24:02] iateadonut: has joined #ruby
[17:24:11] Tarkers34|2: just realised how cool ruboto is
[17:24:21] Tarkers34|2: >> puts 'something'
[17:24:22] ruboto: Tarkers34|2 # => something ...check link for more (https://eval.in/393005)
[17:26:13] kreantos: has joined #ruby
[17:27:09] alex88: has joined #ruby
[17:29:25] kreantos: Hi, I am using geocoder. I have model request with latlong and a radius and model b with latlong. i want to get all requests nearby a certain model b but the radius is always stored in model a. Any suggestions how to formulate a query?
[17:29:30] mistermocha: has joined #ruby
[17:31:37] tkuchiki: has joined #ruby
[17:34:03] alphaatom: has joined #ruby
[17:37:53] kies^: has joined #ruby
[17:40:36] porglezomp: has joined #ruby
[17:42:41] msgodf: has joined #ruby
[17:42:41] nofxx: has joined #ruby
[17:44:35] wallerdev: has joined #ruby
[17:46:30] senayar: has joined #ruby
[17:49:45] howdoicomputer: has joined #ruby
[17:49:59] baweaver: has joined #ruby
[17:51:31] hotpancakes: has joined #ruby
[17:51:43] jbw_: has joined #ruby
[17:52:12] shevy: don't think many people here on #ruby know geocoder
[17:53:52] davedev24_: has joined #ruby
[17:53:53] claw: has joined #ruby
[17:54:09] Ilyas: has joined #ruby
[17:54:48] jaygen: has joined #ruby
[17:57:48] ljarvis: kreantos: can't you store the radios on model b?
[17:58:09] ljarvis: seems ideal to avoid creating a superfluous join
[17:58:43] yxhuvud: kreantos: what underlying database do you have? if you use postgis I'd fall back to that since that is quite straightforward, assuming you have the correct indices set up.
[17:59:35] peter_paule: has joined #ruby
[17:59:44] allomov: has joined #ruby
[17:59:44] demoph01n: has joined #ruby
[18:00:11] Surger: has joined #ruby
[18:00:39] ruby-lang794: has joined #ruby
[18:00:42] iateadonut: has left #ruby: ()
[18:01:45] ruby-lang794: Does anyone know where to find the code or a picture of one of the classes in ruby? So like Class String < Object def upcase #code here end def downcase #codehere end etc.?
[18:02:22] Tarkers34|2: can I extend the Integer and Float classes to include javascript's ++ method? So I can do i++ in ruby? Or would editing the syntax like that require editing ruby itself (in C)?
[18:02:23] jhass: MRIs core classes are implemented in C
[18:02:24] apeiros: ruby-lang794: github.com/ruby/rub
[18:02:30] apeiros: ruby-lang794: whoops - github.com/ruby/ruby
[18:02:48] apeiros: Tarkers34|2: no you can't.
[18:03:06] Tarkers34|2: apeiros coool
[18:03:14] c355E3B: If you wanted that style of syntax, you would need to patch MRI
[18:04:02] ruby-lang794: Thank you everyone
[18:04:04] apeiros: you'd also have to introduce a concept of what's considered "post-statement".
[18:04:29] Tarkers34|2: yeah thought as much...just wondering if I could do a quick monkey patch, no worries
[18:04:32] apeiros: I'd argue ruby doesn't have (nor need) that concept. but with ++, you would.
[18:04:36] workmad3: has joined #ruby
[18:06:01] RandyT: has joined #ruby
[18:07:31] wallerdev: has joined #ruby
[18:09:08] diegoviola: has joined #ruby
[18:09:19] symm-: has joined #ruby
[18:10:51] kreantos: ljarvis: yxhuvud: no the radius needs to be stored in the request model. i am using mysql
[18:12:13] dgutierrez1287: has joined #ruby
[18:12:35] Pupeno: has joined #ruby
[18:12:35] Pupeno: has joined #ruby
[18:12:44] ohaibbq: has joined #ruby
[18:13:05] kreantos: ljarvis: e.g. https://www.dropbox.com/s/ko3jm7vnh23nu3p/requests_by_b.pdf?dl=0 B1.requests should return Request1 and Request2
[18:13:08] Ox0dea: Tarkers34|2: For what it's worth, you can define unary + on any class, but you won't be able to modify integers in place.
[18:13:45] Ox0dea: >> class Fixnum; def +@; self + 0.5 end end; ++4
[18:13:46] ruboto: Ox0dea # => 4.5 (https://eval.in/393007)
[18:13:57] Ox0dea: >> class Fixnum; def +@; self + 0.5 end end; +++4
[18:13:58] ruboto: Ox0dea # => 4.5 (https://eval.in/393008)
[18:14:33] Tarkers34|2: that's pretty neat :)
[18:14:39] shazaum_: has joined #ruby
[18:15:02] Gadgetoid: has joined #ruby
[18:15:13] blackmesa: has joined #ruby
[18:15:18] Ox0dea: I made a thing that lets you chain unary operators arbitrarily, but it can't make ++ and -- work like they do in other languages.
[18:15:37] Ox0dea: We can make it work for strings, though!
[18:15:54] Tarkers34|2: Yeah strings are great for modifying in place
[18:15:57] Ox0dea: >> class String; alias +@ succ!; end; ++'1'
[18:15:58] ruboto: Ox0dea # => "3" (https://eval.in/393009)
[18:16:41] Tarkers34|2: >> int = 5 class Fixnum; def +@; self += 0.5 end end; ++int puts 5
[18:16:42] ruboto: Tarkers34|2 # => /tmp/execpad-b7696118d218/source-b7696118d218:2: syntax error, unexpected keyword_class, expecting k ...check link for more (https://eval.in/393010)
[18:16:52] brain_shim: has joined #ruby
[18:16:57] pabs: has joined #ruby
[18:17:02] Ox0dea: Even without the syntax error, you can't assign to self.
[18:17:20] Ox0dea: In any context.
[18:17:21] Tarkers34|2: Yeah...immutable and that.
[18:17:42] Ox0dea: No, not quite.
[18:17:52] apeiros: would certainly be fun if one place in your code decided that 2 is now 3 :-p
[18:18:11] baweaver: has joined #ruby
[18:18:44] Tarkers34|2: apeiros: but what if that place in the code was only after you changed it in place? hypothetically speaking of course
[18:19:02] apeiros: I think you missed the point
[18:19:05] Tarkers34|2: works with strings and arrays?
[18:21:19] apeiros: imagine: `a = 2; some_method; a + a # => 6`
[18:21:47] Ox0dea: >> ObjectSpace.each_object(Class).select { |c| c.instance_methods.include?(:replace) }
[18:21:48] ruboto: Ox0dea # => [Hash, Array, String] (https://eval.in/393011)
[18:21:50] Ox0dea: ^ The mutable classes.
[18:22:33] Ox0dea: Things with a #replace method let you blow them away and swap them out for a completely new instance in-place.
[18:22:48] apeiros: damn, Structs are not mutable? I must be living in a parallel world :-p
[18:23:43] railsraider: has joined #ruby
[18:24:13] spider-mario: has joined #ruby
[18:24:24] Ox0dea: Technically, anything with an accessible singleton class is "mutable", but do forgive my simplifying for the sake of demonstration.
[18:25:46] Ox0dea: apeiros: There's no way to completely replace a Struct in-place, right?
[18:26:15] apeiros: there's no built-in method to do it in one go. but you could implement Struct#replace
[18:26:31] jeanlinux: has joined #ruby
[18:26:35] Ox0dea: It would have the same object_id.
[18:27:23] eggoez: has joined #ruby
[18:27:36] apeiros: class Struct; def replace(other); <assertions here>; other.each.with_index do |ele, idx| self[idx] = ele end; self; end
[18:27:42] dseitz: has joined #ruby
[18:28:10] symbol: has joined #ruby
[18:28:36] lessless: has joined #ruby
[18:29:19] Xoro: has joined #ruby
[18:30:05] Tarkers34|2: apeiros : I just get what you mean about the number changing in your code haha that would suck
[18:30:36] bronson: has joined #ruby
[18:31:10] christiandsg: has joined #ruby
[18:31:48] idafyaid: has joined #ruby
[18:32:38] lkba: has joined #ruby
[18:33:35] Ox0dea: Tarkers34|2: It doesn't suck any less for other types.
[18:34:00] apeiros: oh, yes, yes it totally sucks less for other types.
[18:34:17] apeiros: mainly because a = []; b = [] creates two different objects
[18:34:37] apeiros: of course, you could (and almost certainly would, if numeric types were mutable) make numbers do the same.
[18:35:23] Tarkers34|2: I was thinking 5.increment!(5) #=> 10. puts 5 #=> 10 that's what I was thinking would happen if ints were mutable.
[18:35:58] Ox0dea: Yes, that's something that could happen, but I don't think any language has mutable integers; it's just too crazy.
[18:36:33] Ox0dea: On that note, I brought Python's decorators to Ruby: https://gist.github.com/0x0dea/16adbc769d1d7acc6224
[18:36:45] Ox0dea: For giggles.
[18:38:28] jbwiv: has joined #ruby
[18:39:21] allomov: has joined #ruby
[18:40:47] Scroff: has joined #ruby
[18:41:27] christiandsg: has joined #ruby
[18:42:45] finisherr: has joined #ruby
[18:43:44] aryaching: has joined #ruby
[18:45:03] bf4: has joined #ruby
[18:45:15] railsraider: has joined #ruby
[18:46:14] hotpancakes: has joined #ruby
[18:47:39] dagda1: has joined #ruby
[18:49:13] spyderman4g63: has joined #ruby
[18:49:53] DoubleMalt: has joined #ruby
[18:50:49] jbw_: has joined #ruby
[18:53:12] ruby-lang865: has joined #ruby
[18:55:11] ValicekB: has joined #ruby
[18:55:33] Rollabunna: has joined #ruby
[18:55:41] dgutierrez1287: has joined #ruby
[18:56:18] Rollabun_: has joined #ruby
[18:57:39] TheHodge: has joined #ruby
[18:58:43] craysiii: has joined #ruby
[18:59:39] workmad3: has joined #ruby
[19:00:23] RobertBirnie: has joined #ruby
[19:00:45] alphaatom: has joined #ruby
[19:04:46] kjones_: has joined #ruby
[19:05:16] intinig: has joined #ruby
[19:05:37] therod: has joined #ruby
[19:07:11] luckyruby: has joined #ruby
[19:10:02] tejasmanohar_: has joined #ruby
[19:10:09] tejasmanohar_: is this an ok place to ask activerecord questions?
[19:10:14] tejasmanohar_: or if im using rails should that stay to #ror
[19:11:04] alex88: has joined #ruby
[19:11:21] jhass: the AR expertise is bigger in #RubyOnRails in any case
[19:12:26] bronson: has joined #ruby
[19:12:37] xxneolithicxx: has joined #ruby
[19:14:03] ndrei: has joined #ruby
[19:15:25] msgodf: has joined #ruby
[19:16:32] sargas: has joined #ruby
[19:16:36] mkosaki: has joined #ruby
[19:17:34] abuzze: has joined #ruby
[19:18:02] varunwachaspati: has joined #ruby
[19:18:59] serivich: has joined #ruby
[19:20:54] porglezomp: has left #ruby: ()
[19:23:29] mary5030: has joined #ruby
[19:24:04] sdothum: has joined #ruby
[19:25:37] Musashi007: has joined #ruby
[19:27:14] wallerdev: has joined #ruby
[19:27:20] j4cknewt: has joined #ruby
[19:29:54] workmad3: has joined #ruby
[19:30:28] tubuliferous_: has joined #ruby
[19:31:56] wallerdev: has joined #ruby
[19:36:00] hotpancakes: has joined #ruby
[19:36:03] blenny: has joined #ruby
[19:36:30] Scroff: has joined #ruby
[19:37:37] adamski2600: has joined #ruby
[19:37:38] GitGud: has joined #ruby
[19:38:14] ght: Question: I have a values I would like to format as a JSON variable. Essentially, to begin with, I have a person's name, and I execute an API call to return lunches, such as chicken, steak, fish, etc.
[19:38:51] Vols: has joined #ruby
[19:38:51] arooni-mobile: has joined #ruby
[19:39:21] acke: has joined #ruby
[19:39:34] mistermocha: has joined #ruby
[19:39:45] ght: this happens for a few people, so I need to build out a JSON-formatted var to consist of names and corresponding lunch values.
[19:40:28] Limix: has joined #ruby
[19:41:23] mistermocha: has joined #ruby
[19:42:10] yfeldblum: has joined #ruby
[19:42:16] alphaatom: has joined #ruby
[19:42:24] apeiros: ght: and what's your question?
[19:42:25] s00pcan: has joined #ruby
[19:42:42] ght: How to do this?
[19:43:08] enders: has joined #ruby
[19:43:09] apeiros: ght: far too vague of a question which boils down to somebody doing it for you
[19:43:20] apeiros: ght: please show what you've done so far and where you struggle
[19:43:37] ght: I'll figure it out on my own, thanks just the same.
[19:43:53] postmodern: ghormoon, require 'json'
[19:43:58] postmodern: ght, require 'json'
[19:44:09] postmodern: ght, also use a Hash to store names/lunches
[19:44:15] postmodern: ght, your_var.to_json
[19:44:59] adamski2600: has joined #ruby
[19:48:18] bf4: has joined #ruby
[19:49:46] blackmesa: has joined #ruby
[19:50:33] i8igmac: has joined #ruby
[19:51:03] JDiPierro: has joined #ruby
[19:51:14] yardenbar: has joined #ruby
[19:52:06] k3asd`: has joined #ruby
[19:53:22] JohnBat26: has joined #ruby
[19:54:40] mesamoo: has joined #ruby
[19:55:12] Senjai: Gday ruby
[19:55:21] lkba_: has joined #ruby
[19:56:20] d5sx43: has joined #ruby
[19:56:41] jeanlinux: has joined #ruby
[19:57:15] PlasmaStar: has joined #ruby
[19:57:28] Senjai: Almost done setting up arch
[19:57:37] apeiros: reminds me???
[19:57:42] apeiros: should set up a DO instance too
[19:57:46] Senjai: Switched to urxvt, and to awesome wm
[19:57:54] Senjai: Also getting rid of zprezto
[19:58:07] apeiros: trying germany this time. curious to see the difference in latency compared with amsterdam
[19:58:12] apeiros: do = digital ocean
[19:58:27] apeiros: a droplet in the ocean???
[19:58:39] Senjai: I will be installing openbsd on my next droplet
[19:58:48] symm-: has joined #ruby
[19:58:48] adaedra: got big latency with NL?
[19:59:19] apeiros: fine IMO. but could get lower.
[19:59:57] Senjai: apeiros: What are you hosting?
[20:00:12] apeiros: some small things I do besides work
[20:00:23] apeiros: like ruby-community.com ;-)
[20:00:50] stantonnet: has joined #ruby
[20:00:53] hololeap: has joined #ruby
[20:02:14] codecop: has joined #ruby
[20:02:17] codecop_: has joined #ruby
[20:07:47] beilabs_: has joined #ruby
[20:10:13] alex88: has joined #ruby
[20:12:17] swgillespie: has joined #ruby
[20:12:33] Omilun: has joined #ruby
[20:13:29] sebbers_: has joined #ruby
[20:14:01] peter_paule: has joined #ruby
[20:17:48] benanne: has joined #ruby
[20:18:17] Pupeno: has joined #ruby
[20:19:14] Spami: has joined #ruby
[20:19:30] sebbers_: where are you guys from?
[20:19:40] sebbers_: have a good 4th?
[20:20:49] radialneon: has joined #ruby
[20:20:49] theahindle: apeiros: Hey, what is the .slim on your views files for ruby-community?
[20:20:59] theahindle: Looks like it minimises the HTML you have to write
[20:21:06] therod: has joined #ruby
[20:21:46] apeiros: theahindle: it's a markup language, and yes, it translates to html
[20:22:03] apeiros: theahindle: http://slim-lang.com
[20:25:21] Rollabunna: has joined #ruby
[20:25:28] Yiota: has joined #ruby
[20:28:51] fantazo: has joined #ruby
[20:29:09] seal: has joined #ruby
[20:30:17] JeramyRR: has joined #ruby
[20:30:58] Miesco: has joined #ruby
[20:31:12] Miesco: Okay... what is up with this ruby-install. I can't run ruby as root...
[20:32:05] sebbers_: has left #ruby: ()
[20:32:16] j4cknewt: has joined #ruby
[20:32:32] havenwood: Miesco: You want to install in your root user home dir?
[20:32:41] Yiota: has joined #ruby
[20:32:56] Miesco: havenwood: Well, no. I thought it would install globally
[20:33:09] havenwood: To install to /usr/local: ruby-install --system
[20:34:21] Miesco: havenwood: Is that common?
[20:34:22] Omilun: hello i need help for fix my first ruby code : http://dpaste.com/13WH5PY
[20:35:09] workmad3: has joined #ruby
[20:35:10] havenwood: Miesco: You can install elsewhere with `--intsall-dir` but yeah `--system`.
[20:35:17] havenwood: --install-dir*
[20:35:45] oddmunds: Omilun: what is wrong with it?
[20:35:47] Miesco: havenwood: Is it common to use --system?
[20:35:54] havenwood: Miesco: If you just want one Ruby /usr/local is a good way to do it. Yup, that's common.
[20:36:35] Miesco: I got an error from `ruby-install --system`
[20:36:40] havenwood: Miesco: If you want to use chruby to switch Rubies just install to the default location where it will be detected.
[20:36:47] havenwood: Miesco: What error?
[20:36:47] apeiros: Omilun: why gets(''). why do you pass an empty string as param to gets?
[20:37:20] apeiros: Omilun: also note that variables starting with an upper case letter are constants. you should change the ones in your code to lowercase named variables.
[20:37:29] Miesco: ruby-install: too few arguments
[20:37:34] Miesco: havenwood: ^
[20:37:57] Miesco: havenwood: Wait, why don't I just install it with my package manager?
[20:38:05] blackmesa: has joined #ruby
[20:38:06] havenwood: Miesco: Good question?
[20:38:12] Miesco: havenwood: i was told not to
[20:38:30] Omilun: apeiros: ammm i dont know i know cin and cout in c++
[20:38:42] havenwood: Miesco: But it'd be: ruby-install ruby 2.2.2 --system --sha256 5ffc0f317e429e6b29d4a98ac521c3ce65481bfd22a8cf845fa02a7b113d9b44
[20:38:51] Omilun: apeiros: so u understand my code?
[20:38:53] havenwood: Miesco: What OS/distro?
[20:38:57] Miesco: havenwood: debian
[20:39:13] Omilun: apeiros: do*
[20:39:15] apeiros: Omilun: I understand what you intend to do, yes. oddmunds' question is still up, though.
[20:39:34] Miesco: How do I use ruby-install do uninstall everything it installed
[20:40:04] havenwood: Miesco: rm -rf /opt/rubies
[20:40:31] Miesco: havenwood: And what about all the gem stuff
[20:40:32] havenwood: Miesco: Or cd to the src dir and make uninstall.
[20:40:33] Omilun: oddmunds: i have problem with gets and #{se} in my code
[20:42:09] oddmunds: what is the problem with gets?
[20:42:09] apeiros: Omilun: and your problem with "gets" is that it keeps reading and your code does not continue?
[20:42:33] gregf: has joined #ruby
[20:42:35] havenwood: Miesco: src in /usr/local/src
[20:42:43] havenwood: Miesco: Check?: gem env gemdir
[20:43:17] Omilun: apeiros: i need cin>> a inpute.... and show mr or miss in #{se} too
[20:43:35] havenwood: Miesco: ruby-all-dev
[20:43:38] oddmunds: try gets without the '' argument
[20:43:53] havenwood: Miesco: Assuming you're on Jessie: https://packages.debian.org/jessie/ruby-all-dev
[20:43:58] oddmunds: like SEX = gets
[20:44:05] mistermocha: has joined #ruby
[20:44:08] stoodfarback: has joined #ruby
[20:44:10] Omilun: oddmunds: gets() this way?
[20:44:11] Miesco: havenwood: so rm -rf ~/.gem?
[20:44:22] oddmunds: Omilun: or like that yes
[20:44:23] havenwood: Miesco: If you want to nuke those gems, yup.
[20:44:38] Miesco: havenwood: Then I will have everything gone?
[20:44:39] havenwood: Miesco: And that's it.
[20:44:44] havenwood: Miesco: Yup
[20:45:31] Omilun: oddmunds: ooo u are right ... thx
[20:45:51] Miesco: havenwood: Okay thanks. Installing with package manager so I will stay sane.
[20:46:09] Omilun: oddmunds: and i need to see mr or miss /mrs in #{se}
[20:46:09] havenwood: Miesco: If you want to install gems locally with the package manager Ruby install gems with `--user-install` or add it to your .gemrc.
[20:46:34] havenwood: Miesco: gem: "--user-install --env-shebang"
[20:46:35] JeramyRR: has joined #ruby
[20:47:08] rbennacer: has joined #ruby
[20:47:22] havenwood: Miesco: If you just need one version of Ruby and your package manager has that version, great!
[20:48:13] havenwood: Miesco: If you need a version it doesn't have, ruby-install to /usr/local. Or if you need multiple versions, ruby-install to default location and switch with chruby.
[20:48:35] niemcu: has joined #ruby
[20:49:06] bf4: has joined #ruby
[20:49:39] Miesco: havenwood: But then I would have to uninstall from my package manager if I use ruby-instal?
[20:49:51] havenwood: Miesco: chruby system
[20:49:59] havenwood: Miesco: ^ will switch to system Ruby
[20:50:10] Omilun: oddmunds: can i do this?
[20:50:54] havenwood: Miesco: Or you can use chruby to even switch between different package manager Rubies as well, see: https://gist.github.com/jhass/8839655bb038e829fba1
[20:51:05] chouhoulis: has joined #ruby
[20:51:16] havenwood: Miesco: So ruby-install to install anywhere and chruby to switch to any Ruby.
[20:52:18] havenwood: Miesco: But yeah, totally unnecessary if you have a nice package and that suffices.
[20:52:28] oddmunds: Omilun: hmmm im looking at it now, not sure why it doesnt work
[20:52:32] oddmunds: give me a minute
[20:52:43] Miesco: havenwood: Okay, and why is my rails in ~/.gem when I installed the rails debian package?
[20:53:24] Hanmac: has joined #ruby
[20:53:26] Omilun: oddmunds: thx
[20:53:31] havenwood: Miesco: After installing ruby-all-dev and a `gem install rails`?
[20:53:46] Scroff: has joined #ruby
[20:53:50] oddmunds: Omilun: oh, i know
[20:53:53] christiandsg: has joined #ruby
[20:54:05] oddmunds: it is because your input includes the newline (return)
[20:54:32] marr: has joined #ruby
[20:55:02] Omilun: oddmunds: ammm how can i fix that?
[20:55:13] oddmunds: Omilun: replace your gets() with gets().strip()
[20:55:18] Al3ks: has joined #ruby
[20:55:22] havenwood: Miesco: Maybe they switched to a --user-install default? I don't know.
[20:55:28] Miesco: havenwood: Do you know who installed '/var/lib/gems/2.1.0/'?
[20:55:39] Miesco: havenwood: I did: apt-get install rails
[20:56:40] havenwood: I don't know about the rails package or how well it works.
[20:57:01] bronson: has joined #ruby
[20:57:08] daas: has joined #ruby
[20:57:09] postmodern: Miesco, i'd recommend against installing gems from apt-get, they are usually out of date or packaged incorrectly
[20:57:25] Miesco: havenwood: I really want to know where /var/lib/gems/ came from... It wasn't from debian packages 'ruby' or 'rails'
[20:57:34] Omilun: oddmunds: thxxxxxxxxxxxxxx what is .strip()?
[20:58:03] Hobogrammer: has joined #ruby
[20:58:11] havenwood: Miesco: I use RubyGems for gems. What postmodern said.
[20:58:38] oddmunds: Omilun: it removes leading and tailing whitespace http://ruby-doc.org/core-2.2.0/String.html#method-i-strip
[20:58:43] oddmunds: Omilun: no problem
[20:58:59] volsus: has joined #ruby
[20:59:06] Omilun: oddmunds: thx dude
[21:00:25] Miesco: havenwood: There is no package on debian that installs /var/lib/gems...
[21:00:42] war_pigs: has joined #ruby
[21:00:44] Miesco: havenwood: I guess it must of been from the gem command?
[21:00:58] Miesco: havenwood: Would it be okay to rm -rf /var/lib/games?
[21:00:59] tubuliferous_: has joined #ruby
[21:01:23] havenwood: Miesco: Sounds like system RubyGems gem directory?
[21:01:32] havenwood: Miesco: Dunno.
[21:02:15] Papierkorb: has joined #ruby
[21:04:51] railsForDaiz: has joined #ruby
[21:05:18] workmad3: has joined #ruby
[21:06:45] jordsmi: has joined #ruby
[21:07:02] Rollabunna: has joined #ruby
[21:07:12] destra33: has joined #ruby
[21:07:32] baweaver: has joined #ruby
[21:08:00] abyss: has joined #ruby
[21:09:13] rbennacer: has joined #ruby
[21:09:43] northfurr: has joined #ruby
[21:10:34] chipotle: has joined #ruby
[21:13:03] rbennacer: has joined #ruby
[21:13:57] Pupeno: has joined #ruby
[21:14:49] mary5030: has joined #ruby
[21:15:12] Muhannad: has joined #ruby
[21:15:42] armyriad: has joined #ruby
[21:17:00] rbennacer: has joined #ruby
[21:20:16] alphaatom: has joined #ruby
[21:21:25] k3asd`: has joined #ruby
[21:22:37] eggoez: has joined #ruby
[21:23:37] arooni-mobile: has joined #ruby
[21:24:08] aotg: has joined #ruby
[21:24:52] al2o3-cr: has joined #ruby
[21:25:22] rbennacer: has joined #ruby
[21:27:37] ignoch: has joined #ruby
[21:29:09] christiandsg: has joined #ruby
[21:31:28] yokel: has joined #ruby
[21:32:18] Omilun: how can i take a mod from two number ? for ex: 20 mod 6
[21:32:27] Vile`: has joined #ruby
[21:32:52] ruboto: havenwood # => 2 (https://eval.in/393050)
[21:32:53] havenwood: >> 20.modulo 6
[21:32:54] ruboto: havenwood # => 2 (https://eval.in/393051)
[21:33:15] genpaku: has joined #ruby
[21:35:01] Omilun: havenwood: aha ...thx
[21:35:21] ramaflap: has joined #ruby
[21:35:22] Omilun: havenwood: % is nice :D
[21:37:25] adaedra: It's a common sign for modulo
[21:39:34] matp: has joined #ruby
[21:44:34] workmad3: has joined #ruby
[21:44:39] dfockler: has joined #ruby
[21:45:23] Pupeno: has joined #ruby
[21:45:23] Pupeno: has joined #ruby
[21:45:29] devbug: has joined #ruby
[21:45:42] asif: has joined #ruby
[21:46:02] michael_mbp: has joined #ruby
[21:47:20] j4cknewt: has joined #ruby
[21:47:38] mistermocha: has joined #ruby
[21:48:25] Yiota: has joined #ruby
[21:50:40] wallerdev: has joined #ruby
[21:52:43] j4cknewt: has joined #ruby
[21:53:30] hotpancakes: has joined #ruby
[21:54:25] crdpink2: has joined #ruby
[21:56:18] Musashi007: has joined #ruby
[21:57:44] Surger: has joined #ruby
[21:58:13] kjones_: has joined #ruby
[21:58:57] tmtwd: has joined #ruby
[22:00:13] nofxx: has joined #ruby
[22:00:31] nofxx: has joined #ruby
[22:01:33] Rollabunna: has joined #ruby
[22:02:23] enders: has joined #ruby
[22:02:24] decoponyo: has joined #ruby
[22:03:28] Scroff: has joined #ruby
[22:04:10] abyss: has joined #ruby
[22:06:34] rbennacer: has joined #ruby
[22:08:00] Pupeno: has joined #ruby
[22:09:59] hotpancakes: has joined #ruby
[22:10:34] dviola: has joined #ruby
[22:13:48] blackmesa: has joined #ruby
[22:16:05] wallerdev: has joined #ruby
[22:16:11] yayfoxes: has joined #ruby
[22:17:47] hololeap: has joined #ruby
[22:17:51] abuzze: has joined #ruby
[22:18:11] war_pigs: has joined #ruby
[22:19:53] bf4: has joined #ruby
[22:22:20] arooni-mobile: has joined #ruby
[22:22:23] Soda: has joined #ruby
[22:23:58] finisherr: has joined #ruby
[22:24:43] jbwiv: has joined #ruby
[22:25:48] bullcitydev: has joined #ruby
[22:26:17] df: has joined #ruby
[22:27:23] christiandsg: has joined #ruby
[22:28:36] wallerdev: has joined #ruby
[22:28:45] perrier: has joined #ruby
[22:29:32] bruno-: has joined #ruby
[22:34:27] A205B064: has joined #ruby
[22:34:56] hololeap: has joined #ruby
[22:35:31] intyl: has joined #ruby
[22:37:37] Tarkers34|2: has joined #ruby
[22:40:11] bruno-: has joined #ruby
[22:43:59] elektronaut: has joined #ruby
[22:44:13] drPoggs: has joined #ruby
[22:44:15] _whitelogger: has joined #ruby
[22:44:52] LJT: has joined #ruby
[22:45:33] Pupeno: has joined #ruby
[22:50:02] christiandsg: has joined #ruby
[22:50:06] jbw_: has joined #ruby
[22:50:31] JDiPierro: has joined #ruby
[22:51:50] chouhoulis: has joined #ruby
[22:55:35] Rollabunna: has joined #ruby
[22:57:25] [Keith]: has joined #ruby
[22:58:36] mary5030: has joined #ruby
[22:59:29] blackmesa: has joined #ruby
[22:59:47] sarkyniin: has joined #ruby
[23:00:37] jbwiv: has joined #ruby
[23:04:01] RandyT: has joined #ruby
[23:06:18] armyriad: has joined #ruby
[23:07:51] Tarkers34|2: has joined #ruby
[23:09:48] radialneon: has joined #ruby
[23:11:09] ledestin: has joined #ruby
[23:13:14] bruno-: has joined #ruby
[23:13:18] dgutierrez1287: has joined #ruby
[23:15:32] eggoez: has joined #ruby
[23:15:32] shellie_: has joined #ruby
[23:15:32] RandyT: has joined #ruby
[23:18:14] devbug_: has joined #ruby
[23:23:08] Exuma: has joined #ruby
[23:23:58] devbug: has joined #ruby
[23:26:05] diegoviola: has joined #ruby
[23:26:35] devbug_: has joined #ruby
[23:28:37] bronson: has joined #ruby
[23:28:44] iamninja: has joined #ruby
[23:31:11] tkuchiki: has joined #ruby
[23:31:54] Ropeney: has joined #ruby
[23:33:15] workmad3: has joined #ruby
[23:35:00] jbw_: has joined #ruby
[23:35:01] dgutierrez1287: has joined #ruby
[23:36:06] Yzguy: has joined #ruby
[23:36:15] LJT: has joined #ruby
[23:37:01] ledestin: has joined #ruby
[23:38:26] ivanskie: has joined #ruby
[23:39:34] tmtwd: my ruby -v outputs 2.2 but when I install a gem (byebug) it says I need at least 2.0
[23:39:39] gix: has joined #ruby
[23:40:41] radialneon: has joined #ruby
[23:40:58] tubuliferous_: has joined #ruby
[23:41:02] Darkwater: tmtwd: maybe gem is using an out-of-date ruby installation?
[23:41:31] tmtwd: Darkwater, you mean I need to update gem?
[23:42:27] devbug: has joined #ruby
[23:42:44] toretore: `which ruby`
[23:42:47] toretore: `which gem`
[23:43:40] iateadonut: has joined #ruby
[23:45:01] jbwiv: has joined #ruby
[23:45:12] rawtext: has joined #ruby
[23:45:40] tmtwd: ~/ruby.d $ which ruby
[23:45:41] tmtwd: ~/ruby.d $ which gem
[23:45:41] tmtwd: ~/ruby.d $
[23:46:01] tmtwd: tmtwd@timothy:~/ruby.d$ which gem ??? CATCGTAATGACGGCCT
[23:47:15] tmtwd: eh, I guess I'll just use pry ... thats really odd
[23:47:41] arooni-mobile: has joined #ruby
[23:47:48] arooni-mobile__: has joined #ruby
[23:49:52] Rollabunna: has joined #ruby
[23:50:36] bf4: has joined #ruby
[23:51:22] devbug_: has joined #ruby
[23:53:08] mistermocha: has joined #ruby
[23:54:41] devbug__: has joined #ruby
[23:56:55] ruurd: has joined #ruby
[23:57:20] Oog: has joined #ruby
[23:57:20] radialneon: has joined #ruby
[23:57:44] thedonkdonk: has joined #ruby
[23:57:50] devbug: has joined #ruby
[23:57:55] Oog: module ShiftWindow; def ShiftWindow.foo(time); ...; end; end - is there a difference in ShiftWindow.foo and ShiftWindow::foo ? both seem to work
[23:59:41] thedonkdonk: not sure if this the right place to ask about Ruby on Rails questions?