« Back to channel list

#ruby - 04 April 2014

« Back 1 day Forward 1 day »
[00:02:36] joelbrewer: hello folks, hoping someone can help me out. I'm trying to access regex matches from within an interpolated string http://pastebin.com/vW24Satn
[00:03:22] shevy: class Foo; def initialize; return 3;end;end <--- this won't work as expected right? I wont be able to do: foo = Foo.new # 3
[00:03:40] shinobi_one: shevy: whyyyyy
[00:04:02] lupine: shevy, right, new eats the return value of initialize
[00:04:07] lupine: you can override new and have it return whatever
[00:04:18] lupine: this is quite useful in modules
[00:04:30] lupine: (where it's not an override, of course)
[00:04:37] shinobi_one: there should be NO reason to do this in a class lol
[00:04:52] lupine: I can think of several
[00:04:55] lupine: get a better imagination
[00:04:59] shinobi_one: Enlighten me please.
[00:05:01] shevy: shinobi_one extend your outlook man
[00:05:14] lupine: mostly I use this in unit testing
[00:05:37] lupine: also shimming other classes
[00:06:00] lupine: MyComplexFunctionality.stubs(:new => MySimpleStubber.new)
[00:06:30] shinobi_one: That's not overriding new to return an integer.
[00:06:54] lupine: or you might have class Shim ; def self.new ; ... return RealClass.new ; end ; end
[00:06:59] lupine: it's the same idea
[00:07:09] shinobi_one: No, it's not. That has actual value.
[00:07:28] lupine: for all you know, MySimpleStubber.new return 3 and the only method I'm interested in is #to_i
[00:08:05] shinobi_one: I might die if I look at your tests.
[00:08:20] shevy: the weak die often and early
[00:08:42] shinobi_one: Only the good die young.
[00:08:47] shevy: that's true
[00:09:55] lupine: I didn't realise stubbing was so foreign to you
[00:10:10] shevy: stabbing!
[00:10:13] shevy: ACTION stabs shinobi_one 
[00:10:25] shevy: shinobi reminds me of japan
[00:10:31] lupine: anyway, it's just occurred to me that using modules for shims is a bad idea. you can mixin modules but you can't mixin classes
[00:10:51] lupine: so overriding new on a class is more precise than implementing a fake new on a module
[00:12:32] lupine: doesn't design patterns in ruby recommend undef new for singleton classes?
[00:12:59] lupine: been a while since I read it
[00:13:01] shinobi_one: not sure on that one
[00:15:14] shinobi_one: If we weren't the only three in here maybe we'd find out :3
[00:16:20] shevy: joelbrewer is also online
[00:17:03] shevy: joelbrewer btw your pastie is not useful, we can not reproduce it. provide the string that is assigned to tyour variable content
[00:17:19] shevy: and use a better pastie such as pastie.org or https://gist.github.com/, pastebin has those annoying flash ads
[00:19:43] lupine: it's not that important, but I'll look it up in the morning
[00:21:02] joelbrewer: shevy: I think I got it figured out :) thanks anyway!
[00:22:07] shevy: kk away on your path to world domination then
[00:27:43] taf2: so the libyaml bug??? adding gem 'psych', '~> 2.0.5' to Gemfile should do the trick?
[00:28:15] taf2: cap fucking deploy # ;)
[00:28:43] taf2: sorry running the tests now
[00:30:44] deg-: hi, just started working with sinatra and curious what the register calls are, example register Sinatra::Contrib, i can't find documentation on what 'register' does, any pointers?
[00:34:50] shevy: there is a #sinatra channel in case noone here knows
[00:35:59] shinobi_one: ^ you mean in case deg- doesn't know
[00:36:52] deg-: i wasn't sure if it was sinatra or ruby specific, ri doesn't seem to show anything, i'll just go code diving
[00:38:26] shinobi_one: lupine: do you use rspec?
[00:38:48] shinobi_one: is there a mocking library you use?
[00:38:50] lupine: it has a spec shim, which does most of what rspec does
[00:40:26] shinobi_one: but of course, mocha
[00:44:47] benzrf: hello rubyists
[00:45:00] shinobi_one: hey, how's your gem going?
[00:45:35] benzrf: shinobi_one: p sweet
[00:45:42] benzrf: have u tried it idr >.>
[00:45:51] shinobi_one: benzrf: i was messing with it the other day
[00:46:11] shinobi_one: benzrf: short memory on this one ;)
[00:46:39] shinobi_one: is that a TIE fighter?
[00:47:09] benzrf: it is a cry
[00:47:18] benzrf: the top dots are eyes, - is a mouth, , , are tears
[00:47:23] shinobi_one: looks more like chewbacca
[00:48:35] shinobi_one: lol i'm kidding i know what it is, but my fun is left short as the weather is turning into white flakes pounding into the ground and with that i must leave
[00:48:51] taf2: ah yes: http://starwars.com/media/audio/sw10-soundtrack/V-Imperial-March.mp3
[00:50:48] mozzarella: what's the alternative name for $0, again?
[00:51:26] benzrf: $SCRIPT_NAME or something i think
[00:51:31] benzrf: __FILE__?
[00:51:36] benzrf: no thats current
[00:52:04] mozzarella: $PROGRAM_NAME
[00:52:05] benzrf: huh what is __FILE__ anyway
[00:52:07] benzrf: some kind of kwd?
[00:52:14] mozzarella: the current file
[00:52:35] benzrf: i mean syntactically
[00:52:38] benzrf: it isnt a constant is it?
[00:52:44] benzrf: nor a method
[00:52:56] benzrf: some kind of magic lvar?
[00:53:43] combusean: it's a macro
[00:53:55] combusean: http://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html
[00:54:12] mozzarella: anyway, what's the idiom
[00:54:25] mozzarella: if $PROGRAM_NAME == something
[00:54:56] benzrf: combusean: but in ruby
[00:55:00] combusean: yeah, i know
[00:55:26] mozzarella: benzrf: normal variable I??think
[00:55:27] combusean: it's technically an instance method on the object class.
[00:56:05] benzrf: combusean: no it is not
[00:56:09] benzrf: >> method :__FILE__
[00:56:10] eval-in: benzrf => undefined method `__FILE__' for class `Object' (NameError) ... (https://eval.in/131531)
[00:56:24] combusean: that's straight from the docs
[00:56:26] taf2: __LINE__ :P
[00:56:40] benzrf: >> method :__LINE__
[00:56:41] eval-in: benzrf => undefined method `__LINE__' for class `Object' (NameError) ... (https://eval.in/131532)
[00:56:53] benzrf: 18>> method :__FILE__
[00:56:54] eval-in: benzrf => undefined method `__FILE__' for class `Object' (NameError) ... (https://eval.in/131533)
[00:57:27] combusean: why do you need an alternative to $0 ?
[00:57:52] mozzarella: less cryptic name
[00:58:12] combusean: it's a unixism
[00:58:15] mozzarella: so I??don't ask myself, what's $0 again?
[00:58:25] combusean: and its shared in other languages
[00:58:47] benzrf: $0 is traditional
[00:58:52] benzrf: in most contexts
[00:58:56] benzrf: bash uses it !
[00:59:09] combusean: it makes sense
[00:59:31] combusean: $0 for execution $1 for the first argument ...
[01:00:23] mozzarella: if I make the rb file an executable, yes
[01:00:32] mozzarella: otherwise I??call it with "ruby file.rb"
[01:00:36] mozzarella: doesn't make as much sense
[01:00:47] mozzarella: ?????????????
[01:00:49] combusean: it makes sense in the context of its execution
[01:01:12] mozzarella: that's how I??remember it, anyway
[01:02:49] combusean: how are there no ops here for 884 people?
[01:03:12] mozzarella: and show when there are troublemakers
[01:03:29] mozzarella: that's a freenode policy I??think
[01:04:22] mozzarella: I don't know how many of them there are??? Radar is one I think, apeiros too
[01:04:32] benzrf: combusean: apeiros is a op
[01:04:32] terrellt: We are all ops.
[01:04:32] benzrf: among others
[01:04:34] terrellt: Step lightly.
[01:04:43] combusean: ACTION sets terrellt on fire
[01:04:57] terrellt: I'm going to assume you stepped lightly when you did that.
[01:05:03] arubin: If you turn out the lights, the eyes of the ops will glow.
[01:42:06] shevy: If you turn out the lights
[01:42:11] shevy: someone will use candles
[01:46:55] benzrf: shevy: how deepy
[01:47:29] combusean: and still others will be content in the black.
[02:07:58] jbw: hey folks.. anyone here run a system wide rbenv install? i'm having issues with the 'rbenv rehash' command.. it keeps complaining that the shims directory isn't writeable.. is there a workaround?
[02:08:23] postmodern: jbw, sudo rbenv rehash ?
[02:09:03] jbw: is there a workaround which doesn't involve sudo or running of root processes ?
[02:09:12] combusean: i've had bad experiences with system wide installs. your app ought to be running as a user anyways.
[02:09:39] jbw: my app is running as a user. i just want to share the rbenv installed rubies rather than setup rbenv for every user on my system
[02:09:40] combusean: but that's in my context...
[02:10:02] jbw: i guess what i really need is system wide rbenv & rubies but keep the shims per user
[02:11:44] postmodern: jbw, you should consider just installing the version of ruby into /usr/local
[02:11:52] postmodern: jbw, one ruby to rule them all
[02:12:10] benzrf: i use ruby-install & chrub
[02:12:40] jbw: not very practical
[02:12:52] bricker`LA: jbw: have you considered symlinking ~/.rubies to /var/lib/rubies or something?
[02:13:16] jbw: ~/.rubies ?
[02:13:45] bricker`LA: jbw: whoops, thought we were talking about chruby, ignore me
[02:14:24] jbw: all i want is rbenv, system wide so each user doesn't need to install it, a global rbenv version but users can still override on a local per-user basis
[02:14:32] jbw: everything's working except for rehash
[02:14:41] bricker`LA: okay postmodern, what's the correct way to pronounce "chruby" out loud without sounding like I just had a stroke?
[02:14:49] postmodern: jbw, why do you need rbenv if you only want one ruby?
[02:15:03] jbw: err global rbenv version > global ruby version
[02:15:03] postmodern: bricker`LA, just like chroot :)
[02:15:11] bricker`LA: postmodern: ...
[02:15:18] jbw: because i want to be able to add new versions of ruby without upsetting existing users
[02:15:37] postmodern: jbw, /usr/local/bin takes precedence over /usr/bin in $PATH
[02:15:42] bricker`LA: postmodern: I guess these things just aren't meant to be said out loud
[02:16:29] jbw: postmodern, asssuming your path has /usr/local/bin specified first, then yes, but what's this got to do with my issue?
[02:16:50] postmodern: bricker`LA, yeah i've heard multiple pronunciations of unix commands, cha-root, schroot, ce-ahch-root
[02:17:16] postmodern: jbw, what im trying to say is you don't need rbenv/rvm/chruby if you just need one ruby
[02:17:21] postmodern: jbw, just install it into /usr/local
[02:17:33] postmodern: jbw, ruby-build 1.9.3-pXXX /usr/local
[02:17:38] jbw: i want to have multiple versions of ruby!
[02:17:39] benzrf: i usually say chamod but without the a
[02:17:42] jbw: that's why i'm choosing to use rbenv
[02:17:51] jbw: if user a adopts ruby 1.9.3-p484
[02:18:00] jbw: and i want to install a new version say 2.1.1 for new users
[02:18:01] postmodern: jbw, oh i see
[02:18:13] jbw: then i don't want to have to force user a to use 2.1.1 and break all his shit
[02:18:18] postmodern: jbw, well you could try chruby which is designed for system wide installs
[02:18:40] postmodern: jbw, or you could just specify the full path to bin/ruby per-app
[02:18:44] jbw: are you the author? ;)
[02:18:47] postmodern: jbw, not sure how you are running your apps
[02:19:14] postmodern: jbw, i've heard of people installing rubies into /opt/rubies, then changing the #! of your scripts to use /opt/rubies/ruby-2.0.0-pXXX/bin/ruby
[02:19:33] jbw: that could work but i want to avoid that if at all possible
[02:20:12] jbw: i like the rbenv method whereby you can set the ruby version in .rbenv-version and 'ruby' then reflects that version as does using #!/usr/bin/env ruby
[02:20:19] combusean: why aren't you using RVM if you want multiple ruby versions?
[02:20:26] combusean: i'm only saying that with no rbenv experience, btw
[02:20:34] combusean: rvm is clean and installs easy
[02:20:40] jbw: rbenv is cleaner IMO
[02:22:14] benzrf: i use ruby-install + chruby
[02:22:20] benzrf: super duper clean
[02:22:21] postmodern: jbw, chruby is only 100 LoC, rbenv does a lot more magic
[02:22:45] jbw: yeah looking at the github readme now.. it seems to do everything i want
[02:22:56] platzhirsch: what's going on here
[02:23:00] jbw: it's that magic where this rehash business is at so i'd rather than muck with that
[02:23:05] postmodern: jbw, one major caveat, auto-switching requires a shell with auto.sh loaded
[02:23:15] jbw: auto-switching ?
[02:23:31] postmodern: like when you cd into a directory, and it detects .ruby-version
[02:23:54] jbw: doesn't sound like too big a deal
[02:24:16] postmodern: yeah, auto-switching was not really intended for production envs
[02:24:17] combusean: the last 3 jobs i've had use rvm
[02:24:20] combusean: i default to the market
[02:26:01] jbw: how's chruby work with gem executables? e.g. bundle / unicorn etc.
[02:27:14] benzrf: jbw: it sets your env and ruby bin path
[02:27:15] benzrf: or some such
[02:27:33] benzrf: chruby jruby -> gem is now jruby gem
[02:27:51] postmodern: jbw, i just do `bundle install --deployment` and `bundle exec` or use bundler's binstubs
[02:28:02] jbw: so it just sets up your environment so everything is pointing to the right place
[02:28:15] postmodern: jbw, yep PATH, GEM_HOME, GEM_PATH
[02:28:32] postmodern: jbw, you could even hardcode these in ~/.bashrc and achieve the same effect
[02:31:41] jbw: ok.. i want to avoid hardcoding anything cuz it's likely i'll end up with hundreds of hardcoded files in the future then which need changing
[02:40:07] GreenPlastik: no worries. just wanted to shoot the shit and say hi. i'll be around.
[02:44:48] combusean: hi Testalot
[02:45:19] Testalot: I heard that the creator of ruby was inspired by emacs-lisp, so he created ruby in it's image.
[02:45:40] arubin: Testalot: Among other things.
[02:46:15] Testalot: I'm just now starting to learn emacs, so I'm not sure if I should focus on emacs-lisp or learning ruby.
[02:47:17] Testalot: can ruby make functions in the middle of a statement?
[02:47:36] BraddBitt: how do you mean, Testalot ?
[02:48:29] arubin: Testalot: Ruby has lambdas among other things.
[02:48:37] Testalot: like could I do (onclick obj (labmda ()
[02:48:37] Testalot: (show "hi"))
[02:49:11] Testalot: if it has lambdas then I think i'm good to go with ruby.
[02:49:21] Testalot: But can the lambdas be used in-line?
[02:49:23] arubin: Testalot: It is very common to pass around code blocks in Ruby. Lambdas are only one form in Ruby.
[02:50:07] Testalot: what are other forms?
[02:51:46] arubin: Testalot: http://awaxman11.github.io/blog/2013/08/05/what-is-the-difference-between-a-block/
[02:53:31] Testalot: oh. looks like ruby is pretty advanced.
[02:54:01] Testalot: ty. gonna try.
[03:06:35] benzrf: Testalot: hardly
[03:06:44] benzrf: the multiple kinds of lambdas is a sign of weakness, not strength
[03:06:48] benzrf: not to say that ruby is bad
[03:07:07] benzrf: but it is afflicted with a bad case of the TIMTOWTDIs
[03:07:41] arubin: benzrf: That is on purpose.
[03:08:59] benzrf: i know :P
[03:09:06] benzrf: also the article you linked is subtly wrong
[03:09:19] benzrf: return in a proc causes the method it was /defined in/ to return
[03:09:26] benzrf: and only works when passed downwards
[03:09:40] benzrf: *break* is the one that terminates the calling method
[03:10:11] arubin: I was just looking for something to give him a general idea.
[03:11:25] arubin: I am still figuring all of this out myself.
[03:12:08] benzrf: there's return, next, and break
[03:12:24] benzrf: BREAK will terminate the block AND cause the method that called the block to return nil.
[03:13:01] benzrf: actually it will cause the method that called the block to return the value given to break
[03:13:05] benzrf: like return does in methods
[03:13:16] benzrf: >> def foo(p); p.call; puts 'after p'; end; some_proc = proc {break 3}; foo(some_proc)
[03:13:16] eval-in: benzrf => break from proc-closure (LocalJumpError) ... (https://eval.in/131584)
[03:13:22] benzrf: wait u wut
[03:14:08] benzrf: >> def foo; yield; puts 'after p'; end; foo {break 3}
[03:14:08] eval-in: benzrf => 3 (https://eval.in/131585)
[03:14:14] benzrf: arubin: ^
[03:14:22] benzrf: *next* is like return in a proc
[03:14:41] benzrf: it terminates execution of the block, causing the yield or call to return the thing given to next
[03:14:47] benzrf: >> def foo; yield; puts 'after p'; end; foo {next}
[03:14:48] eval-in: benzrf => after p ... (https://eval.in/131586)
[03:14:54] benzrf: >> def foo; yield; puts 'after p'; end; foo {next; puts "never here"}
[03:14:54] eval-in: benzrf => after p ... (https://eval.in/131587)
[03:15:18] benzrf: *return* causes the method call during which the block was defined to exit
[03:15:33] benzrf: basically, a return in a block acts like a return immediately outside of the block
[03:15:38] benzrf: this lets you do something like:
[03:15:52] benzrf: foo.each {|v| return 10 if v > 1000}
[03:16:03] benzrf: and that will return from the method that the above code is in
[03:16:30] benzrf: if a proc hits a return while being run after its source method is done, you will get a localjumperror.
[03:16:47] benzrf: >> def foo; proc {return 3}; end; foo().call
[03:16:48] eval-in: benzrf => unexpected return (LocalJumpError) ... (https://eval.in/131588)
[03:20:48] selina345: i'm trying to install rails on ubuntu
[03:20:58] selina345: the process seems to have stalled midway at
[03:21:06] selina345: n_u ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt/ && ls /mnt/etc/grub.d
[03:21:06] selina345: <Ray2> mount: /dev/sda1 already mounted or /mnt/ busy
[03:21:06] selina345: <Ray2> mount: according to mtab, /dev/sda1 is already mounted on /mnt
[03:21:06] selina345: <Ray2> ubuntu@ubuntu:~$
[03:21:06] selina345: <mmiller13> this doesn't happen on wire or tether
[03:21:07] selina345: <testco> mmiller13: good signal?
[03:21:09] selina345: <mmiller13> good
[03:21:28] benzrf: what the fuck
[03:21:34] benzrf: why are you doing mounting stuff to get rails
[03:21:48] platzhirsch: what's happening here
[03:21:56] platzhirsch: this is out of control
[03:21:58] platzhirsch: calm down guys
[03:21:59] selina345: so the last line is
[03:22:06] selina345: installing ri documentation
[03:22:38] selina345: and it's been stuck on that forever
[03:22:52] benzrf: do u use ir
[03:22:57] benzrf: press ctrl c
[03:23:00] benzrf: fuck the police
[03:23:03] platzhirsch: I am going to sleep, good night everyone
[03:23:08] benzrf: good night platzhirsch
[03:23:17] platzhirsch: also please follow me on twitter @platzhirsch122
[03:23:22] selina345: now im getting CERROR interrupted
[03:24:44] Nilium: I have received the most amazing recruiting email just now. Really, really amazing.
[03:25:59] Nilium: http://dl.dropbox.com/u/31892/Screenshots/-sd-.png ??? Okee dokee. I'm not censoring it 'cause I don't think anyone's dumb enough to follow up on this.
[03:26:23] Nilium: Or because it's so amazing you'll be so awe-struck that you fall into a coma and are physically incapable of following up on it.
[03:26:37] benzrf: call the number
[03:26:42] benzrf: do a honeypot
[03:27:01] selina345: that's spam
[03:27:02] Nilium: It'd probably charge me like $500 just by calling it
[03:27:06] selina345: not a recruiting email
[03:27:08] deepy: That looks gorgeous
[03:27:31] Nilium: Nah, I looked up the company, they're a recruiter-spam company.
[03:27:32] Nilium: It is actually technically recruiting.
[03:27:53] iml: what's better: %W[ ] or %W( )?
[03:28:08] selina345: why wont ubuntu install rails for me
[03:28:11] Nilium: I prefer square brackets.
[03:28:17] Nilium: Square brackets are pleasing to the eye.
[03:28:40] Nilium: Also, the end result is an array, so it makes more sense.
[03:30:38] iml: the github style guide says to avoid spaces around the bracket, but no such condition seems to apply to ()
[03:30:48] iml: or rather inside the brackets
[03:31:33] iml: don't really know where that comes from, though
[03:32:38] Nilium: The github style guide is just a guide. Pick what works for you.
[03:33:47] BraddBitt: what is the technical term for the %W operator?
[03:34:21] Nilium: It's a string array literal.
[03:34:30] Nilium: Well, word array literal.
[03:34:50] Nilium: Where the words are strings.
[03:35:03] Nilium: Kind of like how %i will get you a symbol array literal.
[03:35:30] Nilium: Actually not sure if %I and %i do anything different though
[03:35:31] RubyPanther: >> %w/1 2 3 Indians/*%/ little /# When I was a child I was forced to sing this song
[03:35:32] eval-in: RubyPanther => "1 little 2 little 3 little Indians" (https://eval.in/131592)
[03:35:57] benzrf: >> %/foo bar/
[03:35:58] eval-in: benzrf => "foo bar" (https://eval.in/131593)
[03:36:07] benzrf: >> [1, 2, 3] * [4, 5]
[03:36:07] eval-in: benzrf => no implicit conversion of Array into Integer (TypeError) ... (https://eval.in/131594)
[03:36:19] benzrf: >> [1, 2, 3] * ['foo', 'bar']
[03:36:21] eval-in: benzrf => no implicit conversion of Array into Integer (TypeError) ... (https://eval.in/131595)
[03:36:31] benzrf: >> ['baz', 'quux', 'quuux'] * ['foo', 'bar']
[03:36:32] eval-in: benzrf => no implicit conversion of Array into Integer (TypeError) ... (https://eval.in/131596)
[03:36:41] Nilium: When I was little, I was forced to recite the US pledge of allegiance.
[03:36:47] RubyPanther: You're getting hypnotized by the /'s
[03:37:03] Nilium: I actually do not remember how it goes.
[03:37:20] benzrf: RubyPanther: ?
[03:37:49] RubyPanther: I part of about 20% of the class who recited the pledge in pre-150's form
[03:38:01] RubyPanther: benzrf: the second one doesn't ahve a w
[03:38:21] Nilium: So, no "under god"?
[03:38:52] Nilium: I remember that coming up in my rhetoric class a few years ago
[03:38:56] Nilium: Also the old US salute.
[03:39:27] Nilium: Or all the other weird religious symbols we crammed into our stuff in recent years that people just assume's been there since the inception of the US.
[03:39:47] RubyPanther: In my schools we were required to recite the pledge, recite the pledge with words omitted, or sit quietly during the pledge. So it wasn't really "required" except in name.
[03:39:47] benzrf: RubyPanther: so?
[03:39:49] benzrf: oh wait fuck
[03:39:55] benzrf: >> ['baz', 'quux', 'quuux'] * 'wat'
[03:39:56] eval-in: benzrf => "bazwatquuxwatquuux" (https://eval.in/131599)
[03:40:26] Nilium: I don't know if we had an option to sit out the pledge, but most of us mumbled it after a while.
[03:40:26] Nilium: Or just mouthed it.
[03:41:27] Nilium: I think the best thing I remember from my rhetoric class was when the instructor had us pretend he was the flag and do the old-style salute while reciting the pledge.
[03:41:43] RubyPanther: My class usually managed a properly bored and disinterested mumble. There was substantially more interest in memorizing the names of Presidents.
[03:42:02] Nilium: At which point he flashed up a picture of people saluting Hitler. I think he enjoyed that a lot.
[03:43:31] RubyPanther: I pledge allegiance to my rubber ducky, and the manual which he reads back to me...
[03:44:11] Nilium: I pledge allegiance to Dash, my documentation god.
[03:44:24] Nilium: Who was at one point a cat and is now apparently a train or something.
[03:44:44] Nilium: Dash works in mysterious ways.
[03:46:35] dseitz: Remember that time; when you went and looked at docsets; then realised there was a whole portal for rubygems and was like "not uh"
[03:52:17] dseitz: I haven't been able to reorder docsets as of the latest release
[03:57:08] jonmorehouse: anyone know a solid gem that I could use to generate hashes from markdown?
[04:02:55] Nilium: jonmorehouse: The digest stuff in the stdlib should probably be sufficient for that.
[04:03:23] Nilium: It's just text, there's no real reason to have a markdown-specific hash.
[04:09:56] jonmorehouse: ahh -- when I said hash I meant to create like a dictionary. Not actually hash the string text
[05:02:07] postmodern: what's the best practice for initializing git submodules from rake?
[05:02:22] postmodern: apparently git creates the submodule/ directory by default, but doesn't clone into it
[05:02:30] postmodern: so file 'mysubmodule' ... doesn't work
[05:05:27] pontiki: hmm.. no idea about that, postmodern
[05:17:16] civillian: I'm having an issue with ruby/activeldap, I'm getting 'false' when trying to save a user account after modifying it
[05:17:27] civillian: as in, u.save returns false
[05:17:33] civillian: even though I'm using an admin account for the bind
[05:18:19] civillian: u.save! returns "ActiveLdap::EntryInvalid: Distinguishedname is duplicated: cn=blah"
[05:18:32] civillian: what am I doing wrong
[05:19:37] pontiki: couldn't possibly say without looking at code
[05:20:42] civillian: I will see if I can paste bin my hacks :)
[06:27:11] dmarr: do you still have to set GEM_HOME and GEM_PATH when using rbenv
[06:27:43] dmarr: they are both empty for me and running bundle install fails trying to write to /System (osx)
[06:27:51] dmarr: so it seems rbenv isnt setting up properly
[07:00:49] dmarr: is there general toolchain channel for ruby?
[07:01:42] centrx: dmarr, What do you mean by general toolchain
[07:07:19] dmarr: like gem and bundler - how to set them up
[07:07:57] LadyRainicorn: It will autoinstall most of the dependencies.
[07:08:54] centrx: dmarr, There's #ruby, #ruby-lang, #rubygems, #bundler
[07:09:16] centrx: dmarr, This is usually the most active of those channels.
[07:09:31] centrx: dmarr, Not much activity in any channel at this hour.
[07:11:34] dmarr: ok - well thanks i'll mess around in a vm in the meantime
[07:11:37] LadyRainicorn: Seems active enough to me.
[07:12:18] LadyRainicorn: dmarr: Do you really want rbenv specifically? RVM tend to be more user friendly imo.
[07:12:57] dmarr: LadyRainicorn: i tried rvm on my work machine and its pretty ok , rbenv seemed a little more intriguing for provisioning servers.. im trying to get boxen installed too on my mac
[07:12:58] crome: more user friendly than rbenv? I dont know much about rvm but I have never use more than 1 command with rbenv
[07:13:01] crome: it seems user friendly eonugh
[07:14:32] LadyRainicorn: RVM manages system dependencies.
[07:14:53] LadyRainicorn: and just tends to be magicaller.
[07:15:13] dmarr: crome: do you still have to set the GEM_HOME and GEM_PATH to install gems? I've tried using system and 2.1.1 and they both try to install stuff into system paths
[07:16:26] crome: dmarr: ask me again a bit later, I can check my work setup
[07:16:33] crome: but I dont remember messing with them
[08:58:30] reactormonk: code golf: move 10% of the files in a directory to another one.
[09:11:00] guardian: hello, I have a .yaml file that contains smart quotes. I pass that file through ERB then I parse it with YAML.load
[09:11:02] guardian: irb(main):031:0> YAML.load(ERB.new(IO.read('./x.yaml')).result)
[09:11:05] guardian: so far so good
[09:11:22] guardian: but as soon as I do Encoding.default_external = 'ISO-8859-1'
[09:11:45] guardian: ERB outputs x80\x9C for the open smart quote
[09:11:48] reactormonk: guardian, somehow the idea of ERB -> yaml feels fishy to me
[09:12:00] guardian: and then the YAML parser dies
[09:12:02] reactormonk: guardian, btw, you can pass an encoding argument to IO.read - I hope, at least.
[09:12:20] guardian: with Psych::SyntaxError: (<unknown>): control characters are not allowed at line 1 column 1
[09:12:46] guardian: the thing is, if I change the encoding and don't pass the file through ERB then Psych parses it happily
[09:12:55] shevy: what encoding does erb use there?
[09:13:09] shevy: psych only allows utf
[09:13:47] guardian: reactormonk: fair enough, but I would like to solve the encoding puzzle first :)
[09:14:09] guardian: shevy: so you're suggesting I should convert ERB's output back to UTF-8 before sending it to psych?
[09:14:18] shevy: I dont suggest anything
[09:14:24] shevy: because I can not in good faith recommend erb :)
[09:14:31] shevy: and I don't like psych either
[09:14:45] shevy: what encoding do you get with ERB.new there?
[09:15:08] guardian: please guys, don't go the "do Y instead" path :/
[09:15:21] shevy: I did not say do Y instead
[09:15:22] guardian: what do you mean by what encoding do you get with ERB.new?
[09:16:01] shevy: My question is - what encoding do you pass to psych?
[09:16:08] guardian: if I do Encoding.default_external = 'ISO-8859-1' then IO.read('./x.yaml')).result outputs iso-8859-1 and escapes unicode characters it seems
[09:16:23] shevy: ok, psych won't allow this
[09:16:23] reactormonk: guardian, so why do you set the encoding?
[09:16:44] guardian: reactormonk: It's part of a test suite. I guess it covers the case for ruby under cygwin on Windows or alike
[09:17:03] reactormonk: guardian, ok. As mentioned, tell IO.read you want utf-8 or similar.
[09:18:05] guardian: yeah that's my idea as well, but I wanted to gather opinions
[09:18:23] guardian: as for ERB in YAML... well it's a hack to workaround the lack of include directive
[09:18:25] shevy: well it's quite simple, psych really does not give you an alternative.
[09:18:38] Hanmac1: psych is that problem
[09:18:47] reactormonk: guardian, fuck includes, just make a config directory
[09:18:58] shevy: I have invalid yaml files, they work with syck, syck is available as gem
[09:19:05] guardian: shevy: which I didn't know, so I'm glad you answered
[09:19:11] reactormonk: and IIRC even windows supports file links, correct?
[09:19:18] shevy: hey I did not know for a long time myself and hated this
[09:19:33] shevy: because all my system config and personal config files I cleverly stored in yaml back then :\
[09:19:44] shevy: then ruby generates all sorts of configuration files from that
[09:19:51] reactormonk: shevy, puppet?
[09:19:52] shevy: then suddenly syck was gone and psych was added and nothing worked anymore
[09:20:06] guardian: reactormonk: symlinks don't fly in my situation. I can't commit a symlink in git and expect it to become a windows symlink under windows
[09:20:07] shevy: nah, all self written over the years
[09:20:22] shevy: my first mistake was to depend on one-config-format-to-rule-them-all
[09:21:09] shevy: but yaml can be so convenient, it's like a drug :)
[09:21:29] RubyPanther: I thought psych added encoding support recently
[09:21:44] shevy: I don't follow its development too closely
[09:21:51] shevy: that would be kinda cool haha
[09:22:05] reactormonk: guardian, yeah, git isn't too great with windows and symlinks :-/
[09:22:38] reactormonk: not too sure if I need to add the symlinks part here.
[09:22:53] reactormonk: or the part about git </rant>
[09:23:27] shevy: never stop a rant!
[09:23:34] shevy: only add more <rant>s
[09:23:46] RubyPanther: I depend on one config format to rule them all... SQL
[09:24:00] shevy: I like my flat files :(
[09:24:11] reactormonk: I prefer flat files in directories for ultimate git fun
[09:24:20] crome: dmarr: I dont do any magic with ruby environment variables. gems are always installed under the current ruby directory which is used by rbenv
[09:24:21] shevy: I am archaic... cd foo/; vim lalala.config (ok... lalala.yml)
[09:24:21] reactormonk: or just good ol' elisp
[09:24:44] RubyPanther: I love flat files! only problem, my data is stringy and textured
[09:25:01] shevy: (rant) <--- valid lisp!
[09:25:37] shevy: str = "??????"; loaded = Psych.load("--- ??????".encode('SHIFT_JIS'))
[09:25:57] reactormonk: (lisp (is (great) (because (the (syntax)) (is (simple))))
[09:26:28] shevy: ruby can be simple as well!
[09:26:43] reactormonk: all those dots confuse me.
[09:26:45] shevy: look at how the psych author writes: https://github.com/tenderlove/psych/commit/960d30ef5ac4ab93db199852fcd93f3cc3dfe1dd
[09:26:51] shevy: def visit_Encoding o
[09:26:56] shevy: method definitions without any ()
[09:27:05] shevy: hmm and mixed cases :\
[09:27:58] reactormonk: shevy, that's what I like nimrod for. style insensitive ^^
[09:28:03] reactormonk: sucks for grepping though.
[09:29:03] reactormonk: --cs:none|partial set case sensitivity level (default: none);
[09:29:10] shevy: I hope arak will improve the nimrod tutorial
[09:29:49] shevy: there should be universal tutorials
[09:29:49] reactormonk: shevy, he probably won't, but I could. Give a few things you like/dont'
[09:30:10] shevy: reactormonk hmm something like the old "learn to program" guide in ruby
[09:30:17] reactormonk: btw, guess what the partial case sensitivity does.
[09:30:32] shevy: there is http://nimrod-lang.org/tut1.html which is ok but somehow it is hard to connect the parts together
[09:30:51] shevy: it's like geared to solid programmers primarily :(
[09:31:14] reactormonk: aka copy the whole thing for nimrod?
[09:31:45] shevy: I actually mean more something like a unified tutorial (buildup) for all programming languages out there
[09:31:47] RubyPanther: mixed cases are bad, but method definitions without parens is normal
[09:31:56] shevy: something like a mix of it all... learn python the hard way... and so forth
[09:32:08] shevy: a link to a stdlib reference + explanation, like in pickaxe
[09:32:22] reactormonk: + explanation ?
[09:32:39] shevy: yeah, the pickaxe explained the stdlib too, as in brought examples and explained these. usage examples
[09:32:47] shevy: examples are best at explaining!
[09:33:04] reactormonk: yeah, the stdlib starts to get more of those
[09:33:08] RubyPanther: learn code the hard way is in most languages... http://programming-motherfucker.com/become.html
[09:33:09] keeguon: Hey guys I???m trying to combine net-ftp w/ openssl to connect to a remote FTPS using a defined certificate/key pair. In order to do this and avoid rewriting code I decided to use the following gem: https://rubygems.org/gems/double-bag-ftps. However whatever I do I run into the following error: "SSL_connect returned=1 errno=0 state=SSLv3 read server hello A: wrong version number???. Any ideas?
[09:33:10] shevy: RubyPanther but sometimes you need to use () for method invocations
[09:33:27] RubyPanther: sure but not for definition
[09:33:57] RubyPanther: I invoke with parens frequently, even when I don't have to... but never for definitions
[09:35:12] keeguon: FYI the code is here (without the real names): https://gist.github.com/Keeguon/9223910256b8dbfea56d
[09:35:55] RubyPanther: And in tenderlove's defense, most of his methods are correct lower-case Ruby style. visit_Encoding etc are in a form where you can say send( "visit_#{klass}" )
[09:47:08] apeiros: if it's about https://github.com/tenderlove/psych/commit/960d30ef5ac4ab93db199852fcd93f3cc3dfe1dd, then I'm quite sure he mixes cases because he uses send
[09:47:20] apeiros: i.e., he does send(:"visit_#{classname}")
[09:47:43] apeiros: ACTION lunch
[09:57:43] atmosx: how can I create a gem that accepts variabels, like username password etc?
[09:58:01] atmosx: I mean what is the best strategy for users to have it as easy as possible?
[09:58:15] canton7-mac: have a config file? read in env vars? make them input them every time
[09:58:47] canton7-mac: the env var one is quite common, coupled with the option to override on a per-command basis
[09:59:34] atmosx: env variables? hm. read a config sounds better. A yaml file perhaps?
[09:59:49] canton7-mac: that works too
[09:59:56] atmosx: like ~/.user_config.yaml
[10:00:08] canton7-mac: they can stick env var declarations in their .bashrc, or anywhere else, which is quite nice
[10:00:19] canton7-mac: whereas with a config file you have to managed where it's stored
[10:00:30] canton7-mac: and make sure the name doesn't collide with anything
[10:00:35] canton7-mac: but lots of people still use that successfully
[10:00:57] atmosx: Can the gem request user/password at the time of installation?
[10:01:25] canton7-mac: if it's installed as a system gem, and you might want multiple users...?
[10:01:43] atmosx: or at least I don't think so.
[10:01:48] atmosx: might be though, yes...
[10:01:57] atmosx: okay so env variables it is
[10:39:43] sigurding: is it possible to extend the optionparser list, after it has been initialized?
[11:13:19] Cork: could anyone explain the reason for a = { unless:->{} } vs a = { :unless=>->{} }
[11:13:28] Cork: (why the first one doesn't evaluate)
[11:14:15] tobiasvl: Cork: the { a: b } hash syntax means { :a => "b" }
[11:14:31] tobiasvl: or no it doesn't
[11:14:41] workmad3: Cork: what do you mean 'doesn't evaluate'?
[11:14:46] tobiasvl: disregard me
[11:15:01] Cork: workmad3: try run it in a console :)
[11:15:12] workmad3: >> a = { unless:->{} }
[11:15:12] eval-in: workmad3 => {:unless=>#<Proc:0x421fe450@/tmp/execpad-dcb872e5e2a5/source-dcb872e5e2a5:2 (lambda)>} (https://eval.in/131692)
[11:15:14] tobiasvl: it parses weird
[11:15:17] workmad3: Cork: looks fine to me
[11:15:19] tobiasvl: workmad3: try it in irb
[11:15:52] Cork: it's like the parser takes unless: as the "unless" keyword
[11:15:59] Cork: same for if
[11:16:07] Cork: any other key works fine
[11:16:23] workmad3: Cork: I think that's an IRB bug, not a ruby bug ;)
[11:16:57] Cork: heh, actually not sure if i've ran it outside irb
[11:17:03] Cork: workmad3: thx for the hint
[11:17:08] Cork: ACTION gtg
[11:17:12] workmad3: >> a = { unless:->{} }
[11:17:12] eval-in: workmad3 => {:unless=>#<Proc:0x41d9a454@/tmp/execpad-22ba6e705e67/source-22ba6e705e67:2 (lambda)>} (https://eval.in/131693)
[11:17:20] workmad3: Cork: ^^ there you go, outside IRB ;)
[11:17:54] workmad3: Cork: I think you're right that it's due to the unless or if... IRB is probably parsing them out in order to determine when to evaluate multi-line input
[11:18:25] workmad3: Cork: works fine in pry btw ;)
[12:01:40] platzhirsch: ACTION meows...
[12:14:42] DouweM: ACTION pets
[12:26:20] Jamo: Umm, whats the best practice in Ruby to ask user input so that it wont be shown - like when asking password?
[12:27:30] apeiros: require 'io/console' and disable echo
[12:27:50] apeiros: $stdin.noecho(&:gets)
[12:32:10] Jamo: apeiros: Thanks!
[12:55:18] Hanmac1: apeiros: did you know that Complex includes Comparable, but did not have <=> and any other similar methods like <= and >= ?
[12:55:56] Hanmac1: >> Comparable.instance_methods.map {|m| Complex.instance_methods.include?(m) }
[12:55:57] eval-in: Hanmac1 => [true, false, false, false, false, false] (https://eval.in/131789)
[13:05:23] Hanmac: hihi i found errors in rake and irb ;P
[13:24:30] shevy: I hate rewrites
[13:42:33] keeguon: hey guys do anyone of you know a little bit about the openssl lib?
[13:43:18] jhass: just ask your question, don't try to find the right person to answer it first
[13:45:15] keeguon: well I have this tricky issue I???m able to connect to a remote FTPS server (not SFTP but FTP w/ SSL) using openssl s_client and setting the starttls to ftp but when I try to do the same in Ruby combining with the net-ftp lib it seems that the starttls command isn???t sent
[13:46:02] keeguon: which is a bit annoying so is there anyway to replicate what the starttls option of openssl s_client is doing using the openssl in ruby?
[13:50:44] shevy: ok guys, it's time again
[13:50:46] shevy: down with the pants!
[13:52:00] keeguon: okay nevermind fixed it
[14:05:43] platzhirsch: shevy: hah, never
[14:05:50] shevy: you are excused
[14:05:56] shevy: in london it is not good to go down with the pants
[14:17:32] thoraxe: does anyone know if it is possible to observe the SELinux information about a file via File? I tried to google around for info but I am getting only results about selinux bothering ruby
[14:17:40] thoraxe: stat doesn't seem to know/care about selinux
[14:18:44] thoraxe: well, i should say that File::Stat.new doesn't pull in that information, but the stat utility (at least on linux) seems to have the info
[14:21:27] hoelzro: thoraxe: do an strace on stat to see what system calls it's using
[14:21:57] thoraxe: one sec gotta install strace
[14:23:29] shevy: wget http://sourceforge.net/projects/strace/files/strace/4.8/strace-4.8.tar.xz
[14:23:48] thoraxe: hoelzro: http://ur1.ca/gzmmd
[14:23:56] thoraxe: shevy: yum -y install strace ;)
[14:24:09] shevy: what version
[14:24:17] hoelzro: shevy: looks like getxattr
[14:24:35] hoelzro: thoraxe: looks like getxattr
[14:25:08] thoraxe: there is an xattr gem
[14:25:19] hoelzro: sounds like a good start =)
[14:25:25] thoraxe: but very old and not updated it seems
[14:26:22] rdark: thoraxe: I think you need the selinux bindings (libselinux-ruby on most distros)
[14:26:29] thoraxe: i'll poke around later. thanks! gotta jet
[14:26:32] thoraxe: rdark: hmm possibly!
[14:26:54] thoraxe: rdark: i do have that one installed
[14:28:35] rdark: thoraxe: take a look at https://github.com/puppetlabs/puppet/blob/42433ee4bfa1123c0cf072961cbd51a092d7406f/lib/puppet/util/selinux.rb for some ideas
[14:30:36] thoraxe: rdark: looks like they use some Selinux thing but I'm not sure wehre it came from
[14:30:38] thoraxe: i'll dig deeper later
[14:30:40] thoraxe: thanks all
[14:40:43] benzrf: yo DouweM u there
[14:41:25] benzrf: DouweM: ideas n shit
[14:41:32] benzrf: via bilbo_swagginz
[14:42:13] benzrf: DouweM: in quick, make it so that starting a new quick instance creates an empty git repo in ~/.quicks or something
[14:42:28] benzrf: then doing 'quick checkpoint' dumps the frozen state to that repo
[14:42:34] benzrf: as well as dumping the dir structures
[14:42:49] DouweM: I'd like that
[14:42:58] benzrf: then you can use 'quick git <commands here>' to execute those commands on the repo and autoload the new stuff
[14:43:38] benzrf: i.e. 'quick git log'
[14:43:43] benzrf: 'quick git checkout HEAD^^'
[14:44:36] benzrf: after each git subcmd, if the repo was modified then load the frozen state from it as well as all of the code
[14:44:51] benzrf: by dumping the code in addition to the state, you can merge branches
[14:45:02] benzrf: you keep the newer prog state but merge the code
[14:45:18] benzrf: [still planning on quick export of course]
[14:48:55] benzrf: DouweM: opinion on this mechanic:
[14:49:10] benzrf: doing 'quick start <name>' will create or load the repo ~/.quicks/<name>
[14:51:42] DouweM: sounds all right to me
[14:52:35] arubincloud: benzrf: Is there any documentation for quick?
[14:56:41] benzrf: arubincloud: not yet
[14:56:46] benzrf: (????????)
[14:57:18] arubincloud: A blog post? Anything?
[14:58:16] DouweM: benzrf: just add a quick (hehe) description of the available commands to the readme, and/or link to a screencast
[14:58:51] benzrf: arubincloud: the repo has a demo typescript
[15:04:02] Vik-Thor: I use capibara for functional testing, and i just wanted to know if there was a function who recognize a string in a HTML tag?
[15:05:36] j416: Vik-Thor: not sure I understand what you are trying to say, but look at nokogiri
[15:09:29] shevy: benzrf told you! you should work on docu
[15:09:35] benzrf: shevy: yeah w/e dude
[15:10:31] DouweM: Vik-Thor: yeah, capy can definitely do that. what are you looking for specifically?
[15:10:43] DouweM: j416: that's not relevant ;)
[15:11:07] Sou|cutter: if you have the text of the tag just use a regex on it
[15:11:44] j416: DouweM: alright. Didn't know capibara had a built-in parser.
[15:14:27] fbernier: Anyone knows if it's possible to use TracePoint to trace uncaught exceptions ?
[15:16:36] DouweM: j416: yeah, the whole point is that you can talk to the document over Ruby. the HTML isn't just parsed, it's actually loaded in a (headless) browser
[15:17:19] j416: crazy. :)
[15:19:25] DouweM: j416: if you didn't know that, I wonder what you've been using Capybara for!
[15:26:08] shevy: benzrf|offline lol
[15:26:10] shevy: this is so funny
[15:26:12] shevy: bbloom!!!
[15:26:21] shevy: we need to put more IRC nicks as mines and traps
[15:30:03] afkmouse: how's that, shevy ?
[15:30:03] mikecmpbll: uh, how would i remove a character from a string at a specific index and have it return the resultant string
[15:30:56] shevy: mikecmpbll do you really have to do it as one step?
[15:31:05] shevy: ttylmouse benzrf mis-tab completes, it's a lot of fun
[15:31:12] shevy: ttylmouse <benzrf> bbloom:
[15:31:12] mikecmpbll: oh, i think i can use chomp.
[15:31:17] shevy: ttylmouse <benzrf> *bbl
[15:31:35] shevy: you keep on changing nicks so quickly!
[15:32:23] shevy: mikecmpbll if that char is only one time in the string you could use .delete
[15:32:26] pontiki: mikecmpbll: can the character be anywhere in the string?
[15:32:34] shevy: what is the string anyway
[15:32:56] mikecmpbll: "plshelpmeshevy"
[15:32:57] shevy: easier to work with a specific example really
[15:33:03] shevy: what must be removed
[15:33:14] mikecmpbll: character at index 4.
[15:34:05] shevy: can I cheat :P
[15:34:05] shevy: "plshelpmeshevy"[0..3]+"plshelpmeshevy"[5..-1]
[15:34:18] shevy: would be nice if we could use [0..3, 5..-1]
[15:34:19] pontiki: iunno, monkeypatch a delete_at for String?
[15:34:29] mikecmpbll: there should be a version of slice that returns the sliced string
[15:34:48] shevy: or .opposite_slice
[15:34:53] shevy: or .slice_except
[15:34:57] stormbytes: trying to wrap my head around the way the 'inject' method works
[15:35:11] shevy: stormbytes the way I remember it is this: count up something with inject
[15:35:13] pontiki: superslice
[15:35:18] pontiki: sliceomatic
[15:35:23] shevy: >> [1,3,5,7,9,22].inject(0) {|sum, element| sum+element}
[15:35:25] stormbytes: yeah but it seems to not iterate over 0
[15:35:25] eval-in: shevy => 47 (https://eval.in/131836)
[15:35:34] shevy: iterate over 0? what does that mean
[15:35:46] shevy: you are out!
[15:35:59] shevy: pontiki I like superslice
[15:36:05] shevy: it makes my code feel very powerful
[15:36:39] stormbytes: (0..1).inject { |memo, x| memo + 1 } should be 4, its 3
[15:36:49] stormbytes: which baffles me
[15:36:59] stormbytes: sorry (0..3)
[15:37:23] pontiki: what is this (0i3) thing?
[15:37:47] pontiki: new syntax to me
[15:38:04] stormbytes: [0,1,2,3].inject { |memo, x| memo + 1 } should => 4
[15:38:49] pontiki: you didn't give it an initializer
[15:38:55] apeiros: stormbytes: why should it be 4?
[15:38:58] pontiki: so it pulls the first element off to use as that
[15:39:22] pontiki: >> [0,1,2,3].inject(0) {|memo,x| memo + 1}
[15:39:22] eval-in: pontiki => 4 (https://eval.in/131837)
[15:39:32] stormbytes: inject *should* initialize the sum/memo to the first value
[15:39:41] apeiros: stormbytes: it does
[15:39:42] pontiki: yes, it does
[15:39:44] stormbytes: it shouldn't (to my knowledge) pull it off
[15:39:52] pontiki: but that leaves only three elements left in the array
[15:39:58] stormbytes: damn??? it shifts it??
[15:40:13] pontiki: you'd prefer it evaluate it twice/
[15:40:24] j416: DouweM: never used capybara.
[15:40:24] DouweM: which makes sense when you're using the actual values instead of just "1"
[15:40:33] apeiros: stormbytes: http://pastie.org/8994374
[15:40:35] albedoa: stormbytes what result are you expecting?
[15:40:37] apeiros: this is what's going on
[15:40:45] apeiros: at first iteration, memo has the value of the first element
[15:40:59] apeiros: so yes, it is not being iterated over
[15:41:16] stormbytes: i just spent an hour in IRB over this
[15:41:57] albedoa: i still don't know what the confusion is :D
[15:42:22] shevy: better than taking 1 hour to get drunk
[15:42:24] stormbytes: i thought it was weird because .each doesn't work that way
[15:42:32] stormbytes: shevy I get drunk a lot faster then that
[15:42:40] pontiki: stormbytes: try each_with_object
[15:42:43] albedoa: .each != .inject tho..?
[15:42:50] stormbytes: pontiki what's the diff?
[15:43:02] apeiros: or set an explicit initial value
[15:43:20] pontiki: each is not the same as inject
[15:43:27] stormbytes: albedoa - the tutorial i was following states that 'each' is just like 'inject' only the latter has carries the sum internally
[15:43:43] apeiros: it is similar
[15:43:48] apeiros: inject builds up on each
[15:43:52] apeiros: it's not the same, however
[15:43:53] pontiki: each_with_object is similar in that there is an object being passed with the iteration
[15:44:00] stormbytes: apeiros can you initialize 'memo' ?
[15:44:08] apeiros: stormbytes: first arg to inject
[15:44:32] pontiki: i gave one above
[15:44:33] apeiros: (0..3).inject(10) { |memo, x| memo + 1 }
[15:44:37] apeiros: >> (0..3).inject(10) { |memo, x| memo + 1 }
[15:44:37] eval-in: apeiros => 14 (https://eval.in/131838)
[15:44:54] stormbytes: so you can initialize to 0
[15:45:05] pontiki: ACTION sighs
[15:45:06] stormbytes: then it should, theoretically, iterate 4 times (0..3)
[15:45:16] apeiros: it even does practically
[15:45:16] albedoa: not just theoretically
[15:45:32] DouweM: this is al expected behaviour, you could just have looked up the docs on #inject ;)
[15:45:49] stormbytes: i never figured out how to use Ruby documentation
[15:46:01] apeiros: ri Enumerable#inject
[15:46:04] stormbytes: i come from Php
[15:46:06] albedoa: google > ruby inject
[15:46:07] apeiros: in your terminal (bash/zsh)
[15:46:10] DouweM: well, either use ri or you Google "ruby enumerable inject"
[15:46:11] apeiros: albedoa: noooo!
[15:46:12] stormbytes: php.net???. and bob's your uncle
[15:46:25] albedoa: apeiros i mean if you can't figure out local docs
[15:46:32] apeiros: albedoa: still
[15:46:43] apeiros: at least use rdoc.info or ruby-doc.org and get the right ruby version
[15:46:54] stormbytes: i'd much rather use local docs
[15:47:03] apeiros: albedoa: your advice only leaves more people asking confused questions because they try to use 2.1 functionality in 1.8 or other way round
[15:47:08] pontiki: unlike using php.net :P
[15:47:13] apeiros: stormbytes: ri and gem server
[15:47:19] albedoa: apeiros fair
[15:48:07] stormbytes: so the format is ri Class#Method ?
[15:48:30] stormbytes: zsh: no matches found: Enumerable#inject
[15:48:32] DouweM: Class, or Module, as in this case
[15:48:46] stormbytes: I'm using 2.0 via RVM
[15:49:12] albedoa: apeiros i use ruby-doc.org and assumed that ppl understood that there will be discrepancies between versions
[15:49:14] stormbytes: albedoa yep, can google also. that's what i've been doing mainly
[15:49:18] DouweM: zsh doesn't like #. you need to escape it like \#
[15:49:29] apeiros: albedoa: people are (sad truth) ignorant
[15:49:41] pontiki: we are all people
[15:49:48] apeiros: pontiki: yes
[15:49:53] apeiros: scio nescio
[15:49:55] stormbytes: wowsers.. its all here
[15:49:57] albedoa: stormbytes "ruby inject" in google leads to the Enumerable docs with a "jump to" link to inject
[15:50:01] albedoa: just sayin
[15:50:33] stormbytes: i don't mind googling, but if I'm in a terminal window, irb for example.. its easier to just command line it
[15:50:44] albedoa: for an hour :D
[15:50:49] albedoa: okay i'm done teasing
[15:50:50] Hanmac: hm it seems rdoc has a anoying problem with the C parser ;P
[15:51:41] stormbytes: is ruby-doc.org always on the latest vs. of ruby?
[15:51:53] stormbytes: albedoa - growing pains
[15:52:02] mikecmpbll: stormbytes: it has the docs for the versions that it says
[15:52:11] mikecmpbll: latest being 2.1.1
[15:52:17] DouweM: stormbytes: check the URL
[15:52:19] shevy: lol albedoa
[15:52:40] shevy: stormbytes I started to collect ruby docu locally
[15:52:50] shevy: less annoying than have to read japanese-english
[15:52:54] stormbytes: id rather that
[15:53:16] stormbytes: can you search for a method (eg. inject) without knowing the class or module?
[15:53:20] shevy: my long term goal is to collect plenty of .rb files showcasing how things work
[15:53:28] pontiki: yes, stormbytes
[15:53:37] pontiki: ri inject will likely return the same thing
[15:54:00] pontiki: but will include all the modules/classes where it knows of it being documented
[15:54:07] albedoa: so my ri docs don't seem to knwo anything: $ ri Array => Nothing known about Array
[15:54:33] albedoa: does that mean i installed ruby without the docs?
[15:54:54] stormbytes: can you limit an ri search to say??? ruby core?
[15:55:23] shevy: remove all other docs
[15:55:34] pontiki: try ri --help to see all the options
[15:55:45] shevy: albedoa it is normally an extra step in between "make" and "make install"
[15:55:52] stormbytes: sure beans hauling Pickaxe to/fro starbucks
[15:57:32] albedoa: shevy thanks
[15:58:00] shevy: GreatSUN is sun still great?
[15:58:06] shevy: GreatORACLE
[15:58:29] GreatSUN: shevy: the sun is still great, else you would not see anything
[15:58:55] GreatSUN: I would not exchange the sun with a database
[15:59:32] shevy: it would be a fairly hot database
[15:59:37] shevy: and I think it would have to store a LOT of data
[15:59:57] shevy: just look at how far planet earth is away from the sun and still gets so much energy
[16:00:48] stormbytes: whats' a good terminal emulator app to use with ruby scripting?
[16:01:03] shevy: in kde konsole
[16:01:23] stormbytes: i may have put that wrong
[16:01:41] stormbytes: i'm using picocom to send ascii commands to an arduino board via usb/uart
[16:01:55] stormbytes: rather then doing it manually, i've decided to write a command line utility in ruby
[16:02:17] stormbytes: picocom doesn't seem to lend itself particularly well to scripting
[16:03:17] shevy: benzrf hey! please tab complete
[16:03:37] shevy: it was boring while you were sitting in starbucks benzrf
[16:04:11] stormbytes: ugh.. back to google
[16:05:08] shevy: yes stormbytes
[16:05:13] shevy: until the day you can work without google
[16:05:26] stormbytes: google killed god
[16:11:56] iitywimwybmab: i depend on their doodles
[16:32:24] jeregrine: using rabl for an api.
[16:32:35] jeregrine: when I push to heroku everything works perfectly.
[16:33:05] jeregrine: after a while the datetime format starts changing
[16:33:48] jeregrine: I've monkey patched date, datetime, and time to_json to do the correct format and it still changes over time
[16:36:24] DouweM: jeregrine: it... changes over time? you're gonna need to be more specific about that
[16:36:40] DouweM: jeregrine: few things in programming happend "randomly" "after a while" or "over time"
[16:37:48] jeregrine: DouweM: only happening in production. Immediately after push it works. After ~30mins it works
[16:38:02] jeregrine: it stops working after 30mins
[16:38:04] DouweM: jeregrine: post code, how the format changes, what you've monkey patched etc
[16:38:09] DouweM: jeregrine: everything that might be relevant
[16:39:36] jhass: only explanation that I'd have is a monkey patch not being executed at boot but under some condition the app needs to hit first
[16:39:54] banister: jeregrine you're monkeypatching core classes in production?
[16:40:08] jeregrine: only to try and fix
[16:40:10] banister: jeregrine a senior programmer should be yelling at u right about now
[16:40:11] workmad3: banister: I don't always monkey patch core classes, but when I do, I do it in production!
[16:40:21] jeregrine: its on all environments
[16:40:23] DouweM: jeregrine: you shouldn't need a monkey patch at all
[16:40:37] DouweM: jeregrine: I;m using rabl in production as well, and everything's working fine with dates.
[16:40:42] DouweM: jeregrine: again, post something we can actually work with
[16:40:47] jeregrine: i've used rabl several times
[16:40:51] jeregrine: and not once ran into this issue
[16:40:56] jeregrine: this is exceptional to be sure
[16:41:13] DouweM: at least tell us how the format changes
[16:41:47] workmad3: jeregrine: new background for you ;) http://memegenerator.net/instance/48124657
[16:41:58] GreatSUN: hi workmad3
[16:42:15] jeregrine: its not 'in production' we are doing in all environments right now
[16:42:17] GreatSUN: can someone shortly help me, cause I never had to implement something like that: https://gist.github.com/anonymous/9978441
[16:42:40] jeregrine: just trying to figure out whats the culprite since we cannot reporoduce in any other environment
[16:42:46] GreatSUN: I have to implement a receiver that has to work with all the args and values there
[16:43:00] jhass: GreatSUN: did you understand regular blocks and capturing them so far?
[16:43:15] GreatSUN: jhass: never have been working with that
[16:43:16] DouweM: jeregrine: again, from what to what does the format change?
[16:43:33] GreatSUN: jhass: some small intro url or such would be nice, if you have
[16:43:35] jhass: GreatSUN: so you have no clue what yield does for example?
[16:43:48] GreatSUN: jhass: oh, yield I know
[16:43:49] jeregrine: from : 2014-04-02T22:00:02+00:00
[16:43:49] jeregrine: to: yyyy-MM-dd HH:mm:ss Z
[16:44:25] GreatSUN: jhass: but I never heard of regular blocks and never saw code like this in a normal ruby script before
[16:44:44] jhass: GreatSUN: okay, so, you can capture a block to a proc with def somename(regular_args, &block); and pass a proc to a method with my_proc = proc { ... }; somename(regular_args, &my_proc)
[16:45:04] workmad3: GreatSUN: if that's doing what I suspect, you're gonna want to look up instance_eval ;)
[16:45:09] DouweM: jeregrine: you're sure that in both cases it's a Date object that's being serialized, and that it hasn't accidentally been saved as the second string representation in the DB?
[16:45:24] DouweM: jeregrine: so you're absolutely sure it's actually the Date serialization changing?
[16:45:36] jhass: GreatSUN: the thing you need to do for something like this to work is to change the execution context, so you'd implement a class that provides these methods and then run the block in the context of an instance of this class
[16:46:39] GreatSUN: jhass: hmmm.. ok, I am not really sure that I completely understood everything now, but lemme try
[16:46:45] jeregrine: DouweM: one of the first things we checked.
[16:46:53] jhass: GreatSUN: rough example: class DSL; def initialize(&block); instance_eval(&block); end; def somearg; ...; end; ...; end; def somename(regular_args, &block); DSL.new(&block); end;
[16:47:51] axl_: In ruby, a Float can be initalized by passing a string argument to its class name, example: Float("1") ???
[16:48:05] axl_: is this an initalization pattern? where can I learn more about this?
[16:48:09] jhass: GreatSUN: googling something like "building a ruby dsl" should give you tons of explanations and examples
[16:48:20] centrx: axl_, Those are simply methods of Kernel
[16:48:36] GreatSUN: jhass: ok, I got it I think
[16:48:43] GreatSUN: thanks a lot for your support
[16:48:48] DouweM: jeregrine: all right. well, without all the information I doubt we're gonna have any idaes that you haven't already had. any more related code would be appreciated
[16:48:50] axl_: centrx: I am new to ruby ??? not sure what 'methods of Kernal' mean
[16:48:50] workmad3: axl_: Float("1") is calling the method 'Float', nothing to do with the class ;)
[16:48:51] GreatSUN: workmad3: also thanks to you
[16:49:00] jhass: axl_: http://ruby-doc.org/core-2.1.1/Kernel.html#method-i-Float
[16:49:07] centrx: axl_, http://www.ruby-doc.org/core-2.1.1/Kernel.html#method-i-Float
[16:49:16] jeregrine: DouweM: yea I'm going to log everytime our action is called to show the source of the to_json moneky patch
[16:49:17] DouweM: jeregrine: as you mentioned, this is the first time this happens, so it's definitely something with your code, not some common rabl bug
[16:49:17] axl_: awesome. thanks guys
[16:49:19] axl_: i will look that up
[16:49:21] workmad3: axl_: Float and Integer are sometimes referred to as 'constant methods' btw
[16:49:26] DouweM: jeregrine: you shouldn't need the monkey patch at all
[16:49:29] workmad3: axl_: when used as conversions
[16:49:37] jeregrine: DouweM: hopefully -.- not the first confusing as hell bug I've run int
[16:49:39] axl_: aaah ??? so it is special to Float and INteger
[16:49:42] jeregrine: bug/behavior
[16:49:48] DouweM: jeregrine: hehe
[16:50:02] axl_: in other words, I should pursue writing similar methods for MyClass so that it gets initalized by something like MyClass("1")
[16:50:06] DouweM: jeregrine: I'm pretty familiar with the internals of Rabl, so if it does end up being something in there I may be able to help
[16:50:09] jeregrine: so over rabl right now TBH
[16:50:13] jhass: axl_: not really, you can do class MyThing; end; def MyThing; end; just well
[16:50:14] axl_: i meant 'i should not pursue'
[16:50:27] jeregrine: want to go back to mashing hashes together
[16:50:29] axl_: hmmmm??? .
[16:50:32] DouweM: jeregrine: hehe
[16:50:51] axl_: k. i'll go read the docs you guys linked and get some theory. Thanks a bunch guys
[16:51:08] DouweM: jeregrine: I love Rabl, but it does have a learning curve if you want to do anything more complicated than a flat hash of attribute values
[16:51:21] jeregrine: learning curve or design flaw?
[16:51:27] jhass: axl_: core uses them for conversions, personally I avoid adding such methods and prefer stuff like MyThing.from_x(..)
[16:51:41] DouweM: jeregrine: :)
[16:52:04] DouweM: jeregrine: It's definitely a design flaw if I needed to familiarize with the source to understand how to get what I wanted out of it
[16:52:09] axl_: jhass: Thanks for your inputes
[16:52:17] axl_: inputs*. That helps
[16:52:33] DouweM: jeregrine: but I'm gonna make myself some dinner. Good luck, and I'll be back
[16:56:31] snkcld: if my http client is receiving an EOF, what would that mean exactly is happening?
[16:56:41] snkcld: specifically it's excon receiving the EOF
[16:57:09] jhass: End Of File, you shouldn't expect more data and close the stream
[16:57:30] Hanmac: apeiros: ! the usa use mIRC for controlling their drones ;P
[16:58:32] pontiki: what do we do?
[16:59:22] pontiki: <Hanmac> apeiros: ! the usa use mIRC for controlling their drones ;P
[16:59:49] Hanmac: i dont use mirc, i use pidgin ;P
[17:00:29] pontiki: but i don't have any drones, either
[17:00:38] pontiki: heck, i don't even have any minions
[17:10:19] davexunit: hello all, I'm having some misunderstanding about modules. I have a class Foo::Bar that I'm writing tests for. In my test, I define a class Foo::Baz. I have code in Foo::Bar that can take a symbol :baz and translate it into a reference to Foo::Baz. my test fails.
[17:10:35] davexunit: this works in the "real world", outside of my testing environment.
[17:11:01] banister: davexunit you're not nearly giving enough information
[17:11:19] davexunit: banister: allow me to elaboratel.
[17:11:27] davexunit: s/elaboratel/elaborate/
[17:11:54] jhass: davexunit: show code
[17:12:00] davexunit: I am dynamically looking up a class in a module given a symbol.
[17:12:24] wallerdev: are you using const_get
[17:12:45] centrx: Who knows what he's doing, he needs to show code.
[17:13:03] wallerdev: centrx: you must be one of those people that skips to the last page of a mystery novel
[17:13:04] wallerdev: ruins the fun
[17:13:20] centrx: davexunit, Did you turn it off and then on again?
[17:13:35] davexunit: centrx: don't jump on me so fast, I'm trying to get stuff together.
[17:14:30] workmad3: davexunit: less backchat, more gisting!!!
[17:14:30] GreatSUN: jhass, workmad3: thanks a lot, I understood it and it is working properly :-)
[17:14:52] certainty: wallerdev: haha :)
[17:14:58] workmad3: wallerdev: why buy the novel when you can read the synopsis and the solution on wikipedia?
[17:15:45] davexunit: workmad3: working on it. it won't be a gist, though.
[17:15:53] workmad3: wallerdev: also, if the only reason to read the book is because of one unknown, and nothing to do with good, solid writing or decent characters... why did you buy it? ;)
[17:16:31] certainty: workmad3: damn you can take every comment and make it so that the one that made it feels bad
[17:16:46] davexunit: I have to write a simple example that demonstrates the issue without having to know everything about the application it's part of.
[17:16:57] workmad3: certainty: you really think that little of me? and that I could be that malicious and conniving? :(
[17:17:20] certainty: workmad3: i should've seen that one coming. Now i feel bad :p
[17:17:27] workmad3: certainty: :D
[17:18:59] pontiki: i think he thinks that *much* of you, not that *little*
[17:20:51] workmad3: pontiki: bah, stop ruining my fun :)
[17:21:05] pontiki: now i feel bad
[17:21:13] pontiki: you win! \o/
[17:21:26] workmad3: woo!!! what do I win!
[17:21:33] pontiki: workmad3: </sarcasm>
[17:21:53] workmad3: pontiki: bah, if you had feelings for random electrons on the internets, you'd have felt bad :P
[17:22:24] pontiki: i have no feelings for electrons, can't even feel them bounce off
[17:23:41] RubyPanther: In the old days of the Cathedral, the Words of Code were Sacred. Help with the Sacred Code was always reduced to foo and bar, so as to not offend the Temple Builders. In the post-post-modern world of Ruby, you're expected to have deconstructed all that already, and be trying to put the pieces together into something simple. It is no longer sacred, and foo and bar have become maligned and out of work. Now people expect to look directl
[17:23:41] RubyPanther: y at your pile of broken bricks to tell you what went wrong.
[17:25:00] GreatSUN: ahhh foo bar!
[17:25:09] GreatSUN: I love foo and bar
[17:25:27] GreatSUN: and in german you get "furchtbar" :D
[17:25:30] combusean: i love it when you end up using baz and bat because foo and bar are taken
[17:26:04] pontiki: after foo, bar, baz, you're supposed to use quux
[17:26:07] jhass: foo bar are great for writing context less examples
[17:26:15] jhass: they're horrible to explain problems
[17:26:24] GreatSUN: jhass: mostly, yes
[17:26:25] jhass: since problems tend to depend on context
[17:26:28] GreatSUN: matters on complexity
[17:27:11] GreatSUN: jhass: you know what "furchtbar" in german means?
[17:27:18] jhass: I'm german ,)
[17:27:34] GreatSUN: jhass: ahhh nice :-)
[17:27:37] jhass: (and no, I don't think they sound alike)
[17:28:34] Hanmac: shevy: https://www.youtube.com/watch?v=2hMcVAKPiX0 << oO
[17:32:37] GaryOak_: they should use iron man to promote ruby, they're the same color
[17:32:38] certainty: i once read a piece of C sources where the variables had names like, banana and diaper
[17:33:22] jhass: probably still better than all the single letter stuff
[17:33:36] certainty: oh that was in there too
[17:34:04] GaryOak_: everyone should start metaphorically naming variables
[17:34:43] certainty: meta-names?
[17:34:44] RubyPanther: mine are: foo bar baz bing bong omg wtf
[17:35:07] certainty: RubyPanther: heh ordered with the level of frustration in the moment you use them? :)
[17:35:28] combusean: ACTION hearts metasyntactic variables
[17:35:33] GaryOak_: it would let people know where difficult parts of the code are
[17:35:43] RubyPanther: certainty: if I get to help_im_trapped_in_a_bug then I'll throw it all away and write tests instead
[17:37:32] certainty: RubyPanther: good plan. I usually have tests like it "helps me when i'm trapped in a bug" ...
[17:37:45] GreatSUN: RubyPanther: hmmm... I got a lot of workarounds instead :D
[17:38:38] RubyPanther: GreatSUN: I don't need tests because I know what the workarounds were, and somebody else... isn't me! They can write the tests if they need them. I still remember what the code does.
[17:40:36] GreatSUN: RubyPanther: ahhh, you write tests to get to know what bug you found
[17:40:44] GreatSUN: sorry, missunderstood you though
[17:41:23] RubyPanther: If I know I found a bug but I'm not sure what it is... for most people that would be a test problem. For me that would imply an architecture rewrite.
[17:42:26] certainty: at least it's an indicator that there is something wrong. In the end, when all your shiny tests have passed and you app still misbehaves you need to be able to actually understand the system and debug
[17:42:41] certainty: i don't know if i'd always rewrite
[17:51:12] Hanmac: hihihi rdoc shows warnings when you install rdoc because its code is shitty ;P
[17:53:21] thrillagorilla: Hanmac: People still use rdoc?
[18:00:44] dmarr: I tried installing rbenv, and when I bundle install gems are still trying to install to system
[18:03:29] Jamo: dmarr: `which ruby` and `echo $PATH`
[18:05:32] dmarr: ruby was in ~/.rbenv/shims and ~/.rbenv/bin was first in path IIRC
[18:05:43] dmarr: its on my other machine, which I don't have with me
[18:06:15] jhass: so come back when we actually can debug your issue
[18:06:23] jhass: probably just missing rbenv rehash though
[18:07:13] Jamo: yea. or try opening a new terminal window
[18:09:47] dmarr: rbenv wasn't setting GEM_HOME or GEM_PATh even after rbenv rehash
[18:10:01] dmarr: so gem env gemdir was still pointing to system
[18:10:11] dmarr: do I need the gemset plugin?
[18:10:42] jhass: that's unlikely
[18:13:29] LastWhisper: hey guys quick question about regex... I've got this currently, I basically want to make the 2nd part optional
[18:13:37] LastWhisper: but I can't get rid of that trailing space if I write it only with the first part
[18:13:37] LastWhisper: http://rubular.com/r/obeoylRhK2
[18:13:52] LastWhisper: so if I write this: I have a localStorage cookie set for cookie_name with a value of 123
[18:13:57] LastWhisper: it works, it returns cookie_name and 123
[18:13:59] LastWhisper: but if I just have
[18:14:05] LastWhisper: I have a localStorage cookie set for cookie_name
[18:14:07] LastWhisper: with no trailing space
[18:14:11] LastWhisper: it doesnt register :<
[18:14:35] centrx: LastWhisper, Why not put the space in the ? grouping
[18:14:36] Jamo: if you live a trailing space to it it works
[18:14:49] LastWhisper: I tried putting the sapce in there!
[18:14:54] LastWhisper: it does not appear to work
[18:14:59] Jamo: ^I have a localStorage cookie set for (.+)(?: with a value of (.+))?$
[18:15:11] Jamo: this shou??d work
[18:15:19] LastWhisper: http://rubular.com/r/S2qvw0GRxF
[18:15:25] Jamo: https://cloudup.com/ck9xkNtBBKh
[18:15:27] LastWhisper: with the space within the optional params
[18:15:29] LastWhisper: it doesnt work for me
[18:15:53] LastWhisper: well, doesn't work.. in rubular
[18:16:31] RubyPanther: dmarr: usually that means you only added to PATH and didn't do eval "$(rbenv init -)"
[18:16:40] centrx: LastWhisper, It sure seems to work in Rubular
[18:16:48] LastWhisper: oh? shouldn't the 123 show up at the end>?
[18:17:31] dmarr: RubyPanther: good to know. I'll check the syntax but I do remember adding that.. even was inspecting the output of that init command
[18:17:32] RubyPanther: dmarr: sometimes people put in the wrong file for their system, I recommend using ~/.profile because it should always get run. The other ones only get run in certain conditions.
[18:17:42] dmarr: yep, thats what I use
[18:17:52] terrellt: Anyone seen ruby scripts slow down because you're puts-ing to the console?
[18:18:09] LastWhisper: lol wow im an idiot
[18:19:39] RubyPanther: terrellt: is it highly unlikely that puts is going to cause an IO bottleneck. I would check everything else first. And by everything, I'm including the Martian invasion.
[18:20:49] Jamo: I'v seen aleast in Java that if you print a lot the script will be slower
[18:21:03] Jamo: ans I bet its the same in Ruby
[18:21:29] Jamo: but it shouldn't matter unless you have huge datasets you will print
[18:21:36] combusean: ACTION tests this
[18:21:42] RubyPanther: Ruby uses the print functions from the C stdlib
[18:22:33] combusean: ACTION manages to crash vi in the process
[18:22:37] combusean: fuck i have the worst luck
[18:22:53] centrx: It sure seems slower to use puts
[18:23:11] centrx: probably waits on IO for terminal
[18:23:18] RubyPanther: printing to an IO is not going to slow down the code before and after. The print calls themselves will be slow if you're printing a huge amount to a console, or other slow IO. If you're printing in a tight loop, that can be slow enough to notice. But the code after runs normal speed.
[18:23:30] LastWhisper: this is what i was worried about centrx Jamo
[18:23:32] LastWhisper: http://rubular.com/r/f2XYq7mUwZ
[18:23:39] LastWhisper: the 123 isn't caught
[18:24:46] RubyPanther: turning on (or off) autoflush might help, depending on the system
[18:29:19] jhass: LastWhisper: http://rubular.com/r/f2XYq7mUwZ
[18:29:38] jhass: http://rubular.com/r/VIejgb2Y1L
[18:30:24] LastWhisper: jhass: what does the ? on the 2nd arg mean ?
[18:30:31] jhass: non-greedy
[18:30:42] LastWhisper: hmm can you explain that like i'm a 5 year old
[18:30:49] LastWhisper: like it was taking up the rest of the arg previously?
[18:30:57] LastWhisper: does non-greedy mean it's optional?
[18:31:05] jhass: insteading of taking at much as it can it takes as less as it can
[18:31:14] RubyPanther: I'd tell a 5yo, "don't worry, you can read the manual when you're older."
[18:31:58] wallerdev: .+ will match the rest of the string and not try to match anything after it if you dont use the ?
[18:32:06] jhass: LastWhisper: the sane and robust solution would be to drop the .+ for more specific versions, but I can't tell the possible values from that example
[18:32:49] jhass: LastWhisper: http://rubular.com/r/GtnzzKdj9v as a still rough one
[18:33:50] selina345: trying to deploy first heroku app
[18:34:04] selina345: but it keeps saying page not found
[18:34:10] selina345: or doesnt exist or w/e
[18:34:17] LastWhisper: jhass: that one works quite well
[18:34:21] wallerdev: are you using the right url
[18:34:49] selina345: yeah i did heroku open
[18:34:55] selina345: it's the first_app
[18:35:43] wallerdev: might want to ask in #heroku
[18:36:45] RubyPanther: does anybody know of a mirror or collection of all of _why's art that was released under some sort of open license?
[18:37:06] RubyPanther: like the stuff from redhanded
[18:40:30] wallerdev: RubyPanther: if you consider his code art, i think it's all on github
[18:40:57] Hanmac: shevy: http://xkcd.com/1351/
[18:42:21] RubyPanther: wallerdev: code I have! I want to borrow some art for in-game graphics
[18:43:17] RubyPanther: the performance art skit named _why is gone, but it can live on in the art that was performed during the skit... in my Flappy Duck game
[18:50:31] shevy: do you guys use something simple to split at 80 chars per line, if a string is longer than that?
[18:51:49] BraddBitt: do you mean in-editor shevy ?
[18:53:30] shevy: BraddBitt no, for output in a ruby script
[18:53:36] shevy: I have some long overflowing strings
[18:53:46] shevy: it would be nice to easily split them up on a per-word basis, at n position
[18:53:51] BraddBitt: output in terminal or to a file?
[18:53:57] shevy: terminal yeah
[18:54:07] BraddBitt: well wont re-sizing the terminal fix that?
[18:54:20] BraddBitt: ( ?????????)
[18:55:00] BraddBitt: you could use a gsub to place a newline char '\n' at any blank space position if the string is >80
[18:55:21] BraddBitt: and recursively do that until the string is less than 80 chars in length
[18:56:20] thoraxe: anyone kjnow where i can find the libselinux-ruby docs? i am trying to figure out how to observe selinux information about files on the fs
[18:56:39] shevy: Hanmac, http://www.sueddeutsche.de/politik/us-militaerflughafen-in-deutschland-ramstein-ist-zentrum-im-us-drohnenkrieg-1.1928810 lol mIRC
[18:57:02] Hanmac: shevy: yeah they use the evil program mIRC for that ;P
[18:57:11] BraddBitt: wallerdev if you don't mind me asking, are you in school or work?
[18:58:26] BraddBitt: ah, nice. I'm in SF too. I only ask because you've been particularly knowledgeable and helpful with my questions
[18:58:37] wallerdev: oh cool where at?
[18:58:45] BraddBitt: recent AppAcademy grad
[18:58:54] BraddBitt: so like, mid-market (unfortunately)
[18:59:12] advorak: I am trying to understand why the variable "letters" isn't understood in my code (I'm sure it has something to do with scope, but why it's not working I don't understand ...) https://gist.github.com/advorak/9980951
[18:59:18] wallerdev: im at 989 market
[18:59:27] shevy: what does this mean
[18:59:30] shevy: sex against money?
[18:59:44] BraddBitt: oh wow, you're super close to me then. I'm at 1061
[18:59:51] shevy: and why are you folks all in SF
[18:59:56] combusean: I live in Parkmerced =)
[19:00:01] wallerdev: all the cool people in SF shevy
[19:00:08] shevy: yeah I am beginning to see that wallerdev
[19:00:19] shevy: but the town scares me, it's built on a frigging hill
[19:00:20] combusean: work at main and mission
[19:00:30] wallerdev: market st / soma area is pretty flat
[19:00:34] BraddBitt: did you go to SFSU combusean ?
[19:00:48] combusean: maybe someday
[19:01:04] combusean: just needed an apartment in SF and I had requirements
[19:01:18] BraddBitt: I'm not particularly fond of living that far out
[19:01:30] combusean: yeah i hate it
[19:01:41] hooper: the outer richmond is nice
[19:01:52] shevy: who is hooper now
[19:01:57] combusean: the dirty 8 tho
[19:01:59] shevy: there are like a million SF folks popping out of nowhere
[19:02:17] wallerdev: SF meetup in #ruby
[19:02:29] combusean: ACTION ships shevy out from wherever he is out to SF.
[19:02:51] combusean: san francisco
[19:02:58] wallerdev: hes across the world
[19:03:03] certainty: ah, alright
[19:03:05] combusean: oh well, he'll adjust
[19:03:10] BraddBitt: advorak is that end on line 7 premature?
[19:03:19] BraddBitt: or one of them on line 11/12
[19:03:56] v0n: do you guys have an idea of an unicode character that makes think about a CPU?
[19:03:58] BraddBitt: well I guess now is an appropriate time to ask, does anyone know any quality SF ruby/rails/js/cs theory meetups ?
[19:04:22] BraddBitt: v0n cpu like processor chip or cpu computer?
[19:04:36] combusean: BraddBitt, does that mean there are bad ones in the city?
[19:04:50] wallerdev: theres a women's javascript conference held here every wednesday i think
[19:04:54] BraddBitt: I wouldn't doubt it. I've never been to any but I can't imagine they are all amazing
[19:05:06] BraddBitt: im particularly interested in a cs theory meetup
[19:05:07] v0n: BraddBitt: processor
[19:05:12] combusean: they're usually good places to drink and eat and socialize
[19:05:18] combusean: sometimes for free
[19:05:24] combusean: often for free
[19:05:33] BraddBitt: i doubt it v0n. Can you use a glyphicon or vector image instead?
[19:05:43] BraddBitt: that's what I've heard combusean
[19:05:53] BraddBitt: plus network and find me a jobby joby
[19:06:08] combusean: the market's tough
[19:06:09] advorak: BraddBitt, It is not premature. I reposted this question to #ruby after realizing it was a ruby question after posting it to #rubyonrails .. right now I'm getting help there :-) sorry for the trouble ..
[19:06:14] combusean: for there being a lot of demand
[19:06:19] combusean: not knowing ruby is enough
[19:06:25] wallerdev: its not that tough
[19:06:28] v0n: BraddBitt: I'm not familiar with glyphicon :s it's meant to use with a standard font such as DejaVu
[19:06:30] wallerdev: just send out some applications haha
[19:06:34] combusean: you need mobile or ops or scaling and usually have to have a solid CS fundamentals
[19:06:42] advorak: BraddBitt, There were really nice Ruby meetups in Baltimore and DC when I lived there through March last year ... There needs to be similar-quality ones here in SF, definitely ..
[19:06:54] combusean: wallerdev, in SF it's very tough, esp if you don't have a CS degree and aren't an ad nauseum expert at stuff
[19:07:06] wallerdev: oh he doesnt have a CS degree?
[19:07:13] BraddBitt: i never finished my degree
[19:07:25] wallerdev: do you have any projects you can talk about
[19:07:28] BraddBitt: i started my job search on monday though and I already have a few phone and technical interviews lined up
[19:07:29] wallerdev: like open source something or other
[19:07:35] BraddBitt: my github is quite populated
[19:07:37] wallerdev: then you'll be fine
[19:07:41] BraddBitt: in ruby, js, java, python, etc
[19:07:47] BraddBitt: well assuming I don't blow the tech interviews ( ?????????)
[19:07:49] combusean: java programmers interview you and they expect you to know binary search trees and linked lists and all sorts of sort algos that you'll never deal with in ruby.
[19:08:03] BraddBitt: ahaha exactly
[19:08:03] wallerdev: just brush up on interview questions and you'll do great
[19:08:11] DouweM: combusean: that stuff is still good to know
[19:08:11] BraddBitt: thats the plan today/this weekend
[19:08:11] combusean: they use the same academic qualifiers that academia uses.
[19:08:32] combusean: it is, DouweM, but it's not relevant to engineering these apps people are working on generally.
[19:09:00] wallerdev: BraddBitt: are you interested in working for a startup?
[19:09:08] DouweM: but I definitely think the two years of CS education I have had until now have made me a better programmer
[19:09:09] BraddBitt: that is mostly where I have been applying
[19:09:18] BraddBitt: I worked as a junior dev at one before, and I love the quickness of a startup
[19:09:23] BraddBitt: you don't get lost between the cracks
[19:09:23] combusean: BraddBitt, you on dice.com ?
[19:09:35] wallerdev: i know someone looking for people to work at one of the startups he invests in
[19:09:36] combusean: post your resume, recruiters do the work for you
[19:09:37] lupine: this is fun: Object.dup.new.is_a?(Object)
[19:09:45] BraddBitt: no. I'm on angel.co, s/o careers and linkedin (hah)
[19:09:53] BraddBitt: thank you combusean I'll do that now
[19:10:00] lupine: you can set up a completely parallel object hierarchy
[19:10:03] combusean: expect your phone to blow up as soon as you do
[19:10:14] BraddBitt: sounds good to me ( ?????????)
[19:10:32] lupine: Class.new.is_a?(Object) => true
[19:10:53] DouweM: lupine: is that surprising?
[19:11:07] shevy: Penis.new.better_than_the_old_one? # => true
[19:11:12] lupine: it's a little inconsistent
[19:11:20] DouweM: lupine: how so
[19:11:26] BraddBitt: seems consistent to me
[19:12:08] DouweM: yeah, not sure what you deem inconsistent
[19:12:10] lupine: maybe I'm just not thinking about it correctly
[19:12:16] certainty: shevy: as that doesn't remove the old one, you're wife suddenly has two problems :p
[19:12:17] RubyPanther: shevy: https://gist.github.com/rubypanther/9981233 # circa 2007
[19:12:22] DouweM: perhaps. the ruby class hierarchy can be a bit confusing at times
[19:12:36] lupine: Object.dup.new.is_a?(BasicObject) => true
[19:12:56] DouweM: I really don't see the inconsistency
[19:13:03] lupine: mm, I agree, there isn't one
[19:13:04] certainty: look harder!
[19:13:04] noob101: I love ruby,
[19:13:06] RubyPanther: shevy: rails probably has a more correct example by now
[19:13:11] noob101: ACTION Loves ruby.
[19:13:21] DouweM: noob101: you're in good company here then
[19:13:24] RubyPanther: <3 <3 <3 Ruby
[19:13:26] lupine: it's just fun that you can dup BasicObject (it turns out) and start inheriting from that
[19:13:54] BraddBitt: dup the kernel
[19:14:02] lupine: Class.new.superclass => Object, after all
[19:14:15] DouweM: >> BasicObject.dup
[19:14:16] eval-in: DouweM => can't copy the root class (TypeError) ... (https://eval.in/132001)
[19:14:27] DouweM: lupine: what were you saying?
[19:14:41] RubyPanther: >> Class.superclass.superclass
[19:14:41] eval-in: RubyPanther => Object (https://eval.in/132002)
[19:16:20] BraddBitt: >> puts self.kind_of?(Object)
[19:16:20] eval-in: BraddBitt => true ... (https://eval.in/132003)
[19:17:03] RubyPanther: All that stuff makes me glad that it doesn't matter because we really duck type :)
[19:17:43] certainty: still few opjects respond to #duck? :(
[19:17:58] BraddBitt: must not be a duck then ( ?????????)
[19:18:17] certainty: could be some other bird
[19:18:24] certainty: a combinator bird maybe
[19:18:48] RubyPanther: if you're worrying what kind of bird it "really" is, the duck already died
[19:19:03] Squarepy: shrodingers duck
[19:19:19] certainty: if it smells like a dead duck it probably is a dead duck
[19:19:31] RubyPanther: right, we don't know if you're duck typing until you do it... there is no declaration
[19:22:18] certainty: duck typing is just a synonym for hunt & peck
[19:23:08] noob101: Hey I have a question.
[19:23:23] certainty: does it involve ducks of some kind?
[19:23:28] noob101: I am trying to clean my lenovo computer clean, what channel should I go to for that?
[19:25:08] BraddBitt: he said clean, not destroy
[19:26:18] certainty: #basic as he wanted to goto there
[19:26:35] noob101: What channel should I go to, any suggestions please?
[19:26:44] cout: noob101: have you tried windex?
[19:26:53] shevy: noob101 eh
[19:26:59] shevy: go use linux man
[19:27:03] noob101: What is windex?
[19:27:06] Squarepy: noob101, #linux , please insert live cd -> overwrite HD -> yes, byebye windows
[19:27:12] cout: noob101: the blue stuff in the spray bottle
[19:27:20] shevy: windows hates you noob101
[19:27:24] noob101: Linux, hmm. I don't know. Everyone is telling me to switch to windows.
[19:27:30] noob101: I mean linux
[19:27:36] noob101: See I am thinking about windows
[19:27:42] certainty: they really mean amiga os
[19:27:43] noob101: I used it since I was a child.
[19:27:52] cout: noob101: you can try linux inside a vm if you want to experiment with it
[19:28:07] certainty: or a vm inside linux
[19:28:10] certainty: works both ways
[19:28:11] BraddBitt: or live boot
[19:28:18] lupine: linux fte
[19:28:20] noob101: But what channel would help me clean my computer?
[19:28:46] certainty: noob101: it depends on your operating system and the current phase of the moon
[19:28:49] BraddBitt: noob101 you mean clean up the software or physically clean the inside?
[19:29:07] BraddBitt: i think a google search would be more helpful
[19:29:16] noob101: BraddBitt, I am trying to start my computer from scratch like when I first got it
[19:29:39] BraddBitt: get spybot S&D, hijack this, clean up the startup processes, delete old files/folders, remove unused programs
[19:29:41] noob101: Bradd, I did that but there are so many types of computers and different operations that I am not familiar with
[19:29:53] noob101: I don't want to do an operation then mess up my only desktop.
[19:30:14] noob101: I already messed up my laptop yesterday it has a black screen and can't boot into windows. :(
[19:30:20] BraddBitt: combusean if i make my dice.com profile "Searchable" is that basically saying "spam me please"
[19:30:28] lupine: your local computer shop will be pleased to charge you a small fortune to help
[19:30:40] BraddBitt: noob101 start with basic virus scan
[19:30:43] BraddBitt: actually lets take this to PM
[19:30:43] combusean: BraddBitt, it's making you searchable to recruiters that have paid for dice membership
[19:30:50] BraddBitt: ( ?????????)
[19:30:55] combusean: you WANT to be spammed when you're looking for a job
[19:31:08] combusean: recruiters are your best friend when you're unemployed and your worst enemy when you're working
[19:31:21] BraddBitt: good advice
[19:31:33] RubyPanther: noob101: step 1: download linux "livecd" step 2: click something with words like "install to disk" step 3: when the installer asks about your hard drive, tell it to format. That will start you over fresh and new. step 4: click Next until done
[19:32:20] RubyPanther: recruiters are _always_ evil.
[19:33:33] RubyPanther: recruiters do NOT help you get a job, they help you get your resume into the first round of selection... right where it starts if you apply directly to companies you want to work for
[19:34:29] noob101: RubyPanther, I don't want Linux though. I don't feel comfortable. Thank you though for the advice.
[19:35:05] RubyPanther: if you need a special OS to "feel comfortable" you should just "get over it" and stop being scared of computers.
[19:37:41] RubyPanther: it is just applications, even the interfaces are all the same, eg, you get interfaces from frameworks not OSes. and applications it shouldn't matter if it is an Apple ][, an Amiga, Windows 3.11 with Win32s extensions, or linux
[19:48:20] BraddBitt: which is the more expensive operation: read random line from file or read random row from DB? The file, right?
[19:50:09] shevy: I think it may depend on the size
[19:50:12] DouweM: depends on your definition of "random", whether you have any DB indexes in place and whether the DB or file are already loaded into memory, but generally I'd say yeah, the file.
[19:50:14] iitywimwybmab: BraddBitt: not sure that's enough info to say
[19:50:19] DouweM: +1 shevy, size matters as well
[19:50:29] shevy: yeah man, girls taught me that
[19:51:10] BraddBitt: lets assume we are storing text (varchar 255 in the db), no indexes, 1 block of text per line in file/row in db
[19:51:13] BraddBitt: equal length
[19:52:27] shevy: well I would hope that the database is faster
[19:52:46] shevy: I am absolutely sure it is faster the more and more data it has stored, compared to the same information stored in flat files
[19:53:08] shevy: but who knows, perhaps you have a quadrilcore CPU and a few trillion gigabytes of RAM
[19:53:14] DouweM: with the file, you'd still have to read the entire file and then get the rand() line you're looking for, with the DB you'll be able to access it randomly
[19:53:31] shevy: perhaps he just uses seek to set a position
[19:53:46] BraddBitt: im deciding the most efficient way to build markov chains
[19:53:49] DouweM: are you looking for random or arbitrary?
[19:53:49] shevy: you know I have no idea what I am talking about
[19:53:53] shevy: because I never had to do any of that :)
[19:54:06] BraddBitt: but i think doing 5-10 database reads to build a chain could be expensivee
[19:54:08] shevy: sounds russian
[19:54:10] DouweM: in any case, the DB performance will be increased by using indexes, no such thing with plain text files
[19:54:33] BraddBitt: maybe a better solution is to hold a buffer of the last n lines written in memory, and use that to build the chains
[19:54:43] DouweM: but who the hell cares if we're talking < a million lines or so
[19:54:55] DouweM: your bottleneck will probably be Ruby anyway
[19:55:19] selina345: i keep getting readline errors in ROR on ubuntu
[19:55:31] BraddBitt: can you post the erroR?
[19:55:43] RubyPanther: BraddBitt: unless the file has fixed-length lines, you have to read the whole file up to the record, the database can short-circuit each row if you're testing for a condition. So the "random" case is not really a good sample... testing random rows against a string is a more realistic case, and the db is faster at that point even without indexes
[19:56:10] dorei: DBs usually use b-trees, right?
[19:56:19] certainty: you could also map the file to memory
[19:56:21] BraddBitt: i think i'll circumvent this whole problem and store the last 500 or so lines in memory
[19:56:23] RubyPanther: with an index the db is always faster, of course
[19:56:25] DouweM: dorei: that's one of multiple options for indexes, sure
[19:56:37] BraddBitt: plus, that ensures a somewhat "fresh" markov chain each time
[19:56:55] RubyPanther: The thing is, any disk that is used frequently, _including_ the db files, will be in your OS cache already
[19:57:47] RubyPanther: So it is a lot easier to slow that down that speed it up :) even using a ram disk
[19:58:15] RubyPanther: but I'd use a RAM disk before memory-mapping a file, because it is generic and doesn't push your optimization onto your other code
[19:59:35] selina345: Could not find gem 'rb-read\-line (~> 0.4.2)
[19:59:50] selina345: in the gems available on this machine
[20:00:22] BraddBitt: did you bundle install?
[20:00:31] selina345: bundle install what?
[20:00:38] selina345: i was trying to bundle install --without production
[20:00:40] BraddBitt: run the command `bundle install`
[20:00:48] selina345: and it keeps giving me that message
[20:01:13] BraddBitt: can you post the line in your gemfile that has that gem name?
[20:03:05] wallerdev: selina345: are you on windows?
[20:03:24] wallerdev: why are you using a readline gem then
[20:03:43] certainty: no love for rlwrap
[20:03:54] BraddBitt: yeah, ruby has a built in File class with #readlines method
[20:04:03] BraddBitt: if that is what you're ater
[20:04:04] thoraxe: can someone take a look at: https://github.com/thoraxe/lambchop -- when I call "Lambchop.dsl("/some/file", :selinux => true)" I get: NoMethodError: undefined method `selinux_stanzas' for Lambchop::Parser:Class
[20:04:29] selina345: BraddBitt: gem 'rb-read\-line (~> 0.4.2) ruby'
[20:04:37] selina345: that's the line in my gemfile
[20:04:44] BraddBitt: selina345 try gem 'rb-readline', '~> 0.5.1'
[20:04:56] BraddBitt: but again, you shouldn't need a gem for reading lines
[20:05:01] selina345: in that syntax?
[20:05:15] selina345: no backslash
[20:05:52] BraddBitt: i assume this is the gem you were trying to install: https://github.com/luislavena/rb-readline
[20:08:07] BraddBitt: thoraxe i assume the errors is on line 31 in lambchop.rb ?
[20:09:34] thoraxe: BraddBitt: from /home/thoraxe/.gem/ruby/gems/lambchop-0.2.0/lib/lambchop.rb:31:in `dsl' -- probably should've gisted it, sorry
[20:10:17] selina345: dude that totally worked
[20:10:40] selina345: ive been stuck on it for over an hour
[20:11:03] BraddBitt: thoraxe should selinux_stanzas be a class or instance method?
[20:11:29] thoraxe: BraddBitt: class method, which i guess means it needs to be def self.selinux_stanzas ?
[20:11:44] thoraxe: i suppose it could be an instance method, but i'm not sure on what instance it would be called
[20:11:52] BraddBitt: try it out and report back
[20:12:00] thoraxe: there won't bea new
[20:24:05] BraddBitt: wow combusean already cintacted by a recruiter
[20:24:13] BraddBitt: in less than an hour
[20:24:16] combusean: good luck out there Bradd
[20:27:04] sdegutis: Never mind, figured it out.
[20:27:29] sdegutis: Apparently I had to do ARGV.clear before doing anything else, otherwise 'gets' would assume args were names of files and try to load them up.
[20:28:01] thoraxe: so i'm trying to use rake to package my gem (https://github.com/thoraxe/lambchop/blob/master/lambchop.gemspec) but can't seem to figure out how to "use" rake to do it. trying to follow http://rake.rubyforge.org/classes/Rake/GemPackageTask.html for example
[20:29:42] thoraxe: that's supposed to go in the rakefile
[20:58:14] Takumo: Anyone know why when I call #save! on a mongoid model, I get the error "Undefined constant #{model_name}" ?
[20:59:30] Takumo: oh its something to do with my relationships :/
[21:17:26] lunks: What is the best way to propose a feature request to the language? Just add it to the bug tracker, mail to the ruby core or...?
[21:18:13] wallerdev: whats the feature request?
[21:19:17] bilbo_swaggins: if you can program, you can submit a patch yourself
[21:21:20] bilbo_swaggins: is GitHub the main repo for Ruby?
[21:21:28] shevy: benzrf, I am glad you are not like this guy: http://www.reddit.com/r/programming/comments/226co7/opencart_developer_doesnt_believe_in_proper/
[21:21:53] shevy: https://github.com/opencart/opencart/issues/1269
[21:21:58] shevy: $this->db->query("UPDATE `" . DB_PREFIX . "user` SET salt = '" . $this->db->escape($salt = substr(md5(uniqid(rand(), true)), 0, 9)) . "', password = '" . $this->db->escape(sha1($salt . sha1($salt . sha1($password)))) . "', code = '' WHERE user_id = '" . (int)$user_id . "'");
[21:22:02] shevy: no more mercy for PHP
[21:22:03] shevy: it must die
[21:22:30] bilbo_swaggins: all the power of perl
[21:22:34] bilbo_swaggins: with all the beauty of perl
[21:22:44] shevy: you are rubbing a wound here bilbo_swaggins
[21:22:49] shevy: perl should have prevented the rise of php :\
[21:23:11] bilbo_swaggins: nothing can stop languages from popping up
[21:23:24] bilbo_swaggins: even if an almost identical language already exists
[21:23:35] combusean: ACTION sighs at php
[21:23:40] combusean: I did that for far too long
[21:23:43] combusean: it's like a bad drug
[21:24:07] shevy: bilbo_swaggins on average distribution the amount of new people coming to lisp and coding a web shop in it will be very low
[21:24:09] Hanmac: bilbo_swaggins: the main repo is at http://svn.ruby-lang.org/repos/ruby/trunk .. https://github.com/ruby/ruby is only a mirror
[21:24:36] shevy: I'd argue that more people will go and use php than perl in the years to come
[21:25:20] benzrf: idk if its still the cause
[21:25:27] benzrf: but at least at one point
[21:25:44] benzrf: php auto converted numeric-looking strings into ints for comparison in some cases
[21:25:50] bilbo_swaggins: shevy, what did you mean about lisp?
[21:25:52] benzrf: so two long hex strings, such as hashes
[21:25:56] shevy: hey benzrf you should do something like this: http://k.swd.cc/burn/
[21:25:58] benzrf: could compare equal even when theyre not
[21:26:23] shevy: bilbo_swaggins you said that languages will pop up even if identical languages already exist, I likened it to the average distribution of new users coming to a language
[21:27:55] sent-hil: i'm getting i686-apple-darwin11-gcc-4.2.1: yes: No such file or directory when trying to install hiredis. i'm on mountain lion
[21:28:17] Hanmac: shevy what was this language statistic site? last "Language of the Year" was a proprietary one from microsoft
[21:28:43] shevy: I no longer trust them even for anything
[21:28:48] shevy: they seemed to be more an ad-site
[21:28:53] benzrf: shevy that looks sweet
[21:29:01] benzrf: but the english on the page is rather poor =[
[21:29:06] shevy: "go use this microsoft product, look it jumped up 20 ranks in a year"
[21:29:06] lagweezle: I misseded you all!
[21:29:27] shevy: benzrf hey
[21:29:32] shevy: english is hard, documentation is hard
[21:29:53] shevy: writing documentation is so damn boring
[21:30:24] Hanmac: shevy: last week i tryed to only commit something when in the diff more comment lines where added than code lines ;P
[21:30:52] benzrf: Hanmac: poor english ;-;
[21:32:04] Hanmac: benzrf: http://www.bbc.com/news/technology-26879185 "Xbox password flaw exposed by five-year-old boy"
[21:49:31] mozzarella: if I??have an object @cmd and would like to call multiple methods on it, what can I??do? I'd like to open its scope??? and not have to type @cmd.something everytime
[21:50:43] jhass: you do want to type that everytime
[21:51:07] jhass: some people do something like .tap do |c|
[21:51:40] jhass: but if I'd find @cmd.instance_eval do in production code to safe typing, I'd go hunting for the author
[21:59:41] bilbo_swaggins: is there any way to emulate namespacing with Ruby?
[22:01:22] Hanmac: bilbo_swaggins: modules /classes works like namespaces too ...
[22:01:47] bilbo_swaggins: I mean like Python's "import X as Y"
[22:01:54] bilbo_swaggins: maybe I'm using the wrong term
[22:02:34] chrisseaton: bilbo_swaggins: you can require 'x'; Y = X if you want to
[22:02:35] Hanmac: ShortConst = This::Is::A_VERY_LONG_NAMESPACE
[22:03:14] Hanmac: you could even store the whole Class inside local variables
[22:04:13] bilbo_swaggins: I mean less for making big things small
[22:04:22] bilbo_swaggins: but rather for not polluting the namespace
[22:05:10] shevy: bilbo_swaggins only by assignment to another namespace
[22:05:15] bilbo_swaggins: it's okay I'll work around it
[22:05:27] shevy: bilbo_swaggins if you support me then I will file an issue at the ruby bugtracker
[22:05:44] shevy: we need to present convincing arguments though
[22:06:00] bilbo_swaggins: this has been a gripe for you before?
[22:06:28] bilbo_swaggins: I don't have a *specific* need right now
[22:06:35] bilbo_swaggins: just trying to learn a new technique
[22:07:51] Hanmac: bilbo_swaggins: you mean like that?
[22:07:51] Hanmac: >> a = Class; b = a.new; c = b.new; [a,b,c]
[22:07:51] eval-in: Hanmac => [Class, #<Class:0x407f6404>, #<#<Class:0x407f6404>:0x407f63dc>] (https://eval.in/132137)
[22:08:25] mozzarella: jhass: thanks bro, that's exactly what I??wanted
[22:09:22] Hanmac: shevy i think he is more looking for something like require_into ... that prevents require from adding the code to the main namespace and add it into a anoymous/local one ...
[22:09:41] shevy: bilbo_swaggins yeah, I don't think we should be forced to restrict ourselves to namespaces that other people came up with for us
[22:09:49] mozzarella: what's wrong with it, btw?
[22:09:54] mozzarella: (instance_eval)
[22:10:04] shevy: Hanmac yep, that is also perfectly fine, my issue at the ruby bugtracker would include those possibilities
[22:10:20] bilbo_swaggins: I'd support you, yeah
[22:10:29] shevy: I've been too lazy to formulate it so far and without a chance of success and support I'll not do so anyway, too many other things I can work on safely or work around
[22:10:51] shevy: bilbo_swaggins right now I am even cheating the require system of ruby
[22:10:55] shevy: it's not good at all
[22:11:00] shevy: require 'foobar' # <-- foobar gem
[22:11:04] Hanmac: shvy for sample load with a parameter adds the code into an anoymous namespace ... but it does not retrun this one
[22:11:07] shevy: require 'foobar/module' # <-- foobar gem became a module
[22:11:14] bilbo_swaggins: it's about time I learn C#
[22:11:14] shevy: require 'foobar/autoinclude' # <-- foobar gem will be autoincluded
[22:11:27] bilbo_swaggins: now that it's wading into the OSS ecosystem
[22:11:32] bilbo_swaggins: I hear great things about it
[22:11:36] shevy: Hanmac yeah but I dont think matz will add anything to require()
[22:11:43] bilbo_swaggins: and I ought to have another Ruby-like language
[22:11:56] shevy: I'd need to make the case that python offers more with import
[22:11:57] mozzarella: should I??create my own ruby forum
[22:12:01] mozzarella: or use an existing one
[22:12:01] shevy: problem is, I dont know what importa all does
[22:12:14] Hanmac: shevy i may not want to add it to require itself, maybe an extra function like require_relative
[22:12:16] shevy: mozzarella use the ruby-forum backend
[22:12:20] bilbo_swaggins: mozzarella: use Discourse unless you have a specific reason not to
[22:12:23] shevy: mozzarella and help improve it haha
[22:12:28] mozzarella: shevy: what's that?
[22:12:30] bilbo_swaggins: might as well not reinvent the wheel
[22:12:35] shevy: Hanmac I hate require_relative !
[22:12:40] bilbo_swaggins: oh god it's the worst
[22:12:51] shevy: perhaps another way to require or include something
[22:12:52] mozzarella: bilbo_swaggins: discourse is fucking hard to deploy
[22:12:55] shevy: perhaps IMPORT :D :D :D
[22:13:05] bilbo_swaggins: fair enough I haven't used Discourse
[22:13:06] shevy: mozzarella, the one used for: https://www.ruby-forum.com/
[22:13:08] mozzarella: and you need ubuntu?!?
[22:13:20] shevy: it was written by some dude in germany years ago
[22:14:35] mozzarella: https://github.com/radar/forem
[22:14:45] mozzarella: not sure if I??should use that
[22:15:23] drocsid: I'm using a machine running an ancient centOS 5.10 with ruby 1.8.5 in the repos. What's the easiest way to get a more recent version ?
[22:15:37] shevy: you are on centos
[22:15:44] shevy: don't they tell you how to upgrade their packages?
[22:15:50] Hanmac: drocsid: format the disks ?
[22:15:53] pontiki: i hope you are kidding about Discourse
[22:16:02] mozzarella: pontiki: who?
[22:16:25] drocsid: I think they intentionally use old packages..... :(
[22:16:25] Nilium: What about discourse?
[22:16:25] shevy: drocsid further options are: compile from source: ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.bz2 or use something like chruby rvm ruby-install and so forth
[22:16:40] shevy: yeah, centos is the slowest of the slow ones
[22:16:44] mozzarella: discourse is a monolithic app
[22:16:45] shevy: even slower than debian "stable"
[22:16:49] combusean: ACTION dislikes centos
[22:16:56] Hanmac: shevy i think stonehage was faster ;P
[22:16:57] drocsid: I don't like it either
[22:17:00] mozzarella: which must be run on ubuntu 64 bit on a intel processor
[22:17:10] drocsid: but its what I was given
[22:17:14] mozzarella: inside a virtual machine
[22:17:18] drocsid: what I have to work with
[22:17:19] shevy: drocsid enjoy it :)
[22:17:25] pontiki: https://rubygems.org/gems/discourse
[22:17:31] Nilium: ACTION flips off discourse and goes back to staring into the void
[22:17:54] mozzarella: but discourse should have been a gem, indeed
[22:18:00] mozzarella: gem install discourse
[22:18:02] mozzarella: discourse init
[22:18:04] Nilium: I assumed the discourse in question was that forum thing that sucks
[22:18:23] mozzarella: http://try.discourse.org/
[22:18:38] mozzarella: it's good client side
[22:18:42] bilbo_swaggins: didn't know it sucked
[22:18:51] bilbo_swaggins: I gave bad advice
[22:18:51] drocsid: Ok room vote seems to be discourse, I will look at that
[22:19:11] Nilium: I hate using discourse-based forums
[22:19:11] bilbo_swaggins: that's not at all the impression I got from people
[22:19:14] Nilium: They're horrifyingly painful to find anything on
[22:19:15] bilbo_swaggins: they say it sucks
[22:19:45] Nilium: Oh you want to find an old thread? I hope you like scrolling down a lot, 'cause our search tool sucks.
[22:20:10] shevy: drocsid I think they answered that to mozzarella, not you
[22:20:39] shevy: drocsid wget ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.bz2
[22:20:40] drocsid: so does rvm depend on ruby?
[22:21:01] shevy: https://rvm.io/
[22:21:07] shevy: \curl -sSL https://get.rvm.io | bash -s stable
[22:21:13] shevy: but I dont recommend any of it
[22:21:15] drocsid: whould i get rvm or source build. I'm just worried about out of date dependices
[22:21:17] shevy: I recommend to wget the source
[22:21:24] mozzarella: it's a wonderful shell script ;-)))))))
[22:21:26] Nilium: Was it rvm that is a giant monstrosity of bash scripts?
[22:21:29] shevy: I just mentioned it so you know your options drocsid
[22:21:38] shevy: I have no idea, I never used rvm or any other of those managers
[22:21:46] jhass: drocsid: you can also ruby-build, ruby-install or a sane distro that ships a recent ruby
[22:21:55] shevy: or compile from the source!
[22:21:58] Nilium: I just use rbenv.
[22:21:58] Nilium: Could use chruby but I'm lazy about switching.
[22:22:10] Nilium: I compile all my Ruby versions from source.
[22:22:10] mozzarella: ruby in the fedora repos is good??? not too outdated
[22:22:16] shevy: you use rbenv!
[22:22:22] jhass: Nilium: chruby has auto switching
[22:22:31] Nilium: Then just symlink the directory into rbenv's ruby versions directory.
[22:22:36] Nilium: So does rbenv.
[22:22:47] shevy: yeah, that's what most everyone does when managing multiple versions
[22:23:02] dorei: rvm is nice
[22:23:07] Nilium: Unless you're referring to the lazy-about-switching thing, in which case I'm talking about switching from rbenv to chruby, not some feature of rbenv
[22:23:10] combusean: i agree dorei
[22:24:01] dorei: i really like that that .ruby-version and .ruby-gemset files autoselect your ruby enviroment without needing to type anything :)
[22:24:16] shevy: this channel should be renamed to #ruby-lazy
[22:24:43] combusean: you'd be surprised how "lazy" the working world is
[22:24:46] bilbo_swaggins: what's with the hate?
[22:24:54] dorei: shevy: if I weren't lazy, I'd be coding in java :p
[22:25:38] bilbo_swaggins: compiling from source isn't too hard
[22:25:47] bilbo_swaggins: but why do work when you don't have to?
[22:26:00] bilbo_swaggins: if we wanted to do work ourselves, we wouldn't use computers
[22:26:15] shevy: computers made people lazy
[22:26:36] bilbo_swaggins: LOOK WHAT YOU DID TO US, COMPUTERS!
[22:28:02] drocsid: failed to compile readline
[22:28:56] drocsid: a bunch of other failures
[22:29:21] shevy: centos gave you a nice crippled environment
[22:29:31] shevy: if you are lucky you can uncripple it; centos surely has some -dev package of readline
[22:30:31] drocsid: does rvm get precompiled binaries? if nor is there some alternative that ships with ruby 1.8.5 that does?
[22:30:44] dorei: 1.8.5?!?! :O
[22:30:48] drocsid: I have other things to work on....
[22:31:12] shevy: centos prisoners are hilarious :D
[22:31:23] shevy: on debian it is not so hard to uncripple ruby and its dependencies
[22:31:42] drocsid: yeah i like debian
[22:31:44] shevy: apt-get install ruby
[22:31:48] drocsid: and arch linux
[22:31:50] shevy: apt-get install ruby1.8-dev
[22:31:51] dorei: i like opensuse :)
[22:31:54] shevy: obviously that is outdated
[22:31:54] bilbo_swaggins: shevy, yeah if you want ruby 1.8
[22:32:05] shevy: hey I am not using debian, I am just comparing it to centos
[22:32:06] bilbo_swaggins: but building is easy on deb
[22:32:13] shevy: the centos folks coming to #ruby are the worst
[22:32:27] shevy: "I have ruby 1.6.2 how can I update with my powerful gcc 2.99"
[22:33:41] bilbo_swaggins: http://lmgtfy.com/?q=compiling+ruby+centos
[22:34:15] shevy: http://techblogthing.blogspot.co.at/2012/11/complete-guide-to-install-ruby-193-on.html
[22:34:18] shevy: there you go drocsid
[22:34:27] LiquidInsect: I would laugh, but... ruby -v -> ruby 1.8.7 (2011-12-28 MBARI...
[22:34:39] shevy: well that is younger than 1.8.5
[22:34:41] shevy: so you can still laugh
[22:34:48] Nilium: ACTION sets LiquidInsect on fire
[22:34:49] shevy: LiquidInsect are you on centos?
[22:34:52] LiquidInsect: 3 years after I started here and we're still banging rocks toether
[22:35:12] LiquidInsect: this is on os x 10.8... I think production is ubuntu
[22:35:36] drocsid: latest git compiled pretty easy however
[22:36:05] drocsid: yeah your google search forgot to mention centOS 5.10
[22:36:15] drocsid: your results are for centOS 6
[22:38:32] benzrf: DouweM: i thought about it a little more and i think merging might be a bit infeasible -.-
[22:38:54] benzrf: itd be too hard to track what classes and stuff exist and so on
[22:50:28] drocsid: why is mysql-server a dependency?
[22:52:06] drocsid: compiling ruby
[22:53:23] drocsid: oh hmm i was looking at dudes google reference and he yum installs mysql-server , to instruct people to compile ruby
[22:53:44] drocsid: http://techblogthing.blogspot.com/2012/11/complete-guide-to-install-ruby-193-on.html
[22:54:14] jhass: okay, that's just dumb
[22:57:04] drocsid: <internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError) from <internal:gem_prelude>:1:in `<compiled>'
[22:58:19] drocsid: looks like it built ok
[22:59:10] bilbo_swaggins: I wouldn't say that if it's missing gems
[22:59:41] bilbo_swaggins: why are you installing 1.9.3?
[22:59:52] bilbo_swaggins: just grab the latest source
[23:00:28] bilbo_swaggins: the README is pretty straightforward and you just gotta make sure you have the relatively few dependencies
[23:01:26] bilbo_swaggins: ./configure && make && make install
[23:01:33] bilbo_swaggins: it'll tell you what dependencies are missing
[23:04:28] arubin: Why are we compiling from source without a package/port system?
[23:04:56] arubin: There are better options, no?
[23:05:03] arubin: ruby-install for instance.
[23:05:06] bilbo_swaggins: check the scrollback
[23:05:52] bilbo_swaggins: personally, I prefer RVM
[23:05:55] benzrf: DouweM: you there?
[23:05:59] bilbo_swaggins: that's my true recommendation
[23:08:10] chichou: personally I prefer rbenv but I want to give chruby a try
[23:08:23] bilbo_swaggins: meh I have something which works
[23:08:35] bilbo_swaggins: is there really a compelling reason to try chruby?
[23:08:58] chichou: non intrusive ruby version manager
[23:09:13] postmodern: bilbo_swaggins, it does one thing and does it well?
[23:09:14] chichou: as overriding cd is a bad thing imho
[23:09:53] bilbo_swaggins: it overrides cd?
[23:10:05] chichou: last tme I used it yep
[23:10:15] bilbo_swaggins: for the whole system?
[23:10:24] bilbo_swaggins: I don't have that issue
[23:10:38] chichou: http://stackoverflow.com/questions/5605277/how-does-rvm-detect-when-youve-changed-directories
[23:10:42] bilbo_swaggins: that would be pretty stupid, though
[23:11:39] bilbo_swaggins: "Be sure to call the builtin cd function or you will cause either very nasty or very amusing side effects (depending on perspective)."
[23:11:45] postmodern: rvm improved it after chruby, http://niczsoft.com/2012/12/story-of-prompt_command-and-rvm/
[23:12:03] postmodern: although chruby now uses `trap DEBUG`, since PROMPT_COMMAND only works in interactive-mode
[23:12:05] chichou: ok I dropped rvm like 3 years ago :D
[23:12:38] bilbo_swaggins: I don't use the functionality that that hackish cd-extension is meant to accomplish
[23:12:42] billiam: probably obvious, but is there a more readable way of writing some_array_with_duplicates.group_by{|item| item} ?
[23:12:47] bilbo_swaggins: so I didn't notice either way
[23:13:05] bilbo_swaggins: syntax wise or naming wise, billiam?
[23:13:15] billiam: bilbo_swaggins: syntax-wise
[23:13:26] bilbo_swaggins: what are you trying to accomplish?
[23:13:32] jhass: billiam: uh, .uniq?
[23:14:02] billiam: bilbo_swaggins, jhass: find duplicates in an array
[23:14:18] billiam: jhass: That'll remove my dupes, I'm trying to get a list of them.
[23:14:19] jhass: find or remove them?
[23:14:45] bilbo_swaggins: so you want a builtin
[23:14:54] bilbo_swaggins: check the ruby documentation for array
[23:14:59] bilbo_swaggins: I'm not sure if that exists
[23:15:28] drocsid: bilbo_swaggins: i didn't install 1.9.3
[23:15:37] bilbo_swaggins: not really salient
[23:15:55] chichou: array.select {|n| array.count(n) < 1} but it's not really optimized
[23:16:36] drocsid: however the ruby installer didn't seem like it told me the missing dependencies. I just got a list from that post
[23:16:50] bilbo_swaggins: what was the output of the installer
[23:16:54] drocsid: it let me build missing things
[23:16:58] bilbo_swaggins: the installer or when compiling?
[23:17:08] bilbo_swaggins: readline, etc isn't helpful :(
[23:17:12] drocsid: when compiling
[23:17:45] drocsid: anyways everything is cool
[23:17:55] bilbo_swaggins: okay no worries
[23:19:59] bilbo_swaggins: chichou: that's O(n^2) ;_;
[23:20:06] chichou: yeah I know :p
[23:20:07] BraddBitt: wow, I just did array[Random(array.length)]
[23:20:09] BraddBitt: im losing my mind
[23:20:32] chichou: the not really optimized is an euphemism
[23:20:55] bilbo_swaggins: billiam should really check the ruby docs
[23:21:02] bilbo_swaggins: that's the best bet if he wants a builtin
[23:21:07] benzrf: hmmm, anybody here use Thor?
[23:21:22] benzrf: i want to allow arbitrary text and flags after a subcommand
[23:21:46] bilbo_swaggins: alright see yah later gangsters and gentlemen
[23:22:19] solidus-river: hey all, if i have a hash and i want to unwrap its arguments to pass as parameters to a function... is there a way to do that?
[23:22:31] benzrf: solidus-river: hash arguments?
[23:22:36] solidus-river: i'm building up a list of named parameters to a function that i want to pass to it
[23:23:01] solidus-river: well so i have a function that expects.... fun "string", :name=>value, :name=>value
[23:23:03] shevy: solidus-river can you show a small example
[23:23:15] solidus-river: i'm building up a {:name=>value, :name=>value} hash for the named args
[23:23:24] solidus-river: yeah, let me pastie
[23:23:34] shevy: small pls! minimal amount to reproduce
[23:26:02] wallerdev: is the hash ordered right, if so you can just splat the values into send
[23:26:41] shevy: splat a flat
[23:26:45] shevy: splat a fat wallerdev
[23:26:47] shevy: it's all the same
[23:26:49] shevy: splat them down!
[23:26:55] shevy: I meant to write *fly
[23:26:57] shevy: not flat :(
[23:27:01] shevy: the tiredness is slowly kicking in ...
[23:27:03] solidus-river: shevy http://pastie.org/8995257
[23:27:29] solidus-river: there are some typos there but should be enough to get the idea
[23:27:39] shevy: I am not sure what you want to achieve
[23:27:43] shevy: but I am quite sure you want to use *
[23:27:49] jle`: what are some things you guys feel would improve ruby? thinking about writing a new scripting language and looking for some inspiration
[23:28:03] shevy: jle` improve in which regard
[23:28:17] jle`: anything, any language ideas
[23:28:18] shevy: I mean, there are a million ways to answer
[23:28:31] jle`: yeah it's pretty open ended
[23:28:32] shevy: so, better high quality documentation is not a good answer? :>
[23:28:35] jle`: language design ideas
[23:28:40] wallerdev: solidus-river: are you talking about ruby 2 named params?
[23:28:58] jhass: solidus-river: foo({:foo => bar}), foo(:foo => bar), foo {:foo => bar} and foo :foo => bar are all the same thing
[23:29:21] shevy: jle` ruby 3.0 should be much simpler, also for newcomers. it should also focus on the www such as php did. it should have a much better documentation and for the features it offers there should be clear use cases
[23:29:21] solidus-river: jhass: but one of the params is not named and expected as the first arg
[23:29:44] jhass: solidus-river: show the method definition
[23:29:45] solidus-river: jhass: and foo("something", {:foo => bar}) is no thte same as foo("something, :foo => bar)
[23:29:54] jhass: solidus-river: it is
[23:29:55] shevy: jle` distributing addons should be simple and streamlined, no gem/bundler madness
[23:30:18] shevy: solidus-river ruby cheats
[23:30:29] jhass: solidus-river: foo {foo: bar} can not be the same as foo foo: bar, depending on the method definition
[23:30:30] shevy: :foo => bar is really { :foo => bar }
[23:30:56] solidus-river: i'm building up parameters for search in the searchkick gem here
[23:31:00] solidus-river: let me try to find the actual def
[23:31:05] solidus-river: https://github.com/ankane/searchkick
[23:31:42] solidus-river: https://github.com/ankane/searchkick/blob/master/lib/searchkick/search.rb
[23:32:01] jhass: as you see that just takes a hash as second param
[23:32:04] solidus-river: ah, so if i do search "blah" {} it should be the same as specifying options
[23:32:09] solidus-river: yeah, i never knew that
[23:32:18] solidus-river: huh, cool, but confusing
[23:32:41] shevy: yeah well
[23:32:46] shevy: don't omit stuff!
[23:33:15] shevy: it'll be rather you to get confused than the ruby parser will
[23:33:31] jle`: shevy: ty :)
[23:33:40] shevy: lately I found some weird madness
[23:33:52] shevy: I think it was either foo () vs. foo()
[23:33:54] shevy: or something else
[23:48:28] snath: what's the purpose of a statement like "blah = {}" ?
[23:48:43] jhass: snath: it assigns an empty hash to blah
[23:48:48] zellio: yeah that
[23:49:34] zellio: It's the same as `foo = Hash.new`
[23:49:50] jhass: though preferred
[23:51:59] shevy: it's not the same
[23:52:02] shevy: {} is faster
[23:52:35] snath: Ah, ran across it in some code. Looks like a Perl programmer wrote it
[23:53:07] shevy: ruby is also terse
[23:53:17] shevy: but you can keep on using Foo.new
[23:53:31] shevy: after a few hundred times, you'll understand why people use {} instead
[23:53:33] bawNg: I use `foo = {}` in many languages
[23:53:48] shevy: perl has those weird $ all over the place
[23:54:12] bawNg: Ruby, CoffeeScript, Lua
[23:54:23] bawNg: Though I use `foo = { }` in lua
[23:56:32] snath: Ok, I was trying to parse it as a block notation
[23:58:14] shevy: that can be confusing
[23:58:21] shevy: seeing how ruby uses the same { for different things
[23:58:26] shevy: Hash.new {}