« Back to channel list

#ruby - 08 March 2017

« Back 1 day Forward 1 day »
[00:01:19] mwlang: has joined #ruby
[00:04:24] chopin: has joined #ruby
[00:04:41] falconer: has joined #ruby
[00:08:38] sid_fules: has joined #ruby
[00:13:26] Xiti: has joined #ruby
[00:13:53] oetjenj: has joined #ruby
[00:14:30] grant: has joined #ruby
[00:14:38] mjuszczak: has joined #ruby
[00:14:43] griffindy: has joined #ruby
[00:17:48] charliesome: has joined #ruby
[00:18:19] Ruby_Rocks_007: has joined #ruby
[00:25:07] Ruby_Rocks_007: has left #ruby: ()
[00:27:01] JeanCarloMachado: has joined #ruby
[00:27:30] brucebag: has left #ruby: ("Leaving")
[00:27:52] tyang: has joined #ruby
[00:27:53] AndBobsYourUncle: has joined #ruby
[00:30:55] BackEndCoder: has joined #ruby
[00:39:09] duderono_: has joined #ruby
[00:39:41] harfangk: has joined #ruby
[00:41:50] hotpancakes: has joined #ruby
[00:42:30] bkxd: has joined #ruby
[00:43:05] benlieb: has joined #ruby
[00:45:10] _djbkd: has joined #ruby
[00:51:13] zzz: has joined #ruby
[00:51:34] Tau: has joined #ruby
[00:54:44] JeanCarloMachado: has joined #ruby
[01:01:05] tildes: has joined #ruby
[01:02:38] grant: has joined #ruby
[01:02:58] hotpancakes: has joined #ruby
[01:03:50] skweek: has joined #ruby
[01:06:49] Jameser: has joined #ruby
[01:16:52] hotpancakes: has joined #ruby
[01:17:12] kristofferR: has joined #ruby
[01:23:06] ledestin: has joined #ruby
[01:23:37] JeanCarloMachado: has joined #ruby
[01:24:41] rht: has joined #ruby
[01:30:38] raspado: has joined #ruby
[01:32:05] solocshaw: has joined #ruby
[01:36:24] Channel6: has joined #ruby
[01:36:57] marchelzo: has joined #ruby
[01:37:29] marchelzo: hello ruby lovers
[01:38:43] zacts: has joined #ruby
[01:39:29] br0d1n: has joined #ruby
[01:41:30] mjuszczak: has joined #ruby
[01:46:04] SteenJobs: has joined #ruby
[01:48:42] AndBobsYourUncle: has joined #ruby
[01:51:02] LBRapid: has joined #ruby
[02:00:17] last_staff: has joined #ruby
[02:03:44] chopin: has joined #ruby
[02:10:35] itsautomatisch: has joined #ruby
[02:11:44] charliesome: has joined #ruby
[02:14:16] tAn: has joined #ruby
[02:15:24] Guest69206: has joined #ruby
[02:17:02] cschneid_: has joined #ruby
[02:24:01] KicStart: has joined #ruby
[02:27:04] SteenJobs: has joined #ruby
[02:28:29] mikecmpbll: has joined #ruby
[02:32:11] d^sh: has joined #ruby
[02:32:33] yusrideb: has joined #ruby
[02:33:34] __Yiota: has joined #ruby
[02:45:04] ncthom91: has joined #ruby
[02:49:33] bkxd: has joined #ruby
[02:55:38] jrafanie: has joined #ruby
[02:57:25] ss_much: has joined #ruby
[03:04:31] solocshaw: has joined #ruby
[03:04:52] libastral: has joined #ruby
[03:07:53] herbmillerjr: has joined #ruby
[03:28:04] jenrzzz: has joined #ruby
[03:28:04] jenrzzz: has joined #ruby
[03:35:09] camilasan: has joined #ruby
[03:36:46] chopin: has joined #ruby
[03:44:41] astrobunny: has joined #ruby
[03:49:30] grant: has joined #ruby
[03:52:57] Ruby_Rocks_007: has joined #ruby
[03:56:52] xall_: has joined #ruby
[03:58:01] Emmanuel_Chanel: has joined #ruby
[04:10:56] __Yiota: has joined #ruby
[04:25:27] Lyfe: has joined #ruby
[04:28:55] xall_: has joined #ruby
[04:34:11] jgnagy: has joined #ruby
[04:39:04] gix: has joined #ruby
[04:41:44] hotpanca_: has joined #ruby
[04:44:15] mjuszczak: has joined #ruby
[04:45:21] xall_: has joined #ruby
[04:49:37] chopin: has joined #ruby
[04:52:38] Channel6: has joined #ruby
[04:56:19] duderonomy: has joined #ruby
[04:56:53] Suslov: has joined #ruby
[04:58:40] twhitney11: has joined #ruby
[04:59:43] twhitney11: Hi ruby folks, I am reading to hit my head against my desk. I have a GUID in this format 'x1!4\x0F\xEB\xDAA\xA7\xF8\xD5\xB7\x9Ejx\x06' and trying to get it to look like this '783121340fc3abc39a41c2a7c3b8c395c2b7c29e6a7806'
[05:00:26] SteenJobs: has joined #ruby
[05:00:30] twhitney11: In python I did it easily with the following one liner: print(binascii.hexlify(bytes('x1!4\x0F\xEB\xDAA\xA7\xF8\xD5\xB7\x9Ejx\x06', 'utf-8')))
[05:00:33] yusrideb: has joined #ruby
[05:01:24] marchelzo: oh did you now
[05:02:38] twhitney11: I found a binascii module for ruby, but I seem to only be getting a longer string that does not match what I want... I also tried str.unpack("H*") which I see suggested in a lot of places, but get a much longer string that looks similar... 783121345c7830465c7845425c784441415c7841375c7846385c7844355c7842375c7839456a785c783036
[05:03:02] twhitney11: Just wondering what I am missing
[05:03:13] twhitney11: I know its probably something simple, I just don't have a ton of experience with Ruby
[05:03:33] Suslov: has joined #ruby
[05:03:51] marchelzo: you haven't formulated the problem very clearly
[05:03:56] matthewd: twhitney11: '\xFF' != "\xFF"
[05:04:24] matthewd: twhitney11: Read: your input string is longer than you think it is
[05:04:27] igniting: has joined #ruby
[05:04:30] ozcanesen: has joined #ruby
[05:04:31] marchelzo: good eye matthewd
[05:04:33] cschneid_: has joined #ruby
[05:05:52] twhitney11: this is exactly what I was looking for, now unpack gives me EXACTLY what I am expecting.
[05:06:25] twhitney11: can I use string interpolation if I am receiving this string from another source?
[05:07:28] Suslo: has joined #ruby
[05:07:39] marchelzo: twhitney11: no, but you don't need to
[05:08:22] marchelzo: it would be strange if this source where you got the string literally gave you 'x1!4\x0F\xEB\xDAA\xA7\xF8\xD5\xB7\x9Ejx\x06'
[05:08:25] KicStart: has left #ruby: ()
[05:10:19] twhitney11: I'll have to trace back to where I am receiving this string from
[05:10:48] twhitney11: It is a call with the net/ldap module. But I am not controlling how I am receiving the attribute.
[05:13:31] marchelzo: twhitney11: you don't need to control, but you do need to understand it
[05:15:48] Akuya: has joined #ruby
[05:16:04] twhitney11: marchelzo: that I don't
[05:16:22] twhitney11: hence ready to hit my head against the desk :-/
[05:16:44] marchelzo: well just get it from that source and inspect it
[05:17:23] matthewd: twhitney11: The question is whether the string truly contains "\\x0F", or whether that's an artifact of how you're examining it
[05:19:48] Guest77: has joined #ruby
[05:20:36] twhitney11: matthewd: thanks for your help so far. I concur that it is likely a problem with my little understanding of what format it actually is in when I get it.
[05:23:32] twhitney11: The variable is stored as validation_result[:user_data][:extra_attributes]["guid"] and when I print that the console I get the response ["x1!4\x0F\xEB\xDAA\xA7\xF8\xD5\xB7\x9Ejx\x06"] printed to the console
[05:24:34] matthewd: Right, so that's what you want, and should unpack directly
[05:25:23] twhitney11: matthewd: when I print the result of validation_result[:user_data][:extra_attributes]["guid"].unpack("H*") to the console I get that longer string mentioned above.
[05:26:20] matthewd: I'm not sure why that's working at all, as the above indicates it's an array
[05:26:42] matthewd: .first.unpack("H*") might go better
[05:27:46] twhitney11: I thought the same thing, except instead of using .first I used [0] and I get "5b"
[05:28:49] twhitney11: without the .first or the reference to the first index of the array I get ["5b22783121345c7830465c7845425c784441415c7841375c7846385c7844355c7842375c7839456a785c783036225d"] output to the console
[05:29:39] matthewd: Hang on, now you're showing that as an array too
[05:30:02] matthewd: How exactly are you printing these things?
[05:30:04] twhitney11: right, and thats exactly how it prints to the console when I check the output
[05:32:39] matthewd: Use `p` instead
[05:33:21] matthewd: It sounds like you do, in fact, literally have a string that starts off with a square bracket and a quote, and contains several instances of a slash followed by an x
[05:34:39] matthewd: Can you look in the LDAP store directly / in some other tool, to confirm that's what's actually in the data?
[05:35:55] naprimer_3: has joined #ruby
[05:36:01] twhitney11: I can look up the GUID in a different tool, and it ends up displaying as 783121340fc3abc39a41c2a7c3b8c395c2b7c29e6a7806
[05:36:16] twhitney11: I wonder if its net/ldap doing something strange with the objectguid
[05:37:06] matthewd: Is "a different tool" looking at the raw LDAP database, or is it a custom thing that might be doing its own transform?
[05:37:41] twhitney11: I'm using Apache Directory browser
[05:37:53] twhitney11: but the native Active Directory users and computers shows that same number too
[05:38:15] twhitney11: But I imagine those tools do do "something" to the data
[05:38:38] pawnbox: has joined #ruby
[05:39:15] marchelzo: ["x1!4\x0F\xEB\xDAA\xA7\xF8\xD5\xB7\x9Ejx\x06"] is valid json
[05:40:04] marchelzo: JSON.load(validation_result[:user_data][:extra_attributes]["guid"]).first.unpack("H*")
[05:40:43] marchelzo: ah wait that doesn't work how i thought it would lol
[05:40:57] marchelzo: it just strips out the backslashses
[05:41:03] marchelzo: backslashes, too
[05:41:42] xall_: has joined #ruby
[05:42:27] bkxd: has joined #ruby
[05:43:05] marchelzo: no idea where 783121340fc3abc39a41c2a7c3b8c395c2b7c29e6a7806 comes from tbh
[05:45:29] cschneid_: has joined #ruby
[05:48:12] aupadhye: has joined #ruby
[05:50:03] xall: has joined #ruby
[05:52:04] twhitney11: matthewd: your suggestion of it literally being a string with the square brackets and quotes didn't occur to me
[05:52:16] twhitney11: of course, I could try to strip that stuff and still get rid of it
[05:52:16] Ruby_Rocks_007: has left #ruby: ()
[05:52:50] twhitney11: but that seems dumb, I traced it back to the source, it seems that the array is populated with values from the LDAP directory as such result[index_result] = "#{value}"
[05:53:06] twhitney11: so its interpolating the value as a string... not sure why
[05:53:47] twhitney11: I modified the source, in my case I just threw a conditional in there that indicates if index_result is "guid" don't interpolate the string... then the unpack works as expect when I do .first.unpack("H*")
[05:54:05] twhitney11: Much thanks to marchelzo and matthewd for the assistance. It definitely pushed me to the right direction.
[05:54:10] matthewd: Ah, okay. So yeah the original is really an array of the right form, but that thing was stringifying it.
[05:54:45] twhitney11: exactly. I am unsure why the module I am using does the stringifying.
[05:54:59] Mortomes|Train: has joined #ruby
[05:55:18] patarr: has joined #ruby
[05:55:28] marchelzo: does it really work?
[05:55:48] twhitney11: yeah. I just took out the string interpolation for that one specific LDAP attribute.
[05:55:51] sneakerhax: has joined #ruby
[05:56:00] twhitney11: I left it in for other attributes, as they are all strings, so I don't see any harm.
[05:56:17] marchelzo: when i unpack that string i get 783121340febda41a7f8d5b79e6a7806
[05:56:30] twhitney11: yes, thats exactly what I need.
[05:56:42] marchelzo: i thought you needed 783121340fc3abc39a41c2a7c3b8c395c2b7c29e6a7806
[05:57:03] twhitney11: oh wait. I better look closer....
[05:57:06] twhitney11: and make sure, lol
[05:57:42] twhitney11: damn you're right
[05:57:56] twhitney11: but its closer now, seems like the endianness is just wrong
[06:01:44] matthewd: That looks like a utf-8 mangling
[06:02:03] Jameser`: has joined #ruby
[06:02:39] matthewd: The unpack result is 32 characters, which is the correct length of a uuid
[06:03:38] twhitney11: You're right, but it WAS matching for me because I am using another function that helps convert the data https://gist.github.com/astockwell/359c950fbc650c339eea
[06:03:55] mjuszczak: has joined #ruby
[06:04:07] twhitney11: so everything is working as expected, I copied and pasted the uuid before I ran it through that oracle endian conversion function
[06:04:44] twhitney11: so what I expect to match is indeed matching
[06:05:00] twhitney11: you guys are awesome
[06:05:27] twhitney11: the fact that it was literally a string with '"[]"' really threw me off
[06:05:45] twhitney11: I really thought I was working with an array
[06:06:27] twhitney11: I might be a ruby noob, but at least I wasn't crazy
[06:07:18] twhitney11: I do wonder if trying to JSON route would have worked, I might play with it, but I think making sure the value comes in correctly is the best appraoch ahah
[06:08:57] pawnbox_: has joined #ruby
[06:09:17] chopin: has joined #ruby
[06:11:24] anisha: has joined #ruby
[06:12:06] tdy: has joined #ruby
[06:12:11] tildes: has joined #ruby
[06:13:06] twhitney11: * and they disappear into the fog *
[06:13:55] marchelzo: twhitney11: im a ruby noob too
[06:14:05] marchelzo: the folks here are very nice though
[06:17:29] James123: has joined #ruby
[06:20:31] pulkit4tech: has joined #ruby
[06:20:31] twhitney11: Indeed they are very nice!
[06:20:50] twhitney11: I should know better though, I'm embarassed to say I teach programming at the university levle.
[06:21:06] maattdd: has joined #ruby
[06:21:08] twhitney11: Python and Perl.
[06:21:35] twhitney11: Ruby is new territory though.
[06:22:29] jgnagy: Ruby shouldn't feel too alien, coming from Python and Perl
[06:22:36] matthewd: twhitney11: The takeaway is `p` / #inspect, over puts, when debugging values
[06:23:02] matthewd: (which yeah, is just language knowledge.. like knowing to use repr in python)
[06:23:23] rkazak: has joined #ruby
[06:23:32] twhitney11: mathewd: gotcha
[06:23:48] twhitney11: jgnagy: not too foreign. I find it interesting that I don't need to explicitly return things
[06:24:13] jgnagy: on the flip side, everything always returns something
[06:24:14] twhitney11: I actually really like the block sytax using "end"
[06:24:53] jgnagy: you might appreciate the ternary operator being the same as Perl too
[06:25:13] twhitney11: jgnagy: yeah its neat, and makes it easy in conditionals to check if values are set. I've been using RubyMine from JetBrains, which sort of helps me be more "ruby-ish" I guess... because it yells at me whenever I explicitly return something, indicating to me that I don't need to do that
[06:25:22] jgnagy: foo = condition ? "when_true" : "when_false"
[06:25:25] MrBismuth: has joined #ruby
[06:25:41] jgnagy: for that, you can also use rubocop
[06:25:56] jgnagy: highly recommend getting used to the things rubocop yells at you about
[06:26:10] jgnagy: will help you learn the closest thing to canonical Ruby
[06:26:11] twhitney11: yes, I like the looks of the ternary operator too, easy to understand and quick and easy to use
[06:26:40] matthewd: rubocop has many opinions
[06:27:06] jgnagy: yes, I don't listen to everything it says
[06:27:11] howdoi: has joined #ruby
[06:27:16] twhitney11: oh wow thats neat.
[06:27:17] jgnagy: but enforcing code quality has its benefits
[06:27:28] twhitney11: just run it in a director and bam it analyzes your code.
[06:27:49] matthewd: For a bunch of trivial things, it'll even fix it for you
[06:27:55] jgnagy: `rubocop -a` will even fix things for you
[06:27:58] jgnagy: not everything
[06:28:04] jgnagy: yes, what he said
[06:28:09] twhitney11: Similar to "use warnings" in perl
[06:28:41] twhitney11: my students never use it, but Perl is forgiving and will run even if you do stupid things, so its nice to see what it tells you, i.e. you didn't use a variable named "nmae" because you actually called it "name"
[06:28:48] matthewd: ruby has a -w too, which will catch some other things
[06:29:08] jenrzzz: has joined #ruby
[06:29:09] jenrzzz: has joined #ruby
[06:29:19] linoge: has joined #ruby
[06:29:45] matthewd: (it's obviously process level, not scoped, though)
[06:29:46] twhitney11: is there a community consensus for str.eql? "whatever" vs str == "whatever" ?
[06:30:07] jgnagy: most people tend to use ==
[06:30:15] linoge: Hi, is there any way to skip a gem on a certain platform? Like, "when I'm using FreeBSD please do not attempt to install this particular gem"
[06:30:24] solocshaw: has joined #ruby
[06:30:27] linoge: Without regenerating the Gemfile.lock? :-)
[06:30:31] twhitney11: Ok. Coming from other languages I tend to use ==, but I've seen .eql? a lot in the codebase I'm working with
[06:31:01] jgnagy: linage only on some platforms
[06:31:08] jgnagy: not sure FreeBSD is among the list
[06:31:57] jgnagy: that said, the Gemfile is evaluated as ruby
[06:32:21] jgnagy: so if you can figure it out via the standard library + whatever bundler pulls in, I suppose you could do it that way
[06:34:13] matthewd: twhitney11: A quick grep shows Rails (just as an example project) has 5 calls to .eql?, two of which are inside an eql? definition, and the other 3 are all together, and I'm now looking at them suspiciously :)
[06:34:59] dminuoso: Oh yes, the Ruby world.
[06:35:12] twhitney11: matthewd: The codebase I am working with is built on Rails
[06:35:16] dminuoso: == vs === vs .eql? and .equal?
[06:35:20] twhitney11: I wonder if its a Rails thing?
[06:35:20] dminuoso: or super vs super()
[06:35:23] twhitney11: or preference.
[06:35:25] dminuoso: Keeping you on your toes.
[06:35:54] matthewd: It's not a Rails thing
[06:35:55] twhitney11: == vs === is the same in other languages. I call it ABSOLUTE equal to some of my students who don't quite get it.
[06:36:04] twhitney11: truth vs truthy vs false vs falsey
[06:36:07] dminuoso: twhitney11: The question on whether to prefer == or eql? has nothing to do with convention or preference, but intend.
[06:36:21] matthewd: To me, I think it would read as an unusual accent
[06:36:22] dminuoso: twhitney11: .eql? is for hash identity
[06:36:30] dminuoso: twhitney11: .equal? is for object identity
[06:36:35] dminuoso: twhitney11: and == is for generic equality
[06:36:42] dminuoso: Use the one appropriate for its meaning.
[06:36:46] twhitney11: even if they behave similarly?
[06:36:54] dminuoso: twhitney11: Yes, because some other object at some point might not.
[06:36:54] matthewd: "Similarly" is the key
[06:36:56] twhitney11: or in many cased identically
[06:37:06] twhitney11: I see, makes sense.
[06:37:09] matthewd: e.g., 1.eql?(1.0) vs 1 == 1.0
[06:37:32] twhitney11: I don't know if I can compare that to something else in a different language.
[06:37:33] dminuoso: twhitney11: For example using === insead of is_a? is great.. until you suddenly have a regex in the game.
[06:38:01] _sfiguser: has joined #ruby
[06:38:03] dminuoso: Which suddenly shows why they are not the same and should not be used interchangbly
[06:38:03] dminuoso: Even if it works for 95% of the cases, the rest 5% will cause you headaches and debugging sessions for no good reason.
[06:38:04] twhitney11: dminuoso: perfect sense.
[06:38:30] twhitney11: Thats a lot of things to check for various equality.
[06:38:46] dminuoso: twhitney11: That's because "equality" has different meanings in different contexts.
[06:39:01] dminuoso: twhitney11: The only thing that sucks is the way that ruby names these methods. ;-)
[06:39:25] twhitney11: In Python I recommend folks write their own comparison methods.
[06:39:48] dminuoso: twhitney11: Ruby has many of such traps by the way. I mentioned super vs super() before. There's some subtle but important difference between the two ;p
[06:39:48] twhitney11: __cmp__ special method for objects
[06:40:08] twhitney11: I'll have to Google the super example.
[06:40:14] matthewd: IME, you generally only need to care about == and maybe === (which looks similar, but has very different semantics and behaviour, even for core classes); eql? is something you define but don't really call; equal? is handy if you really need it, but you very rarely do
[06:40:46] dminuoso: twhitney11: super is a keyword, super() is a method. keyword_super passes all args *and* the given block, whereas super() does not.
[06:40:54] dminuoso: which makes super surprisingly unpredictable if you are not aware of it.
[06:40:56] twhitney11: I see. Well I've been mostly doing string comparisons in this project, so I haven't played around with all the other fancy stuff.
[06:41:30] twhitney11: That reminds me of the "return" gotcha in JavaScript...
[06:41:38] matthewd: super at least has the excuse of being a keyword
[06:42:12] twhitney11: You're aware of the JS return gotcha?
[06:43:37] twhitney11: super vs super() could really throw some people off, especially coming from Perl where you can omit the parenthesis in most cases
[06:44:01] bocaneri: has joined #ruby
[06:44:25] matthewd: twhitney11: No, I wasn't. But I don't think I would've ever put a newline there anyway :)
[06:45:07] twhitney11: ^ lol, I was curious because I recently threw the question on a test we used for hiring a few new developers in our area and it got all of them
[06:45:28] twhitney11: I'd at least hoped they would try running the code. But yes, regardless, it seems an odd place to decide to put a newline.
[06:45:58] matthewd: twhitney11: Yeah, that's the trap: you can/do generally omit parens in ruby too; if super weren't a magical keyword, they would be essentially identical
[06:46:12] twhitney11: I admit I had no idea of the gotcha until I was pulling questions for a candidate test and thought, a newline wouldn't make a difference would it? Then ran the code and found out.
[06:46:32] matthewd: (not actually true: `foo` and `foo()` are identical *unless* you have a local variable named `foo` in scope)
[06:47:14] twhitney11: hmm, that is quite the trap. I am surprised I haven't heard of anything similar in Perl.
[06:47:41] matthewd: Perl *is* the syntax gotcha ;)
[06:48:05] twhitney11: well I guess technically speaking print "whatever" and print("whatever") ARE different
[06:48:24] matthewd: $foo, @foo, and $foo[0], comes to mind too
[06:49:26] twhitney11: see that makes sense to me though
[06:49:41] twhitney11: scalar representation vs. array representation
[06:49:55] matthewd: I'd argue they all make sense, given the right context
[06:50:18] twhitney11: yeah, I guess its all opinion and/or context
[06:50:34] twhitney11: which is what it comes down to sometimes when choosing a language
[06:50:53] twhitney11: In some cases there is a clear 'right' choice of the language to use, but in other cases its whatever you know best
[06:51:03] matthewd: Any deep system of "simple" rules will have a few complex edge cases where those simple rules come together in a perfectly predictable way, that creates a surprising-to-beginner result, because they're trying to rote learn the rule's results
[06:51:06] matthewd: .. or something.
[06:51:23] twhitney11: I think I followed that.
[06:51:41] twhitney11: like the universe
[06:51:46] brent__: has joined #ruby
[06:51:56] mjolnird: has joined #ruby
[06:51:57] twhitney11: some experiment in some cases produces unexpected results
[06:52:11] twhitney11: ew just weren't looking at the laws of physics right
[06:52:18] twhitney11: .. or something.
[06:52:51] twhitney11: In my case I chose Rails over a really grotesque looking Java application
[06:52:58] conta: has joined #ruby
[06:53:49] bocaneri: has joined #ruby
[06:53:58] twhitney11: Not sure why some people still insist on using Java for the web. Maybe its one of those preference things, but damn it just seems hard to work with and slow anytime I use anything resembling Java.
[07:16:10] helpa: has joined #ruby
[07:17:34] djbkd: has joined #ruby
[07:18:27] Tatey: has joined #ruby
[07:18:47] Mortomes|Work: has joined #ruby
[07:18:52] hurricanehrndz: has joined #ruby
[07:19:31] DaniG2k: has joined #ruby
[07:21:43] Jameser: has joined #ruby
[07:23:54] andikr: has joined #ruby
[07:25:59] last_staff: has joined #ruby
[07:26:20] Qchmqs: has joined #ruby
[07:28:32] jdm: has joined #ruby
[07:31:33] dminuoso: matthewd: Well I guess what I really want is more type safety.
[07:31:43] dminuoso: That's why I mentioned Crystal.
[07:32:06] dminuoso: If I look at the bulk of my tests, I do plenty of whitebox testing where I ensure that proper types are passe.
[07:33:53] matthewd: The type systems I find interesting tend to be strong on implicit coercion, but I guess a hard-line approach to float vs not-float still wouldn't be unreasonable there
[07:34:33] matthewd: (I don't know Crystal, beyond the highest level "it looks like ruby but is not ruby")
[07:35:36] renchan: has joined #ruby
[07:35:54] dminuoso: matthewd: Ruby compiled to LLVM with static typing, with more consistencies. Most dynamic features are removed.
[07:37:03] dminuoso: Though my recent development has started pushing me towards functional languages
[07:37:22] dminuoso: Currently learning Haskell with Erlang on my list
[07:38:01] pawnbox: has joined #ruby
[07:38:29] dminuoso: matthewd: I think these dynamic features that Ruby have are not necessarily very wise. I mean the mere fact that the seond you require an external library you can no longer reason about *any* class, even your own, it's wrong.
[07:38:50] matthewd: But handy ;)
[07:39:35] dminuoso: matthewd: Well it allows you to solve problems while ignoring interfaces, dependency inversion, inheritance, etc.
[07:40:03] dminuoso: Because you know, if it doesn't work, just sprinkle some instance_eval and Module#prepend -> and now it works.
[07:40:26] dminuoso: That's like the abyss of Ruby metaprogramming ;)
[07:40:59] nOwz: has joined #ruby
[07:47:43] cschneid_: has joined #ruby
[07:49:23] bruce_lee: has joined #ruby
[07:49:23] bruce_lee: has joined #ruby
[07:49:50] bkxd: has joined #ruby
[07:51:58] djbkd: has joined #ruby
[07:52:56] djbkd: has left #ruby: ()
[07:56:04] nOwz: has joined #ruby
[07:56:10] patarr: has joined #ruby
[07:57:01] FifthWall: has joined #ruby
[07:58:43] nOwz: has joined #ruby
[07:59:52] kristofferR: has joined #ruby
[08:00:49] _whitelogger: has joined #ruby
[08:02:12] Radar: has joined #ruby
[08:05:40] yeticry_: has joined #ruby
[08:08:41] _whitelogger: has joined #ruby
[08:09:29] rippa: has joined #ruby
[08:09:53] montanonic: has joined #ruby
[08:11:44] TomyWork: has joined #ruby
[08:12:06] xall: has joined #ruby
[08:12:07] _whitelogger: has joined #ruby
[08:13:44] EV3RYDAYPR0GRESS: has joined #ruby
[08:15:59] anisha_: has joined #ruby
[08:18:27] _whitelogger: has joined #ruby
[08:20:46] pawnbox: has joined #ruby
[08:22:25] stoffus: has joined #ruby
[08:22:26] aganov: has joined #ruby
[08:22:39] teclator: has joined #ruby
[08:29:11] d0nn1e: has joined #ruby
[08:33:47] stoffus: has joined #ruby
[08:35:32] antgel: has joined #ruby
[08:36:07] pulkit4tech: has joined #ruby
[08:37:27] ych: has joined #ruby
[08:38:01] kolaman: has joined #ruby
[08:44:44] akkad: has joined #ruby
[08:46:14] xen0fon: has joined #ruby
[08:47:25] jeyraof^mbpr: has joined #ruby
[08:48:45] Cohedrin: has joined #ruby
[08:49:31] jeyraof^mbpr: is there any way parsing previous section of double colon? :
[08:49:34] jeyraof^mbpr: "23a4f010-3975-45c7-9468-3c98d8509ad2::124"
[08:49:52] flying: has joined #ruby
[08:50:26] Silthias1: has joined #ruby
[08:50:37] govg: has joined #ruby
[08:51:08] matthewd: jeyraof^mbpr: String#split may be what you're looking for
[08:51:58] lenwood: has joined #ruby
[08:52:31] dminuoso: Is there any way to write a React component that gives a search interface for a rails model and displays the results in a paginated list?
[08:52:41] dminuoso: ACTION eyeballs matthewd and hopes for a gist containing the solution
[08:53:03] nOwz: has joined #ruby
[08:53:10] Silthias: has joined #ruby
[08:54:11] araujo: has joined #ruby
[08:54:12] pwnd_nsfw: string.split("::"
[08:54:17] pwnd_nsfw: Is what he was offering
[08:55:41] DaniG2k: has joined #ruby
[08:57:10] matthewd: dminuoso: I know nothing about React, beyond the fact that react_on_rails is a thing that exists, I'm afraid
[08:58:03] dminuoso: matthewd: And that's like a truly horrible.. engine? gem?
[08:58:58] matthewd: As I understand it, it's a.. comprehensive, engine.. or gem.. or something.
[09:00:01] pwnd_nsfw: "comprehensive?"
[09:00:06] mark_66: has joined #ruby
[09:01:37] maattdd: has joined #ruby
[09:01:56] matthewd: "including or dealing with all or nearly all elements or aspects of something"
[09:02:14] burgestrand: has joined #ruby
[09:02:56] marr: has joined #ruby
[09:04:09] xall: has joined #ruby
[09:05:51] mikecmpbll: has joined #ruby
[09:07:33] brent__: has joined #ruby
[09:08:17] baweaver: has joined #ruby
[09:08:37] conta: has joined #ruby
[09:10:21] esObe_: has joined #ruby
[09:16:06] maattdd_: has joined #ruby
[09:16:23] byte512: has joined #ruby
[09:16:53] jsrn_: has joined #ruby
[09:18:28] dminuoso: matthewd: Well it's junk because it addresses problems in the wrong way.
[09:18:52] dminuoso: matthewd: It's like "hey you are jealous of all these react, webpack and redux folks? you dont need to understand how anything works, you can just get started instead"
[09:19:11] dminuoso: "And because we control everything for you, you are pinned to a specific rails, webpack, redux and react version"
[09:19:20] maattdd__: has joined #ruby
[09:19:55] nOwz: has joined #ruby
[09:20:01] govg: has joined #ruby
[09:20:11] jokke: anyone know what's going on here? cannot load such file -- rspec/matchers/built_in/be_kind_of
[09:20:54] jokke: i only have this error on our ci
[09:24:07] tomphp: has joined #ruby
[09:24:29] jokke: so i suspect some minor version differences
[09:26:06] cfec0b8d: has joined #ruby
[09:32:09] jokke: it occurs at a be_a expectation
[09:32:28] biberu: has joined #ruby
[09:34:59] maattdd: has joined #ruby
[09:38:57] lxsameer: has joined #ruby
[09:45:40] Beams: has joined #ruby
[09:45:55] stamina: has joined #ruby
[09:46:43] pawnbox: has joined #ruby
[09:47:17] cibs: has joined #ruby
[09:47:25] pawnbox: has joined #ruby
[09:47:40] __Yiota: has joined #ruby
[09:47:57] snickers: has joined #ruby
[09:48:29] pawnbox: has joined #ruby
[09:51:56] hotpancakes: has joined #ruby
[09:53:53] hotpanca_: has joined #ruby
[09:54:42] xen0fon: has joined #ruby
[09:54:54] jokke: anyone? :/
[09:55:01] cibs: has joined #ruby
[09:55:31] dminuoso: jokke: stacktrace.
[09:55:34] dminuoso: You should know this.
[09:55:56] jokke: https://p.jreinert.com/TD7Oc/
[09:56:03] workmad3: has joined #ruby
[09:56:33] jokke: (i changed the matcher to be_kind_of)
[09:56:37] dminuoso: jokke: That seems to be an incomplete stacktrace
[09:56:38] jokke: but no luck
[09:56:52] jokke: hm it's the one i got from rspec
[09:57:02] dminuoso: jokke: Run rpsec with -b
[09:57:04] patarr: has joined #ruby
[09:57:12] jokke: i can only reproduce this on the ci
[09:57:18] jokke: i even rebundled
[09:57:34] jokke: removed all bundled gems and rebundled to see if it's a version issue
[09:57:35] dminuoso: jokke: you can add "-b" or "--backtrace" to your .rspec file
[09:57:38] dminuoso: then the ci will respect that
[09:57:43] jokke: i'll do that
[09:58:38] dminuoso: jokke: Note the thing I would be looking at is version numbers of shoulda_matchers inside your ci chain compared to with what you have locally (from your Gemfile.lock)
[09:59:34] dminuoso: or well, this is not shouda_matchers I think
[09:59:42] jokke: yeah it's builtin matchers
[09:59:42] dminuoso: Idea is the same though
[10:01:13] boshhead: has joined #ruby
[10:01:23] jokke: on ci: rspec-core-3.5.4/ rspec-expectations-3.5.0/ rspec-mocks-3.5.0/ rspec-support-3.5.0/
[10:01:44] dminuoso: jokke: Is that from the stacktrace?
[10:01:54] jokke: no i'm still running the tests
[10:01:59] jokke: it takes a while
[10:02:05] dminuoso: jokke: Yeah I'd hold my pants, even for the versions.
[10:02:22] jokke: ok weird...
[10:02:35] dminuoso: Weird because suddenly the stacktrace shows different versions?
[10:02:36] jokke: on the ci i have no gem rspec
[10:02:38] dminuoso: If so I get a cookie
[10:02:57] dminuoso: jokke: If there no rspec in your Gemfile?
[10:02:57] jokke: only the ones i posted above
[10:03:00] dminuoso: If so we have found the issue.
[10:03:17] dminuoso: Available in the same bundle group that your ci uses?
[10:03:47] dminuoso: jokke: Oh the lack of an "rspec" gem is not surprising
[10:03:51] dminuoso: I think "rspec" is just a meta gem anyway
[10:04:00] jokke: https://p.jreinert.com/rBeYc/
[10:05:01] jokke: and this is from my gemfile.lock https://p.jreinert.com/OsLIj/
[10:05:11] dminuoso: jokke: Does your CI use the gemfile.lock?
[10:05:28] jokke: no it's not checked into vcs
[10:05:40] dminuoso: jokke: then please also add the relevant section from your gemfile
[10:05:53] jokke: oh wait it is
[10:06:08] dminuoso: jokke: Is it the same ruby version?
[10:07:00] dminuoso: jokke: Now things have become interesting.
[10:07:48] pandaant: has joined #ruby
[10:08:02] jokke: wtf why is it rspec-core-3.5.4 on the ci
[10:08:11] jokke: and 3.5.0 locally
[10:08:20] dminuoso: The locally seems wrong
[10:08:27] dminuoso: because Gemfile.lock is pinned to 3.5.4
[10:08:37] dminuoso: rspec-core (3.5.4)
[10:08:51] jokke: ah i misread
[10:08:51] xall: has joined #ruby
[10:08:58] jokke: (checked the version at rspec)
[10:09:25] dminuoso: One thing surprises me
[10:09:25] dminuoso: rspec (3.5.0)
[10:09:31] jokke: and it's super weird since i use kind_of everywhere
[10:09:32] dminuoso: 11:02 < jokke> on the ci i have no gem rspec
[10:09:34] jokke: just not be_kind_of
[10:09:42] sid_fules: has joined #ruby
[10:10:40] jokke: only rspec-*
[10:10:47] dminuoso: If Gemfile.lock pins it, Im unsure why it wouldn't be available.
[10:11:05] jokke: i'll clear the ci's cache and give it another go
[10:11:07] dminuoso: jokke: how is rspec required in your testsuite?
[10:11:07] kolaman: has joined #ruby
[10:11:11] John3: has joined #ruby
[10:11:26] jokke: not at all
[10:11:42] jokke: i have no explicit require rspec
[10:11:44] dminuoso: jokke: You dont have a rails_helper ?
[10:11:49] jokke: spec_helper
[10:11:58] jokke: but it doesn't require rspec
[10:12:17] dminuoso: jokke: Can you show me the section of your gemfile?
[10:12:22] jokke: my Rakefile requires 'rspec/core/rake_task'
[10:12:33] toretore: has joined #ruby
[10:12:46] jokke: https://p.jreinert.com/sLj/
[10:13:00] pawnbox: has joined #ruby
[10:14:09] dminuoso: jokke: Let's test something. Can you pry into the ci runner with a shell?
[10:14:24] jokke: that'd be sweet
[10:14:35] dminuoso: jokke: By "pry" I meant it in the English sense tho
[10:14:40] astrobunny: has joined #ruby
[10:14:47] jokke: well it spawns a docker container
[10:15:01] dminuoso: docker containers you can shell into
[10:15:02] jokke: i'd have to halt it somehow
[10:15:55] jokke: i'll check if clearing the gems from the cache did the trick first though
[10:16:29] dminuoso: jokke: Ive been looking at the source code
[10:16:31] dminuoso: Something is fucked up
[10:16:34] dminuoso: With your stack trace
[10:16:39] dminuoso: # /cache/energybox/aggregator/ruby/2.3.0/gems/rspec-expectations-3.5.0/lib/rspec/matchers.rb:386:in `require'
[10:16:49] dminuoso: BuiltIn::BeAKindOf.new(expected)
[10:16:52] dminuoso: That's the line of code.
[10:17:02] dminuoso: See what I mean?
[10:17:15] dminuoso: Or is this Ruby's autoloader kicking in?
[10:17:36] jokke: clearing the cache did the trick
[10:17:41] jokke: go figure
[10:17:46] dminuoso: jokke: gitlab runner?
[10:18:20] jokke: it plays nice with our ancient gitlab version
[10:18:29] dminuoso: jokke: We just decided to move everything into hosted gitlab
[10:18:40] jokke: dminuoso: i can totally relate
[10:18:56] jokke: but for me gogs would be another option
[10:19:21] dminuoso: Why? Are you afraid a db admin is gonna DROP DATABASE and all your repos are gone?
[10:19:22] jokke: seems promising. even though i don't like go
[10:19:23] dminuoso: ACTION smiles
[10:19:33] Silthias1: has joined #ruby
[10:19:56] jokke: no but our policy is not to host our code externally
[10:20:22] dminuoso: jokke: Yeah, we are ISO 27001 certified so it wasn't exactly an easy sell.
[10:20:43] conta: has joined #ruby
[10:21:01] jokke: it's way cheaper though :D
[10:21:07] dminuoso: Cheaper than what?
[10:21:12] jokke: than hosting yourself
[10:21:18] jokke: the maintanence..
[10:21:21] Silthias: has joined #ruby
[10:21:26] dminuoso: jokke: And indirectly that was a security argument too.
[10:21:28] jokke: oh jeez the maintanence
[10:21:54] dminuoso: jokke: But in the end it was "either we give the source code to the NSA, or we keep it in our own infrastructure so the russians and chinese can get it too"
[10:22:01] dminuoso: In a nutshell.
[10:22:15] jokke: you from europe?
[10:22:45] jokke: i figured. i think only germans have the obsessive need to host everything themselves
[10:22:48] dminuoso: Just like you, based on your nickname and the host of your pasties.
[10:23:05] jokke: well half
[10:23:11] jokke: i'm half finnish
[10:23:21] jokke: 3/4 even ;)
[10:23:25] dminuoso: That makes you a conservative alcoholic.
[10:23:58] dminuoso: 11:22 < jokke> i figured. i think only germans have the obsessive need to host everything themselves
[10:24:01] dminuoso: ^- and its idiotic too.
[10:24:37] surrounder: jokke: not really, the swiss do it too
[10:24:41] dminuoso: I mean its not like we push customer data into gitlab.
[10:24:47] surrounder: probably to not have their data in the EU
[10:24:48] dminuoso: From that perspective its just source code which is not crticial
[10:24:51] dminuoso: It's just IP
[10:24:55] jokke: surrounder: haha true
[10:25:19] dminuoso: jokke: In the end ISO 27001 basically wants to keep customer data safe.
[10:25:23] dminuoso: So it's kind of compatible actually
[10:25:45] jokke: is it compatible if your customer owns the code?
[10:25:47] dminuoso: (Technically its not true, but source code is not our business)
[10:25:52] dminuoso: jokke: We own the code.
[10:26:02] jokke: we sometimes don't
[10:26:09] dminuoso: Right, then that's an issue.
[10:26:20] dminuoso: jokke: Though gitlab has dedicated hosting for such customers.
[10:26:28] dminuoso: such customers as yourself I mean
[10:26:33] jokke: dminuoso: where're you at btw? we need skilled ruby devs badly :)
[10:26:52] dminuoso: Let me guess
[10:27:00] jokke: Frankfurt
[10:27:04] dminuoso: Almost same thing.
[10:27:15] dminuoso: Bingo. Triggered.
[10:27:40] jokke: Noone wants their city to be compared with munich
[10:27:47] dminuoso: Munich is an awesome city
[10:27:49] jokke: or anything in bavaria really
[10:27:51] dminuoso: rental costs aside
[10:28:32] manveru: heh, we actually have github enterprise because of privacy... also germany
[10:28:45] xall: has joined #ruby
[10:28:52] jokke: many germans here
[10:29:27] dminuoso: manveru: is it possible to define the hosting location?
[10:30:02] dminuoso: Or can you provide your own physical hosting even?
[10:30:17] manveru: yeah, we host it in our datacenters
[10:30:21] dminuoso: Oh that's neat.
[10:30:35] manveru: frankfurt atm, but moving to amsterdam
[10:30:58] jokke: manveru: ooooh!
[10:31:04] jokke: manveru: no you won't!
[10:31:12] jokke: manveru: we've got a job for you!
[10:31:29] surrounder: manveru: yay welcome from us swamp germans ;)
[10:31:44] cyphase: has joined #ruby
[10:31:49] jokke: surrounder: youre dutch?
[10:31:51] manveru: i won't, just our DC
[10:32:27] jokke: i guess this is europe 'o clock after all
[10:32:52] manveru: i'm also in bavaria
[10:34:34] dminuoso: Brilliant. I just understood the Riemann series theorem.
[10:34:44] dminuoso: Perhaps I should study maths ;o
[10:35:32] tlaxkit: has joined #ruby
[10:42:48] bkxd: has joined #ruby
[10:44:03] Beams: has joined #ruby
[10:46:09] esObe__: has joined #ruby
[10:46:11] ferr1: has joined #ruby
[10:46:29] hotpancakes: has joined #ruby
[10:46:42] dionysus70: has joined #ruby
[10:47:38] banandana: has joined #ruby
[10:51:39] Silthias: has joined #ruby
[10:53:59] harfangk: has joined #ruby
[10:54:14] jaruga__________: has joined #ruby
[10:56:14] pawnbox: has joined #ruby
[10:57:56] maattdd: has joined #ruby
[10:58:04] sagax: has joined #ruby
[10:58:52] jokke: dminuoso: why hosted gitlab and not github btw?
[11:00:10] dminuoso: jokke: gitlab-runner
[11:00:19] dminuoso: meh travis.
[11:00:30] dminuoso: jokke: I like having everything in one package.
[11:00:40] dminuoso: and gitlab does that fairly well
[11:00:47] jokke: i guess so
[11:01:18] dminuoso: jokke: also the issue tracker on github is a joke
[11:01:23] dminuoso: you cant scrum on it.
[11:01:29] jokke: i'd want to try gogs + drone though
[11:02:01] LambdaSix: hurk, scrum
[11:02:42] LambdaSix: Sorry, reflex reaction to software development ideologies :P
[11:02:59] jokke: dminuoso: well.. i'd say expecting proper project management tools from a vcs interface is unrealistic
[11:03:22] dminuoso: jokke: Also github is tons more expensive.. ;-)
[11:03:33] jokke: haven't looked into that
[11:03:38] dminuoso: jokke: I mean there's nothing inherently wrong with github, don't get me wrong.
[11:03:45] dminuoso: It's wonderful, but gitlab is just a tad bit better.
[11:03:58] Beams: has joined #ruby
[11:04:18] jokke: also github is still not making any profits
[11:04:23] jokke: it's scary really
[11:04:38] jokke: literally _everyone_ hosts their foss ther
[11:04:56] dminuoso: jokke: hosted gitlab enterprise costs $80/month with no limit on the users.
[11:05:06] dminuoso: github enterprise costs $2500 annually for 10 years.
[11:05:12] jokke: dminuoso: lol 80 a month?
[11:05:15] jokke: that's nothing
[11:05:31] dminuoso: am I mixing things up?
[11:05:34] dminuoso: we dont have enterprise
[11:05:58] dminuoso: jokke: Nope just checked, 80 bucks a month.
[11:06:25] dminuoso: jokke: Or you do block storage and pay 15cents/GB/month
[11:06:49] dminuoso: (+ similarly sized CI Runner pricing)
[11:06:54] jokke: we have some huge repos but that's just because ppl don't know how to use git
[11:07:05] dminuoso: jokke: https://githost.io/
[11:07:08] jokke: assets in vcs \o/
[11:07:27] manveru: damn, i didn't even know
[11:07:28] manveru: https://news.ycombinator.com/item?id=13188574
[11:07:56] tvw: has joined #ruby
[11:08:21] LambdaSix: dionysus69: The $80/month is for the hosting
[11:08:29] LambdaSix: dminuoso: ^
[11:08:35] LambdaSix: You still pay £3.25/user
[11:08:48] cibs: has joined #ruby
[11:08:57] LambdaSix: Or the $16.59/user for Enterprise Edition Premium
[11:09:17] dminuoso: LambdaSix: Ah well, that's still fine.
[11:09:26] dminuoso: LambdaSix: For 10 users thats 390 bucks a year.
[11:09:37] patarr: has joined #ruby
[11:09:46] dminuoso: If you want to know expensive look at Jira.
[11:09:50] LambdaSix: $1125.9/yr for enterprise
[11:09:52] dminuoso: + Stash + Bamboo
[11:10:07] dminuoso: LambdaSix: Huh?
[11:10:12] LambdaSix: ((16.59 * 10) + 80) * 12
[11:10:24] LambdaSix: *enterprise gitlabs hosted
[11:10:33] dminuoso: LambdaSix: But that's with managed private hosting.
[11:10:45] LambdaSix: But it's also good to remember that Github != Gitlabs
[11:11:06] LambdaSix: So of course the price will be different, it's two different products & companies :P
[11:11:48] dminuoso: LambdaSix: Atlassian prices are a completely different ballpark still though.
[11:12:07] LambdaSix: Yeah, I'm looking at recommending bitbucket for use at my company
[11:12:08] dminuoso: When someone runs Atlassian you can be sure they also have big fat SAP and Oracle in their offices.
[11:12:30] dminuoso: Just because dishing out money ensures quality.
[11:13:12] kristofferR: has joined #ruby
[11:13:27] LambdaSix: When you get into these kinda products, companies will pay the extra for SLA's and support packages
[11:21:52] antgel: has joined #ruby
[11:22:07] manveru: dminuoso: we use JIRA/Confluence but don't do SAP/Oracle :)
[11:24:56] Ruby_Rocks_007: has joined #ruby
[11:25:21] senayar: has joined #ruby
[11:25:21] senayar: has joined #ruby
[11:26:54] nOwz: has joined #ruby
[11:31:14] hotpancakes: has joined #ruby
[11:33:42] teddysmoker: has joined #ruby
[11:36:20] nowhere_man: has joined #ruby
[11:37:30] ldnunes: has joined #ruby
[11:40:08] kristofferR: has joined #ruby
[11:40:17] nettoweb: has joined #ruby
[11:40:38] Jameser: has joined #ruby
[11:41:45] darix: manveru: wait for it.
[11:46:00] kristofferR: has joined #ruby
[11:48:59] JeanCarloMachado: has joined #ruby
[11:49:43] hotpancakes: has joined #ruby
[11:49:47] kristoff_: has joined #ruby
[11:51:23] chromis: has joined #ruby
[11:52:54] jamesaxl: has joined #ruby
[11:54:03] Phage: has joined #ruby
[11:54:41] nettoweb: has joined #ruby
[11:56:09] solocshaw: has joined #ruby
[11:56:12] urbanmonk: has joined #ruby
[11:56:20] GeorgesLeYeti: has joined #ruby
[11:56:39] bkxd: has joined #ruby
[11:56:45] GeorgesLeYeti: I would like to convert 3.354 to 03.35
[11:56:52] kristofferR: has joined #ruby
[11:57:01] KicStart: has joined #ruby
[11:57:57] GeorgesLeYeti: I know '%02d'%(3.354) => 03 or '%.2f'%(3.354) => 3.35
[11:58:03] GeorgesLeYeti: how can i combine both
[12:01:46] al2o3-cr: >> "0%.2f" % 3.354
[12:01:47] ruby[bot]: al2o3-cr: # => "03.35" (https://eval.in/750560)
[12:02:15] matthewd: >> '%05.2f' % 3.354
[12:02:17] ruby[bot]: matthewd: # => "03.35" (https://eval.in/750561)
[12:04:05] harfangk_: has joined #ruby
[12:04:36] conta: has joined #ruby
[12:05:00] lenwood: has joined #ruby
[12:05:06] harfangk__: has joined #ruby
[12:07:31] pawnbox: has joined #ruby
[12:10:49] pawnbox: has joined #ruby
[12:11:23] kristofferR: has joined #ruby
[12:12:39] valkyr2e: has joined #ruby
[12:25:47] GeorgesLeYeti: Ty a lot al2o3-cr & matthewd
[12:32:46] tvw: has joined #ruby
[12:35:34] stoffus: has joined #ruby
[12:36:38] __Yiota: has joined #ruby
[12:38:10] hotpancakes: has joined #ruby
[12:38:45] nOwz: has joined #ruby
[12:38:50] certainty: has joined #ruby
[12:39:55] Silthias1: has joined #ruby
[12:41:44] Silthias2: has joined #ruby
[12:42:16] ziyangtian: has joined #ruby
[12:46:28] cschneid_: has joined #ruby
[12:52:33] _sfiguser: has joined #ruby
[12:56:33] bkxd: has joined #ruby
[13:05:49] pawnbox: has joined #ruby
[13:06:39] anisha: has joined #ruby
[13:08:29] bmurt: has joined #ruby
[13:12:23] bkxd: has joined #ruby
[13:15:09] kristofferR: has joined #ruby
[13:17:56] pawnbox: has joined #ruby
[13:19:18] pawnbox: has joined #ruby
[13:22:31] pawnbox: has joined #ruby
[13:22:56] charliesome: has joined #ruby
[13:23:26] binaryplease: has joined #ruby
[13:24:02] Beams: has joined #ruby
[13:24:34] brent__: has joined #ruby
[13:24:54] Jameser: has joined #ruby
[13:26:07] tyang: has joined #ruby
[13:27:14] bkxd: has joined #ruby
[13:29:58] ycon_: has joined #ruby
[13:30:16] ycon_: Hi all, basic question. I'm trying to run a ruby file to fix up my OSX setup
[13:30:27] ycon_: ruby patch-edid.rb doesn't work. (Ruby no such file or dir)
[13:30:37] ycon_: DO i need to brew install ruby?
[13:33:50] nettoweb: has joined #ruby
[13:34:18] maattdd: as the error says patch-edid.rb doesn't exist
[13:36:53] cibs: has joined #ruby
[13:40:17] harfangk: has joined #ruby
[13:41:14] mwlang: has joined #ruby
[13:43:58] griffindy: has joined #ruby
[13:44:38] bmurt: has joined #ruby
[13:44:47] itsautomatisch: has joined #ruby
[13:44:53] falconer: has joined #ruby
[13:46:31] whiteline: has joined #ruby
[13:47:15] kobain: has joined #ruby
[13:49:20] Tempesta: has joined #ruby
[13:49:20] Tempesta: has joined #ruby
[13:49:27] rajdesai: has joined #ruby
[13:51:39] brent__: has joined #ruby
[13:51:47] JoshS: has joined #ruby
[13:59:25] jrafanie: has joined #ruby
[13:59:31] gnufied: has joined #ruby
[14:03:46] Derperperd: has joined #ruby
[14:06:25] bmurt: has joined #ruby
[14:07:14] rajdesai: has joined #ruby
[14:08:55] Derperperd: has joined #ruby
[14:10:47] pawnbox: has joined #ruby
[14:11:04] rajdesai: has joined #ruby
[14:11:14] rajdesai: has joined #ruby
[14:12:53] bmurt: has joined #ruby
[14:13:03] rajdesai: has joined #ruby
[14:13:49] TvL2386: has joined #ruby
[14:13:55] maattdd__: has joined #ruby
[14:14:09] pawnbox_: has joined #ruby
[14:14:48] bmurt: has joined #ruby
[14:15:39] flying: has joined #ruby
[14:15:40] ramortegui: has joined #ruby
[14:16:03] Hobbyboy: has joined #ruby
[14:21:43] millerti: has joined #ruby
[14:22:35] rajdesai: has joined #ruby
[14:24:33] bmurt: has joined #ruby
[14:28:17] conta: has joined #ruby
[14:28:48] safetypin: has joined #ruby
[14:30:41] bkxd: has joined #ruby
[14:30:41] RenatoSilva: has joined #ruby
[14:30:45] DLSteve: has joined #ruby
[14:31:56] pawnbox: has joined #ruby
[14:32:54] SteenJobs: has joined #ruby
[14:34:43] chouhoulis: has joined #ruby
[14:35:16] dionysus69: has joined #ruby
[14:36:47] baked__beans: has joined #ruby
[14:37:32] cibs: has joined #ruby
[14:37:32] Beams: has joined #ruby
[14:38:36] maloik: has joined #ruby
[14:49:01] cdg: has joined #ruby
[14:53:13] nettoweb: has joined #ruby
[14:55:02] BackEndCoder: has joined #ruby
[14:55:47] tvw: has joined #ruby
[15:00:08] pawnbox: has joined #ruby
[15:00:33] arooni: has joined #ruby
[15:03:53] ^Denis: has joined #ruby
[15:14:22] pawnbox: has joined #ruby
[15:16:21] shinnya: has joined #ruby
[15:16:48] pawnbox: has joined #ruby
[15:19:05] naprimer_2: has joined #ruby
[15:21:04] govg: has joined #ruby
[15:23:45] Hobbyboy: has joined #ruby
[15:24:45] raspado: has joined #ruby
[15:30:22] ^Denis: has joined #ruby
[15:31:38] agent_white: has joined #ruby
[15:35:02] MarcWeber: has joined #ruby
[15:35:14] MarcWeber: Is it possible to send html page pratially - wait - then continue eg using Sinatra?
[15:36:35] sepp2k: has joined #ruby
[15:36:46] MarcWeber: Is Rack able to do it ?
[15:37:18] dminuoso: MarcWeber: Yes.
[15:38:08] dminuoso: MarcWeber: It's called chunked encoding.
[15:43:07] safetypin: has joined #ruby
[15:43:22] hotpancakes: has joined #ruby
[15:46:35] nobitanobi: has joined #ruby
[15:47:28] tyang_: has joined #ruby
[15:47:56] dionysus69: has joined #ruby
[15:50:30] agent_white: Mornin' folks
[15:51:05] cout: oh man I feel old -- I just tried to call a method that apparently got removed between ruby 1.8 and 1.9
[15:52:02] cout: anyone know what the fastest alternative is to Array#nitems ?
[15:52:53] cout: the changelog says to use count {|i| !i.nil?} but without benchmarking I have a feeling that's slower than nitems was due to the block
[15:53:04] leah2: x.size - x.count(nil) ?
[15:53:09] tyang__: has joined #ruby
[15:53:15] matthewd: cout: My first guess would be ^
[15:53:30] cout: leah2: oh nice
[15:53:44] matthewd: leah2 was too fast for me
[15:54:21] leah2: should be constant space and linear time
[15:54:32] matthewd: .. but for readability, I'd probably first write .compact.size, unless perf actually-really mattered
[15:55:35] matthewd: (and if it does, is this really a hotspot processing different arrays each time? If nils are undesirable, why can't they be pre-emptively compacted?)
[15:56:41] leah2: i dont think i ever used nitems
[15:56:43] cout: matthewd: yeah it's a hot loop
[15:57:34] cout: .compact.size is faster than .count(nil)
[15:58:12] cout: (for an array of 10 elements; might be slower for larger arrays, but 5-10 is my use case)
[15:59:25] matthewd: Ah, the count is probably calling #==(nil), whereas compact will be doing a straight C nil check
[15:59:37] Beams: has joined #ruby
[16:00:01] matthewd: So the cost of the allocation is lower than the call overhead, even with relatively little to do
[16:00:18] pwnd_nsfw: first plugin to write in new irc bot: plugin reloader
[16:00:19] ozcanesen: has joined #ruby
[16:00:21] Fernando-Basso: has joined #ruby
[16:00:37] matthewd: compact! may be even better, if you're allowed to mutate these arrays
[16:01:00] millerti: has joined #ruby
[16:01:06] cout: matthewd: yeah, it has to fall back on #== if the array element is non-nil
[16:03:17] cout: matthewd: I can get away with just using count() since I don't care about false
[16:04:20] chopin: has joined #ruby
[16:04:27] Silthias: has joined #ruby
[16:05:15] cout: er nm, I was reading rb_ary_count wrong -- saw the RTEST and got all excited
[16:05:57] matthewd: count(&:itself) could be an option too
[16:06:28] pwnd_nsfw: cinch isn't making it easy for me to write this plugin handler D:
[16:06:53] cout: matthewd: is that a rails thing?
[16:07:22] matthewd: No, it's a recent ruby thing (2.3? 2.4?)
[16:08:02] cdg: has joined #ruby
[16:08:27] cout: count(&:nil?) would be more direct
[16:08:50] cschneid_: has joined #ruby
[16:10:06] matthewd: Yes, but that's the opposite of what you want, so then you have to do the subtraction too
[16:11:11] matthewd: Obviously its worth throwing anything plausible into the benchmark if you really want the fastest for your situation
[16:11:13] cout: oh right I had it backward
[16:12:04] cout: I don't really want nitems, I just figured that would be the fastest way to implement a.any? { |i| i.nil? }
[16:12:16] leah2: use .find?
[16:13:07] yeticry: has joined #ruby
[16:13:18] leah2: actally .all? yeah
[16:13:28] patarr: has joined #ruby
[16:13:33] leah2: .all? without block
[16:14:38] cout: .all? without a block is still slower than compact/compact!
[16:16:33] leah2: perhaps because it uses enumerable?
[16:17:06] leah2: compact is very tight
[16:17:19] leah2: it uses dup.compact!, which just shifts the array elements and shortens
[16:17:22] matthewd: I can sort of believe that 'RTEST(x)' is technically slower than 'x != Qnil', but I'm very surprised that's not outweighed by the mutations / allocation
[16:18:49] leah2: .all calls .each...
[16:18:57] leah2: compact directly for-loops
[16:19:12] nofxx: has joined #ruby
[16:19:20] matthewd: Oh, right, because all? is on enumerable, whereas compact is on array
[16:21:37] samdvr: has joined #ruby
[16:21:42] safetypin: has joined #ruby
[16:22:57] Arpanet69: has joined #ruby
[16:23:47] cout: while loop beats compact! by a hair
[16:26:00] cout: https://gist.github.com/anonymous/e8bbc4e754abd79245d6bd4133fdb71b
[16:26:32] cout: using 2.1.7
[16:27:10] matthewd: I still suspect there's a higher level change that'd be a stronger algorithmic gain
[16:27:27] cout: matthewd: I already made all those changes
[16:27:34] matthewd: .. or even upgrading to 2.3/2.4 is likely to gain more than the difference between half of these
[16:27:44] cout: matthewd: now I'm modifying code that was optimized and I'm trying to avoid making it slower
[16:28:00] igniting: has joined #ruby
[16:28:12] matthewd: (also, without checking, I think splat is slowish, so your bench might be skewed a bit there)
[16:28:16] baweaver: 2.3 -> 2.4 had some massive gains on hash perf
[16:28:23] leah2: hm, how can while be so fast
[16:28:27] cout: upgrading to 1.9.3p484 from 1.9.3p0 was like pulling teeth; it's a miracle were even on 2.1 now :(
[16:28:35] safetypin: has joined #ruby
[16:29:19] cout: good point about splat; I'm not sure why the interface uses it
[16:29:49] matthewd: I'm not sure I'd trust 1.8/1.9 era line-by-line optimization to hold true. Though I acknowledge "reset to the simple spelling and re-optimize" is somewhat easier said than done :)
[16:30:09] Xentil: has joined #ruby
[16:30:10] wickedbloodfart: has joined #ruby
[16:31:29] brent__: has joined #ruby
[16:32:15] leah2: hm, i guess bench_while turns into no method calls at all at runtime
[16:33:02] leah2: interesting. i dont have much yarv intution :)
[16:33:29] theRoUS: has joined #ruby
[16:34:09] cout: that's probably even more significant in the code I'm working on, which destroys the global method cache as an optimization
[16:38:04] Tau: has joined #ruby
[16:40:52] amclain: has joined #ruby
[16:41:47] Silthias1: has joined #ruby
[16:43:34] Silthias: has joined #ruby
[16:45:18] wickedbloodfart: has joined #ruby
[16:47:24] Ruby_Rocks_007: has joined #ruby
[16:48:25] certainty: has joined #ruby
[16:48:48] ddffg: has joined #ruby
[16:50:35] j2k: has joined #ruby
[16:50:50] username1: has joined #ruby
[16:51:15] kinduff: has joined #ruby
[16:55:03] roadrunneratwast: has joined #ruby
[16:55:20] SteenJobs: has joined #ruby
[16:55:48] leah2: cout: have benchmark results for 1.8 btw?
[16:56:16] swills: has joined #ruby
[16:58:04] roadrunneratwast: Hi Rubyistas. I am learning ruby now with the Michael Hartl tutorial. I am roughly here. The error output from the 'rails test' is "ActionController::RoutingError: uninitialized constant Static" which doesn't look like the expected error message. Is this okay?
[16:58:05] tvw: has joined #ruby
[16:58:17] roadrunneratwast: I am here https://www.railstutorial.org/book/static_pages#code-about_route
[16:58:29] conta: has joined #ruby
[16:59:27] tlaxkit: has joined #ruby
[17:01:00] nOwz: has joined #ruby
[17:02:25] wickedbloodfart: has joined #ruby
[17:03:15] gloscombe_: has joined #ruby
[17:04:18] tolerablyjake: has joined #ruby
[17:05:10] nowhere_man: has joined #ruby
[17:05:38] rajdesai: has joined #ruby
[17:06:07] troulouliou_div2: has joined #ruby
[17:06:46] cdg_: has joined #ruby
[17:09:19] rajdesai: has joined #ruby
[17:11:18] gusrub: has joined #ruby
[17:13:03] roadrunneratwast: has joined #ruby
[17:15:58] nobitanobi: has joined #ruby
[17:16:33] wrkrcoop: has joined #ruby
[17:18:16] electrostat: has joined #ruby
[17:18:31] troulouliou_div2: has joined #ruby
[17:19:25] cout: leah: I don't
[17:19:38] rkazak_: has joined #ruby
[17:20:16] cout: leah: I'm guessing the while to be slower on 1.8 because it has to walk the AST
[17:22:17] Azure|dc: has joined #ruby
[17:22:56] Suslov: has joined #ruby
[17:23:06] chouhoulis: has joined #ruby
[17:24:20] SeepingN: has joined #ruby
[17:25:04] conta: has joined #ruby
[17:26:07] ThereIsNoYeti: has joined #ruby
[17:26:09] matthewd: Looks like for, each, and compact! are fastest on 1.8. While is slower than all but the counts.
[17:26:21] t-recx: has joined #ruby
[17:26:41] matthewd: also, most of these are faster on 2.1 than 2.4, so I'll shut up about how much you should upgrade ;)
[17:29:56] ldnunes: has joined #ruby
[17:32:29] Lord_of_Life: has joined #ruby
[17:33:41] clebrun: has joined #ruby
[17:34:54] djbkd: has joined #ruby
[17:35:12] tildes: has joined #ruby
[17:35:31] jaruga__________: has joined #ruby
[17:37:47] montanonic: has joined #ruby
[17:39:04] antoniobeyah: has joined #ruby
[17:42:34] SteenJobs: has joined #ruby
[17:46:37] GinoManWorks: has joined #ruby
[17:47:32] wrkrcoop__: has joined #ruby
[17:47:55] Suslov: has joined #ruby
[17:49:07] joneshf-laptop: has joined #ruby
[17:49:18] cibs: has joined #ruby
[17:52:14] hahuang65: has joined #ruby
[17:55:31] cout: matthewd: on 1.8 I would expect nitems to be the fastest
[17:56:14] matthewd: Oh, yeah, I just re-ran your benchmark script across the versions out of curiosity; didn't consider any new/alternative options.
[17:56:50] __Yiota: has joined #ruby
[17:57:03] hotpancakes: has joined #ruby
[17:58:36] apeiros: cout: uh, not sure anybody pointed that out to you yet, but in https://gist.github.com/anonymous/e8bbc4e754abd79245d6bd4133fdb71b those methods return differing results and most do the opposite of the description?
[17:58:55] djbkd: has joined #ruby
[17:59:28] cfec0b8d: has joined #ruby
[17:59:55] Suslov: has joined #ruby
[18:00:28] apeiros: btw., why not a.include?(nil)
[18:02:35] cout: apeiros: yeah I know I didn't make them all have the same result
[18:02:37] apeiros: oh wow, .include? is the slowest. what the actual fuck?
[18:03:12] dminuoso: the last time you actual fucked trump became president, apeiros.
[18:03:14] apeiros: ok, no, count nil and index are slower. but still…
[18:03:19] dminuoso: You putting this on the same level?
[18:03:31] apeiros: trump is a world class fuckup
[18:03:34] apeiros: but that's OT
[18:03:40] dminuoso: %s/actual fuck/minor fuck/
[18:03:43] Suslo: has joined #ruby
[18:03:58] Hanmac: has joined #ruby
[18:04:01] apeiros: you're conflating level of surprise and impact
[18:04:11] Suslov_: has joined #ruby
[18:04:31] dminuoso: I sometimes also inflate things.
[18:04:38] SeepingN: here it comes
[18:04:48] apeiros: you're a non-swimmer?
[18:05:12] Ruby_Rocks_007: has joined #ruby
[18:05:17] A124: has joined #ruby
[18:05:45] dminuoso: apeiros: That's the excuse I use when I have friends at home.
[18:05:57] apeiros: btw., anybody else going to rubyconf bohol next week?
[18:09:04] szulak_: has joined #ruby
[18:10:04] SeepingN: I was waiting for a reference to an inflatable girlfriend. lol
[18:11:19] apeiros: I think what he said last accounts as one
[18:12:27] hotpanca_: has joined #ruby
[18:26:13] cout: seepingN: I thought of airplane the movie
[18:26:39] rkazak_: has joined #ruby
[18:34:46] xall: has joined #ruby
[18:35:19] gloscombe_: has joined #ruby
[18:38:25] roadrunneratwast: has joined #ruby
[18:38:48] roadrunneratwast: : Hi Rubyistas. I am learning ruby now with the Michael Hartl tutorial. I am roughly here. e https://www.railstutorial.org/book/static_pages#code-about_route The error output from the 'rails test' is "ActionController::RoutingError: uninitialized constant Static" which doesn't look like the expected error message. Is this okay?
[18:39:05] ss_much: has joined #ruby
[18:39:15] akkad: has joined #ruby
[18:39:37] gusrub: has joined #ruby
[18:42:59] sonOfRa: has joined #ruby
[18:43:40] apeiros: ?code roadrunneratwast
[18:43:40] ruby[bot]: roadrunneratwast: We can't help you without your code, please post it to https://gist.github.com
[18:43:57] apeiros: also #rubyonrails is probably better suited for this question ;-)
[18:45:25] roadrunneratwast: there isn't much to look at apeiros https://gist.github.com/mcverter/5a7915e1c2d1df6bac0da100a088f5aa
[18:45:38] roadrunneratwast: this is the code from the tutorial. it fails on line 15
[18:45:56] apeiros: you should also include the complete error with the backtrace
[18:46:05] apeiros: it tells you in which file and what line the problem happens
[18:46:26] apeiros: and pro-tip: use .rb as filename on gist, then we get colored syntax.
[18:48:15] Alina-malina: has joined #ruby
[18:48:58] tAn: has joined #ruby
[18:49:21] Alina-malina: has joined #ruby
[18:49:23] Alina-malina: has joined #ruby
[18:50:44] duderonomy: has joined #ruby
[18:54:10] synthroid: has joined #ruby
[18:55:26] roadrunneratwast: has left #ruby: ()
[18:56:32] safetypin: has joined #ruby
[18:56:35] hahuang65: has joined #ruby
[19:01:18] szulak: has joined #ruby
[19:02:37] mikecmpbll: has joined #ruby
[19:02:37] xall: has joined #ruby
[19:04:51] millerti: has joined #ruby
[19:06:30] tfitts: has joined #ruby
[19:06:36] boombox_: has joined #ruby
[19:07:14] Artarian: has joined #ruby
[19:09:22] chouhoulis: has joined #ruby
[19:09:31] sneakerhax: has joined #ruby
[19:16:00] nOwz: has joined #ruby
[19:16:39] nobitanobi: has joined #ruby
[19:16:53] thoolihan: has joined #ruby
[19:18:04] boombox_: has joined #ruby
[19:18:19] d0nn1e: has joined #ruby
[19:18:31] Guest42583: has joined #ruby
[19:18:48] sid_fules: has joined #ruby
[19:19:26] montanonic: has joined #ruby
[19:22:01] hotpancakes: has joined #ruby
[19:22:26] marxarelli: has joined #ruby
[19:23:17] hotpanca_: has joined #ruby
[19:24:08] failshell: has joined #ruby
[19:26:53] KnownSyntax: has joined #ruby
[19:26:53] KnownSyntax: has joined #ruby
[19:28:44] enterprisey: has joined #ruby
[19:32:46] __Yiota: has joined #ruby
[19:32:57] xall: has joined #ruby
[19:37:14] hotpancakes: has joined #ruby
[19:40:17] aryaching: has joined #ruby
[19:41:17] nobitanobi: has joined #ruby
[19:42:00] nadir: has joined #ruby
[19:43:03] Cohedrin: has joined #ruby
[19:43:07] machinewar: has joined #ruby
[19:45:19] A124: has joined #ruby
[19:46:56] benlieb: has joined #ruby
[19:47:51] ducks: has joined #ruby
[19:48:22] TvL2386: has joined #ruby
[19:49:48] byte512: has joined #ruby
[19:50:00] solocshaw: has joined #ruby
[19:50:32] kirun: has joined #ruby
[19:54:51] nOwz: has joined #ruby
[19:59:41] benlieb: has joined #ruby
[20:00:26] benlieb: has joined #ruby
[20:01:16] benlieb: has joined #ruby
[20:01:47] chouhoul_: has joined #ruby
[20:02:01] benlieb: has joined #ruby
[20:05:39] cdg: has joined #ruby
[20:06:17] benlieb: has joined #ruby
[20:06:36] lenwood: has joined #ruby
[20:11:21] cdg: has joined #ruby
[20:12:33] cdg: has joined #ruby
[20:13:07] cdg_: has joined #ruby
[20:14:00] Azure: has joined #ruby
[20:14:04] cdg_: has joined #ruby
[20:16:46] pawnbox: has joined #ruby
[20:17:02] cdg: has joined #ruby
[20:17:07] chouhoulis: has joined #ruby
[20:17:53] cdg_: has joined #ruby
[20:18:46] pilne: has joined #ruby
[20:18:47] minimalism: has joined #ruby
[20:23:12] planigan: has joined #ruby
[20:27:05] zeroDi: has joined #ruby
[20:32:23] brendan-: has joined #ruby
[20:34:59] bmurt: has joined #ruby
[20:40:03] TomyLobo: has joined #ruby
[20:40:33] rajdesai: has joined #ruby
[20:41:13] nOwz: has joined #ruby
[20:45:03] lxsameer: has joined #ruby
[20:46:06] ap4y: has joined #ruby
[20:47:14] tildes: has joined #ruby
[20:48:15] montanonic: has joined #ruby
[20:52:54] szulak_: has joined #ruby
[20:53:09] gizmore: has joined #ruby
[20:55:00] hotpancakes: has joined #ruby
[20:55:27] _sfiguser: has joined #ruby
[20:56:42] pawnbox: has joined #ruby
[20:58:02] ldnunes: has joined #ruby
[20:59:35] graft: has joined #ruby
[20:59:47] sid_fules: has joined #ruby
[21:00:20] graft: anyone use rltk hereabouts?
[21:04:10] hotpanca_: has joined #ruby
[21:04:54] cdg: has joined #ruby
[21:05:36] StevenStulu: has joined #ruby
[21:14:22] cdg_: has joined #ruby
[21:15:22] workmad3: has joined #ruby
[21:18:13] hotpancakes: has joined #ruby
[21:19:40] montanonic: has joined #ruby
[21:19:48] Derperperd: has joined #ruby
[21:22:35] xen0fon: has joined #ruby
[21:26:02] dionysus69: has joined #ruby
[21:38:45] gloscombe_: has joined #ruby
[21:41:00] sklvch: has joined #ruby
[21:44:12] mwlang: has joined #ruby
[21:44:43] hotpancakes: has joined #ruby
[21:46:28] mwlang: ugh…just came across this and it raise hackles even though I can’t put words to it: https://gist.github.com/mwlang/4e934740c9f9fedaf5bb9e9fcfdb051a The question is, surely there’s a better way to do this, right?
[21:47:43] mwlang: I thought about just simply renaming that #to_i to something more obvious like #to_i_unless_nil, but uhmmm…that’s long-winded and still feels inelegant.
[21:47:45] nowhere_man: has joined #ruby
[21:48:57] baweaver: and patching String for every library that might expect Integer 0 is?
[21:49:41] dminuoso: mwlang: Perfectly fine.
[21:51:01] montanonic: has joined #ruby
[21:51:09] mwlang: point is, I want to remove String#to_i override from this Rails app…but just renaming it seems to fall short to my sensibilities.
[21:51:58] mwlang: it’s not really something I ever would’ve thought to write myself…I guess I’d rather be explicit in the code itself, but they’re doing this everywhere there’s a dropdown selector in the views.
[21:52:22] dminuoso: If only I had a blog.
[21:52:34] mwlang: so I don’t necessarily want to add a bunch more Ruby to the view templates.
[21:52:43] dminuoso: mwlang: This is thedailywtf worthy.
[21:53:17] mwlang: dminuoso: and I seriously doubt it falls off the top ten before end of year.
[21:53:57] mwlang: I need a break to clear my head…this code base has twisted my clear thinking skills into a tight knot.
[21:54:01] gloscombe: has joined #ruby
[21:54:19] tomphp: has joined #ruby
[21:54:23] dminuoso: mwlang: http://thedailywtf.com/submit-wtf :-)
[21:54:33] Rodya_: has joined #ruby
[21:55:36] bkxd: has joined #ruby
[21:55:47] skweek: has joined #ruby
[21:57:09] Disavowed: I'm using rspec with guard and the latter is creating an empty directory called tmp in the root of my project. This doesn't happen when I run rpsec without guard. Anyone have any pointers on where to look to fix it? It's mildly irritating!
[21:57:39] djbkd: has joined #ruby
[22:00:22] dionysus69: has joined #ruby
[22:01:00] pulkit4tech: has joined #ruby
[22:01:00] nowhere_man: has joined #ruby
[22:05:00] GodFather: has joined #ruby
[22:10:12] hotpancakes: has joined #ruby
[22:10:16] Xentil: has left #ruby: ("http://quassel-irc.org - Chat comfortably. Anywhere.")
[22:11:41] chouhoul_: has joined #ruby
[22:11:46] mwlang: dminuoso: oh, geez…I didn’t know there was an actual site for that that. I probably have enough material to float them indefinitely.
[22:12:32] Xiti: has joined #ruby
[22:14:17] mwlang: Disavowed: looks like it’s in the guard-rspec gem.
[22:14:33] mwlang: grep for TEMPORARY_FILE_PATH there.
[22:17:33] djbkd: has joined #ruby
[22:21:07] chopin: has joined #ruby
[22:21:46] tenderlove: has joined #ruby
[22:25:04] ahrs: has joined #ruby
[22:26:03] charliesome: has joined #ruby
[22:30:19] nobitanobi: has joined #ruby
[22:32:02] montanonic: has joined #ruby
[22:37:13] mhunt: has joined #ruby
[22:38:57] charliesome: has joined #ruby
[22:39:25] mhunt: has joined #ruby
[22:40:14] nobitanobi: has joined #ruby
[22:41:25] CloCkWeRX: has joined #ruby
[22:43:11] mhunt: has left #ruby: ()
[22:44:30] Disavowed: mwlang: Thank you so much! It looks like guard-rspec is trying to generate some sort of report there. It'd have taken me ages to narrow that down, so thank you so much!
[22:44:59] nofxx: has joined #ruby
[22:45:58] djbkd: has joined #ruby
[22:46:15] mwlang: Disavowed: you’re welcome. bundle open <gemname> is your friend.
[22:46:53] ddffg: has joined #ruby
[22:47:59] Disavowed: I can't get it to work - what should it do?
[22:50:15] akkad: has joined #ruby
[22:52:00] StevenStulu: has joined #ruby
[22:52:18] tyang_: has joined #ruby
[22:52:19] StevenStulu: has joined #ruby
[22:52:39] StevenStulu: has joined #ruby
[22:54:23] Ruby_Rocks_007: has joined #ruby
[22:55:09] pawnbox: has joined #ruby
[22:56:10] jenrzzz: has joined #ruby
[22:56:11] jenrzzz: has joined #ruby
[22:56:27] conta: has joined #ruby
[22:56:34] tildes: has joined #ruby
[22:59:49] mwlang: Disavowed: not sure…what was the error?
[23:00:29] jnoob22: dunno if anyone has benchmarked specifically python and ruby scripts but I'm finding ruby scripts to run almost 2-3x faster. Anyone else see that?
[23:01:08] jnoob22: I'm originally a Python guy (who is forced to do Java for a living). I am astonished. But, maybe my tests are flawed, who knows.
[23:01:42] nofxx: jnoob22, ruby has a myth of slowless.. that was ages ago, it's faster than python and php
[23:01:44] jnoob22: Even more so is that I can't find many sites proclaiming this sort of thing.
[23:01:54] EV3RYDAYPR0GRESS: has joined #ruby
[23:02:14] jnoob22: nofxx, tending to agree. I remember 1.9.3 being very fast but thought maybe there was something seriously wrong with my bm tests a year and a half ago.
[23:02:40] Disavowed: mwlang: Could not find gem 'guard (~> 2.13.0)' in any of the gem sources listed in your Gemfile.
[23:02:43] havenwood: jnoob22: Ruby's modern VM is much faster than its previous interpreter in Ruby 1.8 and earlier.
[23:02:48] nofxx: jnoob22, also benchmarks are kinda useless in a sense.... machines are fast. I prefer human benchmarks... and in that, ruby beats C and Java =D
[23:03:12] jnoob22: nofxx, yeah everything beats Java when you have to run maven on a large set of code ;-)
[23:03:25] Disavowed: mwlang: I don't mind so much, I'm sure I've just done something stupid with chruby or something - I'm just curious as to the purpose of bundle open <gemname>, but I can look it up. Thanks for your help!
[23:03:48] jnoob22: havenwood, I was wondering where the version cutoff was ... you think <1.8 was somewhat slow, I take it.
[23:04:06] jnoob22: tbh, I did not know Ruby in the pre 1.9 versions.
[23:04:10] nOwz: has joined #ruby
[23:04:27] Disavowed: mwlang: Oh! I've been opening Pry, getting the file attribute of a method, copying it to my clipboard and opening it in a new tmux pane! You've saved me that production! Thank you!
[23:04:51] mwlang: Disavowed: sounds like you just figured it out…
[23:04:52] jnoob22: I have always liked it for writing os/systems type stuff.... more elegant than perl, more functional than bash
[23:05:08] havenwood: jnoob22: Ruby continues to get faster. There are also alternate implementations with much promise.
[23:05:22] jnoob22: going through the Rails tutorial for the 2nd time. Makes more sense to me now
[23:05:27] havenwood: jnoob22: See: http://jruby.org/bench9000/
[23:05:38] tyang__: has joined #ruby
[23:06:18] havenwood: jnoob22: If you're feeling adventurous, try out: https://github.com/graalvm/truffleruby
[23:06:19] jnoob22: possible to use jruby for Grails ?
[23:06:25] jnoob22: was not aware of that.
[23:07:18] jnoob22: anyways, 2.4.0 ruby seems to be running at Perl speed. Would never have expected that.
[23:08:20] jnoob22: ok, I'll try to cut out my fanboy fascinations and let you guys get back to important stuff.
[23:08:33] havenwood: jnoob22: JRuby on Graal is exciting, but that's even a different thing than TruffleRuby.
[23:09:20] havenwood: jnoob22: Ah, I guess the naming has changed a bit since the benchmark was initially published.
[23:09:25] TvL2386: has joined #ruby
[23:11:41] tekniq: has joined #ruby
[23:16:36] polyidus: has joined #ruby
[23:17:20] pliniker: has joined #ruby
[23:19:20] marchelzo: has joined #ruby
[23:19:34] marchelzo: hey rubyists
[23:21:10] havenwood: marchelzo: hey
[23:21:19] marchelzo: havenwood: how are things?
[23:24:28] havenwood: marchelzo: good
[23:25:20] sid_fules: has joined #ruby
[23:25:56] millerti: has joined #ruby
[23:27:01] cschneid_: why does ruby hate my private attr_accessor so much to have a warning about it
[23:31:26] BabyMario: has joined #ruby
[23:32:13] apeiros: doesn't it usually tell you in the warning?
[23:35:01] Silthias1: has joined #ruby
[23:35:50] polyidus: has joined #ruby
[23:36:25] anuxivm: has joined #ruby
[23:37:12] pawnbox: has joined #ruby
[23:38:02] griffindy: has joined #ruby
[23:38:23] itsautomatisch: has joined #ruby
[23:39:06] anuxivm: has left #ruby: ()
[23:39:54] montanonic: has joined #ruby
[23:40:28] rkazak_: has joined #ruby
[23:45:26] GSilva: has joined #ruby
[23:49:32] snockerton: has joined #ruby
[23:51:39] hutch34: has joined #ruby
[23:52:01] charliesome: has joined #ruby
[23:55:29] polyidus: has joined #ruby
[23:55:58] sid_fules: has joined #ruby
[23:56:37] gusrub: has joined #ruby
[23:57:42] safetypin: has joined #ruby
[23:59:02] gusrub: has joined #ruby