« Back to channel list

#ruby - 10 August 2015

« Back 1 day Forward 1 day »
[00:00:12] eam: % as a method is different from %{} as a syntax construct
[00:00:21] eam: similar to -a vs -1
[00:00:36] Ox0dea: Well, I know I wouldn't want ''%{} to do concatenation.
[00:00:50] eam: oh, I see
[00:00:54] eam: ambiguity
[00:01:07] eam: sorry - right that makes sense
[00:01:25] eam: % is really overused
[00:01:48] eam: >> ?a ?b
[00:01:49] ruboto: eam # => /tmp/execpad-44f85fa13d3e/source-44f85fa13d3e:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/414423)
[00:02:11] eam: doesn't work with ?c in any form
[00:02:25] eam: >>?h "ello"
[00:02:25] ruboto: eam # => "hello" (https://eval.in/414424)
[00:02:35] eam: THAT is weird
[00:03:02] Mon_Ouie: Surprising that it works in some ways. I imagined it wouldn't work at all because ?x used to be an integer literal.
[00:04:04] MAQ: has joined #ruby
[00:04:24] Ox0dea: 18>> ?w'tf'
[00:04:25] ruboto: Ox0dea # => /tmp/execpad-0103e73658d5/source-0103e73658d5:2: syntax error, unexpected tSTRING_BEG, expecting kEN ...check link for more (https://eval.in/414425)
[00:05:13] framling: has joined #ruby
[00:05:32] Mon_Ouie: ^ That doesn't work in 1.9/2.x either, by the way
[00:05:38] Mon_Ouie: You need the space for some reason
[00:06:05] Ox0dea: Mon_Ouie: It does?
[00:07:01] Mon_Ouie: From that question, I'm not sure if you expected it to work or not to work
[00:07:13] ruboto: Mon_Ouie # => "wtf" (https://eval.in/414428)
[00:07:22] ruboto: Mon_Ouie # => "wtf" (https://eval.in/414429)
[00:07:53] Mon_Ouie: pry(main):8> ?h"ello" #=> SyntaxError: unexpected tCHAR, expecting ':'
[00:07:58] Mon_Ouie: not sure what happened with that
[00:08:15] eam: I think (can someone disprove this?) that here documents can't mix with static string concat behavior because they require newlines
[00:08:37] eam: and ruby oddly enough doesn't concat static strings across newlines
[00:09:30] Ox0dea: eam: It does?
[00:09:33] Mon_Ouie: It does if you use a backslash at the end of a line though, maybe that can allow you to do it with heredocs?
[00:09:37] prateekp: has joined #ruby
[00:10:08] Ox0dea: >> eval '"\nabc\n""\ndef\n"' # eam
[00:10:09] ruboto: Ox0dea # => "\nabc\n\ndef\n" (https://eval.in/414430)
[00:10:19] eam: Ox0dea: like this
[00:10:31] prateekp: my rdoc is not displaying README.rdoc and other rdoc files
[00:10:34] Ox0dea: emdub: Did you mean that you'd like multiline static strings to concatenate without the newlines?
[00:10:37] prateekp: how to display them in the rdoc
[00:10:39] dimasg: has joined #ruby
[00:10:48] Ox0dea: eam, not emdub...
[00:11:00] eam: >> eval '"aaa"' + "\n" + '"bbb"'
[00:11:01] ruboto: eam # => "bbb" (https://eval.in/414431)
[00:11:23] eam: it's because of the more general ruby issue where it can't distinguish newline ambiguity as end of statement
[00:11:30] eam: (insert rant about bringing back the semicolon here)
[00:12:12] Mon_Ouie: I prefer the default being no continuation and having a special symbol to indicate a continuation than the other way around
[00:12:22] Ox0dea: No-brainer, really.
[00:12:37] eam: to each his own ;-)
[00:12:59] eam: but like, if you have puts "aaa" "bbbb"
[00:13:08] eam: and you newline it to word wrap -- silent discard of "bbb"
[00:13:30] eam: same issue with puts a - b
[00:13:33] hotpancakes: has joined #ruby
[00:13:38] Ox0dea: You'd have only yourself to blame, in my opinion. :)
[00:13:50] eam: puts a - \n is ok, but if you \n before the - your math changes
[00:14:01] eam: Ox0dea: that's not true, I can blame anyone I want!
[00:14:35] prateekp: my rdoc is not displaying README.rdoc and other rdoc files
[00:14:36] prateekp: how to display them in the rdoc
[00:16:23] shevy: eam and Ox0dea are so similar... one fights newlines and semicolons, the other fights $9 versus $10
[00:16:47] eam: what's $9 vs $10
[00:17:27] rbennacer: has joined #ruby
[00:18:11] eam: ps, my favorite language is ocaml because it uses TWO semicolons
[00:18:32] shevy: that there is some exception for $1 up to $9 but not above. Ox0dea was not amused
[00:21:23] eam: does it like clear the first 9 by default or something
[00:22:15] Mon_Ouie: They're not listed by global_variables even if they're set to something
[00:22:23] Ox0dea: Mon_Ouie: But $1 to $9 are.
[00:22:38] Ox0dea: They're not even global variables, technically.
[00:22:50] eam: hm, it does clear them all
[00:23:02] eam: Ox0dea: what are they?
[00:23:20] Ox0dea: eam: They're "scope-local".
[00:23:33] Basque: has joined #ruby
[00:23:39] eam: like regular old foo?
[00:24:20] eam: now THAT is surprising
[00:24:29] eam: $ isn't always global
[00:26:18] Ox0dea: eam: Yep, just like regular old foo, except that they evaluate to nil rather than raising a NameError.
[00:26:23] Coldblackice: has joined #ruby
[00:26:38] eam: are they actually individual, or are they dynamically scoped?
[00:26:51] Mon_Ouie: You might enjoy this abuse of their scoping rules: https://gist.github.com/0x0dea/19494c27b088c5d54710
[00:27:08] Mon_Ouie: Oh, wrong link
[00:27:32] casadei_: has joined #ruby
[00:27:54] eam: looks like really local
[00:28:06] eam: well that's expensive
[00:28:14] Ox0dea: >> $v = []; 'foo'[/(\w+)/]; $v << $1; class Foo; 'bar'[/(\w+)/]; $v << $1 end; $v << $1
[00:28:15] ruboto: Ox0dea # => ["foo", "bar", "foo"] (https://eval.in/414432)
[00:29:48] Ox0dea: eam: https://github.com/ruby/ruby/blob/trunk/variable.c#L909-L913
[00:30:06] wprice: has joined #ruby
[00:30:21] Ox0dea: I can't even begin to conceive of a justification for that.
[00:31:20] Mon_Ouie: "Who in their right mind writes a regular expression with more than 9 capture groups?"
[00:32:07] Ox0dea: "People parsing `ps aux`."
[00:32:19] Ox0dea: In any case, I don't understand why they're artificially included like that.
[00:33:52] eam: they all look local to me
[00:33:57] sevenseacat: has joined #ruby
[00:34:02] Ox0dea: $~ and everything derived from it are local, yes.
[00:37:54] havenwood: has joined #ruby
[00:38:21] f4cl3y__: has joined #ruby
[00:40:31] [k-: has joined #ruby
[00:40:48] Ox0dea: shevy: Don't tell anyone, but I'm only so adamant about $10 because I'm trying to get these bewbs into the test suite: https://gist.github.com/0x0dea/3cf919d6c1a73a1d9965#file-gv-patch-L14
[00:40:55] nofxx: has joined #ruby
[00:45:39] al2o3-cr: o? right-hook - jk hi everyone :)
[00:46:07] shevy: Ox0dea lol
[00:46:44] govg: has joined #ruby
[00:46:49] dimasg: has joined #ruby
[00:46:54] hotpancakes: has joined #ruby
[00:47:00] Ox0dea: trunk $ ag -F '(.)(.)' | wc -l
[00:47:01] abbe: has joined #ruby
[00:48:16] ap4y: has joined #ruby
[00:48:23] Ox0dea: In fact, that construct is used quite frequently in the documentation for Regexp.
[00:48:36] dgutierrez1287: has joined #ruby
[00:49:13] Ox0dea: test_regexp.rb as well, so I'll leave $10 alone.
[00:51:26] shevy: nobu 1, Ox0dea 0
[00:51:35] bb010g: has joined #ruby
[00:51:37] al2o3-cr: all i see is boobies
[00:51:48] prateekp: which is better to use rdoc or yardoc
[00:51:58] shevy: dunno yardoc but yard is the way to go!
[00:52:19] shevy: there was a rename
[00:52:21] shevy: http://yardoc.org/
[00:52:33] shevy: I used to have this: https://github.com/lsegal/yard/
[00:52:39] shevy: ok guess it's yardoc
[00:52:43] ellisTAA: has joined #ruby
[00:54:07] al2o3-cr: my articulate rubling Ox0dea :)
[00:55:37] mistermocha: has joined #ruby
[00:56:02] hinbody: has joined #ruby
[00:59:06] hotpancakes: has joined #ruby
[01:01:20] cashnguns: has joined #ruby
[01:01:44] dgutierrez1287: has joined #ruby
[01:04:08] Ox0dea: al2o3-cr: Articulating is for bones.
[01:04:33] prateekp: so i should use yard
[01:04:36] prateekp: and not rdoc
[01:04:44] prateekp: yard is more popular?
[01:08:38] sdwrage: has joined #ruby
[01:10:07] ledestin: has joined #ruby
[01:12:47] tkuchiki: has joined #ruby
[01:13:33] jtdoncas: has joined #ruby
[01:14:30] Kallis: has joined #ruby
[01:16:11] dkam: has joined #ruby
[01:17:14] dkam: Hey guys - what's a good way to interact with remote services such as smtp or telnet in ruby? I want to be able to read the input, then reply to the prompts within ruby somehow
[01:18:15] BraddPitt: dkam you can use the core Net::SMTP class
[01:18:32] BraddPitt: http://ruby-doc.org/stdlib-2.0.0/libdoc/net/smtp/rdoc/Net/SMTP.html
[01:18:49] dkam: I'm not wanting to actually send email - I want to read the banner and test for relay-denied
[01:20:25] BraddPitt: you can use that interface to both send and receive messages
[01:21:46] dkam: I'm not looking to send / receive email - I just want to read the headers ( banner, TLS enabled ) and send a few commands to check things like relay-denied.
[01:23:00] shevy: prateekp I think so, it is more recent too
[01:23:02] dkam: I'd like to do the same kind of thing with imap - connect to the host and run a few test commands
[01:23:04] jtdoncas: dkam: I googled smtp read banner, and found this: https://github.com/shadyproject/pwb-scripts/blob/master/smtp-user-vrfy.rb. Suggesting, to use the Socket class
[01:23:43] dkam: jtdoncas: Ha - thanks for the google-fu - I'll check that out.
[01:23:43] h4ckurate: has joined #ruby
[01:24:13] jtdoncas: dkam: okay let me know how it goes, i'd be interested
[01:24:30] Ox0dea: dkam: 'net/telnet' was part of the standard library before 2.0, for what that's worth.
[01:25:52] Ox0dea: Erm... it's apparently still in in 2.2, but not on trunk.
[01:26:47] Ox0dea: Yeah, removed from the standard library May 21 this year.
[01:27:09] Ox0dea: The script jtdoncas linked is essentially doing what Net::Telnet would make slightly more convenient.
[01:29:09] woodruffw: hey all - is anybody familiar with dynamic lookup hashes? i'm trying to use them for string formatting but running into KeyErrors upon lookup
[01:29:29] woodruffw: something along these lines: "%{a}" % Hash.new { |hash, key| hash[key] = "banana" } # => KeyError
[01:29:38] hotpancakes: has joined #ruby
[01:30:29] pontiki: i would have expected that to work, actually
[01:30:39] woodruffw: yeah, me too :\
[01:32:08] Ox0dea: woodruffw: What's the use case?
[01:32:35] j4cknewt: has joined #ruby
[01:33:10] woodruffw: Ox0dea: i'm using it to format a string using array sampled values for each hash
[01:33:50] woodruffw: so, for example, { x: ["a", "b"] } is crushed down to either "a" or "b" dynamically
[01:34:07] Ox0dea: woodruffw: So you know your keys?
[01:34:07] einarj: has joined #ruby
[01:34:08] RickHull: has left #ruby: ()
[01:34:52] woodruffw: the keys are known in the original hash, the way i'm creating the dynamic one looks something like this: CONTENT = Hash.new { |hash, key| hash[key] = CONTENT_ARRS[key].sample }
[01:35:56] icedp: has joined #ruby
[01:36:04] Ox0dea: woodruffw: ARRS.zip(ARRS.map(&:sample)).to_h, no?
[01:36:23] Ox0dea: Well, not quite, but you see what I was going for.
[01:36:52] woodruffw: Ox0dea: yeah, i see what you're doing there. i'm doing something similar right now: content = Hash[CONTENT.map { |k, v| [k, v.sample] }]
[01:37:10] woodruffw: however, i was just wondering if a dynamic version was possible. it looks a lot cleaner, IMO
[01:37:26] Ox0dea: I do agree that it's a bug.
[01:37:36] pontiki: so clearly, format (%) is not accessing the hash input directly
[01:38:05] woodruffw: pontiki: no, it looks like it checks has_key? or something first (which incorrectly reports false for dynamic hashes)
[01:38:19] pontiki: i don't think that's incorrect
[01:38:35] ponga: has joined #ruby
[01:38:52] pontiki: even though it will create keys, it shouldn't report that a key exists before it does
[01:39:07] woodruffw: well it's not incorrect in the sense that the hash object itself is empty, but it is incorrect in the sense that a dynamic table has values for every key fed into it
[01:39:26] iamninja: has joined #ruby
[01:39:31] woodruffw: Ox0dea: you think it's worth reporting to the mailing list?
[01:39:58] Ox0dea: woodruffw: I'm looking into whether or not the current behavior is justified.
[01:40:27] Ox0dea: woodruffw: https://github.com/ruby/ruby/blob/trunk/sprintf.c#L611 + https://github.com/ruby/ruby/blob/trunk/hash.c#L795
[01:40:34] mrf: has joined #ruby
[01:41:04] Ox0dea: I believe those are the two lines working together to thwart your happiness.
[01:43:22] woodruffw: yep, looks like it. i'll five into st_lookup and see what i come up with.
[01:43:25] workmad3: has joined #ruby
[01:43:59] Ox0dea: That shouldn't be necessary.
[01:44:20] Ox0dea: If I'm not mistaken, using rb_hash_aref() instead of rb_hash_lookup2() should "fix" it.
[01:45:16] woodruffw: oh, you're right. that was silly of me
[01:46:16] woodruffw: i'll bring this up on the mailing list and get some opinions
[01:49:02] woodruffw: of course, changing %/sprintf to use rb_hash_aref will cause nil to be formatted in when a key isn't present, which definitely isn't good behavior. perhaps a check against the default value first
[01:49:44] devoldmx: has joined #ruby
[01:50:22] Ox0dea: woodruffw: Aye, I think that's likely to have been a consideration when the feature was first introduced.
[01:52:43] woodruffw: Ox0dea: yeah, that wouldn't surprise me ;)
[01:55:06] Cronon: has joined #ruby
[01:56:01] sdwrage: has joined #ruby
[01:56:20] Ox0dea: woodruffw: Perhaps best would be to use rb_hash_lookup2() and then rb_hash_aref() only if the former didn't find anything.
[01:57:29] mistermocha: has joined #ruby
[01:58:58] Ox0dea: Or maybe even check whether the Hash has a #default defined.
[01:59:00] chipotle: has joined #ruby
[02:00:16] woodruffw: Ox0dea: that sounds good, definitely better than letting the user silently format their strings with nils
[02:02:05] Ox0dea: >> nil.to_s # woodruffw
[02:02:06] ruboto: Ox0dea # => "" (https://eval.in/414433)
[02:02:13] jonee: has joined #ruby
[02:02:45] bry246: has joined #ruby
[02:04:03] xxneolithicxx: has joined #ruby
[02:05:06] woodruffw: oh no, i'm aware. i'm just saying that it probably isn't the correct behavior to fill a format string with empty strings, certainly more confusing to debug than a runtime error
[02:05:21] Vile`: has joined #ruby
[02:08:51] minmax: has joined #ruby
[02:09:03] mary5030: has joined #ruby
[02:09:45] CloCkWeRX: has joined #ruby
[02:10:02] CloCkWeRX: has left #ruby: ()
[02:10:38] astrobun_: has joined #ruby
[02:13:05] yfeldblum: has joined #ruby
[02:14:38] omegamike: has joined #ruby
[02:15:20] tjbiddle: has joined #ruby
[02:17:40] Musashi007: has joined #ruby
[02:18:40] Inside: hey Ox0dea, havenwood: thanks for the help
[02:18:42] Inside: I got it sorta working
[02:18:48] Inside: even managed to shoehorn bootstrap in there :D
[02:18:53] BotchlaOffUrself: has joined #ruby
[02:18:54] ramfjord: has joined #ruby
[02:19:03] BotchlaOffUrself: NO KLINE NO BAN NO FREEZE AND NO AKICK ARE A MATCH FOR MY HATRED FOR BOTCHLAB
[02:19:17] BotchlaOffUrself: NOTHING U MOTHERFUCKERS DO WILL CHANGE ANYTHING
[02:19:32] Inside: ur my hero BotchlaOffUrself
[02:20:08] BotchlaOffUrself: NOTHING IS GOING TO FUCKIN STOP ME MOTHERFUCKERS
[02:20:21] BotchlaOffUrself: BOTCHLAB IS FUCKING
[02:20:25] juanca_: has joined #ruby
[02:20:52] sevenseacat: !ban BotchlaOffUrself !T 1d
[02:20:53] ChanServ: +b BotchlaOffUrself!*@*
[02:20:53] ChanServ: ChanServ kicked BotchlaOffUrself: is banned from this channel
[02:21:18] Feyn: has joined #ruby
[02:22:17] bazbing80: has joined #ruby
[02:22:26] j4cknewt: has joined #ruby
[02:22:35] bazbing80: '1234'.gsub('3',"\\") => "12\\4"
[02:23:15] bazbing80: how am I mean to just insert one back slash? :S That inserts two backslashes even though I need to escape it
[02:23:28] woodruffw: BraddPitt: whatcha doing on freenode?
[02:23:56] BraddPitt: idling in #ruby, what else
[02:24:06] bazbing80: woodruffw: I may be wrong but I don't think it's really Brad
[02:24:30] bazbing80: BraddPitt: oh excellent!
[02:24:32] woodruffw: bazbing80: are you talking about the same BraddPitt i am? i recognize his nick from another network
[02:24:40] woodruffw: or do you mean the actor ;)
[02:24:46] bazbing80: woodruffw: actor x)
[02:24:58] astrobun_: has joined #ruby
[02:24:59] postmodern: has joined #ruby
[02:26:30] bry789: has joined #ruby
[02:26:35] bruno-: has joined #ruby
[02:28:09] bazbing80: How do I insert one back slash into a string using gsub? '1234'.gsub('3','\') #=> syntax error as the backslash escapes the character to the right of it (single quoation. If I try to escape the backslash two backslashes get inserted. Not what I expected at all '1234'.gsub('3',"\\") => "12\\4" | expected "12\4"
[02:28:34] Ox0dea: >> "\\".size # bazbing80
[02:28:35] ruboto: Ox0dea # => 1 (https://eval.in/414435)
[02:30:18] bazbing80: Ox0dea: okay, that string is only 1 index long. But...
[02:30:29] Ox0dea: Well, what does that tell you?
[02:31:07] bazbing80: Ox0dea: that the second backslash is being escaped by the first
[02:31:18] Ox0dea: Thus resulting in a single backslash, yep.
[02:31:54] jtdoncas: >> puts '1234'.gsub('3',"\\")
[02:31:55] ruboto: jtdoncas # => 12\4 ...check link for more (https://eval.in/414437)
[02:32:12] bazbing80: >> '1234'.gsub('3','\\')
[02:32:13] ruboto: bazbing80 # => "12\\4" (https://eval.in/414438)
[02:32:19] Ox0dea: This guy.
[02:33:07] Ox0dea: "\\" is just a representation you'll need to get used to; it's a single character.
[02:33:28] freerobby: has joined #ruby
[02:34:06] Ox0dea: >> ['1234'.size, '1234'.gsub('3','\\').size] # bazbing80
[02:34:07] ruboto: Ox0dea # => [4, 4] (https://eval.in/414440)
[02:34:55] brnpcn: has joined #ruby
[02:35:31] gambl0re: has joined #ruby
[02:36:02] bazbing80: Ox0dea: I see...so it's impossible to have a string "\" ?
[02:38:15] Ox0dea: bazbing80: Are you of the opinion that \ isn't the best escape character?
[02:38:22] juanca_: has joined #ruby
[02:38:49] willharrison: has joined #ruby
[02:38:51] astrobun_: has joined #ruby
[02:39:06] Mon_Ouie: Let's make a language where 'e' is used as the escape character!
[02:39:37] eam: ^V is my favorite escape character
[02:40:09] eam: stty lnext e # but e works too
[02:40:25] postmodern: has joined #ruby
[02:41:35] bazbing80: Ox0dea: Well it confused the hell out of me so no I don't think it is...but one character has to be the escape..I'd just get into the same mess if I wanted one of the literal escape characters
[02:41:49] bazbing80: whateer it was
[02:42:35] bazbing80: although it can get hard to read, especially in a regex //
[02:43:03] tectonic: has joined #ruby
[02:43:34] ghormoon: has joined #ruby
[02:44:04] einarj: has joined #ruby
[02:44:20] dopie: has joined #ruby
[02:46:40] millerti: has joined #ruby
[02:47:34] swgillespie: has joined #ruby
[02:48:58] towski_: has joined #ruby
[02:49:09] pawz: has joined #ruby
[02:49:39] pawz: has left #ruby: ("Palaver http://palaverapp.com/")
[02:52:25] prereflect: has joined #ruby
[02:52:36] user1138: has joined #ruby
[02:53:08] hotpancakes: has joined #ruby
[02:55:18] woodruffw: Ox0dea: i've done a quick patch, but with my local builds i'm running into an ArgumentError ("unnumbered(1) mixed with named"). i can trace this back to https://github.com/ruby/ruby/blob/trunk/sprintf.c#L134, but i'm not sure where that's being invoked...
[02:55:26] astrobun_: has joined #ruby
[02:55:34] woodruffw: and the patch: http://hastebin.com/olafabivof
[02:56:35] hahuang61: has joined #ruby
[02:57:18] rasengan: has left #ruby: ()
[02:58:51] swgillespie: has joined #ruby
[02:59:16] Ox0dea: has joined #ruby
[02:59:44] Ox0dea: woodruffw: I also ran into that error, but only when I included the '%{c}' in '%{a}%{b}%{c}'.
[02:59:53] Ox0dea: Not sure what's going on. :/
[03:00:21] Ox0dea: >> %r'////' # bazbing80
[03:00:22] ruboto: Ox0dea # => /\/\/\/\// (https://eval.in/414448)
[03:01:49] woodruffw: hmm, stubbing it out with a break causes sprintf to return an empty hash, which definitely isn't right...
[03:01:51] michael_mbp: has joined #ruby
[03:09:05] dkam: has joined #ruby
[03:09:35] luckyme: has joined #ruby
[03:09:57] aphprentice: has joined #ruby
[03:11:32] braincrash: has joined #ruby
[03:14:51] dimasg: has joined #ruby
[03:16:43] thiagovsk: has joined #ruby
[03:16:49] darkf: has joined #ruby
[03:19:01] myztic: has joined #ruby
[03:19:28] havenwood: has joined #ruby
[03:20:37] bronson: has joined #ruby
[03:21:12] chipotle: has joined #ruby
[03:22:08] astrobun_: has joined #ruby
[03:22:56] jtdoncas: woodruffw: your way will also throw an error when you make the default value nil (ie. Hash.new(nil))
[03:24:28] woodruffw: jtdoncas: which error does it throw in that case? it makes sense for it to through a KeyError when the default is nil
[03:24:41] woodruffw: oh i see, same ArgumentError. hmm...
[03:25:25] jtdoncas: woodruffw: No, it would throw a KeyError
[03:25:35] jtdoncas: which I don't think is intended behaviour
[03:26:27] woodruffw: jtdoncas: what would be the intended behavior in that case? it doesn't make much sense to me for nils to be formatted into the string
[03:26:42] woodruffw: and by the ArgumentError i meant on my current builds, i'm currently tracing it down
[03:27:34] hotpancakes: has joined #ruby
[03:28:06] jtdoncas: woodruffw: I think throwing an exception on a nil value would be very strange behaviour...
[03:29:19] jtdoncas: it shouldn't be fundamentally different than:
[03:29:24] jtdoncas: >> '%s' % nil
[03:29:25] ruboto: jtdoncas # => "" (https://eval.in/414460)
[03:30:38] woodruffw: jtdoncas: it's not so strange when you consider the alternative, which i think is a lot harder to debug. the difference between your example and the hash is that it doesn't make much sense for NilClass to be a valid key
[03:31:04] woodruffw: >> '%{a}' % Hash.new(nil)
[03:31:05] ruboto: woodruffw # => key{a} not found (KeyError) ...check link for more (https://eval.in/414462)
[03:31:08] jtdoncas: why not? I think it makes complete sense
[03:31:13] GeissT: has joined #ruby
[03:32:03] woodruffw: well, it's not the current behavior, and it would result in blank formatting instead of an error
[03:32:13] workmad3: has joined #ruby
[03:32:25] woodruffw: >> x = { nil: "a" } ; x[nil]
[03:32:26] ruboto: woodruffw # => nil (https://eval.in/414463)
[03:32:39] jtdoncas: well current behaviour doesn't seem to handle dynamic hash
[03:32:46] bmurt: has joined #ruby
[03:33:26] woodruffw: yes, but my solution is consistent with the current behavior re: nil keys. changing the behavior so that all lookups are valid would create a bit of a disparity
[03:34:21] jtdoncas: >> x = { nil => "a" }; x[nil]
[03:34:22] ruboto: jtdoncas # => "a" (https://eval.in/414464)
[03:34:38] woodruffw: ah, symbols.
[03:34:53] Ox0dea: >> '%{a}' % {a: nil} # woodruffw
[03:34:54] ruboto: Ox0dea # => "" (https://eval.in/414465)
[03:35:03] Ox0dea: I don't see how you'd be breaking symmetry with the current behavior.
[03:35:59] Ox0dea: sprintf'ing with a dynamic Hash is quite magical; some potential for confusion is to be expected. :)
[03:36:26] woodruffw: yeah, maybe i'm getting hung up on something here...
[03:37:17] Ox0dea: woodruffw: You lose the notion of "key existence" the moment you give a Hash a default value/Proc.
[03:38:06] Ox0dea: That is, 'foo' % dynamic_hash can't possibly raise a KeyError.
[03:38:31] woodruffw: yeah, that's correct. my apologies jtdoncas, you were right :)
[03:39:49] jtdoncas: woodruffw: :) Still confused why you're getting an argument error :(
[03:40:20] iamninja: has joined #ruby
[03:40:33] woodruffw: yeah, that error is a real doozy. looking at the mess that is sprintf.c's rb_str_format, it's not gonna be fun to find :\
[03:40:39] jtdoncas: is there a thread I can follow where you reported the bug?
[03:41:23] woodruffw: jtdoncas: i'm about to make a post on the mailing list. i'm not quite at the point where i'm willing to declare it a bug, it seems like this behavior was intentionally left out
[03:41:30] freerobby: has joined #ruby
[03:43:01] sarmiena_: has joined #ruby
[03:43:27] jtdoncas: okay ill subscribe and keep an eye out then ;)
[03:44:22] swgillespie: has joined #ruby
[03:44:34] Ox0dea: woodruffw: rb_hash_default() is static (and thus not exposed by intern.h), which indicates that it isn't intended to be used outside of hash.c.
[03:44:52] choke: has joined #ruby
[03:45:01] Ox0dea: Of course, you could just copy over the implementation into sprintf.c, but that's smelly.
[03:45:14] woodruffw: yeah, that would not be ideal
[03:45:15] jtdoncas: he didn't use rb_hash_default though
[03:45:25] Ox0dea: But he "should" be doing so.
[03:46:22] Ox0dea: How to decide not to raise the KeyError except by checking whether the Hash has a default value/Proc?
[03:47:13] hotpancakes: has joined #ruby
[03:49:31] Matthews_: has joined #ruby
[03:49:39] woodruffw: what i'm doing right now only raises the KeyError if rb_hash_aref returns Qnil *and then* rb_hash_lookup2 returns Qundef, but that catches the case where the default value is set explicitly to `nil`
[03:50:34] devoldmx: has joined #ruby
[03:51:35] Ox0dea: woodruffw: I think it'd make things much easier to not bother handling Hash.new(nil) differently.
[03:51:45] woodruffw: Ox0dea: i agree
[03:52:30] woodruffw: just made the mailing list post: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/70295
[03:52:56] freerobby1: has joined #ruby
[03:54:21] baroquebobcat: has joined #ruby
[03:55:49] jtdoncas: great! I'm off then, night everyone
[03:58:01] woodruffw: goodnight o/
[03:58:19] charliesome: has joined #ruby
[03:58:40] tjbiddle: has joined #ruby
[03:59:19] choke: has joined #ruby
[03:59:46] Ox0dea: woodruffw: How'd you manage to lose your '='s in the ML post?
[04:00:15] fedexo: has joined #ruby
[04:02:40] omegamike: has joined #ruby
[04:02:41] woodruffw: i have no idea...
[04:02:48] woodruffw: that's strange, how the hell did that happen?
[04:03:07] woodruffw: i also lost the 'r' in rb_hash_lookup2(hash, sym, Qundef);
[04:03:15] Ox0dea: Very weird.
[04:03:19] Ox0dea: woodruffw: https://gist.github.com/0x0dea/db912a66e41b9b62859e
[04:03:49] Ox0dea: That patch certainly isn't acceptable given its modification of some otherwise unrelated files, but it approximates what I believe to be the right approach.
[04:04:10] mistermocha: has joined #ruby
[04:04:11] woodruffw: Ox0dea: even stranger, my local copy of that email is formatted correctly.
[04:04:54] Ox0dea: woodruffw: Eh, I'm sure whoever reads it will understand what you were going for.
[04:05:19] Ox0dea: My attempt mostly works, but I have no idea what's going on here:
[04:05:21] gix: has joined #ruby
[04:05:22] Ox0dea: build $ ./ruby -e "p '%{a}%{b}%{c}%{d}%{e}' % Hash.new { |_, k| k.to_s * 2 }"
[04:05:24] Ox0dea: "aabbddee"
[04:05:56] woodruffw: Ox0dea: yeah, that definitely looks like the right direction re: your patch
[04:06:04] woodruffw: now that's some strange behavior :p
[04:06:41] Ox0dea: I hesitate to call it a bug in the interpreter, but, well...
[04:06:59] woodruffw: it's very possibly that
[04:07:23] Ox0dea: I would think it might have something to do with %c being a format specifier, but so is %d.
[04:07:54] Ox0dea: In fact, all of them are format specifiers, so no clue.
[04:07:55] j4cknewt: has joined #ruby
[04:08:24] astrobun_: has joined #ruby
[04:09:01] [k-: what is the problem?
[04:09:09] woodruffw: hmm...and i just wanted an easy way to flatten my format hash :(
[04:09:18] Ox0dea: But we're learning!
[04:09:22] [k-: Ruby added % hash already
[04:09:27] woodruffw: Ox0dea: yep, can't argue with that
[04:09:31] Ox0dea: [k-: Yes, but it only works with boring Hashes.
[04:09:40] woodruffw: not with dynamic ones ;)
[04:09:47] mrf: has joined #ruby
[04:10:06] [k-: dynamic?
[04:10:13] Ox0dea: Those with a default value/Proc.
[04:10:46] Ox0dea: The term is only applicable in the latter case, I suppose.
[04:11:00] Ox0dea: Then again, magical key existence isn't exactly "static".
[04:11:27] [k-: probably some obscure way they are accessing it
[04:11:43] ecksit: has joined #ruby
[04:11:46] [k-: instead of doing the slower way, let's just do it the faster way
[04:11:53] woodruffw: well we traced down how % accesses hashes, and it intentionally ignores default values/Procs
[04:12:02] Ox0dea: Yeah, we've pretty much got the thing pinned down.
[04:12:11] Ox0dea: It was probably a design decision. :(
[04:12:30] woodruffw: which is unfortunate, because dynamic formatting would be super awesome
[04:13:36] [k-: you can dynamic format using actual variables
[04:13:44] [k-: and leave hash for the speedy things
[04:14:11] woodruffw: well, my particular use case requires hashes. i need to format a non-determined string dynamically
[04:14:12] Ox0dea: [k-: String % Hash definitely has proper use cases.
[04:14:13] [k-: a = blah blah; "#{a}"
[04:14:51] Ox0dea: On a tangential note, I think this should work:
[04:14:53] Ox0dea: >> '%d %d' % [1].cycle rescue $!
[04:14:54] ruboto: Ox0dea # => #<TypeError: can't convert Enumerator into Integer> (https://eval.in/414472)
[04:14:59] woodruffw: String % Hash is the only way i know in ruby to do template-like strings, interpolation isn't ideal for when you haven't declared the variables yet
[04:15:08] woodruffw: without bringing in a lib, of course
[04:15:11] [k-: but you just want to generate strings!
[04:15:20] Ox0dea: Non-deterministic ones!
[04:15:39] [k-: who generates strings through default_proc
[04:15:49] [k-: weeeeiiiiiiiird
[04:16:02] Ox0dea: Your face.
[04:16:54] [k-: at most {user_id: 3728492, name: "fjeoaogk"}
[04:17:05] einarj: has joined #ruby
[04:17:08] woodruffw: well, i don't know the keys either ;)
[04:17:13] [k-: this will be horrible for testing
[04:17:36] [k-: if you dont know the keys, how will you interpolate it
[04:17:45] woodruffw: well, i know the keys are present in the hash
[04:17:50] woodruffw: i just don't know which keys they are
[04:18:05] [k-: but you wont be able to order them correctly
[04:18:23] woodruffw: they don't have to be ordered, that's the nice thing about the hash
[04:18:41] [k-: but you are formatting strings here
[04:18:49] woodruffw: >> "%{a} %{b}" % { b: "x", a: "y" }
[04:18:50] [k-: the keys are placed into order
[04:18:50] ruboto: woodruffw # => "y x" (https://eval.in/414473)
[04:18:58] sdwrage: has joined #ruby
[04:19:04] [k-: you dont know the key names!
[04:19:13] woodruffw: you're right, i don't
[04:19:45] woodruffw: [k-: maybe i'm not explaining it well, here's the SO post i made on the issue a few hours ago http://stackoverflow.com/questions/31910205/using-a-dynamic-lookup-hash-with-strings-and/31910726?noredirect=1#comment51735335_31910726
[04:19:55] [k-: what, %{#{hash.first}} ....
[04:20:00] woodruffw: oops, linked you to the comment. well, just remove that part
[04:20:56] halcyone3: has joined #ruby
[04:21:12] [k-: now you are just generating keys which do not exist
[04:21:24] [k-: so you want placeholder values
[04:21:35] woodruffw: no, all the keys exist in the "parent" hash
[04:22:17] woodruffw: the idea is to use the Proc to dynamically associate the parent hash's key with a random element from the parent value array
[04:22:21] decaff: has joined #ruby
[04:22:26] [k-: just #values and use an array to do it automatically
[04:22:36] [k-: shuffle the array too then
[04:22:49] woodruffw: i'm not sure what you mean
[04:24:02] [k-: >> "a: %s, b: %s, c: %s, d: %s" % [?a, ?b, ?c, ?d].shuffle
[04:24:04] ruboto: [k- # => "a: d, b: b, c: a, d: c" (https://eval.in/414474)
[04:24:19] [k-: look, it did what you wanted
[04:24:34] sarmiena_: has left #ruby: ()
[04:25:03] woodruffw: [k-: well, that's not really what i want. i'm constructing sentences, so there is *some* structure to the results
[04:25:05] [k-: probably should have used %w ;-; that was painful, Ox0dea, painful
[04:25:30] [k-: structure means order
[04:25:38] woodruffw: [k-: here, take a look at this https://github.com/woodruffw/ruby-upworthy/blob/master/lib/upworthy.rb
[04:25:48] Jandre: has joined #ruby
[04:25:49] woodruffw: that's what i'm doing, and my current solution
[04:25:51] Shoutsid: has joined #ruby
[04:26:17] [k-: so you want to generate random values
[04:26:22] [k-: to fill the string
[04:26:26] [k-: to make funny strings
[04:26:42] woodruffw: well, i am generating random values. my current solution works just fine, it's just ugly
[04:27:06] [k-: i did that before, but i did the long way
[04:27:28] [k-: like your way actually
[04:27:55] woodruffw: `content = Hash[CONTENT.map { |k, v| [k, v.sample] }]` works, but it's meaning isn't really obvious. i think a dynamic table would be much easier to interpret
[04:28:05] bruno-: has joined #ruby
[04:28:24] ohaibbq: has joined #ruby
[04:28:37] [k-: instead of %{} use <key>?
[04:28:52] [k-: and extract the key out using a regex and use gsub
[04:29:11] woodruffw: that's kinda kludgey, don't you think?
[04:29:19] Ox0dea: [k-: You're being disruptive.
[04:29:25] [k-: %{imploreaudio} -> <imploreaudio>
[04:29:30] Ox0dea: (For real, though.)
[04:29:38] Ox0dea: Regular expressions are not called for in this case.
[04:29:48] woodruffw: [k-: i get what you mean, but that's not ideal at all
[04:29:55] Ox0dea: You already sound like a Perler. :'(
[04:30:01] [k-: but your way seems very odd
[04:30:04] ellisTAA: has joined #ruby
[04:30:08] Ox0dea: I think it's perfectly sensible.
[04:30:23] woodruffw: i think my way is pretty clean conceptually
[04:30:35] woodruffw: not my current way, the way i want
[04:30:39] [k-: woodruffw, you said you didnt know the keys
[04:30:41] mary5030: has joined #ruby
[04:30:45] [k-: but you *do* know
[04:31:04] woodruffw: i don't know them, they're sampled randomly
[04:32:02] Ox0dea: [k-: A headline is one of many template strings, and the templates can each be one of several random word(s). How does manipulating two calls to #sample not strike you as the right approach?
[04:33:25] [k-: forgive me but it doesnt seem wrong
[04:33:31] [k-: does it not work?
[04:33:57] Ox0dea: woodruffw: I guess the "reasonable" (read: less awesome) approach would be to make your headlines arrays of String|Symbol, then map the Symbols to #sample calls and #join the result.
[04:35:03] woodruffw: hmm, yeah :\
[04:35:19] Ox0dea: HEADLINES.sample.map { |s| Symbol === s ? CONTENT[s].sample : s }.join
[04:35:22] Ox0dea: That doesn't seem so bad.
[04:35:51] Ox0dea: join(' '), obviously.
[04:36:39] decaff: has joined #ruby
[04:36:48] woodruffw: yeah, that's not bad at all. i'll probably change it to something along those lines, my current solution doesn't sit well with me at all
[04:37:29] Ox0dea: It's the kind of approach I'd take if the strings were being sent to and coming from, say, a tech-unsavvy translator.
[04:37:41] Ox0dea: Those're becoming ever scarcer, though.
[04:37:46] [k-: i dont get you at all?
[04:38:37] [k-: ah forget it, your solution works, and i dont understand the problem at hand
[04:38:41] uber: has joined #ruby
[04:38:43] [k-: i'll just go eat something
[04:38:51] Ox0dea: I'm going to go light something on fire.
[04:38:58] gambl0re: has joined #ruby
[04:39:06] woodruffw: and i'm going to hit the sack
[04:39:11] woodruffw: goodnight :)
[04:40:09] halcyone3: has joined #ruby
[04:40:31] gambl0re: has joined #ruby
[04:40:36] Ox0dea: Night, woodruffw.
[04:41:15] ghormoon: has joined #ruby
[04:41:32] ascarter: has joined #ruby
[04:41:33] gambl0re: has joined #ruby
[04:42:52] hotpancakes: has joined #ruby
[04:43:17] gambl0re: has joined #ruby
[04:43:51] arooni-mobile: has joined #ruby
[04:43:57] arooni-mobile__: has joined #ruby
[04:44:39] pepperbreath: has left #ruby: ()
[04:45:01] Tammyta: has joined #ruby
[04:48:53] ledestin: has joined #ruby
[04:52:01] Tempesta: has joined #ruby
[04:53:39] Tammyta: hello, what am i doing wrong? https://gist.github.com/tammyta/e24d7b89a4cb7dc3c94d
[04:55:18] Ox0dea: Tammyta: require 'data_mapper'
[04:55:27] ivanskie: has joined #ruby
[04:55:34] Ox0dea: I don't know why they did that.
[04:55:44] mary5030: has joined #ruby
[04:55:50] Tammyta: i tried, i get TONS or more errors
[04:56:15] Tammyta: it should be data_mapper anyway?
[04:56:36] Ox0dea: Yes, that's the file to require.
[04:57:20] Tammyta: so datamapper, doesn't exist? i tried gem install with both and neither gave me erros, i also saw tutorials with both of them
[04:57:49] Ox0dea: Tammyta: The gem's name is "datamapper", but its "main file" is named "data_mapper.rb".
[04:58:14] Ox0dea: Thus, you must require 'data_mapper'.
[04:58:26] Tammyta: oh ok, thanks
[04:58:30] Ox0dea: Happy to help.
[04:59:05] pawnbox: has joined #ruby
[04:59:31] Tammyta: https://gist.github.com/tammyta/e24d7b89a4cb7dc3c94d updated with all the errors i get Ox0dea :P
[05:01:45] djbkd: has joined #ruby
[05:01:50] Ox0dea: Tammyta: That is one error.
[05:02:24] Tammyta: uhm, i see
[05:04:02] Ox0dea: Tammyta: https://gist.github.com/tammyta/e24d7b89a4cb7dc3c94d#file-db-rb-L9
[05:04:03] Encapsulation: has joined #ruby
[05:04:10] Ox0dea: Interpolation does not occur within single-quoted strings.
[05:04:53] AlexRussia: has joined #ruby
[05:04:57] Tammyta: i'm kind of a newb, but i just changed that, and it worked..
[05:05:00] psye: has joined #ruby
[05:05:05] Tammyta: thanks again
[05:05:07] Ox0dea: Sure thing.
[05:05:13] Tammyta: i mean, worked as in, no errors yet
[05:06:07] psye: has joined #ruby
[05:06:13] freerobby: has joined #ruby
[05:06:36] Tammyta: yay, it's working as i thought it would
[05:07:38] symm-: has joined #ruby
[05:08:34] mistermocha: has joined #ruby
[05:08:46] riotjones: has joined #ruby
[05:08:52] choke: has joined #ruby
[05:12:59] chrissonar: has joined #ruby
[05:13:28] Musashi007: has joined #ruby
[05:14:45] dhjondoh: has joined #ruby
[05:15:07] JoshGlzBrk: has joined #ruby
[05:16:36] hotpancakes: has joined #ruby
[05:17:40] ellisTAA: has joined #ruby
[05:20:58] workmad3: has joined #ruby
[05:21:28] radgeRayden: has joined #ruby
[05:22:26] sylvain31: has joined #ruby
[05:22:50] ellisTAA: has joined #ruby
[05:27:03] chipotle: has joined #ruby
[05:29:07] Tritone: has joined #ruby
[05:29:38] Tritone: has left #ruby: ()
[05:31:08] ferhaty: has joined #ruby
[05:32:24] ellisTAA: has joined #ruby
[05:32:48] astrobun_: has joined #ruby
[05:32:59] skade: has joined #ruby
[05:33:15] kp666: has joined #ruby
[05:33:18] flughafen: sup peoples
[05:34:08] kp666: has joined #ruby
[05:36:16] kp666: has joined #ruby
[05:37:27] riotjones: has joined #ruby
[05:37:55] kp666: has joined #ruby
[05:40:12] choke: has joined #ruby
[05:41:14] iamninja: has joined #ruby
[05:42:43] [k-: flughafen!
[05:43:09] swgillespie: has joined #ruby
[05:44:31] yardenbar: has joined #ruby
[05:44:50] User458764: has joined #ruby
[05:45:07] ramfjord: has joined #ruby
[05:45:51] [k-: nothing, after a poorly interpreting question and going for lunch
[05:46:05] [k-: guess i should do my homework now
[05:46:05] anisha: has joined #ruby
[05:46:31] krz: has joined #ruby
[05:46:54] Mendenhall: has joined #ruby
[05:48:52] MatthewsFace: has joined #ruby
[05:49:37] Asher1: has joined #ruby
[05:50:26] Asher: has joined #ruby
[05:51:03] omegamike: has joined #ruby
[05:53:44] rht: has joined #ruby
[05:55:32] aganov: has joined #ruby
[05:56:17] DanielI: has joined #ruby
[05:56:30] hotpancakes: has joined #ruby
[05:58:04] hotpancakes: has joined #ruby
[06:00:21] yh_: has joined #ruby
[06:00:52] rht: has joined #ruby
[06:02:31] flughafen: [k-: how was your weekend
[06:03:02] swgillespie: has joined #ruby
[06:03:37] Trynemjoel: has joined #ruby
[06:03:54] rht: has joined #ruby
[06:04:12] skade: has joined #ruby
[06:05:17] Musashi007: has joined #ruby
[06:05:24] sinkensabe: has joined #ruby
[06:06:16] [k-: i wasted it
[06:06:21] j4cknewt: has joined #ruby
[06:07:16] roolo: has joined #ruby
[06:09:00] tjbiddle: has joined #ruby
[06:09:50] dented42: has joined #ruby
[06:11:44] Encapsulation: has joined #ruby
[06:14:29] mistermocha: has joined #ruby
[06:14:55] dimasg: has joined #ruby
[06:16:06] halcyone3: has joined #ruby
[06:16:32] khebbie: has joined #ruby
[06:16:43] arup_r: has joined #ruby
[06:18:22] astrobun_: has joined #ruby
[06:19:28] wasamasa: and I thought airports did nothing else than wasting people's time
[06:19:45] flughafen: wasamasa: don't make me waste your time!
[06:19:56] flughafen: ACTION just lost wasamasa's luggage
[06:20:32] arup_r: has joined #ruby
[06:21:41] govg: has joined #ruby
[06:25:52] DoubleMalt: has joined #ruby
[06:25:52] [spoiler]: has joined #ruby
[06:27:56] Vile`: has joined #ruby
[06:28:02] Frem: has joined #ruby
[06:31:40] Tamtam: has joined #ruby
[06:33:24] tmtwd: has joined #ruby
[06:40:29] Pupeno: has joined #ruby
[06:41:50] tkuchiki: has joined #ruby
[06:41:51] michael_mbp: has joined #ruby
[06:42:17] solars: has joined #ruby
[06:42:23] codecop: has joined #ruby
[06:42:34] Violentr: has joined #ruby
[06:45:26] Macaveli: has joined #ruby
[06:48:09] elton: has joined #ruby
[06:49:20] lele: has joined #ruby
[06:50:55] charliesome: has joined #ruby
[06:52:05] devoldmx: has joined #ruby
[06:53:44] JoshGlzBrk: has joined #ruby
[06:53:54] howdoicomputer: has joined #ruby
[06:59:23] greenarrow: has joined #ruby
[07:00:36] user1138_: has joined #ruby
[07:01:11] bayed: has joined #ruby
[07:02:29] sinkensabe: has joined #ruby
[07:03:11] niemcu: has joined #ruby
[07:03:47] ta: has joined #ruby
[07:05:10] kmossco: has joined #ruby
[07:06:02] [k-: vacation over?
[07:06:06] kmossco: has left #ruby: ("Leaving...")
[07:06:09] kmossco: has joined #ruby
[07:07:13] Philipp__: has joined #ruby
[07:07:47] kmossco: has left #ruby: ("Leaving...")
[07:09:38] workmad3: has joined #ruby
[07:10:14] [spoiler]: Oo where'd you go, ljarvis? How much fun did you have? :D
[07:10:49] edwinvdgraaf: has joined #ruby
[07:11:18] tkuchiki: has joined #ruby
[07:11:19] Ox0dea: Of the 8,505 7 Little Words puzzles currently available, 6 of them have their internal clues out of order.
[07:11:24] sdwrage: has joined #ruby
[07:12:19] Ox0dea: I wonder what happened.
[07:13:30] yh_: has joined #ruby
[07:14:25] [spoiler]: lmao I randomly put something and it was a guess; didn't even know it was a rod
[07:14:34] [spoiler]: Also this is the first time I heard of this game
[07:15:46] ta: has joined #ruby
[07:15:49] Ox0dea: I'm trying to determine the feasibility of solving them programatically.
[07:16:06] Ox0dea: Without implementing any NLP to interpret the clues, obviously.
[07:17:25] [spoiler]: just permute all the boxes, no?
[07:17:35] Ox0dea: Not quite.
[07:18:02] Ox0dea: >> (1..20).reduce(:*) # Also this.
[07:18:03] ruboto: Ox0dea # => 2432902008176640000 (https://eval.in/414574)
[07:19:02] einarj: has joined #ruby
[07:19:25] terlar: has joined #ruby
[07:19:51] Ox0dea: I suspect there must be some very clever dynamic programming approach to the thing, but I haven't hit upon it yet.
[07:19:52] [spoiler]: If you don't look for clues with a NLP, wouldn't the only other solution be to randomly guess it? I can't think of an other approach
[07:20:24] Ox0dea: Elimination and backtracking would get most of the way there, I'm sure.
[07:22:07] [spoiler]: I got all 7 yay me
[07:22:10] [spoiler]: I love this
[07:22:30] [spoiler]: Ok I need to work though :(
[07:22:42] Ox0dea: To clarify, I intend to use a dictionary to validate guesses, then use some sort of constraint solver to eliminate the impossible combinations.
[07:23:12] Ox0dea: Using *only* the words that actually appear in any of the puzzles feels like cheating, though.
[07:23:30] alphaatom: has joined #ruby
[07:24:12] [spoiler]: Oh, good luck with dictionary APIs. They're either slow as fuck or expensive as fuck (I remember having to use one a few years back for a game I was making)
[07:24:35] [spoiler]: well it was a thesaurus+dictionary api, now that I think of it
[07:25:40] Ox0dea: [spoiler]: I suppose I should have said "word list" instead.
[07:26:48] [spoiler]: Where will you find that, though? And I imagine that unless you use something 7LW-specific, the list might be huuuuge
[07:27:27] Ox0dea: ~ $ wc -l < /usr/share/dict/words-insane
[07:28:10] mdavid613: has joined #ruby
[07:28:15] Ox0dea: *That* is a huge list, 7LW only uses a total of 8,238 words in its 8,505 English puzzles.
[07:29:12] [spoiler]: Oh wow I wasn't aware of /usr/share/dict; I saw the dir probably, but assumed it was something else
[07:29:13] [spoiler]: this is cool
[07:30:50] [k-: i didn't know decadelong was a word
[07:31:11] pawnbox: has joined #ruby
[07:31:25] Ox0dea: It's not in words-insane!
[07:31:49] Ox0dea: Probably ought to be, though? "Yearlong" is there, anyway.
[07:33:19] nveselinov: has joined #ruby
[07:33:35] [spoiler]: Actually decadelong was the word I randomly tried; I've only ever heard a friend's mum use it to exaggerate time periods
[07:37:10] Ox0dea: http://git.io/v3mLU
[07:37:18] Ox0dea: Maybe somebody wanted that.
[07:37:49] Ox0dea: Notice that all of the "chunks" are in clue order, except for six mysterious outliers.
[07:38:16] Averna: has joined #ruby
[07:38:23] Ox0dea: I bet there's an intern to blame. "No, Steve, that's not how we do it here! Ugh, ship it."
[07:38:33] mdavid613: has joined #ruby
[07:39:24] Blaguvest: has joined #ruby
[07:40:25] omegamike: has joined #ruby
[07:42:30] iamninja: has joined #ruby
[07:43:39] hotpancakes: has joined #ruby
[07:43:58] bruno-: has joined #ruby
[07:45:02] bodgix: has joined #ruby
[07:46:24] conor_: has joined #ruby
[07:46:39] hotpancakes: has joined #ruby
[07:48:23] tkuchiki: has joined #ruby
[07:49:01] [spoiler]: maybe someone just got lazy
[07:49:16] [spoiler]: or was lazy and then decided "no, I'll do this right!"
[07:49:22] [spoiler]: and mixed them up
[07:50:49] jhass: or they were made a hand and then "Oh shit, I reaaay should script it"
[07:51:17] jhass: and *by. Not awake yet :(
[07:52:53] bigkevmcd: has joined #ruby
[07:53:05] [spoiler]: and, good morninf :)
[07:54:18] dumdedum: has joined #ruby
[07:54:20] adaedra: Good morninf to you too :)
[07:55:37] yfeldblum: has joined #ruby
[07:57:01] senayar: has joined #ruby
[07:58:24] mikecmpbll: has joined #ruby
[08:01:38] czetter_: has joined #ruby
[08:03:03] Violentr: has joined #ruby
[08:06:40] khebbie: has joined #ruby
[08:07:17] iamninja: has joined #ruby
[08:07:39] h4ckurate: has joined #ruby
[08:10:13] apeiros: and today: fun with microsoft exchange web services! fun for the whole family!
[08:13:33] rdark: has joined #ruby
[08:16:07] senayar: has joined #ruby
[08:16:09] sylvain31: has joined #ruby
[08:19:10] clad_fraug: has joined #ruby
[08:19:42] mcgain_: has joined #ruby
[08:21:50] jimms: has joined #ruby
[08:23:36] apeiros: hah, even more fun
[08:23:54] adaedra: ?ot apeiros
[08:23:54] ruboto: apeiros, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[08:24:11] apeiros: adaedra: but it's written in ruby! it's a ruby ews client!
[08:24:30] adaedra: nvm then, carry on
[08:24:58] asaaki: has joined #ruby
[08:25:11] apeiros: already moved it to OT :-D
[08:26:17] senayar: has joined #ruby
[08:27:15] spider-mario: has joined #ruby
[08:29:56] bweston92: has joined #ruby
[08:33:57] lampshades: has joined #ruby
[08:34:09] bweston: has joined #ruby
[08:36:07] pawnbox_: has joined #ruby
[08:36:51] Guest52508: has joined #ruby
[08:37:52] michael_mbp: has joined #ruby
[08:39:16] mcgain_: has joined #ruby
[08:39:29] leat: has joined #ruby
[08:41:29] charliesome: has joined #ruby
[08:42:35] doerteDev: has joined #ruby
[08:44:43] dionysus69: has joined #ruby
[08:44:57] c0m0: has joined #ruby
[08:45:41] dhtns: has joined #ruby
[08:45:43] cornerma1: has joined #ruby
[08:48:31] f4cl3y__: has joined #ruby
[08:49:34] anisha_: has joined #ruby
[08:50:28] pawnbox: has joined #ruby
[08:52:07] mcgain: has joined #ruby
[08:52:43] gregf_: has joined #ruby
[08:52:51] devoldmx: has joined #ruby
[08:52:57] cschneid: has joined #ruby
[08:53:31] anisha__: has joined #ruby
[08:53:36] ndrei: has joined #ruby
[08:53:48] tomphp_: has joined #ruby
[08:53:59] leafybasil: has joined #ruby
[08:54:16] Macaveli: has joined #ruby
[08:54:31] TheHodge: has joined #ruby
[08:55:37] pawnbox: has joined #ruby
[08:56:28] ljarvis: so many tires
[08:57:36] maloik: y u no coffee
[08:58:23] workmad3: has joined #ruby
[09:03:33] hotpancakes: has joined #ruby
[09:03:38] ljarvis: it no halp
[09:04:42] adaedra: http://crow202.org/2009/cat_halp.jpg
[09:04:59] yorickpeterse: ljarvis: maybe go to bed earlier
[09:04:59] [k-: hm, classic case of vacation withdrawal syndrome
[09:05:07] yorickpeterse: (says the one who fell asleep in the train this morning)
[09:05:16] yorickpeterse: (and missed his station)
[09:05:22] jbw: has joined #ruby
[09:05:34] ljarvis: i went to bed at 10pm
[09:05:50] yorickpeterse: are you 85 or something?
[09:06:06] ljarvis: i did have a birthday on friday
[09:06:07] adaedra: no, tired he told you
[09:06:09] yorickpeterse: I think I fell asleep somewhere between 01:30 and 02:00
[09:06:12] ljarvis: but not quite 85
[09:06:27] yorickpeterse: darn Witcher 3 is too addictive :<
[09:06:39] withnale_: has joined #ruby
[09:08:32] GeissT: has joined #ruby
[09:08:45] gizmore: has joined #ruby
[09:10:13] quimrstorres: has joined #ruby
[09:10:51] joonty: has joined #ruby
[09:11:05] maloik: current status: installing 187 on my machine :(
[09:11:24] sylvain31: has joined #ruby
[09:12:16] MatrixBridge: has joined #ruby
[09:12:26] maloik: nvm, errors... client will have to wait
[09:12:26] ljarvis: i think that's the SOS code
[09:12:34] ljarvis: clearly maloik is under distress
[09:12:40] ljarvis: kidnapped, perhaps
[09:13:11] ljarvis: today I celebrate moving away from gmail
[09:13:33] AnoHito: has joined #ruby
[09:13:41] einarj: has joined #ruby
[09:13:58] [k-: whyyyyyy
[09:14:08] ashleyhindle: I literally just moved some of my email to Fastmail
[09:14:22] ljarvis: ashleyhindle: yep that's where I went too
[09:14:29] ljarvis: couldn't be happier
[09:14:30] ashleyhindle: It's the future
[09:14:37] [k-: ?? ?? ?? ??? ??? ??? ?? ?? ??
[09:14:38] ljarvis: should have done this ages ago
[09:14:45] [k-: this is a real SOS
[09:15:27] tAn: has joined #ruby
[09:15:28] tomphp_: has joined #ruby
[09:15:39] ljarvis: [k-: every time i get something off of google i gain some happiness
[09:15:52] greenarr_: has joined #ruby
[09:16:20] astrobun_: has joined #ruby
[09:16:32] quimrstorres: has joined #ruby
[09:16:35] greenarr_: has joined #ruby
[09:16:43] [k-: decentralizing?
[09:16:52] ljarvis: degoogleizing
[09:17:07] [k-: whyyyyyyyy
[09:17:16] greenarr_: has joined #ruby
[09:17:31] hotpancakes: has joined #ruby
[09:17:48] sevenseacat: has joined #ruby
[09:17:57] maloik: anyone here know of good conference room microphones to plug into a laptop? as in, roundtable meetings where one (or more) people are working remotely
[09:17:58] quimrstorres: has joined #ruby
[09:18:07] greenarr_: has joined #ruby
[09:18:19] maloik: macbook's microphone + hangouts are horrible
[09:18:37] sevenseacat: seems ruby-related
[09:18:38] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[09:18:47] aspiers: has joined #ruby
[09:18:50] bnagy: like srsly, though wtf
[09:18:54] workmad3: has joined #ruby
[09:19:45] adaedra: [k-: because Google is EVIL
[09:19:56] Timba-as: has joined #ruby
[09:20:15] ashleyhindle: You have to take down Evil Corp
[09:20:34] [k-: but if Google loses customers it can't provide me free services :(
[09:20:47] maloik: sevenseacat: turned out #microphone-buying-advice was empty
[09:21:02] ljarvis: those services they discontinue a year down the line
[09:21:02] sevenseacat: maloik: your loss.
[09:21:07] pawnbox: has joined #ruby
[09:21:58] yorickpeterse: ljarvis: here's the twist though
[09:22:03] yorickpeterse: google pretty much owns everything anyway
[09:22:13] yorickpeterse: So Gmail or no Gmail, it won't make any difference
[09:22:22] ljarvis: of course it will
[09:22:26] mclee: has joined #ruby
[09:22:37] maloik: how are the spam filters on fastmail though? last I heard they were far worse than google's
[09:22:42] yorickpeterse: All your incoming and outgoing Email is being gobbled up by plenty of organizations
[09:22:45] greenarrow: has joined #ruby
[09:22:53] yorickpeterse: Google is the least of your worries
[09:22:59] ljarvis: maloik: everyone's is worse than Google's. It's a lot better though
[09:23:00] yorickpeterse: Granted Gmail in itself isn't all that great
[09:23:01] solars: has joined #ruby
[09:23:05] [k-: no one ever tried to take down Microsoft
[09:23:14] jhass: yorickpeterse: but the easiest to remedy, so why not take the opportunity
[09:23:15] yorickpeterse: [k-: Correct, because they just bent over
[09:23:18] mistermocha: has joined #ruby
[09:23:26] pawnbox: has joined #ruby
[09:23:39] [k-: so give Google time to bend over
[09:23:53] yorickpeterse: jhass: because it changes nothing
[09:23:57] ljarvis: i just don't want to keep giving google my stuff voluntarily
[09:24:11] yorickpeterse: That's an entirely different reasoning
[09:24:19] yorickpeterse: e.g. I long for not having to use Google Contacts
[09:24:22] yorickpeterse: or Google calendar
[09:24:25] ljarvis: plus they closed one of my gmail accounts
[09:24:26] yorickpeterse: especially the UI
[09:24:32] ljarvis: yep, and i dont use either of those anymore
[09:24:36] ljarvis: and feel a lot better off for it
[09:24:44] yorickpeterse: Fastmail has caldav doesn't it?
[09:24:50] yorickpeterse: and webdav IIRC
[09:25:09] [k-: at least they actually produce nice ui for certain stuff
[09:25:14] [k-: like material design
[09:25:19] ljarvis: who? google?
[09:25:21] [k-: and holo
[09:25:28] yorickpeterse: lol material design
[09:25:39] yorickpeterse: The biggest excuse for being a lousy designer
[09:25:41] ljarvis: i hate their UI in almost all of their products
[09:25:51] yorickpeterse: "Fuck, I can't design for shit. You know what, lets remove all elements and just use coloured squares. GENIUS"
[09:25:52] elaptics: yorickpeterse: I thought I was the only one who hated google calendar...you've made my day :)
[09:25:53] [spoiler]: I use Google products all the time. I don't really care if Google knows stuff about me, TBF. It doesn't know stuff I don't want it to know
[09:25:53] [k-: i like it :o
[09:25:54] hotpancakes: has joined #ruby
[09:26:16] [k-: yorickpeterse: flat is tending
[09:26:21] [k-: trending*
[09:26:22] [spoiler]: yorickpeterse: I kinda like Material, too
[09:26:26] maloik: [spoiler]: you think! **puts on tinfoil hat**
[09:26:31] [spoiler]: maloik: LOL
[09:26:33] jhass: waaay ?ot ehre
[09:26:39] Vile`: has joined #ruby
[09:26:57] yorickpeterse: I don't think anybody has ever actually proven flat/material design to be remotely user friendly
[09:26:58] lxsameer: has joined #ruby
[09:26:59] lxsameer: has joined #ruby
[09:27:03] [spoiler]: Go home, ehre. Your offtopicness is not welcome
[09:27:07] yorickpeterse: people just seem to go with it because the big corporations are using it
[09:27:31] yorickpeterse: The single biggest problem with it is that it's nigh impossible to distinguish between a button and just a square
[09:27:38] yorickpeterse: since buttons are usually just...squares
[09:27:42] [spoiler]: yorickpeterse: I prefer flat design over isomorphic design (what apple pushes)
[09:27:42] adaedra: we added all those cool things in CSS3 at the moment the industry went flat design we could do with CSS2.
[09:27:44] [k-: so you think holo is better?
[09:27:46] yorickpeterse: often with just a border, no background
[09:27:47] yorickpeterse: e.g. Bootstrap
[09:28:13] yorickpeterse: I liked the short time between pre flat and post flat
[09:28:29] yorickpeterse: That is, UIs still had depth and what not, but they weren't as flat as the Netherlands
[09:28:43] [spoiler]: Bootstrap is yucky. I seriously don't see why people seem to like it; it's not good at all.
[09:29:01] adaedra: Because everyone else does
[09:29:03] yorickpeterse: Then some hipster came along and went all "works for Netherlands, works for design too"
[09:29:21] adaedra: yorickpeterse: so bike-based design is next?
[09:29:25] [spoiler]: yorickpeterse: subtle gradients are ftw, but I feel like it's dificult to get them right from a design-perspecive (but maybe that's me since I am not a designer)
[09:29:33] yorickpeterse: [spoiler]: exactly my point
[09:29:39] yorickpeterse: People are lousy, thus they use flat UI
[09:29:45] yorickpeterse: so they can get something that requires 0 effort
[09:29:46] [k-: spheres are next
[09:30:04] yorickpeterse: I honestly can't remember a single flat UI that didn't look like the back of a horse
[09:30:16] yorickpeterse: but then again I'm Waldorf & Statler reincarnated into a single body
[09:30:40] [spoiler]: yorickpeterse: I admit that I find flat design appealing on websites, but I dislike it on GUIs (web or native ones) most of the time.
[09:30:57] suchness: has joined #ruby
[09:31:32] yorickpeterse: In terms of aesthetics it's not that bad
[09:32:16] yorickpeterse: But removing gradients and what not isn't going to make Jakob Nielsen cream his pants
[09:32:17] [spoiler]: Hmm I am not sure I would call Material *flat* it does have shadows, which removes the flatness, and for some reason it looks kinda matte in my head rather than flat (like Microsoft's designs)
[09:32:49] yorickpeterse: https://www.google.com/design/spec/components/buttons.html#buttons-usage <- drop shadows yes, still as flat as .nl
[09:33:00] yorickpeterse: The new standard for design: if it's flatter than .nl it's bad
[09:33:10] adaedra: I though Belgium was the flat country
[09:33:21] Guest80: has joined #ruby
[09:33:25] stamina: has joined #ruby
[09:33:31] yh_: has joined #ruby
[09:33:44] M-mistake: has joined #ruby
[09:33:45] M-prosodyContext: has joined #ruby
[09:34:27] yorickpeterse: No, they're just the wanna-bes
[09:34:44] yorickpeterse: They have good bear, we'll kill them last
[09:34:55] maloik: we don't exactly have mountains, but our hills are pretty famous with cyclists
[09:35:05] adaedra: good bear? :D
[09:35:11] maloik: related, I hate cyclists
[09:35:20] yorickpeterse: the stuff that gets you in trouble on Friday evening
[09:35:31] yorickpeterse: maloik: 50 year olds on racing bikes are the worst
[09:35:36] yorickpeterse: I recall we even have slang for it
[09:35:40] yorickpeterse: but I can't remember it :<
[09:35:45] maloik: wielerterrorist? :D
[09:36:17] yorickpeterse: No, I recall it being better..lets see if I can find it
[09:36:35] qiukun: has joined #ruby
[09:37:19] adaedra: maloik: flemish?
[09:38:04] alexherbo2: has joined #ruby
[09:38:41] yorickpeterse: AH, well one of them is "racefiets babyboomer"
[09:38:46] pawnbox: has joined #ruby
[09:38:48] [spoiler]: yorickpeterse: slang for 50+yo bike racers? that's so odd
[09:39:09] yorickpeterse: Basically how they drive is like this:
[09:39:19] yorickpeterse: RING RING RING RING RING RING MOVE YOUR ASS RING RING RING RING RING
[09:39:23] yorickpeterse: while 10 of them cycle next to each other
[09:39:29] yorickpeterse: in the middle of town
[09:39:38] yorickpeterse: you're lucky if they even have a bell
[09:39:43] [spoiler]: oh, I call that "wanker"
[09:41:16] maloik: not too long ago I heard of two cyclists who ran over a puppy at full speed (obviously killing it), turned back and yelled "buy yourself a new one!"... how's that for horrible human being
[09:41:33] yorickpeterse: See, for cases like that I'm all for the death penalty
[09:41:46] yorickpeterse: 1) pretty clear they killed the puppy 2) no remorse 3) fuck em
[09:41:52] apfeluser: has joined #ruby
[09:41:57] yorickpeterse: death by listening to Justin Bieber
[09:42:17] tiagonobre__: has joined #ruby
[09:42:28] [k-: they won't actually die
[09:42:44] [spoiler]: yorickpeterse: yes.
[09:42:55] [spoiler]: [k-: [citation needed]
[09:42:56] adaedra: maloik: wow
[09:43:00] [k-: water torture?
[09:43:12] [k-: [spoiler]: [citation needed]
[09:43:28] adaedra: it's not wikipedia here
[09:43:38] [spoiler]: [k- do you mean waterboarding or the chinese dripping thing
[09:44:09] last_staff: has joined #ruby
[09:44:36] [spoiler]: I'd probably stab myself with a pillow if I had to listen to Justin Bieber for too long
[09:44:39] yorickpeterse: [k-: have you tried?
[09:44:44] [k-: both would be fun
[09:44:50] adaedra: [spoiler]: too long, you mean 1 second?
[09:45:14] [spoiler]: adaedra: :D
[09:45:44] norc: has joined #ruby
[09:46:00] skade: has joined #ruby
[09:47:03] stef204: has joined #ruby
[09:47:57] yorickpeterse: I think of all traffic forms I hate car drivers the most
[09:48:02] yorickpeterse: especially in the town that I live in
[09:48:05] yorickpeterse: Those people are mental
[09:48:18] shevy: They are dutch!
[09:48:19] yorickpeterse: "oh you're crossing the street with right of passage? Fuck you I'm a pickup"
[09:48:32] jessu: has joined #ruby
[09:48:36] yorickpeterse: "You've been waiting for ages to cross the road? Fuck you, I'm a Porsche"
[09:48:38] suchness: has left #ruby: ()
[09:48:40] suchness: has joined #ruby
[09:48:41] suchness: has left #ruby: ()
[09:48:42] suchness: has joined #ruby
[09:48:52] yorickpeterse: though I take great joy in very slowly crossing the road whenever some sports car comes along
[09:48:56] suchness: Hrm. AWS is down, lovely.
[09:49:13] yorickpeterse: suffice: nah, just increased error rates
[09:49:27] yorickpeterse: good thing eu-west-1 is going strong
[09:49:29] Toska: has joined #ruby
[09:49:52] adaedra: I hate bicycles the most here, even if cars are close second
[09:50:23] [spoiler]: I don't hate either, tbf. I hate pedestrians
[09:50:35] adaedra: Difference is that cars make a little effort to follow road rules.
[09:50:35] [spoiler]: ACTION is just kidding
[09:51:02] yorickpeterse: I once had this dude in a sports car drive through my street once in a while, for some reason every time I had to cross the road on my way back
[09:51:16] yorickpeterse: He'd always drive at top speed and hit the brakes at the last moment
[09:51:21] yorickpeterse: So I took my time crossing the street
[09:51:24] yorickpeterse: while looking at him
[09:51:27] yorickpeterse: Haven't seen him since
[09:51:31] yorickpeterse: ACTION stuck it to the man
[09:51:46] yorickpeterse: also at times I almost get rammed by people
[09:51:54] [spoiler]: I just walk over the zebra unless the car is really close, and the cars have to stop
[09:52:08] conor_: has joined #ruby
[09:52:10] yorickpeterse: few nasty corners on my way to the station where you can't see stuff coming from the left
[09:52:22] yorickpeterse: [spoiler]: see, over here a lot of them just drive anyway
[09:52:25] yorickpeterse: "fuck you I'm a car" etc
[09:52:39] adaedra: ???fuck you I don't fear jail???
[09:52:43] yorickpeterse: Ah well, at least it's not as bad as Amsterdam
[09:52:58] [spoiler]: That's so annoying. We have huge *fines* if you hit someone in a car, I think jail would be the least of their problems
[09:52:59] yorickpeterse: There you have to choose between getting run over by drunked tourists, trams, cars or busses
[09:53:02] yorickpeterse: or all at once
[09:53:15] yorickpeterse: Jezus, my English is really bad today
[09:53:28] yorickpeterse: well...can't even spell Jesus
[09:53:34] yorickpeterse: I'll euh....yeah
[09:53:53] adaedra: ACTION slaps yorickpeterse with an English dictionary
[09:54:13] yorickpeterse: ACTION slaps adaedra a few times
[09:54:35] rdark: has joined #ruby
[09:55:07] shevy: this is love
[09:55:17] yorickpeterse: ACTION likes slapping people and randomly picks shevy to slap
[09:55:23] yorickpeterse: why does it never pick the funny ones .___.
[09:55:32] [spoiler]: And the system here actually goes out of its way to make the offenders pay (especially traffic offenders). They can literally charge your bank directly, or worse: sell your property to give money to the victim (or the family if the person died). I guess it means little if you died, but the people here are really careful since they introduced this shit
[09:56:08] adaedra: Apparently, they want to remove jail time for driving without license here.
[09:56:42] yorickpeterse: we're talking about a third-world country right?
[09:56:49] [spoiler]: I think people fear losing money more than subtext (it's an anagram) in jail
[09:57:16] adaedra: yorickpeterse: soon
[09:57:23] [spoiler]: yorickpeterse: if you were asking me, then... kinda. Lol, I'm from Croatia.
[09:57:44] yorickpeterse: [spoiler]: oh, heh
[09:57:52] adaedra: 500??? for driving without license? wat
[09:58:01] rikkipitt: has joined #ruby
[09:58:05] platzhirsch: has joined #ruby
[09:58:08] yorickpeterse: oh yeah and adaedra is from France
[09:58:12] yorickpeterse: So yeah, third-world country :<
[09:58:21] yorickpeterse: ok I'm done until lunch
[09:58:31] shevy: adaedra has great cuisine
[09:59:09] sameerynho: has joined #ruby
[09:59:44] [spoiler]: Wait, how will France become a 3rd world country?
[09:59:59] bnagy: crushing debt and the collapse of its pension system?
[10:00:24] [spoiler]: bnagy: I should read the news more often
[10:00:27] adaedra: [spoiler]: the day Germany stops being our friend, of course
[10:00:40] hotpancakes: has joined #ruby
[10:01:06] bnagy: we don't call them third world countries anymore, fwiw ;)
[10:01:47] [spoiler]: Oh, did they coin a more politically correct term for them?
[10:01:58] bnagy: "developing"
[10:02:14] yorickpeterse: I do like how Germany goes around saying "LOL NO MORE MONEY, TOO EXPENSIVE"
[10:02:17] yorickpeterse: meanwhile they swim in money
[10:02:31] [spoiler]: yorickpeterse: that's the very reason why they swim in money :P
[10:02:37] yorickpeterse: That might just be the old rivalry between .nl and .de speaking
[10:02:56] yorickpeterse: They take our beaches every year, least they could do is give us lots of money
[10:03:29] [spoiler]: I always felt like the EU was kinda centralist-ish because Germany seems to get the most out of the EU.
[10:03:39] adaedra: yorickpeterse: http://www.9emeart.fr/uploads/images_files/grande-%C3%A9pop%C3%A9e-picsou.jpg
[10:03:43] yorickpeterse: because they're the biggest economy
[10:03:46] yorickpeterse: so it's not entirely surprising
[10:03:50] [spoiler]: yorickpeterse: Oh, you hear more German than Croatian in my town during summer
[10:04:04] yorickpeterse: Ah, so it's a continental epidemic
[10:04:16] yorickpeterse: "Quick run, before you get the Germans!"
[10:04:39] yorickpeterse: Ah yes, Europe
[10:04:43] yorickpeterse: such an interesting place
[10:04:45] [spoiler]: "Eew, he has Germ(an)s!"
[10:04:53] yorickpeterse: nothing beats the good old rivalry between every country
[10:04:59] f4cl3y: has joined #ruby
[10:04:59] f4cl3y: has joined #ruby
[10:05:03] yorickpeterse: or the eastern European attitude to solving problems
[10:05:10] yorickpeterse: Immigration problem? Fuk it, we'll build a fence
[10:05:25] [spoiler]: It is kind of a dysfunctional family, really
[10:05:36] nfk: has joined #ruby
[10:05:41] yorickpeterse: <UK> Calais? not our problem mate
[10:05:58] pawnbox: has joined #ruby
[10:05:59] yorickpeterse: <NL> WE NEED TO TAKE MORE PEOPLE IN OUR ALREADY CRAMPED COUNTRY
[10:06:04] wprice: has joined #ruby
[10:06:11] yorickpeterse: <NL> Oh hey Brussels, here's that 4,5 billion Euros you asked
[10:06:54] yorickpeterse: meanwhile eastern Europe continues to give no fucks
[10:07:08] yorickpeterse: and Scandinavia continues being filthy rich
[10:07:28] lxsameer_: has joined #ruby
[10:07:44] [k-: the money there is filthy?
[10:08:03] maloik: the UK apparently helped build fences and improve security in calais
[10:08:06] bnagy: new norweigan money is awesome
[10:08:10] yorickpeterse: maloik: "improve"
[10:08:18] yorickpeterse: You've seen the videos right?
[10:08:24] maloik: not at all, only read the headline
[10:08:36] devoldmx: has joined #ruby
[10:08:39] yorickpeterse: bunch of reporters spent the night with some refugees
[10:08:42] yorickpeterse: The fences are...useless
[10:08:51] czetter_: has left #ruby: ()
[10:08:52] bstrarm: has joined #ruby
[10:08:57] yorickpeterse: I also wonder if people relaly didn't learn from the Berlin wall
[10:09:01] yorickpeterse: that worked out so well
[10:09:12] [spoiler]: <HR> *bends over*; <EU> Ok, ok. You can be my friend now... <HR> *bends over some more for money*; <EU> No money, bitch. Now bend over again, if you wanna stay friends!
[10:09:47] [spoiler]: Sounds like an intro to a bad porno... Sorry about that.
[10:10:00] maloik: food time
[10:10:16] adaedra: yorickpeterse: where do you want fences? You're surrounded by countries you agreed having no enforced borders with!
[10:11:32] symm-: has joined #ruby
[10:11:35] [spoiler]: ?ot [spoiler]
[10:11:35] ruboto: [spoiler], this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[10:12:08] yorickpeterse: adaedra: I don't want any fences to begin with
[10:12:21] khebbie: has joined #ruby
[10:12:26] [spoiler]: except one around my house, maybe
[10:12:29] adaedra: ah, I misunderstood then
[10:12:36] yorickpeterse: There are 2 ways of viewing it: 1) refugees are a pest 2) refugees are refugees
[10:12:45] yorickpeterse: For 1) you can only prevent people from coming it if you start at the source
[10:12:52] yorickpeterse: make it unattractive to go in the first place
[10:12:59] adaedra: spoiler: we have chosen 1
[10:13:01] yorickpeterse: or barricade the borders with north Africa
[10:13:14] yorickpeterse: (basically kick people back, which our border patrols are _supposed_ to do)
[10:13:19] yorickpeterse: for option 2) this is much more difficult
[10:13:31] yorickpeterse: Because you end up with this debate of legal vs illegal refugees/immigrants
[10:13:33] adaedra: well, it's a bit diffult you see
[10:13:33] yorickpeterse: and what to do with them
[10:13:39] hotpancakes: has joined #ruby
[10:13:48] yorickpeterse: My opinion is pretty controversial and harsh on it
[10:13:57] adaedra: migrants are coming from water, which we can't really block efficiently
[10:14:04] yorickpeterse: That is, if you're illegal, get others in trouble (e.g. truck drivers) the only thing you'll get is a boot to the head and a one way ticket back
[10:14:07] shevy: DRY THE OCEANS!!!
[10:14:20] yorickpeterse: I vote for getting a Kraken
[10:14:24] adaedra: especially when they're left in difficult situation in a soon-to-be-drown boat
[10:14:36] adaedra: shevy: learn2geography. It's a sea, not an ocean.
[10:14:39] einarj: has joined #ruby
[10:14:55] shevy: hey it's connected to an ocean
[10:15:17] yorickpeterse: Either way, the situation is tricky
[10:15:27] yorickpeterse: because yes, illegal immigrations have no place, but at the same time they can't really go back
[10:15:31] yorickpeterse: because they'd die over there
[10:15:50] yorickpeterse: Sadly just taking them in doesn't really work either
[10:15:51] adaedra: Look at what they'll accept to come here, too
[10:16:18] yorickpeterse: e.g. there's the age old problem of people refusing to adapt, for whatever reason
[10:16:24] yorickpeterse: which further complicates things
[10:16:38] yorickpeterse: "We have a right to live here! Oh and fuck your morals/traditions/rules, we'll have none of that"
[10:17:08] [spoiler]: I am not sure how I feel about illegal immigrants, actually. To clarify: it means you entered the country without registering your entrance, right? Is there a way they can upgrade their status by seeking some sort of asylum?
[10:17:28] yorickpeterse: [spoiler]: it's a blurry definition
[10:17:38] yorickpeterse: I see it as somebody who not only entered a country without a permit, but also got others in trouble
[10:17:39] adaedra: [spoiler]: there's different cases and it depends from country to country
[10:17:49] yorickpeterse: e.g. hiding in trucks, meaning they risk prison time or hefty fines
[10:17:51] Iskarlar: has joined #ruby
[10:18:09] [spoiler]: yorickpeterse: I don't think the "fuck your traditions/morals/rules" problem applies only to immigrants, though. It's just a symptom of being born a human
[10:18:49] yorickpeterse: Oh yeah, everybody has it
[10:18:54] [k-: live alone in your own country
[10:18:58] yorickpeterse: but if you pile that on top of the other things it doesn't really help
[10:19:07] [spoiler]: Basically, I welcome anyone, immigrant or not, who doesn't hurt individuals or the community
[10:19:36] yorickpeterse: [spoiler]: sure, that would work if it wasn't for the financial/social impact
[10:19:46] [spoiler]: Otherwise, I'd put them in cages, with collars and make them run in a wheel to give electricity
[10:19:48] yorickpeterse: e.g. you can't just take people in and expect it to solve anything, you need to educate people, provide housing, etc
[10:20:08] yorickpeterse: and for whatever reason it's considered racist when a country says they can't provide that (assuming they're not lying)
[10:20:26] rickmasta: has joined #ruby
[10:20:48] subtwo: has joined #ruby
[10:21:17] [spoiler]: It's a bit stupid. Why would a country provide that? There's a lot of citizens who don't get any of it (homeless people), or people who can't afford education. Why would you provide for someone "new" when you can't provide for what you already have?
[10:21:28] [spoiler]: I am not sure why people expect that of a country
[10:21:48] tjbiddle: has joined #ruby
[10:22:03] big|bad|wolf: has joined #ruby
[10:22:24] withnale_: has joined #ruby
[10:22:27] [spoiler]: Countries are not omnipotent entities who can conjure stuff up
[10:22:31] adaedra: Problem currently here is: "There are migrant in difficult situation" - "Ok, let's help them" - "OMG YOU HELP MIGRANTS NOT OUR PEOPLE IN THE STREET THEY'RE REPLACING US DUUUUUURRRRR"
[10:22:52] [spoiler]: adaedra: that is a good problem, though?
[10:23:01] [spoiler]: Why not help everyone and just immigrants?
[10:23:21] [spoiler]: I mean it's a good viewpoint, not a good problem
[10:23:24] Spami: has joined #ruby
[10:23:24] [spoiler]: ACTION facepalms
[10:23:30] yh__: has joined #ruby
[10:23:36] adaedra: Can we help everyone though?
[10:23:46] yorickpeterse: [spoiler]: that's one part of the problem
[10:23:55] yorickpeterse: you can't, and shouldn't, provide for others if you can't provide for your own
[10:24:08] [spoiler]: yorickpeterse: I agree
[10:24:20] [spoiler]: adaedra: what he said ^
[10:24:28] camonz: has joined #ruby
[10:24:32] yorickpeterse: but for some reason we have idiots like Verhofstadt who just go around yelling "MOAR MOAR MOAR"
[10:24:39] adaedra: and what do we do with the ones from outside currently on ground? Just kick them?
[10:24:55] [spoiler]: this is like "let's add new features without fixing bugs" on a political stage
[10:25:23] yorickpeterse: problem there again is that homelessness (?) will never go away
[10:25:31] [spoiler]: adaedra: No, add those features when you fixed the bugs :)
[10:25:40] yorickpeterse: so it could be used as an excuse to never take care of others
[10:25:46] adaedra: So, do nothing
[10:26:03] Scroff: If you go down that route, you'll never fix everyone
[10:26:07] Scroff: anything*
[10:26:29] adaedra: [spoiler]: that's not really comparable. Immigrants, either coming here or in transit to UK, are on ground and are a current problem. So it's more a "What problem do we fix first"
[10:26:34] Scroff: Lets not help the homeless when there are kids in abusive homes that we need to fix
[10:26:39] conor_: has joined #ruby
[10:26:43] mistermocha: has joined #ruby
[10:26:53] Scroff: lets not fix the kids in abusive homes because we need to cure cancer
[10:26:59] Scroff: and on and on
[10:27:20] Scroff: there's always some "bug" you need to fix before doing something else
[10:27:28] yorickpeterse: social problems like this are really hard
[10:27:47] yorickpeterse: They can be fixed though, largely
[10:27:52] yorickpeterse: e.g. look at Scandinavia
[10:28:03] adaedra: problem also is that people are never happy and always find something to argue about
[10:28:14] lucyinthesky: has joined #ruby
[10:28:14] adaedra: yorickpeterse: iirc Sweden has some problems with immigration too.
[10:28:50] [spoiler]: yorickpeterse: Ok, let me clarify. If someone gambled his house away, fuck him. If a child is born in a homeless environment, or in an orphanage, then provide for that child. If someone leves because of domestic violence (I volunteered at a homeless shelter, and this was quite common), then create a centre of some sort for those people. There will always be homeless people, but not everyone homeless person
[10:28:52] Scroff: The Swedes I know are really against most immigration (but that could just be the people I know)
[10:28:52] [spoiler]: deserves the same treatment.
[10:29:27] yorickpeterse: [spoiler]: yes
[10:29:43] yorickpeterse: scroff: Scandinavians in general are a bit...."weary" of certain people
[10:29:46] adaedra: scroff: I think like everywhere else, it also depends which immigration (i.e. from where)
[10:30:24] ytti: we usually think people who have more than we have, just are luckier than us, and people who have less, just are lazier than us
[10:30:33] GeissT: has joined #ruby
[10:30:55] ytti: also, if you think you root for the poor, but your plan to fix is, is to take something from the rich
[10:31:07] ytti: i have newsflash to you, you don't care about the poor, you just want to have more to yourself
[10:31:22] ytti: if you root for the poor, your main problem is how to give to the poor, not how to take from the rich
[10:31:36] yorickpeterse: hey don't go around saying Robin Hood was just a thug
[10:32:11] doerteDev: ohai rubyists. I have a site where nginx needs to proxy foreign contents from a diff. vendor and i need to keep the caches warm. Anyone have a good spider at hand that easily can be set to "only poll $amount of traffic in $timeframe but only for $domain"?
[10:32:12] [k-: he just wants to gain fame
[10:32:28] [spoiler]: If you don't have capacity for [new] immigrants, then let those immigrants fend for themselves. Did they think that coming to a new country would suddenly turn their life into sunshines and rainbows? Also, immigrants should have a period of time for how long you can accommodate them, say 1 year, by which they have to leave the accommodation. I think 1 year is enough to find a job and move to a low-rent
[10:32:52] yorickpeterse: doertedev: this doesn't really seem Ruby related
[10:33:05] tiagonobre: has joined #ruby
[10:33:05] adaedra: [spoiler]: the ones who live in appartements are not the problem
[10:33:20] [spoiler]: yorickpeterse: you have no idea how much we sound like hypocrites right now LOL
[10:33:33] doerteDev: yorickpeterse: well i have a ruby toolchain there anyways so...
[10:34:03] adaedra: [spoiler]: and how do you control how long they last?
[10:34:14] yorickpeterse: doertedev: Sure, but the nginx part isn't really related. Either way, I don't think there's something ready made that can do that
[10:34:15] lucyinthesky: has left #ruby: ("Leaving")
[10:34:22] yqt: has joined #ruby
[10:34:26] doerteDev: yorickpeterse: that's why I'm asking :)
[10:34:30] [spoiler]: adaedra: How long what lasts? The temp accommodation
[10:34:51] yorickpeterse: [spoiler]: eh, I'd disagree
[10:34:56] yorickpeterse: (re hypocrites)
[10:35:07] yorickpeterse: This isn't some black and white topic where you're either right or wrong
[10:35:24] yorickpeterse: In fact, no matter how controversial, all answers are correct
[10:35:34] adaedra: [spoiler]: how long they have been on ground
[10:35:53] [spoiler]: yorickpeterse: No, I mean we sound like hypocrites because we told him this wasn't ruby related (like this topic is :P)
[10:36:10] [spoiler]: his question wasn't ruby related*
[10:36:12] doerteDev: yorickpeterse: i really thought i have asked in #rubyonrails sorry :P
[10:36:17] adaedra: Also, there's another problem, where one will come, succeed to implant, and then "Well now I'll make my whole family come"
[10:36:22] michael_mbp: has joined #ruby
[10:36:22] yorickpeterse: it's quiet otherwise anyway
[10:36:41] yorickpeterse: adaedra: that's just a matter of making immigration policies more strict
[10:36:53] doerteDev: [spoiler]: I cannot comment on this topic since i'm german
[10:36:58] yorickpeterse: it's a policy that makes sense in theory, but in practise is all too easy to abuse
[10:37:19] [spoiler]: adaedra: No, I mean. If they register as immigrants, give them 1 year to implant, if they fail, they can go back, or sleep on a park bench. w/e
[10:37:37] [spoiler]: if they do implant, then who cares if they bring their family?
[10:37:41] doerteDev: my gov. is stupid enough that in eastern germany we have whole cities where basically noone lives they are like died out. But they keep on stacking immigrants into newly build facilities which are stacked too tight anyways
[10:38:05] lxsameer_: has joined #ruby
[10:38:12] doerteDev: in cities with a too large amount of ppl anyways. Like munich.
[10:38:35] [spoiler]: doertedev: Croatia has problems with ghost-towns, or where population in some big-ish villages and towns is < 50 people. It's mostly after the war we had with Serbia, though
[10:38:59] adaedra: [spoiler]: >implying they follow the rules
[10:39:09] corpsicle: makes me think of resident evil 4
[10:39:17] [spoiler]: adaedra: if they don't follow the rules, then they can sleep on a bench
[10:39:37] doerteDev: yeah those sleep-on-a-benchers are breaking into houses where I live
[10:40:08] adaedra: [spoiler]: that's already what they do
[10:40:09] yorickpeterse: ok lets move this to #ruby-offtopic now :P
[10:40:10] [spoiler]: Arrest them and bullet to the head; they technically exist anyway
[10:40:17] yorickpeterse: WEOW WEOW WEOW OFFTOPIC POLICE
[10:40:44] abdulrehman: has joined #ruby
[10:40:46] adaedra: [spoiler]: http://i0.wp.com/lepointsur.com/wp-content/uploads/2015/05/migrants-em.jpg
[10:41:07] yorickpeterse: also keep it civilized while I'm out nomming lunch
[10:42:57] _blizzy_: has joined #ruby
[10:43:19] halcyone3: has joined #ruby
[10:43:43] rikkipitt: has joined #ruby
[10:44:34] doerteDev: has left #ruby: ()
[10:47:58] rodfersou: has joined #ruby
[10:48:21] bodgix: has joined #ruby
[10:51:00] _blizzy_: has joined #ruby
[10:51:13] einarj: has joined #ruby
[10:52:24] sylvain31: has joined #ruby
[10:55:14] abdulrehman: quick question please; I am doing the following Dir.open(YC_POLLING_FOLDER).each do |file| end however the function also returns the '.' and '..' which I want to skip, any advice?
[10:55:30] hotpancakes: has joined #ruby
[10:55:59] norc: Are there any other ways to access environment variables short of the ENV hash?
[10:56:08] adaedra: next if file == '.' || file == '..' # abdulrehman
[10:56:17] suchness: Dir.open(File.join(YC_POLLING_FOLDER, "*.proper_ext"))
[10:56:23] ytti: norc, you peaked my curiosity, why you'd need another method?
[10:56:30] ytti: norc, i guess you can always fork shell and query there
[10:56:36] stoodfarback: suchness: Try this:
[10:56:47] stoodfarback: Dir.new(dir).each do |entry|
[10:56:47] stoodfarback: next if entry == "." || entry == ".."
[10:57:00] suchness: stoodfarback: That was abdulrehman's question
[10:57:11] norc: ytti: Oh I just want to make sure Im not forgetting something.
[10:57:16] stoodfarback: Ah, yes, my bad.
[10:57:54] ytti: next if %w( . .. ).include? entry
[10:58:02] ashleyhindle: 'next if' is like if() { continue; } ?
[10:58:03] ytti: i like this better, as it's easier to extend
[10:58:26] norc: Im not sure whether I should start disliking the "foo if bar" kind of if statements...
[10:58:26] anisha_: has joined #ruby
[10:58:41] abdulrehman: adaedra: Yah, I thought of a simple logic, just thougth there is a method to get files only back
[10:59:00] [spoiler]: ashleyhindle: `expression1 if expression2` is the same as `if expression2; expression1; end;`
[10:59:03] SebastianThorn: dont forget dirs
[10:59:05] suchness: abdulrehman You can also use the Pathname class, it handles a lot of that stuff and is superiour to Dir and File in a lot of ways.
[10:59:05] stoodfarback: norc: I dislike them in most cases, with the exception of control flow. Ie, `next if` or `return if`
[10:59:06] adaedra: abdulrehman: files only is different
[10:59:07] SebastianThorn: next if File.directory? file
[10:59:14] ashleyhindle: [spoiler]: Cheers ears!
[10:59:56] jbw: has joined #ruby
[10:59:58] dumdedum: has joined #ruby
[11:00:43] abdulrehman: suchness: can you please forward me the docs for that?
[11:00:55] abdulrehman: adaedra: not sure what you mean
[11:01:02] bruno-: has joined #ruby
[11:02:03] suchness: abdulrehman: http://ruby-doc.org/stdlib-1.9.3/libdoc/pathname/rdoc/Pathname.html
[11:02:05] joonty: has joined #ruby
[11:02:31] [spoiler]: norc, stoodfarback I use them when using if-end would cause too many LOCs for what it needs to do. I see it as `if (bar) foor;` from C
[11:03:00] adaedra: abdulrehman: excluding . and .. is not the same as including only files
[11:03:01] abdulrehman: suchness: many thanks
[11:03:22] abdulrehman: adaedra: oh ok I understand what you mean
[11:03:33] [spoiler]: there can be directories or symlinks
[11:03:39] [spoiler]: in the dir you're reading from
[11:03:49] stoodfarback: [spoiler]: in those cases I prefer `exp(1) && exp(2)` instead of `exp(2) if exp(1)`
[11:04:09] stoodfarback: [spoiler]: But it's a style thing.
[11:04:13] stoodfarback: Valid either way.
[11:05:30] [spoiler]: stoodfarback: I agree that it is definitely a style thing, but `do_something if something_else` reads nicer, IMO.
[11:05:33] GitGud: has joined #ruby
[11:05:36] Violentr: has joined #ruby
[11:05:55] Macaveli: has joined #ruby
[11:07:34] da3mian: has joined #ruby
[11:07:42] conor_: has joined #ruby
[11:08:27] stoodfarback: Well, with a real example:
[11:08:27] stoodfarback: File.exist?(pid) && Process.kill(0, File.read(pid).to_i)
[11:08:27] stoodfarback: Process.kill(0, File.read(pid).to_i) if File.exist?(pid)
[11:08:27] stoodfarback: The first reads nicer to me, since it's left-to-right, like most things in ruby (in fact... is there anything else which is right-to-left?)
[11:08:36] phutchins: has joined #ruby
[11:08:50] norc: [spoiler]: I think it can hinder code readability since the test whether a piece of code is executed comes *after* the code.
[11:09:26] anisha__: has joined #ruby
[11:10:12] [spoiler]: norc: Ofc, that's why you use it for simple thingd. stoodfarback: I'd use if-end in the example you provided. I guess, i do it depending on how long the lines gets. I don't like long, dense lines
[11:11:17] jhass: meh, I hate &&/and/||/or for control flow, rather spend five lines
[11:11:24] ljarvis: "send_emails if subscribed?" reads way better than "subscribed? && send_emails"
[11:11:27] [spoiler]: This is a good example: `return if !something.valid?`, this is a bad example: `jesus_fuck_i_am_one_long_expression if oh_bitch_youaint_seen_long_yet_I_am_the_longest_of_them_all`
[11:11:48] ljarvis: [spoiler]: that's a bad example because we have unless ;)
[11:11:58] [spoiler]: ljarvis: oh indeed
[11:12:06] norc: stoodfarback: Yes there are some abstract libraries that turn the logic around. But not in the language grammar of Ruby itself.
[11:12:21] norc: stoodfarback: ActiveRecord immediately comes to mind for example
[11:12:26] jhass: if it gets too long just do a regular if/unless, no reason to use modifier- everywhere the body is a single expression
[11:12:27] stoodfarback: [spoiler]: Makes sense. Like I mentioned above, I do like that form for control flow (return, next, break).
[11:12:33] [spoiler]: ljarvis: I use unless when I randomly remember it exists, lol
[11:12:39] [spoiler]: which is rarely
[11:13:01] stoodfarback: norc: wut? Yes it is.
[11:13:16] stoodfarback: norc: Plain ruby.
[11:14:53] hotpancakes: has joined #ruby
[11:15:38] christophe971: has joined #ruby
[11:16:38] omegamike: has joined #ruby
[11:18:19] [spoiler]: writing unit tests is so boring
[11:18:56] carlosoliveira: has joined #ruby
[11:20:32] shevy: yeah [spoiler]
[11:21:06] clad_fraug: has joined #ruby
[11:21:09] codecop: has joined #ruby
[11:23:50] pawnbox: has joined #ruby
[11:25:55] dgutierrez1287: has joined #ruby
[11:26:56] dumdedum: has joined #ruby
[11:27:27] sdwrage: has joined #ruby
[11:29:17] northfurr: has joined #ruby
[11:29:18] sameerynho: has joined #ruby
[11:30:38] skade: has joined #ruby
[11:31:42] [k-: write type signatures instead
[11:32:51] ferhaty: has joined #ruby
[11:33:11] KnowledgeOwl: has joined #ruby
[11:34:40] ldnunes: has joined #ruby
[11:35:42] tmtwd: has joined #ruby
[11:35:47] Oka: has joined #ruby
[11:36:02] shevy: that would no longer br uby
[11:37:09] conor_: has joined #ruby
[11:37:34] ndrei: has joined #ruby
[11:40:04] northfurr: has joined #ruby
[11:40:16] mcgain: has joined #ruby
[11:40:33] [k-: i bet shevy don't write no tests
[11:40:47] pawnbox: has joined #ruby
[11:40:55] suchness: I don't write no tests, and I hate myself for it.
[11:41:20] suchness: Well future me hates present me.
[11:41:25] j4cknewt: has joined #ruby
[11:41:34] suchness: Present me cares vary little about future me.
[11:41:39] suchness: We agree to live in the moment.
[11:41:50] adaedra: tbh, present me hates present me when I write tests.
[11:41:59] shevy: [k- that is true; however had I do test too
[11:42:33] adaedra: but future me will like present me to have written tests
[11:42:45] shevy: there are different things that can be tested. One thing I have to test is to make current functionality available in the future too, in the event that I end up rewriting something
[11:42:46] adaedra: and also hate him for writing tests badly
[11:43:18] senayar: has joined #ruby
[11:44:24] KnowledgeOwl: has joined #ruby
[11:44:43] but3k4: has joined #ruby
[11:45:04] aidarbek: has joined #ruby
[11:45:13] sinkensabe: has joined #ruby
[11:45:35] FastJack: has joined #ruby
[11:46:25] KnowledgeOwl: has joined #ruby
[11:47:09] meph: has joined #ruby
[11:47:14] omegamike: has joined #ruby
[11:47:18] shevy: https://pubchem.ncbi.nlm.nih.gov/pug/pughelp.html
[11:47:25] shevy: "PUG takes no URL arguments; all communication with PUG is through XML."
[11:47:40] flughafen: wtf is the point of that
[11:48:01] flughafen: that reminds me of libvirt and taking only xml arguments in some cases
[11:48:16] [k-: .______________.
[11:52:22] KnowledgeOwl: has joined #ruby
[11:53:22] KnowledgeOwl: has joined #ruby
[11:53:57] jbw: has joined #ruby
[11:54:06] [spoiler]: I thought this was some joke about pugs at first, shevy
[11:54:07] einarj: has joined #ruby
[11:54:36] shevy: flughafen I guess I have to use XML again in order to use such remote APIs :)
[11:54:48] [k-: if anything, adaedra should not be allowed to sit
[11:54:54] bmurt: has joined #ruby
[11:55:16] [spoiler]: [k- yeah, dance instead
[11:56:05] shevy: sexy french dance
[11:56:23] KnowledgeOwl: has joined #ruby
[11:56:53] jimms: has joined #ruby
[11:57:40] Rinzlit: shevy is it hard to setup an api and transfer the data in XML format o-o?
[11:59:26] samdunne: has joined #ruby
[11:59:50] sdothum: has joined #ruby
[12:01:07] shlomo: has joined #ruby
[12:01:24] KnowledgeOwl: has joined #ruby
[12:02:19] shevy: I hate XML
[12:03:38] GeissT: has joined #ruby
[12:03:48] Muhannad: has joined #ruby
[12:04:32] fanocksa: has joined #ruby
[12:04:43] Muhannad: has joined #ruby
[12:04:48] adaedra: has joined #ruby
[12:05:51] senayar: has joined #ruby
[12:06:07] shevy: its verbosity is to love
[12:06:33] terlar: has joined #ruby
[12:07:15] [k-: shevy loves java thrice as much as he loves xml
[12:07:26] KnowledgeOwl: has joined #ruby
[12:08:21] msnyon: has joined #ruby
[12:08:32] shevy: at least java is useful for something
[12:09:22] devoldmx: has joined #ruby
[12:10:28] rideh: has joined #ruby
[12:11:24] KnowledgeOwl: has joined #ruby
[12:12:03] Ropeney: has joined #ruby
[12:12:52] AlexRussia_: has joined #ruby
[12:12:57] basmoura: has joined #ruby
[12:13:05] joonty: has joined #ruby
[12:15:22] KnowledgeOwl: has joined #ruby
[12:18:26] KnowledgeOwl: has joined #ruby
[12:21:26] KnowledgeOwl: has joined #ruby
[12:21:30] pawnbox: has joined #ruby
[12:21:38] decoponio: has joined #ruby
[12:21:48] Macaveli: has joined #ruby
[12:22:45] GeissT_: has joined #ruby
[12:23:23] KnowledgeOwl: has joined #ruby
[12:23:27] lapide_viridi: has joined #ruby
[12:24:39] stef204: has joined #ruby
[12:24:40] sanguisdex: xml should go the way of the buffalo and be replaced with yml or json
[12:24:54] allcentury: has joined #ruby
[12:25:29] apeiros: yml? seems to me like you're still on DOS 6.22?
[12:25:35] bruno-: has joined #ruby
[12:26:24] yorickpeterse: Javascript is the new configuration language
[12:26:25] shevy: I like buffaloes more than XML
[12:26:51] yorickpeterse: write all your config files using Gulp/burp/whatever build system JS people use today
[12:27:19] GeissT: has joined #ruby
[12:27:24] CatMartyn: has joined #ruby
[12:28:46] devoldmx: has joined #ruby
[12:29:00] banister: has joined #ruby
[12:29:05] devoldmx_: has joined #ruby
[12:29:15] jeremy04: has joined #ruby
[12:30:36] lannonbr: has joined #ruby
[12:31:07] jbw_: has joined #ruby
[12:31:07] devoldmx: has joined #ruby
[12:34:24] KnowledgeOwl: has joined #ruby
[12:35:30] pawnbox: has joined #ruby
[12:35:35] ndrei: has joined #ruby
[12:36:30] waxjar: when should I prefer minitest spec over minitest unit tests?
[12:36:45] jtdoncas: has joined #ruby
[12:36:49] yorickpeterse: whenever you prefer the spec writing style
[12:36:54] yorickpeterse: over the unit test style
[12:37:43] waxjar: there's not really a reason to use one over the other?
[12:38:02] yorickpeterse: No, it's just a different writing style
[12:38:26] waxjar: cool, thx
[12:38:32] tkuchiki: has joined #ruby
[12:39:14] yorickpeterse: oh great, some asshole yanked net-ssh 2.10.0
[12:39:34] yorickpeterse: yet for some reason bundler keeps using it
[12:40:27] KnowledgeOwl: has joined #ruby
[12:40:32] _blizzy_: has joined #ruby
[12:41:27] KnowledgeOwl: has joined #ruby
[12:41:48] jimms: has joined #ruby
[12:42:05] chouhoulis: has joined #ruby
[12:42:29] victortyau: has joined #ruby
[12:43:13] sanguisdex: apeiros: yml makes a great key low syntax requirement key pair value system for config files.
[12:43:25] lele|w: has joined #ruby
[12:43:32] quimrstorres: has joined #ruby
[12:43:38] yorickpeterse: now in English
[12:43:44] Tempesta: has joined #ruby
[12:45:15] sdwrage: has joined #ruby
[12:45:25] KnowledgeOwl: has joined #ruby
[12:46:21] bmurt: has joined #ruby
[12:46:43] umgrosscol: has joined #ruby
[12:46:51] ljarvis: in English: yaml is awful
[12:47:40] tkuchiki: has joined #ruby
[12:48:27] KnowledgeOwl: has joined #ruby
[12:48:42] hotpancakes: has joined #ruby
[12:48:43] _blizzy_: has joined #ruby
[12:49:04] atomical: has joined #ruby
[12:49:27] chouhoulis: has joined #ruby
[12:50:24] sgambino: has joined #ruby
[12:50:43] jriese: has joined #ruby
[12:50:51] sanguisdex: I love the snark of this channel
[12:50:55] rodfersou: has joined #ruby
[12:52:30] DanielI: has joined #ruby
[12:53:23] KnowledgeOwl: has joined #ruby
[12:53:45] erowlin: has joined #ruby
[12:54:59] einarj: has joined #ruby
[12:55:35] sinkensabe: has joined #ruby
[12:55:45] leat: has joined #ruby
[12:56:24] KnowledgeOwl: has joined #ruby
[12:56:52] jbwiv: has joined #ruby
[12:57:36] Scroff: If I have something like this:
[12:57:40] Scroff: array.each do |a|
[12:57:42] Scroff: something
[12:57:44] Scroff: end if a == 'foo'
[12:57:49] Scroff: What does that last if do?
[12:58:12] Scroff: Does it skip the block if it's true?
[12:58:23] suchness: scroff: yes
[12:58:25] erowlin: has joined #ruby
[12:58:32] ytti: if it's true, it does not skip it
[12:58:34] suchness: scroff: Or no rather
[12:58:36] ytti: if it's false, it skips it
[12:58:48] suchness: scroff: Not the best programming
[12:58:57] ytti: i see no problem in it
[12:58:57] Mon_Ouie: And it doesn't skip "the block", it skips the call to array.each
[12:59:40] suchness: ytti: You don't see a problem because it's only three lines, if that condition was more it would be very unreadable and hard to debug.
[12:59:57] suchness: It's silly to put conditionals like that at the end.
[13:00:13] ferhaty: has joined #ruby
[13:00:18] thiagovsk: has joined #ruby
[13:00:25] fanocksa: has joined #ruby
[13:00:32] ytti: suchness, i disagree
[13:00:34] khebbie_: has joined #ruby
[13:00:45] suchness: ytti: Then we will agree to disagree.
[13:00:54] howdoicomputer: has joined #ruby
[13:02:01] ndrei: has joined #ruby
[13:03:48] jbw_: has joined #ruby
[13:04:24] yorickpeterse: scroff: it will result in an error
[13:04:35] yorickpeterse: unless `a` is also defined outside of array.each do ... end
[13:04:53] yorickpeterse: >> [10, 20, 30].each { |num| } if num == 10
[13:04:53] Guest50: has joined #ruby
[13:04:54] ruboto: yorickpeterse # => undefined local variable or method `num' for main:Object (NameError) ...check link for more (https://eval.in/414725)
[13:05:18] erowlin: has joined #ruby
[13:06:48] decoponio: has joined #ruby
[13:06:57] jeremy04: has joined #ruby
[13:09:11] radgeRayden: has joined #ruby
[13:09:34] Tempesta: has joined #ruby
[13:09:59] Iskarlar: has joined #ruby
[13:10:34] DanielI: has joined #ruby
[13:11:24] kirun: has joined #ruby
[13:11:26] omegamike: has joined #ruby
[13:13:09] Rinzlit: hey guys random question
[13:13:32] Rinzlit: If I make my program collect data from something else if someone requests something from me and I make them grab the information
[13:13:49] Rinzlit: I can't get in trouble if they do something illegal right?
[13:14:14] yorickpeterse: Be more specific
[13:14:34] Rinzlit: Ermm best way to describe is like an iframe to someone elses website
[13:14:36] yorickpeterse: If you're referring to something like scraping, this is a gray area
[13:14:39] Rinzlit: and I build it into what I'm doing
[13:14:40] yorickpeterse: at least in the EU
[13:15:04] yorickpeterse: For stuff like this it really is best to consult somebody or some entity with actual legal expertise
[13:15:12] spleeze: has joined #ruby
[13:16:42] Rinzlit: lol... I need to make friends with a lawyer to ask them random hypothetical questions
[13:16:49] yorickpeterse: or just pay them money
[13:17:04] yh_: has joined #ruby
[13:17:07] Rinzlit: I don't think I have that much money, I only have a few grand
[13:19:53] Cust0sLim3n: has joined #ruby
[13:20:02] jbwiv: has joined #ruby
[13:20:05] whippythellama: has joined #ruby
[13:20:21] abdulrehman: sorry but another firey quick question, currently I am doing the following, "some_string_to_read".index('_') and returns the first occurrence of it, any way I can get the second one
[13:20:42] abdulrehman: returns the position*
[13:21:19] stoodfarback: abdulrehman: #index takes a second argument for offset, so if you put the first index there, it should find the second occurance.
[13:21:31] abdulrehman: ok, one sec let me try
[13:21:43] havenwood: has joined #ruby
[13:22:05] abdulrehman: not sure what I am doing wrong but it does not work,
[13:22:15] stoodfarback: abdulrehman: Ah, you may need to do first index + 1. I'm not sure how the offset is used.
[13:22:15] centrx: has joined #ruby
[13:23:47] bruno-: has joined #ruby
[13:24:07] abdulrehman: I am reading the docs, and I am using it the same way it is pointing out, but for some bizzare reason, not working
[13:24:14] abdulrehman: (I am sure this reason is me) lol
[13:24:22] abdulrehman: index(substring [, offset])
[13:24:22] ljarvis: abdulrehman: str.index("_", str.index("_")+1)
[13:24:33] juanca_: has joined #ruby
[13:24:44] allcentury: has joined #ruby
[13:24:48] devdazed: has joined #ruby
[13:24:54] jerius: has joined #ruby
[13:25:13] ljarvis: > str = "some_string_to_read"; str.index("_", str.index("_")+1)
[13:25:18] abdulrehman: ljarvis: awesome that works
[13:25:21] erowlin: has joined #ruby
[13:25:30] abdulrehman: so basically the offset is a block?
[13:25:39] Guest50: has joined #ruby
[13:25:47] ljarvis: the offset is where searching from should start
[13:25:59] ljarvis: index *always* returns the first occurance *from* the offset
[13:26:01] Yiota: has joined #ruby
[13:26:28] abdulrehman: I see, I thought it would be the occurrence number as in SQL ,
[13:26:42] abdulrehman: that's great, thank you ljarvis so very much
[13:26:46] abdulrehman: and stoodfarback
[13:27:57] ljarvis: abdulrehman: if you want more than the second index, you probably want a loop but for the second that code should be fine
[13:28:00] startupality: has joined #ruby
[13:28:32] startupality: nil is getting converted to 0.0 by using to_f, is there any similar method which has a different behaviour in this use case?
[13:28:42] djcp: has joined #ruby
[13:28:47] ljarvis: startupality: what do you want?
[13:28:59] ljarvis: the float representation of nil in Ruby is 0.0
[13:29:19] ljarvis: "different behaviour" is vague
[13:29:35] abdulrehman: thank you ljarvis, that's excatly what I need to do.... thank you very much
[13:29:48] hinbody: has joined #ruby
[13:30:34] startupality: Im using the Money gem, so I need to convert the values from the database by using to_f for example.By doing this nil gets converted to zero, but I want the nil to be like the ???undefined value???.
[13:30:41] JoshL: has joined #ruby
[13:31:09] ljarvis: startupality: that's still vague, `nil` *is* "undefined value". Do you want it to raise an error?
[13:31:17] Macaveli: has joined #ruby
[13:31:20] hotpancakes: has joined #ruby
[13:31:25] ljarvis: also, you shouldn't use floats for money
[13:31:28] ljarvis: ever ever ever
[13:31:43] yorickpeterse: startupality: if you want some other value you'll have to write your own logic
[13:31:59] yorickpeterse: this can be as simple as `value = input ? input.to_f : 'undefined value'
[13:32:09] yorickpeterse: also yes, don't use floats for money
[13:32:28] yorickpeterse: use either integers and store data in the most accurate form (e.g. cents) or use a rational of sorts
[13:32:33] yorickpeterse: or a bignum if you need it
[13:32:44] ljarvis: if you in all kinds of $$$
[13:33:45] yorickpeterse: ljarvis: lrn2english
[13:33:53] erowlin: has joined #ruby
[13:34:14] ljarvis: my sentence was intentionally written as you see it
[13:34:43] mistermocha: has joined #ruby
[13:34:53] govg: has joined #ruby
[13:37:05] govg: has joined #ruby
[13:37:31] rbennacer: has joined #ruby
[13:39:54] Hounddog: has joined #ruby
[13:39:59] conor_: has joined #ruby
[13:40:06] malconis: has joined #ruby
[13:42:34] sevenseacat: has joined #ruby
[13:43:48] quimrstorres: has joined #ruby
[13:44:23] jordanm: has joined #ruby
[13:45:04] Hounddog: has joined #ruby
[13:46:09] krz: has joined #ruby
[13:46:33] freerobby: has joined #ruby
[13:47:01] Vile`: has joined #ruby
[13:48:39] tylersmith: has joined #ruby
[13:49:01] da3mian: has joined #ruby
[13:50:12] shevy: startupality you could modify that behaviour in the Money gem, where it uses .to_f
[13:50:45] chouhoulis: has joined #ruby
[13:51:12] quimrstorres: has joined #ruby
[13:52:53] paulcsmith: has joined #ruby
[13:53:05] yorickpeterse: I'm sure that won't have any side effects
[13:53:48] rodfersou: has joined #ruby
[13:54:20] phutchins: has joined #ruby
[13:54:33] shevy: as if other modifications don't have side effects
[13:54:50] myztic: has left #ruby: ("Leaving")
[13:54:50] Alayde: has joined #ruby
[13:55:16] Alayde: has joined #ruby
[13:56:12] OrbitalKitten: has joined #ruby
[13:57:52] dopamean_: has joined #ruby
[13:58:01] leat: has joined #ruby
[13:58:07] monoprotic: has joined #ruby
[13:58:34] L8: has joined #ruby
[13:59:33] dfrakk: has joined #ruby
[13:59:56] joonty: has joined #ruby
[14:00:24] dfrakk: has joined #ruby
[14:01:44] symm-: has joined #ruby
[14:02:36] shevy: is this a good name for a project: http://bevacqua.github.io/dragula/
[14:04:50] centrx: Well done
[14:05:08] erowlin: has joined #ruby
[14:08:50] deepu: has joined #ruby
[14:09:31] fenjamin: has joined #ruby
[14:09:37] swills: has joined #ruby
[14:09:51] fenjamin: can we put irb in irc?
[14:10:09] maloik: >> puts "like this?"
[14:10:10] ruboto: maloik # => like this? ...check link for more (https://eval.in/414834)
[14:10:37] centrx: >> "I am a %s" % "robot"
[14:10:38] ruboto: centrx # => "I am a robot" (https://eval.in/414835)
[14:10:44] einarj: has joined #ruby
[14:10:56] ta: has joined #ruby
[14:11:12] bronson: has joined #ruby
[14:11:38] fenjamin: >> class Test
[14:11:39] ruboto: fenjamin # => /tmp/execpad-4d58935ec1a1/source-4d58935ec1a1:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/414836)
[14:11:51] yorickpeterse: fenjamin: you have to put everything in 1 message though
[14:11:59] fenjamin: i like that
[14:12:18] fenjamin: ok i will play with this for 20 minutes.
[14:12:23] brain_shim: has joined #ruby
[14:12:27] yorickpeterse: You're not to abuse it in this channel
[14:12:30] tmtwd: has joined #ruby
[14:12:34] yorickpeterse: Use IRB locally instead
[14:12:38] yorickpeterse: or Pry or something similar
[14:12:45] adaedra: ?experiment
[14:12:45] ruboto: Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
[14:13:01] yorickpeterse: should've known we had that stored in the bot
[14:13:06] adaedra: woohoo, got it at the first time
[14:13:26] shevy: you are the best adaedra
[14:14:21] Iskarlar: has joined #ruby
[14:14:33] adaedra: I'll quote that for next time any one of you are mean to me
[14:15:07] ruboto: don't be mean to adaedra
[14:15:35] gregf: has joined #ruby
[14:15:40] apeiros: I think somebody should revoke my fact adding rights from ruboto???
[14:15:48] apeiros: then again, I don't remember who somebody was???
[14:15:52] Darkwater`: has joined #ruby
[14:15:58] adaedra: ?somebody to love
[14:15:58] ruboto: to, I don't know anything about somebody
[14:15:59] shevy: I think it was jhass... unless he was nobody
[14:16:10] yqt: has joined #ruby
[14:16:10] yorickpeterse: well he is a nobody
[14:16:12] fenjamin: where can i learn about ruboto?
[14:16:14] yorickpeterse: ( ???_???) ( ???_???)>??????-??? (??????_???)
[14:16:31] adaedra: fenjamin: on the ruby community web site, see topic
[14:16:31] sarkyniin: has joined #ruby
[14:17:04] yorickpeterse: y u no open sauce ruboto
[14:17:16] hotpancakes: has joined #ruby
[14:17:22] yorickpeterse: also that list of facts is not up to date
[14:17:25] podman: has joined #ruby
[14:17:42] ponga: has joined #ruby
[14:17:42] shevy: fenjamin the most useful part that it has are the >> calls to invoke ruby code; you can even use a specific version of ruby with it.. something like: 19>> puts 'hello world' ... or something like that, I don't remember the syntax offhand
[14:18:33] dopie: has joined #ruby
[14:19:17] fenjamin: oo baby. beautiful, i like this.
[14:19:39] fenjamin: a wealth of a resource
[14:20:23] yorickpeterse: fenjamin: check out Google, it's pretty sick too
[14:20:26] AlexRussia: has joined #ruby
[14:20:54] fenjamin: yeah the internet is a pretty great resource for learning how to program
[14:21:04] Torrieri: has joined #ruby
[14:21:04] Torrieri: has joined #ruby
[14:21:16] shevy: there are some good resources and some not so good ones
[14:21:17] erowlin: has joined #ruby
[14:21:25] shevy: sometimes people may adopt patterns that they can find on the www
[14:21:46] fenjamin: the internet is pretty good, gravel is not so good
[14:21:53] shevy: I think I kept on using ... YAML.load(File.read("bla.yml")) or so until I realized that there is YAML.load_file() - and I think I did not know because the former I saw on a website first
[14:22:21] shevy: or people following outdated guides to resolve problems
[14:22:42] shevy: some years ago RVM was the hype, nowadays you see people mention chruby
[14:23:45] erowlin: has joined #ruby
[14:24:48] fenjamin: ok today will be learning these resources because in learning programming, Mondays are Saturdays!
[14:25:24] clad_fraug: has left #ruby: ("Leaving")
[14:25:30] shevy: Caturdays!
[14:26:14] govg: has joined #ruby
[14:26:30] withnale__: has joined #ruby
[14:27:54] terlar: has joined #ruby
[14:28:50] erowlin: has joined #ruby
[14:29:38] joonty: has joined #ruby
[14:30:22] CorySimmons: has joined #ruby
[14:31:00] bigbadbear: has joined #ruby
[14:32:37] pawnbox: has joined #ruby
[14:34:25] JakFrist: has joined #ruby
[14:35:02] axl_: has joined #ruby
[14:35:21] tjohnson: has joined #ruby
[14:36:04] axl_: has left #ruby: ()
[14:36:09] conor_: has joined #ruby
[14:36:14] Rutix: has joined #ruby
[14:36:14] Rutix: has joined #ruby
[14:36:27] omfgtora: has joined #ruby
[14:36:57] bstrrm: has joined #ruby
[14:38:13] banister: has joined #ruby
[14:39:10] axl_: has joined #ruby
[14:39:21] alex88: has joined #ruby
[14:39:22] devoldmx: has joined #ruby
[14:39:24] choke: has joined #ruby
[14:39:48] mistermocha: has joined #ruby
[14:40:48] mary5030: has joined #ruby
[14:41:49] mary5030: has joined #ruby
[14:42:09] Shoutsid: has joined #ruby
[14:43:38] rippa: has joined #ruby
[14:44:29] chu: has joined #ruby
[14:47:26] leat: has joined #ruby
[14:49:58] nohminn: has joined #ruby
[14:52:30] L8: has joined #ruby
[14:54:56] jeremy04_: has joined #ruby
[14:56:28] hotpancakes: has joined #ruby
[14:57:10] skade: has joined #ruby
[14:57:34] juanca_: has joined #ruby
[15:00:39] bigbadbear: has joined #ruby
[15:02:47] dorei: has joined #ruby
[15:03:25] erowlin: has joined #ruby
[15:05:21] Guest50: has joined #ruby
[15:06:17] ramfjord: has joined #ruby
[15:07:06] chills42: has joined #ruby
[15:09:37] youngbaks: has joined #ruby
[15:09:40] mdavid613: has joined #ruby
[15:09:54] riotjones: has joined #ruby
[15:10:59] dkphenom: has joined #ruby
[15:13:20] einarj: has joined #ruby
[15:14:04] gambl0re: has joined #ruby
[15:15:18] startupality: has joined #ruby
[15:16:15] brain_shim: has joined #ruby
[15:16:28] tmtwd: has joined #ruby
[15:17:34] yeticry: has joined #ruby
[15:17:43] leat: has joined #ruby
[15:17:55] joonty: has joined #ruby
[15:18:09] djstorm: has joined #ruby
[15:20:48] nohminn: has joined #ruby
[15:21:05] erowlin: has joined #ruby
[15:21:11] Alina-malina: has joined #ruby
[15:21:15] banister: has joined #ruby
[15:22:40] jeremy04: has joined #ruby
[15:23:41] codecop: has joined #ruby
[15:23:59] Coldblackice: has joined #ruby
[15:26:25] StevenXL: has joined #ruby
[15:27:11] higuys: has joined #ruby
[15:28:15] yh: has joined #ruby
[15:28:22] jonee: has joined #ruby
[15:29:11] Channel6: has joined #ruby
[15:30:03] govg: has joined #ruby
[15:30:34] mclee: has joined #ruby
[15:31:12] saddad: has joined #ruby
[15:34:13] pdoherty: has joined #ruby
[15:35:07] carlosoliveira: has joined #ruby
[15:35:08] jonee: has joined #ruby
[15:35:50] hotpancakes: has joined #ruby
[15:36:01] conor_: has joined #ruby
[15:37:16] startupality: has joined #ruby
[15:39:05] leat: has joined #ruby
[15:39:15] silkfox: has joined #ruby
[15:42:10] bruno-: has joined #ruby
[15:44:23] mistermocha: has joined #ruby
[15:44:52] khebbie: has joined #ruby
[15:46:45] dfockler: has joined #ruby
[15:47:31] rehat: has joined #ruby
[15:47:44] TomyLobo: has joined #ruby
[15:47:47] johnatho_: has joined #ruby
[15:48:13] dr3w: has joined #ruby
[15:48:46] nonparfumee: has joined #ruby
[15:50:54] nohminn: has joined #ruby
[15:51:38] apeiros: sanguisdex: I was alluding to your use of yml instead of the proper yaml
[15:51:38] apeiros: you know, because only systems stuck in the 90's can't deal with .yaml
[15:51:57] TomyLobo: who needs yaml anyway :)
[15:52:07] adaedra: Yay, JSONx for everyone
[15:52:28] hobodave: has joined #ruby
[15:52:52] rideh^: has joined #ruby
[15:53:21] TomyLobo: adaedra, i like this tweet about it: https://twitter.com/rmlewisuk/status/514822727535185920
[15:53:33] ndrei: has joined #ruby
[15:53:38] adaedra: what's "tweet"
[15:53:41] tectonic: has joined #ruby
[15:53:55] TomyLobo: it's like an sms, except online
[15:54:02] centrx: adaedra, A limited form of telegraph
[15:54:23] adaedra: tititi tatata tititi
[15:54:35] j4cknewt: has joined #ruby
[15:55:54] TomyLobo: adaedra, so, do you want me to pastebin that tweet or should i paste it along with the original tweet that prompted it? i dont think that would fly well here, which is why i just linked it
[15:56:11] adaedra: TomyLobo: send me a telegram
[15:56:18] TomyLobo: that costs money
[15:56:41] adaedra: Technically, IRC costs money, you pay your ISP for Internet
[15:57:06] TomyLobo: yeah, but i have a flatrate so i dont pay more for using it more
[15:57:53] TomyLobo: sunk costs vs. prospective costs
[15:58:53] mdavid613: has joined #ruby
[15:59:39] pietr0: has joined #ruby
[16:01:06] lannonbr: has joined #ruby
[16:01:06] startupality: has joined #ruby
[16:01:51] luckyme: has joined #ruby
[16:02:04] tfitts: has joined #ruby
[16:03:22] amclain: has joined #ruby
[16:03:29] joonty: has joined #ruby
[16:03:54] havenwood: has joined #ruby
[16:05:58] tfitts: I'm trying to work with an EPL file (a printing language for thermal printers) in ruby. The file format is mostly plain text but it allows lines of binary data (for images). I'm trying to figure out an issue I'm having with them. I can create epl data from scratch in ruby that includes an image and it works fine. I can also take a base64 encoded epl I receive, decode it, and add plain text
[16:05:58] tfitts: to it and it works fine, but what I'm trying to do is take the epl I receive and add my image data to it. When I do this though I get an error Encoding::CompatibilityError (incompatible character encodings: ASCII-8BIT and UTF-8):
[16:06:52] TomyLobo: since it's a mixed format, you cant really rely on text mode
[16:07:20] tfitts: The epl I make myself each by adding text to an array and then I #join("\r\n"). each line I add has UTF-8 encoding. When I base64 decode and #split("\r\n"), it comes up as ascii 8-bit
[16:07:37] tfitts: if I try forcing to UTF-8 then it says it works but the resulting file doesn't end up printing anything
[16:08:11] TomyLobo: so are you trying to modify or to generate that file?
[16:08:44] tfitts: I'm trying to modify it (shipping labels from stamps.com or UPS)
[16:08:46] [Butch]: has joined #ruby
[16:09:47] quimrstorres: has joined #ruby
[16:09:48] hobodave: has joined #ruby
[16:09:49] EagleDelta: has joined #ruby
[16:10:03] Spami: has joined #ruby
[16:10:22] zenspider: you should be force encoding the IO as binary. if you're modifying the IO, you need your regexps and/or strings to ALSO be binary
[16:10:45] zenspider: you can't mix and match encodings
[16:11:09] troulouliou_div2: has joined #ruby
[16:12:19] ta: has joined #ruby
[16:13:15] joelataylor: has joined #ruby
[16:13:28] _blizzy_: has joined #ruby
[16:13:28] ndrei: has joined #ruby
[16:13:43] tfitts: zenspider: I'm just trying to figure out how to do binary regexps/strings
[16:13:53] mleung: has joined #ruby
[16:14:26] zenspider: you can either force encode them the way you did the IO, or you can set the file's internal encoding to binary via a magic encoding comment
[16:15:51] zenspider: so, in the top 2 lines, you can have a comment like: # encoding: BINARY
[16:16:15] basmoura_: has joined #ruby
[16:19:32] xcesariox: has joined #ruby
[16:20:15] _blizzy_: has joined #ruby
[16:20:42] einarj: has joined #ruby
[16:20:58] mdavid613: has joined #ruby
[16:22:26] tkuchiki: has joined #ruby
[16:22:47] snockerton: has joined #ruby
[16:23:12] icebourg: has joined #ruby
[16:24:08] icebourg: has joined #ruby
[16:24:10] gambl0re: has joined #ruby
[16:24:33] nohminn: has joined #ruby
[16:24:44] Hanmac: has joined #ruby
[16:25:15] paulcsmith: has joined #ruby
[16:25:40] MatthewsFace: has joined #ruby
[16:25:40] clocKwize: has joined #ruby
[16:26:06] ascarter: has joined #ruby
[16:28:21] rbennacer: has joined #ruby
[16:29:09] startupality: has joined #ruby
[16:30:34] polpak: has joined #ruby
[16:31:21] Cust0sLim3n: has joined #ruby
[16:33:54] pawnbox: has joined #ruby
[16:35:14] Maletor: has joined #ruby
[16:35:25] dr3w: has joined #ruby
[16:35:44] zenspider: man... the Class.inherited hook is fucking useless... I wish it wasn't triggered on class open when NOTHING about the class is known
[16:36:03] bricker: has joined #ruby
[16:36:06] zenspider: It'd be SO much more useful if there was a trigger on class close
[16:36:16] jhass: what about reopens?
[16:36:21] niemcu: has joined #ruby
[16:36:39] bb010g: has joined #ruby
[16:36:54] zenspider: still not very useful. ... I guess it depends on what you're trying to do
[16:37:19] zenspider: without a trigger on close, you'll always miss the last iteration of data
[16:37:51] jhass: the method_added might be more what you want perhaps?
[16:38:06] OrbitalKitten: has joined #ruby
[16:38:12] zenspider: nope. I need both
[16:38:57] zenspider: but the inherited hook can trigger before the class even has a name or anything
[16:39:19] mikecmpbll: has joined #ruby
[16:39:33] gambl0re: has joined #ruby
[16:39:57] arup_r: has joined #ruby
[16:40:19] zenspider: looking at: https://github.com/seattlerb/minitest-focus/issues/8
[16:40:22] devoldmx: has joined #ruby
[16:42:06] hotpancakes: has joined #ruby
[16:43:39] OrbitalKitten: has joined #ruby
[16:45:32] jhass: does describe and/or it return the class/method name/object/anything useful at all?
[16:45:37] j4cknewt: has joined #ruby
[16:45:38] gwl_: has joined #ruby
[16:46:47] icebourg: has joined #ruby
[16:46:51] jhass: mmmh, nvm, focus describe do doesn't work as API either
[16:47:00] gambl0re: has joined #ruby
[16:47:31] jhass: well I guess you could do focus_describe do
[16:47:41] icebourg: has joined #ruby
[16:48:12] startupality: has joined #ruby
[16:48:22] mistermocha: has joined #ruby
[16:48:31] joelataylor: has joined #ruby
[16:48:53] mappou: has joined #ruby
[16:48:59] jgpawletko: has joined #ruby
[16:49:09] mappou: Anyone ever use Steve Losh's "t" ?
[16:49:30] mappou: I made my own gem version of it http://bit.ly/1DCRX3k
[16:49:31] dylannorthrup: has left #ruby: ("0.4.3")
[16:49:34] ruboto: Just ask your question, if anyone has or can, they will respond.
[16:49:40] jhass: though, too fast :P
[16:50:25] mappou: :p I doubt many have used it, I just found it useful so made a quick ruby version I could install on all my machines quickly
[16:50:30] mappou: It's yet another task managing app
[16:50:40] mappou: you've probably seen 100 of them
[16:51:46] mappou: Attempted to make a vim plugin for it as well, but my vim happens to die whenever it executes any ruby code
[16:52:12] apeiros: zenspider: but in your case, you know when you finished defining the class - when the describe block returns. no?
[16:52:59] shevy: mappou never heard of it
[16:53:16] towski_: has joined #ruby
[16:53:37] chabil: has joined #ruby
[16:54:07] zenspider: mappou: there's already a "t" gem
[16:55:09] zenspider: apeiros: yeah. not sure how that helps me
[16:55:22] zenspider: focus_describe isn't a bad idea
[16:56:00] SlopeTeBT: has joined #ruby
[16:56:08] LoBoGoL: has joined #ruby
[16:56:16] quimrstorres: has joined #ruby
[16:56:19] mappou: Yeah I made mine t.rb
[16:56:53] chills42: has joined #ruby
[16:58:11] j4cknewt_: has joined #ruby
[16:58:13] gambl0re: has joined #ruby
[17:00:35] tkuchiki: has joined #ruby
[17:00:40] tomphp_: has joined #ruby
[17:01:24] bronson: has joined #ruby
[17:03:26] pdoherty: has joined #ruby
[17:03:26] SlopeTeBT: www.cryptos-revolution.com OMG free Bitcoin and Money here!!!! www.cryptos-revolution.com
[17:03:39] zenspider: !stfu SlopeTeBT
[17:03:47] zenspider: !mute SlopeTeBT
[17:04:00] zenspider: !mute SlopeTeBT
[17:04:01] ruboto: +q SlopeTeBT!*@*
[17:04:01] ruboto: -o ruboto
[17:04:15] j4cknewt: has joined #ruby
[17:04:28] adaedra: I am disappoint
[17:05:18] pauly_oc: has joined #ruby
[17:05:54] nicechap: has joined #ruby
[17:06:28] einarj: has joined #ruby
[17:06:30] Cust0sLim3n: has joined #ruby
[17:06:40] dabradley: has joined #ruby
[17:06:58] zenspider: wierd... I have something that SHOULD work... and it even generates the right filter regexp as I did when I put focus on all the methods... but it runs nothing
[17:07:01] zenspider: I must have broken something else
[17:07:46] adaedra: You broke hope
[17:07:52] nateberkopec: has joined #ruby
[17:08:25] mappou: hope is gone
[17:08:44] zenspider: I'm not using inherited or method_added in minitest/spec... idgi
[17:08:52] zenspider: it's WAY too early for me. I can barely type
[17:09:33] chouhoulis: has joined #ruby
[17:09:46] pafin: has joined #ruby
[17:09:52] nicechap: hi guys, is ruby hard to learn compared to learning perl
[17:10:05] mbeasley: has joined #ruby
[17:10:07] ruboto: You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
[17:10:15] chouhoulis: has joined #ruby
[17:10:25] mbeasley: has left #ruby: ()
[17:10:30] nicechap: jhass, I am a perl programmer, but would like to make a switch to ruby and ruby on rails. not sure what would be the best strategy
[17:10:37] jackjackdripper: has joined #ruby
[17:10:42] nicechap: i now work at company as perl programmer...
[17:10:42] pafin: has joined #ruby
[17:10:43] adaedra: 1/ learn ruby
[17:10:44] nicechap: no ruby here
[17:11:04] adaedra: 2/ make some ruby programs to train
[17:11:05] jhass: https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-perl/
[17:11:14] nopc0de: has joined #ruby
[17:11:24] adaedra: 3/ like 1 and 2, but with rails
[17:11:26] BraddPitt: jhass please
[17:12:38] nicechap: hmm, jhass that sounds promising... claims ruby is idd easier
[17:12:51] JoshL: has joined #ruby
[17:12:58] nicechap: thanks adaedra too
[17:13:10] nicechap: hopefully can squeeze this in weekends..
[17:13:22] juanca_: has joined #ruby
[17:14:05] RegulationD: has joined #ruby
[17:14:19] icebourg: has joined #ruby
[17:14:52] nicechap: how does popularity of ruby compare to other languages such as python/perl
[17:15:02] blt: has joined #ruby
[17:15:11] nicechap: I see that ruby programmers appear to be in demand.
[17:15:14] jhass: ruby has a huge ecosystem
[17:15:32] blt: has left #ruby: ()
[17:15:38] jhass: I think relative popularity is fairly irrelevant at this point
[17:15:55] rickmasta: has joined #ruby
[17:16:09] nicechap: jhass, would you explain why
[17:16:12] mappou: Learn solve problems, doesn't matter what language you use
[17:16:21] eam: it really matters
[17:16:28] nicechap: mappou, I disagree with that a bit
[17:16:30] eam: (if you, say, want to earn money with programming)
[17:16:44] nicechap: perl is quite complex to solve problems sometimes
[17:16:44] mappou: I was hired for my second job with zero ruby experience and it was a pure ruby based stack
[17:16:53] mappou: Language doesn't matter, if you can write code you can learn any language
[17:17:13] j4cknewt: has joined #ruby
[17:17:21] alphaatom: has joined #ruby
[17:17:50] eam: mappou: that's not really true
[17:17:57] nicechap: mappou, you do have a point though, as in, learn to solve problems. but it doesnt disqualify the choice of the tools
[17:18:00] j4cknewt_: has joined #ruby
[17:18:03] nicechap: as in the choice of the language
[17:18:04] jhass: it's well above the threshold that you can get productive and don't have to build the basic wheels
[17:18:12] eam: it takes months to potentially years to get competent in a language
[17:18:19] eam: depending on the complexity of the environment
[17:18:28] ght: Question: I'm trying to optimize my ruby 2.2.2 app to ensure it executes as quickly as possible, I've seen some old guides for legacy versions of Ruby
[17:18:39] ght: does anyone have any tutorials on tips for speeding up Ruby execution?
[17:18:43] eam: some employers will be happy to hire entry level people (for a lot less money) with no skills in the toolsets they use -- but others will not
[17:18:49] ght: Or just general optimization techniques
[17:18:58] eam: and always, in all cases, applicable experience translates into cash money
[17:19:14] jhass: ght: https://github.com/evanphx/benchmark-ips https://github.com/JuanitoFatas/fast-ruby
[17:19:16] nicechap: jhass, 'well above the threshold' does that mean, easy to get productive relatively quickly?
[17:19:21] ght: jhass: Thank you
[17:19:42] spider-mario: has joined #ruby
[17:19:49] jhass: ght: also get a profiler to identify your hot code paths and bottlenecks
[17:19:51] mappou: It's true certain tools are better for certain jobs but as you pick up tools you will naturally start using the right ones for the right job
[17:20:17] jhass: ght: if your app is simple enough running with ruby -rprofile might give some insight already
[17:20:17] nicechap: mappou, yeh, it is indeed not black and white
[17:20:30] ght: jhass: Thank you kindly, great stuff.
[17:20:49] shevy: I forgot, when will a new ruby release happen? xmas?
[17:20:56] jhass: nicechap: yes
[17:21:53] nicechap: thanks jhass
[17:22:09] nicechap: I will practice, play with the language a bit in the coming weeks
[17:22:39] nicechap: the problem is, now having mid-level perl job, and then switch to ruby, probably will be a junior position
[17:22:50] jhass: nicechap: http://tryruby.org is nice to get familiar with the basic look and feel
[17:22:55] r_baron: has joined #ruby
[17:24:27] shevy: nicechap yay come to ruby man \o/
[17:24:51] nicechap: on my way! :)
[17:24:57] ivanskie: has joined #ruby
[17:25:12] stef204: has joined #ruby
[17:25:48] nopc0de: has joined #ruby
[17:25:59] tkuchiki: has joined #ruby
[17:26:04] Ox0dea: has joined #ruby
[17:26:08] juanca_: has joined #ruby
[17:26:12] Ox0dea: shevy: How do you forget a thing like that?
[17:26:28] BraddPitt: shevy do you have a day job working in ruby?
[17:26:35] shevy: Ox0dea I don't memorize release habits
[17:26:38] da3mian: has joined #ruby
[17:26:56] lagweezle: has joined #ruby
[17:27:11] nonparfumee: has joined #ruby
[17:27:18] Ox0dea: shevy: But matz & co. made it super-easy!
[17:27:21] shevy: BraddPitt sadly not really; I could use ruby ~14 months ago at a bioinformatics facility, but they were all like +10 years older than I was and mostly perl gurus, so all their ecosystem was perl, shell scripts and a bit of C
[17:28:54] twosevenzero: has joined #ruby
[17:28:57] willywos: has joined #ruby
[17:29:12] hotpancakes: has joined #ruby
[17:29:23] ytti: the anatomy of any old organization
[17:29:25] ytti: perl and c
[17:29:27] jstodberg: has joined #ruby
[17:29:31] Ox0dea: The anatomy of the Internet.
[17:29:34] ytti: good luck changing any of that
[17:29:44] ndrei: has joined #ruby
[17:29:54] Jackneill: has joined #ruby
[17:29:56] shevy: they had only ruby 1.9.3
[17:30:01] doosy: has joined #ruby
[17:30:11] slash_nick: shevy: there's a server we'd love to retire that only has 1.8.7
[17:30:19] ytti: 1.9.3 is survivable
[17:30:25] ytti: boxes i now use for work have 1.8.7
[17:30:33] slash_nick: ytti: that can be annoying...
[17:30:46] twosevenzero: Anyone out there care to point me towards a gem or technique that will allow me to update a single line on the command line instead of scrolling the terminal
[17:31:04] twosevenzero: so I can have the command line update similar to 1/100, 2/100, tc
[17:31:06] ytti: just add bunch of ^H
[17:31:10] ytti: if it's last line you're editing
[17:31:12] ytti: if not, then you need curses
[17:31:20] choke: has joined #ruby
[17:31:35] ytti: twosevenzero, perhaps you need this
[17:31:43] ytti: https://github.com/jfelchner/ruby-progressbar
[17:31:56] pafin: has joined #ruby
[17:31:57] twosevenzero: ytti, thanks!
[17:32:07] twosevenzero: I am going to look into the ^H first
[17:32:17] twosevenzero: since its just the above line
[17:32:44] Ox0dea: https://github.com/peter-murach/tty-progressbar is also pretty sexy.
[17:33:07] Ox0dea: twosevenzero: ^H is "\b"; you probably want "\r" to begin writing the line again from the beginning.
[17:33:28] twosevenzero: Ox0dea, thanks
[17:33:31] Ox0dea: Sure thing.
[17:33:52] pafin: has joined #ruby
[17:34:28] psye: has joined #ruby
[17:35:27] psye: has joined #ruby
[17:35:38] twosevenzero: reading every line from a file and then update the user on the progress
[17:35:49] twosevenzero: without trashing the terminal
[17:35:59] lagweezle: ACTION tries to figure out why the name shevy looks so familiar to him.
[17:36:00] lessless: has joined #ruby
[17:36:51] hobodave: has joined #ruby
[17:36:53] Ox0dea: twosevenzero: What else are you going to be printing?
[17:36:57] platosha_: has joined #ruby
[17:37:38] platzhirsch: has left #ruby: ()
[17:38:10] troyready: has joined #ruby
[17:38:15] twosevenzero: Something like this:
[17:38:38] twosevenzero: when its successful
[17:38:58] Ox0dea: twosevenzero: But you do have multiple lines of non-progress output?
[17:39:16] twosevenzero: yes, which I do not want. Lots of Trying
[17:40:11] Ox0dea: I'm not sure I follow. Using "\r" to rewrite the current line is a clean and elegant approach, but it only works well if that's your only line of output.
[17:40:12] qhartman: has joined #ruby
[17:40:34] Ox0dea: If you need anything remotely akin to an "interface", you'll need to use terminal escape sequences in one way or another.
[17:41:05] dionysus69: has joined #ruby
[17:41:08] devoldmx: has joined #ruby
[17:41:21] twosevenzero: no worries. I will keep hacking at it
[17:41:21] juanca_: has joined #ruby
[17:41:54] catbusters: has joined #ruby
[17:41:55] troulouliou_div2: has joined #ruby
[17:42:36] twosevenzero: the basic functionality I am looking for is if I looped over an array of words, I want to print them all one by one. replacing the last one on the screen with the current one
[17:42:40] GnuYawk: has joined #ruby
[17:43:04] Ox0dea: twosevenzero: Then "\r" should do.
[17:43:10] roolo: has joined #ruby
[17:43:10] chouhoulis: has joined #ruby
[17:43:29] shevy: lagweezle either because of chevy chase or because of a car called chevy
[17:43:40] khebbie: has joined #ruby
[17:43:56] lagweezle: shevy: No, no, the actually spelling you're using.
[17:44:03] miah: because of the bad mexican restaurant?
[17:44:04] zenspider: holy crap this is stumping me
[17:44:06] postmodern: has joined #ruby
[17:44:20] noethics: has joined #ruby
[17:44:22] Ox0dea: twosevenzero: %w[foo bar baz].each { |word| print "\r#{word}"; sleep 0.42 }
[17:44:36] baweaver: has joined #ruby
[17:44:58] graft: you'll have problems
[17:45:00] miah: you need a good truck and some chain to get un-stumped
[17:45:14] Ox0dea: graft: It's merely a demonstration.
[17:45:16] graft: if word[1].length < word[0].length
[17:45:22] juanca_: has joined #ruby
[17:45:37] graft: you'll have to pad it out with whitespace, probably
[17:45:49] Ox0dea: graft: Nah, "\e[K" erases everything to the right.
[17:46:02] graft: or that :)
[17:46:05] twosevenzero: Ox0dea, yes. exactly.
[17:46:37] twosevenzero: your example was exactly what I wanted
[17:46:42] Ox0dea: Excellent.
[17:46:50] twosevenzero: now I just need to find a way to make that work in what I am doing
[17:47:01] zenspider: don't use \r... it'd dumb. just print to stderr. lets you do all your normal redirection / filtering / etc.
[17:47:21] Ox0dea: zenspider: It fits twosevenzero's use case perfectly.
[17:47:32] mbeasley: has joined #ruby
[17:47:39] graft: you can still do that with \r, it's just a character..
[17:47:42] zenspider: yeah. and I'm saying it is dumb.
[17:47:44] Mendenhall: has joined #ruby
[17:48:55] sbhatore: has joined #ruby
[17:49:02] zenspider: graft: compare: ruby -e '%w[foo bar baz].each { |word| puts "#{word}" }' | grep b
[17:49:16] zenspider: graft: to: ruby -e '%w[foo bar baz].each { |word| print "\r#{word}" }' | grep b
[17:49:26] [spoiler]: yorickpeterse: is this to be expected, or is it a bug: `Oga::parse_html('<3').to_xml # => "<3></3>"
[17:49:37] vvalien: has joined #ruby
[17:49:54] zenspider: the input is a bug... gigo rules
[17:50:48] Ox0dea: "Love ends in heartbreak." -- The Zen of XML
[17:50:52] yorickpeterse: [spoiler]: that's more or less expected
[17:51:33] yorickpeterse: The reason it happens is because "<3" triggers the opening of a new tag, the "</3>" is inserted automatically after it
[17:51:38] [spoiler]: Oh okay, I just assumed Oga was more lenient like browser
[17:52:12] [spoiler]: It won't be an issue; I was just making sure
[17:52:14] yorickpeterse: what would you rather have it do, parse it as plain text?
[17:52:39] yorickpeterse: If so, don't think that's something I could add
[17:52:48] dopamean_: has joined #ruby
[17:52:48] yorickpeterse: it would require some form of lookahead to determine if there's a ">" somewhere
[17:52:59] [spoiler]: It's invalid HTML, so (webkit's parser at least) just goes back and treats it as text when it occurs the next <
[17:53:13] [spoiler]: when it finds*
[17:53:18] yorickpeterse: seems Nokogiri/libxml just ignores it alltogether
[17:53:58] [spoiler]: I'd expect libxml to treat itas an error and ignore everything lol!
[17:54:10] mbeasley: has left #ruby: ("WeeChat 0.4.2")
[17:54:14] [spoiler]: I worked with libxml once and it was such a mess
[17:54:32] lwu: has joined #ruby
[17:54:40] youngbaks: has joined #ruby
[17:54:41] [spoiler]: But anyway, it won't be an issue. I just had different expectations
[17:55:36] yorickpeterse: ok, feel free to report it as an issue if it becomes a problem
[17:55:36] doosy_: has joined #ruby
[17:55:50] yorickpeterse: not sure if I can come up with something, but at least the info is there for others that might bump into the same
[17:56:09] jeremy04_: has joined #ruby
[17:56:16] kies: has joined #ruby
[18:00:06] sanguisdex: has left #ruby: ()
[18:00:06] rbennacer: has joined #ruby
[18:00:42] doosy: has joined #ruby
[18:00:53] Encapsulation: has joined #ruby
[18:01:11] [spoiler]: Okay I'll open an issue
[18:01:22] twosevenzero: Ox0dea, zenspider: Here is what I am getting. Do I need to go the curses route?
[18:01:29] twosevenzero: https://gist.github.com/twosevenzero/1e54c938898609f948a9
[18:02:26] jeremy04: has joined #ruby
[18:02:27] RegulationD: has joined #ruby
[18:02:42] omegamike: has joined #ruby
[18:02:48] j4cknewt: has joined #ruby
[18:03:25] ivanskie: has joined #ruby
[18:03:52] doosy__: has joined #ruby
[18:03:52] [spoiler]: Tempted to title the issue `Heartbreak`
[18:04:26] duderonomy: has joined #ruby
[18:06:13] decaff: has joined #ruby
[18:06:26] jackjackdripper: has joined #ruby
[18:07:10] nateberkopec: has joined #ruby
[18:07:35] fantazo: has joined #ruby
[18:09:20] jerius: has joined #ruby
[18:11:30] KnowledgeOwl: has joined #ruby
[18:11:41] baweaver: has joined #ruby
[18:11:50] jhack: has joined #ruby
[18:12:12] it_tard: has joined #ruby
[18:12:21] big|bad|wolf: has joined #ruby
[18:12:30] howdoicomputer: has joined #ruby
[18:12:38] yorickpeterse: [spoiler]: eh, if you do at least give it a meaningful title
[18:12:40] Frem: has joined #ruby
[18:14:30] OrbitalKitten: has joined #ruby
[18:14:58] renanoronfle: has joined #ruby
[18:15:07] BraddPitt: sorry shevy stepped into a meeting right as you answered my question. So what do you use for your day job?
[18:15:26] tomphp_: has joined #ruby
[18:15:56] GBrawl: has joined #ruby
[18:16:21] tomphp_: has joined #ruby
[18:17:01] twosevenzero: Ox0dea, zenspider: lol.. the words had newlines as well. #fail
[18:18:47] lthomas: has joined #ruby
[18:20:15] gamename: has joined #ruby
[18:20:33] ndrei: has joined #ruby
[18:20:40] hotpancakes: has joined #ruby
[18:21:06] edwinvdgraaf: has joined #ruby
[18:21:43] hobodave: has joined #ruby
[18:22:35] gusrub: has joined #ruby
[18:24:14] alphaatom: has joined #ruby
[18:24:37] tomphp_: has joined #ruby
[18:24:40] edwinvdgraaf: has joined #ruby
[18:25:21] [spoiler]: yorickpeterse: I was just kidding, don't worry <3></3>
[18:25:27] alphaatom: has joined #ruby
[18:25:28] reset: has joined #ruby
[18:25:34] OrbitalKitten: has joined #ruby
[18:25:57] Ox0dea: twosevenzero: Glad you got that sorted, but where's the "\e[K"?
[18:27:02] shevy: BraddPitt I do use ruby for pretty much everything, I am not a programmer though, studied biology/molecular genetics so I would do more lab work; but somehow I ended up with more and more bioinformatics even though I am not too overly fond of it
[18:27:20] da3mian_: has joined #ruby
[18:27:34] leafybasil: has joined #ruby
[18:28:56] einarj: has joined #ruby
[18:29:02] miah: bioinformatics is neat
[18:29:17] pyon: has joined #ruby
[18:29:27] northfurr: has joined #ruby
[18:29:40] riotjones: has joined #ruby
[18:29:47] banister: has joined #ruby
[18:31:25] dfockler: In classes is it better to call an instance variables by it's method or by using @, I know the @ accesses the actual var, while the other is a method call
[18:31:42] TomyLobo: https://eval.in/private/2760f0377ebe5d I kinda get why @@foo is undefined, but how do i set a class variable of the module i'm included from?
[18:31:58] khebbie: has joined #ruby
[18:32:02] twosevenzero: I added it in the final
[18:32:06] twosevenzero: working great
[18:32:06] [spoiler]: dfockler: if you're within a class, use `@var` over `var`
[18:32:46] TomyLobo: err class i'm included from*
[18:32:55] [spoiler]: dfockler: local variables have precedence
[18:33:04] dfockler: [spoiler]: I've seen some people use self.foo or just foo to access the variable from inside a class
[18:33:23] shevy: miah before I knew it, in the distant past, I thought it is about creating de-novo organisms. I fell from the sky when I noticed that most of it was about maths instead :(
[18:33:27] [spoiler]: it's possible, but if you use self.foo you use public access
[18:33:39] [spoiler]: because self is a public reference to the object you're calling from
[18:33:57] [spoiler]: which miht be different from just reading from @foo
[18:33:58] tomphp_: has joined #ruby
[18:34:20] howdoicomputer: has joined #ruby
[18:34:28] TomyLobo: talking to me or dfockler? :)
[18:34:36] [spoiler]: using just `foo` is still considered private access, but it can be overriden by lvars
[18:34:43] bodgix: has joined #ruby
[18:34:57] TomyLobo: oh nm he switched to foo first
[18:34:59] [spoiler]: TomyLobo: ok I am not sure anymore *confused, re-reads*
[18:35:00] DoubleMalt: has joined #ruby
[18:35:58] JakFrist: has joined #ruby
[18:36:18] mappou: has joined #ruby
[18:36:47] [spoiler]: Oh, I was talking to dfockler , sorry
[18:36:47] dfockler: shouldn't you only use @ when you want to use the var internally, but not expose it externally?
[18:37:05] jmignault: has joined #ruby
[18:37:10] banister: has joined #ruby
[18:37:34] ledestin: has joined #ruby
[18:37:49] [spoiler]: dfockler: Not really. All instance variables are not exposed by default, you have to use attr_reader/attr_writet/attr_accesor to make them read-only/write-only/both
[18:38:28] dfockler: [spoiler]: that's kind of what I meant
[18:38:35] [spoiler]: also you can do `def instance_var_name=(v); @instance_var_name = v*2; end;`
[18:38:36] dopamean1: has joined #ruby
[18:39:09] but3k4: has joined #ruby
[18:39:40] dfockler: so if you want an external view of the var use `instance_var_name` but if you need access to the raw var use @instance_var_name
[18:39:55] Blaguvest: has joined #ruby
[18:39:57] TomyLobo: https://eval.in/private/70fc76967144a3 i am seriously confused now. self is the same instance in both cases. why is the behaviour of @@ different?
[18:40:20] hj2007: has joined #ruby
[18:40:21] [spoiler]: Yes, but using @ is still better, for one: there's no method dispatching, and for two: if you did `attr_reader :foo` and then tried to do foo=10, you'd not call a method `SomeClass#foo=`, you'd just define the local variable `foo`
[18:40:40] felltir: has joined #ruby
[18:40:42] edwinvdg_: has joined #ruby
[18:40:51] [spoiler]: and @foo wouldn't be updated
[18:40:56] [spoiler]: so, you'd have a mess
[18:40:58] dfockler: [spoiler]: ok that makes sense
[18:41:24] [spoiler]: when inside class body, and for simple assignments, use @foo.
[18:41:45] [spoiler]: However, if the assignment is something complex, you should still use @foo *but*
[18:42:11] [spoiler]: have a private method called `set_foo`, and alias #= as #set_foo
[18:42:23] [spoiler]: and make #= public, obviously
[18:42:31] KnowledgeOwl: has joined #ruby
[18:42:35] arooni-mobile__: has joined #ruby
[18:42:58] BraddPitt: interesting shevy. Why not move into software development?
[18:43:01] eytanfb: has joined #ruby
[18:43:27] shevy: BraddPitt I rather want to create living things :)
[18:43:42] crdpink: has joined #ruby
[18:43:43] spider-mario: has joined #ruby
[18:44:01] [spoiler]: dfockler: If it seems weird I can write some quick examples
[18:44:20] jhack: has joined #ruby
[18:45:27] troulouliou_div2: has joined #ruby
[18:45:32] KnowledgeOwl: has joined #ruby
[18:45:35] clocKwize: has joined #ruby
[18:45:59] ndrei: has joined #ruby
[18:46:19] nonparfumee: has joined #ruby
[18:46:41] Timba-as: has joined #ruby
[18:46:49] SCHAAP137: has joined #ruby
[18:47:31] KnowledgeOwl: has joined #ruby
[18:47:53] edwinvdgraaf: has joined #ruby
[18:47:53] yh: has joined #ruby
[18:48:23] asaaki: has joined #ruby
[18:48:52] edwinvdg_: has joined #ruby
[18:51:07] youngbaks: has joined #ruby
[18:51:25] atomical: has joined #ruby
[18:51:27] TomyLobo: monsanto style?
[18:51:30] dopamean_: has joined #ruby
[18:51:33] yardenbar: has joined #ruby
[18:51:48] DLSteve: has joined #ruby
[18:51:55] noob4linux: has joined #ruby
[18:52:21] TheNet: has joined #ruby
[18:52:38] TomyLobo: or or really de novo? :)
[18:52:58] dudedudeman: whoa. there's a celebrity in here
[18:53:27] OrbitalKitten: has joined #ruby
[18:53:32] leafybasil: has joined #ruby
[18:53:43] dfockler: [spoiler]: Thanks, but it makes sense :)
[18:54:33] KnowledgeOwl: has joined #ruby
[18:54:36] TomyLobo: dudedudeman, who?
[18:54:44] [spoiler]: dudedudeman: finally some recognition! Thank you, thank you!
[18:54:49] [spoiler]: ACTION is having a Gilderoy Lockhart moment
[18:55:12] Ox0dea: >> 0x10e # twosevenzero: What's the significance, if you don't mind my asking?
[18:55:13] ruboto: Ox0dea # => 270 (https://eval.in/414952)
[18:55:33] [spoiler]: TomyLobo: http://harrypotter.wikia.com/wiki/Gilderoy_Lockhart :)
[18:55:33] KnowledgeOwl: has joined #ruby
[18:55:34] chinmay_dd: has joined #ruby
[18:55:40] whiteline: has joined #ruby
[18:56:35] JoshL: has joined #ruby
[18:56:41] [spoiler]: TomyLobo: I'm a *huge* Harry Potter nerd (includes LARPing, but that's not limited to Harry Potter, though)
[18:57:05] twosevenzero: ruboto, is right but where did I post 0x10e?
[18:57:14] dgutierrez1287: has joined #ruby
[18:57:31] ruboto: TomyLobo # => 3562 (https://eval.in/414953)
[18:58:16] tkuchiki: has joined #ruby
[18:58:28] yeticry: has joined #ruby
[18:58:29] KnowledgeOwl: has joined #ruby
[18:58:54] baweaver: has joined #ruby
[18:58:57] dudedudeman: [spoiler] is definitely com truise
[18:59:05] casadei: has joined #ruby
[18:59:34] noob4linux: has left #ruby: ("Konversation terminated!")
[18:59:57] TomyLobo: [spoiler], and in the spirit of your name, dumbledore dies :)
[19:00:08] Cache_Money: has joined #ruby
[19:01:30] [spoiler]: I always read 0x0dea like someone with a bizzare Irish accent saying `No Oydea`
[19:01:48] [spoiler]: TomyLobo: Lol :)
[19:01:56] gambl0re: does devise handle email authentication and password resets?
[19:02:05] [spoiler]: gambl0re: yes
[19:02:15] jhass: ?crosspost gambl0re
[19:02:15] ruboto: gambl0re, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[19:02:33] nahtnam: has joined #ruby
[19:02:34] gambl0re: i wasnt sure if it did it
[19:03:04] [spoiler]: gambl0re: also jhass has a good point :)
[19:03:31] hotpancakes: has joined #ruby
[19:03:52] last_staff: has joined #ruby
[19:03:54] kalleth: has joined #ruby
[19:04:37] Cust0sLim3n: has joined #ruby
[19:06:00] ivanskie: has joined #ruby
[19:07:05] droidburgundy: has joined #ruby
[19:08:17] dabradley: has joined #ruby
[19:08:54] Maletor: has joined #ruby
[19:09:01] nateberkopec: has joined #ruby
[19:09:05] nahtnam: Quick question
[19:09:30] nahtnam: Can a site detect if I am using mechanize?
[19:09:46] TomyLobo: what is mechanize
[19:09:50] northfurr: has joined #ruby
[19:10:13] TomyLobo: user-agent-changing proxy
[19:10:23] brain_shim: nahtnam: If you set the User-Agent header, you can spoof comming from a browser.
[19:10:24] TomyLobo: nope they can't, unless mechanize is bad
[19:10:33] havenwood: TomyLobo: Mechanize is a wrapper around Ruby's Net::HTTP that helps automate interactions with the web.
[19:11:08] nahtnam: If the said site has a ajax form, can I get mechanize to fill it, submit it, and get the ajax respone?
[19:11:17] tkuchiki: has joined #ruby
[19:11:28] Gefn: has joined #ruby
[19:11:44] TomyLobo: nahtnam, they might detect you by behaviour
[19:12:01] nahtnam: ?, I want to fill out the form like a normal user
[19:12:04] brain_shim: nahtnam: Find the ajax request and don't bother with filling in the form. Send a post request directly to the route specified.
[19:12:30] nahtnam: brain_shim: What if it has a captcha?
[19:12:37] nahtnam: I am using Death By Captcha
[19:12:38] nahtnam: to solve it
[19:12:41] TomyLobo: wireshark helps
[19:13:00] [spoiler]: nahtnam: if it has a captcha, it's not meant to be submitted by bots
[19:13:15] [spoiler]: Respect that :)
[19:13:21] nahtnam: [spoiler]: Its not meant to be, but i kinda have to do it
[19:13:25] kidoz: has joined #ruby
[19:13:27] nahtnam: We already do it with selenium
[19:13:31] toretore: has joined #ruby
[19:13:35] nahtnam: just wondering if Mechanize can do it faster
[19:13:49] TomyLobo: nahtnam, captcha means computer-aided test to tell computers and humans apart. if they employ that, they have a reason for that
[19:14:31] brain_shim: nahtnam: If you're interacting with a js heavy site, you're probably better off sticking with a headless browser that has a js runtime.
[19:14:33] TomyLobo: i suggest you ask politely for an api
[19:14:50] nahtnam: TomyLobo: We did, they never responded.
[19:15:00] nahtnam: (We need to scrape gift card balances)
[19:15:14] TomyLobo: that sounds fishy
[19:15:18] [spoiler]: nahtnam: your biggest bottleneck is, I'm assuming, the network I/O, not the actual machine. So Selenium might not be the issue.
[19:15:38] TomyLobo: are you trading their gift cards around without authorization?
[19:15:53] alphaatom: has joined #ruby
[19:16:18] [spoiler]: TomyLobo: Well, let's not get into the ethics of it. It's beyond this channel probably :(
[19:16:27] TomyLobo: yeah, why else would you need to scrape gift card balances for someone else's shop?
[19:16:49] jpiche: has joined #ruby
[19:17:03] Torrieri: has joined #ruby
[19:17:04] Torrieri: has joined #ruby
[19:17:40] [spoiler]: nahtnam: Well, I doubt a pure-ruby implementation will be faster than a Java one (I might be wrong, but I doubt that in this case).
[19:18:00] [spoiler]: And mechanize is written in pure Ruby from what I can tell
[19:18:35] nahtnam: [spoiler]: But the difference is that mechanize doesnt open up a chrome instance
[19:18:39] nahtnam: where are selenium does
[19:18:44] nahtnam: Which slows it down **a lot**
[19:18:58] [spoiler]: nahtnam: use a headless browser, then :)
[19:19:19] [spoiler]: nahtnam: something like phantom.js
[19:19:23] Yiota: has joined #ruby
[19:19:28] [spoiler]: or maybe they call it PhantomJS instead of .js not sure
[19:19:35] nahtnam: We tried that, but some of the sites we scrape found a way to block it
[19:19:58] [spoiler]: nahtnam: set the user-agent to something else
[19:20:22] [spoiler]: And besides, it was blocked for a reason
[19:20:25] [spoiler]: ACTION sighs
[19:20:34] nahtnam: I dont think its that. I think it had to do with some JS on the page. (I never actually tried it out, a co-worker did)
[19:20:54] nahtnam: Hm, ill just try it out
[19:20:57] nahtnam: and see how it goes
[19:21:10] [spoiler]: I'm not happy with this conversation. I don't think you should do something that a website doesn't want you to do
[19:21:27] LoBoGoL: has joined #ruby
[19:21:42] [spoiler]: It's not polite, or ethical towards the people who put effort into creating the website
[19:22:31] nahtnam: Its not my choice, it was just assigned to me, and I personally dont mind doing it considering these are large companies
[19:23:30] [spoiler]: I can't help further. :/ I already feel a little bit guilty for offering the small bits of advice I gave away.
[19:23:32] KnowledgeOwl: has joined #ruby
[19:23:32] dopamean_: has joined #ruby
[19:23:43] gambl0re: spoiler i need your help
[19:23:46] gambl0re: https://gist.github.com/rickywid/85c64f6e2b1f65af6c74
[19:23:55] gambl0re: i got two different results when using the same command
[19:24:02] C1V0: has joined #ruby
[19:24:06] jhass: [spoiler]: you'll give a couple of lawyers work, creating jobs!
[19:24:18] hashrocket: has joined #ruby
[19:24:31] bweston92: has joined #ruby
[19:24:33] jerius: has joined #ruby
[19:24:36] jhass: gambl0re: http://ruby-community.com/pages/user_rules#rule_2_7
[19:24:42] n008f4g_: has joined #ruby
[19:25:05] preller: has joined #ruby
[19:25:08] but3k4_: has joined #ruby
[19:25:21] jhass: oh and actually
[19:25:22] nahtnam: gambl0re: #RubyOnRails
[19:25:32] havenwood: Railsy Rails Rails
[19:25:37] jhass: !kick gambl0re don't crosspost without informing all sides about it
[19:25:38] helpa: jhass: No.
[19:25:38] ruboto: ruboto kicked gambl0re: crosspost without informing all sides about it
[19:25:38] ruboto: -o ruboto
[19:27:42] TomyLobo: nahtnam, "only taking orders" has not been a valid excuse since '45
[19:27:53] segy: has joined #ruby
[19:28:11] nahtnam: > and I personally dont mind doing it considering these are large companies
[19:28:17] hakunin: has joined #ruby
[19:28:21] chabil: has joined #ruby
[19:28:32] TomyLobo: so you're not amoral but immoral, that makes it better
[19:28:47] jhass: ignorance wins!
[19:29:17] dfockler: ah computer ethics, what a fun grey area
[19:29:30] KnowledgeOwl: has joined #ruby
[19:29:37] [spoiler]: dfockler: especially if you're a unix user. We've all been killers at one point
[19:29:47] [spoiler]: unix/linux*
[19:30:54] dfockler: Only Richard Stallman is a pure computer ethicist
[19:31:20] [spoiler]: ACTION sighs
[19:31:42] dopamean_: has joined #ruby
[19:31:45] TomyLobo: except if you ask the cddl crowd
[19:31:53] [spoiler]: I've been debugging my code when the behaviour (not even a bug, it's verly likely a feature) wasn't even in my code!
[19:31:59] [spoiler]: Effin great.
[19:32:25] dfockler: The Case of the Missing Method
[19:32:41] baweaver: has joined #ruby
[19:33:03] [spoiler]: dfockler: no it's worse; it's encodings
[19:33:10] [spoiler]: I loaaaaathe encodings
[19:33:36] dfockler: Doesn't everything use UTF-8 these days? LOLOLOL
[19:34:17] TomyLobo: nope, oracle for instance still defaults to the platform encoding :)
[19:34:26] TomyLobo: also postgres
[19:34:29] KnowledgeOwl: has joined #ruby
[19:34:30] Muhannad: has joined #ruby
[19:34:49] TomyLobo: but postgres is usually installed on systems with sane platform encodings so it doesnt matter
[19:35:09] [spoiler]: Hmm. My code actually alters this type of behaviour (which is kinda good, not sure if I should fix it or leave it)
[19:35:22] [spoiler]: It actually generates what I wanted it to generate, so I guess I win
[19:36:02] [spoiler]: ACTION does a subtle victory dance, because he's not sure if a real victory dance is appropriate.
[19:36:29] nahtnam: ruboto: Is pretty cool. Where can I find the soruce
[19:36:48] twohlix: im betting: https://github.com/ruboto/ruboto/
[19:36:51] [spoiler]: Oh well. If people complain, I'll fix it. For now I am content.
[19:37:06] twohlix: i might be wrong tho :\
[19:37:14] frigidcode: has joined #ruby
[19:37:19] youngbaks: has joined #ruby
[19:37:20] [spoiler]: twohlix: actually, that's a different thing
[19:37:26] twohlix: yea, just read through it
[19:37:53] [spoiler]: it's probably implemented using cinch
[19:38:01] twohlix: 2 hard problems in CS: naming things, cache invalidation and off by one errors
[19:38:03] twohlix: damn naming things.
[19:38:16] [spoiler]: https://github.com/cinchrb/cinch
[19:38:17] Timba-as: has joined #ruby
[19:38:20] ruboto: I don't know anything about cinch
[19:38:44] Musashi007: has joined #ruby
[19:38:47] twohlix: probably is: ruboto has userhost ~cinch@ruby-community.com and real name "cinch"
[19:39:26] nahtnam: twohlix: Ehhh, thats a mobile app gem,
[19:39:33] tercenya: has joined #ruby
[19:39:35] twohlix: yea, i just realized that after reading through it
[19:41:54] devoldmx: has joined #ruby
[19:41:55] [spoiler]: I can't stop laughing at this, whoever added this is brilliant
[19:41:57] ruboto: How learning something works: http://i.imgur.com/l2mInq8.webm
[19:42:08] jeremy04_: has joined #ruby
[19:42:26] Macaveli: has joined #ruby
[19:43:03] Macaveli: has joined #ruby
[19:44:11] nahtnam: [spoiler]: Where did you find the commnad?
[19:44:13] [spoiler]: apeiros: good work with the learning video :)
[19:44:26] Iszak_: has joined #ruby
[19:44:30] KnowledgeOwl: has joined #ruby
[19:44:38] nahtnam: :D I wish I had a dog
[19:44:56] [spoiler]: nahtnam: http://ruby-community.com/ruboto/facts
[19:46:06] axl_: has left #ruby: ()
[19:46:40] ascarter: has joined #ruby
[19:47:05] mappou: has left #ruby: ("WeeChat 1.2")
[19:47:27] dopamean_: has joined #ruby
[19:47:47] ruboto: I don't know anything about pong
[19:48:38] [spoiler]: nahtnam: you can't pong something if it doesn't ping :P
[19:48:54] ascarter: has joined #ruby
[19:48:55] nahtnam: But it does ping
[19:48:58] nahtnam: I just checked :D
[19:49:10] dopamean_: has joined #ruby
[19:49:27] [spoiler]: nahtnam: I phrased that badly. I meant, you can't pong to something that didn't ping you first
[19:49:39] nahtnam: But I did ping it...
[19:49:41] pyon: has joined #ruby
[19:49:46] ruboto: I don't know anything about pong
[19:49:47] lalalaaa: has joined #ruby
[19:50:30] jgpawletko: has joined #ruby
[19:50:37] lalalaaa: Hi! How do I check if path includes `&`? I tried `if path == /\&/` but to no avail.
[19:50:38] [spoiler]: Yes, but the bot can't p*i*ng you if you p*o*ng it.
[19:51:16] bruno-: has joined #ruby
[19:51:18] LoBoGoL: has joined #ruby
[19:51:27] [spoiler]: lalalaaa: use equalish
[19:51:31] nahtnam: ?ping pong
[19:51:31] ruboto: pong, pong
[19:51:39] havenwood: nahtnam: If you don't receive a ping, you can't send a pong, how can you send a pong if you don't receive a ping!? You! Yes, you!
[19:51:41] [spoiler]: that's equalish
[19:51:58] jeremy04: has joined #ruby
[19:52:17] jhass: lalalaaa: path.include? "&"
[19:52:21] jhass: just use english
[19:52:54] [spoiler]: jhass, lalalaaa: that's an even better solution, because fasterness
[19:53:18] [spoiler]: (depends on how often you call the code, though)
[19:53:22] jamto11: has joined #ruby
[19:53:28] lalalaaa: jhass: english ftw, thanks
[19:53:31] Musashi007: has joined #ruby
[19:53:44] lalalaaa: [spoiler]: equalish works too, much obliged
[19:54:06] [spoiler]: lalalaaa: I started using equalish because I finally found a way to remember the syntax
[19:54:18] jhass: lalalaaa: btw & is nothing special in regex, no need to escape it
[19:54:20] nahtnam: https://github.com/JuanitoFatas/fast-ruby#string
[19:54:34] nahtnam: I think there are benchmarks for =~ in there
[19:54:38] yqt: has joined #ruby
[19:54:47] lalalaaa: jhass: ah yeah i was like.. do i need that?
[19:54:58] jhass: nahtnam: but not against include? ?
[19:55:19] rakm: has joined #ruby
[19:55:27] jhass: lalalaaa: always try without, it's surprisingly permissive in those regards
[19:55:31] mesamoo: has joined #ruby
[19:55:40] jhass: if it actually behaves weird start looking for things to escape
[19:55:54] cschneid_: has joined #ruby
[19:55:55] lapide_viridi: has joined #ruby
[19:55:55] jhass: but if you don't need the escapes, they just obscure it IMO
[19:56:03] Vile`: has joined #ruby
[19:56:04] [spoiler]: there's few things you need to escape in regexp anyway, though
[19:56:35] nfk: has joined #ruby
[19:56:42] lalalaaa: cool, got it, thanks again
[19:57:00] jhass: mmh, I'm trying to think of something (apart from the start delimiter) that you need to escape no matter where you put it
[19:57:15] mistermocha: has joined #ruby
[19:57:52] RegulationD: has joined #ruby
[19:58:07] jhass: can't come up with anything though
[19:58:29] sdwrage: has joined #ruby
[19:58:55] mistermocha: has joined #ruby
[20:00:41] TheNet: has joined #ruby
[20:01:04] zenspider: several of those benchmarks are stupid. take it with a grain of salt and measure your own shit to get real numbers.
[20:01:05] ivanskie: has joined #ruby
[20:01:28] Macaveli: has joined #ruby
[20:02:08] yfeldblum: has joined #ruby
[20:02:26] k3asd`: has joined #ruby
[20:03:14] dr3w: has joined #ruby
[20:03:17] droidburgundy: has joined #ruby
[20:03:40] baweaver: has joined #ruby
[20:03:52] TomyLobo: why does my regex look like this? (?-mix:^\/projects$)
[20:04:10] bougyman: 's the verbose version.
[20:04:26] northfurr: has joined #ruby
[20:04:26] bougyman: the ?-mix means it's not multiline, not case insensitive, and not extended syntax.
[20:05:24] TomyLobo: bougyman, so it's case sensitive?
[20:05:31] KnowledgeOwl: has joined #ruby
[20:05:47] TomyLobo: i wasnt actually thinking about that :)
[20:05:53] TomyLobo: good default
[20:06:28] jhass: TomyLobo: you know about the gotcha's between ^$ vs \A\z ?
[20:06:35] gambl0re: has joined #ruby
[20:07:02] jhass: ^$ is start/end of line, \A\z is start/end of string
[20:07:13] TomyLobo: same thing in this case :)
[20:07:35] Contigi: has joined #ruby
[20:07:43] exadeci: has joined #ruby
[20:07:47] jhass: >> "foo\n/projects\nbar"[%r{^/projects$}]
[20:07:48] ruboto: jhass # => "/projects" (https://eval.in/414973)
[20:07:59] TomyLobo: does enabling the multiline flag change that behaviour?
[20:08:18] jhass: if you're sure about that, it's a common pitfall in validation scenarios
[20:08:28] jhass: don't think so
[20:09:00] gambl0re: has joined #ruby
[20:09:16] ellisTAA: has joined #ruby
[20:09:43] TomyLobo: well the worst that could happen is my fuse driver crashing
[20:10:06] TomyLobo: not a big deal since the person using the fs is probably the person who mounted it
[20:10:11] jhass: >> ["\r\n"[/.+/], "\r\n"[/.+/m]]
[20:10:12] ruboto: jhass # => ["\r", "\r\n"] (https://eval.in/414974)
[20:10:18] duderonomy: has joined #ruby
[20:10:19] jhass: I think that's the only diff
[20:10:25] law: has joined #ruby
[20:10:40] law: hey all, I'm tasked with mangling some Time objects, and I'm getting a little confused
[20:11:22] law: how can I test if Time.now is within 'business hours', where 'business hours' are defined as 8am to 6pm, Mon thru Fri, in the timezone of my local host?
[20:11:29] chipotle: has joined #ruby
[20:11:55] law: I tried comparing to a range, but couldn't quite get it. Now I'm trying to just say "is Time.now less than 6pm and greater than 8am?", but getting a little wonky on the syntax of such a thing
[20:12:27] jhass: pure ruby, no activesupport?
[20:12:56] law: correct
[20:13:21] twosevenzero: has left #ruby: ("Leaving")
[20:13:28] [spoiler]: jhass: I'm not a Rails guys, so I'm curious about an active support solution, too!
[20:13:40] [spoiler]: activesupport*
[20:14:30] lthomas: has joined #ruby
[20:14:45] jhass: [spoiler]: not an expert either. Either way I'd construct the beginning and end time and AS has some helpers to do so
[20:15:18] marr: has joined #ruby
[20:15:18] [spoiler]: law, as to your last line: `(8..18).include? Time.now.hour`
[20:15:41] [spoiler]: there's also Time.now.wday
[20:15:47] [spoiler]: 1 is monday, 0 is sunday
[20:16:19] doosy: has joined #ruby
[20:16:24] law: niiiiiice
[20:16:32] law: I can definitely hack it together with that, at least. thank you very much!
[20:16:52] Motoservo: has joined #ruby
[20:17:00] [spoiler]: law, but there's no need for a range, tbf
[20:17:17] [spoiler]: might degrade performance since it generates an extra object
[20:17:37] law: this is an 'if' statement to a script that decides whether to wake up a sysadmin if a build fails
[20:17:41] [spoiler]: it probably just calles Range#first and Range#last and then compares if the day is bigger than the former and smaller than the latter
[20:17:45] law: if it runs once an hour, I'll be impressed
[20:17:51] blackmesa: has joined #ruby
[20:18:00] [spoiler]: oh okay then
[20:18:07] [spoiler]: in that case, range is definitely nicer
[20:18:32] jenrzzz: has joined #ruby
[20:19:54] [spoiler]: BTW: you could probably get fancier with it (although I doubt you'll need it)
[20:19:55] pyon: has joined #ruby
[20:20:06] tonyfabeen: has joined #ruby
[20:20:10] tonyfabeen: has left #ruby: ()
[20:21:05] rdark: has joined #ruby
[20:21:07] pyon: has joined #ruby
[20:21:17] swgillespie: has joined #ruby
[20:21:41] Musashi007: has joined #ruby
[20:22:21] doosy_: has joined #ruby
[20:22:47] [spoiler]: yorickpeterse: you here? :) I have a question about a possible feature request for Oga (again, it's not an issue, and it might not be difficult to implement :P)
[20:22:48] duderonomy: has joined #ruby
[20:22:49] zenspider: TomyLobo: multiline (/m)just means that /./ will also match a newline
[20:23:10] malconis: has joined #ruby
[20:25:56] nonparfumee: has joined #ruby
[20:27:10] law: how fancy are we talkin'?
[20:28:05] tkuchiki: has joined #ruby
[20:28:55] clocKwize: has joined #ruby
[20:29:34] ellisTAA: has joined #ruby
[20:29:44] casadei: has joined #ruby
[20:30:06] jenrzzz: has joined #ruby
[20:30:27] ascarter: has joined #ruby
[20:30:54] atmosx: law: sample code that uses 'tzinfo': https://gist.github.com/atmosx/e9106907ef237e97e176 you can work out the days and everything to suit your needs.
[20:30:55] mcgain: has joined #ruby
[20:31:26] law: shiny, thank you!
[20:31:34] dr3w: has joined #ruby
[20:31:57] Trynemjoel: has joined #ruby
[20:32:03] basmoura: has joined #ruby
[20:33:02] atmosx: law: just take a look at strftime: http://apidock.com/ruby/Time/strftime , you can get days by using %u or %w (depending on how do you count the week).
[20:33:07] gard: has joined #ruby
[20:33:53] RobertBirnie: has joined #ruby
[20:34:37] bweston: has joined #ruby
[20:34:45] saddad: has joined #ruby
[20:35:07] lannonbr: has joined #ruby
[20:36:42] law: am I missing something here: https://gist.github.com/law/8bef671f156e00962d54
[20:36:55] law: '13' should be within the 11...18 range
[20:37:14] swgillespie: has joined #ruby
[20:37:39] darix: law: strftime gives you a string
[20:37:43] atmosx: yeah, it's a string
[20:37:44] hotpancakes: has joined #ruby
[20:37:47] atmosx: turn that string into number
[20:37:55] atmosx: law: TZInfo::Timezone.get('America/Los_Angeles').strftime('%H').to_i
[20:37:56] banister: has joined #ruby
[20:38:12] law: awesome, thanks
[20:38:41] Zarthus: On Windows, does anyone know how to tell Ruby to use OpenSSL::VERIFY_NONE by default, or to at least not use SSLv3? I checked my OpenSSL::OPENSSL_VERSION, and it seems to be 1.0.1l (patched for heartbleed), but still insisting on some gems to use SSLv3 - i'm okay with VERIFY_NONE, this is development. the production server will verify the end result.
[20:38:58] Trynemjoel: has joined #ruby
[20:39:17] darix: Zarthus: how about grabbing a ca-bundle
[20:39:18] Zarthus: The thrown error is `request.rb:37:in `rescue in perform': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (Twitter::Error)`
[20:39:20] darix: like the one from curl
[20:39:30] darix: and then setting up the ssl properly?
[20:39:43] jhass: isn't SSLv3 in openssl terms SSLv3+?
[20:40:06] jhass: and then you have to disable SSLv3 with some other option?
[20:40:20] TomyLobo: uhm sslv3 is broken and shouldnt be supported anymore
[20:40:21] Zarthus: darix: I suppose it's worth a shot. I assumed by default Twitter would drop SSLv3 traffic anyways, though.
[20:40:30] jhass: ah no, that was SSLv23
[20:40:34] irctc151: has joined #ruby
[20:41:18] darix: Zarthus: your problem is not SSLv3
[20:41:25] darix: but the ca bundle missing
[20:41:32] Musashi007: has joined #ruby
[20:41:42] irctc151: hello, im trying to do a if statement if a hash is nil or not, and for some reason its making the hash nil.
[20:41:58] darix: irctc151: you used = instead of ==
[20:42:01] darix: or better .nil?
[20:42:07] Zarthus: darix - alright, thanks. i'll try installing curl's ca bundle
[20:42:12] Bish: hey, can i pass a variable to a thread, without it being an issue (local copy)
[20:42:20] slide: has joined #ruby
[20:42:26] darix: Bish: mutex
[20:42:41] Bish: i know about mutexes, but i do not want to modify it inside the thread
[20:42:56] Bish: so i m asking if i somehow can copy it into the context, it seems like they're all references
[20:43:00] darix: Bish: i would protect the assignment anyway
[20:43:07] Bish: darix, i wouldn't
[20:43:17] Bish: i would just copy them, if that is possible
[20:43:39] lalalaaa: *that feeling when your ruby app finally gets the webdesign it deserves*
[20:43:52] slide: I've installed ruby 2.2 on ubuntu 12.04 using a ppa. I'm now trying to upgrade gitlab however after running "bundle install" which says it installs rake, "bundle rake" fails with "bundler: command not found: rake"
[20:44:07] slide: anyone know how I can figure out how to fix this?
[20:44:36] lalalaaa: ACTION takes this opportunity to watch RUBY SPARKS Trailer 2012 Movie - Official [HD]: https://www.youtube.com/watch?v=W4RJYlSgDKM
[20:45:21] dfockler: Bish: are you certain they are actually getting copied?
[20:45:35] KnowledgeOwl: has joined #ruby
[20:45:44] Bish: no, the oppsotie is the case, but i would love to copy them
[20:45:55] jackjackdripper: has joined #ruby
[20:46:19] last_sta1: has joined #ruby
[20:47:46] Philipp__: has joined #ruby
[20:48:07] darix: Bish: you can try .dup
[20:49:20] tkuchiki: has joined #ruby
[20:49:35] KnowledgeOwl: has joined #ruby
[20:50:08] irctc151: currently its running as if the hash isnt empty when it is.
[20:50:18] irctc151: <% if @test["uid"] == " " %>
[20:50:23] irctc151: is what im doing
[20:51:04] pyon: has joined #ruby
[20:51:07] irctc151: basically if the "uid" is empty i want a specific link to show, else if not empty then a different link
[20:52:23] baweaver: #RubyOnRails first off
[20:52:33] baweaver: second, make sure that's == and not =
[20:52:35] KnowledgeOwl: has joined #ruby
[20:53:07] baweaver: they're going to ask you for more of the code there as that'll be insufficient to find the actual issue.
[20:53:16] irctc151: i have it as ==
[20:53:20] baweaver: if it's not in the view you're doing something odd in the controller
[20:53:36] baweaver: but again, #RubyOnRails is where you should probably be asking ERB questions.
[20:54:08] TomyLobo: well, you dont need rails to use erb
[20:54:17] TomyLobo: puppet and vagrant both employ erb
[20:54:35] TomyLobo: and neither of them strikes me as a rails app
[20:54:38] baweaver: most of the time
[20:54:38] irctc881: has joined #ruby
[20:54:52] baweaver: I'd assume they'd correct me if that was the case.
[20:55:24] atmosx: slide: where did you get that 'bundle rake' command from?
[20:55:48] cornerma1: has joined #ruby
[20:56:01] atmosx: slide: you probably wanted to write 'bundle exec rake <something>'
[20:57:38] northfurr: has joined #ruby
[20:57:59] irctc881: im trying to do a if statement, where if its true, then show a certain link, if not true show aanother link, but its coming as its always false. heres my code https://gist.github.com/anonymous/b075c69694e3a0afdfc7
[20:58:39] TomyLobo: irctc881, that does sound a lot like rails now :)
[20:59:00] TomyLobo: especially link_to
[20:59:11] atmosx: lalalaaa: that movie must be terrible
[20:59:56] TheNet: has joined #ruby
[21:00:57] avitzurel: has joined #ruby
[21:04:56] luckyme: has joined #ruby
[21:04:59] Trynemjoel: has joined #ruby
[21:05:03] TomyLobo: so, when addressing a json api on a single http[s] server, httparty or rest-client?
[21:06:30] law: has left #ruby: ()
[21:06:35] gamename: has joined #ruby
[21:06:44] hotpancakes: has joined #ruby
[21:06:47] okdas: has joined #ruby
[21:06:47] okdas: has joined #ruby
[21:06:55] atmosx: TomyLobo: Depends on teh interface I guess. If you're more familiar with httparty go for it...
[21:07:04] TomyLobo: i'm not familiar with either
[21:07:32] TheNet: has joined #ruby
[21:07:34] Yiota: has joined #ruby
[21:08:35] KnowledgeOwl: has joined #ruby
[21:08:53] mcgain: has joined #ruby
[21:09:38] atmosx: I used faraday once, it was kinda nice... At the tiem I thought it was easier than httparty. Never looked into rest-client. Here is a sample code: https://github.com/atmosx/pritory/blob/master/helpers/skroutz.rb#L55
[21:10:34] KnowledgeOwl: has joined #ruby
[21:11:06] Yiota: has joined #ruby
[21:11:23] northfurr: has joined #ruby
[21:11:28] Flemzord: has joined #ruby
[21:11:30] havenwood: TomyLobo: Here's another option with a nice interface that's not based off of Net::HTTP: https://github.com/httprb/http#readme
[21:11:59] jackjackdripper: has joined #ruby
[21:12:40] TomyLobo: holy shit RestClient is slow
[21:13:34] KnowledgeOwl: has joined #ruby
[21:13:40] TomyLobo: havenwood, so it's definitely not RestClient :D
[21:13:56] TomyLobo: that chaining api is nice. can i preconfigure a base url?
[21:14:04] havenwood: TomyLobo: Depends if it's good at what you're using it for I suppose.
[21:14:14] TomyLobo: ah, HTTP.persistent, isnt it?
[21:15:41] FernandoBasso: has joined #ruby
[21:16:33] KnowledgeOwl: has joined #ruby
[21:16:33] TomyLobo: havenwood, the documentation is kinda lacking, or am i missing anything?
[21:16:52] havenwood: TomyLobo: There's documentation?
[21:17:01] TomyLobo: for instance, i cant find anything about HTTP.persistent apart from this one accidental example
[21:17:09] Musashi007: has joined #ruby
[21:17:27] Michael_Ryan: has joined #ruby
[21:17:49] Michael_Ryan: has left #ruby: ()
[21:17:58] zanloy: has joined #ruby
[21:19:47] troulouliou_div2: has joined #ruby
[21:20:22] tomphp_: has joined #ruby
[21:20:25] havenwood: TomyLobo: https://github.com/httprb/http/blob/1dd3da243d58f34728fffb190e1317b67564b1a4/spec/lib/http_spec.rb#L207-L228
[21:21:26] arooni-mobile: has joined #ruby
[21:22:19] havenwood: TomyLobo: Yeah, documentation is lacking.
[21:23:13] [spoiler]: havenwood, TomyLobo: good code documents itself!
[21:23:31] KnowledgeOwl: has joined #ruby
[21:24:30] Trynemjoel: has joined #ruby
[21:25:02] troulouliou_divn: has joined #ruby
[21:27:01] rideh: has joined #ruby
[21:28:17] infernix: I have a variable called @boot_order which is an array that can be [ "hd" ] or [ "network" ] or [ "hd", "network" ] or [ ""network", "hd" ]. I also have variables called @hd and @network which are arrays of devices I want to do something with. Is there some way to address these @hd and/or @network variables in a .each_with_index loop based on the contents of @boot_order?
[21:29:12] infernix: e.g. some way of expanding the values of the @boot_order array into defined variables that are already defined?
[21:29:35] KnowledgeOwl: has joined #ruby
[21:29:53] nonparfumee: has joined #ruby
[21:29:59] jhass: devices = {"hd" => @hd, "network" => @network}
[21:30:09] jhass: perhaps store as such a hash in the first place
[21:31:02] infernix: yeah, but the order has to follow the order in the @boot_order var. that's the tricky part
[21:31:06] infernix: otherwise it wouldn't matter
[21:31:15] jhass: that's not tricky at all
[21:31:51] jhass: @boot_order.flat_map {|category| devices[category] }
[21:31:57] infernix: i'm not seeing a nicer way other than to make it into: if @boot_order[0] = foo .... elsif @boot_order[0] = bar ... end
[21:32:44] bmcginty: has joined #ruby
[21:33:17] rodfersou: has joined #ruby
[21:33:26] Tristan-Speccy: has joined #ruby
[21:33:58] chichou: has joined #ruby
[21:34:04] al2o3-cr: has joined #ruby
[21:34:19] hotpancakes: has joined #ruby
[21:34:19] burgestrand: has joined #ruby
[21:34:53] infernix: that looks nice, thanks!
[21:34:55] jhass: if it's still not clear to you, I guess your actual problem is on the "something"
[21:36:44] burgestrand: has joined #ruby
[21:37:35] josh: has joined #ruby
[21:38:03] infernix: the something is altering xml with nokogiri, that's rather straightforward
[21:39:01] Trynemjoel: has joined #ruby
[21:40:17] jenrzzz: has joined #ruby
[21:40:36] conor_: has joined #ruby
[21:42:35] KnowledgeOwl: has joined #ruby
[21:42:39] devoldmx: has joined #ruby
[21:43:30] [spoiler]: jhass, TomyLobo: god code documents itself! (re: httprb being poorly documented)
[21:44:04] jhass: so the perfect code is always a quine, since it needs to generate its own doc comments?
[21:44:56] burgestrand: has joined #ruby
[21:44:57] [spoiler]: btw I have to go to bed, my cat is sick and he wants to cuddle before he falls asleep :/
[21:45:13] [spoiler]: Cheers and tty tomorrow! <3></3>
[21:46:01] Trynemjoel: has joined #ruby
[21:46:08] baweaver: has joined #ruby
[21:46:14] tubuliferous_: has joined #ruby
[21:48:04] conor_: has joined #ruby
[21:48:52] Yzguy: has joined #ruby
[21:49:52] n_blownapart: has joined #ruby
[21:51:02] TomyLobo: https://docs.atlassian.com/jira/REST/latest/ the requests in JIRA's API all tart with /jira/rest/api/2/. would you include that in the base path or not?
[21:51:41] kallisti5: are ruby's sort's guaranteed to be consistant?
[21:51:59] TomyLobo: consistent? you mean stable?
[21:52:10] kallisti5: I swear it is sorting - vs : differently
[21:52:26] avahey: has joined #ruby
[21:52:29] TomyLobo: maybe according to locale
[21:52:31] conor_: has joined #ruby
[21:52:57] kallisti5: in one sort: gvfs-common, gvfs:amd64
[21:53:05] kallisti5: in another: gvfs:amd64, gvfs-common
[21:53:32] Trynemjoel: has joined #ruby
[21:53:36] kallisti5: doing a sort_by in each case
[21:53:43] burgestrand: has joined #ruby
[21:54:43] conor_: has joined #ruby
[21:54:48] kallisti5: also. one sort: libasound2-data, libasound2:amd64 another: libasound2:amd64, libasound2-data
[21:54:58] niemcu: has joined #ruby
[21:55:06] benlieb: has joined #ruby
[21:55:18] kallisti5: strangest thing ever.. sort one seems to favor - while sort 2 favors : all from the same sort_by
[21:56:02] chichouw: has joined #ruby
[21:58:17] lannonbr: has joined #ruby
[22:00:42] lalalaaa: has joined #ruby
[22:00:51] swgillespie: has joined #ruby
[22:01:25] decoponio: has joined #ruby
[22:04:02] nofxx: has joined #ruby
[22:04:50] mistermocha: has joined #ruby
[22:06:02] [H]unt3r: has joined #ruby
[22:06:18] jenrzzz: has joined #ruby
[22:06:43] dimasg: has joined #ruby
[22:08:33] Trynemjoel: has joined #ruby
[22:08:47] TomyLobo: maybe your sort considers them equal and your sort is either not stable or your source dataset has them in varying relative orders
[22:08:54] okay: has joined #ruby
[22:09:13] kallisti5: I did do a uniq on one :-\
[22:11:24] ellisTAA: has joined #ruby
[22:13:09] binaryplease: has joined #ruby
[22:13:21] kallisti5: so weird. i'm using the same data for each array... how could it differ? I wrote a test case and it works fine
[22:13:35] kallisti5: http://pastebin.com/qRrvuwvS
[22:13:35] ruboto: kallisti5, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/a4dac4dffa4b97ddab6a
[22:13:35] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[22:14:15] jbw_: has joined #ruby
[22:14:33] KnowledgeOwl: has joined #ruby
[22:14:34] kallisti5: the only difference is the uniq on one of them
[22:14:39] kallisti5: ACTION tries that in his test case
[22:15:26] binaryplease: has joined #ruby
[22:16:22] lthomas: has joined #ruby
[22:16:53] ascarter: has joined #ruby
[22:17:05] Asher1: has joined #ruby
[22:17:54] chichouw: kallisti5: if your gist reflects your code, be aware that chaining uniq! might be dangerous
[22:17:56] bruno-: has joined #ruby
[22:18:34] bradland: chichouw: interesting. what are the risks of chaining uniq! ?
[22:18:37] kallisti5: chichouw: yeah. just broke it out
[22:18:42] chichouw: it can return nil
[22:18:54] chichouw: if no changes are made
[22:19:59] chichouw: in a more general perspective, read every bang method's documentation, it could return (or not return) what you expect
[22:20:10] radgeRayden: has joined #ruby
[22:21:26] conor_: has joined #ruby
[22:21:34] j4cknewt: has joined #ruby
[22:21:58] ellisTAA: has joined #ruby
[22:22:09] chichouw: and one tip about the doc too, read the one concerning your ruby version :)
[22:22:29] Asher: has joined #ruby
[22:24:15] baweaver: has joined #ruby
[22:24:48] Symbiosisz1: has joined #ruby
[22:26:20] mary5030: has joined #ruby
[22:27:07] Kallis: has joined #ruby
[22:28:40] constantinexvi: has joined #ruby
[22:28:49] kallisti5: hm.. does putting a string into a hash value somehow change it?
[22:29:01] dopie: has joined #ruby
[22:29:04] Trynemjoel: has joined #ruby
[22:29:28] paulcsmith: has joined #ruby
[22:29:39] bradland: but you're probably asking the wrong question :)
[22:30:08] rickmasta: has joined #ruby
[22:30:25] bradland: >> h={};h[:foo]="bar";p h[:foo]
[22:30:26] ruboto: bradland # => "bar" ...check link for more (https://eval.in/414994)
[22:31:17] kaps: has joined #ruby
[22:31:17] kallisti5: reproduced it!
[22:31:50] kallisti5: http://pastebin.com/SWkn8tEr
[22:31:51] ruboto: kallisti5, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/b4e089bb783ca9a854dd
[22:31:51] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[22:32:02] Radar: <3 ruboto
[22:32:23] bradland: sry kallisti5, I don't do pastebin on principle
[22:32:23] Radar: kallisti5: :name != "name"
[22:33:57] bradland: don't sweat it, HashWithIndifferentAccess ruins everyone who uses rails
[22:34:15] kallisti5: yup... fixed
[22:34:25] kallisti5: thanks! :-D
[22:34:26] kaps: do you like hastebin and why you dont like pastebin ?
[22:34:57] bradland: ruboto explains it pretty well
[22:35:08] kaps: sorry haven't read ruboto's response
[22:35:11] jbwiv: has joined #ruby
[22:35:14] kaps: true that
[22:35:48] bradland: oh snap, ruboto reponses to gist now. didn't even notice.
[22:36:09] wfoiwnfelo: has joined #ruby
[22:36:30] hotpancakes: has joined #ruby
[22:40:34] tkuchiki: has joined #ruby
[22:42:07] Torrieri: has joined #ruby
[22:42:07] Torrieri: has joined #ruby
[22:43:50] nym: has joined #ruby
[22:44:35] Trynemjoel: has joined #ruby
[22:46:25] TomyLobo: has joined #ruby
[22:49:04] bruno-: has joined #ruby
[22:51:47] PaulCapestany: has joined #ruby
[22:52:36] Trynemjoel: has joined #ruby
[22:52:37] dr3w: has joined #ruby
[22:52:44] sdwrage: has joined #ruby
[22:54:04] DanielI: has joined #ruby
[22:54:32] Pupeno: has joined #ruby
[22:54:32] Pupeno: has joined #ruby
[22:56:51] kaps: has left #ruby: ()
[22:57:00] saddad: has joined #ruby
[22:57:35] jbw_: has joined #ruby
[22:58:26] devoldmx: has joined #ruby
[22:59:17] hahuang61: has joined #ruby
[22:59:58] davedev24: has joined #ruby
[23:02:13] ellisTAA: has joined #ruby
[23:02:29] lthomas: has joined #ruby
[23:02:55] lwu: has joined #ruby
[23:03:23] michael_mbp: has joined #ruby
[23:04:06] dopamean_: has joined #ruby
[23:05:20] phutchins: has joined #ruby
[23:05:27] sarkyniin: has joined #ruby
[23:05:33] blackmes1: has joined #ruby
[23:06:08] Trynemjoel: has joined #ruby
[23:08:16] juanca_: has joined #ruby
[23:09:00] jtdoncas: has joined #ruby
[23:09:53] jbwiv: has joined #ruby
[23:10:14] mistermocha: has joined #ruby
[23:10:27] Ropeney: has joined #ruby
[23:11:33] michaeldeol: has joined #ruby
[23:12:17] dopamean_: has joined #ruby
[23:13:21] startupality: has joined #ruby
[23:13:27] ivanskie: has joined #ruby
[23:16:03] djbkd: has joined #ruby
[23:16:53] lannonbr: has joined #ruby
[23:18:03] dudedudeman: has joined #ruby
[23:18:09] icedp: has joined #ruby
[23:18:24] ascarter: has joined #ruby
[23:19:37] binaryplease1: has joined #ruby
[23:22:25] bruno-: has joined #ruby
[23:23:21] dkphenom: has joined #ruby
[23:23:34] jackjackdripper1: has joined #ruby
[23:23:40] renanoronfle: has joined #ruby
[23:25:45] __butch__: has joined #ruby
[23:28:20] Torrieri: has joined #ruby
[23:28:21] jbw_: has joined #ruby
[23:29:42] hotpancakes: has joined #ruby
[23:30:15] Inside: has joined #ruby
[23:31:29] yfeldblum: has joined #ruby
[23:33:09] segmond: has joined #ruby
[23:34:56] baweaver: has joined #ruby
[23:35:22] ellisTAA: has joined #ruby
[23:35:51] rakm: has joined #ruby
[23:36:39] bmcginty: has joined #ruby
[23:39:19] bronson: has joined #ruby
[23:39:51] jbwiv: has joined #ruby
[23:39:55] ascarter: has joined #ruby
[23:40:45] kies: has joined #ruby
[23:42:48] rickmasta: has joined #ruby
[23:43:44] shevy: has joined #ruby
[23:46:07] MatthewsFace: has joined #ruby
[23:47:54] shevy: the topic mentions Ruby 2.2.2; 2.1.6; 2.0.0-p645:
[23:47:58] shevy: let's get rid of all but 2.2.2 \o/
[23:49:48] Amun-re: has joined #ruby
[23:49:57] Amun-re: has left #ruby: ()
[23:53:39] ellisTAA: has joined #ruby
[23:54:57] drbrain: 2.0.0 is still under active maintenance
[23:55:38] dimasg: has joined #ruby
[23:57:49] jamto11_: has joined #ruby
[23:58:10] jtdoncas: wow im an idiot, I just realize \o/ isn't a mouth open, but a guy cheering
[23:58:16] choke: has joined #ruby
[23:59:54] ellisTAA: has joined #ruby