« Back to channel list

#ruby - 14 April 2016

« Back 1 day Forward 1 day »
[00:00:05] shevy: you should be able to install gems into your home dir, usually via --user-install
[00:00:09] Cohedrin_: has joined #ruby
[00:00:21] shevy: pilne yeah, that is one big reason for rbenv etc...
[00:00:34] shevy: centos still has... ruby ... 1.8.6?
[00:00:44] darix: shevy: gem install --user-install is enough for that.
[00:00:48] pilne: well.. centos and RHEL are very slow to update
[00:00:49] darix: shevy: centos 6
[00:00:55] darix: centos7 is newer
[00:00:59] shevy: darix yes did I not mention --user-install :D
[00:01:13] edwinvdgraaf: has joined #ruby
[00:01:14] darix: shevy: and here is a fun fact: we enterprise distros would have loved to update ruby
[00:01:21] darix: if it would have been backward compatible
[00:01:37] Devalo: has joined #ruby
[00:01:52] darix: shevy: main reason why we did multi version packaging for opensuse/suse. so we can provide newer ruby while keeping the system ruby stable
[00:02:26] pilne: ubuntu is up to 2.2, but ruby seems to be going through a bit of an evolution (in a good way?) lately.
[00:02:58] shevy: they are getting closer to 2.3!
[00:03:00] darix: shevy: any many users who get send to rbenv and friends ... maybe should update their OS to the latest version
[00:03:12] darix: which would get them something more recent already
[00:03:19] havenwood: pilne: Use the Brightbox packages for Ubuntu.
[00:03:36] shevy: darix like ruby 2.0.0!
[00:03:50] pilne: havenwood-: i will now :) but thanks to you i did just learn about them :)
[00:04:25] charliesome_: has joined #ruby
[00:05:50] shevy: pilne which ruby version will you be using?
[00:06:07] Vile`: has joined #ruby
[00:06:19] pilne: not quite sure yet, i'm going to find a few tutorials and see what i should go for after that
[00:06:44] Ox0dea: pilne: Use 1.0 for a while to accrue maximum appreciation for the language in its current state.
[00:07:23] darix: i actually had to maintain ruby 1.4 for a while :p
[00:07:42] Ox0dea: All my keks: https://eval.in/553091
[00:09:01] patrick_star: has joined #ruby
[00:09:11] zast: has joined #ruby
[00:09:44] karmatr0n: has joined #ruby
[00:15:58] GodFather: has joined #ruby
[00:20:55] DLSteve: has joined #ruby
[00:24:24] pawnbox: has joined #ruby
[00:26:18] Jonah11_: has joined #ruby
[00:27:45] flashpoint9: has joined #ruby
[00:27:47] kadoppe: has joined #ruby
[00:29:07] tax: has joined #ruby
[00:32:06] bruno-_: has joined #ruby
[00:32:46] nando293921: has joined #ruby
[00:33:44] Respek: has joined #ruby
[00:35:03] benlieb: has joined #ruby
[00:35:27] cpup: has joined #ruby
[00:35:55] hays: has joined #ruby
[00:38:45] ixti: has joined #ruby
[00:39:50] jgt1: has joined #ruby
[00:40:50] FooMunki: has joined #ruby
[00:41:32] bob434: has joined #ruby
[00:41:55] Xeago: has joined #ruby
[00:43:51] ICantCook: has joined #ruby
[00:44:01] gevans: has joined #ruby
[00:45:12] PaulCapestany: has joined #ruby
[00:47:36] Affix: has joined #ruby
[00:48:10] vondruch: has joined #ruby
[00:52:54] cdg: has joined #ruby
[00:53:26] thistle: has joined #ruby
[00:53:43] GodFoddar: has joined #ruby
[00:54:28] pawnbox: has joined #ruby
[00:55:38] BSaboia: has joined #ruby
[00:56:27] llroll: has joined #ruby
[00:56:32] cpup: has joined #ruby
[00:56:49] llroll: what is meant by everything being an object in ruby?
[00:58:19] bronson: has joined #ruby
[00:59:50] hxegon: has joined #ruby
[00:59:52] Ox0dea: llroll: In many languages, numbers are "primitives"; you're not at liberty to do certain things with them that the language itself can do.
[01:00:30] Ox0dea: In JavaScript, for instance, you can usually say `type.prototype.foo = ...` to add a `foo` method to all instances of `type`, but that type can't be `Number`.
[01:01:23] Ox0dea: That's not the case in Ruby, where, since instances of Integer are bona fide Objects, and thus have the full-blown behavior you'd find on more "object-like" things.
[01:01:29] klagid: has joined #ruby
[01:02:13] thistle_: has joined #ruby
[01:02:36] LKovax: has joined #ruby
[01:03:03] jdelaney: has joined #ruby
[01:03:57] symm-: has joined #ruby
[01:04:23] arescorpio: has joined #ruby
[01:05:38] lkba_: has joined #ruby
[01:05:54] llroll: Ox0dea: i appreciate you taking the time to explain it to me, but i am a beginner
[01:06:08] llroll: i know javascript and ruby and i have to say that ruby is much easier to work with
[01:06:08] Es0teric: has joined #ruby
[01:07:21] dezull: has joined #ruby
[01:07:37] darkf_: has joined #ruby
[01:07:51] llroll: is there no difference between a method and a function?
[01:08:01] Ox0dea: A method is a function attached to an object.
[01:08:14] Ox0dea: The object "owns" the method, as it were.
[01:09:12] llroll: that's confusing
[01:09:19] JakFrist: has joined #ruby
[01:09:42] Ox0dea: As for JavaScript being "harder" than Ruby, it does suffer from a small standard library, but the core concepts are pretty similar. Good code in either language tends to leverage closures and composition to good effect.
[01:09:44] LKovax: Simple question from a newbie: looking for the best Ruby GUI toolkit to develop simple progs for Windows environment. Shoes? VisualRuby w/ Glade (although don't see a 64bit version of this)? Just trying to get my bearings here....
[01:09:58] Ox0dea: LKovax: A dark road.
[01:10:20] LKovax: I'm getting the impression...
[01:10:39] Ox0dea: llroll: A function can be invoked with anything; with objects and methods, there's arguably more structure.
[01:12:17] Ox0dea: Of course, plenty of non-OO languages check the arguments to function calls, but that just speaks to the essential equivalence of the various paradigms.
[01:13:17] chouhoulis: has joined #ruby
[01:14:38] todd: has joined #ruby
[01:16:21] terminalrecluse: has joined #ruby
[01:18:05] kadoppe: has joined #ruby
[01:18:22] klagid: has joined #ruby
[01:18:55] lele: has joined #ruby
[01:21:01] skweek: has joined #ruby
[01:22:53] pilne: has joined #ruby
[01:23:47] krz: has joined #ruby
[01:24:24] pawnbox: has joined #ruby
[01:25:03] shazaum_: has joined #ruby
[01:28:05] KevinIzKoolEh: has joined #ruby
[01:28:05] shevy: he was surely very interested in his own question :)
[01:28:18] KevinIzKoolEh: what question is that?
[01:28:26] tubuliferous: has joined #ruby
[01:28:40] taylorjb: has joined #ruby
[01:29:11] phreakocious: has joined #ruby
[01:29:11] ruby[bot]: +b phreakocious!*@*$#ruby-banned
[01:29:11] ruby[bot]: ruby[bot] kicked phreakocious: back when you have a ruby question
[01:29:26] ruby[bot]: -b phreakocious!*@*$#ruby-banned
[01:30:49] ssiris: has joined #ruby
[01:30:51] P_R_Delts: Is there a reason why this: https://gist.github.com/PRDeltoid/c959108121d2d5183de5841f57a61f4b would give a "unexpected keyword end" and then "unexpected end of input, expecting keyword_end" ?
[01:30:54] shevy: LKovax ruby-gtk should work fine
[01:31:09] BSaboia: has joined #ruby
[01:31:15] tvon: has joined #ruby
[01:31:16] shevy: what is steps++
[01:31:18] kadoppe: has joined #ruby
[01:31:19] Ox0dea: P_R_Delts: No `do` on `until`.
[01:31:28] P_R_Delts: Is there no ++ in Ruby?
[01:31:35] P_R_Delts: I've never seen a language without it, I just assumed
[01:31:37] Ox0dea: No, Fixnums are immutable.
[01:31:42] Ox0dea: They're just tagged pointers under the hood.
[01:32:01] Ox0dea: It's not entirely clear what it would even mean to "move a memory address".
[01:32:57] P_R_Delts: Well that was simple
[01:33:02] ljarvis: has joined #ruby
[01:33:04] shevy: simple is good!
[01:33:12] P_R_Delts: is it best practice to just do +=1?
[01:33:27] Ox0dea: Better still to avoid explicit looping.
[01:33:28] shevy: for corresponding number++, yes
[01:33:32] P_R_Delts: Or is there another method? I saw someone mention .increment, but it was a Ruby on Rails question
[01:33:39] elifoster: has joined #ruby
[01:33:45] dezull: has joined #ruby
[01:33:53] Ox0dea: >> [41.next, 41.succ]
[01:33:55] ruby[bot]: Ox0dea: # => [42, 42] (https://eval.in/553100)
[01:33:55] shevy: usually you would not need an extra counter though, if you have a collection that can respond to .each or .each_with_index
[01:33:57] LoneHerm_: has joined #ruby
[01:34:33] pawnbox: has joined #ruby
[01:35:24] P_R_Delts: I dunno if that is true in this case, shevy
[01:35:35] shevy: yeah probably not there
[01:35:36] binaryplease: has joined #ruby
[01:35:44] P_R_Delts: The challenge was to write something that would determine how many times a number had to be added to it's reverse to create a palindrome
[01:35:59] P_R_Delts: so I need some way to count the amount of times that is done
[01:36:32] Esya: has joined #ruby
[01:36:36] phreakocious: has joined #ruby
[01:36:36] ruby[bot]: ruby[bot] kicked phreakocious: banned before
[01:36:58] Ox0dea: P_R_Delts: Just a sec.
[01:37:34] phreakocious: has joined #ruby
[01:37:34] ruby[bot]: ruby[bot] kicked phreakocious: banned before
[01:37:52] jolts: has joined #ruby
[01:38:37] balrgh: has joined #ruby
[01:40:56] Ox0dea: P_R_Delts: https://eval.in/553101
[01:41:15] Ox0dea: All that reversing is noisy, but the overall idea is there.
[01:41:26] jolts: has joined #ruby
[01:41:53] Ox0dea: Bonus points for keeping the intermediates? Probably not. :P
[01:41:55] matp: has joined #ruby
[01:42:56] P_R_Delts: What is the n ame of of the << operation?
[01:42:59] P_R_Delts: I can't google it
[01:43:14] P_R_Delts: Oh, is it Push?
[01:43:14] Ox0dea: That's the "shovel".
[01:43:21] Ox0dea: But yeah, it's an alias for #push on Array.
[01:43:57] Ox0dea: http://ruby-operators.herokuapp.com/#/shovel
[01:45:16] jolts: has joined #ruby
[01:45:37] KevinIzKoolEh: are instance variables hoisted to the top of the class?
[01:45:46] Ox0dea: KevinIzKoolEh: They spring into existence.
[01:45:56] KevinIzKoolEh: what do you mean?
[01:46:02] KevinIzKoolEh: like in javascript hoisting exists
[01:46:09] LKovax: shevy Thanks I'll look into it.
[01:46:09] Ox0dea: You can refer to them without having previously defined them, and you'll get `nil`.
[01:46:13] KevinIzKoolEh: instance variables are global variables right?
[01:46:26] Ox0dea: Not at all.
[01:46:28] shevy: why do you automatically associate "instance" with "global"
[01:46:34] Ox0dea: That's quite a leap.
[01:47:11] Yiota: has joined #ruby
[01:47:46] Ox0dea: KevinIzKoolEh: It's perhaps illuminating to think of them as "object variables", insofar as they only ever belong to exactly one Object.
[01:47:59] Ox0dea: They're called instance variables because every object is an instance of some class.
[01:48:45] edwinvdgraaf: has joined #ruby
[01:48:51] jolts: has joined #ruby
[01:48:57] jhack: has joined #ruby
[01:49:13] crank1988: has joined #ruby
[01:49:23] KevinIzKoolEh: holy shit this is complicated
[01:50:04] baweaver: Canadian troll?
[01:50:18] Ox0dea: I'm terrifying tonight.
[01:52:25] Vile`: has joined #ruby
[01:52:37] jolts: has joined #ruby
[01:52:51] balrgh: I'm wondering if perhaps there is a dry way to do this that would achieve the same result of allowing for simple meta-programming? http://pastie.org/10797067#2-10
[01:53:42] eshea: has joined #ruby
[01:53:50] Spami: has joined #ruby
[01:54:54] balrgh: this Proc will always be passed an array of two element arrays, and sometimes counts need to be done for unique values of each element
[01:54:57] pawnbox: has joined #ruby
[01:55:12] hakunin: has joined #ruby
[01:56:12] jolts: has joined #ruby
[01:57:19] baweaver: looks like a mess honestly
[01:57:27] Maletor: has joined #ruby
[01:57:36] balrgh: yeah, it was not bad when it didn't require nesting
[01:57:43] karmatr0n: has joined #ruby
[01:58:13] baweaver: what exactly are you trying to do?
[01:59:18] lemur: has joined #ruby
[01:59:28] wilbert: has joined #ruby
[01:59:29] jolts: has joined #ruby
[01:59:30] Radar: It looks like you're trying to reimplement Elasticsearch in Ruby. Can I suggest not?
[01:59:50] Radar: Maybe I'm reading it wrong
[01:59:51] balrgh: the end goal is to be able to easily define some parameters that define a collection comprised of filters, aggregations, and post-processing components
[02:00:17] Asher: has joined #ruby
[02:00:47] pilne: has left #ruby: ("Leaving!")
[02:01:05] balrgh: defining the post processing should be as simple as giving it an array of processes to execute on the final data
[02:01:07] baweaver: Too DRY is BRITTLE (Badly refactored into tiny things lacking expressiveness)
[02:01:28] balrgh: each of which can change what fields are returned as they do what they do
[02:01:29] Ox0dea: balrgh: https://github.com/thbar/kiba
[02:01:59] balrgh: yeah, but this is specifically for handling netflow data
[02:02:09] Ox0dea: https://rubygems.org/gems/foot_pistol
[02:02:11] balrgh: which is a fairly specialized area
[02:02:37] baweaver: Ox0dea: it does look like an ETL (Extract Transform Load) type problem
[02:02:58] balrgh: it is, but the ETL system I have to work with is not under my control :)
[02:03:02] jolts: has joined #ruby
[02:03:05] Devalo: has joined #ruby
[02:03:07] Ox0dea: What does that mean?
[02:03:24] baweaver: As that may be, you're implementing another ETL
[02:03:25] balrgh: I'm limited by the capabilities of the tools that can look at the data
[02:03:34] rbennacer: has joined #ruby
[02:03:35] baweaver: ETLs can be chained
[02:03:49] balrgh: this code builds command lines for those tools that exploit all of its capabilities
[02:03:54] baweaver: primarily because of forks in data
[02:03:56] balrgh: and what it can't do needs to be written here
[02:04:46] fedexo: has joined #ruby
[02:04:48] balrgh: for example, it can do all of the data summarization and aggregation, but it can't do the counts
[02:04:50] baweaver: I wouldn't use a hash for that.
[02:05:15] baweaver: module Transformers; def self.extractify() 'foo' end end
[02:05:32] baweaver: otherwise testing them will be a nightmare
[02:06:23] hxegon: has joined #ruby
[02:06:35] jolts: has joined #ruby
[02:07:27] balrgh: yeah, going OO is probably the right move
[02:07:28] Ropeney: has joined #ruby
[02:08:04] baweaver: It's not OO per-se, just remember Ruby is primarily OO
[02:08:13] baweaver: that's just namespacing your functions
[02:08:25] baweaver: Look into Spark and some of their API
[02:08:45] amitchellbullard: has joined #ruby
[02:09:14] momo-reina: has joined #ruby
[02:09:30] andersh: has joined #ruby
[02:09:53] jolts: has joined #ruby
[02:10:09] lomex: has joined #ruby
[02:11:05] krz: has joined #ruby
[02:11:12] Guest4184_______: has joined #ruby
[02:11:21] Spami: has joined #ruby
[02:11:28] kadoppe: has joined #ruby
[02:12:33] Sadin: has joined #ruby
[02:12:53] yfeldblum: has joined #ruby
[02:13:12] jolts: has joined #ruby
[02:13:14] balrgh: thanks for the input, though, all :)
[02:14:10] GodFodder: has joined #ruby
[02:16:59] jolts: has joined #ruby
[02:17:03] SilverKey: has joined #ruby
[02:17:14] diegoaguilar: has joined #ruby
[02:17:59] LKovax: has joined #ruby
[02:20:49] jolts: has joined #ruby
[02:21:14] jsaak: has joined #ruby
[02:21:34] fschuindt: has joined #ruby
[02:21:35] cdg: has joined #ruby
[02:22:35] IrishGringo: has joined #ruby
[02:22:43] tjbiddle: has joined #ruby
[02:23:08] fschuindt: LOL File.read('foo.png') == File.read('bar.png') is false on Linux but true on Windows. Different images, just the size and dimensions are the sabe. They have different content. Does anybody know why?
[02:23:33] fschuindt: "... just the size and dimentions are the same"*
[02:24:20] jolts: has joined #ruby
[02:24:46] Ox0dea: Doubtful.
[02:26:04] Ox0dea: fschuindt: Do you get the same weirdness with `File.binread`?
[02:26:29] fschuindt: let me check
[02:26:39] dcunit3d: has joined #ruby
[02:27:04] yer: has joined #ruby
[02:27:52] jolts: has joined #ruby
[02:27:54] fschuindt: Ox0dea: It worked with binread! Haha, thank you bro. That's kinda strange...
[02:28:21] baweaver: &ri File#read
[02:28:21] `derpy: http://ruby-doc.org/core-2.3.0/IO.html#method-i-read
[02:28:22] Ox0dea: fschuindt: No worries. PNGs can contain line terminators (which shouldn't be interpreted as such for binary data), but that you got equality there is pretty odd.
[02:28:34] chagel: has joined #ruby
[02:28:42] Ox0dea: They must be very small PNGs.
[02:28:50] baweaver: ACTION is too lazy to google that
[02:29:28] fschuindt: Yes, like 50x100 pixels in size.
[02:30:37] Ox0dea: It's gotta be that the reading is being interruped early, then.
[02:31:41] jolts: has joined #ruby
[02:32:18] nprorepti: has joined #ruby
[02:35:27] jolts: has joined #ruby
[02:35:53] chagel: has joined #ruby
[02:37:21] LKovax: has left #ruby: ()
[02:38:29] P_R_Delts: is it safe to drop/change an array in the middle of an "each_with_index" or "each" enumerator?
[02:39:14] jolts: has joined #ruby
[02:39:14] Ox0dea: Are you sure that's what you want?
[02:39:27] braincrash: has joined #ruby
[02:39:34] Ox0dea: #each_with_index with no arguments gives you back an Enumerator; you can chain on it.
[02:39:43] Ox0dea: ary.each_with_index.select { |elem, idx| ... }
[02:39:49] Oswmano: has joined #ruby
[02:40:09] P_R_Delts: I literally just started yesterday so I am pretty new to the language, I didn't know you could do that
[02:40:46] Ox0dea: Ruby's enumeration facilities are second-to-none, I'd wager.
[02:40:49] solocshaw: has joined #ruby
[02:41:58] rbennacer: has joined #ruby
[02:43:18] jolts: has joined #ruby
[02:44:59] P_R_Delts: pretty neat
[02:45:17] P_R_Delts: got closer to the solution using enumeration and chaining together like you suggested
[02:45:56] Ox0dea: In general, the REPL is your playground. Just try things; you'll be surprised how often "wishful programming" Just Works in Ruby.
[02:46:25] P_R_Delts: Ruby... Environment Programming Language?
[02:46:34] Ox0dea: You tried. :P
[02:46:41] Ox0dea: A read-eval-print loop, like irb.
[02:46:47] Ox0dea: Feed it expressions, get back evaluations.
[02:46:52] Ox0dea: Rinse, repeat, learn, love.
[02:47:29] Ox0dea: Doing it in reverse order is also interesting.
[02:47:34] jolts: has joined #ruby
[02:47:40] lkba: has joined #ruby
[02:48:22] P_R_Delts: Why is it that "do" and "then are so often omitted from code I see?
[02:48:33] P_R_Delts: after If and loops and such?
[02:49:23] mozzarella: there's no do with if
[02:49:34] P_R_Delts: that was the "then"
[02:49:41] P_R_Delts: if [condition] [then]
[02:51:22] jolts: has joined #ruby
[02:52:28] balrgh: Ox0dea: may be able to wrap Kiba around this mess in a couple places.. the horizontal code sprawl might be worth it :) thanks for the tip
[02:52:53] Ox0dea: balrgh: No problem. Godspeed. :)
[02:53:08] northrup: has joined #ruby
[02:54:10] northrup: I'm currently confounded by Open3 at the moment and looking for pointers
[02:54:19] northrup: I'm trying to make a system call a la:
[02:54:22] northrup: stdout, stderr, exit_status = Open3.capture3('ping -c4 $host')
[02:54:39] northrup: however, the variable is never accepted and I don't understand why
[02:55:08] jolts: has joined #ruby
[02:56:23] balrgh: northrup: having $host inside of single quotes will cause it to not be expanded... unless that's somehow your intent?
[02:57:28] northrup: balrgh I've thought about that too, double quotes produces the same outcome
[02:58:24] kadoppe: has joined #ruby
[02:58:40] jolts: has joined #ruby
[02:58:45] Coldblackice_: has joined #ruby
[02:58:51] karmatr0n: has joined #ruby
[02:59:00] balrgh: that was the obvious thing.. I use IO.popen, so I dunno :)
[03:00:11] bronson: has joined #ruby
[03:00:43] Xiti: has joined #ruby
[03:02:17] GodFather: has joined #ruby
[03:02:29] jolts: has joined #ruby
[03:06:33] jolts: has joined #ruby
[03:09:49] jolts: has joined #ruby
[03:10:49] chouhoulis: has joined #ruby
[03:10:58] flashpoint9: has joined #ruby
[03:12:45] Outlastsheep: has joined #ruby
[03:13:36] jolts: has joined #ruby
[03:14:49] toretore: has joined #ruby
[03:15:44] staticfox: has joined #ruby
[03:15:45] gregf: has joined #ruby
[03:15:51] braincrash: has joined #ruby
[03:16:53] jolts: has joined #ruby
[03:17:19] FooMunki: has left #ruby: ()
[03:18:48] barajasfab: has joined #ruby
[03:19:11] bronson: has joined #ruby
[03:19:30] hxegon: has joined #ruby
[03:20:25] jolts: has joined #ruby
[03:22:00] jpfuentes2: has joined #ruby
[03:22:00] LoneHerm_: has joined #ruby
[03:22:41] cpup: has joined #ruby
[03:24:11] jolts: has joined #ruby
[03:25:12] BtcBen: has joined #ruby
[03:25:25] kadoppe: has joined #ruby
[03:27:44] jolts: has joined #ruby
[03:29:05] jenrzzz: has joined #ruby
[03:31:01] kadoppe: has joined #ruby
[03:31:16] jolts: has joined #ruby
[03:33:18] rubynoob: has joined #ruby
[03:35:19] jolts: has joined #ruby
[03:36:51] edwinvdgraaf: has joined #ruby
[03:37:35] rubynoob: Hi Everyone. I'm new to ruby and would love some advice on how to deal with the fact that methods have to defined in lines before they are called
[03:37:48] rubynoob: Here's an example of the issue i'm facing. http://pastebin.com/nZjKAQYa
[03:37:53] ruby[bot]: rubynoob: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/b9a917465644d8e18d043f5500f1329b
[03:37:53] ruby[bot]: rubynoob: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[03:39:20] jolts: has joined #ruby
[03:39:28] abyx: has joined #ruby
[03:42:09] rbennacer: has joined #ruby
[03:42:38] jolts: has joined #ruby
[03:43:55] al2o3-cr: rubynoob: that could be numeric, no?
[03:44:24] rubynoob: al2o3-cr: what do you mean?
[03:44:33] IrishGringo: has joined #ruby
[03:45:05] al2o3-cr: could be a fishtank, no?
[03:45:26] Cohedrin: has joined #ruby
[03:45:47] rbennacer: has joined #ruby
[03:45:51] rubynoob: al2o3-cr: can you elaborate?
[03:45:54] freerobby: has joined #ruby
[03:46:00] saramic: has joined #ruby
[03:46:47] chouhoulis: has joined #ruby
[03:46:47] al2o3-cr: rubynoob: why fuck about checking values, when optparse does that shit
[03:46:58] jolts: has joined #ruby
[03:47:38] rubynoob: if i do —profile= or —profile or -p= or -p
[03:48:00] al2o3-cr: do the logic inside of optparse
[03:48:00] rubynoob: it would only catch the cases where = does not exist
[03:48:41] rubynoob: for each one?
[03:49:28] kadoppe: has joined #ruby
[03:50:45] rubynoob: al2o3-cr: do you mind showing me what you're recommending?
[03:50:47] jolts: has joined #ruby
[03:51:33] gix: has joined #ruby
[03:52:00] saramic: has joined #ruby
[03:52:15] al2o3-cr: rubynoob: what you using?
[03:53:29] al2o3-cr: took it for granted you was using optparse :P
[03:53:30] djbkd: has joined #ruby
[03:54:14] rubynoob: what should I be using?
[03:54:17] jolts: has joined #ruby
[03:54:17] rubynoob: i'm a noob to ruby
[03:56:55] rubynoob: it's 2016… you would think a language would allow you to have a function calling a function that is defined in lines below :(
[03:57:36] al2o3-cr: is this a joke?
[03:58:05] al2o3-cr: what you saying then?
[03:58:20] jolts: has joined #ruby
[03:58:29] rubynoob: i'm saying I should be able to have function a call function b despite the fact function b is defined after function a
[03:59:31] al2o3-cr: rubynoob: blocks, fucking blocks
[03:59:53] al2o3-cr: even methods
[04:00:01] karmatr0n: has joined #ruby
[04:00:05] rubynoob: wow you're helpful
[04:00:31] al2o3-cr: rubynoob: sorry :)
[04:00:46] baweaver: has joined #ruby
[04:01:22] rubynoob: no worries, if you don't know how to solve a problem just don't act like you do
[04:01:45] toretore: >> def a; b; end; def b; 'i am b'; end; a
[04:01:47] ruby[bot]: toretore: # => "i am b" (https://eval.in/553126)
[04:02:08] jolts: has joined #ruby
[04:02:14] al2o3-cr: their is no problem to solve, but anyway
[04:02:36] CloCkWeRX: has joined #ruby
[04:03:04] Jonah11_: has joined #ruby
[04:03:22] rubynoob: ok now throw in the variable like in my example
[04:03:35] rubynoob: in my example the variable is "Argument"
[04:03:49] rubynoob: https://gist.github.com/anonymous/b9a917465644d8e18d043f5500f1329b
[04:04:40] toretore: what is the problem exactly?
[04:05:40] al2o3-cr: rubynoob: you don't need to, you're try to parse a parser
[04:05:57] baweaver: has joined #ruby
[04:06:27] jolts: has joined #ruby
[04:06:30] rubynoob: but the parser fails to catch some scenarios
[04:06:43] rubynoob: —profile=
[04:06:47] crameth: has joined #ruby
[04:06:47] rubynoob: o would be empty
[04:06:57] rubynoob: o would be nil
[04:07:13] chipotle: has joined #ruby
[04:07:45] toretore: what does this have to do with calling functions and variables?
[04:07:55] al2o3-cr: rubynoob: gist an example?
[04:08:28] al2o3-cr: where it fails?
[04:09:12] al2o3-cr: ? ignore this shit :)
[04:10:30] jolts: has joined #ruby
[04:12:02] al2o3-cr: optparse does this
[04:12:54] kareeoleez: has joined #ruby
[04:14:14] jenrzzz: has joined #ruby
[04:14:14] jenrzzz: has joined #ruby
[04:14:22] al2o3-cr: just use slop or trollop ;)
[04:14:32] jolts: has joined #ruby
[04:14:38] lxsameer: has joined #ruby
[04:14:58] baweaver: ACTION wanders off again
[04:17:05] theery: has joined #ruby
[04:17:10] kadoppe: has joined #ruby
[04:17:39] A5101: has joined #ruby
[04:17:45] duncannz: has joined #ruby
[04:18:18] jolts: has joined #ruby
[04:18:26] Ox0dea: A troll op.
[04:20:03] shevy: those dam ops!
[04:21:04] bronson: has joined #ruby
[04:21:59] baweaver: ?cookie Ox0dea
[04:22:00] ruby[bot]: Ox0dea: here's your cookie: 🍪
[04:22:38] Ox0dea: >> '' << rand(128512..128538)
[04:22:40] ruby[bot]: Ox0dea: # => "😑" (https://eval.in/553128)
[04:22:51] jolts: has joined #ruby
[04:23:53] al2o3-cr: well fuck me lee
[04:27:56] sphex_: has joined #ruby
[04:28:11] hakunin_: has joined #ruby
[04:28:33] watersoul_: has joined #ruby
[04:28:36] Hobart: has joined #ruby
[04:28:38] duderono_: has joined #ruby
[04:29:41] tvon[laptop]: has joined #ruby
[04:29:50] staticfox`: has joined #ruby
[04:29:57] BrunoSaboia: has joined #ruby
[04:30:12] tuelz3: has joined #ruby
[04:30:15] pietr0_: has joined #ruby
[04:30:18] `adaedra: has joined #ruby
[04:30:18] grumpycat: has joined #ruby
[04:30:38] Dreamer3_: has joined #ruby
[04:30:51] C0deMaver1ck: has joined #ruby
[04:30:52] tommylom1ykins: has joined #ruby
[04:30:54] jolts: has joined #ruby
[04:31:15] Thai_: has joined #ruby
[04:31:28] zzak: has joined #ruby
[04:31:33] saltsa: has joined #ruby
[04:31:41] majjoha: has joined #ruby
[04:31:50] coffeejunk: has joined #ruby
[04:31:51] quarcu_: has joined #ruby
[04:31:53] mprelude: has joined #ruby
[04:31:54] jolts: has joined #ruby
[04:32:12] adam|: has joined #ruby
[04:32:13] knight_: has joined #ruby
[04:32:14] tsunamie: has joined #ruby
[04:32:19] raldu: has joined #ruby
[04:32:29] dcope: has joined #ruby
[04:32:29] djcp: has joined #ruby
[04:32:35] droptone: has joined #ruby
[04:32:45] sesquipe1: has joined #ruby
[04:32:56] jolts: has joined #ruby
[04:33:02] cpup: has joined #ruby
[04:33:12] devyn: has joined #ruby
[04:33:13] papercode: has joined #ruby
[04:33:16] sulky: has joined #ruby
[04:33:38] `derpy: has joined #ruby
[04:33:39] montyboy: has joined #ruby
[04:33:40] _mak: has joined #ruby
[04:33:56] nisstyre: has joined #ruby
[04:34:17] Ariadeno: has joined #ruby
[04:34:41] ruurd: has joined #ruby
[04:34:43] toretore: has joined #ruby
[04:34:47] Tharbakim: has joined #ruby
[04:35:10] Davey: has joined #ruby
[04:35:10] Davey: has joined #ruby
[04:35:13] freerobby: has joined #ruby
[04:36:00] pocketprotector: has joined #ruby
[04:36:00] Cohedrin: has joined #ruby
[04:37:44] hoylemd: has joined #ruby
[04:38:24] saramic: has joined #ruby
[04:39:10] Drakx: has joined #ruby
[04:39:35] rkazak: has joined #ruby
[04:41:15] marens: has joined #ruby
[04:42:02] saramic: has joined #ruby
[04:43:52] diegoaguilar: has joined #ruby
[04:46:32] noService: has joined #ruby
[04:46:46] rbennacer: has joined #ruby
[04:47:43] kadoppe: has joined #ruby
[04:48:02] minimalism: has joined #ruby
[04:48:48] chouhoulis: has joined #ruby
[04:49:02] chancy: has joined #ruby
[04:50:13] vondruch: has joined #ruby
[04:50:18] cgfbee: has joined #ruby
[04:50:53] vondruch: has joined #ruby
[04:51:09] P_R_Delts: I am trying to solve another challenge and coming up against a strange test issue
[04:51:20] P_R_Delts: most tests complete successfully, but one or two of them are having issues
[04:51:22] P_R_Delts: https://gist.github.com/PRDeltoid/c73f5405abecbff24c16f6911e39cff9
[04:51:58] P_R_Delts: The function is meant to find the first two primes seperated by the gap within m and n
[04:52:03] P_R_Delts: gap being g
[04:52:21] P_R_Delts: so my logic was that I'd go through m to n, checking the index and the index+gap and seeing if both were prime
[04:52:29] User458764: has joined #ruby
[04:52:48] P_R_Delts: if they were, I would then step through the gap in between them to see if there was another prime number. If there is another prime number, then it fails because the gap is interrupted by a prime
[04:53:00] Outlastsheep: has joined #ruby
[04:53:25] P_R_Delts: I am an idiot. I am really sad I just typed all that for no reason
[04:53:58] Ox0dea: P_R_Delts: You rubber-ducked it.
[04:54:20] Ox0dea: https://en.wikipedia.org/wiki/Rubber_duck_debugging
[04:54:55] P_R_Delts: That would definitely be it.
[04:55:02] william3: has joined #ruby
[04:55:09] P_R_Delts: I explained it in my head over and over but t yping it out made me realize
[04:55:40] levifig: has joined #ruby
[04:56:46] Ox0dea: P_R_Delts: Learn Enumerable: https://eval.in/553148 ^_^
[04:56:54] Ox0dea: It's really good for you.
[04:57:06] Ox0dea: Er, that 10 should be `g`, but you get the idea.
[04:58:02] Devalo: has joined #ruby
[04:58:12] tAn: has joined #ruby
[04:58:23] Ox0dea: Kobe with 58 in his final game. Several of my keks.
[04:59:05] P_R_Delts: Is this link you solving the problem in less than half the code and far less than half the time?
[04:59:29] baweaver: P_R_Delts: he does that
[04:59:32] theery: has joined #ruby
[05:00:18] baweaver: He also does this
[05:00:21] baweaver: >>$_=$$/$$;@_=->_{_==''?_:[*?`..?{]['. !#% & , :;<= >@_ `'=~/#{_[$.]}/]+@_[_[$_..-$_]]};_=->&_{_}[&:"#{@_['@%<#']}"];_[_[_[_['',@_['!: @@']],@_[' <!%@_=>@']][-$_-$_],@_['!=<@_']+?_+@_['&%_'],(''<<(_=$_+$_)**_**(_+$_)/(_+$_)-$_)+@_[',;%']],@_['<%`']]
[05:00:22] ruby[bot]: baweaver: # => 2016-04-14 05:00:22 +0000 (https://eval.in/553149)
[05:01:38] hxegon: has joined #ruby
[05:01:57] baweaver: ?cookie Ox0dea
[05:01:57] ruby[bot]: Ox0dea: here's your cookie: 🍪
[05:02:05] Ox0dea: >> '' << rand(128512..128538)
[05:02:06] ruby[bot]: Ox0dea: # => "😇" (https://eval.in/553150)
[05:02:17] catpoop: has joined #ruby
[05:03:04] tubuliferous: has joined #ruby
[05:03:36] davedev24: has joined #ruby
[05:06:01] tuelz4: has joined #ruby
[05:06:47] sauvin: has joined #ruby
[05:08:19] hxegon: has joined #ruby
[05:10:09] LoneHerm_: has joined #ruby
[05:10:25] rbennacer: has joined #ruby
[05:10:37] agentmeerkat: has joined #ruby
[05:11:05] yfeldblum: has joined #ruby
[05:11:21] last_staff: has joined #ruby
[05:15:15] pawnbox: has joined #ruby
[05:15:36] saramic: has joined #ruby
[05:18:33] merida: has joined #ruby
[05:18:50] krz: has joined #ruby
[05:19:57] rbennacer: has joined #ruby
[05:20:19] guardian: has joined #ruby
[05:22:02] vondruch: has joined #ruby
[05:23:58] pawnbox: has joined #ruby
[05:25:40] CloCkWeRX: has joined #ruby
[05:27:12] kadoppe: has joined #ruby
[05:27:31] finisherr: has joined #ruby
[05:28:01] mosez: has joined #ruby
[05:28:14] jidar: has joined #ruby
[05:28:37] abyx: has joined #ruby
[05:29:13] rbennacer: has joined #ruby
[05:30:13] freerobby: has joined #ruby
[05:31:24] william3: has joined #ruby
[05:33:22] merida_: has joined #ruby
[05:34:18] merida__: has joined #ruby
[05:43:33] hk238: has joined #ruby
[05:43:40] rkazak: has joined #ruby
[05:46:09] agent_white: has joined #ruby
[05:48:03] Polysics: has joined #ruby
[05:48:22] cpup: has joined #ruby
[05:49:50] chouhoulis: has joined #ruby
[05:51:08] hk238: hello I'm planning to learn some more ruby, just dabblign with the basics currently
[05:51:27] hk238: Could anyone recommend an open source ruby thing, editing which would be a good way to learn some?
[05:51:47] x77686d: has joined #ruby
[05:54:01] duoi: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[05:54:25] Xeago: has joined #ruby
[05:57:46] rbennacer: has joined #ruby
[06:00:13] helpa-bot: has joined #ruby
[06:00:29] psmolen_: has joined #ruby
[06:00:51] SegFaultAX_: has joined #ruby
[06:01:37] freerobby: has joined #ruby
[06:02:04] Y_Ichiro_: has joined #ruby
[06:02:04] Y_Ichiro_: has joined #ruby
[06:02:40] Scientz: has joined #ruby
[06:02:42] Hanmac1: has joined #ruby
[06:02:47] kent\n: has joined #ruby
[06:02:47] kent\n: has joined #ruby
[06:02:59] twe4ked_: has joined #ruby
[06:03:14] juanfra_: has joined #ruby
[06:03:15] hyperdri-: has joined #ruby
[06:03:26] jamo: has joined #ruby
[06:03:38] dopieee: has joined #ruby
[06:03:50] Spaceghost|work: has joined #ruby
[06:03:50] russt_: has joined #ruby
[06:03:51] raldu_: has joined #ruby
[06:03:58] bahar: has joined #ruby
[06:04:07] torandu_: has joined #ruby
[06:04:23] Silex^^: has joined #ruby
[06:04:39] nw: has joined #ruby
[06:04:40] Miccet: has joined #ruby
[06:04:57] grumpycat: has joined #ruby
[06:05:04] Ikzi: has joined #ruby
[06:05:05] Papierko-: has joined #ruby
[06:05:07] jgrevich: has joined #ruby
[06:05:12] sarlalian_: has joined #ruby
[06:05:43] Radar: hk238: The Ruby Koans are what I would recommend.
[06:05:44] atom3_: has joined #ruby
[06:05:52] tuelz: has joined #ruby
[06:05:58] Dreamer3: has joined #ruby
[06:05:59] Puffball_: has joined #ruby
[06:06:04] robrob: has joined #ruby
[06:06:11] rideh: has joined #ruby
[06:06:36] hays_: has joined #ruby
[06:06:49] genpaku_: has joined #ruby
[06:06:54] Trynemjoel: has joined #ruby
[06:06:59] LBRapid_: has joined #ruby
[06:07:04] mburns_: has joined #ruby
[06:07:05] Polysics_: has joined #ruby
[06:07:09] rbennacer: has joined #ruby
[06:07:14] kareeoleez: has joined #ruby
[06:07:25] JoshL_: has joined #ruby
[06:07:32] cschneid_: has joined #ruby
[06:07:34] cout_: has joined #ruby
[06:07:40] Kilobyte22: has joined #ruby
[06:08:09] humding3r: has joined #ruby
[06:08:09] Omni: has joined #ruby
[06:08:19] Coldblackice: has joined #ruby
[06:08:27] jaiks1: has joined #ruby
[06:08:31] bruno-: has joined #ruby
[06:09:03] kareeoleez: has joined #ruby
[06:09:07] djbkd: has joined #ruby
[06:09:19] adaedra: has joined #ruby
[06:09:24] Affix: has joined #ruby
[06:09:26] LoneHermit: has joined #ruby
[06:09:47] chagel: has joined #ruby
[06:10:24] merida: has joined #ruby
[06:11:15] mmasaki: has joined #ruby
[06:11:33] solars: has joined #ruby
[06:11:37] elaptics`away: has joined #ruby
[06:11:53] s00pcan: has joined #ruby
[06:12:35] Fraeon: has joined #ruby
[06:12:35] Diabolik: has joined #ruby
[06:12:39] al2o3-cr: has joined #ruby
[06:12:44] M-Kodo: has joined #ruby
[06:13:03] SirFunk: has joined #ruby
[06:13:36] aibot: has joined #ruby
[06:13:47] speakingcode: has joined #ruby
[06:13:53] chris2: has joined #ruby
[06:14:19] ruurd: has joined #ruby
[06:14:46] evie_hammond: has joined #ruby
[06:14:52] gagrio: has joined #ruby
[06:15:26] go|dfish: has joined #ruby
[06:16:02] sesquipe1: has joined #ruby
[06:16:25] Chunlea: has joined #ruby
[06:17:12] krz: has joined #ruby
[06:17:18] flughafen: has joined #ruby
[06:17:20] mrfooo: has joined #ruby
[06:17:57] Canar: has joined #ruby
[06:18:17] Expanse: has joined #ruby
[06:18:32] manveru: has joined #ruby
[06:18:46] jimcroft: has joined #ruby
[06:18:47] charliesome: has joined #ruby
[06:19:19] ikonia: has joined #ruby
[06:19:24] codecop: has joined #ruby
[06:20:01] LoneHerm_: has joined #ruby
[06:21:14] bronson: has joined #ruby
[06:21:52] snoobydoo: has joined #ruby
[06:22:33] cpup: has joined #ruby
[06:23:37] kadoppe: has joined #ruby
[06:24:13] Polysics: has joined #ruby
[06:24:29] ramfjord: has joined #ruby
[06:27:02] darkf: has joined #ruby
[06:27:08] chipotle: has joined #ruby
[06:27:11] Bugboy1028: has joined #ruby
[06:27:15] rfv: has joined #ruby
[06:27:29] aganov: has joined #ruby
[06:27:59] infernix: has joined #ruby
[06:28:38] CloCkWeRX: has joined #ruby
[06:30:20] rbennacer: has joined #ruby
[06:30:32] LoneHerm_: has joined #ruby
[06:31:43] agentmeerkat: has joined #ruby
[06:31:47] firstdayonthejob: has joined #ruby
[06:32:00] bigkevmcd: has joined #ruby
[06:32:21] blackjid: has joined #ruby
[06:32:29] jazzonmymind: has joined #ruby
[06:32:55] jmcc________: has joined #ruby
[06:33:40] v0n: has joined #ruby
[06:34:26] nobitanobi: has joined #ruby
[06:35:06] rhg135: has joined #ruby
[06:35:47] tvw: has joined #ruby
[06:35:51] P_R_Delts: is there an easy method to split a string into 2 chararacter strings in an array?
[06:36:01] P_R_Delts: I thought Split but I don't think it does what I think
[06:37:28] mnrmnaugh_: has joined #ruby
[06:37:34] toretore: >> '1234567890'.scan(/../)
[06:37:35] ruby[bot]: toretore: # => ["12", "34", "56", "78", "90"] (https://eval.in/553179)
[06:38:18] P_R_Delts: perfecto, thanks toretore
[06:38:30] AlexJakeGreen: has joined #ruby
[06:38:36] janelleb: has joined #ruby
[06:41:17] merida_: has joined #ruby
[06:41:30] ja: has joined #ruby
[06:41:36] snoobydo1: has joined #ruby
[06:43:30] mnrmnaugh: has joined #ruby
[06:43:34] jtoy: has joined #ruby
[06:46:13] mark2: has joined #ruby
[06:46:29] diegoviola: has joined #ruby
[06:47:02] ruby-lang684: has joined #ruby
[06:47:12] saramic: has joined #ruby
[06:47:35] tAn: has joined #ruby
[06:48:56] pwnd_nsfw: has joined #ruby
[06:49:16] SOLDIERz: has joined #ruby
[06:49:49] dmnd: has joined #ruby
[06:50:06] CausaMortis: has joined #ruby
[06:50:16] apipkin_: has joined #ruby
[06:50:25] audiodude: has joined #ruby
[06:50:35] chouhoulis: has joined #ruby
[06:51:50] jpinnix_______: has joined #ruby
[06:52:40] andersh: has joined #ruby
[06:53:38] noService: has joined #ruby
[06:55:10] yo61: has joined #ruby
[06:56:45] tpendragon: has joined #ruby
[06:57:15] lomex: has joined #ruby
[06:57:48] tuelz: has joined #ruby
[06:59:05] kadoppe: has joined #ruby
[06:59:31] crdpink: has joined #ruby
[06:59:42] biberu: has joined #ruby
[07:01:52] devbug: has joined #ruby
[07:02:08] manveru: `Bundler.settings[:cache_all] = options[:all] if options.key?("all")`
[07:02:30] kspencer: has joined #ruby
[07:02:34] manveru: who writes such code...
[07:03:43] angiebadillo: has joined #ruby
[07:04:59] bcavileer: has joined #ruby
[07:05:06] DukeDave: has joined #ruby
[07:05:10] err_ok: has joined #ruby
[07:05:42] kalz: has joined #ruby
[07:06:35] bastelfreak: has joined #ruby
[07:06:51] jaruga__: has joined #ruby
[07:07:38] jaruga__: has joined #ruby
[07:08:42] rbennacer: has joined #ruby
[07:11:38] waxxy: has joined #ruby
[07:11:51] TomyWork: has joined #ruby
[07:12:15] Couch: has joined #ruby
[07:13:15] bruce_lee: has joined #ruby
[07:13:15] bruce_lee: has joined #ruby
[07:13:57] n008f4g_: has joined #ruby
[07:13:57] ur5us: has joined #ruby
[07:14:14] dionysus69: has joined #ruby
[07:14:37] dionysus69: is there a capistrano channel or can you help me with it?
[07:14:38] Polysics: has joined #ruby
[07:14:49] bodgix: has joined #ruby
[07:16:11] j3r0: has joined #ruby
[07:17:16] bmf: has joined #ruby
[07:17:23] zast: has joined #ruby
[07:17:47] Lloyd: has joined #ruby
[07:17:58] manveru: dionysus69: no channel i know of, just ask away
[07:20:47] Drakx_: has joined #ruby
[07:20:47] ur5us: has joined #ruby
[07:21:57] User458764: has joined #ruby
[07:22:06] blackgoat: has joined #ruby
[07:23:12] merida: has joined #ruby
[07:23:18] andikr: has joined #ruby
[07:23:38] SenpaiSilver: has joined #ruby
[07:23:49] saramic: has joined #ruby
[07:23:51] antgel: has joined #ruby
[07:24:14] mrknip: has joined #ruby
[07:26:09] Jonah11_: has joined #ruby
[07:26:13] CloCkWeRX: has joined #ruby
[07:27:46] madgen: has joined #ruby
[07:28:32] SCHAAP137: has joined #ruby
[07:28:55] patrick_star: has joined #ruby
[07:30:06] kadoppe: has joined #ruby
[07:30:37] Outlastsheep: has joined #ruby
[07:30:38] Yiota: has joined #ruby
[07:30:56] dionysus69: ok so I want to deploy ember application with capistrano but I dont understand how the drill would go, in fact I havent used capistrano yet in any project but when the guide says to add capistrano to Gemfile, do I create Gemfile in ember project, is Gemfile an only requirement for the project to "see" capistrano gem?
[07:31:27] ghr: has joined #ruby
[07:32:05] Vile`: has joined #ruby
[07:32:32] william3: has joined #ruby
[07:32:49] JohnBat26: has joined #ruby
[07:34:50] Polysics: has joined #ruby
[07:34:58] charliesome: has joined #ruby
[07:35:11] SOLDIERz: has joined #ruby
[07:35:27] SOLDIERz: has joined #ruby
[07:37:00] rbennacer: has joined #ruby
[07:38:10] DukeDave: has joined #ruby
[07:39:48] anisha: has joined #ruby
[07:41:41] chipotle: has joined #ruby
[07:42:04] william3: has joined #ruby
[07:42:23] aufi_: has joined #ruby
[07:44:42] Xeago: has joined #ruby
[07:45:14] Kamilion: has joined #ruby
[07:45:40] nhhc: has joined #ruby
[07:46:35] manveru: dionysus69: usually you can just install the gem without a Gemfile
[07:47:16] djbkd: has joined #ruby
[07:47:17] manveru: it's just more convenient for keeping track of which versions of gems your project requires
[07:47:35] djbkd_: has joined #ruby
[07:47:42] manveru: you can make one with `bundle init`
[07:47:53] jgt1: has joined #ruby
[07:48:05] manveru: but for that you also need the bundler gem installed
[07:48:34] kadoppe: has joined #ruby
[07:48:37] dionysus69: I have both bundler and gem installed
[07:48:56] dionysus69: I am rails dev too just not familiar with details of how stuff works in the environment
[07:48:59] DoubleMalt: has joined #ruby
[07:49:21] tylersmith: has joined #ruby
[07:49:27] priodev: has joined #ruby
[07:49:29] dionysus69: so I would just run cap rake tasks inside an ember app and it would generate capistrano config files and thats where I would start?
[07:49:42] beawesomeinstead: has joined #ruby
[07:49:57] dionysus69: thanks for help :) I like understanding before getting started xD
[07:50:07] manveru: no problem :)
[07:50:43] hk238: has joined #ruby
[07:50:54] terlar: has joined #ruby
[07:51:39] crdpink: has joined #ruby
[07:51:52] chosen1x: has joined #ruby
[07:52:38] Klumben: has joined #ruby
[07:54:06] fnux: has joined #ruby
[07:55:21] rippa: has joined #ruby
[07:55:28] blackjid: has joined #ruby
[07:55:31] charlemagne: has joined #ruby
[07:55:48] william3: has joined #ruby
[07:55:54] rbennacer: has joined #ruby
[07:55:54] Ariadeno: has joined #ruby
[07:58:38] edwinvdgraaf: has joined #ruby
[07:58:58] dgncn: has joined #ruby
[07:59:39] mikecmpbll: has joined #ruby
[08:00:45] Junaos: has joined #ruby
[08:00:55] pandaant: has joined #ruby
[08:04:12] marr: has joined #ruby
[08:04:14] nobitanobi: has joined #ruby
[08:05:15] twe4ked: has joined #ruby
[08:05:38] opal: has joined #ruby
[08:05:39] Begi: has joined #ruby
[08:06:02] Guest41846: has joined #ruby
[08:06:09] Begi: has joined #ruby
[08:06:51] cibs: has joined #ruby
[08:11:17] GodFodder: has joined #ruby
[08:11:59] GodFodder: has joined #ruby
[08:12:39] yos7ph: has joined #ruby
[08:13:34] Mon_Ouie: has joined #ruby
[08:14:29] rbennacer: has joined #ruby
[08:20:42] adaedra: Stop disconnecting me, freenode.
[08:20:47] adaedra: Hello everyone.
[08:21:30] senayar: has joined #ruby
[08:21:30] senayar: has joined #ruby
[08:22:23] marktwo: has joined #ruby
[08:23:25] bronson: has joined #ruby
[08:24:04] mrgrieves: has joined #ruby
[08:24:13] Polysics: has joined #ruby
[08:24:55] beawesomeinstead: has joined #ruby
[08:24:59] ndrst: has joined #ruby
[08:25:03] robrob: has joined #ruby
[08:26:37] sepp2k: has joined #ruby
[08:26:46] charlema_: has joined #ruby
[08:27:57] Yiota: has joined #ruby
[08:28:07] william3: has joined #ruby
[08:29:34] Xeago: has joined #ruby
[08:30:00] nodejunkie: has joined #ruby
[08:31:09] User458764: has joined #ruby
[08:33:50] baweaver: has joined #ruby
[08:35:52] Alina-malina: has joined #ruby
[08:36:37] chouhoulis: has joined #ruby
[08:38:15] mrmortondk: has joined #ruby
[08:39:32] i: has joined #ruby
[08:40:32] rickmasta: has joined #ruby
[08:40:48] tubuliferous: has joined #ruby
[08:44:16] jtoy: has joined #ruby
[08:46:47] alem0lars: has joined #ruby
[08:47:07] Vile``: has joined #ruby
[08:47:52] rbennacer: has joined #ruby
[08:48:59] jsaak: anyone knows a good writing why green threads were dropped after 1.8? i simply can not understand that decision
[08:49:49] manveru: jsaak: the who?
[08:49:50] Jonah11_: has joined #ruby
[08:50:05] manveru: what do you think ruby is using now?
[08:50:12] yfeldblum: has joined #ruby
[08:50:14] jsaak: os threads
[08:50:23] Yiota: has joined #ruby
[08:50:32] jgt: has joined #ruby
[08:50:39] AlexRussia: has joined #ruby
[08:50:41] manveru: well, that was around the time Fiber was introduced, no?
[08:50:48] jsaak: with GIL :) whic does not make any sense in my humble oppinion
[08:51:05] neanderslob: has joined #ruby
[08:51:05] manveru: with GIL for some operations, not all of them
[08:51:34] manveru: i'm pretty sure ko1 wrote about it...
[08:51:51] jsaak: who is kol? how do i find it?
[08:51:59] manveru: he built YARV
[08:52:15] manveru: the VM that is used since 1.9
[08:52:56] manveru: http://www.infoq.com/news/2007/05/ruby-threading-futures
[08:53:33] jsaak: kol == "Sasada Koichi" ?
[08:53:40] jsaak: thanks for the link
[08:53:51] manveru: yeah, 1 in japanese is ichi
[08:54:07] manveru: so that's his nickname :)
[08:54:13] snoobydoo: has joined #ruby
[08:56:24] rbr: has joined #ruby
[08:59:35] bruce_lee: has joined #ruby
[08:59:59] jhass: has joined #ruby
[09:00:09] BtcBen: has joined #ruby
[09:01:39] rbennacer: has joined #ruby
[09:01:46] jsaak: this is the main argument: " This decision maybe makes us happy because we can run most of the extensions written in C without any modifications. " :(
[09:04:17] kalleth: has joined #ruby
[09:06:07] mell: has joined #ruby
[09:07:42] charlemagne: has joined #ruby
[09:07:56] manveru: yeah, the the reason why MRI still has GIL
[09:07:59] toretore: jsaak: it's also from 2007
[09:08:34] charlemagne: has joined #ruby
[09:08:41] manveru: but at least now you can choose rbx or jruby :)
[09:10:04] charlema_: has joined #ruby
[09:10:52] Yiota_: has joined #ruby
[09:11:13] rbennacer: has joined #ruby
[09:11:24] kadoppe: has joined #ruby
[09:12:46] shayan: has joined #ruby
[09:14:42] davedev24: has joined #ruby
[09:15:12] Spami: has joined #ruby
[09:16:28] _mak: has joined #ruby
[09:18:35] noServic1: has joined #ruby
[09:18:38] noServic1: has joined #ruby
[09:18:45] karmatr0n: has joined #ruby
[09:21:46] charlemagne: has joined #ruby
[09:23:43] Nahra: has joined #ruby
[09:23:54] _joes__: has joined #ruby
[09:24:43] apeiros: jsaak: ko1 (1 = one, not lowercase L), you should consider using a font which makes those characters distinguishable :-p
[09:25:24] rbennacer: has joined #ruby
[09:25:31] czerasz: has joined #ruby
[09:25:37] shevy: huh 2007... that's almost 10 years
[09:25:53] toretore: and we still have the gil
[09:26:33] momo-reina: has joined #ruby
[09:29:08] rfv: has joined #ruby
[09:29:09] andersh: has joined #ruby
[09:30:05] Lloyd: has joined #ruby
[20:17:21] helpa: has joined #ruby
[20:17:44] SCHAAP137: has joined #ruby
[20:21:09] ur5us_: has joined #ruby
[20:21:13] cdg: has joined #ruby
[20:22:19] aegis3121: has joined #ruby
[20:22:40] OTORelic: has joined #ruby
[20:22:44] baweaver: has joined #ruby
[20:22:58] rickmasta: has joined #ruby
[20:23:20] mustmodify: has joined #ruby
[20:25:31] bruno-: has joined #ruby
[20:29:31] KensoDev: has joined #ruby
[20:29:47] hxegon: has joined #ruby
[20:31:45] n008f4g_: has joined #ruby
[20:31:51] mustmodify: Wondering if someone can suggest what channel might be appropriate for this question: I must (apparently) specify a maximum number of bytes to receive in a UDP message. I plan to open-source this tool... I know what works for me, but what would be a good default that would work for most people? Is there a down-side to putting 10,000?
[20:31:57] mtx: has joined #ruby
[20:32:13] Ox0dea: It's not an even number.
[20:32:23] mustmodify: that's the down side?
[20:32:35] Ox0dea: I mean, it should at least be a power of 2?
[20:33:12] eam: mustmodify: 65k is the max, you might wanna use that
[20:33:20] mustmodify: I mean, I happen to know that I won't be receiving messages with over 200 bytes.
[20:33:23] kadoppe: has joined #ruby
[20:33:25] jenrzzz: has joined #ruby
[20:33:30] mustmodify: I just didn't know why that's even there.
[20:33:35] mustmodify: why wouldn't they just accept the most possible?
[20:33:36] Outlastsheep: has joined #ruby
[20:33:36] eam: why there's a length?
[20:33:38] jenrzzz: has joined #ruby
[20:33:56] eam: likely because the underlying implementation must have a length
[20:34:00] mustmodify: I guess I could dig into it, but I just assumed it wouldn't be explained.
[20:34:14] eam: 65k per read could be super wasteful
[20:34:17] mustmodify: which means I still don't know if there is a down side.
[20:34:26] eam: allocating memory
[20:34:29] mustmodify: right, I mean, it might suck up memory
[20:35:05] iwmrby: has joined #ruby
[20:35:06] eam: mustmodify: it *will* suck up memory
[20:35:09] mustmodify: so maybe 2**10 ... few people will miss 1kb
[20:35:14] eam: because the memory has to be allocated before the call is made
[20:35:17] mustmodify: eam: sure, that makes sense.
[20:35:19] eam: regardless of whether it's used
[20:35:36] Ox0dea: Wait, why?
[20:35:37] eam: it's not an issue of a static allocation, generally you're reading a message in a loop
[20:35:39] mustmodify: So that's probably the only down side.
[20:36:01] eam: so you might be making a 65k alloc every loop (and if you've got a server doing say 100 queries per second)
[20:36:14] goodroot: has joined #ruby
[20:36:19] eam: suddenly you have 65M of gc churn per second
[20:37:02] eam: a higher performance server in C might do more like 50k qps
[20:37:19] freerobby: has joined #ruby
[20:37:46] eam: Ox0dea: why it has to be allocated before the call is made?
[20:37:52] Ox0dea: eam: Oui.
[20:38:03] eam: we're talking about recv(2) here
[20:38:21] eam: you allocate a buf, then tell recv how long it can be
[20:38:34] Ox0dea: Oh, well, why can't recv() do a smart and realloc() is necessary?
[20:38:43] eam: *cough*
[20:38:43] Musashi007: has joined #ruby
[20:38:45] Ox0dea: (Only half-kidding.)
[20:39:18] eam: because recv(2) is a system call not a library call
[20:39:25] eam: so it cannot touch userspace allocations
[20:39:43] eam: you could totally build a library on top of this which just reads forever
[20:39:48] eam: perhaps call it ruby
[20:40:46] bkxd: has joined #ruby
[20:41:15] eam: I think you *can* use #read on a udp socket, btw
[20:41:24] eam: or on any socket
[20:42:07] eam: so maybe more a question of why this layer exposes this detail (and from THERE, possibly because network things are an attack vector and you want to impose limits)
[20:45:12] mhoungbo: has joined #ruby
[20:46:55] mhoungbo: has joined #ruby
[20:47:59] kadoppe: has joined #ruby
[20:50:51] redondos: has joined #ruby
[20:51:02] Infra-Red: has joined #ruby
[20:51:22] bronson: has joined #ruby
[20:54:59] baweaver: has joined #ruby
[20:59:08] SilverKey: has joined #ruby
[20:59:16] czerasz: has joined #ruby
[21:01:58] freerobby: has joined #ruby
[21:02:12] Guest38: has joined #ruby
[21:02:56] redondos: has joined #ruby
[21:04:06] jterra: has joined #ruby
[21:05:04] Jonah11_: has joined #ruby
[21:05:52] mustmodify: ok well... 2k then?
[21:06:04] mustmodify: what do people send by UDP?
[21:06:07] mustmodify: They don't send novels.
[21:06:12] mustmodify: They send very short messages.
[21:06:16] Ox0dea: Is that a challenge?
[21:06:23] marr: has joined #ruby
[21:06:24] mustmodify: That is not a challenge.
[21:06:30] mustmodify: Very much not a challenge.
[21:06:36] baweaver: Ox0dea: yes, a challege
[21:06:50] mustmodify: I mean, typically though, it's short stuff, right? "This whatever 0.002s"
[21:07:06] mustmodify: or in my case, it's a personal gps sending coordinates and some other details.
[21:07:27] Ox0dea: 4096 feels right, but it's hard to pin down precisely why.
[21:07:59] baweaver: I'd tell you a UDP joke, but you probably wouldn't get it.
[21:09:22] mustmodify: baweaver: Almost as funny as "but you probably wouldn't get it; I'd tell you a UDP joke."
[21:09:56] mustmodify: ok I'm open to feedback on the "Recipient" code: https://gist.github.com/mustmodify/ddd8b1f04de252655555d21dd90d4ae0
[21:09:57] baweaver: Ox0dea had a problem. He decided to use threads. Now two he problems has.
[21:10:26] Ox0dea: baweaver: That is an acceptable level of manglement.
[21:10:33] curses: has joined #ruby
[21:10:48] mustmodify: you joke, but I knew a guy who really liked threads. He wrote some code that ran a baseball pitching machine. Apparently it ... wasn't a success.
[21:11:00] gizmore: has joined #ruby
[21:11:04] baweaver: Must have struck out on it
[21:11:42] mustmodify: I think "wild pitch" was a literal and figurative metaphor to describe his success.
[21:11:53] baweaver: so he dropped the ball
[21:12:12] mustmodify: Sorry, forgot to say... he used threads heavily.
[21:12:40] baweaver: Now you're just stringing us along
[21:12:41] abyx: has joined #ruby
[21:12:43] mustmodify: He thought that would be a home run but not.
[21:14:22] diegoaguilar: has joined #ruby
[21:14:56] niftylettuce: has joined #ruby
[21:15:54] sp4rrow: has joined #ruby
[21:18:46] Synthead: has joined #ruby
[21:19:28] yfeldblum: has joined #ruby
[21:20:01] yfeldblum: has joined #ruby
[21:20:15] brainslug: has joined #ruby
[21:21:30] BTRE: has joined #ruby
[21:21:53] Kharma: has joined #ruby
[21:23:07] Hobart: is this the right channel to request review of a bug/proposed patch in ruby core?
[21:23:59] Ox0dea: Hobart: Sure is.
[21:24:07] Ox0dea: #ruby-core is a graveyard.
[21:24:48] kadoppe: has joined #ruby
[21:25:34] aegis3121: has joined #ruby
[21:26:35] Hobart: Did as much research as I could - would welcome feedback on https://bugs.ruby-lang.org/issues/12284
[21:27:45] tuelz1: has joined #ruby
[21:28:15] Ox0dea: Hobart: That's way too heavy-handed a "fix".
[21:29:30] nobitanobi: has joined #ruby
[21:29:43] Hobart: the alternative would be... making io-console only use ruby 2.1 functions?
[21:30:27] BtcBen: has joined #ruby
[21:30:45] Hobart: wasn't sure since the gem infrastructure doesn't seem to be tied (that I can see) to the ruby releases otherwise...
[21:33:57] Ox0dea: Hobart: Well, it's true that the ABI version doesn't necessarily match the release, but requiring 2.2 on Windows when 2.1 isn't EOL can't be the right move.
[21:35:23] bmf: has joined #ruby
[21:35:56] Ox0dea: I think checking HAVE_RB_SYM2STR and defining rb_sym2str() in console.c if necessary is the right approach.
[21:36:36] lynx_eyes: has joined #ruby
[21:37:14] Hobart: Gotcha. Will try some test cases and try to assemble a better patch.
[21:37:37] Azure: has joined #ruby
[21:38:11] noService: has joined #ruby
[21:41:11] bruno-: has joined #ruby
[21:42:00] mikecmpbll: has joined #ruby
[21:42:41] Xeago: has joined #ruby
[21:42:57] kadoppe: has joined #ruby
[21:44:34] GG: has joined #ruby
[21:44:53] lemur: has joined #ruby
[21:49:33] bruno-_: has joined #ruby
[21:49:51] Jonah11__: has joined #ruby
[21:50:03] arlek__: has joined #ruby
[21:50:28] lomex: has joined #ruby
[21:50:37] smathy_: has joined #ruby
[21:51:15] Macaveli: has joined #ruby
[21:51:16] Pupeno: has joined #ruby
[21:51:52] wreet: has joined #ruby
[21:51:52] wreet: has joined #ruby
[21:52:03] sp4rrow_: has joined #ruby
[21:52:07] pietr0_: has joined #ruby
[21:52:07] wreet: has left #ruby: ()
[21:52:55] cout: has joined #ruby
[21:53:54] sdothum: has joined #ruby
[21:54:00] mhoungbo: has joined #ruby
[21:54:01] ocbtec: has joined #ruby
[21:54:02] replay_: has joined #ruby
[21:54:14] fckyoufreenode: has joined #ruby
[21:54:15] shadoi: has joined #ruby
[21:54:31] A124: has joined #ruby
[21:54:41] kareeole_: has joined #ruby
[21:55:06] funnel: has joined #ruby
[21:55:08] Rutix`away: has joined #ruby
[21:55:08] Rutix`away: has joined #ruby
[21:55:20] RIK: has joined #ruby
[21:55:57] ruurd: has joined #ruby
[21:56:37] Dreamer3_: has joined #ruby
[21:56:39] bkxd: has joined #ruby
[21:56:43] jenrzzz_: has joined #ruby
[21:57:30] Guest32186: has joined #ruby
[21:57:42] tuelz2: has joined #ruby
[21:58:10] Asher: has joined #ruby
[21:58:47] dcope: has joined #ruby
[21:58:51] benlieb: has joined #ruby
[21:59:00] fragtastic: has joined #ruby
[21:59:11] lynx_eyes: has joined #ruby
[21:59:50] woodruffw: has joined #ruby
[21:59:55] edwinvdg_: has joined #ruby
[22:00:18] pabs: has joined #ruby
[22:00:37] mustmodify_: has joined #ruby
[22:00:46] woodruffw: has joined #ruby
[22:01:01] babblebre: has joined #ruby
[22:01:03] nullFxn: has joined #ruby
[22:01:37] cajone: has joined #ruby
[22:02:00] C0deMaver1ck: has joined #ruby
[22:02:41] Helheim: has joined #ruby
[22:03:15] mrknip: has joined #ruby
[22:03:53] sdothum: has joined #ruby
[22:04:32] AndyBotwin: has joined #ruby
[22:05:02] mustmodify_: OT: http://worldbuilding.stackexchange.com/questions/39571/how-far-away-would-an-alien-civilization-need-to-be-for-us-to-not-notice-them
[22:05:09] mustmodify_: Answer: "About as far as they are now."
[22:06:50] kadoppe: has joined #ruby
[22:07:02] vqrs: has joined #ruby
[22:07:08] neanderslob: has joined #ruby
[22:08:40] kies: has joined #ruby
[22:10:02] ruby[bot]: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
[22:10:13] baweaver: that's the OT channel for the record mustmodify_
[22:10:22] baweaver: feel free to post much of anything there
[22:10:41] eam: it's a better channel than this one tbh
[22:11:13] johnmilton: has joined #ruby
[22:12:28] swills: has joined #ruby
[22:13:22] Xeago: has joined #ruby
[22:14:18] DannyR: has joined #ruby
[22:18:26] poerror: has joined #ruby
[22:19:14] zacstewart: has joined #ruby
[22:23:02] kadoppe: has joined #ruby
[22:24:50] patrick_star: has joined #ruby
[22:25:36] sp4rrow: has joined #ruby
[22:26:23] DannyR: has joined #ruby
[22:27:17] ruby[bot]: -b *!*@unaffiliated/fowlmouth$#ruby-banned
[22:27:39] tuelz3: has joined #ruby
[22:31:11] BTRE: has joined #ruby
[22:39:47] zenlot: has joined #ruby
[22:40:39] rbennacer: has joined #ruby
[22:41:17] baweaver: has joined #ruby
[22:41:41] Dimik: has joined #ruby
[22:42:19] rbennacer: has joined #ruby
[22:44:34] malcolmva: has joined #ruby
[22:48:57] ghr: has joined #ruby
[22:51:58] bronson: has joined #ruby
[22:56:05] bruno-: has joined #ruby
[22:56:48] dfockler: has joined #ruby
[22:57:19] elifoster: has joined #ruby
[22:58:31] johnmilton: has joined #ruby
[23:00:26] SilverKey: has joined #ruby
[23:01:24] Ox0dea: Is there a better way to trace optimized methods than doing this for every relevant class/method combination? https://eval.in/553614
[23:01:27] whathapp_: has joined #ruby
[23:02:24] darkf: has joined #ruby
[23:02:50] tw1sted: has joined #ruby
[23:04:13] yfeldblum: has joined #ruby
[23:05:14] william3: has joined #ruby
[23:07:30] rkazak: has joined #ruby
[23:09:24] cwenner: has joined #ruby
[23:10:05] tubuliferous: has joined #ruby
[23:11:26] bruno-: has joined #ruby
[23:11:51] Milos|Work: has joined #ruby
[23:12:23] Milos|Work: I don't work directly with ruby so at a loss for understanding this "NoMethodError: undefined method `begin' for 31557600.0:Float"
[23:12:27] bkxd: has joined #ruby
[23:12:42] Ox0dea: Milos|Work: You're calling #begin on a Float. There's no such method.
[23:12:44] Milos|Work: There's no ".begin" in the code. The top of the stacktrace shows method_missing inside of active_support
[23:13:20] Ox0dea: That's not good.
[23:13:21] Milos|Work: I just searched for #begin in the entire codebase and found nothing.
[23:13:23] apes: has left #ruby: ()
[23:13:31] Milos|Work: Oh, # is shorthand for method
[23:13:37] Ox0dea: Instance method, specifically.
[23:13:54] aegis3121: has joined #ruby
[23:15:07] Milos|Work: How come the stacktrace doesn't show where "begin" is trying to be called?
[23:15:08] Ox0dea: Look in the stacktrace for the first error that occurs in a file you wrote.
[23:15:13] Ox0dea: It should do just that.
[23:15:45] mikeiniowa: has joined #ruby
[23:16:18] Ox0dea: You're probably using a Float where a Date is expected.
[23:16:38] aaaaaaaaaaa: has joined #ruby
[23:17:55] DLSteve: has joined #ruby
[23:18:46] charliesome: has joined #ruby
[23:19:17] Milos|Work: Ox0dea, I see "due_at: rand(1.year).from_now" in the code, and the stack trace shows my_file.rake:64:in `rand'
[23:19:29] Milos|Work: the next line in the stack trace is the one about method_missing in activesupport-4.1.4
[23:19:45] Milos|Work: and by next I mean the line above...
[23:22:13] Milos|Work: Ox0dea, https://bpaste.net/show/550846c28d21
[23:23:21] Ox0dea: Milos|Work: It must be that something has redefined #rand; the default one on Kernel takes either a Numeric or a Range.
[23:23:35] Ox0dea: Something is causing yours to only expect a Range, which does respond to #begin.
[23:23:51] Milos|Work: At least that gives me something to look into - thanks!
[23:24:01] Ox0dea: >> [rand(3.14), rand(42), rand(40..50)] # Milos|Work
[23:24:02] ruby[bot]: Ox0dea: # => [2, 2, 50] (https://eval.in/553617)
[23:25:05] Ox0dea: Milos|Work: You should be able to say `method(:rand).source_location` to find out where it's been redefined.
[23:25:11] Ox0dea: If that gives you `nil`, I'm at a loss.
[23:26:14] Milos|Work: Just before I try that, how do I correctly use the begin method with rand? I want to know what begin is meant to do but I can't find documentation for it because it's also a reserved keyword for exceptions or something.
[23:26:26] Ox0dea: >> 10..20.begin # Milos|Work
[23:26:27] ruby[bot]: Ox0dea: # => undefined method `begin' for 20:Fixnum (NoMethodError) ...check link for more (https://eval.in/553620)
[23:26:30] Gasher: has joined #ruby
[23:26:39] Ox0dea: >> (10..20).begin
[23:26:40] ruby[bot]: Ox0dea: # => 10 (https://eval.in/553621)
[23:26:42] william3: has joined #ruby
[23:26:51] baweaver: has joined #ruby
[23:26:58] Milos|Work: yeah I tried the first one you did too
[23:27:09] Milos|Work: and when it didn't work I was confused :P
[23:27:17] smathy: Can't call from_now on a Fixnum though.
[23:27:34] Ox0dea: It's also weird that `1.year` is giving him a Float.
[23:28:41] Ox0dea: Never mind.
[23:28:43] smathy: rand with a float works for me.
[23:28:56] Ox0dea: Yeah, but you lose the fact that you passed in a Float.
[23:29:44] aaaaaaaaaaa: has left #ruby: ()
[23:29:50] smathy: Not sure what that means. I thought you were suggesting that you couldn't pass a float to rand
[23:29:57] pabs: has joined #ruby
[23:31:22] Ox0dea: Well, I think it'd be good if `rand(Float)` gave you back a Float.
[23:31:34] Milos|Work: getting somewhere -- <Ox0dea> Something is causing yours to only expect a Range, which does respond to #begi
[23:31:46] smathy: Oh right, sure. I thought you were suggesting that passing a float was why he was getting the error.
[23:32:01] Milos|Work: https://bpaste.net/show/88216af9a085
[23:32:22] ramfjord: has joined #ruby
[23:32:42] Milos|Work: and yeah, it says nil
[23:32:47] Milos|Work: method(:rand).source_location => nil
[23:33:33] smathy: I reproduced it, ruby 2.3 rails 4.1.6: https://gist.github.com/smathy/192392ec134a86e408760b1303b0e948
[23:33:51] Milos|Work: does this mean this is a bug?
[23:34:04] smathy: Seems to be something hinky with what 1.year actually is, it says it's a Float, but I don't believe it.
[23:34:31] Ox0dea: Well, it's an AS::Duration, but it has coercion semantics.
[23:35:01] havenwood: Milos|Work: The docs explain when it's nil: http://ruby-doc.org/core/Method.html#method-i-source_location
[23:35:02] smathy: Ox0dea, 1.year.class returns Float
[23:35:07] RegulationD: has joined #ruby
[23:35:20] Ox0dea: smathy: Not here.
[23:35:21] Milos|Work: you're right though, if 1.year is a float, and rand takes a float, then rand(1.year) should also work ?
[23:35:28] Ox0dea: Milos|Work: It should.
[23:35:32] smathy: Ox0dea, yeah, Rails 4.1
[23:35:49] Ox0dea: Right, right.
[23:36:42] Milos|Work: havenwood, I figured that's what it meant :-)
[23:37:01] smathy: Milos|Work, drop to ruby 2.2.x and it works.
[23:37:04] Yiota: has joined #ruby
[23:37:21] Milos|Work: Yeah, the system actually runs on ruby 2.0 but I'm trying it on ruby 2.3 and it seemed to go fine until that point
[23:37:27] Milos|Work: I want to know why that issue exists
[23:38:23] Milos|Work: Ox0dea, are you saying 1.year gives you AS::Duration as the type?
[23:38:31] Ox0dea: Milos|Work: On ActiveSupprt 4.2.
[23:38:52] smathy: Milos|Work, why it exists is that software has bugs.
[23:38:53] Ox0dea: I suppose the Ruby version is relevant as well, but the comment in duration.rb says that it's a workaround for a 2.0 bug, not a 2.2 one.
[23:39:15] Milos|Work: smathy, that's fine; that's what I meant to ask. Is it a bug, or not.
[23:39:23] smathy: Milos|Work, yeah, definitely.
[23:39:49] smathy: Milos|Work, looks like a 2.3 <-> 4.1 incompatibility.
[23:40:08] Ox0dea: But Kernel#rand hasn't changed any time recently?
[23:40:24] smathy: Ox0dea, I think the bug is probably in Duration.
[23:40:45] smathy: Ox0dea, I dunno, 4.1 is irrelevant to me now :)
[23:41:01] smathy: Ox0dea, but anything that reports itself as a core class and isn't is gonna have a bad day.
[23:41:04] bruno-: has joined #ruby
[23:41:43] Milos|Work: smathy, so if I use 2.3 and 4.somethingelse will it work?
[23:42:06] Milos|Work: 2.3 and 4.2 ?
[23:42:15] smathy: Milos|Work, definitely if you use 4.2 it will work.
[23:42:25] tristanp_: has joined #ruby
[23:42:38] Milos|Work: Cool. Well in that case I guess it's not a big deal; just update your activesupport and the issue goes away.
[23:42:41] Milos|Work: so I will try that
[23:43:07] smathy: I wouldn't recommend using a different AS than the rest of the Rails gems.
[23:43:41] smathy: Milos|Work, and Rails isn't classically semver, so 4.1 -> 4.2 will have some other gotchas.
[23:43:42] banister: has joined #ruby
[23:43:51] Milos|Work: worth a shot
[23:43:53] Milos|Work: otherwise I will use 2.2
[23:44:31] smathy: Milos|Work, my recommendation (and we're getting OT here) is to create two empty rails apps for 4.1 and 4.2 and then do a recursive diff of them to see what config/startup things have changed.
[23:45:39] lemur: has joined #ruby
[23:46:26] Ox0dea: As an aside, #rand doesn't work for arbitrary Ranges.
[23:46:46] Ox0dea: Doesn't explain why `1.year` ends up being treated as a Range, of course.
[23:47:30] Ropeney: has joined #ruby
[23:47:33] Synthead: has joined #ruby
[23:52:34] coyo: has joined #ruby
[23:57:18] pilne: has joined #ruby
[23:57:31] cdg: has joined #ruby
[23:57:35] ekinmur: has joined #ruby
[23:57:41] Vile`: has joined #ruby