Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
<h4y4shi> Okay I got it case would be mu best bet
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
<apeiros> wallerdev: you should use Benchmark and measure CPU time. that should have less variation. you may also want to stop gc during bench.
<wallerdev> yeah i should, maybe i can do that tonight or something
<wallerdev> kinda annoying to run it since i have to keep restarting the rails console haha
nwonknu [nwonknu!~nwonknu@unaffiliated/nwonknu] has joined #ruby-lang
<apeiros> :)
<apeiros> well, gotta get some sleep
<apeiros> gn8
<wallerdev> night
Paoc_ [Paoc_!~paoc@pc-29-167-104-200.cm.vtr.net] has joined #ruby-lang
gregf [gregf!~gregf@207.5.168.94] has joined #ruby-lang
<wallerdev> woot
<wallerdev> way faster now
<wallerdev> although still could be faster but the slowest part is now the db
<wallerdev> awesome
jonathangreenber [jonathangreenber!~jonathang@dsl-066-037-089-005.citizip.com] has joined #ruby-lang
Paoc_ [Paoc_!~paoc@pc-29-167-104-200.cm.vtr.net] has quit [#ruby-lang]
<h4y4shi> Hey guys I am having an error. Every time I run this line of code the random number doesnt refresh. How can I get the random number to refresh? http://pastebin.com/xvsKXuJF
<qpingu> You're always getting 1, right?
<qpingu> It's because you're doing "monster = 1"
<qpingu> You meant to do "monster == 1"
<qpingu> Which you don't need to do anyway, you can juse do
<qpingu> case monster
<drbrain> h4y4shi: case monster; when 1 then …; when 2 then …; … end
<qpingu> when 1
<qpingu> ...
<wallerdev> yeah your case is all out of wack
<wallerdev> i didn't even know you could leave the case part blank haha
<drbrain> wallerdev: yup
<drbrain> then it works like an if elsif elsif elsif
<wallerdev> makes sense
<h4y4shi> whenver I run this I always get froh
<wallerdev> although i don't see the point there's probably a use for it
<h4y4shi> Whenever I run this I always get "Frog"
<qpingu> Yeah h4y4shi, check out my pastebin
<qpingu> It's because you did "=" and used case wrong
<wallerdev> h4y4shi: you may have to have frogs be the only monsters in your game
<h4y4shi> Okay thank you I will look it over and correct my mistake thank you for helping me
<wallerdev> you can rename it to frog town 2: a ribbiting adventure
<h4y4shi> wallerdev: lol... that would be one way to fix my error
<wallerdev> alright well my ajax call loads in 1.5s now instead of 5.5 when the day started so I'm happy
rpowell [rpowell!~rpowell@101.161.11.105] has joined #ruby-lang
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
qpingu [qpingu!~Adium@67.218.117.238] has joined #ruby-lang
bousquet [bousquet!~bousquet@208.180.213.144] has joined #ruby-lang
<h4y4shi> qpingu: Thanks for the help man it works now =D
nwonknu [nwonknu!~nwonknu@unaffiliated/nwonknu] has joined #ruby-lang
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby-lang
<slyphon> ugh
<slyphon> how big is a 'long long'?
<slyphon> 64b?
fserb [fserb!~fserb@178-83-225-18.dynamic.hispeed.ch] has joined #ruby-lang
<heftig> yes
<slyphon> mm'kay
<slyphon> thanks
<heftig> mostly. could be 128 on some platforms, i think
<fserb> I'm looking for a particular Ruby learning site that I saw a couple months ago, with a sequence of online exercises, it had a ninja/kata interface. Does anyone here remember it? I cannot find it again!
<slyphon> heftig: see, that's why i hate C
<erikh> slyphon: long long is loooooooooong
<slyphon> erikh: :D
<slyphon> unsigned long long cannot be trusted!
<erikh> "just talkin' 'bout long!" ya damn right
<slyphon> hrm
<slyphon> can you do rb_funcall(KlassConst, rb_intern(:new), 0) to call Foo.new ?
<fserb> found it! For future reference: http://rubymonk.com/ :)
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
<injekt> jorgenpt: yes
<injekt> jorgenpt: apparently I broke rbenv and the tests aren't being ran in 1.8.7 :(
<injekt> (I usually ensure this before pushing)
<jorgenpt> :/
* slyphon chuckles
<slyphon> PASS_PASSED_BLOCK()
<injekt> I still cant get ruby to recognize that I have minitest installed
<injekt> in 1.8.7 of course
<injekt> weeeeird
<injekt> drbrain: are GEM_PATHS supposed to be in $: ?
dejongge [dejongge!~jonke@pD9E0DD77.dip0.t-ipconnect.de] has joined #ruby-lang
<drbrain> injekt: part of it
<drbrain> like, "#{GEM_PATHS.first}/gems/some_gem/lib/foo.rb"
<injekt> drbrain: gem list shows minitest installed, but ruby -rminitest complains, trying to limit it down
<drbrain> injekt: try ruby -rminitest/autorun
<drbrain> there is no minitest.rb
<injekt> drbrain: same problem
* slyphon pulls out the pickaxe
<drbrain> what does `gem which minitest/autorun` say?
<injekt> ah, right.. yeah, my rake test task isn't running because I'm trying to require minitest/autorun
<jorgenpt> Oh~ I guess it only works if you separate the --long-option and the value of it.
<jorgenpt> (Only --long-option=value fails, --long-option value succeeds)
<injekt> drbrain: paths look good, do you want it?
<injekt> jorgenpt: I'll take a look in a minute, just want to get over this first
<jorgenpt> Yeah, np
<drbrain> injekt: I don't understand
<injekt> drbrain: neither do I :-(
<drbrain> I mean, what would I want?
<drbrain> I guess you could show it to me?
<injekt> You asked me what it said?
nwonknu_ [nwonknu_!~nwonknu@unaffiliated/nwonknu] has joined #ruby-lang
<drbrain> oh, please show it to me
<injekt> /Users/lee/.rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/minitest-2.11.0/lib/minitest/autorun.rb
<drbrain> oh, duh
<drbrain> ruby -rubygems -e 'require "minitest/autorun"'
<drbrain> 1.8.7-p352 is the clue
abentspoon [abentspoon!~micah@173.247.201.130] has joined #ruby-lang
<injekt> wow im a dick, that's how often I use pre 1.9
<drbrain> I wouldn't say you're a dick
<injekt> then you're too nice
<injekt> thanks for pointing it out
<drbrain> I would say you're a forward-thinking individual who has forgotten the pains of the past
gogo_it [gogo_it!~joshuaman@166.90.79.18] has joined #ruby-lang
<injekt> :D
<gogo_it> why do I get this ? http://pastie.org/3260348
<injekt> gogo_it: because myname isn't defined before you try and use it
<drbrain> gogo_it: you're using a method you haven't defined yet
<drbrain> put line 2 after line 6
<slyphon> gah
<slyphon> every ruby core class does crazy shit
<drbrain> slyphon: I blame perl
<slyphon> i'm forced to do something stupid here
<slyphon> because to really fix this library would require a huge amount of doing shit
<injekt> jorgenpt: did you run tests against 1.8.7 after your fix btw?
<jorgenpt> injekt: Not my fi
<jorgenpt> fix :)
<injekt> jorgenpt: oh oops, sorry!
<slyphon> so i have class Foo; end
<slyphon> and i'm trying to figure out how to call Foo.new correctly
<slyphon> in C
<gogo_it> injekt: thank you!
<drbrain> slyphon: rb_class_new_instance
<slyphon> woah
<slyphon> and the boy gets a cigar
<slyphon> oh, bleh
* slyphon doesn't know enough C
<injekt> jorgenpt: I'll clean up 1.8 compatibility then look into your issue, thanks for reporting!
<jorgenpt> injekt: np, thanks for fixing
<jorgenpt> injekt: Any plans on adding better Slop#to_s output for opts that take args?
<jorgenpt> (to indicate they do)
<injekt> jorgenpt: yep, I plan on adding different levels of formatting
<injekt> you can override this by providing your own help string to Option :help right now
<jorgenpt> --my_opt <foo> (if required), --my_opt [foo] (if optional), etc
<injekt> but I'll add some sane defaults
<jorgenpt> The problem with that is that you don't get the alignment right, right?
<injekt> right, right
<slyphon> arrrrghhhh
<jorgenpt> on :foo=, 'Something', :default => 'bar', :optional_argument => true
<jorgenpt> That should make --foo with no options work, right?
<injekt> right
<jorgenpt> Hm, not working
<jorgenpt> Slop::MissingArgumentError: foo expects an argument
<injekt> weird, that's heavily tested. Please report
<jorgenpt> Slop.parse(['--foo']) do on :foo=, 'Something', :default => 'bar', :optional_argument => true; end
<jorgenpt> Ok
<injekt> wait
<injekt> try with :foo not :foo=
<injekt> can't remember if :foo= overrides the behaviour
<jorgenpt> Oh, yeah, it works then
<jorgenpt> Thanks! :)
<injekt> cool, I'll have the config options override it I think it makes more sense
bitrot [bitrot!~smd@ppp-70-253-73-158.dsl.austtx.swbell.net] has joined #ruby-lang
<nwonknu_> injekt: Hello injekt.
<injekt> nwonknu_: howdy
bglusman [bglusman!~bglusman@c-71-224-192-35.hsd1.pa.comcast.net] has joined #ruby-lang
<jorgenpt> injekt: I'm making slop the official default Jenkins Ruby replacement for args4j, btw ;-)
<injekt> jorgenpt: sweet!
<slyphon> jorgenpt: +1
<slyphon> jorgenpt: FOR GREAT JUSTICE !!
<slyphon> because seriously
<slyphon> #{thing}4j has gotta suck
<jorgenpt> Haha
<slyphon> for any value of thing
<jorgenpt> args4j is written by the author of jenkins, I can't attest to it's suckiness (or lack thereof) since I haven't used it.
<jorgenpt> But you can't use it from JRuby because it depends on instance variable annotations, which jruby doesn't understand
<injekt> oO
qpingu [qpingu!~Adium@67.218.117.238] has joined #ruby-lang
<slyphon> jorgenpt: see
<slyphon> jorgenpt: QED
jonathangreenber [jonathangreenber!~jonathang@dsl-066-037-089-005.citizip.com] has joined #ruby-lang
nwonknu [nwonknu!~nwonknu@unaffiliated/nwonknu] has joined #ruby-lang
WillMarshall [WillMarshall!~willmarsh@ppp203-122-223-123.static.internode.on.net] has joined #ruby-lang
ap3mantus [ap3mantus!~ap3mantus@c-98-217-187-172.hsd1.ma.comcast.net] has joined #ruby-lang
<slyphon> ok, listen up string encodings
<slyphon> i don't like you and you don't like me
<slyphon> but i don't want any trouble, see
<injekt> jorgenpt: should be good now! new version pushed
<slyphon> oh hah hah
<slyphon> very funny ruby 1.8.7
<slyphon> now INSTALL BUNDLER WITHOUT SEGFAULTING
* slyphon is not amused
<jorgenpt> slyphon: haha :/
<jorgenpt> injekt: Rad!
<jorgenpt> I'll back out my workaround then ^_^
<injekt> :)
<slyphon> CC=/usr/bin/gcc-4.2 rvm install ruby-1.8.7
<slyphon> for those of you playing at home
<jorgenpt> Oh, you were using clang?
<slyphon> i guess so
<injekt> yeah, rbenv is clever enough so i dont have to remember that
<jorgenpt> Why rbenv and not rvm?
<slyphon> i wonder if the new rvm does that
<slyphon> jorgenpt: because some people are TERRIFIED of cd hooks
<injekt> i prefer it personally
<slyphon> nah, some people just like it better
<injekt> not for that, they're disabled in zsh (which I use) anyway
<slyphon> injekt: I KEED
<injekt> KEED KEED
<injekt> my eyes hurt
* slyphon does his triumph-the-inuslt-comic-dog voice
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
<slyphon> gah, fuck
<slyphon> fuckety fuck fuck fuck
<slyphon> this is BULLSHIT!
* slyphon hurls his mac across the room
* slyphon dives and catches it just in time
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
<slyphon> ugh
* slyphon makes a run to the drugstore (unrelated)
<injekt> slyphon: what's the problem?
alexeyKolosov [alexeyKolosov!~quassel@www.zbku.ru] has joined #ruby-lang
nwonknu [nwonknu!~nwonknu@unaffiliated/nwonknu] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@nat35.mable.ne.jp] has joined #ruby-lang
<slyphon> injekt: ah, nothin, just trying to get my C extension to work properly in 4 different ruby interpreters
<slyphon> and apparently you can't compile ruby w/ gcc-4.2 and your extension in clang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
<injekt> slyphon: how are you compiling?
<slyphon> injekt: extconf.rb
<slyphon> but "doing it wrong"
<slyphon> i think i just figured it out
<injekt> heh, use rake compiler or w/e it's called
<slyphon> is that an alternative to extconf.rb?
<injekt> rake extension-task -- it just automates stuff for you
<injekt> not sure it would help, but it's neat nonetheless
<slyphon> ahh
<slyphon> :)
<slyphon> i'll have a look
<injekt> also 4 different ruby interpreters eh? good luck with that :)
<slyphon> so far so good
<slyphon> jruby 1.8.7 1.9.2 and 1.9.3
<injekt> ah, not so bad
<slyphon> yeah, IronRuby can go fuck itself
<injekt> I was thinking more rbx
<injekt> :)
<slyphon> ah, i think it actually does work under rbx
<slyphon> but i haven't tried in a while
<injekt> cool
<slyphon> oh balls
<slyphon> grrr
<injekt> well, sleep time for me. Have fun!
<slyphon> kk
<slyphon> lata
SuperTaz_work [SuperTaz_work!~supertaz_@vpn.lax.truecarcorp.com] has joined #ruby-lang
jredville [jredville!~james.dev@c-66-235-23-17.sea.wa.customer.broadstripe.net] has joined #ruby-lang
rpowell [rpowell!~rpowell@101.161.11.105] has joined #ruby-lang
nwonknu [nwonknu!~nwonknu@unaffiliated/nwonknu] has joined #ruby-lang
Paoc_ [Paoc_!~paoc@pc-29-167-104-200.cm.vtr.net] has joined #ruby-lang
<hagabaka> funny
_inc [_inc!~inc@unaffiliated/-inc/x-0498339] has joined #ruby-lang
<nwonknu> Indeed.
indeterminate [indeterminate!~sei@user-3c2h3m6.cable.mindspring.com] has joined #ruby-lang
whatasunnyday [whatasunnyday!~sunny@c-24-130-81-47.hsd1.ca.comcast.net] has joined #ruby-lang
robgough [robgough!~robgough@li184-32.members.linode.com] has joined #ruby-lang
jonathangreenber [jonathangreenber!~jonathang@dsl-066-037-089-005.citizip.com] has joined #ruby-lang
ap3mantus [ap3mantus!~ap3mantus@c-98-217-179-108.hsd1.ma.comcast.net] has joined #ruby-lang
ap3mantus [ap3mantus!~ap3mantus@c-98-217-179-108.hsd1.ma.comcast.net] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@nat35.mable.ne.jp] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
headius [headius!~headius@71-37-230-236.mpls.qwest.net] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
Oloryn_lt1 [Oloryn_lt1!~Oloryn@home.benshome.net] has joined #ruby-lang
nwonknu_ [nwonknu_!~nwonknu@unaffiliated/nwonknu] has joined #ruby-lang
qpingu [qpingu!~Adium@67.218.117.238] has joined #ruby-lang
qpingu1 [qpingu1!~Adium@c-69-181-209-195.hsd1.ca.comcast.net] has joined #ruby-lang
nwonknu [nwonknu!~nwonknu@unaffiliated/nwonknu] has joined #ruby-lang
qpingu1 [qpingu1!~Adium@c-69-181-209-195.hsd1.ca.comcast.net] has quit [#ruby-lang]
_inc [_inc!~inc@unaffiliated/-inc/x-0498339] has joined #ruby-lang
Oloryn_lt1 [Oloryn_lt1!~Oloryn@home.benshome.net] has joined #ruby-lang
<shevy> ruby -e 'puts "%.60f" % 1.1'
<shevy> 1.100000000000000088817841970012523233890533447265625000000000
<shevy> who would have thought that ruby can be so complicated
<shevy> :/
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.44] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-216-130-5.lnse2.ken.bigpond.net.au] has joined #ruby-lang
<wallerdev> lol
<wallerdev> blame computers and their powers of 2
<Phrogz> Blame an infinite universe and finite computing storage.
<shevy> oh
<shevy> is the universe really infinite?
<Banistergalaxy> Phrogz: sup froggy
<shevy> I feel we are much closer to the question of how the information system in biological systems evolved than have found the answer to the origin of the universe and its future x billion years to come
<Phrogz> Hey hey! 'sup is I got myself some shoulder surgery 1.5 weeks ago and have been sitting in a recliner coding one-handed (now two-handed) for a long time.
<erikh> ouch
<Phrogz> But I get to make some pretty-ish pictures as a result: http://phrogz.net/nginx-as-reverse-proxy-cache-for-thin
<Banistergalaxy> Wow,i guess we all have experience typing one handed
<shevy> wheeee
<Banistergalaxy> Esp shevy
<shevy> my sister had shoulder surgery some years ago
<Banistergalaxy> ;)
<Phrogz> I'm purposefully putting up information that I know to be sub-optimal to force myself to really investigate and understand cache control issues. :)
<shevy> I tried to type with one hand but I really could not :(
<Phrogz> lol @ Banistergalaxy
<Banistergalaxy> :)
<erikh> cache-control: the IMAP of http/1.1
rippa [rippa!~splitta@85.158.54.234] has joined #ruby-lang
<shevy> hehe
<Banistergalaxy> Does osx have a kill ring
<erikh> no
<erikh> but you can install software that gives you one
<Banistergalaxy> Iirci brought it up by accident once
<Banistergalaxy> Hmm ok
<erikh> I use flycut
<erikh> it's free on the app store
<erikh> also on github
<Banistergalaxy> Thanks
<Phrogz> …what's a kill ring?
<Phrogz> An OS-wide clipboard?
<Phrogz> (clipboard history)?
JohnBat26 [JohnBat26!~Eugene@80.251.120.55] has joined #ruby-lang
<Banistergalaxy> Clipboard history yeah
_inc [_inc!~inc@unaffiliated/-inc/x-0498339] has joined #ruby-lang
Paoc_ [Paoc_!~paoc@pc-29-167-104-200.cm.vtr.net] has quit [#ruby-lang]
urbanmonk [urbanmonk!~rom@bas1-toronto08-1279298902.dsl.bell.ca] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
JohnBat26 [JohnBat26!~Eugene@80.251.120.55] has joined #ruby-lang
<shevy> hmm
<shevy> the word "crackdown" is a fairly new word, right? It was not used i.e. in medieval times to describe a king order the attack of his guards against some villagers who protested
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
<bougyman> is 1935 'fairly new' ?
<bnagy> anything after C18 is 'fairly new' :)
<bougyman> 1935 Washington Post 18 May, A threat of a ‘crack-down’ by the middle class group against those who put forward the legislation for abolishing public utility holding companies. (c) Oxford English Dictionary, shown for educational conversation purposes only.
<bougyman> it only hit the OED in 1972, though
<bougyman> so yeah, definitely fairly new.
Ampd [Ampd!~Ampd@pool-108-36-74-137.phlapa.fios.verizon.net] has joined #ruby-lang
<shevy> bougyman hmm
<shevy> well, interesting at least that it can be traced to 1935
coder_jd [coder_jd!~yaaic@pool-108-36-74-137.phlapa.fios.verizon.net] has joined #ruby-lang
<bnagy> well the OED was (is) a little slow with americanisms
RORgasm [RORgasm!~rorgasm@nyv-exweb.iac.com] has joined #ruby-lang
<bnagy> although usually faster now than 35 years :D
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-216-130-5.lnse2.ken.bigpond.net.au] has joined #ruby-lang
kolet [kolet!~collettiq@173-16-246-235.client.mchsi.com] has joined #ruby-lang
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby-lang
<shevy> I imagine we now have a lot more words than humanity had ... 500 years ago!
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby-lang
<bnagy> fo shizzle
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
butchanton [butchanton!~butchanto@c-71-202-131-177.hsd1.ca.comcast.net] has joined #ruby-lang
butchanton [butchanton!~butchanto@c-71-202-131-177.hsd1.ca.comcast.net] has joined #ruby-lang
replore [replore!~replore@203.152.213.161.static.zoot.jp] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@2001:268:306:3:226:8ff:fedd:31a3] has joined #ruby-lang
bryanl [bryanl!~bryanl@li362-49.members.linode.com] has joined #ruby-lang
kitallis [kitallis!~kitallis@122.172.247.109] has joined #ruby-lang
Weems [Weems!~the@nat.resnet.mc.edu] has joined #ruby-lang
Weems [Weems!~the@unaffiliated/weems] has joined #ruby-lang
jkprg [jkprg!~jarda@ip-62-245-93-150.net.upcbroadband.cz] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
apeiros_ [apeiros_!~apeiros@77-58-113-31.dclient.hispeed.ch] has joined #ruby-lang
yxhuvud [yxhuvud!mongo@h-5-47.a212.priv.bahnhof.se] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@host78-84-dynamic.44-79-r.retail.telecomitalia.it] has joined #ruby-lang
wallerdev [wallerdev!~wallerdev@72.44.102.30] has joined #ruby-lang
Stalkr_ [Stalkr_!~Stalkr@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
AndChat- [AndChat-!~AndChat@222.153.223.45] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
JohnBat26 [JohnBat26!~Eugene@89.175.77.79] has joined #ruby-lang
acts_as [acts_as!~acts_as@cpe-76-169-74-39.socal.res.rr.com] has joined #ruby-lang
w00t0 [w00t0!~w00t@c-76-106-216-81.hsd1.fl.comcast.net] has joined #ruby-lang
ryanf [ryanf!~rfitz@ec2-50-18-158-149.us-west-1.compute.amazonaws.com] has joined #ruby-lang
solars [solars!~solars@194.208.132.118] has joined #ruby-lang
Locke23rus [Locke23rus!~quassel@188.162.163.41] has joined #ruby-lang
vladalive [vladalive!~vladalive@176.52.68.243] has joined #ruby-lang
mahlon [mahlon!mahlon@martini.nu] has joined #ruby-lang
h4y4shi [h4y4shi!~chatzilla@rrcs-67-79-54-130.sw.biz.rr.com] has joined #ruby-lang
thone [thone!~thone@g226051181.adsl.alicedsl.de] has joined #ruby-lang
alexeyKolosov [alexeyKolosov!~quassel@ns1.zbku.ru] has joined #ruby-lang
[zaf]-Coral [[zaf]-Coral!~quassel@41-133-59-28.dsl.mweb.co.za] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
gregmore_ [gregmore_!~gregmoren@S01067444012f4469.vc.shawcable.net] has joined #ruby-lang
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby-lang
_eagspoo [_eagspoo!~esalazar@cpe-071-076-222-103.triad.res.rr.com] has joined #ruby-lang
<_eagspoo> Hey is this a bug in irb? https://gist.github.com/1687700
<_eagspoo> Pry does that with a module name and it breaks tab completion
<_eagspoo> Seems like /home/esalazar/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/irb/completion.rb line 177 could be name = m.name.to_s since if it isn't a string it crashes later
<AndChat-> _eagspoo: pry does what? You mean pry works correctly or it crashes too?
<_eagspoo> AndChat-: Pry overrides Module#name somewhere which causes irb to crash since irb assumes in completion.rb:177 that name is a string
Locke23rus [Locke23rus!~quassel@188.162.163.41] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.45] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.231.81] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
<Banistergalaxy> _eagspoo: wtf? Why ar you using irb inside pry?
<Banistergalaxy> You use one or the other, they are alternatives for one another
<_eagspoo> Well I can think of reason but that isn't even the point. Even doing require 'pry' then [1].first.<tab> causes a crash
<_eagspoo> pry is also used for debugging
<_eagspoo> so I might put binding.pry in my code somewhere to inspect at that point.
<Banistergalaxy> _eagspoo: I can't reproduce it
<Banistergalaxy> _eagspoo: can you tell ne exactly how to reproduce it
<_eagspoo> Banistergalaxy: did you see the gist above? Just define a module that has a method def self.name /foo/ end
<_eagspoo> then tab complete [1].first.<tab>
<_eagspoo> that's all I did to repro
<Banistergalaxy> _eagspoo: I did exactly that and can't repro
<_eagspoo> huh, should crash :)
<Banistergalaxy> What pry version?
<_eagspoo> I uninstalled pry and can still cause the crash
<Banistergalaxy> So it's not related to pry i take it?
<_eagspoo> Not really. Might be strange thing for pry to do but probably shouldn't be crashing irb either
<_eagspoo> Try pasting that exact gist into irb then hit tab
<_eagspoo> This is my ruby version btw: ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
zmack [zmack!~zmack@109.99.235.103] has joined #ruby-lang
<_eagspoo> I mean I can see the bug. in completion is does name = m.name, then later /stuff/ =~ name
<_eagspoo> Which if name is not a string will cause an exception
<Banistergalaxy> _eagspoo: so the bug is in irb, not pry it seems
<Banistergalaxy> Works fine in pure pry
<_eagspoo> Even just doing /foo/ =~ /bar/ will throw an exception
<_eagspoo> Banistergalaxy: seems like it
<Banistergalaxy> Then forget irb, and use pry exclusively
<Banistergalaxy> ;)
<_eagspoo> rails console users irb so I have no choice
<_eagspoo> unfortunately
<_eagspoo> ok, I found how to switch
<_eagspoo> easy
Z2FyZA [Z2FyZA!~gard@cm-84.215.22.0.getinternet.no] has joined #ruby-lang
Algo [Algo!~Algo@unaffiliated/algorithmiccontr] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.231.81] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
roadkith [roadkith!~kith@unaffiliated/kith] has joined #ruby-lang
krzkrzkrz [krzkrzkrz!~foobar@58.69.201.60] has joined #ruby-lang
krzkrzkrz [krzkrzkrz!~foobar@unaffiliated/krz] has joined #ruby-lang
jkprg [jkprg!~jarda@ip-62-245-93-150.net.upcbroadband.cz] has joined #ruby-lang
csherin [csherin!~csherin@202.164.151.110] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
molgrew [molgrew!~bozo20@85.182.139.18] has joined #ruby-lang
Pupeno- [Pupeno-!~pupeno@client-82-8-216-103.sqy-bng-011.adsl.virginmedia.net] has joined #ruby-lang
Pupeno- [Pupeno-!~pupeno@pdpc/supporter/active/pupeno] has joined #ruby-lang
<_eagspoo> Banistergalaxy: actually not so easy. reload! and app aren't defined. I just hacked my local copy of irb and submitted a bug. It is just irb after all
<Banistergalaxy> _eagspoo: use pry-rails plugin
<Banistergalaxy> There are many ways to get pry working in rails with rails helpers, just read the pry wiki
kain_ [kain_!~kain@151.64.210.200] has joined #ruby-lang
kitallis [kitallis!~kitallis@122.172.247.109] has joined #ruby-lang
shevy [shevy!~shevy@178-190-47-222.adsl.highway.telekom.at] has joined #ruby-lang
robotmay [robotmay!~robotmay@94.30.13.228] has joined #ruby-lang
senthil [senthil!~senthil@99-51-1-6.lightspeed.snjsca.sbcglobal.net] has joined #ruby-lang
tekin [tekin!~tekin@cpc8-with5-2-0-cust208.1-4.cable.virginmedia.com] has joined #ruby-lang
workmad3 [workmad3!~workmad3@vpn111.its.manchester.ac.uk] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@host101-153-dynamic.40-79-r.retail.telecomitalia.it] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@pdpc/supporter/profesional/vargas] has joined #ruby-lang
cyri_ [cyri_!~cyri_@232.93.119.80.rev.sfr.net] has joined #ruby-lang
[zaf]-Coral [[zaf]-Coral!~quassel@41-133-59-28.dsl.mweb.co.za] has joined #ruby-lang
S1kx [S1kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby-lang
S1kx [S1kx!~S1kx@pdpc/supporter/monthlybyte/s1kx] has joined #ruby-lang
tjadc [tjadc!~quassel@41-133-59-28.dsl.mweb.co.za] has joined #ruby-lang
judofyr [judofyr!~judofyr@195.159.219.65] has joined #ruby-lang
ksinkar [ksinkar!~ksinkar@117.195.96.6] has joined #ruby-lang
x0F_ [x0F_!~x0F@unaffiliated/x0f] has joined #ruby-lang
gokulnath [gokulnath!~gokulnath@115.111.177.122] has joined #ruby-lang
_eagspoo [_eagspoo!~esalazar@cpe-071-076-222-103.triad.res.rr.com] has quit [#ruby-lang]
gokulnath [gokulnath!~gokulnath@115.111.177.122] has quit [#ruby-lang]
ovnimancer [ovnimancer!~anton@212.59.96.38] has joined #ruby-lang
ovnimancer [ovnimancer!~anton@212.59.96.38] has quit [#ruby-lang]
empity [empity!~user@149.255.121.162] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-60-229-92-99.lns3.ken.bigpond.net.au] has joined #ruby-lang
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
<mrchrisadams> You guys know if there's a way to see which exception is being raised in a method definition like this gist ? https://t.co/iQct8znb
<mrchrisadams> Feels like it should be easy, but pry comes up with nothing obvious when I drop into it with binding.pry
<judofyr> mrchrisadams: $!
<judofyr> or: rescue => err
<judofyr> and then you can inspect err
<Banistergalaxy> judofyr: btw released stack explorer, would be cool if you had a play at some point
<mrchrisadams> judofyr: wow, thanks!
antinitro___ [antinitro___!~adam@93-97-23-188.zone5.bethere.co.uk] has joined #ruby-lang
<Banistergalaxy> Just whenever/if ever you have time:)
toretore [toretore!~toretore@crr06-3-82-231-12-81.fbx.proxad.net] has joined #ruby-lang
rolfb [rolfb!~rolfb@165.219.202.84.customer.cdi.no] has joined #ruby-lang
gix [gix!~gix@e180027088.adsl.alicedsl.de] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@p25146-ipngn100202kobeminato.hyogo.ocn.ne.jp] has joined #ruby-lang
Spooner [Spooner!~Miranda@host-78-144-139-130.as13285.net] has joined #ruby-lang
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
zmack [zmack!~zmack@109.99.235.103] has joined #ruby-lang
tbuehlmann [tbuehlmann!~Tobias@unaffiliated/tovias] has joined #ruby-lang
Fullmoon [Fullmoon!~Fullmoon@dsl-stat-43-17.mmc.at] has joined #ruby-lang
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
niklasb [niklasb!~codeslay0@p5B310A62.dip0.t-ipconnect.de] has joined #ruby-lang
jxie [jxie!~jxie@115.198.170.222] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@host101-153-dynamic.40-79-r.retail.telecomitalia.it] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@pdpc/supporter/profesional/vargas] has joined #ruby-lang
yfeldblum [yfeldblum!~Jay@c-98-218-48-253.hsd1.md.comcast.net] has joined #ruby-lang
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
tvl [tvl!~tvl@arrakis.uio.no] has joined #ruby-lang
<manveru> und die is verantwortliche für ACTA in österreich...
<tbuehlmann> bist du gerade im richtigen channel?
<manveru> sorry, einer zu weit links :)
<tbuehlmann> :)
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
tbuehlmann [tbuehlmann!~Tobias@unaffiliated/tovias] has joined #ruby-lang
<ddfreyne> wir sprechen nur Ruby hier, kein Deutsch!
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby-lang
publicvoid_ [publicvoid_!~publicvoi@p5DC151F6.dip.t-dialin.net] has joined #ruby-lang
<DefV> users[:ddfreyne].has_point? # => true
<Defusal> Does anyone know of a easy way that I can override all attribute setter methods (attr_name=) for all models that subclass ActiveRecord::Base?
dejongge [dejongge!~jonke@pD9E0DD77.dip0.t-ipconnect.de] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
<manveru> switch to sequel? :P
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
* manveru hides
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
<nfxgosu> can I manually assign a symbols key?
<judofyr> nfxgosu: hm?
<nfxgosu> i want red to have a key value of 1021
<manveru> ?
<ddfreyne> nfxgosu: symbols don't have values. hashes map keys (which often are symbols) onto values though, is that what you want?
<judofyr> nfxgosu: red = 1021
<judofyr> nfxgosu: or: h = {}; h[:red] = 1021
<judofyr> or: h = { :red => 1021 }
<nfxgosu> in that 1st block of code. I was wondering if 3918094 could be put to a key value, 1021, such that i can access it by using 1021
<judofyr> nfxgosu: h[1021] = :red
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
<nfxgosu> ty
jensn [jensn!~Jens@ip234-137.wireless.lu.se] has joined #ruby-lang
indstry [indstry!~apple@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby-lang
<Defusal> manveru, you better hide after saying something like that :|
yalue [yalue!yalue@nat/ibm/x-psouswpyprybzkmt] has joined #ruby-lang
<Defusal> guess theres no easy way anyway, will have to go through a reasonable effort to monkeypatch AR
<manveru> well, if you need help with sequel, i'm around :)
<manveru> i just won't touch AR if i can help it
jensn [jensn!~Jens@ip234-137.wireless.lu.se] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
rippa [rippa!~rippa@109-161-124-124.pppoe.yaroslavl.ru] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.45] has joined #ruby-lang
<nfxgosu> is there a way to assign multiple symbols to a string without saying :cello => 'string'; :violin => 'string' ?
<rippa> nfxgosu: Hash[[1,2,3,4].product ["string"]]
ksinkar [ksinkar!~ksinkar@117.195.96.6] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
yfeldblum [yfeldblum!~Jay@pool-71-246-76-76.bltmmd.east.verizon.net] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
Manhose [Manhose!~Manhose@188.251.85.233] has joined #ruby-lang
<nfxgosu> TY!
g0kul [g0kul!~gokulnath@115.111.177.122] has joined #ruby-lang
jensn [jensn!~Jens@ip234-137.wireless.lu.se] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
codewrangler [codewrangler!~codewrang@pool-72-66-12-100.washdc.fios.verizon.net] has joined #ruby-lang
<Defusal> manveru, i'd rather be using MongoDB, but this project already uses a MySQL db
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
tomb- [tomb-!~tomb@hubot.tomb.io] has joined #ruby-lang
<Defusal> i just thought of a cool, clean way to do update writes, since the model instances are cached with their own states too.. but it requires overriding the setter methods, which are dynamically created :/
dejongge [dejongge!~jonke@pD9E0DD77.dip0.t-ipconnect.de] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
fayimora [fayimora!~fayimora@2a01:388:201:3721:2555:396e:cb6:ace9] has joined #ruby-lang
<Defusal> interesting, method(arr ? *arr : str) is invalid syntax... you have to use method(*(arr ? arr : [str])) instead
Jerdent [Jerdent!~jerdent@pha75-10-82-230-185-117.fbx.proxad.net] has joined #ruby-lang
<chris2> slyphon: hey
malev [malev!~malev@190.210.138.237] has joined #ruby-lang
<slyphon> hi
<slyphon> oh yeah
<slyphon> this is his later stuff
<slyphon> "You may be a state trooper, you might be a young Turk"
<slyphon> i wonder if that's where "the Young Turks" get their name
<chris2> hm
<slyphon> or it could be because Cenk Ungyr is actually turkish
<chris2> heh
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby-lang
robbrit [robbrit!~rob@38.108.76.250] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
Stalkr_ [Stalkr_!~Stalkr@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
g0kul [g0kul!~gokulnath@115.111.177.122] has quit ["Leaving"]
Jade [Jade!~jade@unaffiliated/jade] has joined #ruby-lang
<slyphon> any linux desktop users in here?
<andrewvos> slyphon: Probably
<slyphon> yyyyyyeeeeeahhhhh, i mean, i was gonna ask "what lightweight window manager people recommend" but i just installed xfce4
<injekt> openbox
mksm [mksm!~ramorim@pdpc/supporter/professional/mksm] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.238.214] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
outoftime [outoftime!~mat@ip-160-79-101-2.autorev.intellispace.net] has joined #ruby-lang
gregmore_ [gregmore_!~gregmoren@S01067444012f4469.vc.shawcable.net] has joined #ruby-lang
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
gregmore_ [gregmore_!~gregmoren@S01067444012f4469.vc.shawcable.net] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@host78-84-dynamic.44-79-r.retail.telecomitalia.it] has joined #ruby-lang
mrneighborly [mrneighborly!~mrneighbo@154.25.119.70.cfl.res.rr.com] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl7-44-30.dsl.telepac.pt] has joined #ruby-lang
dv310p3r [dv310p3r!~dv310p3r@216.199.155.226.nw.nuvox.net] has joined #ruby-lang
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0DD77.dip0.t-ipconnect.de] has joined #ruby-lang
gregmore_ [gregmore_!~gregmoren@S01067444012f4469.vc.shawcable.net] has joined #ruby-lang
Spooner [Spooner!~Miranda@host-78-144-139-130.as13285.net] has joined #ruby-lang
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
rayners [rayners!~rayners@38.102.22.194] has joined #ruby-lang
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
robbyoconnor [robbyoconnor!~wakawaka@guifications/user/r0bby] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
<erikh> wmii
dfr|mac_ [dfr|mac_!dfr|work@nat/google/x-kfenlphssssdgqde] has joined #ruby-lang
<injekt> erikh: ping
tomzx [tomzx!~tomzx@dsl-136-201.aei.ca] has joined #ruby-lang
fayimora [fayimora!~fayimora@lt38-201.eecs.qmul.ac.uk] has joined #ruby-lang
headius [headius!~headius@71-37-230-236.mpls.qwest.net] has joined #ruby-lang
gregmore_ [gregmore_!~gregmoren@S01067444012f4469.vc.shawcable.net] has joined #ruby-lang
rayners [rayners!~rayners@38.102.22.194] has joined #ruby-lang
bitrot [bitrot!~smd@rrcs-50-84-14-82.sw.biz.rr.com] has joined #ruby-lang
<erikh> injekt: pong
Defusal [Defusal!Defusal@dsl-241-9-76.telkomadsl.co.za] has joined #ruby-lang
Defusal [Defusal!Defusal@unaffiliated/ecnerifed] has joined #ruby-lang
<injekt> erikh: would you mind sparing your opinion on a slop issue when you have <=3 minutes?
<erikh> sure, I can look now, but I don't have much knowledge of the API yet
<injekt> er >= haha
<injekt> it's more of a logic/general thing than API, https://github.com/injekt/slop/pull/51
<Spooner> What is people's opinions on optional dependencies for a gem (for example, a gem that only requires another gem if the user needs to use a subset of functionality, but it isn't in the gemspec)? I find that behaviour horrid, but some people might not like having to install a lot of dependencies they are unlikely to use to run a gem. Hmm, maybe plugin gems would make more sense (so I have releasy and releasy_extra_stuff gems)?
<erikh> fwiw I think s/_/-/ is a great idea
<injekt> erikh: so, when hitting --no-u you'd be able to use the method_missing helpers like opts.no_u? and fetching a value with opts[:no_u]
<erikh> wel
<erikh> yeah
<injekt> thanks
<erikh> maybe a global flag for the latter case
<erikh> e.g., if you call no_u, it sets that flag
<erikh> a bit magical but at least it doesn't cause an impedance mismatch
<injekt> interesting
<injekt> yeah
<erikh> dunno. if it's too magical, might just be better to leave it out
<Phrogz> Spooner: Horrid.
<Spooner> Phrogz: What is? :D
jredville [jredville!~james.dev@173-160-211-253-Washington.hfc.comcastbusiness.net] has joined #ruby-lang
<erikh> use Gem.find_files
<erikh> I think that's the call at least -- let's you search the activated gems
<erikh> lets too
<Phrogz> Spooner: "I find that behaviour horrid"; I agree. If possible, the main gem should require the minimum amount of code from the subset (like ActiveSupport or Facets, a minimal require), but it must be int he gemspec.
<erikh> so you could look for **/mygemplugin.rb and back up from that
<erikh> that's how rdoc and rubygems do it
<Spooner> Phrogz: Ah yes, makes sense to not actually require it unless it is used; hadn't considered that. OK, I'll put everything in the gemspec, but avoid pluginifying it for the time being.
deryl [deryl!deryl@perfecting.rubyists.com] has joined #ruby-lang
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.44] has joined #ruby-lang
RORgasm [RORgasm!~rorgasm@nyv-exweb.iac.com] has joined #ruby-lang
RORgasm [RORgasm!~rorgasm@nyv-exweb.iac.com] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0DD77.dip0.t-ipconnect.de] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
imperator [imperator!~Daniel@184-96-115-43.hlrn.qwest.net] has joined #ruby-lang
<imperator> i don't suppose anyone has an aix box with gcc on it that i could have temporary access to?
<nfxgosu> rippa: Hash[[1,2,3,4].product ["string"]] how do I name this hash?
<rippa> what?
<nfxgosu> p name_of_hash['1'] => "string"
<Spooner> And another question please: c2_output = `c1 | c2` # this still prints out the "text output" from c1, even if c1's "data output" gets passed to c2. Any way I can capture c1's output?
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
<nfxgosu> nvm i figured it out
tjadc [tjadc!~quassel@dsl-241-9-76.telkomadsl.co.za] has joined #ruby-lang
<imperator> oh great, had a power outage yesterday and now one of my vm's is all effed up
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
* imperator discovers "force shutdown" option
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
Weems [Weems!~the@nat.resnet.mc.edu] has joined #ruby-lang
Weems [Weems!~the@unaffiliated/weems] has joined #ruby-lang
<jbwiv> Can anyone explain the behavior/functionality of (a,b) in this snippet? http://pastie.org/3259792
<dominikh> jbwiv: list decomposition. name gets assigned the keys, (a,b) gets assigned the array, so a gets assigned the first element, b the second
<jbwiv> dominikh, ah, k. interesting...didn't know you could do that in block arguments. thanks
znz_jp [znz_jp!~znz@ns5.n-z.jp] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
nofxx [nofxx!~nofxx@177.106.91.211] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
malev [malev!~malev@190.210.138.237] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
DEac- [DEac-!~deac@cl-610.dus-01.de.sixxs.net] has joined #ruby-lang
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
anjen [anjen!~anjen@99-29-152-246.lightspeed.bcvloh.sbcglobal.net] has joined #ruby-lang
gogo_it [gogo_it!~joshuaman@38.104.99.146] has joined #ruby-lang
gokulnath [gokulnath!~gokulnath@117.216.80.45] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
g0kul [g0kul!~gokulnath@117.216.80.45] has joined #ruby-lang
senj [senj!~senj@S01060026f323bcdf.ed.shawcable.net] has joined #ruby-lang
JohnBat26 [JohnBat26!~Eugene@80.251.120.55] has joined #ruby-lang
sepp2k [sepp2k!~sexy@g231125093.adsl.alicedsl.de] has joined #ruby-lang
artOfWar_ [artOfWar_!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
gogo_it [gogo_it!~joshuaman@38.104.99.146] has quit [#ruby-lang]
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
Paoc_ [Paoc_!~paoc@pc-28-58-161-190.cm.vtr.net] has joined #ruby-lang
g0kul [g0kul!~gokulnath@117.216.80.45] has quit ["Leaving"]
dfr|mac [dfr|mac!dfr|work@nat/google/x-psdfvncbmqicksxx] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@host.62.65.124.23.bitcom.se] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
SuperTaz_work [SuperTaz_work!~supertaz_@c-24-130-115-179.hsd1.ca.comcast.net] has joined #ruby-lang
savage- [savage-!~savage-@istep.static.monkeybrains.net] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
thegeekinside [thegeekinside!~thegeekin@189.135.220.214] has joined #ruby-lang
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
rayners [rayners!~rayners@38.102.22.194] has joined #ruby-lang
spinagon [spinagon!~rippa@109-161-65-194.pppoe.yaroslavl.ru] has joined #ruby-lang
bglusman [bglusman!~bglusman@c-71-224-192-35.hsd1.pa.comcast.net] has joined #ruby-lang
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0DD77.dip0.t-ipconnect.de] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
rippa [rippa!~rippa@109-161-65-194.pppoe.yaroslavl.ru] has joined #ruby-lang
tjadc [tjadc!~quassel@2002:29f1:94c:e:76f0:6dff:fe7a:d1d7] has joined #ruby-lang
bglusman_ [bglusman_!~bglusman@c-71-224-192-35.hsd1.pa.comcast.net] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
partydrone [partydrone!~partydron@vpn.wavetronix.com] has joined #ruby-lang
Z2FyZA [Z2FyZA!~gard@cm-84.215.22.0.getinternet.no] has joined #ruby-lang
solars [solars!~solars@194.208.132.118] has joined #ruby-lang
rippa [rippa!~rippa@109-161-65-194.pppoe.yaroslavl.ru] has joined #ruby-lang
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby-lang
benanne [benanne!~rijdier@ip-213-49-105-20.dsl.scarlet.be] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
ksinkar [ksinkar!~ksinkar@115.240.61.64] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
lianj [lianj!~lianj@17.145.34.193.static.giga-dns.com] has joined #ruby-lang
lianj [lianj!~lianj@subtle/user/lianj] has joined #ruby-lang
solars [solars!~solars@194.208.132.118] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0DD77.dip0.t-ipconnect.de] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
comboy [comboy!~quassel@tesuji.pl] has joined #ruby-lang
yellow5_ [yellow5_!~yellow5@levicole.xen.prgmr.com] has joined #ruby-lang
ozzloy [ozzloy!~ozzloy@ozzloy.lifeafterking.org] has joined #ruby-lang
Foxmaster [Foxmaster!~root@c-83-219-199-232.cust.bredband2.com] has joined #ruby-lang
jaska [jaska!jaska@f948.ip11.netikka.fi] has joined #ruby-lang
tdmackey [tdmackey!~tdmackey@booleanhaiku.com] has joined #ruby-lang
chris2 [chris2!~chris@vuxu.org] has joined #ruby-lang
shaman42 [shaman42!shaman42@kapsi.fi] has joined #ruby-lang
ozzloy [ozzloy!~ozzloy@unaffiliated/ozzloy] has joined #ruby-lang
perryh_ [perryh_!~root@fremont.perryhuang.com] has joined #ruby-lang
Arsen7 [Arsen7!~case@gmx218.internetdsl.tpnet.pl] has joined #ruby-lang
matti [matti!matti@acrux.romke.net] has joined #ruby-lang
jhchabran [jhchabran!~jh@bne75-11-88-189-148-57.fbx.proxad.net] has joined #ruby-lang
t0h [t0h!thelineva@nikita.tnnet.fi] has joined #ruby-lang
matti [matti!matti@madwifi/support/matti] has joined #ruby-lang
zvrba [zvrba!96456@diamant.ifi.uio.no] has joined #ruby-lang
zumbi [zumbi!~zumbi@77.224.206.23] has joined #ruby-lang
zerokarmaleft [zerokarmaleft!zkl@morpheus.net] has joined #ruby-lang
segy [segy!~segfault@pdpc/supporter/active/segy] has joined #ruby-lang
yfeldblum [yfeldblum!~Jay@pool-71-246-76-76.bltmmd.east.verizon.net] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.238.214] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
schroedinbug [schroedinbug!~schroedin@71-212-191-172.hlrn.qwest.net] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
erikh [erikh!~erikh@hollensbe.org] has joined #ruby-lang
mdmdm [mdmdm!~maestro@50-0-12-246.dsl.dynamic.sonic.net] has joined #ruby-lang
<erikh> christ, gg freenode
Algo [Algo!~Algo@adsl-69-108-82-13.dsl.irvnca.pacbell.net] has joined #ruby-lang
Algo [Algo!~Algo@unaffiliated/algorithmiccontr] has joined #ruby-lang
mitchty [mitchty!~mitchty@ec2-50-19-41-37.compute-1.amazonaws.com] has joined #ruby-lang
wasnotrice [wasnotrice!~wasnotric@174-143-152-175.static.cloud-ips.com] has joined #ruby-lang
Mon_Ouie [Mon_Ouie!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby-lang
flexd [flexd!~flexd@dev.flexd.net] has joined #ruby-lang
jmeeuwen [jmeeuwen!~kanarip@white.kolabsys.com] has joined #ruby-lang
josh9 [josh9!~oren@cpe-76-172-9-207.socal.res.rr.com] has joined #ruby-lang
Nisstyre [Nisstyre!~yours@c-208-90-102-250.netflash.net] has joined #ruby-lang
jaimef [jaimef!jaimef@dns.mauthesis.com] has joined #ruby-lang
sepp2k [sepp2k!~sexy@g231125093.adsl.alicedsl.de] has joined #ruby-lang
bryanl [bryanl!~bryanl@li362-49.members.linode.com] has joined #ruby-lang
foca [foca!~foca@li25-211.members.linode.com] has joined #ruby-lang
soahccc [soahccc!chaos@d2-1.debian-02.ppps.hosts.project-production.de] has joined #ruby-lang
JohnBat26 [JohnBat26!~Eugene@80.251.120.55] has joined #ruby-lang
malev [malev!~malev@74.10.95.2] has joined #ruby-lang
matti [matti!matti@acrux.romke.net] has joined #ruby-lang
matti [matti!matti@madwifi/support/matti] has joined #ruby-lang
uniqanomaly [uniqanomaly!~ua@dynamic-78-8-81-152.ssp.dialog.net.pl] has joined #ruby-lang
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby-lang
mccraig [mccraig!u574@gateway/web/irccloud.com/x-fvvxdjyztdmdurls] has joined #ruby-lang
outoftime [outoftime!~mat@ip-160-79-101-2.autorev.intellispace.net] has joined #ruby-lang
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby-lang
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
corsican [corsican!corsican@50-79-33-41-static.hfc.comcastbusiness.net] has joined #ruby-lang
crudson [crudson!~doug@static-96-227-79-15.phlapa.fios.verizon.net] has joined #ruby-lang
matti [matti!matti@madwifi/support/matti] has quit ["8-X"]
bglusman [bglusman!~bglusman@c-68-80-200-61.hsd1.pa.comcast.net] has joined #ruby-lang
<rue> erikh: O no, are you breaking up?
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby-lang
<erikh> eh?
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby-lang
kookwekker [kookwekker!kookwekker@2a02:2308::216:3eff:feb8:af22] has quit [#ruby-lang]
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby-lang
rvb_ [rvb_!~raghavbag@122.172.59.125] has joined #ruby-lang
<rue> erikh: I'm not entirely sure how, but I read gg as goodbye
qpingu [qpingu!~Adium@67.218.117.238] has joined #ruby-lang
<erikh> ah
<erikh> no
joast [joast!~rick@76.178.187.164] has joined #ruby-lang
<erikh> i'm fatally addicted to irc
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby-lang
<rvb_> hey, im just starting with ruby. Was wondering if anyone here wanted people to work on some open source project. Willing to do anything as long as its in ruby
<rvb_> or if you could reffer me to some project that a beginner could get started with, i would be really grateful
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby-lang
matti [matti!matti@madwifi/support/matti] has joined #ruby-lang
Jade [Jade!~jade@unaffiliated/jade] has joined #ruby-lang
yadav [yadav!~quassel@dsl-173-248-230-235.acanac.net] has joined #ruby-lang
<rue> rvb_: Github's a treasure trove. Are you currently using any particular, or particular kind of, software?
<rvb_> im not sure i got your question.
<rvb_> i tried looking at github but dint really know where to start since there was so much choice
<rue> Typically the best stuff to work on is stuff you use, or want to use
<rvb_> no i am not using any program written in ruby
<rvb_> Phrogz: tried that already, just got lost in the sea
<Phrogz> rvb_: For example, if you are good at 3D graphics you probably wouldn't want to be working on a Ruby program that is designed for tracking financial models.
<rue> ^
<rvb_> i was hoping that some contributors to some of the projects that require volunteers
<Phrogz> Find something that looks like something that a) you would use, and b) you'd like to use.
<rue> Or, maybe you would, but it may be easier to start by looking at various 3D libraries
<Phrogz> and maybe c) you already know something about that domain of knowledge.
<rue> rvb_: Open source isn't quite like the job market in that way :)
fayimora [fayimora!~fayimora@95.175.159.8] has joined #ruby-lang
<qpingu> Kind of hard to find a random project
<qpingu> Just try making something and use a ton of gems
<rvb_> well i'm not really looking for money, just something to work on so that i get better at ruby
<qpingu> You might find a gem you like or a gap
<qpingu> Or, make something for a particular hobby/interest
<qpingu> Like I made a forum for TF2
<rue> Nearly all projects would be happy to have contributors, but they're not going to go recruiting actively… it takes resources
<rvb_> rue: thats why i was hoping some maintainers would catch my message and ask...but that does not seem to be happening
<rvb_> how about you guys tell me some of the projects that you contribute to.
<Phrogz> rvb_: Only my own :) And patching the libraries I use super frequently if there's a problem/feature, such as Sequel or Sinatra.
<rvb_> ok
qpingu [qpingu!~Adium@67.218.117.238] has joined #ruby-lang
<rue> I've worked mostly on Rubinius and rush/rs. Recently a bit on Pry. Plus sent patches to various libraries
dfr|mac [dfr|mac!dfr|work@nat/google/x-xbkmzfarowshumvt] has joined #ruby-lang
zmack [zmack!~zmack@78.97.143.6] has joined #ruby-lang
<Phrogz> Go make LimeChat better. :)
<rue> There's a good one
<rue> A nice twist on the traditional IRC bot, too :)
brianpWins [brianpWins!~brianpWin@S01060014bf8930ea.vc.shawcable.net] has joined #ruby-lang
<Phrogz> Yes, or go make us a completely safe, sandboxed bot that can evaluate arbitrary Ruby and spit the output to the channel here.
<Phrogz> Oh, I forgot, LimeChat is no longer Ruby. :(
scampbell [scampbell!~scampbell@mail.scampbell.net] has joined #ruby-lang
chalky [chalky!~4eek@41-133-175-232.dsl.mweb.co.za] has joined #ruby-lang
<rue> Quick, pivot: take the old LimeChat codebase, reimplement cool stuff, and take over the world
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
<Phrogz> :D
<rue> Is there a way to monetize this?
<rue> That isn't one of 80000 Node.jizz OMG ITS A CHAT INTERNET ROOM
<livinded> I love when public transit routes are the most roundabout non-direct way to get where you need to go
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
<livinded> it's like they design is just to fuck with you. Oh hey, we're gonna do a couple circles before taking you exactly where you want to go
navin_unreg [navin_unreg!navindra@abnormal.openface.ca] has joined #ruby-lang
<navin_unreg> question. could someone help me understand why a = a evals to nil in this case?
<navin_unreg> irb(main):001:0> a
<navin_unreg> NameError: undefined local variable or method `a' for main:Object
<navin_unreg> from (irb):1
<navin_unreg> irb(main):002:0> a = a
<navin_unreg> => nil
<livinded> because a isn't defined
<navin_unreg> yes, but why:
<navin_unreg> irb(main):003:0> b = c
<navin_unreg> NameError: undefined local variable or method `c' for main:Object
<navin_unreg> from (irb):3
<navin_unreg> from :0
<navin_unreg> irb(main):004:0>
<navin_unreg> if it's not defined, why don't I get NameError?
<livinded> you do...
<navin_unreg> a = a doesn't give name error
<navin_unreg> it evals to nil
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has joined #ruby-lang
<navin_unreg> even though a is not defined
<navin_unreg> but c = d gives NameError
<navin_unreg> neither are defined
<navin_unreg> that's what I would expect from a = a
<livinded> oh, I see what you're saying. No idea. Maybe because it's a self assignment?
<navin_unreg> yeah, trying to see if there's some reason behind it
<navin_unreg> This isn't from me btw
<csherin> Gary Bernhardt is funny :)
<burgestrand> navin_unreg: I interpret it as during an assignment the names of the left-hand side are defined to be locals in the right-hand side; have a look at "a = defined?(a)" and "b = defined?(c)"
<burgestrand> navin_unreg: I never reflected over it though, merely accepted it ;)
<navin_unreg> hmm, needs pondering for sure :)
jamescotterill [jamescotterill!~james@94-192-130-249.zone6.bethere.co.uk] has joined #ruby-lang
<burgestrand> navin_unreg: also see this one http://ideone.com/vutAN
<navin_unreg> hmm
malev_ [malev_!~malev@190.210.138.237] has joined #ruby-lang
headius [headius!~headius@173-165-226-141-minnesota.hfc.comcastbusiness.net] has joined #ruby-lang
<csherin> burgestrand: so any assignment sets the variable on left hand-side to a default value of nil and evaluating the assignment follows after. When evaluation happens `a` is nil and so it's same as writing a = true if false ?
<burgestrand> cschneid: don’t take my word for it… but yeah
malev [malev!~malev@74.10.95.2] has joined #ruby-lang
<burgestrand> keep in mind there’s also this: http://ideone.com/N0vNk
<rippa> and a ||= :derp
solars [solars!~solars@194.208.132.118] has joined #ruby-lang
<slyphon> ok, pop quiz, hot shots
<slyphon> ary = ['alpha', 'bravo', 'charlie', 'delta', 'echo']
<slyphon> i want the even and odd element in two different arrays
<slyphon> even = %w[alpha charlie echo]
<slyphon> odd = %w[bravo delta]
<slyphon> one line it
<slyphon> burgestrand:
<slyphon> oookay?
<rippa> slyphon: (1..10).each_slice(2).to_a.transpose
<burgestrand> rippa: does not work for uneven elements
<slyphon> rippa: wow excellent entry
<rippa> damn
<chris2> >> ary.partition.each_with_index { |_,i| i%2==0 }
<chris2> => [["alpha", "charlie", "echo"], ["bravo", "delta"]]
<Phrogz> ary.group_by.with_index{ |o,i| i%2 }.values
<slyphon> hm
<chris2> ary.partition.with_index { |_,i| i%2==0 }
<chris2> nice that that works :)
<slyphon> man, i haven't played with that form of enumerators
<chris2> me neither :)
<chris2> but i'm only on 1.9 for a month :)
<slyphon> wow, i'm gonna have to learn this
<rippa> in ruby there's no right way
<slyphon> well
<csherin> ary.each_with_index.inject([[], []]) { |even_or_odd, (item, i)| even_or_odd[i % 2] << item; even_or_odd }
<slyphon> that's not *exactly* true
<csherin> inject craziness
<chris2> ary.partition.with_index { |_,i| i.even? }
<burgestrand> cschneid: use each_with_object instead, won’t need that annoying semicolon-and-value thing going on
<Phrogz> Anyone know the maintainer of pastie.org?
<Phrogz> Or a way to contact him, to let him know that syntax highlighting is b0rken?
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby-lang
<csherin> burgestrand: ary.each_with_index.each_with_object([[], []]) { |(item, i), even_or_odd| even_or_odd[i % 2] << item }
<burgestrand> csherin: :)
<csherin> the order changed between inject, tripped me a bit
<csherin> inject => |obj, item| and each_with_object => |item, obj|
<burgestrand> yeah
* Phrogz hates each with object
<rippa> inject should use reverse order
<Phrogz> It's always longer than, and slower than, a tap equivalent.
<rippa> like everything else
<Phrogz> foo.each_with_object(bar){ |x,y| ... } is just bar.tap{ |y| foo.each{ |x| ... } } and it's clearer.
<Phrogz> And you don't have a remember the order.
<rippa> but it's reverse order
<rippa> does not lend itself to chaining
h4y4shi [h4y4shi!~chatzilla@rrcs-67-79-54-130.sw.biz.rr.com] has joined #ruby-lang
benanne [benanne!~rijdier@ip-213-49-105-20.dsl.scarlet.be] has joined #ruby-lang
<csherin> Phrogz: Benchmark.measure { 1_000_000.times { [[], []].tap { |even_or_odd| ary.each_with_index { |item, i| even_or_odd[i % 2] << item } } }
<csherin> 2.160000 0.000000 2.160000 ( 2.290045)
<csherin> Benchmark.measure { 1_000_000.times { ary.each_with_index.each_with_object([[], []]) { |(item, i), even_or_odd| even_or_odd[i % 2] << item } } }
<csherin> 3.980000 0.020000 4.000000 ( 4.137670)
<csherin> it seems #each_with_object almost twice as long compared to #tap
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
enebo [enebo!~enebo@75-168-50-253.mpls.qwest.net] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
woody2shoes [woody2shoes!~woody2sho@c-71-199-20-47.hsd1.ut.comcast.net] has joined #ruby-lang
mztriz [mztriz!~mztriz@nkugateway.nku.edu] has joined #ruby-lang
tla [tla!~tla@toelboell-lund.dk] has joined #ruby-lang
anjen [anjen!~anjen@99-29-152-246.lightspeed.bcvloh.sbcglobal.net] has joined #ruby-lang
Locke23rus [Locke23rus!~quassel@128-70-13-209.broadband.corbina.ru] has joined #ruby-lang
workmad3 [workmad3!~workmad3@84.45.226.85] has joined #ruby-lang
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has joined #ruby-lang
Spooner [Spooner!~Miranda@host-78-144-139-130.as13285.net] has joined #ruby-lang
robbrit [robbrit!~rob@38.108.76.250] has quit [#ruby-lang]
headius [headius!~headius@71-37-230-236.mpls.qwest.net] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby-lang
bradland [bradland!~bradland@c-69-247-235-233.hsd1.fl.comcast.net] has joined #ruby-lang
jamw [jamw!~j@cpc11-orpi3-2-0-cust53.2-3.cable.virginmedia.com] has joined #ruby-lang
flak [flak!~rippa@87-253-29-179.pppoe.yaroslavl.ru] has joined #ruby-lang
<shevy> csherin yeah
zmack [zmack!~zmack@78.97.143.6] has joined #ruby-lang
<navin_unreg> <burgestrand> navin_unreg: also see this one http://ideone.com/vutAN
<navin_unreg> oops
<navin_unreg> sorry
<navin_unreg> anyway, still don't understand it
<navin_unreg> defined?(blah) evaluates to nil by itself
<navin_unreg> so blah = defined?(blah) isn't surprising
<navin_unreg> true if false also evaluates to nil by itself
<navin_unreg> so blah = true if false evaluating to nil isn't surprising either
<navin_unreg> but blah = blah evaluating to nil is truely surprising
<navin_unreg> instead of nameerror
<Phrogz> csherin: It's not normally quite that large a difference in the real tests that I make, but that's probably because I'm testing more the overall algorithm and not just tap/ewo
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby-lang
apeiros_ [apeiros_!~apeiros@77-58-113-31.dclient.hispeed.ch] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@cblmdm24-53-178-92.buckeyecom.net] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-124-183-113-126.lns14.ken.bigpond.net.au] has joined #ruby-lang
levity_island [levity_island!~lawrence@216.156.82.154.ptr.us.xo.net] has joined #ruby-lang
<levity_island> can anyone recommend a book with examples of good encapsulation and separation of concerns, in Ruby?
<csherin> levity_island: Design Patterns in Ruby - Russ Olsen
<levity_island> csherin: thanks!
ilyam [ilyam!~ilyam@2620:65:0:281:7c2d:d861:ac9d:1bb7] has joined #ruby-lang
<shevy> whoa
<shevy> a method "test" exists in default ruby?
<yxhuvud> you didn't know? Never done something like def test .. and it ended up doing something really strange becaue you were in the wrong scope or whatever?
Stalkr_ [Stalkr_!~Stalkr@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
<shevy> yxhuvud I wrote a small test code just now with code like
<shevy> foo { test 3 }
<shevy> and it surprised me :/
benanne [benanne!~rijdier@ip-213-49-105-20.dsl.scarlet.be] has joined #ruby-lang
dous [dous!~dous@cm171.sigma67.maxonline.com.sg] has joined #ruby-lang
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
<rue> a = a # => nil, because the parser sees the variable.
<rue> In case someone asks in the future.
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
tenderlo_ [tenderlo_!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
<shevy> wat
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby-lang
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
* andrewvos has started typing
* rue has activated channel trigger to notify when typing occurs
<andrewvos> hi
* andrewvos has started typing
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
<manveru> lol
<manveru> andrewvos: according to my calculations, you're typing on a keyboard that's about 2km wide
<manveru> I'd suggest you don't try to capitalize words
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
* andrewvos has gone offline
rpowell [rpowell!~rpowell@CPE-124-183-113-126.lns14.ken.bigpond.net.au] has joined #ruby-lang
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
<andrewvos> Sorry just bored and don't feel I have the mental capacity to do a real conversation now.
<shevy> wat
<shevy> this channel has a high wat factor
<andrewvos> shevy: Everything you do is "wat".
<shevy> wat
<shevy> lies!
ilyam_ [ilyam_!~ilyam@eng.nat.mtv.ooyala.com] has joined #ruby-lang
<andrewvos> Right I know everyone has watched that Bernhardt video, but we need to not type "wat" or even pronounce it in that way.
<andrewvos> Just hold it together guys.
<andrewvos> We'll get through this.
<drbrain> andrewvos: WAT‽
wyhaines_ [wyhaines_!~wyhaines@65.39.118.15] has joined #ruby-lang
savage-_ [savage-_!~savage-@istep.static.monkeybrains.net] has joined #ruby-lang
<andrewvos> If someone says 'wat' in real life, you're allowed to punch them.
<lianj> like lol?
<shevy> wat
<shevy> hmm no... I don't think they are the same
<qpingu> andrewvos: You must be popular with electrical engineers
<andrewvos> lianj: Precisely
<andrewvos> qpingu: I have no clue what you mean to be honest.
<rue> qpingu: They pronounce it what, too.
<rue> Well, a slightly longer a, but still.
<qpingu> 'watt'
<rue> If you pronounced Watt wat, they'd punch you.
<qpingu> They sound the same in my head
<qpingu> I've never heard somebody try and say "wat"
<andrewvos> qpingu: Ok let's get this done with then https://www.destroyallsoftware.com/talks/wat
<manveru> you must've never met anybody from northern germany :)
* Phrogz agrees with qpingu; it is supposed to rhyme with "watt", roughly.
<andrewvos> manveru: That's more like vut though?
<manveru> that's how i'd pronounce w007
<shevy> wat
<manveru> of course, where i come from, nobody speaks 1337, so i never get to say it :(
<andrewvos> What a shame
<shevy> tirolerisch > 1337 anyway. Every day I learn it through listening to Bluatschink!
<drbrain> I usually pronounce it WĀT
<manveru> bluatschink is swiss
mikeric [mikeric!~mike@96.49.104.175] has joined #ruby-lang
<manveru> oh, they aren't?
<manveru> well, almost :)
<shevy> hehe
savage- [savage-!~savage-@istep.static.monkeybrains.net] has joined #ruby-lang
<manveru> every valley in tirol has its own dialect
wallerdev [wallerdev!~wallerdev@72.44.102.30] has joined #ruby-lang
<frem> how do i use gems I installed via bundler in irb?
<rue> Via bundler
<manveru> via ruby
<bjensen> Bah..any idea as to how I can make this prettier? params[:uucaseworker_name] = params[:uucaseworker_name].sub(/^.* - /,'') if params[:uucaseworker_name].present?
<andrewvos> drbrain: This is how I feel about you pronouncing it like that http://www.youtube.com/watch?feature=player_detailpage&v=vODwqfuL3Bw#t=34s
<andrewvos> bjensen: Put a dress on it?
<manveru> :P
<shevy> lol
<andrewvos> bjensen: Or use sub!
<andrewvos> "sub!"
<bjensen> sub!?
<shevy> yeah
<andrewvos> The exclamation is a part of it
<shevy> it always is with you isn't it!
<andrewvos> shevy: I'm not aware of "it!"
<shevy> I still want method names with multiple !
<bjensen> Hmm I can't find it in the docs..
<shevy> just imagine of the awesomeness
<shevy> exit
<shevy> exit!
<shevy> exit!!!!!!!!!!!! :now
<andrewvos> :q
<andrewvos> :q!
<manveru> params[:uucaseworker_name].to_s.sub!(/^.* - /,'')
<shevy> "aaa".sub!(/a/,'') # => "aa"
<shevy> "aaa".gsub!(/a/,'') # => ""
<manveru> uhm
<bjensen> ah its a string method..I was hoping I could get rid of the if part as well
<manveru> params[:uucaseworker_name].to_s.sub!(/^.* - /,'')
<shevy> hmm
<shevy> so you want to kill the if part ...
<manveru> params[:uucaseworker_name].to_s.sub!(/^.* - /,'')
<bjensen> manveru: the params[:uucaseworker_name] might be nil though
<shevy> bjensen, not sure you can easily get rid of the if part. you could perhaps move it to another place... or a method ... which would return whatever you need (or does the if checking for you)
<manveru> that's why i to_s it
RickHull [RickHull!~rhull@pool-96-246-22-58.nycmny.fios.verizon.net] has joined #ruby-lang
qpingu [qpingu!~Adium@67.218.117.238] has quit [#ruby-lang]
<manveru> why does nobody ever read my code? :P
<Asher> you ask so much!
<andrewvos> tl;dr
<andrewvos> :uucaseworker_name is irritating me
<shevy> it takes time to read and understand!
<andrewvos> WTF does uucase mean?
<andrewvos> Did you mean "upper_case"?
<shevy> upper upsala
<shevy> some swedish worker guy
<andrewvos> shevy: Ahh ok. That make sense.
<shevy> oh... it is spelled with two "p" ... http://en.wikipedia.org/wiki/Uppsala
<RickHull> upper uppsala case?
<andrewvos> Only the finest of the upper uppsala case
<shevy> the royal swedish worker class
petercooper [petercooper!~petercoop@82.144.254.2] has joined #ruby-lang
<RickHull> caste?
<andrewvos> "string".royal_swedish_worker_class_case!
<andrewvos> Right I feel like this joke is getting out of hand. Let's end it now.
<shevy> hmm
<shevy> that's a bit a long method name though
<shevy> ok
<andrewvos> .swedecase!
<shevy> that's better
<shevy> end unless .swedecase!
<andrewvos> I was looking at a lovely method in Zend today.... setHeader
<andrewvos> Beautiful
<andrewvos> Or was it setResponseHeader
<andrewvos> Either way
<andrewvos> setHeader($name, $value, $replace = false)
amerine [amerine!~mturner@67.204.184.82] has joined #ruby-lang
<erikh> not sure what the problem with that is
<andrewvos> erikh: Well when you see it in code, you see the boolean passed in and you're like "wtf"
<andrewvos> What does that do.
<andrewvos> I suppose it isn't too bad though
<erikh> ah
<RickHull> in ruby, you can assign a dummy var in the method call
<shevy> hmm
<RickHull> setHeader('asdf', 'qwerty', replace = true)
dous [dous!~dous@cm171.sigma67.maxonline.com.sg] has joined #ruby-lang
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
<andrewvos> setHeader($name, $value, $replace = false) is used to set an individual header. By default, it does not replace existing headers of the same name in the object; however, setting $replace to TRUE will force it to do so.
<andrewvos> Is it normal to have more than one of the same header?
<RickHull> sometimes you want to generate a negative test?
<drbrain> andrewvos: sometimes you can have more than one of the same header
fayimora [fayimora!~fayimora@95.175.159.8] has joined #ruby-lang
<drbrain> but it is not typical
<drbrain> there are only a couple headers where it makes sense
<andrewvos> Exactly. Shouldn't be a default
<drbrain> does it give an error if you've already sent the header?
<drbrain> if it doesn't that would be a real WAT‽
<andrewvos> And come to think of it ruby web frameworks generally treat headers as a hash.
<andrewvos> drbrain: Not sure if it does error
<drbrain> andrewvos: Net::HTTP doesn't
<drbrain> nor does CGI
<erikh> *set* not *send*
<erikh> also Cookie:
<andrewvos> drbrain: Weird. TIL.
<erikh> and Set-Cookie: !
* erikh shuffles
<drbrain> andrewvos: in the early 1.8 days there was much rabble-rousing around CGI always returning arrays of single items
<drbrain> in Net::HTTP it's a little more transparent
tla [tla!~tla@toelboell-lund.dk] has joined #ruby-lang
<andrewvos> drbrain: So it returns an array if there is more than one key?
<drbrain> I forget what CGI does these days since nobody writes CGIs anymore
<drbrain> I'm not sure, but from writing tests I know the internal data store is a Hash of Arrays
<drbrain> and IIRC the parsing code can handle multiple headers
<andrewvos> but headers["meh"].class == String generally
<andrewvos> Good to know I suppose
<drbrain> I think it returns a String unless there's multiple items
<erikh> that's not very deterministic
<erikh> so I can bomb out a lot of Net::HTTP scripts by replying with multiple headers?
<drbrain> erikh: I don't recall the details, I'd have to check
mikeric [mikeric!~mike@96.49.104.175] has joined #ruby-lang
<erikh> np, i'm just in a crabby mood
<andrewvos> erikh: Well all of my scripts at least
<RickHull> i guess the "right" way to do it is to make every header an array, and every consumer should have to explicitly consume the first and toss the rest, as the default case
<RickHull> s/array/Enumerable/
<apeiros_> RickHull: an alternative would be to be aware which headers can actually have multiple values
<apeiros_> because most can't
<apeiros_> so you simply drop previous values if a header occurs multiple times
<apeiros_> since that's the behaviour mandated by the RFCs, afair.
<andrewvos> I love how I come in here and bitch about some php method and now you guys are arguing how to do headers correctly :)
<RickHull> it makes the: `def access(header_name)` return value ambiguous
<apeiros_> that's a baseless assumption.
RickHull1 [RickHull1!~rhull@pool-96-246-22-58.nycmny.fios.verizon.net] has joined #ruby-lang
RickHull [RickHull!~rhull@pdpc/supporter/active/rickhull] has joined #ruby-lang
<zzak> drbrain: ping get a chance to review this yet? http://bugs.ruby-lang.org/issues/5910
<drbrain> zzak: not yet :/
<drbrain> I've been working on RubyGems
<drbrain> I'm almost done with the RubyGems work though
<zzak> no worries, just dont want you to forget :)
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby-lang
virunga [virunga!~virunga@151.64.58.123] has joined #ruby-lang
<drbrain> so long as it's in a tracker and assigned to me I'll get around to it
<zzak> fair enough
<zzak> going to make that mechanize release soon? we're having trouble with bundler in production
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
DRCALKIN [DRCALKIN!~DROOL_AND@cpe-66-69-208-144.austin.res.rr.com] has joined #ruby-lang
h4y4shi [h4y4shi!~chatzilla@rrcs-67-79-54-130.sw.biz.rr.com] has joined #ruby-lang
<drbrain> by end of next week, I hope
<apeiros_> hm, is there a way to do an `rm foo` and let rm not fail (exit with non-zero) if foo doesn't exist? (yeah, bash, not ruby, I know)
<drbrain> rm -f ?
<drbrain> yeah
<apeiros_> oooh…
<apeiros_> I guess I should've known that :(
<apeiros_> thanks :)
SuperTa__ [SuperTa__!~supertaz_@c-24-130-115-179.hsd1.ca.comcast.net] has joined #ruby-lang
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby-lang
RomyRomy [RomyRomy!~stickycak@NYUFGA-WLESSAUTHCLIENTS-02.NATPOOL.NYU.EDU] has joined #ruby-lang
sei8 [sei8!~seiya@240.202.244.43.ap.yournet.ne.jp] has joined #ruby-lang
sei8 [sei8!~seiya@240.202.244.43.ap.yournet.ne.jp] has quit ["さようなら"]
gregf [gregf!~gregf@207.5.168.94] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
Indian_ [Indian_!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
workmad3 [workmad3!~workmad3@84.45.226.85] has joined #ruby-lang
moos3_ [moos3_!~rgenthner@cpe-72-224-121-41.maine.res.rr.com] has joined #ruby-lang
mephux [mephux!~mephux@unaffiliated/mephux] has joined #ruby-lang
ilyam [ilyam!~ilyam@eng.nat.mtv.ooyala.com] has joined #ruby-lang