« Back to channel list

#ruby - 21 September 2015

« Back 1 day Forward 1 day »
[00:00:12] meatherly: has joined #ruby
[00:01:47] minimalism: has joined #ruby
[00:01:53] zenguy_pc: has joined #ruby
[00:03:43] iamninja: has joined #ruby
[00:03:52] phutchins: has joined #ruby
[00:04:27] havenwood: has joined #ruby
[00:05:55] jjasonclark: has joined #ruby
[00:06:08] cndiv: has joined #ruby
[00:07:35] `mrspock: has joined #ruby
[00:07:42] minimalism: has joined #ruby
[00:10:11] workmad3: has joined #ruby
[00:11:03] jxv: has joined #ruby
[00:13:17] eam: Ox0dea: oh come on, a quote operator to suppress magic is bad because the syntax is too magic?
[00:13:37] shmilan: has joined #ruby
[00:14:19] platzhirsch: has left #ruby: ()
[00:15:32] Ox0dea: No, I was only having a go at regular expressions in general.
[00:16:04] Ox0dea: \Q...\E is pretty convenient; it's quite strange that so featureful an engine as Onigmo doesn't have something like it.
[00:17:13] freerobby: has joined #ruby
[00:19:50] tenseiten: has joined #ruby
[00:22:21] ddrmanxbxfr: has joined #ruby
[00:22:42] zenguy_pc: has joined #ruby
[00:24:23] yfeldblum: has joined #ruby
[00:25:09] michael_mbp: has joined #ruby
[00:26:01] jgt1: has joined #ruby
[00:28:11] platzhirsch: has joined #ruby
[00:28:15] platzhirsch: has left #ruby: ()
[00:28:54] cantaberry: has joined #ruby
[00:29:05] platzhirsch: has joined #ruby
[00:29:40] yfeldblum: has joined #ruby
[00:33:52] doublemalt_: has joined #ruby
[00:37:36] strcmp1: has joined #ruby
[00:40:03] willharrison: has joined #ruby
[00:42:31] wookiehangover: has joined #ruby
[00:47:46] Technodrome: has joined #ruby
[00:54:33] charliesome: has joined #ruby
[00:55:08] pecpec: has joined #ruby
[01:01:17] rickmasta: has joined #ruby
[01:02:24] stardiviner: has joined #ruby
[01:03:53] ckuhn: has joined #ruby
[01:05:41] centrx: has joined #ruby
[01:07:45] benlieb: has joined #ruby
[01:10:03] diego1: has joined #ruby
[01:10:09] diego1: has joined #ruby
[01:10:36] chills42: has joined #ruby
[01:10:59] pontiki: has joined #ruby
[01:12:29] devoldmx: has joined #ruby
[01:24:16] cbz: has joined #ruby
[01:24:16] cbz: has joined #ruby
[01:28:17] drewvanstone: has joined #ruby
[01:29:51] thang: has joined #ruby
[01:32:14] XiaoJiang: has joined #ruby
[01:34:51] Ox0dea: >> require 'digest/bubblebabble'; Digest.bubblebabble 'XiaoJiang'
[01:34:52] ruboto: Ox0dea # => "xikak-nemik-zydak-nimik-vonix" (https://eval.in/436434)
[01:34:56] XiaoJiang: has left #ruby: ()
[01:35:25] weemsledeux: has joined #ruby
[01:37:52] deg-: has joined #ruby
[01:41:06] einarj: has joined #ruby
[01:44:45] allcentury: has joined #ruby
[01:49:35] segfalt: has joined #ruby
[01:51:35] mary5030: has joined #ruby
[01:52:00] willharrison: has joined #ruby
[01:54:16] Technodrome: has joined #ruby
[01:54:51] ICantCook: has joined #ruby
[01:55:41] cbz: has joined #ruby
[01:55:52] pecpec: has joined #ruby
[01:55:55] postmodern: has joined #ruby
[01:56:22] jtoy: is there a documentation/resource I can find more about Proxy class pattern? I'm on my last Koan and don't want a spoiler from good but I need something to read more about Proxy classes
[01:58:20] workmad3: has joined #ruby
[01:58:41] vdamewood: has joined #ruby
[01:59:41] freerobby: has joined #ruby
[02:00:18] havenwood: has joined #ruby
[02:00:30] chills42: has joined #ruby
[02:01:03] Ox0dea: pontiki: BubbleBabble is like MD5 with aliens.
[02:01:30] Ox0dea: jt__: It might help to think of a proxy class as a sort of middleman.
[02:01:36] pontiki: i think i'll start using that GUIDs!
[02:02:13] Guest37085: has joined #ruby
[02:03:57] jtoy: why/when do we need it?
[02:04:13] Ox0dea: jt__: When you can't/would rather not modify the object being proxied.
[02:04:42] Ox0dea: Your proxy class, for all intents and purposes, *is* the object it's proxying, except you have free reign to inject extra behavior as and where appropriate.
[02:05:15] A124: has joined #ruby
[02:05:36] jtoy: that helped clear things up. Is it like the decorator in Python?
[02:05:52] Ox0dea: jt__: No, not quite; that's for tacking additional behavior onto methods, not objects.
[02:06:53] CBke: has joined #ruby
[02:06:53] CBke: has joined #ruby
[02:07:39] rgb-one: https://gist.github.com/rgb-one/c24a9f270c5a1ddbf40b
[02:07:46] rgb-one: I would appreciate some assistancee
[02:08:19] Ox0dea: jt__: A decorator goes "above" the method it's decorating, whereas a proxy object is more in the middle.
[02:08:27] danman: has joined #ruby
[02:09:34] jtoy: I'll read more about it, your description is quite clear I probably look for concrete example for it's usage
[02:09:41] Ox0dea: rgb-one: Are you not even executing your code?
[02:10:24] Ox0dea: rgb-one: You have two syntax errors and an undefined variable.
[02:10:58] rgb-one: sorry about that
[02:11:41] mary5030: has joined #ruby
[02:11:56] newtonianb: has joined #ruby
[02:12:27] mary5030_: has joined #ruby
[02:12:44] Melpaws: has joined #ruby
[02:13:31] mary5030_: has joined #ruby
[02:14:12] Ox0dea: rgb-one: What do you think `value` is in the code you provided?
[02:14:19] Rodya_: has joined #ruby
[02:14:53] rgb-one: https://gist.github.com/rgb-one/c24a9f270c5a1ddbf40b I have made amendments
[02:15:59] Ox0dea: rgb-one: You should familiarize yourself with the (Regexp, Hash) form of #gsub.
[02:16:33] rgb-one: Ox0dea: can you give me an example?
[02:16:48] Ox0dea: >> map = {'a' => 1, 'b' => 2}; 'ababba'.gsub(/\w/, map) # rgb-one
[02:16:49] ruboto: Ox0dea # => "121221" (https://eval.in/436436)
[02:16:58] Ox0dea: Observe that the keys must be Strings, not Symbols.
[02:17:30] rgb-one: Ox0dea: cool
[02:17:34] Ox0dea: Isn't it?
[02:17:44] rgb-one: or I could use .to_s right?
[02:18:02] Ox0dea: But then you've got to open an explicit block and forfeit the convenience of this form.
[02:18:49] Ox0dea: If you're worried about performance or some such, you needn't; Hash keys are frozen by default.
[02:18:59] Ox0dea: >> {'a'=>1}.keys[0].frozen?
[02:19:00] ruboto: Ox0dea # => true (https://eval.in/436437)
[02:19:44] rgb-one: What is the advantage to using symbols?
[02:20:11] rgb-one: advantage of using symbols*
[02:21:04] rgb-one: Ox0dea: Better formulated, What have you found symbols most useful for?
[02:23:04] Ox0dea: rgb-one: If you ever see the same String more than once or twice in your code, it should almost certainly be a Symbol.
[02:23:39] Ox0dea: They're much more "computationally effective", so to speak, in both time and space.
[02:24:01] jjasonclark: has joined #ruby
[02:24:03] Ox0dea: When you compare two Strings, Ruby has to walk each one and compare every single character until it runs out or realizes they can't possibly match.
[02:24:19] ledestin: has joined #ruby
[02:24:24] Ox0dea: That could translate to hundreds or even thousands of CPU instructions.
[02:25:08] Ox0dea: Symbols, on the other hand, are Strings with a secret: they have ID numbers, and comparing two numbers is typically a single CPU instruction.
[02:25:29] Ox0dea: Aye, O(1).
[02:25:34] Ox0dea: O(1) is love, O(1) is life.
[02:26:08] rgb-one: is there an alternative to \w but for symbols?
[02:26:36] Ox0dea: rgb-one: There is \W, which is the exact opposite of \w, which might be what you want.
[02:26:54] rgb-one: Interesting
[02:27:18] Ox0dea: There's also the [:punct:] character class for strictly matching those characters which the current locale defines to be punctuation.
[02:28:08] Ox0dea: >> 'a$%b(cd&!e*'.scan /[[:punct:]]/
[02:28:09] ruboto: Ox0dea # => ["%", "(", "&", "!", "*"] (https://eval.in/436438)
[02:29:45] swgillespie: has joined #ruby
[02:29:51] sp4rrow: has joined #ruby
[02:31:05] Ox0dea: rgb-one: Did you figure out how to do your slang transformation with a single #gsub, then?
[02:31:34] rgb-one: Ox0dea: No, I tried /\W/ but it doesn't work
[02:31:39] banjara: has joined #ruby
[02:31:57] Ox0dea: rgb-one: Hm, why shouldn't \w suffice?
[02:32:14] rgb-one: I didn't try it
[02:32:20] araujo_: has joined #ruby
[02:33:30] rgb-one: I get the same result
[02:34:25] Ox0dea: Are you using the (Regexp, Hash) form?
[02:34:34] rgb-one: This is what I have https://gist.github.com/rgb-one/c24a9f270c5a1ddbf40b
[02:34:48] araujo_: has joined #ruby
[02:34:58] Ox0dea: rgb-one: You're only matching a single "word" character; surely you want to match several? :P
[02:35:24] Ox0dea: You've also got your regular expression in quotes, which makes it a string, which you don't want.
[02:36:12] Ox0dea: >> ['foo bar'.scan(/\w/), 'foo bar'.scan(/\w+/)]
[02:36:13] ruboto: Ox0dea # => [["f", "o", "o", "b", "a", "r"], ["foo", "bar"]] (https://eval.in/436439)
[02:36:27] Oka: has joined #ruby
[02:37:29] tttttttts: has joined #ruby
[02:37:41] tejasmanohar_: has joined #ruby
[02:38:41] flughafen: has joined #ruby
[02:38:48] rgb-one: :) Do you have a blog?
[02:39:35] Ox0dea: Just barely.
[02:40:38] Ox0dea: rgb-one: Did you follow all that, then?
[02:40:57] rgb-one: w+ for words
[02:41:01] rgb-one: w for characters
[02:41:35] Ox0dea: A workable distillaton of the thing for now, sure.
[02:42:00] Ox0dea: The '+' "metacharacter" means "repeat" for many more things than just \w.
[02:42:42] Rurik: has joined #ruby
[02:43:05] dzv: has left #ruby: ()
[02:43:14] rgb-one: until it meets a whitespace after which it will split the other text into another element
[02:44:02] Ox0dea: rgb-one: Right, \w+ means "match 'word' characters as long as you can".
[02:45:06] Ox0dea: It'll only "go to the next one" if you're using a method like #scan, which tries to find every occurrence.
[02:45:23] Ox0dea: The #match method, for instance, stops after just the one.
[02:45:31] Ox0dea: >> 'foo bar'.match(/\w+/)
[02:45:32] ruboto: Ox0dea # => #<MatchData "foo"> (https://eval.in/436440)
[02:46:32] Ox0dea: I'm going to stop oversaturating now; I wanna see this sentence get properly slangified.
[02:47:26] Ox0dea: I'm gonna roll. One more drink if I don't get all Strings.
[02:47:33] Ox0dea: >> [*ObjectSpace.each_object].sample 3
[02:47:34] ruboto: Ox0dea # => [<RubyVM::InstructionSequence:block in reset@/execpad/interpreters/ruby-2.2.0/lib/ruby/2.2.0/rubygem ...check link for more (https://eval.in/436441)
[02:47:53] rgb-one: The slang is indeed inserted but all the content from the original sentence is removed
[02:48:21] Ox0dea: rgb-one: Update the Gist?
[02:48:28] rgb-one: Ox0dea: all the other content that is. what remains is the content of the hash
[02:48:53] rickmasta: has joined #ruby
[02:48:53] jjasonclark: has joined #ruby
[02:48:53] Ox0dea: We're nearly there, and I think you'll like this next part. :)
[02:49:17] Ox0dea: Yep, you got it. So... what's happening?
[02:49:38] xcesariox: has joined #ruby
[02:49:54] rgb-one: only "4 Y U" is in the slang
[02:50:05] Ox0dea: rgb-one: Look at it the other way.
[02:50:58] rgb-one: "4 U Y" i meant
[02:51:08] rgb-one: Ox0dea: what do you mean?
[02:51:23] Ox0dea: It's the keys that matter, since that's what #gsub is using to find replacements.
[02:51:45] nofxx: has joined #ruby
[02:52:18] mondayrain: has joined #ruby
[02:52:24] rgb-one: I see so it disregards all else, ie. NOW and ASK
[02:52:33] Ox0dea: rgb-one: Nope, it isn't disregarding them.
[02:52:45] Ox0dea: Print the value of hash["NOW"]. :)
[02:53:05] rgb-one: there is no hash["NOW"]
[02:53:14] Ox0dea: But what is its value?
[02:53:30] Ox0dea: >> nil.to_s
[02:53:31] ruboto: Ox0dea # => "" (https://eval.in/436442)
[02:53:49] Ox0dea: So you see, #gsub is replacing "NOW" and "ASK" with "".
[02:54:52] headius: duncan_bayne: the thread pooling was mostly to reduce the cost of spinning up Ruby Threads a long time ago, but it was never really much better than just starting a new native thread each time
[02:55:01] headius: so it has been removed in 9k
[02:55:09] EminenceHC: has joined #ruby
[02:55:09] agent_white: has joined #ruby
[02:56:29] rgb-one: I would have to try a different method in order for show NOW and ASK, where hash doen't use NOW and ASK as values it seems.
[02:56:38] pecpec: has joined #ruby
[02:57:23] Ox0dea: rgb-one: And now for the piece de r??sistance!
[02:57:44] Ox0dea: >> foo = Hash.new { |h, k| k * 2 }; foo[21]
[02:57:45] ruboto: Ox0dea # => 42 (https://eval.in/436444)
[02:58:12] Ox0dea: You can tell Hashes to "do something" in order to return something other than nil for nonexistent keys.
[02:58:37] rgb-one: Ox0dea: I see
[02:59:44] Ox0dea: Note well that this "default proc" will only be invoked for missing keys; those with explicit values will respond as usual.
[02:59:59] mrtomme: has joined #ruby
[03:00:34] rushed: has joined #ruby
[03:01:00] gener1c_: has joined #ruby
[03:01:33] umgrosscol: has joined #ruby
[03:02:24] linuxboytoo: has joined #ruby
[03:03:11] rgb-one: so I would include something in the hash = {} function that would return the word instead of nil
[03:04:26] dreadnought8971: has joined #ruby
[03:04:49] rgb-one: as the key
[03:04:55] rgb-one: as the value*
[03:05:01] Ox0dea: rgb-one: `hash = {}` just defines a regular ol' Hash.
[03:05:12] Ox0dea: You'll have to use Hash.new with a block to get this special behavior.
[03:05:42] Ox0dea: The block receives two arguments, the Hash being queried, and the specific key being requested.
[03:06:09] Ox0dea: You're not particularly interested in the Hash itself, since you don't intend to modify it in any way.
[03:07:13] linuxboytoo: has joined #ruby
[03:07:27] Ox0dea: You just want to capture the key and respond with, well, that same key, since you're only interested in preventing non-slangable words from returning nil and becoming "" in the replacement string.
[03:09:24] rgb-one: >> foo = Hash.new { |h, k| k }; foo[21]
[03:09:25] ruboto: rgb-one # => 21 (https://eval.in/436445)
[03:09:57] braincrash: has joined #ruby
[03:10:40] Ox0dea: rgb-one: Yep. And now try sticking a few actual key-value pairs onto `foo` and see what happens.
[03:13:38] rgb-one: I would do that by simply doing something like foo = { "a" => "1", "b" => "2" }?
[03:14:34] nettoweb: has joined #ruby
[03:14:47] Ox0dea: rgb-one: No, that would redefine `foo` and throw away the special behavior from before.
[03:15:00] Ox0dea: Hashes are "mutable"; we can change them whenever we want.
[03:15:10] Ox0dea: >> foo = {a: 1}; foo[:b] = 2; foo[:c] = 3; foo
[03:15:11] ruboto: Ox0dea # => {:a=>1, :b=>2, :c=>3} (https://eval.in/436446)
[03:15:35] nsuke: has joined #ruby
[03:16:47] Ox0dea: rgb-one: It's all in place now. The finish line should be in sight. :)
[03:17:01] rgb-one: I can't see it lol
[03:17:55] Ox0dea: Well, you know how to create a Hash that conveniently "lies" about its contents, and you know how to stick truthful pairs into such a Hash.
[03:18:06] Ox0dea: That's exactly the kind of Hash you need in your call to #gsub.
[03:18:52] baweaver: has joined #ruby
[03:19:07] rgb-one: I can't astick the pairs into those hashes all at once? I have to do it individually?
[03:19:50] Ox0dea: rgb-one: ^_^ There is indeed one more thing, but make sure doing it indiviually works first?
[03:19:56] Ox0dea: *individually
[03:20:04] iateadonut: has joined #ruby
[03:22:00] dEPy: has joined #ruby
[03:22:15] rgb-one: https://gist.github.com/rgb-one/c24a9f270c5a1ddbf40b I get a fullstop now
[03:22:32] diego1: has joined #ruby
[03:22:51] diego1: has joined #ruby
[03:23:03] Cache_Money: has joined #ruby
[03:23:43] Ox0dea: rgb-one: Regarding Lines 5-7, one of those things is not like the other. :P
[03:23:45] ramfjord: has joined #ruby
[03:24:06] darkf: has joined #ruby
[03:24:08] mary5030: has joined #ruby
[03:24:16] araujo__: has joined #ruby
[03:24:49] Ox0dea: Did you get it?
[03:24:52] devbug: has joined #ruby
[03:24:58] Ox0dea: Excellent.
[03:25:13] Ox0dea: So, we can create "special" Hashes and then put "regular" pairs into them.
[03:25:20] tkuchiki: has joined #ruby
[03:25:32] Ox0dea: It'd be nice if we could just make a "regular" Hash and stick the "special" behavior on after, huh?
[03:26:26] rgb-one: foo = [k] = k?
[03:26:33] Ox0dea: Whoa, definitely not that. :)
[03:26:35] rgb-one: foo[k] = k?
[03:27:00] Ox0dea: Nah, we've got to use one of the many convenient methods Ruby provides us with.
[03:27:34] Ox0dea: Its name is #default_proc.
[03:27:58] rgb-one: proc = process?
[03:28:12] Ox0dea: "Procedure" is better.
[03:28:58] ckuhn: has joined #ruby
[03:29:06] Ox0dea: >> foo = {1=>:one, 2=>:two}; foo.default_proc = proc { |h, k| k * 10 }; [foo[2], foo[1], foo[4.2]]
[03:29:07] ruboto: Ox0dea # => [:two, :one, 42.0] (https://eval.in/436448)
[03:30:13] Ox0dea: So you can define your slang transformation is a nice Hash literal as you were, and then tack on that "lie about your existence, non-slangable words" behavior afterwards.
[03:30:17] Ox0dea: *in a nice
[03:30:50] Voxxit: has joined #ruby
[03:33:16] swgillespie: has joined #ruby
[03:33:25] Rurik: has joined #ruby
[03:33:47] Rurik: has joined #ruby
[03:34:11] rgb-one: ruboto is an irb session right?
[03:34:45] Ox0dea: rgb-one: No, it starts a new Ruby process each time.
[03:35:10] Ox0dea: >> require 'English'; $PROCESS_ID
[03:35:11] ruboto: Ox0dea # => 20136 (https://eval.in/436453)
[03:35:12] Ox0dea: >> require 'English'; $PROCESS_ID
[03:35:13] ruboto: Ox0dea # => 20140 (https://eval.in/436454)
[03:36:48] gix: has joined #ruby
[03:38:05] rgb-one: Ox0dea: What gems (if any) do you use when creating command line applications?
[03:38:23] Ox0dea: rgb-one: Thor is quite nice.
[03:38:24] baweaver: You don't _really_ need any honestly.
[03:38:36] devbug_: has joined #ruby
[03:38:44] Ox0dea: baweaver parses command-line options manually, uphill both ways.
[03:38:53] baweaver: I'd start with just ARGV for basics and move from there to something like Optparse and then Thor
[03:39:03] Ox0dea: rgb-one: Just to cap all this off: https://gist.github.com/0x0dea/11c33823029559ba270f
[03:39:12] baweaver: helps to understand what you're abstracting some times.
[03:39:48] baweaver: and given earlier code, they probably only need basic inputs for now.
[03:40:27] bruno-: has joined #ruby
[03:40:35] renan: has joined #ruby
[03:40:45] renan: has left #ruby: ()
[03:41:08] michael_mbp: has joined #ruby
[03:42:05] rgb-one: #{word} converts word from a symbol to a string?
[03:42:16] Ox0dea: >> "#{:foo}"
[03:42:16] ruboto: Ox0dea # => "foo" (https://eval.in/436457)
[03:42:35] Ox0dea: String interpolation calls #to_s on the object being interpolated.
[03:42:37] Luming: has joined #ruby
[03:43:11] Ox0dea: All interpolation, I belive, just not for strings.
[03:43:31] Ox0dea: >> class Foo; def to_s; 'ohai'; end end; /#{Foo.new}/
[03:43:32] ruboto: Ox0dea # => /ohai/ (https://eval.in/436460)
[03:43:40] Ox0dea: *not just for
[03:44:10] weemsledeux: has joined #ruby
[03:45:23] Rurik: has joined #ruby
[03:45:34] swgillespie: has joined #ruby
[03:45:39] dreadnought8971: has joined #ruby
[03:46:22] workmad3: has joined #ruby
[03:52:51] Rurik: has joined #ruby
[03:53:41] jordanm: has joined #ruby
[03:54:10] marsjani-: has joined #ruby
[03:54:53] tejasmanohar: has joined #ruby
[03:57:07] diego1: has joined #ruby
[03:57:13] diego1: has joined #ruby
[03:57:23] pecpec: has joined #ruby
[03:58:05] Meow-J: has joined #ruby
[03:58:48] techietrash: has joined #ruby
[03:59:24] marsjaninzmarsa: has joined #ruby
[04:04:38] marsjaninzmarsa: has joined #ruby
[04:06:10] pepperbreath: has joined #ruby
[04:08:53] sotojuan: has joined #ruby
[04:09:03] bigmac: has joined #ruby
[04:09:13] tmtwd: has joined #ruby
[04:09:47] zenguy_pc: has joined #ruby
[04:10:41] ddrmanxbxfr: has joined #ruby
[04:11:35] krz: has joined #ruby
[04:12:15] swgillespie: has joined #ruby
[04:13:30] weemsledeux: has joined #ruby
[04:13:50] rgb-one: I have another intesting problem.
[04:13:59] rgb-one: Maybe I should leave this until a bit later
[04:14:18] rgb-one: Ox0dea: Give you a break eh :p
[04:15:04] Ox0dea: rgb-one: I'll roll. Help if I don't get all Strings. :)
[04:15:14] Ox0dea: >> [*ObjectSpace.each_object].sample 3
[04:15:15] ruboto: Ox0dea # => ["activated=", "@segments", "\\1\\2"] (https://eval.in/436472)
[04:15:19] Ox0dea: Sorry. :<
[04:15:27] Rurik: has joined #ruby
[04:15:27] Rurik: has joined #ruby
[04:15:36] jordanm: has joined #ruby
[04:16:29] rgb-one: I would like an alternative to product for making combinations of arrays
[04:16:49] pontiki: ACTION has visions of Ox0dea DMing a Ruby RPG
[04:17:55] pontiki: baweaver is, of course, the paladin
[04:18:48] beauby: has joined #ruby
[04:18:52] baweaver: Chaotic Good, love. Me and rules don't quite get along.
[04:19:07] banjara: has joined #ruby
[04:19:16] pontiki: well, you do seem to like making them :D
[04:19:56] baweaver: A valid point in some regards
[04:20:20] baweaver: though that's mainly to prevent people from wasting hours debating on the readability of ternaries or some other such nonsense.
[04:20:45] wookiehangover: has joined #ruby
[04:20:46] rickmasta: has joined #ruby
[04:20:53] baweaver: Programming languages have alignments too
[04:21:13] rgb-one: I think you suggested gsub or something?
[04:21:18] rakm: has joined #ruby
[04:21:29] baweaver: Python is Lawful Good, Ruby is Chaotic Good, Java is Lawful Evil, RPG is Chaotic Evil
[04:21:39] yeticry: has joined #ruby
[04:21:51] baweaver: C is pure Neutral
[04:22:12] ckuhn: Java isn't that bad
[04:22:13] baweaver: might be an interesting chart to make later.
[04:22:26] baweaver: ACTION triggered
[04:22:32] baweaver: oh, we're going to have fun
[04:22:47] baweaver: Java is an abysmal language
[04:23:06] ckuhn: its successful for a reason
[04:23:10] pontiki: i think i've seen one someplace...
[04:23:13] ckuhn: i just dont know what one lol
[04:23:15] pontiki: but i'll never find it now
[04:23:17] baweaver: Unnecessary verbosity, nearly religious adherence to patterns in what can only be described as a cargo cult
[04:23:38] baweaver: don't confuse success with goodness
[04:23:42] baweaver: PHP is still popular
[04:23:57] pontiki: we're strictly speaking of alignements, anyway
[04:24:13] baweaver: One example then I'll lay off this line
[04:24:49] baweaver: http://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html#Example:_WordCount_v1.0
[04:24:53] baweaver: That is Hadoop wordcount
[04:25:25] rgb-one: It is what it is man
[04:25:27] baweaver: https://spark.apache.org/examples.html - That's spark
[04:25:49] baweaver: Five lines, and that's only because they're being nice for tutorial reasons.
[04:25:49] krz: has joined #ruby
[04:26:00] pontiki: oh hell man, you have to remove the comment lines...
[04:26:13] tubuliferous_: has joined #ruby
[04:26:40] baweaver: see the wordcount on spark
[04:26:41] ckuhn: But the java for that spark example isnt really that bad
[04:26:57] baweaver: Spark is written in Scala
[04:27:32] baweaver: It's still needlessly verbose.
[04:27:37] pontiki: Java is like High Church Episcopalean
[04:27:46] ckuhn: It is verbose
[04:27:53] baweaver: I prefer Scientology as a parallel
[04:28:02] ckuhn: Right tool for the right job
[04:28:08] ckuhn: That's all im sayin
[04:28:12] pontiki: not just verbose, highly ritualized, much pomp and gilt
[04:28:12] baweaver: Java is not the right tool for any job
[04:28:20] Rurik: has joined #ruby
[04:28:30] ckuhn: If you have existing architecture in Java then it is..
[04:28:48] baweaver: If only there were languages which could leverage the JVM....
[04:29:20] baweaver: I don't advocate rewriting legacy, too much work, but the point is you'd have to be mental to start new projects in those languages.
[04:29:27] pontiki: i've never experienced any scientology ... i don't even know the right word to use ... "service?"
[04:29:45] ckuhn: anyways. english homework needs to be done
[04:30:03] pontiki: come back to the programming!! we love you!!
[04:30:10] baweaver: pontiki: I'll write up a comparison between Scientology and Java some time for fun.
[04:30:17] baweaver: ACTION despises Java
[04:30:28] ckuhn: baweaver: Please share
[04:30:39] ckuhn: ACTION meh
[04:30:42] baweaver: it'll show up on baweaver.com eventually
[04:30:48] pontiki: i don't know as i'd have an appreciation for it :/
[04:31:22] baweaver: Spent a good half year on a hadoop team hating life, never again
[04:31:31] tkuchiki: has joined #ruby
[04:31:36] pontiki: but then i suppose quite a few folks have never been to a High Chruch Episcopal service, either
[04:31:51] ckuhn: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[04:32:02] baweaver: Catholic and Orthodox for me
[04:32:10] baweaver: so close enough
[04:32:15] pontiki: oh, then of course there's the Eastern Orthodox.. well there youare
[04:32:27] baweaver: Good friend is EO
[04:32:45] baweaver: Protestant myself, though I have a thing for histories.
[04:33:04] pontiki: thing is though, i can really enjoy things like that, it's a bit of spiritual tourism, where writing Java is never anything like that
[04:33:13] baweaver: So I suppose I have even more reason to compulsively follow rules.
[04:33:46] baweaver: Scientology is a straight cult, so too would I call GoF pattern card holders
[04:33:47] pontiki: zen here, which probably fits with pre-CL lisp too much
[04:33:49] havenwood: I grew up Quaker but now I'm a Rubyist.
[04:34:30] baweaver: I can tell what language people originally used when they start ruby
[04:34:34] baweaver: amusing sometimes
[04:34:42] baweaver: Maybe I'll do a writeup on that for humor some time.
[04:34:59] pontiki: i have an acquaintance that no matter which language he tries, he writes in Pascal
[04:35:01] baweaver: Accents in Rubyland
[04:35:08] pontiki: oh that would be funny
[04:35:33] baweaver: http://www.willamette.edu/~fruehr/haskell/evolution.html - reminds me of this in a way.
[04:37:59] tjbiddle: has joined #ruby
[04:39:01] pontiki: ok, it's getting late
[04:42:29] Feyn: has joined #ruby
[04:43:33] cbz: has joined #ruby
[04:44:36] allcentury: has joined #ruby
[04:47:11] zenguy_pc: has joined #ruby
[04:47:41] sanjayu: has joined #ruby
[04:49:08] michael_mbp: has joined #ruby
[04:50:55] allcentury: has joined #ruby
[04:51:00] snsei: has joined #ruby
[04:51:39] baweaver: ACTION goes back to Mastering Algorithms with C
[04:55:21] framling: has joined #ruby
[04:55:44] j4cknewt: has joined #ruby
[04:58:07] pecpec: has joined #ruby
[04:59:01] naftilos76: has joined #ruby
[05:00:48] Soda: has joined #ruby
[05:01:42] nyon: has joined #ruby
[05:01:48] pawnbox: has joined #ruby
[05:06:38] zenguy_pc: has joined #ruby
[05:08:10] roger_rabbit: has joined #ruby
[05:09:58] dhjondoh: has joined #ruby
[05:15:24] CloCkWeRX: has joined #ruby
[05:17:20] allcentury: has joined #ruby
[05:17:55] karapetyan: has joined #ruby
[05:19:43] pawnbox: has joined #ruby
[05:20:36] bigkevmcd: has joined #ruby
[05:21:40] yottanami1: has joined #ruby
[05:22:28] yottanami1: I want to use an Soap API, As I checked the stable version of Savon does not support wsdl imports, Is any alternative?
[05:26:56] tmtwd: has joined #ruby
[05:29:58] sanjayu: has joined #ruby
[05:29:58] pawnbox: has joined #ruby
[05:31:15] Nilium: "I want to use an Soap API" is up there with the likes of "I enjoy physical suffering"
[05:31:17] tejasmanohar_: has joined #ruby
[05:32:45] swgillespie: has joined #ruby
[05:34:29] workmad3: has joined #ruby
[05:38:13] codenapper: has joined #ruby
[05:39:22] paradisaeidae: has joined #ruby
[05:39:26] xcesariox: has joined #ruby
[05:39:37] karapetyan: has joined #ruby
[05:40:36] claw: has joined #ruby
[05:43:05] rickmasta: has joined #ruby
[05:45:13] yottanami1: Nilium, I have to work with Soap, I need to use an API that is WSDL
[05:45:19] yottanami1: any recommendation?
[05:45:25] yottanami1: Which gem should I use?
[05:46:47] lxsameer: has joined #ruby
[05:48:15] khebbie: has joined #ruby
[05:48:35] yardenbar: has joined #ruby
[05:50:01] Nilium: Not a clue. Finding maintained gems is kind of a pain.
[05:51:59] last_staff: has joined #ruby
[05:55:01] shevy: write once, abandon always
[05:55:02] roxtrongo: has joined #ruby
[05:55:32] shevy: it would be nice if gems could have some tags on rubygems.org like "hey people, I wrote this in 2010 but I don't have time to maintain it; if anyone wants to maintain it, send an email"
[05:56:41] Nilium: Closest you can really get to that is checking the gem release date. The better thing would be to make the search feature on rubygems.org not awful.
[05:56:53] agent_white: has left #ruby: ()
[05:57:22] Nilium: i.e., allow pruning results based on last release time, whether there's ever been a non-1.x.y or greater release, whether the author is a deranged lunatic, etc.
[05:57:45] j4cknewt: has joined #ruby
[05:58:53] pecpec: has joined #ruby
[06:02:30] alexUaN: has joined #ruby
[06:05:11] psye: has joined #ruby
[06:12:31] eGGsha: has joined #ruby
[06:12:36] ramfjord: has joined #ruby
[06:12:57] lsmola: has joined #ruby
[06:15:11] zotherstupidguy: has joined #ruby
[06:23:03] lapide_viridi: has joined #ruby
[06:26:32] tkuchiki: has joined #ruby
[06:27:08] firstdayonthejob: has joined #ruby
[06:29:12] emilkarl: has joined #ruby
[06:30:01] raddazong: has joined #ruby
[06:30:14] raddazong: has joined #ruby
[06:31:18] raddazong: has joined #ruby
[06:39:01] diegoviola: has joined #ruby
[06:39:10] diegoviola: has joined #ruby
[06:41:08] zenguy_pc: has joined #ruby
[06:42:55] weemsledeux: has joined #ruby
[06:43:21] Pupeno: has joined #ruby
[06:43:43] bigkevmcd: has joined #ruby
[06:45:22] j4cknewt_: has joined #ruby
[06:46:34] jas02: has joined #ruby
[06:47:45] skullcrasher: has joined #ruby
[06:48:47] Pupeno: has joined #ruby
[06:48:50] swgillespie: has joined #ruby
[06:49:34] howdoi: has joined #ruby
[06:49:37] Raboo: has joined #ruby
[06:50:21] arup_r: has joined #ruby
[06:51:03] zotherstupidguy: has joined #ruby
[06:53:22] bluOxigen: has joined #ruby
[06:53:24] niemcu: has joined #ruby
[06:57:46] yfeldblum: has joined #ruby
[06:58:28] dede__: has joined #ruby
[06:59:54] andikr: has joined #ruby
[07:00:25] mondayrain: has joined #ruby
[07:03:55] platinumchrome: has joined #ruby
[07:08:20] DoubleMalt: has joined #ruby
[07:11:16] pecpec: has joined #ruby
[07:11:45] ramfjord: has joined #ruby
[07:12:27] Guest21: has joined #ruby
[07:12:36] rushed: has joined #ruby
[07:12:42] niemcu: has joined #ruby
[07:13:13] User458764: has joined #ruby
[07:17:42] arup_r1: has joined #ruby
[07:18:19] towski_: has joined #ruby
[07:18:46] vondruch: has joined #ruby
[07:18:54] iyan: has joined #ruby
[07:19:43] faces: has joined #ruby
[07:19:43] wpp: has joined #ruby
[07:21:47] stardiviner: has joined #ruby
[07:22:33] workmad3: has joined #ruby
[07:24:19] jenrzzz: has joined #ruby
[07:25:48] Pupeno: has joined #ruby
[07:26:01] pecpec_: has joined #ruby
[07:27:04] vondruch: has joined #ruby
[07:27:36] pawnbox_: has joined #ruby
[07:28:14] roxtrongo: has joined #ruby
[07:30:55] keen__: has joined #ruby
[07:33:32] tkuchiki: has joined #ruby
[07:33:45] pawnbox: has joined #ruby
[07:34:46] darkhex: has joined #ruby
[07:36:06] SCHAAP137: has joined #ruby
[07:36:43] ndrei: has joined #ruby
[07:37:26] drewvanstone: has joined #ruby
[07:39:32] allcentury: has joined #ruby
[07:40:09] Balzrael: has joined #ruby
[07:41:05] karapetyan: has joined #ruby
[07:41:56] bruno-: has joined #ruby
[07:43:15] Pathfinder: has joined #ruby
[07:44:58] tjbiddle: has joined #ruby
[07:45:45] ruurd: has joined #ruby
[07:47:19] Hounddog: has joined #ruby
[07:49:27] blaxter: has joined #ruby
[07:51:59] sanjayu: has joined #ruby
[07:53:12] charliesome: has joined #ruby
[07:56:50] tesuji: has joined #ruby
[07:57:44] anisha_: has joined #ruby
[07:59:29] karapetyan: has joined #ruby
[07:59:50] karapetyan: has joined #ruby
[08:00:39] workmad3: has joined #ruby
[08:01:11] tomphp: has joined #ruby
[08:02:09] tjbiddle: has joined #ruby
[08:03:49] manfe: has joined #ruby
[08:07:21] aswen: has joined #ruby
[08:07:28] terlar: has joined #ruby
[08:07:41] allcentury: has joined #ruby
[08:08:34] krisquigley: has joined #ruby
[08:08:46] Igorshp: has joined #ruby
[08:08:49] Juanchito: has joined #ruby
[08:10:07] charliesome: has joined #ruby
[08:10:54] allomov: has joined #ruby
[08:11:05] j4cknewt: has joined #ruby
[08:11:53] allomov_: has joined #ruby
[08:12:19] pawnbox: has joined #ruby
[08:15:53] tjbiddle: has joined #ruby
[08:16:09] marr: has joined #ruby
[08:18:00] jschmid: has joined #ruby
[08:18:20] SOLDIERz: has joined #ruby
[08:18:30] rdark: has joined #ruby
[08:20:45] araujo: has joined #ruby
[08:20:45] araujo: has joined #ruby
[08:20:47] charliesome: has joined #ruby
[08:21:37] codecop: has joined #ruby
[08:22:21] c0m0: has joined #ruby
[08:22:43] Alina-malina: has joined #ruby
[08:22:46] arup_r: has joined #ruby
[08:24:42] Pathfinder: has joined #ruby
[08:25:22] Pumukel: has joined #ruby
[08:27:33] stardiviner: has joined #ruby
[08:37:02] slack232323: has joined #ruby
[08:38:55] Pathfinder_: has joined #ruby
[08:42:41] bruno-: has joined #ruby
[08:43:18] Stan: has joined #ruby
[08:43:24] ruurd: has joined #ruby
[08:44:05] blik71: has joined #ruby
[08:44:36] tvw: has joined #ruby
[08:48:12] rgb-one: A good morning to you. Happy Peace Day!
[08:49:31] yorickpeterse: Ther's a day for that?
[08:51:06] einarj: has joined #ruby
[08:51:45] j4cknewt: has joined #ruby
[08:52:17] leafybasil: has joined #ruby
[08:53:08] leafybas_: has joined #ruby
[08:53:12] chthon: has joined #ruby
[08:56:17] jhass: you mean Burger King day?
[08:56:55] mprelude: has joined #ruby
[08:57:48] howdoi: has joined #ruby
[08:59:06] davedev24: has joined #ruby
[08:59:08] Guest85414______: has joined #ruby
[08:59:54] Guest32: has joined #ruby
[09:00:36] Pumukel: has joined #ruby
[09:00:45] jmhmccr: has joined #ruby
[09:00:51] elliottcable: has joined #ruby
[09:01:40] pmarreck: has joined #ruby
[09:01:59] platzhirsch: has joined #ruby
[09:02:14] j4cknewt: has joined #ruby
[09:02:37] krainboltgreene: has joined #ruby
[09:02:57] im0b: has joined #ruby
[09:03:30] lkba: has joined #ruby
[09:03:51] neersighted: has joined #ruby
[09:04:20] keyvan: has joined #ruby
[09:04:38] arup_r: has joined #ruby
[09:05:22] ruurd: has joined #ruby
[09:05:35] wookiehangover: has joined #ruby
[09:07:03] shelling__: has joined #ruby
[09:07:25] akitada: has joined #ruby
[09:07:38] twodayslate: has joined #ruby
[09:09:30] khebbie_: has joined #ruby
[09:09:41] quazimodo: anyone know how to get bundle/bundler/setup.rb to require correctly when using bundler in standalone mode?
[09:10:14] benlovell: has joined #ruby
[09:10:37] AckZ: has joined #ruby
[09:11:30] dede__: has joined #ruby
[09:11:31] jgt1: has joined #ruby
[09:11:33] j4cknewt_: has joined #ruby
[09:11:48] lacrosse: has joined #ruby
[09:11:51] machty: has joined #ruby
[09:12:00] yo61: has joined #ruby
[09:12:38] jhass: doesn't install it a binstub?
[09:12:55] quazimodo: i have no idea what binstubs are or how to use them
[09:13:10] jhass: bin/bundle exec ruby foo.rb or something iirc
[09:13:30] quazimodo: looks like it
[09:13:40] bove: has joined #ruby
[09:13:43] quazimodo: but it's a standalone bundler, so i have to include the script it builds (setup.rb)
[09:14:02] benlakey: has joined #ruby
[09:14:22] jhass: thus bin/bundle and not bundle
[09:14:32] workmad3: has joined #ruby
[09:14:36] lancetw: has joined #ruby
[09:15:18] solars: has joined #ruby
[09:16:00] haxrbyte: has joined #ruby
[09:16:47] jhass: mmh, guess I'm wrong
[09:17:05] preyalone: has joined #ruby
[09:17:24] timonv: has joined #ruby
[09:17:40] jhass: I guess you'd just add the bundle directory to the loadpath
[09:17:51] jhass: ruby -Ibundle -rbundler/setup foo.rb
[09:17:58] prosodyC: has joined #ruby
[09:18:04] dmolina: has joined #ruby
[09:18:21] jhass: or $LOAD_PATH.unshift(File.join(__dir__, "bundle")) or something in code
[09:18:53] ruurd: has joined #ruby
[09:19:37] alexUaN: has joined #ruby
[09:21:27] Juanchito: has joined #ruby
[09:22:46] countryHick: has joined #ruby
[09:22:55] ValicekB: has joined #ruby
[09:23:35] startupality: has joined #ruby
[09:23:55] platzhirsch: has joined #ruby
[09:24:59] Heero: has joined #ruby
[09:26:38] j4cknewt: has joined #ruby
[09:27:15] tkuchiki: has joined #ruby
[09:27:40] tomphp_: has joined #ruby
[09:27:52] Balzrael: has joined #ruby
[09:28:09] hs366: has joined #ruby
[09:29:51] ruurd: has joined #ruby
[09:31:23] benlovell: has joined #ruby
[09:34:13] sepp2k: has joined #ruby
[09:36:30] nettoweb: has joined #ruby
[09:36:52] bweston92: has joined #ruby
[09:39:42] Meow-J: has joined #ruby
[09:40:15] terlar: has joined #ruby
[09:40:21] iamdevnul: has joined #ruby
[09:41:07] j4cknewt_: has joined #ruby
[09:42:29] Lloyd: has joined #ruby
[09:43:14] flughafen: has joined #ruby
[09:44:38] DoYouKnow: has joined #ruby
[09:45:19] codeitagile: has joined #ruby
[09:46:47] joaomdmoura: has joined #ruby
[09:46:53] flughafen: hey shevy certainty
[09:47:43] Igorshp: has joined #ruby
[09:47:53] pontiki: has joined #ruby
[09:49:50] arup_r1: has joined #ruby
[09:50:33] khebbie: has joined #ruby
[09:50:53] platzhirsch: flughafen.. really?
[09:51:04] flughafen: hi platzhirsch
[09:51:07] jabreity: has joined #ruby
[09:51:08] yorickpeterse: platzhirsch: ???(???)???
[09:51:39] platzhirsch: Has anyone of you used a fuzzy searcher? I installed fzf yesterday and integrated it into Vim for Ruby and I must have wetted myself several times on that evening
[09:52:14] pontiki: you mean in an editor, not in a ruby program?
[09:52:32] yorickpeterse: Nop, I use Fish
[09:52:37] ifmy: has joined #ruby
[09:52:43] yorickpeterse: https://github.com/junegunn/fzf if you're referring to this fzf
[09:53:38] DrCode: has joined #ruby
[09:57:45] pontiki: maybe it's not going so well ...
[09:57:59] stamina: has joined #ruby
[10:00:25] shevy: flughafen you were in the news again; this time the entry hall is about to collapse: http://www.tagesspiegel.de/berlin/hauptstadtflughafen-schoenefeld-ber-terminal-wegen-einsturzgefahr-gesperrt/12344298.html
[10:01:37] allcentury: has joined #ruby
[10:01:55] flughafen: for being a new aiport, it looks lame
[10:02:16] devoldmx: has joined #ruby
[10:06:08] Beoran_: has joined #ruby
[10:06:08] platzhirsch: yorickpeterse: yes
[10:06:33] platzhirsch: shevy: haha, it's so ridiculous, I feel sorry for my beloved home town
[10:06:37] ericjphillips: has joined #ruby
[10:07:08] yorickpeterse: platzhirsch: https://asciinema.org/a/dbpikjegylgdchpkxuy32710w Fish in action
[10:07:52] yorickpeterse: that's mostly history complete though, but it does also come with command completion
[10:07:57] rgb-one: https://gist.github.com/rgb-one/6a97e96b9732c837c025
[10:08:39] rgb-one: Thanks in advance
[10:08:47] platzhirsch: yorickpeterse: looks pretty sick, they definitely serve different purposes from what I can tell, does it replace bash?
[10:09:18] yorickpeterse: But that's a good thing, at least for me
[10:09:25] yorickpeterse: So far the only thing from Bash that I miss is `set -e`
[10:09:29] yorickpeterse: Fish doesn't have anything like that
[10:09:57] platzhirsch: yeah I am a bit reluctant to do that I think
[10:10:08] platzhirsch: that's why I didn't touch zsh
[10:10:08] yorickpeterse: You can do something like `command1 and command2 and command3` and it will only execute the next one if the former one succeeds
[10:10:11] platzhirsch: or however it's called
[10:10:26] yorickpeterse: oh, I used bash for years and only recently made the switch
[10:11:08] yorickpeterse: http://i.imgur.com/pZ8Tgvo.gif basically sums it up
[10:11:11] shafire: has joined #ruby
[10:11:14] darix: zsh 4 life
[10:11:26] shevy: you are such a chicken yorickpeterse!!!
[10:11:32] shafire: is there any way to get a "static" type system into ruby?
[10:11:41] darix: shafire: what do you mean?
[10:12:06] yorickpeterse: Ruby is dynamically typed with no way to chance that. There are some Gems that implement runtime contracts for methods, but that's about it
[10:12:20] yorickpeterse: https://github.com/egonSchiele/contracts.ruby for example
[10:12:35] yorickpeterse: but honestly runtime type checking does more harm than good I'd say
[10:12:42] shafire: these contracts look good
[10:12:55] shafire: want some type safety between scala/jruby
[10:13:07] Salehi: has joined #ruby
[10:13:16] darix: shafire: how does your scala and ruby communicate with each other?
[10:13:20] yorickpeterse: This does not give you type safety
[10:13:23] darix: in process
[10:13:26] yorickpeterse: At least not compile time type safety
[10:13:35] ccooke: There's http://crystal-lang.org/ which is a language based on ruby (but importantly is not ruby) which does static typing
[10:13:39] yorickpeterse: meaning it's not any more useful than writing proper tests
[10:15:43] moeabdol: has joined #ruby
[10:15:59] platzhirsch: darix: on which OS are you?
[10:16:03] darix: platzhirsch: opensuse
[10:16:20] platzhirsch: ah okay, I always thought zsh is a OS X thing because their bash sucks
[10:16:28] platzhirsch: guess I am WRONG
[10:16:38] shevy: I settled for bash because I am so lazy
[10:16:41] yorickpeterse: zsh certainly is popular amongst the OS X hipsters
[10:16:56] shafire: if you use zsh, use also oh-my-zsh :-)
[10:16:58] darix: platzhirsch: bash is probably the same on osx as it is on linux. their default config might suck.
[10:17:01] yorickpeterse: funny enough I've met quite a few that use oh-my-zsh and then complain about their terminal taking forever to start
[10:17:11] yorickpeterse: darix: No, OS X Bash is a few years behind IIRC
[10:17:14] shevy: cuz they are hipsters
[10:17:52] platzhirsch: Thanks you dear MacBook coders and MongoDB users
[10:17:56] darix: yorickpeterse: my .zshrc is 21 lines and 16 of that is my irp shell functions for quick "i need a package of this gem" ^^
[10:19:16] yorickpeterse: https://github.com/YorickPeterse/dotfiles/blob/master/.config/fish/config.fish my Fish config
[10:19:21] yorickpeterse: excluding a bunch of separate functions
[10:19:25] certainty: flughafen: hi :)
[10:19:29] platzhirsch: That's too fishy for me yorick
[10:19:40] shevy: fish shell
[10:19:43] shevy: it has good ideas
[10:19:53] yorickpeterse: platzhirsch: badum tsh
[10:20:03] yorickpeterse: at least it's not phish-shell amirite?
[10:20:15] DrCode: has joined #ruby
[10:20:21] rickmasta: has joined #ruby
[10:20:22] platzhirsch: phish did a huge broadcast on our platform
[10:20:26] platzhirsch: such a good stream
[10:20:49] yorickpeterse: did I just get outpunned?
[10:21:05] darix: https://gist.github.com/darix/e58f3c3c8d2f0b1165ba
[10:21:55] yorickpeterse: darix: line 1 just explains everything that sucks about Linux
[10:22:24] shevy: I sure hope no shell called phish exists
[10:23:19] darix: yorickpeterse: you mean it sucks that my server OS doesnt launch a ssh-agent as part of the session?;) the desktop does. ;)
[10:23:36] darix: yorickpeterse: and does e.g. osx server behave differently when you ssh into?:)
[10:23:42] Jammyhammy|Works: has joined #ruby
[10:23:44] unop: has joined #ruby
[10:24:06] yorickpeterse: darix: it sucks that you have to use eval to get some basic env variables injected in your shell
[10:24:18] yorickpeterse: but yeah, at least desktops usually do this for you
[10:24:25] yorickpeterse: nfi about OS X, don't touch that
[10:24:26] karapetyan: has joined #ruby
[10:24:33] pontiki: shevy: do you know what phish shell is for? :)
[10:24:41] yorickpeterse: I just have to hear people complain about how Google Drive apparently eats their CPU
[10:24:48] yorickpeterse: or how their Mac is slow when they have 12093812039819023 Chrome tabs open
[10:25:43] yorickpeterse: or how with every OS X update people have to redownload Xcode, which then messes up everything
[10:25:48] shevy: pontiki no... is that like phishing sites?
[10:27:27] darix: yorickpeterse: you dont need eval for setting env vars. only if you want to do that from the output of another program.
[10:27:52] darix: yorickpeterse: it would be like expecting foo=`bar` in ruby to define additional variables
[10:28:19] yorickpeterse: darix: that's the thing, you typically start gpg/ssh daemon and it spits out a bunch of env vars
[10:28:25] yorickpeterse: which you then have to eval() to get in your shell
[10:28:36] yorickpeterse: clearly what we need here are JSON APIs
[10:28:41] tkuchiki: has joined #ruby
[10:28:51] yorickpeterse: No, we're in 2015
[10:28:58] yorickpeterse: Node.js and JSON APIs are the way to go
[10:29:02] yorickpeterse: If you want easy deployments, use Go
[10:29:05] yorickpeterse: because single binaries and all that
[10:29:17] shevy: rather crystal than Go!!!
[10:29:23] skade: has joined #ruby
[10:31:25] pontiki: shevy: PHP interactive shell :D
[10:31:58] Kallis: has joined #ruby
[10:32:03] yorickpeterse: Ah yes, the PHP Hyper Pain Preprocessor
[10:33:22] tjbiddle: has joined #ruby
[10:33:22] CloCkWeRX: has joined #ruby
[10:35:11] phutchins: has joined #ruby
[10:36:19] allcentury: has joined #ruby
[10:37:57] Kallis: has joined #ruby
[10:41:24] tjbiddle: has joined #ruby
[10:43:05] lkba_: has joined #ruby
[10:44:28] sdothum: has joined #ruby
[10:46:15] jas02: has joined #ruby
[10:46:54] Hrorek: has joined #ruby
[10:46:54] startupality: has joined #ruby
[10:49:07] Hrorekr: has joined #ruby
[10:50:55] ndrei: has joined #ruby
[10:52:28] favadi: has joined #ruby
[10:54:40] praveen__: has joined #ruby
[10:54:49] roxtrongo: has joined #ruby
[10:57:19] benlovel1: has joined #ruby
[10:57:28] rodfersou: has joined #ruby
[10:57:56] jgt1: has joined #ruby
[11:00:13] Ropeney: has joined #ruby
[11:01:43] youngbaks: has joined #ruby
[11:02:32] workmad3: has joined #ruby
[11:02:44] charliesome: has joined #ruby
[11:03:38] [k-: has joined #ruby
[11:04:19] phutchins: has joined #ruby
[11:04:35] robwri32: has joined #ruby
[11:04:40] robwri32_: has joined #ruby
[11:06:38] SenpaiSilver: has joined #ruby
[11:08:43] Rollabunna: has joined #ruby
[11:08:46] Pumukel: has joined #ruby
[11:09:50] frmendes: has joined #ruby
[11:10:20] hays_: has joined #ruby
[11:11:29] Thr3d_: has joined #ruby
[11:11:34] darwingr: has joined #ruby
[11:15:09] chills42: has joined #ruby
[11:15:25] voker57: has joined #ruby
[11:17:03] Igorshp: has joined #ruby
[11:17:51] Rurik: has joined #ruby
[11:18:06] quazimodo: has joined #ruby
[11:19:07] Rurik: has joined #ruby
[11:19:54] Rurik: has joined #ruby
[11:21:02] Rurik: has joined #ruby
[11:21:50] pawnbox_: has joined #ruby
[11:23:16] jgt1: has joined #ruby
[11:23:18] FernandoBasso: has joined #ruby
[11:23:27] but3k4: has joined #ruby
[11:24:36] cantaberry: has joined #ruby
[11:29:12] strcmp1: has joined #ruby
[11:32:21] toretore: has joined #ruby
[11:34:21] arup_r: has joined #ruby
[11:35:03] elperdut: has joined #ruby
[11:35:18] ldnunes: has joined #ruby
[11:36:23] y0da: has joined #ruby
[11:36:30] tjbiddle: has joined #ruby
[11:37:38] platzhirsch: Is Crystal the PHP of Ruby?
[11:37:50] suchness: has joined #ruby
[11:37:51] apeiros: more like the hack of ruby
[11:38:01] apeiros: at least if I remember correctly what hack is
[11:38:12] aswen: has joined #ruby
[11:38:30] [k-: what do you mean by php :o
[11:38:41] platzhirsch: something offensive
[11:38:43] platzhirsch: like an insult
[11:38:45] drewvanstone: has joined #ruby
[11:39:41] [k-: supporters of crystal wouldn't be happy
[11:39:51] [k-: jhass has worked very hard
[11:40:03] platzhirsch: I have no clue, don't mind me
[11:40:40] syath: has joined #ruby
[11:40:46] jhass: platzhirsch: why would you say so :(
[11:41:04] platzhirsch: I don't know.. I just wanted to stir
[11:41:56] jhass: even if, what's PHP's Ruby then?
[11:42:07] bodie_: has joined #ruby
[11:43:26] platzhirsch: More like Ruby's PHP?
[11:43:37] khebbie: has joined #ruby
[11:43:41] elperdut: has joined #ruby
[11:44:39] jhass: "Crystal is to Ruby like PHP is to ???"
[11:45:45] jhass: that makes even less sense
[11:45:56] jhass: what did you drink and where can I get my share of it?
[11:46:13] shevy: doesn't facebook use some compiled php variant?
[11:46:13] apeiros: jhass: you want to damage your brain? o0
[11:46:33] [k-: so mean
[11:46:34] jhass: apeiros: seems easier than dealing with the brain damaged all the time
[11:46:40] tjbiddle: has joined #ruby
[11:46:53] elaptics: if you can't beat 'em, join 'em?
[11:46:56] apeiros: shevy: yes, that'd be hack. which is why I mentioned it before
[11:47:09] arup_r1: has joined #ruby
[11:47:15] apeiros: i.e., "crystal is to ruby like hack is to php". not sure that truly applies, though.
[11:47:24] jhass: elaptics: old zombie apocalypse truth. Just not appealing to watch hence you won't see it in the movies
[11:47:43] Igorshp: has joined #ruby
[11:47:46] platzhirsch: jhass: fair enough, when you asked the question I thin my face melted
[11:48:04] devoldmx: has joined #ruby
[11:48:12] [k-: this is why we cant have nice things in the world
[11:48:40] nateberkopec: has joined #ruby
[11:50:20] Kallis: has joined #ruby
[11:50:39] ndrei: has joined #ruby
[11:51:14] shevy: apeiros omg... what a horrible name...
[11:51:25] shevy: on a brighter note, that automatically upgrades the name halsbe :>
[11:51:29] apeiros: shevy: indeed
[11:51:40] Kallis: has joined #ruby
[11:51:44] apeiros: "go" is just about as terrible a name for a language, though
[11:51:57] apeiros: shevy: na, I'll rename it to "the".
[11:52:26] [k-: how dare you choose the most commonly used word in the English language!
[11:52:26] tobukiah: how dare you choose the / most commonly used word in / the English language!
[11:52:39] apeiros: that'll make for some hilarious dialogues: "do you use the?" - "the what?"
[11:53:10] apeiros: "the, the language" - "are you stuttering?"
[11:53:14] futilegames: has joined #ruby
[11:53:28] [k-: what the hell!
[11:53:36] jhass: I should name a project "???" (that's a zero width space)
[11:53:38] shevy: yeah go is also a strange way... they seem to like to pick action-able names... like apple with "swift"
[11:53:39] Ropeney: has joined #ruby
[11:53:44] apeiros: jhass: nonbreaking, I hope?
[11:53:53] jhass: not that fancy
[11:53:57] apeiros: aw come on
[11:54:00] apeiros: where's the fun in that?
[11:54:12] jhass: is there even a non-breaking zero width space?
[11:54:22] shevy: I know there is invisible unicode out there
[11:54:35] shevy: it's like dark matter in physics
[11:54:48] apeiros: yes, eam was going on about it just a few days ago :)
[11:55:24] davedev24: has joined #ruby
[11:56:02] apeiros: and reading the WP article I now know why it looked like a BOM
[11:56:35] [k-: WP is workers party or wordpress
[11:57:06] ruurd: has joined #ruby
[11:57:19] shevy: wikipedia!
[11:58:06] apeiros: washington post, of course
[11:58:53] praveen__: has joined #ruby
[11:58:54] meatherly: has joined #ruby
[11:59:11] [k-: > of course
[12:00:22] dionysus69: has joined #ruby
[12:00:27] skullcrasher_: has joined #ruby
[12:01:30] strcmp1: has joined #ruby
[12:03:53] dionysus69: has joined #ruby
[12:04:38] pwnd_nsfw: has joined #ruby
[12:06:29] hmnhf: has joined #ruby
[12:07:12] [k-: who follows ("subscribes") to /r/ruby
[12:08:09] ValicekB: has joined #ruby
[12:08:48] DrCode: has joined #ruby
[12:08:57] fllll: has joined #ruby
[12:09:18] allomov_: has joined #ruby
[12:09:32] [k-: i don't even read it anymore though
[12:09:49] maloik: why do you ask?
[12:09:55] [k-: these days i just read /r/programming
[12:10:25] [k-: it's a poll to see how interesting /r/ruby is
[12:10:35] allomov: has joined #ruby
[12:10:50] maloik: I dunno I just browse to it once a day or something, see if anything interesting pops up
[12:11:09] [k-: but does anything pop up,m
[12:11:16] IceyEC: has joined #ruby
[12:11:18] fllll: can you recommend me any book/tutorials/videos to start with ruby? I'm python programmer, I know how to code (like I don't wanna waste my time on reading how loops/conditions/classes work, just wanna learn syntax and some advanced conspect of programming in ruby)
[12:11:18] maloik: yea from time to time
[12:11:55] fllll: what would you recommend to learn for a person who has a good background in programming
[12:12:44] jhass: fllll: tryruby.org to get familiar with the base syntax, then head to the rubykoans
[12:12:49] jhass: ?quickref
[12:12:50] ruboto: http://www.zenspider.com/Languages/Ruby/QuickRef.html
[12:12:50] [k-: functional programming
[12:12:57] jhass: and have this one open
[12:13:45] fllll: rubykoans look good
[12:13:48] fllll: anything else?
[12:13:57] jhass: fllll: then have the docs open (ruby-doc.org / devdocs.io / ri for CLI), get pry (pryrepl.org) and try to port some of your simpler python scripts. If you succeeded with that post it here for review
[12:14:13] [k-: codewars, exercism.io, etc, etc
[12:16:14] strcmp1: has joined #ruby
[12:16:22] startupality: has joined #ruby
[12:16:24] fllll: [k-: didn't know that codewars and exercism; what's 'etc'? Do you know more websites like that?
[12:16:59] [k-: etc is an expression that generally means "and others"
[12:17:35] fllll: yup, that's what I mean, can you list other websites like that (if you know more)
[12:17:43] [k-: well, there is project euler, codingames
[12:18:08] jhass: I still don't think project euler is any helpful in learning any language
[12:18:31] jhass: it trains your algorithm skills maybe, but not your language skills
[12:18:37] sgambino: has joined #ruby
[12:18:41] umgrosscol: has joined #ruby
[12:18:44] [k-: im sure jhass knows a lot more
[12:18:53] jhass: actually I don't
[12:19:01] jhass: well, there's ruby warrior
[12:19:05] [k-: but you python to ruby!
[12:19:55] [k-: well there are a lot of *code and code* sites
[12:19:56] strcmp1: has joined #ruby
[12:20:08] [k-: i just don't know them
[12:20:46] Rurik: has joined #ruby
[12:20:53] exadeci: has joined #ruby
[12:21:45] shadeslayer: has joined #ruby
[12:22:39] dgutierrez1287: has joined #ruby
[12:22:42] victortyau: has joined #ruby
[12:23:44] fllll: ok guys thanks for help!
[12:23:53] jhass: ?guys fllll
[12:23:53] ruboto: fllll, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[12:24:17] CloCkWeRX: has left #ruby: ()
[12:27:15] atomical: has joined #ruby
[12:27:20] rgb-one: has joined #ruby
[12:28:37] pawnbox: has joined #ruby
[12:28:51] rgb-one: https://gist.github.com/rgb-one/6a97e96b9732c837c025
[12:29:40] p0wn3d__: has joined #ruby
[12:32:31] meatherly: has joined #ruby
[12:33:08] Jardayn: has joined #ruby
[12:33:27] zenguy_pc: has joined #ruby
[12:35:09] pawnbox: has joined #ruby
[12:35:12] [k-: such Ox0dea
[12:35:18] [k-: much interesting
[12:35:59] ckuhn: has joined #ruby
[12:37:25] allomov: has joined #ruby
[12:37:26] freezevee: has joined #ruby
[12:38:43] [k-: if you are only using %w for one letters, it is actually easier to do this: "abcdefg".chars
[12:38:54] elperdut: has joined #ruby
[12:40:10] startupality_: has joined #ruby
[12:41:26] DrCode: has joined #ruby
[12:42:53] stardiviner: has joined #ruby
[12:43:20] JoshL: has joined #ruby
[12:43:39] strcmp1: jhass: dude.. :|
[12:44:12] bruno-: has joined #ruby
[12:44:16] strcmp1: jhass: is 'guys' not gender neutral to begin with?
[12:44:22] JDiPierro: has joined #ruby
[12:44:29] jhass: ?guys2 strcmp1
[12:44:30] ruboto: strcmp1, it doesn???t matter if it???s "normal"/gender neutral to say "guys" in your idiolect. "You guys" to refer to a mixed group is erasure. All we ask from you is to be a decent channel member and respect that. If you want to further discuss this, join #ruby-offtopic.
[12:45:32] strcmp1: i don't want to discuss it, believe me, but this is getting just a tad bit ridiculous
[12:45:45] jmignault: has joined #ruby
[12:46:41] strcmp1: your attempts to be inclusive seem to alienate and disrupt so far, to be honest
[12:46:58] Kendos-Kenlen: has joined #ruby
[12:47:29] ckuhn: ACTION so confused
[12:48:04] apeiros: strcmp1: if somebody considers this to be difficult to do, I have not much problems alienating them. I prefer supporting the others in this equation.
[12:48:12] [k-: confuseeeeeeeezaaaaaaaallllllll
[12:48:18] DrCode: has joined #ruby
[12:49:05] amystephen: has joined #ruby
[12:49:07] strcmp1: apeiros: it's not a word in my vocabulary, however, i think you are misguided if you believe this type of policing of words is actually a good thing. it's the other extreme. no extreme is good.
[12:49:27] apeiros: strcmp1: #ruby-offtopic
[12:49:36] blackmesa: has joined #ruby
[12:49:46] strcmp1: not interested. lets leave it there.
[12:49:50] ckuhn: is this the yt comment section?
[12:50:02] apeiros: ckuhn: yt?
[12:50:08] [k-: yt comment section is much much worse
[12:50:09] Igorshp: has joined #ruby
[12:50:13] strcmp1: yt = youtube
[12:50:14] [k-: a gazillion times worse
[12:50:28] [k-: ACTION laughs at apeiros
[12:50:28] ckuhn: true true
[12:50:42] workmad3: has joined #ruby
[12:50:57] apeiros: surprised it isn't abbreviated as ut
[12:51:15] [k-: we now know apeiros is very old and only engages in newspapers
[12:51:19] UtkarshRay: has joined #ruby
[12:51:50] apeiros: [k-: news*paper*? what's that? some newfangled thingyism attempting to replace papyrus?
[12:52:12] yardenbar: has joined #ruby
[12:52:21] [k-: yes, it is in wide production today
[12:52:40] strcmp1: has joined #ruby
[12:52:45] allcentury: has joined #ruby
[12:52:53] apeiros: ACTION pondering to just straight kick people voicing from the off on "?guys"
[12:53:25] centrx: has joined #ruby
[12:53:43] apeiros: that is, people whom never said a word before
[12:54:09] [k-: (i believe)
[12:54:14] ckuhn: we could all say "you peeps"?
[12:54:20] [k-: people whom had never?
[12:54:29] davidt: has joined #ruby
[12:54:35] [k-: i forgot how to use whom :/
[12:54:35] strcmp1: say the words that flow naturally
[12:54:45] strcmp1: nothx for thought police
[12:54:51] strcmp1: if i wanted that id join #northkorea
[12:55:00] apeiros: !locl strcmp1 not the place
[12:55:03] apeiros: !kick strcmp1 not the place
[12:55:03] ruboto: ruboto kicked strcmp1: the place
[12:55:03] ruboto: -o ruboto
[12:55:06] pawnbox: has joined #ruby
[12:55:08] strcmp1: has joined #ruby
[12:55:16] strcmp1: sad state of affairs indeed
[12:59:34] DrCode: has joined #ruby
[12:59:55] strcmp1: apeiros: I won't return to this channel anymore. I think this is just unbelievably ridiculous. I am came here to discuss ruby, that's it. I do not care if people used words towards me that are in no way derogatory unless you take an extreme position which considers 'guys' to be a derogatory word. females use that word to describe a group of females, and males do the same. i know this, because i am a native english speaker, and you are not.
[13:00:03] apeiros: !ban strcmp1 good bye
[13:00:11] apeiros: !ban strcmp1 !P good bye
[13:00:12] ChanServ: +b strcmp1!*@*
[13:00:12] ChanServ: ChanServ kicked strcmp1: good bye
[13:01:25] shredding: has joined #ruby
[13:02:21] segfalt: has joined #ruby
[13:04:22] benlieb: has joined #ruby
[13:06:12] decoponio: has joined #ruby
[13:06:29] ruurd: has joined #ruby
[13:06:40] ndrei: has joined #ruby
[13:07:57] jgt1: has joined #ruby
[13:08:12] s00pcan: has joined #ruby
[13:08:53] khebbie: has joined #ruby
[13:09:21] beauby: has joined #ruby
[13:09:43] but3k4: has joined #ruby
[13:10:56] andyrs: has joined #ruby
[13:11:25] KnownSyntax_: has joined #ruby
[13:12:51] pawnbox: has joined #ruby
[13:14:11] UtkarshRay: has joined #ruby
[13:14:21] ckuhn: has joined #ruby
[13:14:33] toretore: has joined #ruby
[13:15:28] kstuart: has joined #ruby
[13:15:31] marr: has joined #ruby
[13:15:54] tkuchiki: has joined #ruby
[13:17:45] nfk|laptop: has joined #ruby
[13:18:05] allomov: has joined #ruby
[13:18:35] deg__: has joined #ruby
[13:18:36] bruno-: has joined #ruby
[13:19:10] kgirthofer: has left #ruby: ()
[13:19:20] bkulbida: has joined #ruby
[13:20:40] UtkarshRay: has joined #ruby
[13:21:13] havenwood: has joined #ruby
[13:21:16] chills42: has joined #ruby
[13:21:39] djcp: has joined #ruby
[13:21:47] jgpawletko: has joined #ruby
[13:22:11] allomov: has joined #ruby
[13:22:15] ruby0nrails_: has joined #ruby
[13:22:30] ruby0nrails_: Can someone explain how ||= works?
[13:22:58] apeiros: ruby0nrails_: `a ||= b` expands to `a || a = b`
[13:23:29] apeiros: ruby0nrails_: in other words, if a is falsy (nil or false), b will be assigned to a.
[13:23:50] ruby0nrails_: How does the || operator work?
[13:24:07] bronson: has joined #ruby
[13:24:18] apeiros: logical "or". returns the first truthy value
[13:25:01] ruby0nrails_: Right so if a isn't defined, it'll be false, so it'll return the right value?
[13:25:03] shevy: its undeadra
[13:25:10] s00pcan_: has joined #ruby
[13:25:18] apeiros: ruby0nrails_: there's no undefined in ruby.
[13:25:46] adaedra: So it can't be a function.
[13:25:50] apeiros: if `a ||= b` is the first occurrence of a, it'll be set to nil
[13:26:02] DylanJ: apeiros: what's defined?() for then?
[13:26:14] ruby0nrails_: how does ruby apply || on "a" and "a=b" if a isn't defined?
[13:26:33] ckuhn: if a is undefined it is a falsy value
[13:26:50] apeiros: DylanJ: to test for existence
[13:27:01] apeiros: DylanJ: unlike e.g. JS where a variable can indeed have the value `undefined`
[13:27:07] ruby0nrails_: but then why can't i do "if a; puts true; end"
[13:27:18] ruby0nrails_: when a isn't defined
[13:27:20] apeiros: once a variable exists, it does reference an object, always.
[13:28:42] nzst: has joined #ruby
[13:28:43] ruby0nrails_: NameError: undefined local variable or method `a' for main:Object
[13:29:09] nzst: Hi, does anyone know how to cleanly upgrade ruby for the server and app running rails in production?
[13:29:21] nzst: I asked in #rubyonrails
[13:29:23] nettoweb: has joined #ruby
[13:29:26] ckuhn: >> if a; puts 'true'; end
[13:29:27] ruboto: ckuhn # => undefined local variable or method `a' for main:Object (NameError) ...check link for more (https://eval.in/436749)
[13:29:59] ruby0nrails_: If an undefined variable is false, then why am I getting an error?
[13:30:10] linuxboytoo: has joined #ruby
[13:30:24] IceyEC: has joined #ruby
[13:30:49] ruurd_: has joined #ruby
[13:30:53] ckuhn: ruby0nrails_: the following works
[13:30:57] ckuhn: >> if a ||= false; puts 'true'; end
[13:31:10] ckuhn: >> if a ||= false; puts 'true'; end
[13:31:11] ruboto: ckuhn # => nil (https://eval.in/436756)
[13:31:12] NeverDie: has joined #ruby
[13:31:20] ckuhn: >> if a ||= true; puts 'true'; end
[13:31:21] ruboto: ckuhn # => true ...check link for more (https://eval.in/436757)
[13:31:27] [k-: syntactic sugar
[13:31:46] rgb-one: https://gist.github.com/rgb-one/6a97e96b9732c837c025
[13:31:53] ckuhn: I think it is because the if operator doesn't check for truthy/falsy but the || operator does
[13:32:01] ruby0nrails_: Okay, why can't I directly just do a || a= 2
[13:32:06] karapetyan: has joined #ruby
[13:32:07] whippythellama: has joined #ruby
[13:32:53] ruby0nrails_: If a ||= 2 is the same as a || a = 2, why doesn't a || a = 2 work?
[13:33:00] krz: has joined #ruby
[13:33:09] chris2: ||= is not completely syntactic sugar, e.g. with -w and globals
[13:33:30] yorickpeterse: Today I wrote a parser for Logentries' crazy ass webhook format, using StringScanner
[13:33:32] yorickpeterse: today was a good day
[13:33:32] chris2: ruby0nrails_: a += b is a = a + b; thus a ||= b is a = a || b
[13:33:40] yorickpeterse: only a little bit of grumping involved
[13:33:51] chris2: stringscanner is quite nice
[13:33:51] adaedra: yorickpeterse: were you on a bike?
[13:33:54] yorickpeterse: but meh, Ragel >>>>>> StringScanner
[13:33:58] yorickpeterse: adaedra: I'm on a bike twice a day
[13:34:04] ruby0nrails_: I don't thing a ||= b is the same as a = a || b
[13:34:22] jhass: chris2: I think that's even more misleading to picture it, since a.b ||= c is not a.b=(a.b || c)
[13:34:24] adaedra: >> a = a || b
[13:34:25] ruboto: adaedra # => undefined local variable or method `b' for main:Object (NameError) ...check link for more (https://eval.in/436764)
[13:35:22] ruby0nrails_: The easiest way to remember a ||= 2 is just to accept that a gets set to 2 if it isn't defined. at least that's how i'll remember it.
[13:35:51] chris2: jhass: what does that even do... only call the getter?
[13:35:54] yorickpeterse: x ||= y is the same as `x = y unless x`
[13:36:10] chris2: yorickpeterse: not for globals and -w tho :P
[13:36:11] jhass: chris2: it only calls the setter if it actually is set
[13:36:23] ruby0nrails_: yorickpeterse: that's the best way to understand it i think. yeah.
[13:36:25] yorickpeterse: chris2: not sure if I follow
[13:36:31] jhass: chris2: whereas your expansion would call it always
[13:36:40] chris2: %??ruby -w -e '$a = 2 unless $a'
[13:36:42] chris2: -e:1: warning: global variable `$a' not initialized
[13:36:57] yorickpeterse: granted -w is kinda, well, stupid to begin with
[13:36:59] chris2: so you need a defined? there too
[13:37:03] chris2: no, -w should be default :P
[13:37:14] yorickpeterse: -w shouldn't exist, any of those requirements should be hard requirements
[13:37:27] yorickpeterse: just as how overwriting constants shouldn't trigger a warning but just shouldn't be possible
[13:37:30] DylanJ: ruby0nrails_: a ||= b => a = (defined?(a) ? a||b : b
[13:37:36] chris2: jhass: i cant make it call the setter right now, fun
[13:37:51] yorickpeterse: -w reminds me of PHP's warning system too much
[13:37:51] ruby0nrails_: Does a ||= b internally get converted to a || a = b ?
[13:38:03] yorickpeterse: Either throw a hard error or don't, anything in between is just going to be ignored
[13:38:33] chris2: ah, the getter needs to return a false value ofc
[13:39:22] adaedra: ruby0nrails_: it's a bit more complicated than that. Did you try?
[13:40:36] luksaur: has joined #ruby
[13:40:55] ruby0nrails_: "a = b unless a" works
[13:41:19] jhass: >> A ||= 1
[13:41:20] ruboto: jhass # => 1 (https://eval.in/436772)
[13:41:27] jhass: >> A = 1 unless A
[13:41:28] ruboto: jhass # => uninitialized constant A (NameError) ...check link for more (https://eval.in/436773)
[13:41:41] jhass: >> A || A = 1
[13:41:42] ruboto: jhass # => uninitialized constant A (NameError) ...check link for more (https://eval.in/436774)
[13:41:47] prestorium: has joined #ruby
[13:41:47] jhass: constant kills them all
[13:41:48] ckuhn: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[13:41:57] jhass: so it's merely about finding the best analogy
[13:42:19] ckuhn: has joined #ruby
[13:42:21] Guest6844: has joined #ruby
[13:42:39] ruby0nrails_: Do I have to know what a ||= b gets converted to internally? or can I just know that a gets set to b unless a is defined?
[13:42:43] benlieb: has joined #ruby
[13:43:00] jhass: ruby0nrails_: s/defined/is false or nil/, then best just remember that
[13:43:12] jhass: well actually defined, nil or false
[13:43:34] moeabdol: has joined #ruby
[13:44:56] iamninja: has joined #ruby
[13:45:22] banister: has joined #ruby
[13:45:59] waxjar: I'm dealing with an external server that does not do HTTP very well. This server returns some HTML when it encounters a 500 Internal Server Error but does not indicate so in it's status code, nor does it always indicate it's sending HTML in its Content-Type header. Is there a lightweight way to check if the response body is valid JSON, so I can consider the response a success?
[13:47:04] tatsuo: has joined #ruby
[13:47:29] yorickpeterse: You can check if the first character (minus whitespace) starts with a <
[13:47:32] yorickpeterse: If so, then it's not JSON
[13:47:46] yorickpeterse: I'd also suggest sending angry Emails to whoever provides the service :P
[13:48:29] waxjar: Hmm, I think that'll do :p
[13:48:50] devoldmx: has joined #ruby
[13:48:59] yorickpeterse: so basically `if input.strip[0] == '<' .... end`
[13:49:26] Igorshp: has joined #ruby
[13:49:33] rodfersou: has joined #ruby
[13:49:36] kristofferR: has joined #ruby
[13:52:43] bigmac: has joined #ruby
[13:53:03] startupality: has joined #ruby
[13:53:31] bluOxigen: has joined #ruby
[13:53:45] adaedra: .start_with?
[13:55:29] yorickpeterse: yeah that works too, still need the .strip though
[13:55:42] Igorshp: has joined #ruby
[13:56:31] Luming: has joined #ruby
[13:57:17] jhass: .match /\s*</
[13:58:08] platzhirsch: has left #ruby: ()
[13:58:12] pawnbox_: has joined #ruby
[13:58:22] Rurik: has joined #ruby
[13:58:34] waxjar: meh, regexpes :p
[13:59:35] yorickpeterse: Yeah, because a regular expression isn't a total overkill for this
[13:59:48] yorickpeterse: might as well write a fully blown JSON+HTML parser while you're at it
[13:59:49] dcarmich: has joined #ruby
[14:00:17] drewvanstone: has joined #ruby
[14:00:25] yorickpeterse: if input.strip.start_with?('<'); Oga.parse_html(input); else; JSON.load(input); end
[14:00:49] casadei_: has joined #ruby
[14:01:42] beauby: has joined #ruby
[14:01:55] meatherly: has joined #ruby
[14:02:22] ndrei: has joined #ruby
[14:03:38] kobain: has joined #ruby
[14:04:06] ericjphillips: has joined #ruby
[14:05:57] tomphp: has joined #ruby
[14:05:58] [k-: sanitise!
[14:06:49] bigbadbear: has joined #ruby
[14:08:12] hinbody: has joined #ruby
[14:09:17] khebbie: has joined #ruby
[14:09:38] hostess: So I'm trying to write a simple caesar cipher which has been done 100 times, but I seem to be having a problem with backslashes in my alphabet. Can anyone tell me why in this simple code, the backslash is shifting? http://pastebin.com/D2XumDNP
[14:09:38] ruboto: hostess, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/fec2209650c81175c69a
[14:09:38] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[14:10:14] Igorshp: has joined #ruby
[14:11:28] Hrorek: has joined #ruby
[14:11:47] hashrocket: has joined #ruby
[14:13:25] nickjj_: has joined #ruby
[14:13:29] pecpec: has joined #ruby
[14:14:30] marshy: has joined #ruby
[14:14:40] marshy: Wut is this place
[14:15:10] marshy: Free Mason?
[14:15:16] Zai00: has joined #ruby
[14:15:33] marshy: Illuminati's nest
[14:15:42] rickmasta: has joined #ruby
[14:15:58] havenwood: Mars__: This is for the Ruby programming language.
[14:16:19] newtonianb: has joined #ruby
[14:17:29] drewvanstone: has joined #ruby
[14:17:52] JoshL: has joined #ruby
[14:18:26] adaedra: Interesting.
[14:18:53] emilkarl: has joined #ruby
[14:20:41] mary5030: has joined #ruby
[14:21:31] shevy: when I join #ruby I essentially wait and expect free beer, as the name of the channel implies
[14:21:31] d10n-work: has joined #ruby
[14:22:06] apeiros: hostess: that's a peculiar one, the answer is in the docs:
[14:22:20] nickjj__: has joined #ruby
[14:22:21] adaedra: ?beer shevy
[14:22:21] ruboto: shevy, I don't know anything about beer
[14:22:26] mary5030: has joined #ruby
[14:22:28] apeiros: hostess: ???The backslash character </code> can be used to escape ^ or - and is otherwise ignored unless it appears at the end of a range or the end of the from_str or to_str???
[14:22:37] adaedra: Is ruboto under 18? :)
[14:22:43] nsuke: has joined #ruby
[14:23:22] apeiros: hostess: in other words: you must place the \ and the corresponding translation char at the end of from_str and to_str (I wonder how that's supposed to work, though - maybe the wording is bad?)
[14:23:38] tenderlove: has joined #ruby
[14:23:54] stardiviner: has joined #ruby
[14:24:07] kies^: has joined #ruby
[14:25:49] freerobby: has joined #ruby
[14:26:25] freerobby1: has joined #ruby
[14:26:28] gregf_: rofl.... 'hostess'
[14:26:33] who_: has joined #ruby
[14:26:37] mikecmpbll: has joined #ruby
[14:26:41] delianides: has joined #ruby
[14:26:54] hostess: i like snack cakes ;)
[14:27:22] who_: i like beluga whales ;)
[14:27:36] hostess: apeiros: I'm not sure I follow what you're saying, and it's making me feel dumber
[14:27:41] aZtec: has joined #ruby
[14:27:59] axl_: has joined #ruby
[14:28:10] apeiros: hostess: from the docs it seems like \ may not just occur at any place in from_/to_str
[14:28:19] juanpablo_: has joined #ruby
[14:28:23] hostess: apeiros: at runtime, the string seems to be fine...
[14:28:30] chills42: has joined #ruby
[14:28:31] Aztec__: has anyone ever tried to react to redis messages by writing to a PTY's STDIN?
[14:28:36] beast: has joined #ruby
[14:29:20] tomphp: has joined #ruby
[14:29:20] Aztec__: aka spawn a PTY, subscribe to a redis channel and, when a certain message comes flying in, write to the PTY's STDIN
[14:29:20] apeiros: >> "\\x".tr('x\\', '\\x')
[14:29:22] ruboto: apeiros # => "xx" (https://eval.in/436814)
[14:29:42] Rurik: has joined #ruby
[14:29:44] apeiros: \ only works at the end of the string. so if it's in both from and to, you seem to have a problem :(
[14:29:57] icbm: has joined #ruby
[14:30:05] apeiros: >> "\\x".tr('x\\', 'Zx')
[14:30:06] ruboto: apeiros # => "xZ" (https://eval.in/436815)
[14:31:00] emilkarl: has joined #ruby
[14:31:43] hostess: hmm, i think i may have found a way around it by just not using the tr function
[14:32:19] atomical: has joined #ruby
[14:32:28] gyre007: has joined #ruby
[14:33:05] tjohnson: has joined #ruby
[14:34:23] krisquigley: has joined #ruby
[14:34:29] gyre007: hey all, is there any subcommand in gem which allows me to list the gem details ?
[14:35:09] gyre007: like pip show <pkg> or rpm -qi <pkg> ?
[14:35:17] ckuhn: has joined #ruby
[14:35:21] umgrosscol: has joined #ruby
[14:36:41] chouhoulis: has joined #ruby
[14:37:55] Aztec__: gyre007 gem help commands
[14:38:40] victortyau: has joined #ruby
[14:38:47] workmad3: has joined #ruby
[14:40:12] bigmac: has joined #ruby
[14:40:23] wpp: has joined #ruby
[14:40:33] gyre007: query seems to give me what im after, but it prints out info about all installed gem
[14:40:50] dopamean_: has joined #ruby
[14:41:31] gyre007: I want to query an info of one particular gem
[14:42:14] spcmastertim: has joined #ruby
[14:44:09] momomomomo: has joined #ruby
[14:44:21] timonv: has joined #ruby
[14:44:50] arup_r: has joined #ruby
[14:45:29] Rurik: has joined #ruby
[14:45:35] victortyau: has joined #ruby
[14:49:24] ekain: has joined #ruby
[14:49:49] inteq: has joined #ruby
[14:50:00] darwingr: has joined #ruby
[14:51:17] victortyau: has joined #ruby
[14:51:33] polishdub: has joined #ruby
[14:51:50] NeverDie: has joined #ruby
[14:52:08] michael_mbp: has joined #ruby
[14:52:30] jhass: a very verbose variant would be gem specification <gem>
[14:52:34] pawnbox: has joined #ruby
[14:53:16] dorei: has joined #ruby
[14:53:51] Aztec__: what sort of info do you mean, gyre007?
[14:54:50] rippa: has joined #ruby
[14:55:03] ndrei: has joined #ruby
[14:55:04] drewvanstone: has joined #ruby
[14:55:37] ruby-lang064: has joined #ruby
[14:56:13] wildlander: has joined #ruby
[14:56:34] mblagden: has joined #ruby
[14:56:44] ruby-lang064: has left #ruby: ()
[14:56:54] Liothen: has joined #ruby
[14:57:03] retornam: has joined #ruby
[14:57:03] papercode: has joined #ruby
[14:57:05] NeverDie_: has joined #ruby
[14:57:09] ruby-lang165: has joined #ruby
[14:58:12] ruby-lang165: can someone help me improve the speed of a pattern matcher I've got going on? git@gist.github.com:fc34b142f8af3cb49f32.git
[14:58:50] ruby-lang165: I can't seem to make it go faster, maybe ruby not the best approach here?
[15:00:35] havenwood: https://gist.github.com/jjsantos/fc34b142f8af3cb49f32
[15:01:22] ruby-lang165: NeverDie: yeah, thats it
[15:01:34] ruby-lang165: sorry, havenwood
[15:01:35] gregf_: NeverDie ?
[15:01:56] ruby-lang165: sry about that :)
[15:02:15] gregf_: haven == "never" && wood == "die" <== en portugues?
[15:02:23] startupality: has joined #ruby
[15:02:38] michael_mbp: has joined #ruby
[15:06:06] gregf_: heh. dont worry. i was joking ;)
[15:06:59] ruby-lang165: I'm the originator of the mixup though
[15:07:50] cschneid_: has joined #ruby
[15:08:41] apeiros: ruby-lang165: you should not abort() in your methods, only raise
[15:09:17] bluOxigen: has joined #ruby
[15:09:44] ruby-lang165: I'll take note of that, the abort was just so I could get a message on exit, I'll replace it
[15:09:51] CloCkWeRX: has joined #ruby
[15:09:55] apeiros: @loader.words.map { |w| w if w[filter] && w != word } + .compact --> use .select
[15:10:18] ruby-lang165: apeiros, select faster?
[15:10:42] apeiros: slightly. it's more about showing intent.
[15:11:24] apeiros: you can speed it up by preparing your data for the search
[15:11:27] dyleted: has joined #ruby
[15:11:27] dyleted: has joined #ruby
[15:11:28] chouhoul_: has joined #ruby
[15:11:35] apeiros: so that you don't have to scan the full dictionary every time
[15:11:38] dionysus69: has joined #ruby
[15:12:01] apeiros: the first way to segment it would be word length, since you never look for words of different lengths
[15:13:02] ruby-lang165: OK, that's something I can do
[15:13:35] radgeRayden: has joined #ruby
[15:13:48] apeiros: then a poor way to segment more would be to actually have a lookup table with all wildcard variants of the word. costs more for preparation but speeds up graphing. the more often you build a graph during the same run, the bigger the gain
[15:14:02] ruby-lang755: has joined #ruby
[15:14:38] dionysus70: has joined #ruby
[15:14:38] apeiros: e.g. cat -> {'?at' => ['cat', 'bat', 'fat', ???], 'b?t' => ['bat', 'bet', ???], ???}
[15:14:53] ruurd: has joined #ruby
[15:14:54] aswen: has joined #ruby
[15:15:00] ruby-lang165: yeah, gonna do it like this
[15:15:01] ruby-lang165: wordz = @loader.words.select { |w| w if w.size = word.size } edges += wordz.select { |w| w if w[filter] && w != word }
[15:15:17] ruby-lang165: should speed it up a bit
[15:15:25] apeiros: .select { |w| w if w.size = word.size } --> .select { |w| w.size = word.size }
[15:15:32] tatsuo: has joined #ruby
[15:16:20] apeiros: I'd probably do it in the loader: @words = File.read(path).split("\n").group_by(&:size).sort.values_at(*1..maxlen)
[15:16:27] apeiros: errr, drop the sort
[15:16:37] apeiros: (already handled by values_at)
[15:16:53] naftilos76: has joined #ruby
[15:16:54] apeiros: will have to handle lengths which have no words
[15:17:13] atomical: has joined #ruby
[15:17:14] tkuchiki: has joined #ruby
[15:17:28] dionysus69: has joined #ruby
[15:17:33] CloCkWeRX: has left #ruby: ()
[15:17:36] ndrei: has joined #ruby
[15:19:39] Liothen: has joined #ruby
[15:19:44] momomomomo: has joined #ruby
[15:19:54] ruby-lang165: apeiros, appreciate it
[15:20:05] Junaos: has joined #ruby
[15:20:07] ruby-lang165: going a bit faster now, this should be anough
[15:20:08] mblagden: has joined #ruby
[15:20:11] EminenceHC: has joined #ruby
[15:20:36] shinnya: has joined #ruby
[15:21:19] rbennacer: has joined #ruby
[15:21:35] retornam: has joined #ruby
[15:22:03] sharkman: has joined #ruby
[15:22:34] Rurik: has joined #ruby
[15:22:44] sharkman: i have a nokogiri object. if i do @nokogiri_thing.text it joins the text in one big blob
[15:22:47] ruby0onrails_: has joined #ruby
[15:22:58] sharkman: how can i join the text, but separate each text element with a comma
[15:23:12] ruby0onrails_: Hey. Can anyone explain how are ranges used in condtions?
[15:23:37] EminenceHC: has joined #ruby
[15:23:38] apeiros: sharkman: you walk the tree, append to an array and in the end .join(', ') it
[15:23:56] jhass: sharkman: .xpath("//@text").join(",") I think, maybe with .map(&:text) in between, maybe there's a better way
[15:24:01] OrbitalKitten: has joined #ruby
[15:24:06] ebragaparah: has joined #ruby
[15:24:07] ruby0onrails_: Or maybe a link to a guide that might help?
[15:24:09] yorickpeterse: @text doesn't do anything
[15:24:37] jhass: really? wonder why it's a thing then...
[15:24:54] Kendos-Kenlen: has joined #ruby
[15:24:59] Soda: has joined #ruby
[15:25:02] yorickpeterse: @nokogiri_thing.xpath('descendant-or-self::text()').to_a.join(',')
[15:25:05] yorickpeterse: something along those lines
[15:25:08] sharkman: apeiros, how do i walk the tree? its not a simple list, its nested
[15:25:13] apeiros: ruby0onrails_: the same way any other object is used - you form an expression which evaluates to a truthy/falsy value
[15:25:37] ruby0onrails_: No I mean the flip-flop operator.
[15:25:46] dorei: speaking of xpath, is there a way to use xpath2 from within ruby?
[15:25:47] ruby0onrails_: That's what it's called, right?
[15:25:48] arturmartins: has joined #ruby
[15:26:11] sharkman: that worked yorickpeterse thanks
[15:27:54] ragingcake: has joined #ruby
[15:28:54] krz: has joined #ruby
[15:29:18] RandyT: has joined #ruby
[15:29:34] rcvalle: has joined #ruby
[15:30:51] youngbaks: has joined #ruby
[15:31:45] ruurd: has joined #ruby
[15:34:26] pulgolino: has joined #ruby
[15:35:13] bazbing80: has joined #ruby
[15:35:25] momomomomo: has joined #ruby
[15:35:48] Zai00: has left #ruby: ()
[15:36:55] bazbing80: okay. I create a module, it doesn't contain a method. I include that module in any totally unrelated class and suddenly it contains that method. Could someone explain? This code hasn't been run but I believe it encapsulates my query https://gist.github.com/anonymous/e8dcad79ded2c4dc35b7
[15:37:37] shevy: bazbing80 but is this not default behaviour? you define a method in a module, you include it in a class, it becomes available
[15:37:54] apeiros: bazbing80: that's one of the points of modules
[15:37:59] apeiros: and of including modules
[15:38:15] apeiros: bazbing80: also, you can't use an instance method of a module without using include/extend
[15:39:00] bazbing80: shevy apeirons: Awesome, I was not aware of this!
[15:39:14] shevy: apeiros people do not like your nick :)
[15:39:18] Cache_Money: has joined #ruby
[15:39:34] shevy: bring back apieros!
[15:39:35] apeiros: ?tabnick bazbing80
[15:39:35] ruboto: bazbing80, pro-tip - use tab completion for nicks. avoids typos in nicks.
[15:40:00] linuxboytoo: has joined #ruby
[15:40:10] codecop: has joined #ruby
[15:40:14] bazbing80: apeiros: I do haha just didnt work with two nicks in one message
[15:40:28] jhass: shevy: let's code a bot that joins with all the alternations and relays the messages to apeiros
[15:40:48] apeiros: jhass: I already have most mutilations in my highlight-list
[15:41:14] havenwood: levenstein highlights
[15:41:37] malconis: has joined #ruby
[15:42:06] dopie: has joined #ruby
[15:43:29] jhass: havenwood: I guess me and jhack would dislike that feature
[15:44:02] havenwood: jhass: Yeah, no doubt. It's way too broad and not fine-grained enough to be useful.
[15:44:04] shevy: havenwood has an even longer nick
[15:44:10] shevy: I think it is the combination of a-e-i-o
[15:44:17] shevy: that is hard to type by letter :D
[15:44:46] adaedra: Yeah, who has nicks with so many vowels, and so easy to mess up
[15:44:46] tobukiah: Yeah, who has nicks with / so many vowels, and so / easy to mess up
[15:44:57] jhass: I think the issue is that apeiros has more vowels than not
[15:45:17] jhass: tobukiah: ?
[15:45:29] adaedra: What does this bot do
[15:45:32] shevy: tokubiah is also a hard nick
[15:46:06] danman: has joined #ruby
[15:46:14] shevy: similar to how some assume ruboto to be a real person
[15:46:29] bazbing80: adaedra: I have to ask, is your nick an Elder Scrolls reference?
[15:47:30] adaedra: bazbing80: no.
[15:47:51] Asher: has joined #ruby
[15:48:01] [Butch]: has joined #ruby
[15:48:11] ruurd: has joined #ruby
[15:48:54] bazbing80: adaedra: oh.. :|
[15:48:55] Marsupermammal: has joined #ruby
[15:48:56] mjuszczak: has joined #ruby
[15:49:05] JDiPierro: has joined #ruby
[15:49:06] adaedra: But you're not the first to ask.
[15:49:50] n008f4g_: has joined #ruby
[15:49:50] Guest52550: has joined #ruby
[15:50:16] kirun: has joined #ruby
[15:50:31] luckyme: has joined #ruby
[15:51:05] roxtrongo: has joined #ruby
[15:51:46] chills42: has joined #ruby
[15:51:49] adaedra: tobukiah: are you doing haikus? (addressing to the bot, as I don't know who did this.)
[15:52:07] Ox0dea: >> 'tobukiah'.reverse
[15:52:08] ruboto: Ox0dea # => "haikubot" (https://eval.in/436896)
[15:52:56] adaedra: ... right.
[15:53:06] rubyonrails3: has joined #ruby
[15:53:49] davispuh: has joined #ruby
[15:54:14] rubyonrails3: How does a flip-flop operator work in a condition? For example: (line =~ /first/) .. (line =~ /third/)
[15:55:23] dfockler: has joined #ruby
[15:56:44] adaedra: I didn't even know this existed
[15:57:40] karapetyan: has joined #ruby
[15:57:53] The_Phoenix: has joined #ruby
[15:57:55] apeiros: rubyonrails_: iirc it is false until the left side is true. it will then stay true until the right side is true. from then on it'll be false
[15:58:13] apeiros: that is, over multiple hits of the expression. not sure though. this construct is IMO too obscure to be used.
[15:58:29] adaedra: http://nithinbekal.com/posts/ruby-flip-flop/
[15:59:44] rubyonrails3: apeiros: It'll stay true until the right side is true but then after that it'll become false?
[16:00:08] apeiros: as said, over multiple times of testing
[16:00:08] rubyonrails3: apeiros: It is quite obscure though...
[16:00:32] mjuszczak: has joined #ruby
[16:00:34] adaedra: in your sample, it will be false by default, until you have something that maches first. then, it will stay true until something matches third. And then, start again, I guess
[16:00:34] apeiros: i.e. on first evaluation, left side is false -> whole expression is false (right side doesn't matter)
[16:00:49] amclain: has joined #ruby
[16:00:50] apeiros: on second evaluation left side is true -> whole expression is true (right side doesn't matter)
[16:01:09] apeiros: on third evaluation, right side is false -> whole expression is true (left side doesn't matter)
[16:01:17] apeiros: on 4th evaluation, right side is true -> whole expression is false (left side doesn't matter)
[16:01:26] apeiros: and now the cycle starts from anew
[16:01:59] rubyonrails3: on 4th evaluation, right side becomes true but the whole expression is also true.
[16:02:19] apeiros: ah might be that it'll be false only after the 4th evaluation
[16:02:27] apeiros: (in that example)
[16:03:10] rubyonrails3: This syntax is borrowed from Perl right?
[16:03:18] rubyonrails3: No wonder it's so obscure.
[16:03:18] apeiros: I think so, yes
[16:04:08] rubyonrails3: I heard this might be removed in Ruby 3.0?
[16:04:39] dgutierrez1287: has joined #ruby
[16:04:51] apeiros: I wouldn't miss it
[16:04:54] Caius: has joined #ruby
[16:04:54] Caius: has joined #ruby
[16:05:37] rubyonrails3: I'm currently using Ruby 1.9.3. Are there huge differences in Ruby 2.0 or just minor?
[16:06:28] adaedra: First 1.9.3 is not supported anymore
[16:06:44] apeiros: you should use 2.2.3 unless you have specific reasons not to
[16:07:00] adaedra: There are the kwargs
[16:07:10] apeiros: and IMO the differences from 1.9 to 2.2 are not huge, but still valuable
[16:08:22] pen: has joined #ruby
[16:08:34] SCHAAP137: has joined #ruby
[16:09:31] allcentury: has joined #ruby
[16:10:05] JCOE: has joined #ruby
[16:10:20] jxv: has joined #ruby
[16:11:16] EminenceHC: has joined #ruby
[16:12:50] Ox0dea: has left #ruby: ("WeeChat 1.3")
[16:13:02] nfk: has joined #ruby
[16:13:23] bronson: has joined #ruby
[16:13:27] elperdut: has joined #ruby
[16:13:29] pietr0: has joined #ruby
[16:13:41] j4cknewt: has joined #ruby
[16:14:08] spalenza: has joined #ruby
[16:15:49] NeverDie: has joined #ruby
[16:16:45] EminenceHC: has joined #ruby
[16:16:59] Maletor: has joined #ruby
[16:21:32] ndrei: has joined #ruby
[16:23:47] petricore: has joined #ruby
[16:24:09] ndrei: has joined #ruby
[16:24:13] allcentury: has joined #ruby
[16:25:07] Stan: has joined #ruby
[16:25:32] Rollabunna: has joined #ruby
[16:26:25] spider-mario: has joined #ruby
[16:26:29] towski_: has joined #ruby
[16:26:54] RandyT: has joined #ruby
[16:26:56] workmad3: has joined #ruby
[16:29:05] axl_: has joined #ruby
[16:29:07] j4cknewt_: has joined #ruby
[16:29:43] Nuck: has joined #ruby
[16:30:17] atzorvas: has joined #ruby
[16:30:26] decoponyo: has joined #ruby
[16:30:59] blackmesa: has joined #ruby
[16:31:05] mondayrain: has joined #ruby
[16:31:39] wpp: has joined #ruby
[16:31:41] drewvanstone: has joined #ruby
[16:31:44] p0wn3d__: has joined #ruby
[16:32:42] shevy: people are lazy
[16:32:47] Ox0dea: has joined #ruby
[16:32:53] ebragaparah: has joined #ruby
[16:32:53] niemcu: has joined #ruby
[16:32:59] shevy: >> RUBY_VERSION
[16:33:00] ruboto: shevy # => "2.2.0" (https://eval.in/436903)
[16:33:19] tobukiah: has joined #ruby
[16:33:56] shevy: ruboto is lazy
[16:34:00] Kricir: has joined #ruby
[16:34:26] tobukiah: has joined #ruby
[16:34:41] cbz: has joined #ruby
[16:35:12] NeverDie: has joined #ruby
[16:35:30] startupality: has joined #ruby
[16:35:45] centrx: has joined #ruby
[16:37:16] rakm: has joined #ruby
[16:38:49] terabytes: has joined #ruby
[16:40:42] JoshL: has joined #ruby
[16:41:07] startupality: has joined #ruby
[16:41:43] dionysus69: has joined #ruby
[16:41:55] devoldmx: has joined #ruby
[16:42:46] it_tard: has joined #ruby
[16:43:04] rubyonrails: has joined #ruby
[16:44:12] Narzew: has joined #ruby
[16:46:26] DrCode: has joined #ruby
[16:48:13] nanoz: has joined #ruby
[16:48:13] platzhirsch: has joined #ruby
[16:48:54] ramfjord: has joined #ruby
[16:49:55] cbz: has joined #ruby
[16:49:55] cbz: has joined #ruby
[16:50:01] casadei_: has joined #ruby
[16:51:42] spider-mario: has joined #ruby
[16:52:25] cbz: has joined #ruby
[16:52:25] cbz: has joined #ruby
[16:54:04] jgt1: has joined #ruby
[16:54:41] pawnbox: has joined #ruby
[16:54:41] crack_user: has joined #ruby
[16:55:37] crack_user: somo one here is familiar with nokogiri? I'm trying to parse a xml but the HTML entities in there is missing
[16:56:18] ruboto: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[16:56:40] workmad3: has joined #ruby
[16:57:14] crack_user: so that is my question, parse a xml without losing the html entities
[16:57:28] apeiros: crack_user: provide an example. code, input, expected output, actual output
[16:57:36] apeiros: preferably on gist.github.com
[16:57:45] j4cknewt: has joined #ruby
[16:58:05] apeiros: because right now the answer would be "you're mistaken, html entities don't go lost with nokogiri". and that doesn't help you solve your problem.
[16:58:06] hahuang61: has joined #ruby
[16:59:08] wryfi: has joined #ruby
[17:00:01] Hrorek: has joined #ruby
[17:00:27] wryfi: i'm trying to use chruby and bundler together. i have bundler install gems to .gem in my $HOME, but bundler installs them under .gem/ruby/2.2.0, while my ruby version is 2.2.2, and so chruby doesn't see the bundled gems.
[17:00:34] crack_user: https://gist.github.com/fariasvp/8015d0b30b5e1596e172
[17:00:48] wryfi: any ideas?
[17:01:00] crack_user: to prove that is not my mistake
[17:01:39] lkba: has joined #ruby
[17:02:09] adaedra: ?abi wryfi
[17:02:09] ruboto: wryfi, Each Ruby release has actually two versions, the interpreter version and the ABI version. The interpreter version is what commonly is referred to, like 2.1.5. The ABI version is for the binary interface used by compiled extensions and it is what you see in your paths. It's shared among one release series, for example for the Ruby versions 2.1.0 to 2.1.5 the ABI version is 2.1.0.
[17:02:45] apeiros: crack_user: interesting
[17:02:52] wryfi: ok, so why does bundler use the ABI version, while chruby changes the $PATH to the ruby version?
[17:03:01] wryfi: is this a chruby bug?
[17:03:14] apeiros: crack_user: simple solution
[17:03:16] wryfi: ruboto, adaedra: ^
[17:03:24] apeiros: crack_user: &Eacute; is not valid XML. use the HTML parser.
[17:03:33] apeiros: crack_user: i.e., use Nokogiri::HTML.parse instead
[17:03:53] dima_: has joined #ruby
[17:04:28] crack_user: apeiros: do you know if is some major diference between HTML and XML parse beyond that?
[17:04:42] petersaints: has joined #ruby
[17:04:51] howdoico1: has joined #ruby
[17:05:13] michaeldeol: has joined #ruby
[17:05:25] adaedra: wryfi: can you show: `gem env` `which bundle`
[17:05:58] snockerton: has joined #ruby
[17:06:02] adaedra: crack_user: I think HTML is more tolerant, i.e. accept non-closed blocks
[17:08:12] farn: has joined #ruby
[17:08:21] crack_user: adaedra: I will try that here
[17:08:34] shevy: we can program in html!
[17:08:44] adaedra: don't past in the channel, crack_user
[17:08:46] blackmesa: has joined #ruby
[17:09:14] crack_user: adaedra: paste what?
[17:09:22] adaedra: The result of the commands
[17:09:30] adaedra: Wait, wrong person
[17:09:34] adaedra: Never mind
[17:09:35] banjara: has joined #ruby
[17:09:43] crack_user: adeponte: it's ok
[17:09:52] adaedra: You have the same nick color as wryfi :)
[17:12:49] djbkd: has joined #ruby
[17:13:03] makufiru: has joined #ruby
[17:14:12] agent_white: has joined #ruby
[17:14:21] Igorshp: has joined #ruby
[17:14:37] yfeldblum: has joined #ruby
[17:14:47] yardenbar: has joined #ruby
[17:15:11] shadoi: has joined #ruby
[17:15:47] sharkman: this is in the rails console
[17:15:53] sharkman: why cant i select the entries this table has
[17:15:53] sharkman: irb(main):001:0> EspnPbpBaseballSource
[17:15:54] sharkman: => EspnPbpBaseballSource (call 'EspnPbpBaseballSource.connection' to establish a connection)
[17:15:54] sharkman: irb(main):002:0> EspnPbpBaseballSource.all
[17:15:54] sharkman: (Object doesn't support #inspect)
[17:16:17] yfeldblum: has joined #ruby
[17:16:46] platzhirsch: I want to generate a random slug out of [0-9] and [a-z] and it should be unique based on a conesecutive number -> 1, 2, 3, 4.. etc would generate all unique slugs. Any ideas?
[17:17:05] jhass: platzhirsch: base36=
[17:17:27] agent_white: has joined #ruby
[17:17:51] wldcordeiro: has joined #ruby
[17:18:24] agent_white: has left #ruby: ()
[17:18:45] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[17:19:12] j4cknewt_: has joined #ruby
[17:19:16] platzhirsch: jhass: ah well it should start with 5 characters
[17:19:45] jhass: platzhirsch: pad with leading zeros?
[17:19:46] wryfi: adaedra: it's a bug in chruby
[17:19:50] sysx1000: has joined #ruby
[17:19:54] platzhirsch: doesn't look random :D sorry
[17:19:56] wryfi: https://github.com/postmodern/chruby/issues/235
[17:20:06] jhass: pad with random stuff then?
[17:20:19] jhass: well, gotta get hard to reconstruct then I guess :P
[17:20:52] Hanmac: has joined #ruby
[17:21:04] apt-get: has joined #ruby
[17:22:18] last_staff: has joined #ruby
[17:23:32] shevy: who is going to get hard in here
[17:23:42] Jackneill: has joined #ruby
[17:23:46] nickjj: has joined #ruby
[17:23:56] oddjob001: has joined #ruby
[17:24:17] oddjob001: hello all. question. how can I check a string against each/every string inside an array?
[17:24:27] platzhirsch: dude, better give me a CS solution to my problem shevy
[17:24:40] apeiros: oddjob001: depends. what do you want to check?
[17:24:49] shevy: platzhirsch .sample !
[17:24:56] apeiros: oddjob001: common methods are #include?, #any?, #all?, #none?, #one? etc.
[17:24:59] platzhirsch: that's just wrong
[17:25:09] oddjob001: apeiros: ooh might be all. let me go look at that. brb
[17:25:21] krisquigley: has joined #ruby
[17:25:24] shevy: platzhirsch can't you generate the whole sample and then just pick one from that?
[17:25:41] platzhirsch: no it's ongoing for newly generatated table entries
[17:25:48] apeiros: do we have the complete requirements on the slugs yet? :)
[17:26:14] platzhirsch: Random strings consisting of numbers and letters (case-insensitive), length 5 characteres
[17:26:27] oddjob001: apeiros: basically if i have string = red and i have array = ['red' , 'blue', 'one', 'monkey'] I want that string to be checked against EACH/ALL of those. So it would return false because it doesnt match each of them
[17:26:34] platzhirsch: for instance 7Hx53
[17:26:55] CDunce: has joined #ruby
[17:26:57] workmad3: has joined #ruby
[17:27:02] apeiros: platzhirsch: you omitted the sequential this time :-p
[17:27:17] Sou|cutter: platzhirsch: are you going to generate it and save it so you can look it up, or does the same value have to generate the same slug every time?
[17:27:56] platzhirsch: Sou|cutter: the former one, but I guess the latter one would help to keep it unique
[17:27:59] apeiros: oddjob001: I'm confused. you want to test whether all items in array are `== string`?
[17:28:21] Sou|cutter: platzhirsch: https://github.com/jpmcgrath/shortener/blob/develop/app/models/shortener/shortened_url.rb#L87-L90 that's basically it
[17:28:34] wryfi: has left #ruby: ()
[17:28:35] oddjob001: whether each/all yes. so if i had a conditional in my example it would fail because the string provided does not match ALL string in the array
[17:29:27] blackmesa: has joined #ruby
[17:29:44] apeiros: oddjob001: you should not use "match" to describe "equal"
[17:30:23] apeiros: oddjob001: well, a) `ary.all? { |item| item == string }`, b) `ary.uniq == [string]`
[17:30:48] oddjob001: apeiros: %w[string].all? { |word| word.include?('string') } - or would this be way off?
[17:30:51] psye: has joined #ruby
[17:30:58] apeiros: that's horrible :)
[17:31:09] oddjob001: ok lol. its like my 2nd month with ruby :P
[17:31:15] apeiros: every .include? loops over the whole array
[17:31:16] apt-get: has joined #ruby
[17:31:28] oddjob001: ah yes that wouldnt make sense
[17:31:48] apeiros: maybe I misunderstood
[17:31:53] freerobby: has joined #ruby
[17:32:03] platzhirsch: Sou|cutter: right it should kinda work like a URL shortener, as seen on bitly or twitter
[17:32:03] _aeris_: has joined #ruby
[17:32:08] snockerton: has joined #ruby
[17:32:29] RobertBirnie: has joined #ruby
[17:32:48] sysx1000: has left #ruby: ()
[17:32:48] oddjob001: %w[red white blue].all? { |word| word == 'red' } ?
[17:32:56] tvw: has joined #ruby
[17:33:06] ericjphillips: has joined #ruby
[17:33:18] oddjob001: that would iterate over each string in the array and return true only if they all matched red ?
[17:33:32] apeiros: if they're all equal to 'red'. yes.
[17:33:43] oddjob001: apeiros: perfect. tyvm
[17:33:59] platzhirsch: This explains a good implementation I reckon https://en.wikipedia.org/wiki/URL_shortening#Techniques
[17:35:03] andyrs: has joined #ruby
[17:35:16] benlieb: has joined #ruby
[17:35:46] dasher00: has joined #ruby
[17:35:48] havenwood: has joined #ruby
[17:35:51] OrbitalKitten: has joined #ruby
[17:36:16] apeiros: platzhirsch: what was wrong with base36 or 62 again?
[17:36:24] tomphp: has joined #ruby
[17:36:36] platzhirsch: apeiros: :- ) nothing, I guess I was missing a bijective function to make it longer
[17:37:18] postmodern: has joined #ruby
[17:37:38] subscope: has joined #ruby
[17:38:04] platzhirsch: well, I don't know..
[17:38:30] platzhirsch: using just base36 I would end up with something like "5" for input id = 5, maybe I need to bring it into a higher plane of numbers
[17:39:02] apeiros: either add 10000 or pad
[17:39:08] apeiros: I think padding was suggested already
[17:39:43] face: has joined #ruby
[17:42:52] dionysus69: has joined #ruby
[17:46:13] naftilos76: has joined #ruby
[17:46:17] nickjj: has joined #ruby
[17:46:22] baweaver: has joined #ruby
[17:46:37] skinkitten: has joined #ruby
[17:47:45] Zai00: has joined #ruby
[17:47:53] Zai00: has left #ruby: ()
[17:48:16] platzhirsch: https://gist.github.com/zumbojo/1073996 apeiros
[17:48:25] platzhirsch: yeah sorry, I didn't think it through :)
[17:49:48] EminenceHC: has joined #ruby
[17:50:17] apeiros: platzhirsch: bijective_ there is redundant
[17:50:23] apeiros: decode/encode already expresses that
[17:50:29] Ox0dea: oddjob001: Using "match" and "equal" interchangeably is not the best idea.
[17:50:52] platzhirsch: apeiros: did you criticize the naming convention he chosen?
[17:51:21] apeiros: now you confuse me :D
[17:51:29] platzhirsch: it's not my code :)
[17:51:56] apeiros: ok, so the other criticisms are pointless then? :D
[17:52:30] luksaur: has joined #ruby
[17:52:31] elperdut: has joined #ruby
[17:52:35] Ox0dea: platzhirsch: reddit uses auto-incrementing base-36 and gets along just fine.
[17:52:50] Ox0dea: Bothering about padding seems masochistic.
[17:53:01] blackmesa: has joined #ruby
[17:53:18] krisquigley: has joined #ruby
[17:53:32] shevy: don't indent!!!
[17:53:37] platzhirsch: Ox0dea: not if you're dealing with a smaller number of entities
[17:53:47] Ox0dea: platzhirsch: Why?
[17:53:51] elperdut: has joined #ruby
[17:53:52] platzhirsch: it's easy to say that for Reddit, they get shitloads of stuff in every second
[17:54:08] platzhirsch: but if you just have a couple of hundreds it doesn't look as nicely random to the outside
[17:54:37] Ox0dea: What is "nicely random" and why is it good?
[17:54:47] firstdayonthejob: has joined #ruby
[17:55:08] shevy: hey wait a moment
[17:55:17] shevy: are you not playing nicely random games with ruboto here Ox0dea :)
[17:55:23] platzhirsch: Ox0dea: makes the impression to you that it's randomly generated
[17:55:23] apeiros: platzhirsch: just put some bitmask over it
[17:55:53] Ox0dea: shevy: No, I always get all Strings. :/
[17:56:36] delianides: has joined #ruby
[17:56:52] CDunce: has left #ruby: ("Konversation terminated!")
[17:57:16] rbennacer: has joined #ruby
[17:58:02] podman: has joined #ruby
[17:58:08] circ-user-FkDR0: has joined #ruby
[17:58:25] platzhirsch: has left #ruby: ()
[17:58:43] beauby: has joined #ruby
[17:59:01] j4cknewt: has joined #ruby
[18:00:12] baweaver: has joined #ruby
[18:01:26] manfe: has joined #ruby
[18:01:26] baweaver: has joined #ruby
[18:01:35] Musashi007: has joined #ruby
[18:01:57] djbkd: has joined #ruby
[18:02:32] renderful: has joined #ruby
[18:02:51] malconis: has joined #ruby
[18:04:30] tomphp: has joined #ruby
[18:04:58] apeiros: damn platzhirsch. now I'm doing stupid things again.
[18:05:52] webopsx: has joined #ruby
[18:06:18] lkba: has joined #ruby
[18:07:05] sanjayu: has joined #ruby
[18:07:06] vbatts|work: has joined #ruby
[18:07:36] thomskaf: has joined #ruby
[18:08:03] ips|malc: has joined #ruby
[18:08:41] bb010g: has joined #ruby
[18:08:54] vbatts|work: has left #ruby: ("found the other side of the rainbow")
[18:09:59] thomskaf: Someone know how I can get webrick to not log requests for favicon.ico ?
[18:10:01] Drakevr: has joined #ruby
[18:10:19] Zai00: has joined #ruby
[18:11:22] Drakevr: has joined #ruby
[18:12:56] startupality: has joined #ruby
[18:15:14] roxtrongo: has joined #ruby
[18:15:27] Igorshp: has joined #ruby
[18:15:45] Coldblackice: has joined #ruby
[18:16:30] dfockler: has joined #ruby
[18:17:00] rezzack: has joined #ruby
[18:17:15] andyrs: has joined #ruby
[18:18:32] tkuchiki: has joined #ruby
[18:18:40] youngbaks: has joined #ruby
[18:19:36] tjbiddle: has joined #ruby
[18:20:36] shevy: you may have to modify the source
[18:20:43] EminenceHC: has joined #ruby
[18:22:07] shevy: there is WEBrick::BasicLog and then there is Log
[18:22:25] shevy: class Log seems to do the timestamps: @time_format = "[%Y-%m-%d %H:%M:%S]"
[18:23:28] disconnekted: has joined #ruby
[18:23:29] blt: has joined #ruby
[18:25:14] ndrei: has joined #ruby
[18:25:22] workmad3: has joined #ruby
[18:25:42] s2013: has joined #ruby
[18:26:42] skinkitten: has left #ruby: ("Leaving")
[18:27:21] djbkd: has joined #ruby
[18:27:41] djbkd: has joined #ruby
[18:29:01] thomskaf: Thank you, shevy - then I know what to look for :)
[18:29:34] ragingcake: has joined #ruby
[18:29:46] momomomomo: has joined #ruby
[18:31:14] tjohnson: has joined #ruby
[18:32:15] arturmartins: has joined #ruby
[18:33:14] Ox0dea: thomskaf: http://git.io/vnRLi
[18:33:20] Ox0dea: That's the method you'd need to modify.
[18:34:22] Ox0dea: Stick a `return if req.request_uri =~ /favicon/` in there somewhere.
[18:34:34] karapetyan: has joined #ruby
[18:34:59] pothibo: has joined #ruby
[18:35:34] freerobby: has joined #ruby
[18:36:22] snockerton: has joined #ruby
[18:37:43] pragmatism: has joined #ruby
[18:38:40] jackjackdripper: has joined #ruby
[18:38:50] gregf: has joined #ruby
[18:39:15] yqt: has joined #ruby
[18:41:10] apeiros: meh. and now I have a slug generator with masking.
[18:42:25] catbusters: has joined #ruby
[18:42:42] devoldmx: has joined #ruby
[18:43:11] jackjackdripper: has joined #ruby
[18:43:46] freerobby: has joined #ruby
[18:43:54] pocketprotector: has joined #ruby
[18:44:17] pawnbox: has joined #ruby
[18:44:19] vifino: has joined #ruby
[18:45:04] howdoico1: has joined #ruby
[18:47:27] thomskaf: has left #ruby: ()
[18:49:45] j4cknewt: has joined #ruby
[18:50:09] timonv: has joined #ruby
[18:52:18] shinnya: has joined #ruby
[18:52:32] Timba-as: has joined #ruby
[18:52:48] Coldblackice_: has joined #ruby
[18:53:04] freerobby: has joined #ruby
[18:53:50] pragmatism: has joined #ruby
[18:54:18] OrbitalKitten: has joined #ruby
[18:55:36] workmad3: has joined #ruby
[18:56:28] saddad: has joined #ruby
[18:56:46] Musashi007: has joined #ruby
[18:56:46] godzillaenlacasa: has joined #ruby
[19:00:01] solars: has joined #ruby
[19:01:36] mary5030: has joined #ruby
[19:02:52] bruno-: has joined #ruby
[19:03:20] tejasmanohar: has joined #ruby
[19:03:29] tomphp: has joined #ruby
[19:03:33] dhollinger: has joined #ruby
[19:03:53] benlieb: has joined #ruby
[19:03:54] _aeris_: has joined #ruby
[19:04:05] wookiehangover: has joined #ruby
[19:04:36] s2013: has joined #ruby
[19:05:25] dhollinger: has joined #ruby
[19:05:46] Pupeno: has joined #ruby
[19:06:15] howdoico1: has joined #ruby
[19:06:23] dhollinger: has joined #ruby
[19:06:49] dhollinger: has joined #ruby
[19:07:19] andyrs: has joined #ruby
[19:09:37] dhollinger: has joined #ruby
[19:10:56] andyrs: has joined #ruby
[19:12:04] andyrs: has joined #ruby
[19:13:23] cmisenas: has joined #ruby
[19:14:21] kirun: has joined #ruby
[19:14:57] strax: has joined #ruby
[19:15:22] oitnelis: has joined #ruby
[19:15:25] willywos: has joined #ruby
[19:15:52] dmolina: has joined #ruby
[19:19:05] djbkd: has joined #ruby
[19:20:23] VeryBewitching: has joined #ruby
[19:23:53] marr: has joined #ruby
[19:24:02] Zai00: has joined #ruby
[19:24:06] momomomomo_: has joined #ruby
[19:24:36] roxtrongo: has joined #ruby
[19:25:00] leafybasil: has joined #ruby
[19:27:43] workmad3: has joined #ruby
[19:29:15] jottr: has joined #ruby
[19:30:57] djbkd: has joined #ruby
[19:31:00] p0wn3d__: has joined #ruby
[19:32:10] SylarRuby: has joined #ruby
[19:34:25] Technodrome: anyone here ever used mechnizee before for scraping web pages?
[19:36:25] sharkman: has joined #ruby
[19:36:35] jgpawletko: has joined #ruby
[19:38:08] ruboto: Just ask your question, if anyone has or can, they will respond.
[19:39:53] Stalkr_: has joined #ruby
[19:40:31] Stalkr_: Is there an easy way to figure out the minimum supported version of Ruby for your app? I just want to specifiy it in Gemfile or should I just use the latest?
[19:40:38] DoubleMalt: has joined #ruby
[19:41:59] abyss: General question;) When you write some script to automate something like some daily sys admin routine or so , you write it using class or just structured language?
[19:42:22] centrx: Stalkr_, depends on what features used in the code
[19:42:28] dhollinger: has joined #ruby
[19:42:49] Stalkr_: centrx: There isn't an easy way to check what versions of Ruby is supported?
[19:43:06] centrx: Stalkr_, Not that I know of. What's the app for?
[19:43:23] Stalkr_: Just a simple REST API using Grape, it isn't very important
[19:43:55] centrx: Seems like you're not distributing it to the public then, so just use the latest version
[19:44:02] centrx: or I guess it's a library?
[19:44:17] centrx: 1.9 and up are very similar
[19:44:36] Stalkr_: Just a little REST API being used internally for another site
[19:44:49] dyleted: has joined #ruby
[19:44:49] dyleted: has joined #ruby
[19:44:51] centrx: Have to check if the code uses keywords arguments or other things in 2.0 or 2.1 etc
[19:44:54] Stalkr_: so just by me, could get by using the latest version, but just curious if I created a library some day
[19:45:52] Stalkr_: Would be neat with a library that could check it automatically though
[19:46:02] centrx: yes it would
[19:46:42] cajone: has joined #ruby
[19:47:32] ndrei: has joined #ruby
[19:49:46] vifino: has joined #ruby
[19:50:37] niemcu: has joined #ruby
[19:50:45] Musashi007: has joined #ruby
[19:52:11] OrbitalKitten: has joined #ruby
[19:52:42] DeweyD: has joined #ruby
[19:52:42] EminenceHC: has joined #ruby
[19:52:47] DeweyD: has left #ruby: ()
[19:54:13] krisquigley: has joined #ruby
[19:55:14] dgutierrez1287: has joined #ruby
[19:56:03] Musashi007: has joined #ruby
[19:56:51] havenwood: has joined #ruby
[19:57:30] crack_user: has joined #ruby
[19:57:53] workmad3: has joined #ruby
[19:58:01] OrbitalKitten: has joined #ruby
[19:58:15] djbkd: has joined #ruby
[19:59:50] OrbitalKitten: has joined #ruby
[20:01:50] bender_unit: has joined #ruby
[20:02:22] OrbitalKitten: has joined #ruby
[20:04:46] helpa: has joined #ruby
[20:04:58] failshell: has joined #ruby
[20:05:15] dgutierrez1287: has joined #ruby
[20:06:26] djbkd: has joined #ruby
[20:06:46] helpa: has joined #ruby
[20:08:06] DrCode: has joined #ruby
[20:09:26] RandyT: has joined #ruby
[20:12:43] Balzrael: has joined #ruby
[20:13:28] devoldmx: has joined #ruby
[20:13:33] MasterPiece: has joined #ruby
[20:14:18] allomov: has joined #ruby
[20:15:21] EminenceHC: has joined #ruby
[20:16:47] Kendos-Kenlen: has joined #ruby
[20:17:17] Technodrome: has joined #ruby
[20:17:52] djbkd: has joined #ruby
[20:19:42] djbkd: has joined #ruby
[20:20:15] moeabdol1: has joined #ruby
[20:20:18] benlieb: has joined #ruby
[20:21:24] adamholt: has joined #ruby
[20:22:13] Takumo: has joined #ruby
[20:22:13] Takumo: has joined #ruby
[20:22:39] rj-code: has joined #ruby
[20:22:46] craysiii: has joined #ruby
[20:22:51] Maletor: has joined #ruby
[20:23:22] rayners: has joined #ruby
[20:23:59] blt: has joined #ruby
[20:24:16] cndiv: has joined #ruby
[20:24:28] stamina: has joined #ruby
[20:25:28] tekacs: has joined #ruby
[20:25:33] JStoker: has joined #ruby
[20:25:48] JoL1hAHN: has joined #ruby
[20:25:51] nettoweb: has joined #ruby
[20:26:08] Guest59784: has joined #ruby
[20:26:32] [spoiler]: has joined #ruby
[20:27:23] tubbo: Stalkr_: `bundle gem modernizr` ;()
[20:27:34] dfockler: has joined #ruby
[20:27:52] lele: has joined #ruby
[20:28:00] EvilJStoker_: has joined #ruby
[20:28:03] [Butch]: has joined #ruby
[20:30:03] failshell: has joined #ruby
[20:30:52] Stalkr_: tubbo: Doubt I'm able to make something like that :-)
[20:31:54] skullcrasher: has joined #ruby
[20:32:21] dhollinger: has joined #ruby
[20:33:09] umgrosscol: has joined #ruby
[20:35:52] snockerton1: has joined #ruby
[20:36:19] last_staff: has joined #ruby
[20:36:32] finisherr: has joined #ruby
[20:38:03] startupality: has joined #ruby
[20:38:24] dhollinger: has joined #ruby
[20:38:31] tomphp: has joined #ruby
[20:39:49] Juanchito: has joined #ruby
[20:40:57] tobyx: has joined #ruby
[20:41:06] dhollinger: has joined #ruby
[20:41:28] tw1sted: has joined #ruby
[20:41:35] Ketchy: has joined #ruby
[20:41:48] gigetoo: has joined #ruby
[20:42:27] elektronaut: has joined #ruby
[20:43:02] dholling1r: has joined #ruby
[20:43:16] kaspergrubbe: has joined #ruby
[20:43:16] p7r: has joined #ruby
[20:43:21] Drakevr: has joined #ruby
[20:43:36] krisquigley: has joined #ruby
[20:43:47] Drakevr: has joined #ruby
[20:44:21] Morrolan: has joined #ruby
[20:45:02] canton7: has joined #ruby
[20:45:02] canton7: has joined #ruby
[20:45:22] frmendes: has joined #ruby
[20:46:03] Takumo: has joined #ruby
[20:46:03] Takumo: has joined #ruby
[20:47:35] jamesaxl: has joined #ruby
[20:48:18] Ketchy: has joined #ruby
[20:52:56] NeverDie: has joined #ruby
[20:53:13] dhollinger: has joined #ruby
[20:55:03] snockerton: has joined #ruby
[20:56:20] startupality: has joined #ruby
[20:56:41] baweaver: has joined #ruby
[20:57:18] dhollinger: has joined #ruby
[20:57:53] Musashi007: has joined #ruby
[20:57:54] dfockler: >> ~3 #huh?
[20:57:55] ruboto: dfockler # => -4 (https://eval.in/436984)
[20:58:33] dfockler: Inverse minus one operator?
[21:00:55] jhass: binary complement
[21:00:57] Rurik: has joined #ruby
[21:01:40] phutchins: has joined #ruby
[21:01:54] dfockler: ahh haha thanks
[21:01:56] jobewan: has joined #ruby
[21:02:44] Sou|cutter: out of curiousity, is there a way to tell if send(:remove_const, "Foo") will fail? const_defined? can return true if you inherit from a class that defines a constant, but you (rightfully) get a NameError trying to remove it
[21:03:31] yardenbar: has joined #ruby
[21:04:12] Sou|cutter: >> class A; B=1; end; class C < A; end; C.const_defined?(:B)
[21:04:13] ruboto: Sou|cutter # => true (https://eval.in/436985)
[21:04:28] Sou|cutter: >> class A; B=1; end; class C < A; end; C.send(:remove_const, :B)
[21:04:29] ruboto: Sou|cutter # => constant C::B not defined (NameError) ...check link for more (https://eval.in/436986)
[21:05:57] momomomomo: has joined #ruby
[21:06:03] naftilos76: has joined #ruby
[21:06:48] EminenceHC: has joined #ruby
[21:07:09] jhass: >> class A; B=1; end; class C < A; end; const_defined?("C::B")
[21:07:10] ruboto: jhass # => undefined method `const_defined?' for main:Object (NoMethodError) ...check link for more (https://eval.in/436987)
[21:07:16] jhass: >> class A; B=1; end; class C < A; end; Object.const_defined?("C::B")
[21:07:17] ruboto: jhass # => false (https://eval.in/436988)
[21:07:40] jhass: >> class A; B=1; end; class C < A; end; C.constants
[21:07:41] ruboto: jhass # => [:B] (https://eval.in/436989)
[21:07:42] jpiche: has joined #ruby
[21:07:44] vdamewood: has joined #ruby
[21:07:52] dhollinger: has joined #ruby
[21:09:07] jhass: >> class A; B=1; end; class C < A; end; C.const_defined?(:B, false) # Sou|cutter
[21:09:08] ruboto: jhass # => false (https://eval.in/436990)
[21:09:13] jhass: reading docs helps ^.^
[21:14:39] howdoico1: has joined #ruby
[21:17:36] dhollinger: has joined #ruby
[21:17:48] dfockler: I didn't know you can index into the bits of a fixnum
[21:17:56] Igorshp: has joined #ruby
[21:18:05] dhollinger: has joined #ruby
[21:18:22] jottr: has joined #ruby
[21:18:40] dhollinger: has joined #ruby
[21:19:17] dhollinger: has joined #ruby
[21:20:59] mondayrain: has joined #ruby
[21:21:48] jhass: yeah, it's great for when you think you have an array but actually have a number. yay ducktyping!
[21:23:20] Musashi007: has joined #ruby
[21:23:23] karapetyan: has joined #ruby
[21:23:27] allomov: has joined #ruby
[21:24:30] EminenceHC: has joined #ruby
[21:25:10] mwlang: has joined #ruby
[21:25:26] Ox0dea: >> -1[Float::MAX]
[21:25:27] ruboto: Ox0dea # => 1 (https://eval.in/437004)
[21:25:31] Ox0dea: Your abstractions are leaking!
[21:26:17] mwlang: I???m re-implementing an old Ruby SOAP app that makes use of http://ruby-doc.org/stdlib-1.8.7/libdoc/soap/rdoc/SOAP/EncodingStyle/ASPDotNetHandler.html
[21:26:45] mwlang: This library isn???t documented, so I???m wondering if anybody has a clue what this library does.
[21:26:48] adaedra: The only soap that won't make you clean
[21:27:25] KnownSyntax_: has joined #ruby
[21:27:29] mwlang: heh. Definitely getting my hands dirty with this one.
[21:28:25] KnownSyntax: has joined #ruby
[21:29:26] mwlang: ouch: ASPDotNetHandler is intended to be used for accessing an ASP.NET doc/lit service as an rpc/encoded service. in the situation, local elements should be qualified. propagate parent's namespace to children.
[21:31:15] momomomomo: has joined #ruby
[21:31:49] Rurik: has joined #ruby
[21:34:32] solocshaw: has joined #ruby
[21:34:46] tkuchiki: has joined #ruby
[21:35:16] FernandoBasso: has joined #ruby
[21:35:57] workmad3: has joined #ruby
[21:37:03] tkuchiki: has joined #ruby
[21:38:04] troyready: has joined #ruby
[21:38:08] vipaca: has joined #ruby
[21:38:34] Cache_Money: has left #ruby: ()
[21:39:28] riceandbeans: has joined #ruby
[21:40:08] riceandbeans: if array.include(foo) will check for a literal match of exactly foo in an array element, how do I check for a partial match
[21:40:31] riceandbeans: like....let's say the array is ['foo', 'bar', 'baz']
[21:40:31] apeiros: riceandbeans: what's a "partial match"?
[21:40:39] riceandbeans: let's say I want to match against 'ba'
[21:40:46] riceandbeans: sa bar and baz would pass the true test
[21:40:51] apeiros: you can use array.any? with a block to test for any predicate of your choice
[21:40:55] riceandbeans: so if the array contains anything with 'ba'
[21:41:15] apeiros: .include? doesn't test for a "literal match" btw., it tests against ==
[21:41:26] riceandbeans: ok, I'm sorry my phrasing was incorrect
[21:41:54] riceandbeans: so array.any?('ba') should return true?
[21:42:24] adaedra: any? takes a block
[21:43:03] adaedra: so you have to write a block which test what you are looking for
[21:43:10] Ox0dea: See! #any? and friends need to be more like #grep. :(
[21:43:18] tomphp: has joined #ruby
[21:43:28] Ox0dea: https://bugs.ruby-lang.org/issues/11286
[21:43:31] adaedra: There's a `#grep`?
[21:43:45] Ox0dea: Yes, it's like #select, but it uses case equality.
[21:43:48] Ox0dea: It's great.
[21:43:59] Ox0dea: >> %w[foo bar baz].grep(/a/)
[21:44:00] ruboto: Ox0dea # => ["bar", "baz"] (https://eval.in/437007)
[21:44:19] Ox0dea: >> [1, 2.3, 'foo', :bar, 1i].grep(Numeric)
[21:44:20] ruboto: Ox0dea # => [1, 2.3, (0+1i)] (https://eval.in/437008)
[21:44:34] Ox0dea: We should be able to say `all?(Numeric)` and the like, I feel.
[21:44:39] toretore: yeah, writing your own predicate is such a hassle
[21:45:00] dfockler: That would be nice
[21:45:39] Pupeno: has joined #ruby
[21:45:42] adaedra: &ri Array#any? Array#grep @riceandbeans
[21:45:42] `derpy: riceandbeans: http://www.rubydoc.info/stdlib/core/Array#any%3F-instance_method, http://www.rubydoc.info/stdlib/core/Enumerable#grep-instance_method
[21:46:00] adaedra: hum, ruby.
[21:46:13] adaedra: &ri Enumerable#any? *
[21:46:13] `derpy: http://www.rubydoc.info/stdlib/core/Enumerable#any%3F-instance_method
[21:46:58] Ox0dea: >> %i[any? all? one? none?].select { |m| [].method(m).owner == Enumerable }
[21:46:59] ruboto: Ox0dea # => [:all?, :one?, :none?] (https://eval.in/437009)
[21:47:02] riceandbeans: so, I want a true/false return from checking to see if /foo/ is within the results somehow
[21:47:35] tomphp: has joined #ruby
[21:47:35] adaedra: well, either you make a block to any?, either you adapt Ox0dea example and use grep
[21:47:51] GnuYawk: has joined #ruby
[21:47:51] GnuYawk: has joined #ruby
[21:48:15] dfockler: what's the rationale for =~ returning the index or nil?
[21:48:25] riceandbeans: >> ['foo', 'bar', 'baz'].grep?(/ba/)
[21:48:26] ruboto: riceandbeans # => undefined method `grep?' for ["foo", "bar", "baz"]:Array (NoMethodError) ...check link for more (https://eval.in/437010)
[21:48:29] yfeldblum: has joined #ruby
[21:48:36] dmolina: has joined #ruby
[21:48:51] Ox0dea: dfockler: What would you prefer it returned?
[21:48:59] dfockler: true or false?
[21:49:07] Ox0dea: So... less information?
[21:49:17] riceandbeans: grep on command line can be true/false for output
[21:49:26] riceandbeans: here's my rationale....
[21:49:35] riceandbeans: action 1 creates array with a series of things
[21:49:38] mjuszczak: has joined #ruby
[21:49:41] Ox0dea: Too many words.
[21:49:48] Ox0dea: Stop and think about what you really need to say.
[21:49:53] riceandbeans: action 2 checks to see if system running this script is in the array of stuff in action 1
[21:50:07] riceandbeans: if it is, it runs some other code
[21:50:24] riceandbeans: but action 1 isn't giving back data in the exact way I antipated
[21:50:40] riceandbeans: I thought it was going to literally be column value from a mysql call
[21:50:52] yfeldblum: has joined #ruby
[21:50:56] riceandbeans: it's a mysql type with a hash inside and the keys being the column name
[21:51:15] quazimodo: has joined #ruby
[21:51:19] axl__: has joined #ruby
[21:51:33] banjara: has joined #ruby
[21:52:19] howdoico1: has joined #ruby
[21:52:41] toretore: how about you show us some real code and data riceandbeans ?
[21:53:46] Ox0dea: We're out of paint, and we were gonna do a shade of brown anyway; let him keep going.
[21:54:42] chipotle: has joined #ruby
[21:55:49] dfockler: Ox0dea: I guess =~ operates the same as true and false but the extra info can be used like you said
[21:55:51] workmad3: has joined #ruby
[21:56:12] Ox0dea: dfockler: Right, there are many methods like this.
[21:56:18] Ox0dea: Greater information density is a Good Thing.
[21:56:53] crack_user: has joined #ruby
[21:58:41] dhollinger: has joined #ruby
[22:01:01] riceandbeans: .any? seems to be returning true for everything
[22:01:28] Ox0dea: >> [false, nil].any?
[22:01:30] ruboto: Ox0dea # => false (https://eval.in/437012)
[22:01:42] Ox0dea: >> [false, nil].any? { |element| element == false }
[22:01:43] ruboto: Ox0dea # => true (https://eval.in/437013)
[22:01:45] adaedra: >> %w[foo bar baz].any? {
[22:01:46] ruboto: adaedra # => /tmp/execpad-424d3e651770/source-424d3e651770:3: syntax error, unexpected keyword_rescue ...check link for more (https://eval.in/437014)
[22:01:48] Ox0dea: Well done.
[22:02:01] adaedra: >> %w[foo bar baz].any? { |e| e == 'failure' }
[22:02:02] ruboto: adaedra # => false (https://eval.in/437015)
[22:02:42] adaedra: Blame the french keyboards I have to use at work with their two-line return key.
[22:02:44] Ox0dea: apeiros: It would be better if the eval.in link weren't appended for simple returned expressions; it's just noise in such cases.
[22:03:04] baweaver: has joined #ruby
[22:03:08] riceandbeans: >> ['foo', 'bar', 'baz'].each { |x| x =~ /magicalness/ }.any?
[22:03:09] ruboto: riceandbeans # => true (https://eval.in/437016)
[22:03:22] Ox0dea: ruboto: That's not how #each works.
[22:03:31] Ox0dea: riceandbeans: ^ You want #map.
[22:03:47] Ox0dea: Or just use #any? correctly.
[22:04:15] adaedra: here you pass the block as argument to each
[22:04:25] adaedra: and call any? on the result of each
[22:04:30] dfockler: >> ["huh", "wut"].grep(/wu/)
[22:04:31] ruboto: dfockler # => ["wut"] (https://eval.in/437018)
[22:04:44] newtonianb: has joined #ruby
[22:05:01] toretore: >> ['foo', 'bar', 'baz'].any?{|w| w =~ /ba/ } # riceandbeans
[22:05:02] ruboto: toretore # => true (https://eval.in/437020)
[22:05:08] toretore: >> ['foo', 'bar', 'baz'].any?{|w| w =~ /bab/ } # riceandbeans
[22:05:10] ruboto: toretore # => false (https://eval.in/437021)
[22:06:23] alphaatom: has joined #ruby
[22:06:48] dfinninger: has joined #ruby
[22:08:20] riceandbeans: in looks like it works here but on my data object it's failing
[22:08:29] riceandbeans: it's a mysql query result from mysql2
[22:08:34] JimmyNeutron: has joined #ruby
[22:09:14] ragingcake: has joined #ruby
[22:09:28] toretore: riceandbeans: as i said: show us the code.
[22:09:49] riceandbeans: I have DB queries in the code, I can't copy paste that
[22:10:54] yfeldblum: has joined #ruby
[22:11:01] Wolland: has joined #ruby
[22:11:13] polly_wog: has joined #ruby
[22:11:28] sharkman: has joined #ruby
[22:11:33] sharkman: whats the name of the rails channel!?
[22:11:39] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[22:11:59] sharkman: can i ask a question about rails here or would you shoot me
[22:12:06] Ox0dea: I would burn you.
[22:12:06] bender_unit: has joined #ruby
[22:12:09] yfeldblum: has joined #ruby
[22:12:31] riceandbeans: I would put you incorrectly in a .any? method and let ruby segfault you out
[22:12:50] Ox0dea: riceandbeans: You're getting segfaults in your attempts to use #any? on some MySQL thing?
[22:12:55] jhass: okay I can see why people claim this channel is hostile now I guess
[22:13:02] sharkman: this channel is SUPER hostile
[22:13:05] riceandbeans: Ox0dea: no, I was trying to make a funny
[22:13:08] riceandbeans: I guess I failed
[22:13:26] havenwood: Hi folk, happy afternoon!
[22:13:42] dfockler: bring in the jhass! the channel getting crazy
[22:13:43] Ox0dea: jhass: GIGO, in this case.
[22:13:59] Ox0dea: I'm usually a very helpful person, but sharkman is a known semi-troll.
[22:14:12] sharkman: what does this mean
[22:14:13] devoldmx: has joined #ruby
[22:14:13] sharkman: But the original developers had made some poor decisions, and you could see that if the same idioms were followed much more, the system would start to follow what is a common Rails progression, calcifying as heavy coupling starts to make it more and more difficult to make small changes without negatively influencing other parts
[22:14:30] sharkman: why is that a common pattern in ruby? what is heavy coupling?
[22:14:50] riceandbeans: it means there is more magic than some people like and some people think the extra magic is detrimental
[22:15:00] jhass: Ox0dea: I see
[22:15:20] sharkman: well they say that it slows development
[22:15:26] sharkman: how would magic slow development
[22:15:38] riceandbeans: I think they mean more that it slows performance
[22:15:47] mary5030: has joined #ruby
[22:15:54] Wolland_: has joined #ruby
[22:15:57] riceandbeans: but you shouldn't care about performance of a product that doesn't exist or you don't finish because you had to do too much work
[22:15:58] havenwood: Ox0dea: Part man, part shark... I guess we should expect it bites. ;)
[22:16:02] sharkman: yeah but why, what is special about ruby that causes that
[22:16:15] ragingcake: sharkman, coupling is measure of dependency betwen modules/classes. Ideally we strive for loose coupling.
[22:16:21] sharkman: oh thats what the article contends
[22:16:21] sharkman: http://blog.coreyhaines.com/2012/12/why-i-dont-use-activesupportconcern.html
[22:16:49] TheHodge: has joined #ruby
[22:17:12] toretore: 10 Ways In Which You Would Not Believe Rails Is Detrimental To Your Developer Experience
[22:18:05] Guest39549: has left #ruby: ("WeeChat 1.3-dev")
[22:18:19] havenwood: sharkman: Are you familiar with the difference between monoliths and microservices?
[22:19:12] charliesome: has joined #ruby
[22:19:27] havenwood: sharkman: http://martinfowler.com/articles/microservices.html
[22:23:32] Timba-as: has joined #ruby
[22:23:40] ragingcake: The 12 Factor App is also an interesting read, http://12factor.net
[22:23:47] tiagonobre: has joined #ruby
[22:26:09] RandyT: has joined #ruby
[22:26:54] oitnelis: has joined #ruby
[22:28:34] EminenceHC: has joined #ruby
[22:35:37] weemsledeux: has joined #ruby
[22:35:39] sharkman: what does this mean
[22:35:40] sharkman: This is all symptomatic of the Rails world only now just coming to terms with some of the Domain Driven Design concepts of Services, and at the same time having the project leader stand behind a really badly thought out approach to handling complex large software projects.
[22:36:05] platzhirsch: has joined #ruby
[22:36:06] benlieb: has joined #ruby
[22:36:16] platzhirsch: Oh dear, 700 more HN headlines to read, please help
[22:36:32] djbkd: has joined #ruby
[22:37:06] sharkman: what is domain driven design concept mean
[22:37:14] Pathfinder: has joined #ruby
[22:37:56] ferz_: has joined #ruby
[22:38:16] toretore: what does anything mean really
[22:39:01] platzhirsch: sharkman: It means if you don't own <name of your startup>.com, you should rename your startup
[22:40:29] mjuszczak: has joined #ruby
[22:42:02] NeverDie: has joined #ruby
[22:42:14] ramfjord: has joined #ruby
[22:42:15] baweaver: has joined #ruby
[22:42:24] Ox0dea: platzhirsch: Are you pg?
[22:42:41] charliesome: has joined #ruby
[22:43:03] platzhirsch: Is that a rhetorical question?
[22:43:13] Ox0dea: platzhirsch: http://www.paulgraham.com/name.html
[22:43:17] mahuebel: has left #ruby: ()
[22:43:26] jgt1: has joined #ruby
[22:43:26] shevy: sharkman I guess he means to design around typical rails idioms
[22:43:39] platzhirsch: Ox0dea: I know this post, cheers
[22:43:43] sharkman: what is a typical rails idiom
[22:43:44] Ox0dea: platzhirsch: I know you know this post.
[22:43:54] jottr: has joined #ruby
[22:43:57] platzhirsch: I knew you would know that I know this post
[22:44:00] shevy: sharkman if you look at typical rails code you see that they use all sorts of strange voodoo
[22:44:17] shevy: has :mice, eats :dogs, use :chicken_bones
[22:44:30] ragingcake: shevy, it???s MVC how is this voodoo it facilitates implmenting a common desing pattern.
[22:44:35] shevy: link to: :naughties
[22:44:37] opensource_ninja: has joined #ruby
[22:44:56] shevy: see sharkman? they even talk in strange ways
[22:45:14] ragingcake: shevy, given your stature yes.
[22:45:24] Ox0dea: His stature?
[22:45:27] sharkman: yes interesting
[22:45:28] Ox0dea: shevy: How tall are you?
[22:45:37] shevy: a proud 185cm!
[22:46:17] ragingcake: it was worth a try.
[22:47:13] riceandbeans: 18.5 hectameters?
[22:47:14] toretore: mvc is one pattern. rails is a large framework that utilizes many.
[22:47:32] startupality: has joined #ruby
[22:47:43] bkulbida: has joined #ruby
[22:47:48] Ox0dea: riceandbeans: shevy is almost 1.9555e-16 lightyears tall!
[22:47:50] bougyman: rails is MVC meets Frank Sinatra.
[22:47:54] umgrosscol: has joined #ruby
[22:48:12] shevy: Ox0dea I can't talk about physics anymore, I watched Interstellar...
[22:48:53] Ox0dea: On the movie night that I might've seen Interstellar, I picked Gravity instead.
[22:50:19] rbennacer: has joined #ruby
[22:50:37] shevy: good call, that way Sanity was preserved
[22:51:04] Ox0dea: Did seeing Interstellar make you question the very foundation of existence?
[22:51:35] startupality: has joined #ruby
[22:51:44] RandyT: has joined #ruby
[22:51:54] Musashi007: has joined #ruby
[22:52:15] cornerma1: has joined #ruby
[22:52:38] roxtrongo: has joined #ruby
[22:52:47] Ox0dea: Oh, time dilation.
[22:53:32] rattatmatt: has joined #ruby
[22:54:11] baweaver: I watch Doctor Who, screw your notions of spacetime
[22:54:13] shevy: it broke the moment the astronauts had to explain to each other what a black hole was
[22:55:08] Ox0dea: shevy: Nothing's really touching.
[22:56:02] rakm: has joined #ruby
[22:57:02] Ox0dea: Electrostatic repulsion makes electrons be like "gimme my space", and they always oblige one another.
[22:57:24] mondayrain: has joined #ruby
[22:57:28] dfockler: has joined #ruby
[22:57:29] shevy: halfway through I was rooting for Matt Damon
[22:57:49] Ox0dea: Who is his opponent?
[22:59:48] glundgren: has joined #ruby
[22:59:53] cndiv: has joined #ruby
[22:59:55] glundgren: good evening
[23:00:02] glundgren: i have a question about gsub
[23:00:14] glundgren: var = "_0x6389[0] - _0x6389[1]"; arr = ['str1', 'str2']; puts var.gsub(/_0x6389\[(\w)\]/, arr['\1'.to_i])
[23:00:24] _blizzy_: has joined #ruby
[23:00:32] glundgren: it only gets the first match occurency
[23:00:35] Ox0dea: glundgren: Do you solemnly swear that you're up to no good?
[23:00:52] glundgren: i think its a bug
[23:01:08] Ox0dea: glundgren: Where did you get that string?
[23:01:19] glundgren: im trying to reverse eng a js
[23:01:42] Ox0dea: I knew it.
[23:02:11] glundgren: so, do you see, why it only gets the first ocurrence?
[23:02:25] glundgren: if i use it out of the arr[]
[23:02:30] glundgren: it writes correctly
[23:02:38] glundgren: theres anything im missing?
[23:02:40] djbkd: has joined #ruby
[23:03:21] glundgren: guys, im not using this javascript for anything
[23:03:33] glundgren: im just trying to learn using gsub
[23:03:41] glundgren: a friend showed me a js obfuscated
[23:03:47] glundgren: i went into the topic
[23:04:03] glundgren: and i found a opportunity to learn about regex and gsub
[23:04:05] RandyT: has joined #ruby
[23:04:10] glundgren: dont say i have no morals
[23:04:24] havenwood: glundgren: Be nice.
[23:04:28] baweaver: not very nice
[23:04:34] glundgren: he said i have no morality man
[23:05:20] shevy: I usually refine the regex on rubular.com
[23:05:51] dfockler: also we shouldn't condemn someone until we know the context in which they are working with the code
[23:06:01] diegoviola: has joined #ruby
[23:06:08] Ox0dea: glundgren: The most moral thing to do in this scenario would be to link us to this obfuscated JavaScript.
[23:06:24] shevy: glundgren you use only one () ?
[23:06:45] shevy: rubular.com/r/RjnHvh3V8p
[23:07:11] glundgren: i was on rubular
[23:07:31] glundgren: i mean, the gsub works
[23:07:37] freerobby: has joined #ruby
[23:07:44] glundgren: it returns me the matches correctly
[23:07:58] glundgren: but if i put it on a arr['\1'.to_i]
[23:08:11] glundgren: it gets me only the first \1
[23:09:19] glundgren: this var = "_0x6389[0] - _0x6389[1]"; arr = ['str1', 'str2']; puts var.gsub(/_0x6389\[(\w)\]/, arr['\1'.to_i])
[23:09:26] Ox0dea: glundgren: '\1'.to_i isn't doing what you think it's doing.
[23:09:29] Ox0dea: >> nil.to_i
[23:09:29] glundgren: returns this: str1 - str1
[23:09:30] ruboto: Ox0dea # => 0 (https://eval.in/437032)
[23:10:03] glundgren: var = "_0x6389[0] - _0x6389[1]"; arr = ['str1', 'str2']; puts var.gsub(/_0x6389\[(\w)\]/, '\1')
[23:10:12] glundgren: returns this: 0 - 1
[23:10:45] Ox0dea: Yes, '\1' only has special meaning in simple substitutions.
[23:10:47] shevy: glundgren hmm have you tried the {} variant of .gsub ?
[23:11:13] allcentury: has joined #ruby
[23:11:22] glundgren: shevy, like gsup(/whatever/) { |number| arr[number] }
[23:11:49] karapetyan: has joined #ruby
[23:11:57] shevy: gsub not gsup
[23:12:01] shevy: it's not wassup :D
[23:12:01] toretore: >> '\1'.to_i
[23:12:02] ruboto: toretore # => 0 (https://eval.in/437033)
[23:12:29] glundgren: yeah sorry :)
[23:12:34] toretore: "_0x6389[0] - _0x6389[1]"; arr = ['str1', 'str2'].gsub(/_0x6389\[(\w)\]/, arr[0])
[23:12:38] glundgren: so, it gives me the same result
[23:12:45] toretore: >> "_0x6389[0] - _0x6389[1]"; arr = ['str1', 'str2'].gsub(/_0x6389\[(\w)\]/, arr[0])
[23:12:46] ruboto: toretore # => undefined method `[]' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/437034)
[23:13:19] toretore: >> arr = ['str1', 'str2']; "_0x6389[0] - _0x6389[1]".gsub(/_0x6389\[(\w)\]/, arr[0])
[23:13:20] ruboto: toretore # => "str1 - str1" (https://eval.in/437035)
[23:13:32] tejasmanohar: has joined #ruby
[23:13:50] Ox0dea: glundgren: Unless your #gsub replacement is a simple String, '\1' is not special; it's just a String of length 2.
[23:14:08] toretore: >> arr = ['str1', 'str2']; "_0x6389[0] - _0x6389[1]".gsub(/_0x6389\[(\w)\]/){ arr[$1.to_i] }
[23:14:09] ruboto: toretore # => "str1 - str2" (https://eval.in/437036)
[23:14:44] Ox0dea: Or the argument yielded to the block, but yeah, $1 is fine.
[23:14:59] kidoz: has joined #ruby
[23:15:24] Ox0dea: >> 'abc'.gsub(/\w/) { |m| m.hex }
[23:15:25] ruboto: Ox0dea # => "101112" (https://eval.in/437037)
[23:15:29] rickmasta: has joined #ruby
[23:15:33] glundgren: thats correct
[23:15:33] Ox0dea: >> 'abc'.gsub(/\w/, &:hex) # or even this madness
[23:15:34] ruboto: Ox0dea # => "101112" (https://eval.in/437038)
[23:16:01] Yzguy: has joined #ruby
[23:17:27] glundgren: and baweaver, you dont look like a very tough guy...
[23:17:41] glundgren: i believe you never said this kind of stuff face to face to a guy, right?
[23:17:50] glundgren: i believe you dont have courage
[23:18:19] glundgren: you look weak
[23:18:20] toretore: $1 and m are not the same
[23:18:33] toretore: glundgren: stop it with the bs
[23:18:43] workmad3: has joined #ruby
[23:19:04] glundgren: toretore: ok
[23:20:26] shellie_: has joined #ruby
[23:20:58] djbkd: has joined #ruby
[23:21:07] weemsledeux: has joined #ruby
[23:21:36] glundgren: toretore: sorry, but im kind of old school, i dont admit this kind of behaviour with me or my friends, you know
[23:21:46] rakm: has joined #ruby
[23:23:19] glundgren: toretore: and that's something the first world is missing, some balls to fight these spoiled kids that hides behind a curtain of politically correctness
[23:23:22] benlovell: has joined #ruby
[23:23:40] roxtrongo: has joined #ruby
[23:24:22] toretore: glundgren: so you're a macho dickhead who makes up for lack of self esteem by being an asshole
[23:24:34] Ox0dea: Headshot.
[23:24:57] glundgren: toretore: man, my self esteem is great
[23:25:11] glundgren: its the politically correctness that is killing me
[23:25:31] glundgren: its a disease spreading through the world
[23:25:55] glundgren: to hide totalitarian mindsets and makes them protected
[23:26:00] toretore: your self esteem is not great if it depends on external affirmation
[23:26:53] glundgren: toretore: im pretty good, yeah
[23:27:08] chouhoulis: has joined #ruby
[23:27:20] glundgren: but this macho mindset is what lacks
[23:27:26] Ox0dea: glundgren: Any relation to Dolph?
[23:27:48] toretore: no, you revealed that you have low self esteem because you were offended
[23:27:50] glundgren: Ox0dea: hahaha
[23:28:01] Ox0dea: I wasn't being facetious?
[23:28:11] ICantCook: has joined #ruby
[23:28:11] glundgren: toretore: man, morals is something very important for me
[23:28:45] glundgren: my country is deep in corruption
[23:28:55] glundgren: its a topic that is very sensitive for most of use
[23:29:03] Ox0dea: Morality is objective, you say?
[23:29:05] glundgren: in the last years
[23:29:18] nzst: has joined #ruby
[23:29:42] baweaver: has joined #ruby
[23:29:46] glundgren: morality is the ethic you have to yourself
[23:29:54] glundgren: when you re alone
[23:30:00] tejasmanohar: has joined #ruby
[23:30:40] glundgren: and nobody is wathing you
[23:31:05] glundgren: morality, ethic, courage
[23:31:16] Ox0dea: glundgren: By your logic, we shouldn't do anything we wouldn't do if we were the only sentient being in existence?
[23:31:17] glundgren: its something that is fading away
[23:31:35] glundgren: depends on your morality ox
[23:31:42] Ox0dea: Yes, I'm specifically asking about yours.
[23:32:11] glundgren: but yes, i usually dont do what i doesnt want others do with me
[23:32:18] Ox0dea: That's not what I asked you.
[23:32:35] Ox0dea: > when you re alone... and nobody is wathing you
[23:32:55] djbkd: has joined #ruby
[23:32:59] glundgren: if youre the only human being on earth
[23:33:04] glundgren: morality lost its values
[23:33:18] eam: glundgren: we are PC bros here, join our frat or get hazed
[23:33:19] Ox0dea: You concede that your original proposition was retarded.
[23:33:31] glundgren: absolutely not
[23:33:40] glundgren: hahaha 7 billion people dont allows it
[23:33:57] glundgren: but if you want to live without morality, no problem
[23:34:15] glundgren: but i want to develope some values
[23:34:23] glundgren: 'macho' values
[23:34:34] glundgren: its something personal
[23:34:52] eam: glundgren: you can be macho and PC -- in fact most are
[23:34:58] glundgren: what is pc?
[23:35:03] snockerton: lol, suddenly #ruby has turn into #bash
[23:35:04] eam: politically correct
[23:35:12] eam: south park recently did an entire episode about it
[23:35:13] baweaver: ACTION sighs
[23:35:13] snockerton: with fewer F bombs
[23:35:20] glundgren: i cant agree with tought police
[23:35:46] glundgren: we here where i live
[23:35:54] glundgren: are in deep sh* because of this thing
[23:36:05] eam: glundgren: https://www.youtube.com/watch?v=xZDK_LG9DuU
[23:36:15] tkuchiki: has joined #ruby
[23:36:28] glundgren: and united states kind of is losting its freedom
[23:36:31] glundgren: because of that too
[23:36:41] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
[23:36:54] Technodrome: has joined #ruby
[23:37:12] snockerton: or head over to #bash, they always appreciate a good fight
[23:37:23] glundgren: not fighting, just talking
[23:37:24] eam: snockerton: or #ruby, for that matter
[23:38:27] glundgren: eam: do you want go to offtopic? so i can explain why it sucks?
[23:38:37] eam: glundgren: I'm already there
[23:38:56] JDiPierro: has joined #ruby
[23:40:03] cbz: has joined #ruby
[23:40:23] wkoszek: has joined #ruby
[23:40:44] chouhoulis: has joined #ruby
[23:42:35] nettoweb: has joined #ruby
[23:42:56] ebragaparah: has joined #ruby
[23:45:43] Ropeney: has joined #ruby
[23:48:22] wkoszek: Do you guys know any channel where Middleman is discussed? Tried #thoughbox, #middleman and #middlemanapp, but with no success.
[23:49:08] st1gma: has joined #ruby
[23:49:34] workmad3: has joined #ruby
[23:49:47] phutchins: has joined #ruby
[23:50:08] bender_unit: has joined #ruby
[23:51:14] deric_skibotn: has joined #ruby
[23:51:30] bigmac: has joined #ruby
[23:51:46] shevy: perhaps #rack
[23:52:07] shevy: middleman is very rarely mentioned on #ruby
[23:52:11] s00pcan: has joined #ruby
[23:52:21] shevy: you could still try to ask though, perhaps 1 out of 1048 knows something!
[23:54:52] tejasmanohar: has joined #ruby
[23:56:25] swgillespie: has joined #ruby