Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
imperator [imperator!~Daniel@63-225-247-192.hlrn.qwest.net] has joined #ruby-lang
jasox [jasox!~jasox@178.239.26.139] has joined #ruby-lang
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby-lang
dous_ [dous_!~dous@cm171.sigma67.maxonline.com.sg] has joined #ruby-lang
fritzek [fritzek!~fritzek@p5DDB714C.dip.t-dialin.net] has joined #ruby-lang
phaedrix [phaedrix!~phaedrix@c-24-22-86-235.hsd1.or.comcast.net] has joined #ruby-lang
<epitron> hmm
<epitron> i haven't done much non-recursive functional algorithm stuff
<epitron> i suppose you could just do multiple passes
<epitron> or loop until your passes stabilize
virunga [virunga!~virunga@151.64.38.182] has joined #ruby-lang
spuk [spuk!~spuk@187.65.176.82] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0CE96.dip0.t-ipconnect.de] has joined #ruby-lang
Austin__ [Austin__!~austin@CPE0016cbc30e9c-CM001ceacff6ba.cpe.net.cable.rogers.com] has joined #ruby-lang
jasox [jasox!~jasox@178.239.26.139] has joined #ruby-lang
fonziec [fonziec!~ac1507@cpe-98-14-140-6.nyc.res.rr.com] has joined #ruby-lang
skinnymuch [skinnymuch!~skinnymuc@c-68-36-123-133.hsd1.nj.comcast.net] has joined #ruby-lang
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
<imperator> huh, gotta use getmntinfo64, even though it's deprecated
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
<postmodern> why does rspec-rails put it's templates in lib/generators ?
<postmodern> is this a rails generator thing?
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby-lang
hahuang65 [hahuang65!~hahuang65@108-93-94-165.lightspeed.frokca.sbcglobal.net] has joined #ruby-lang
dbussink [dbussink!dirkjan@elle.fallingsnow.net] has joined #ruby-lang
tokumine [tokumine!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby-lang
andrewhl [andrewhl!~andrew@67.70.227.10] has joined #ruby-lang
QaDeS_ [QaDeS_!~mklaus@frbg-5f7326a2.pool.mediaWays.net] has joined #ruby-lang
<Asher> yes that's a rails thing
<robgleeson> postmodern: as far as I know rspec-rails is implemented as a Rails3 engine.
<postmodern> robgleeson, damn
<postmodern> robgleeson, wanting to move those templates into data/
<postmodern> robgleeson, so yard wont barf on Erb syntax
<robgleeson> postmodern: not sure :-/
<lsegal> postmodern --exclude /templates/
<postmodern> ah ha
skinnymuch [skinnymuch!~skinnymuc@c-68-36-123-133.hsd1.nj.comcast.net] has quit [#ruby-lang]
<postmodern> lsegal, i guess i can send them a .yardopts file
<lsegal> postmodern if this is for rspec, i know dchelimsky already has a .yardopts, he probably just missed that.
<postmodern> lsegal, bingo, wasn't included in the gem
<lsegal> oh yea, he knows about that
takaokouji [takaokouji!~takaokouj@nat35.mable.ne.jp] has joined #ruby-lang
fayimora [fayimora!~fayimora@95.175.159.12] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
a3li [a3li!~alex@gentoo/developer/a3li] has joined #ruby-lang
looopy [looopy!~looopy@pool-141-156-50-228.washdc.btas.verizon.net] has joined #ruby-lang
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby-lang
virunga [virunga!~virunga@151.64.38.182] has joined #ruby-lang
nofxx_ [nofxx_!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
Carnage\ [Carnage\!~carnage@84-75-163-211.dclient.hispeed.ch] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
Faris [Faris!~amnay@41.249.12.105] has joined #ruby-lang
fayimora [fayimora!~fayimora@95.175.159.12] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.42] has joined #ruby-lang
<andrewvos> What's happpening here then ruby-lang?
looopy [looopy!~looopy@pool-141-156-50-228.washdc.btas.verizon.net] has joined #ruby-lang
br1an [br1an!u440@gateway/web/irccloud.com/x-ddjandgmmnndfbqw] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.41] has joined #ruby-lang
cgag [cgag!~cgag@65.28.12.212] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
fritzek__ [fritzek__!~fritzek@p5DDB6B10.dip.t-dialin.net] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.46] has joined #ruby-lang
tokumine [tokumine!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby-lang
brushbox [brushbox!~brushbox@174.24.233.220.static.exetel.com.au] has joined #ruby-lang
Ajay_ [Ajay_!~aroop@50.46.157.247] has joined #ruby-lang
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
tomzx [tomzx!~tomzx@70.52.27.16] has joined #ruby-lang
<freedrull> is there a reason most people seem to do $LOAD_PATH.unshift instead of $LOAD_PATH <<
<lianj> freedrull: [ [1].unshift(2) , [1] << 2 ]
<freedrull> i know the difference between the two functions, but
niklasb [niklasb!~codeslay0@p5B310140.dip0.t-ipconnect.de] has joined #ruby-lang
<freedrull> well i guess if the path is at the front of the array its faster
<Spooner> freedrull: It is because the $LOAD_PATH is checked from the start, so adding your own search to that end
<Spooner> means you will always find your own files, not those in gems or elsewhere.
<lianj> Spooner: at the top
<Spooner> lianj: Sorry?
<lianj> oh by 'to that end' you mean the start/top… ok
<Spooner> Yeah, there are two ends. I didn't mean "the end" :P
<freedrull> there are two ends of an array
<freedrull> but one end is the beginning
<lianj> i read the end :)
<lianj> "to the end of the beginning" is pretty uncommon though
<Spooner> But on the other side, you said start/top, where I'd see the start/bottom and end/top (seeing it as a literal stack :D). Words are messy.
<lianj> hehe true :D
<freedrull> i think of arrays as a really really long skinny waffle that is only one "waffle-hole" wide
<shevy> wtf
<Spooner> So, a tube?
<lianj> irccloud died again?
timbleck [timbleck!u3835@gateway/web/irccloud.com/x-exanemzkgdaompta] has joined #ruby-lang
artOfWar [artOfWar!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
diegoviola [diegoviola!~diego@host-1-211.b15.cvc.com.py] has joined #ruby-lang
necromancer [necromancer!u4538@gateway/web/irccloud.com/x-fmasmgweeesazday] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.172.246.117] has joined #ruby-lang
x0F__ [x0F__!~x0F@unaffiliated/x0f] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.42] has joined #ruby-lang
mrchrisadams [mrchrisadams!u1367@gateway/web/irccloud.com/x-ygtlqckmlixlhkwx] has joined #ruby-lang
kitallis-cloud [kitallis-cloud!u358@gateway/web/irccloud.com/x-xvaivnyxpntyklqc] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.41] has joined #ruby-lang
looopy [looopy!~looopy@pool-141-156-50-228.washdc.btas.verizon.net] 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
nekid [nekid!~nekid@c-71-202-183-106.hsd1.ca.comcast.net] has joined #ruby-lang
marie202 [marie202!~marie202@ip149.223-51-69.sogetel.net] has joined #ruby-lang
<marie202> allo
<marie202> speak freanch ??
<lianj> only ruby
cesario [cesario!u2444@gateway/web/irccloud.com/x-kjteryjwiuemzoat] has joined #ruby-lang
dnyy [dnyy!u2106@gateway/web/irccloud.com/x-hwekmggaqzzbjbfw] has joined #ruby-lang
tomzx [tomzx!~tomzx@70.52.27.16] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
agib [agib!u781@gateway/web/irccloud.com/x-druegjfqflyyrcsj] has joined #ruby-lang
JosephRuby [JosephRuby!~joseph@46.33.39.205] has joined #ruby-lang
denysonique_ [denysonique_!u484@gateway/web/irccloud.com/x-cdngytadijycekba] has joined #ruby-lang
mdel [mdel!~mdel@pool-71-175-17-16.phlapa.fios.verizon.net] has joined #ruby-lang
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby-lang
andrewhl [andrewhl!~andrew@24.246.15.43] has joined #ruby-lang
WillMarshall [WillMarshall!~willmarsh@ppp121-44-40-197.lns20.syd6.internode.on.net] has joined #ruby-lang
necromancer [necromancer!u4538@gateway/web/irccloud.com/x-xetsxansdjkclcot] has joined #ruby-lang
fonziec [fonziec!~ac1507@cpe-98-14-140-6.nyc.res.rr.com] has joined #ruby-lang
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
mikeric [mikeric!~mike@96.49.104.11] has joined #ruby-lang
<shevy> lol
<muzone> shevy: whats so funny
cesario [cesario!u2444@gateway/web/irccloud.com/x-elavijdvmbtiqcjc] has joined #ruby-lang
artOfWar [artOfWar!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby-lang
dnyy [dnyy!u2106@gateway/web/irccloud.com/x-sddpdmthgrwzcfcv] has joined #ruby-lang
* muzone is now playing: Muzone - Trouble Ahead (http://home.no/dwaynie/trouble_ahead.mp3)
x1337807x [x1337807x!~jonan@208-100-171-17.bendbroadband.com] has joined #ruby-lang
<x1337807x> If I want my gem to store an API key locally where should I do it?
<x1337807x> I want to prompt the user for their API key on first run and store it for later use.
<wmoxam> x1337807x: in a config file?
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
<x1337807x> wmoxam: Yeah I guess I'm just asking where said file should be stored. This is my first gem. Just create a . file in their home directory?
<theconartist> x1337807x: is it meant to be used as a library?
<theconartist> if it's standalone them i'd make a dotfile
<x1337807x> It's a guard extension to monitor Shopify templates and upload them if files are modified.
<x1337807x> OK
<x1337807x> thank you
<x1337807x> Is there a way to ensure that the file is removed when the gem is uninstalled? I don't like the idea of leaving anything behind if they want to remove the gem.
mdel [mdel!~mdel@pool-71-175-17-16.phlapa.fios.verizon.net] has joined #ruby-lang
<ryanf> x1337807x: you could create it inside your gem folder, I'm not sure if there's any way to avoid permissions issues if they aren't using rvm though
<ryanf> since the user won't own the gem folder
<x1337807x> Yeah that's the problem
<x1337807x> ok, guess they get to keep a random dotfile
<ryanf> yeah, they'll live
agib [agib!u781@gateway/web/irccloud.com/x-zqzfnnynxeyjgrkj] has joined #ruby-lang
tallship [tallship!~tallship@pool-71-189-131-153.lsanca.fios.verizon.net] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
infid [infid!~infid@rrcs-24-43-240-138.west.biz.rr.com] has joined #ruby-lang
priteshjain [priteshjain!~priteshja@113.193.43.127] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.41] has joined #ruby-lang
vmatiyko [vmatiyko!~vmatiyko@178.120.60.40] has joined #ruby-lang
bglusman [bglusman!~bglusman@c-71-224-192-35.hsd1.pa.comcast.net] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
diegovio1a [diegovio1a!~diego@host-1-211.b15.cvc.com.py] has joined #ruby-lang
thone_ [thone_!~thone@g225086243.adsl.alicedsl.de] has joined #ruby-lang
looopy [looopy!~looopy@pool-141-156-50-228.washdc.btas.verizon.net] has joined #ruby-lang
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
setmeaway [setmeaway!setmeaway3@119.201.52.190] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
Marco [Marco!~marco@Marco-2.Kiewit.dartmouth.edu] has joined #ruby-lang
tychobrailleur [tychobrailleur!~sebastien@176.61.72.130] has joined #ruby-lang
wallerdev [wallerdev!~wallerdev@c-68-43-58-191.hsd1.mi.comcast.net] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
flori [flori!flori@irc.ping.de] has joined #ruby-lang
igaiga [igaiga!~igaiga@w0109-49-134-239-21.uqwimax.jp] has joined #ruby-lang
krzkrzkrz [krzkrzkrz!~foobar@182.16.234.9] has joined #ruby-lang
krzkrzkrz [krzkrzkrz!~foobar@unaffiliated/krz] has joined #ruby-lang
yxhuvud [yxhuvud!mongo@h-209-13.a212.priv.bahnhof.se] has joined #ruby-lang
mark-ruby [mark-ruby!4b198a67@gateway/web/freenode/ip.75.25.138.103] has joined #ruby-lang
<mark-ruby> Hi, everyone. I am a Ruby newbie and going through the Pickaxe 19.1. I'd like to test my knowledge with some easy to moderate exercises. Does anyone know where I could find some of these?
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
dous_ [dous_!~dous@cm171.sigma67.maxonline.com.sg] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.172.246.117] has joined #ruby-lang
fayimora [fayimora!~fayimora@109.175.187.177] has joined #ruby-lang
<andrewvos> mark-ruby: Yes! Ruby Koans is a good place to learn.
<mark-ruby> Hi andrewvos, thanks, I will check it out!
<andrewvos> mark-ruby: http://rubykoans.com/
<andrewvos> mark-ruby: The Koans are very complete.
<andrewvos> mark-ruby: You will learn more from them than from those Katas.
<mark-ruby> Heh, they look interesting.
<andrewvos> mark-ruby: Quite fun too.
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
<andrewvos> mark-ruby: They will teach you about all the little weird parts of ruby.
shevy [shevy!~shevy@178-191-189-9.adsl.highway.telekom.at] has joined #ruby-lang
<mark-ruby> Ok, I am on the path to enlightenment. :)
<mark-ruby> andrewvos: I guess you'll gain karma as I progress?
<zenspider> eh. do both.
<mark-ruby> Zenspider: Thanks, I'll try.
<zenspider> the _only_ way to get good at coding (or anything, really) is to read & write tons of it
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby-lang
<mark-ruby> I believe it. I know it's going to be a challenge because I work on a startup in a non-programming role, but I've loved the programming courses and small projects I've done before.
Guedes [Guedes!~guedes@unaffiliated/guedes] has joined #ruby-lang
tekin [tekin!~tekin@cpc8-with5-2-0-cust208.1-4.cable.virginmedia.com] has joined #ruby-lang
<andrewvos> What role?
mytrile [mytrile!~mytrile@77.70.29.148] has joined #ruby-lang
Guest77199 [Guest77199!~davidw@adsl-ull-196-118.51-151.net24.it] has joined #ruby-lang
Asher [Asher!~asher@98.158.127.150] has joined #ruby-lang
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby-lang
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
alessio_rocco [alessio_rocco!~alessio@109.236.24.77] has joined #ruby-lang
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby-lang
dous_ [dous_!~dous@cm171.sigma67.maxonline.com.sg] has joined #ruby-lang
alip [alip!~alip@exherbo/developer/alip] has joined #ruby-lang
whatasunnyday [whatasunnyday!~sunny@c-24-130-81-47.hsd1.ca.comcast.net] has joined #ruby-lang
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby-lang
<erikh> nah I'm proof that reading and writing tons of code doesn't make you any good
<mark-ruby> andrewvos: CEO :)
<mark-ruby> But I think I may enjoy programming more.
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
<mark-ruby> At the least, I think it will help me be a lot more effective as a founder.
jasox [jasox!~jasox@178.239.26.139] has joined #ruby-lang
ttilley [ttilley!~ttilley@unaffiliated/lv] has joined #ruby-lang
<erikh> I wish mruby was here now
<erikh> I'd much prefer to use it over lua for this
<andrewvos> mark-ruby: Good.. Was about to say that almost every other position in a startup that is not the owner should be a developer.
<andrewvos> erikh: What are you up to?
<erikh> oh a thing
<erikh> it's a service manager that leverages scripting languages instead of shell scripts (via callbacks)
<erikh> think upstart or monit
<erikh> I'm doing it in lua because of the footprint which is waaaaaay smaller than mri
<manveru> runit?
<erikh> nah
* manveru wants runit with lua :)
<erikh> it's less runit and more upstart
<erikh> well, kind of
<erikh> it's still definitely not ready
<manveru> yeah, don't worry
kitallis-cloud [kitallis-cloud!u358@gateway/web/irccloud.com/x-frvifhlbsliaseno] has joined #ruby-lang
<erikh> heh
<manveru> not gonna replace our env with this shiny new stuff :)
<manveru> does lua compile with dietlibc?
<erikh> yeah; my end goal is to get better at C. bonus points if I can bring it into work
<erikh> manveru: unsure
agib [agib!u781@gateway/web/irccloud.com/x-ynfhjxqcfrieqbnb] has joined #ruby-lang
danishman [danishman!~kvirc@0x5da0ec2a.cpe.ge-0-1-0-1104.ronnqu1.customer.tele.dk] has joined #ruby-lang
<mark-ruby> andrewvos: I agree. I joke that if I could get receptionists who code, I would. :)
beawesomeinstead [beawesomeinstead!u1643@gateway/web/irccloud.com/x-irpsnzzqgacakskp] has joined #ruby-lang
dnyy [dnyy!u2106@gateway/web/irccloud.com/x-ccccgbkbrcbzvzqb] has joined #ruby-lang
cesario [cesario!u2444@gateway/web/irccloud.com/x-cynwwgfvcjojsjmu] has joined #ruby-lang
<andrewvos> erikh: I didn't even know about upstart or monit. I could have user this information on Thursday :(
<andrewvos> s/user/used
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
stamina [stamina!~stamina@ip5452a9bc.speed.planet.nl] has joined #ruby-lang
timbleck [timbleck!u3835@gateway/web/irccloud.com/x-cgbtgebgsubwalhs] has joined #ruby-lang
necromancer [necromancer!u4538@gateway/web/irccloud.com/x-azznhdikkwkettmy] has joined #ruby-lang
<erikh> andrewvos: monit is rather nice, I like it a lot but it doesn't address the issue of how programs are actually started
<erikh> and it has monitoring features but they're pretty weak, really.
Carnage\ [Carnage\!~carnage@84-75-163-211.dclient.hispeed.ch] has joined #ruby-lang
charper [charper!u1691@gateway/web/irccloud.com/x-nymlaepwjrhlpfxl] has joined #ruby-lang
darkswoop [darkswoop!~darkswoop@31-19-44-89-dynip.superkabel.de] has joined #ruby-lang
fritzek [fritzek!~fritzek@p5DDB5730.dip.t-dialin.net] has joined #ruby-lang
<chris2> bougyman: pong
ksinkar [ksinkar!~ksinkar@115.241.229.177] has joined #ruby-lang
<manveru> chris2: he's asleep
<manveru> might get up in 1-2 hours
benanne [benanne!~rijdier@234.141-241-81.adsl-dyn.isp.belgacom.be] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.172.246.117] has joined #ruby-lang
saLOUt [saLOUt!~rriemann@91-65-223-29-dynip.superkabel.de] has joined #ruby-lang
<chris2> dunno, he pinged me
Locke23rus [Locke23rus!~quassel@128-70-111-50.broadband.corbina.ru] has joined #ruby-lang
toretore [toretore!~toretore@crr06-3-82-231-12-81.fbx.proxad.net] has joined #ruby-lang
<rue> FROM SLEEP
ksinkar [ksinkar!~ksinkar@115.241.229.177] has joined #ruby-lang
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
<chris2> ^^
stamina [stamina!~stamina@ip5452a9bc.speed.planet.nl] has joined #ruby-lang
thrcka [thrcka!~thrcka@ip-89-102-34-33.net.upcbroadband.cz] has joined #ruby-lang
Defusal [Defusal!DeFi@unaffiliated/ecnerifed] has joined #ruby-lang
robgleeson [robgleeson!~rob@subtle/contributor/robgleeson] has joined #ruby-lang
robotmay [robotmay!~robotmay@5ad8f1da.bb.sky.com] has joined #ruby-lang
jasox [jasox!~jasox@178.239.26.139] has joined #ruby-lang
Faris1 [Faris1!~amnay@41.249.12.105] has joined #ruby-lang
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
priteshjain [priteshjain!~priteshja@113.193.47.245] has joined #ruby-lang
Faris [Faris!~amnay@41.249.138.58] has joined #ruby-lang
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
empity [empity!~user@host86-169-141-32.range86-169.btcentralplus.com] has joined #ruby-lang
QaDeS [QaDeS!~mklaus@frbg-5f7326a2.pool.mediaWays.net] has joined #ruby-lang
uniqanomaly [uniqanomaly!~ua@dynamic-78-8-213-238.ssp.dialog.net.pl] has joined #ruby-lang
priteshjain [priteshjain!~priteshja@113.193.47.245] has joined #ruby-lang
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby-lang
Natch| [Natch|!~natch@178.73.216.32] has joined #ruby-lang
tbuehlmann [tbuehlmann!~Tobias@unaffiliated/tovias] has joined #ruby-lang
priteshjain [priteshjain!~priteshja@113.193.47.245] has joined #ruby-lang
tokumine [tokumine!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby-lang
Briareos1_ [Briareos1_!~quassel@13-98-136-94.static.net4you.net] has joined #ruby-lang
niklasb [niklasb!~codeslay0@p5B311B2A.dip0.t-ipconnect.de] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.172.246.117] has joined #ruby-lang
tokumine [tokumine!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
virunga [virunga!~virunga@151.64.47.191] has joined #ruby-lang
ajeis_ [ajeis_!~quassel@27.107.3.0] has joined #ruby-lang
uniqanomaly [uniqanomaly!~ua@dynamic-78-8-213-238.ssp.dialog.net.pl] has joined #ruby-lang
trunikov_ [trunikov_!~trunikov@footly-harmonica.volia.net] has joined #ruby-lang
vmatiyko [vmatiyko!~vmatiyko@178.120.60.40] has joined #ruby-lang
t4nk603 [t4nk603!51dcc5fc@gateway/web/freenode/ip.81.220.197.252] has joined #ruby-lang
tokumine [tokumine!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby-lang
imperator [imperator!~Daniel@63-225-247-192.hlrn.qwest.net] has joined #ruby-lang
Carnage\ [Carnage\!~carnage@84-75-163-211.dclient.hispeed.ch] has joined #ruby-lang
jasox [jasox!~jasox@178.239.26.139] has joined #ruby-lang
* imperator uses /= for the first time ever
<rue> Writing your own base converter?
enebo [enebo!~enebo@75-168-50-253.mpls.qwest.net] has joined #ruby-lang
<imperator> nah, have to modify a value after the fact on osx
ajeis [ajeis!~quassel@14.194.193.252] has joined #ruby-lang
<andrewvos> What does that do?
alip [alip!~alip@exherbo/developer/alip] has joined #ruby-lang
<rue> Diveq?
desireco_ [desireco_!~textual@108-217-153-195.lightspeed.cicril.sbcglobal.net] has joined #ruby-lang
<andrewvos> Oh ok googled it sorry.
<whitequark> impressive
<whitequark> just got /home/grindars/.rvm/gems/ruby-1.9.3-p0/gems/bindata-1.4.3/lib/bindata/struct.rb:283:in `instantiate_obj_at': method `method_missing' called on hidden T_HASH object (0x886b0c0 flags=0x28 klass=0x0)
priteshjain [priteshjain!~priteshja@113.193.47.245] has joined #ruby-lang
<whitequark> looks like I found a spurious bug in MRI.
<whitequark> the offending statement: "if @field_objs[index].nil?"
publicvoid [publicvoid!~publicvoi@p5DC15594.dip.t-dialin.net] has joined #ruby-lang
<imperator> whitequark, post it to ruby-core
<imperator> (or maybe mention it in #ruby-core)
<rue> Report it
<rue> klass=0x0 >x<
<imperator> so you might say it has....zero class?
<whitequark> imperator: I cannot reproduce it on my machine...
<whitequark> it only manifests itself on a particular setup
<whitequark> it was compiled from the same 1.9.3p0 sources with the same rvm on debian wheezy setup (also same)
<whitequark> also, looks like it does not exhibits itself on 1.9.2, even on that machine
<whitequark> weird
<imperator> what is bindata?
<whitequark> a (very good) gem for working with binary data formats in a declarative style
<t4nk603> Has someone already worked with Actor model ? I really need some help to understand its concept
<whitequark> it's in pure Ruby
<whitequark> zero class is very strange
<whitequark> after I do a nonimportant change, it reports a missing method for a complete nonsense
<whitequark> I'd say it is a memory corruption somewhere
tomzx [tomzx!~tomzx@70.52.27.16] has joined #ruby-lang
<rue> t4nk603: What about it?
<rue> Conceptually it's quite simple: you send messages to an actor, and at some point in the future it will (or won't) do something about it
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby-lang
vmatiyko [vmatiyko!~vmatiyko@178.120.60.40] has joined #ruby-lang
RomD [RomD!~Roman@nrbg-4d076bd7.pool.mediaWays.net] has joined #ruby-lang
retro|cz [retro|cz!~retro@106.142.broadband6.iol.cz] has joined #ruby-lang
JosephRuby [JosephRuby!~joseph@46.33.39.205] has joined #ruby-lang
MrGando [MrGando!~MrGando@186.9.129.181] has joined #ruby-lang
<MrGando> Hey guys, I'm having some trouble installing a gem… is this the right place to ask a question about it ?
<andrewvos> MrGando: Yes.
<burgestrand> MrGando: depends on the nature of your trouble. is your machine plugged in and turned on?
ajeis_ [ajeis_!~quassel@182.156.114.170] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.172.246.117] has joined #ruby-lang
<MrGando> burgestrand: :) hahaha, well, I'm trying to install the SystemTimer gem without luck… https://gist.github.com/01fcd6507334d81b68ae
<andrewvos> MrGando: Put the errors in gist.github.com and just ask the question. Don't ask to ask. People will whine enough if you ask the wrong wquestions.
<imperator> MrGando, what platform are you on?
<burgestrand> MrGando: it’s not meant for 1.9
<andrewvos> MrGando: If it's windows you need to insall the Ruby devkit. If it's OS X you need xcode.
<MrGando> imperator: ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux] Linux 2.6.32-24-server - Ubuntu 10.04.2 LTS SMP x86_64 GNU/Linux
<andrewvos> MrGando: What about this: https://github.com/ph7/system-timer
<MrGando> I'm using Ubuntu here
<MrGando> andrewvos: reading...
<burgestrand> Guys.
<burgestrand> MRI 1.8.
<burgestrand> He’s using 1.9.2
<MrGando> burgestrand: yeah, 1.9.2 here
<MrGando> burgestrand: I mean… I'm trying
<burgestrand> MrGando: why are you trying to install it in the first place?
<andrewvos> Read the answer
<burgestrand> ¬¬
<MrGando> andrewvos: -_- hahaha, well, I'm trying to run Teambox ( rails app ) , the thing is that when I do : bundle exec unicorn_rails -p 5000 -E production ( which works with 1.8.7 ) , I get: Could not find SystemTimer-1.2.1 in any of the sources
<MrGando> ,
<MrGando> then I try to do bundle install… and the SystemTimer thing fails
<burgestrand> MrGando: add :platform => :mri_18 to the line where it says gem 'SystemTimer'
<andrewvos> MrGando: Is that another agile tool?
<burgestrand> MrGando: in the Gemfile file
<MrGando> andrewvos: It's actually quite good :), I'm loving it… it's just for project management, but it's quite simple
<MrGando> burgestrand: ok , will try :)
<burgestrand> MrGando: so, it’ll read gem 'SystemTimer', :platform => :mri_18
<andrewvos> MrGando: You don't have a board to put cards on? :)
<MrGando> andrewvos: We do ;) but it's still good hahaha
<MrGando> The line now reads : gem 'SystemTimer', '~> 1.2.0', :require => 'system_timer' ,
<MrGando> should read : gem 'SystemTimer', '~> 1.2.0', :require => 'system_timer' :platform => :mri_18 ?
<MrGando> (missing comma there maybe ? )
<burgestrand> MrGando: missing comma, but yeah :)
<andrewvos> burgestrand: What does that do exactly?
<burgestrand> I’m not entirely sure the platform is :mri_18, but I’m fairly certain. bundlers’ website appears to be down and I can’t figure out how to reach the Gemfile manpage from the CLI
<andrewvos> burgestrand: Force the platform for all gems?
<burgestrand> andrewvos: just the gem you add the option to, fairly sure you can make it a scope as well somehow, and use a block
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
<burgestrand> andrewvos: and if you run bundler on another platform it’ll simply skip that gem
<andrewvos> burgestrand: It is mri_18
<burgestrand> andrewvos: awesome; how’d you find it?
<andrewvos> burgestrand: So now his code has to run under 18?
<MrGando> burgestrand: worked… now I'll see if I can do bundle install
<burgestrand> andrewvos: no, it can run on all platforms but for ruby 1.9 it won’t need to install systemtimer
<burgestrand> andrewvos: heh, figures, I was on gembundler.org, instead of .com, should’ve googled ;)
<andrewvos> burgestrand: Ohhh ok that's cool then.
<burgestrand> andrewvos: so, you could say gem 'backports', :platform => :ruby_18 (for example)
<Tasser> MrGando, file a request for a dummy for ruby 1.9
<MrGando> Ok, this one is weird hahaha, It told me "gem X failed to install" ahhaha, then I installed the gem successfully and the error persists … weird… https://gist.github.com/01fcd6507334d81b68ae <-- weird
<MrGando> Tasser: What is a dummy request ? I could file it If I knew what it was
<Tasser> MrGando, a request for a dummy of SystemTimer for stupid gems that require it even if they're run in 1.9
<MrGando> Where can I file that ?
<Tasser> MrGando, at the systemtimer repo?
<burgestrand> MrGando: this new issue is probably not part of the installation process, I believe it errors out when it reads information about the gem
<MrGando> Tasser: Will do
<burgestrand> MrGando: what version of bundler are you using? `bundle -v`
<MrGando> Bundler version 1.0.21
<burgestrand> MrGando: I’d give it a try with the prerelease version of bundler, `gem install bundler --pre`
<burgestrand> MrGando: in case it does not work, you can always `gem uninstall bundler` and then remove the 1.1.rc.7 version you’ll have by then
<andrewvos> burgestrand: If he's not doing active development just running some app then perhaps we should advocate running it under 1.8.7.
<MrGando> burgestrand: I will try
<burgestrand> andrewvos: sound idea, I’m just assuming he has a reason to go through this trouble trying to run it on 1.9 when he already has it running on 1.8 :p
<MrGando> burgestrand: I think I may just say " screw 1.9"
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby-lang
<burgestrand> MrGando: if it runs and if you don’t explicitly need 1.9, just stick with 1.8 for this one :)
<MrGando> can I run this with 1.8 and have 1.9 for other things ? is that something that I should specify in the gemfile ?
<burgestrand> MrGando: yes, no
<MrGando> burgestrand: How should I do it ? :)
<burgestrand> MrGando: well, all that matters is which version of ruby you use to boot the application; as for everything else, same thing there, which version of ruby you are using at that time is what matters
<burgestrand> MrGando: so, if you want to use 1.8 and 1.9 alongside each other, you’ll want an installation of ruby 1.8, and an installation of ruby 1.9
<burgestrand> MrGando: how’d you install the 1.9 you’re on right now?
<MrGando> burgestrand: I'm using rvm, so I have 1.9.2 and 1.8.7
<burgestrand> MrGando: awesome :)
bryanl [bryanl!~bryanl@li362-49.members.linode.com] has joined #ruby-lang
<MrGando> burgestrand: I would really like to keep 1.9.2 as default, but would love to be able to run teambox with 1.8.7… dunno if it's possible though
<andrewvos> WOOHOO RVM
<burgestrand> MrGando: all you need to do is to use ruby 1.8.7 when you start the application and it’ll start in 1.8.7
<MrGando> burgestrand: Could you elaborate ? :P I'm a ruby noooob
<burgestrand> MrGando: for everything else, just use ruby 1.9 when you run that
<burgestrand> MrGando: ”rvm use 1.8.7”, same thing you use for switching
<burgestrand> MrGando: however, I guess you keep it deployed somewhere as an application that always runs?
<MrGando> burgestrand: yeah,
<andrewvos> MrGando: put a .rvmrc file with the contents "rvm 1.8.7" in the root directory of the project. cd out of the directory and back in and rvm will switch to 1.8.7
<burgestrand> MrGando: nginx, apache, maybe on heroku?
<MrGando> apache :( ( for now )
<andrewvos> Ok Skyrim time
<andrewvos> Peace
<burgestrand> MrGando: using passenger?
<MrGando> burgestrand: Unicorn
<t4nk603> Anyone playing SWOTR btw ?
<andrewvos> t4nk603: Wht's that?
<t4nk603> Star Wars of the Old Republic
<andrewvos> t4nk603: Is it new?
<t4nk603> Yeah quite
<t4nk603> like 3 weeks maybe
<andrewvos> Ooh
<t4nk603> MMORPG, but in SW universe
<burgestrand> MrGando: I’d use “rvm wrapper” to create a wrapper-script for ruby 1.8, it’ll set-up the environment when run — I guess you point unicorn to which ruby it will use in some configuration file?
<burgestrand> MrGando: I haven’t deployed with unicorn myself so I can’t provide any details
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby-lang
<MrGando> well , to run my Application I just do : bundle exec unicorn_rails -p 5000 -E production
<MrGando> burgestrand: let me see if my virtualhost setup has more details
bryanl [bryanl!~bryanl@li362-49.members.linode.com] has joined #ruby-lang
t4nk603 [t4nk603!51dcc5fc@gateway/web/freenode/ip.81.220.197.252] has quit [#ruby-lang]
Spooner [Spooner!~Miranda@host-78-144-139-130.as13285.net] has joined #ruby-lang
<burgestrand> MrGando: probably need a wrapper for unicorn_rails, and possibly bundler as well
dejongge [dejongge!~jonke@pD9E0CE96.dip0.t-ipconnect.de] has joined #ruby-lang
tychobrailleur [tychobrailleur!~sebastien@176.61.72.130] has joined #ruby-lang
virunga [virunga!~virunga@151.64.47.191] has quit ["Sto andando via"]
jasox [jasox!~jasox@178.239.26.139] has joined #ruby-lang
h4y4shi_ [h4y4shi_!~IceChat7@rrcs-67-79-54-130.sw.biz.rr.com] has joined #ruby-lang
<h4y4shi_> Hello
<imperator> why hello th....oh, left already
gnufied [gnufied!~gnufied@122.172.246.117] has joined #ruby-lang
ajeis [ajeis!~quassel@182.156.72.183] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
<whitequark> I'm trying to do this
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
<whitequark> and I've found that class << self does not allow to pass locals as upvalues
<whitequark> any ideas?
<whitequark> define_singleton_method.
<Mon_Ouie> singleton_class.class_eval
<whitequark> nevermind
<Mon_Ouie> Or that
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
<whitequark> a friend has recently spent ~week implementing AVM2 file format reader/writer in C++
<whitequark> today I showed him Ruby and bindata gem
<whitequark> it's been roughly four hours, and we're almost reimplemented that.
<shevy> whitequark cool
<shevy> never heard about bindata gem before I think
ben [ben!~v@dslb-088-066-000-219.pools.arcor-ip.net] has joined #ruby-lang
<whitequark> shevy: it's a _super cool_ gem for working with binary data formats made by some perverts like Adobe
<whitequark> who look bit-stuffing and similar weirdness
<whitequark> s,look,like,
<whitequark> you can define practically everything humanity has invented in binary formats (optional fields, non-byte alignment, choices) in its DSL
thrcka [thrcka!~thrcka@ip-89-102-34-33.net.upcbroadband.cz] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
<burgestrand> awesome
<whitequark> indeed
<whitequark> it also has tracing
<whitequark> which allows you to find out where exactly you have missed a single bit
<whitequark> I have some doubts on its performance, through. It's pure Ruby
<whitequark> but I'm going to make some benchmarks
M4g1c5t0rM [M4g1c5t0rM!~M4g1c5t0r@201.22.190.116.dynamic.adsl.gvt.net.br] has joined #ruby-lang
confounds [confounds!~confounds@CPE78cd8e667600-CM78cd8e6675fd.cpe.net.cable.rogers.com] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
MistyM [MistyM!~MistyM@50.72.70.192] has joined #ruby-lang
iande [iande!~ieccles@dynamic-acs-24-144-204-51.zoominternet.net] has joined #ruby-lang
M4g1c5t0rM [M4g1c5t0rM!~M4g1c5t0r@201.22.190.72.dynamic.adsl.gvt.net.br] has joined #ruby-lang
CCD [CCD!~ccd@pool-74-103-35-18.bltmmd.fios.verizon.net] has joined #ruby-lang
looopy [looopy!~looopy@pool-141-156-50-228.washdc.btas.verizon.net] has joined #ruby-lang
mdel [mdel!~mdel@pool-71-175-17-16.phlapa.fios.verizon.net] has joined #ruby-lang
<shevy> hmm
gnufied [gnufied!~gnufied@122.172.246.117] has joined #ruby-lang
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
halux [halux!~halux@114.79.0.231] has joined #ruby-lang
<halux> hi all
<halux> how i can learn ruby?
<yorickpeterse> Depends, do you have any prior knowlege of programming?
<yorickpeterse> I played with Rubymonk (http://rubymonk.com/) a while back and it seems like a nice way of learning it
<erikh> !learntoprogram
<erikh> bah
<erikh> corundum: learn to program?
<corundum> A good Ruby tutorial for newbies to programming: http://pine.fm/LearnToProgram/. NOTE: For linux installation section (in Chapter 0), the filename presented is just a example.
<halux> from where to start?
<erikh> look above!
<halux> :(
<halux> i have to buy
<erikh> no, you have to click
<halux> i've looked before
pipolo [pipolo!~pipolo@host7-171-dynamic.33-79-r.retail.telecomitalia.it] has joined #ruby-lang
pipolo [pipolo!~pipolo@host7-171-dynamic.33-79-r.retail.telecomitalia.it] has quit [#ruby-lang]
Guest77199 [Guest77199!~davidw@adsl-ull-196-118.51-151.net24.it] has joined #ruby-lang
<halux> oke thanks
<halux> erikh
<halux> see u
<halux> good night
<shevy> lol
<shevy> hilarious guy
solars [solars!~solars@194.208.132.118] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.172.246.117] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
Jake232 [Jake232!~textual@5e04f412.bb.sky.com] has joined #ruby-lang
<andrewvos> WTF just happened.
Natch [Natch!~natch@178.73.216.135] has joined #ruby-lang
abuiles [abuiles!u1641@gateway/web/irccloud.com/x-awjlsgxugqkyfvqu] has joined #ruby-lang
Carmivore [Carmivore!~carmivmor@ec2-50-19-3-56.compute-1.amazonaws.com] has joined #ruby-lang
denysonique_ [denysonique_!u484@gateway/web/irccloud.com/x-adtnjypkefpgxjjo] has joined #ruby-lang
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
spuk [spuk!~spuk@187.65.176.82] has joined #ruby-lang
ryanf [ryanf!~revfitz@adsl-67-122-210-85.dsl.pltn13.pacbell.net] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby-lang
queequeg1 [queequeg1!~queequeg@c-71-202-152-67.hsd1.ca.comcast.net] has joined #ruby-lang
gnufied1 [gnufied1!~gnufied@122.172.246.117] has joined #ruby-lang
queequeg1 [queequeg1!~chatzilla@c-71-202-152-67.hsd1.ca.comcast.net] has joined #ruby-lang
ttilley [ttilley!~ttilley@c-98-217-122-24.hsd1.ma.comcast.net] has joined #ruby-lang
ttilley [ttilley!~ttilley@unaffiliated/lv] has joined #ruby-lang
saLOUt [saLOUt!~rriemann@91-65-223-29-dynip.superkabel.de] has joined #ruby-lang
voker57 [voker57!~voker57@128-70-15-152.broadband.corbina.ru] has joined #ruby-lang
voker57 [voker57!~voker57@kvirc/developer/Voker57] has joined #ruby-lang
davidw [davidw!~davidw@apache/committer/davidw] has joined #ruby-lang
nofxx_ [nofxx_!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
fayimora [fayimora!~fayimora@109.175.187.177] has joined #ruby-lang
tomzx [tomzx!~tomzx@70.52.27.16] has joined #ruby-lang
queequeg1 [queequeg1!~chatzilla@c-71-202-152-67.hsd1.ca.comcast.net] has joined #ruby-lang
Lennier [Lennier!~joon_ch@217-162-147-86.dynamic.hispeed.ch] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.221.254] has joined #ruby-lang
<andrewvos> So I have a bin/file and I want to execute it in cucumber. Rubygems automatically adds lib to the laod path.. How should I do it nicely when I run my tests?
skinnymuch [skinnymuch!~skinnymuc@c-68-36-123-133.hsd1.nj.comcast.net] has joined #ruby-lang
<andrewvos> Hmmm. Adding "lib" to the loadpath in env.rb is what injekt mentioned.
<andrewvos> I'll do that until someone says it's a bad idea.
<andrewvos> Wait that won't work.
skinnymuch [skinnymuch!~skinnymuc@c-68-36-123-133.hsd1.nj.comcast.net] has quit [#ruby-lang]
<andrewvos> Because I'm executing my bin file.
<andrewvos> Shit
RomyEatsDrupal [RomyEatsDrupal!~stickycak@dyn-160-39-140-229.dyn.columbia.edu] has joined #ruby-lang
<manveru> andrewvos: ENV['RUBYLIB'] = ['path/to/your/lib', *ENV['RUBYLIB'].to_s.split(':')].join(':')
<manveru> something like that?
<andrewvos> manveru: Not sure
<manveru> >> [nil, "", "a", "a:b", "a:b:c"].map{|e| ['d', *e.to_s.split(':')].join(':') }
<manveru> => ["d", "d", "d:a", "d:a:b", "d:a:b:c"]
<manveru> seems to work :)
<andrewvos> Hmm, too much yak shaving. Just adding lib to load path in bin.
<manveru> ?
<hagabaka> hmm
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
<manveru> i manage a bunch of git libs with RUBYLIB :)
<hagabaka> aren't ENV entries always strings?
<manveru> if an entry is there, sure
<manveru> not everybody has $RUBYLIB set
<chris2> what happened to apeiros idea anyway?
<chris2> corundum: seen apeiros
<corundum> apeiros was last seen 13 days, 1 hours, 26 minutes and 7 seconds ago, quitting IRC (Read error: Connection reset by peer)
<chris2> oO
<hagabaka> so why not just ENV['RUBYLIB'] = 'path/to/your/lib:' + ENV['RUBYLIB'].to_s ?
<manveru> hagabaka: because that might result in 'path/to/your/lib:' ?
<manveru> seems alright
<manveru> ENV['RUBYLIB'] = "path/to/your/lib:#{ENV['RUBYLIB']}"
<manveru> anyway, andrewvos probably won't listen until injekt comes around ^^;
tokumine [tokumine!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby-lang
<whitequark> want to see a funny thing?
<whitequark> this is the essence of Java
<whitequark> that class does not do _anything at all_.
wallerdev [wallerdev!~wallerdev@c-68-43-58-191.hsd1.mi.comcast.net] has joined #ruby-lang
looopy [looopy!~looopy@pool-141-156-50-228.washdc.btas.verizon.net] has joined #ruby-lang
<andrewvos> manveru: Heh :) I will but I've wasted too much time with it and I want to get some work done before I have to sleep :)
jasox [jasox!~jasox@178.239.26.139] has joined #ruby-lang
vmatiyko [vmatiyko!~vmatiyko@178.120.60.40] has joined #ruby-lang
Silowyi [Silowyi!~silowyi_d@99-26-202-35.lightspeed.snantx.sbcglobal.net] has joined #ruby-lang
vmatiyko [vmatiyko!~vmatiyko@178.120.60.40] has quit [#ruby-lang]
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby-lang
<shevy> whitequark typical java. producing massive amount of code, line after line, without doing anything
<burgestrand> corsican: seen apeiros_
<burgestrand> …
<burgestrand> corsican: not you, go away
<burgestrand> :(
<burgestrand> corundum: seen apeiros_
<corundum> apeiros_ was last seen 3 days, 3 hours, 50 minutes and 28 seconds ago, quitting IRC (Remote host closed the connection)
<burgestrand> yay
s0ber [s0ber!~s0ber@114-36-234-3.dynamic.hinet.net] has joined #ruby-lang
y3llow [y3llow!~y3llow@114-36-234-3.dynamic.hinet.net] has joined #ruby-lang
tokumine [tokumine!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby-lang
y3llow [y3llow!~y3llow@114-36-234-3.dynamic.hinet.net] has joined #ruby-lang
y3llow [y3llow!~y3llow@114-36-234-3.dynamic.hinet.net] has joined #ruby-lang
fayimora [fayimora!~fayimora@2a01:388:201:3721:7cda:5924:86c8:50dd] has joined #ruby-lang
<whitequark> shevy: exactly
whatasunnyday [whatasunnyday!~sunny@c-24-130-81-47.hsd1.ca.comcast.net] has joined #ruby-lang
<rue> I was going to make an abstract factory factory joke but couldn't be bothered to type the whole thing.
benanne [benanne!~rijdier@ip-213-49-84-172.dsl.scarlet.be] has joined #ruby-lang
flip_digits [flip_digits!~textual@c-71-199-243-97.hsd1.fl.comcast.net] has joined #ruby-lang
_inc [_inc!~inc@unaffiliated/-inc/x-0498339] has joined #ruby-lang
<whitequark> %w{abstract singleton factory observer proxy iterator facade}.shuffle
<whitequark> all of the combinations are roughly equivalent..
Pip [Pip!~Pip@host-88-156-66-217.spbmts.ru] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
mkscrg [mkscrg!~mkscrg@ool-18e4f9d6.dyn.optonline.net] has joined #ruby-lang
chessguy [chessguy!~chessguy@pool-96-231-167-66.washdc.fios.verizon.net] has joined #ruby-lang
anjen [anjen!~anjen@99-29-152-246.lightspeed.bcvloh.sbcglobal.net] has joined #ruby-lang
<andrewvos> Programming is hard.
<whitequark> thanks, Captain Obvious
<andrewvos> Harsh.
<andrewvos> Non mocking people please help me.
JosephRuby [JosephRuby!~joseph@46.33.39.205] has joined #ruby-lang
Carmivore [Carmivore!~carmivmor@ec2-174-129-189-6.compute-1.amazonaws.com] has joined #ruby-lang
voker57 [voker57!~voker57@128-70-15-152.broadband.corbina.ru] has joined #ruby-lang
voker57 [voker57!~voker57@kvirc/developer/Voker57] has joined #ruby-lang
<andrewvos> I have a class that is my entry point for my binary.
<andrewvos> It has a method called execute, which takes ARGV and "output" which is normally Kernel when not under test.
<drbrain> andman: about the bin_path thing?
<andrewvos> I want to test that my class is doing the right things
<drbrain> oops, andrewvos ^^
<andrewvos> So it's responsibility is to parse the ARGV bits and push them onto somewhere else.
<drbrain> system Gem.ruby, Gem.bin_path(gem_name, exec_name), arg1, arg2, ...
<andrewvos> Now do I test that this class is passing the right parameters to the other classes?
<andrewvos> Or do I assert against what happens when this class calls the other classes?
<andrewvos> The second case means I would only have unit tests for the entry point class
<andrewvos> HAve I explained terribly?
<andrewvos> drbrain: Nope moved on to next problem now.
Pip [Pip!~Pip@host-87-156-66-217.spbmts.ru] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
<andrewvos> Or maybe I have to just leave this to my integration tests?
<drbrain> andrewvos: for my executable entry point I have one method that takes ARGV
<drbrain> it calls process_args which uses optparse or whatever to get a Hash or whatever back
<drbrain> which then calls a method to do the work
<drbrain> the method that does the work is tested just like any other method
<drbrain> the method that processes args is tested just like any other method, %w[--foo --bar=baz] goes in, {:foo => true, :bar=>'baz'} or whatever comes out
<drbrain> the entry point is usually just:
<drbrain> def self.run(args = ARGV) options = process_args args; new.run options; end
<drbrain> so the usefulness of a test for it is limited
<drbrain> andrewvos: is that helpful?
<andrewvos> drbrain: Very.
<andrewvos> Ok but I'm still kind of stuck on one point.
<andrewvos> Ok wait I wrote out the question and the answer was obvious :)
<drbrain> heh
skinnymuch [skinnymuch!~skinnymuc@c-68-36-123-133.hsd1.nj.comcast.net] has joined #ruby-lang
<andrewvos> drbrain: Thanks you're pointed me in the right direction for now :)
Carmivore [Carmivore!~carmivmor@ec2-107-20-33-211.compute-1.amazonaws.com] has joined #ruby-lang
skinnymuch [skinnymuch!~skinnymuc@c-68-36-123-133.hsd1.nj.comcast.net] has quit [#ruby-lang]
<andrewvos> I'm kind of lost on how to test that one class is calling another class with the correct methods.
<andrewvos> Just in general.
<drbrain> andrewvos: what I like about the way I do it is that it's really easy to use my executable entry point as API without needing system
<drbrain> you just require and provide the options hash instead of the ARGV hash
<andrewvos> I mean without class.should_receive(...)
<drbrain> ARGV array
<drbrain> andrewvos: I usually test that it does something trivial if the other class has something trivial to do
<drbrain> if it's something big I write a stub
<drbrain> dependency injection is useful for writing stubs
<drbrain> you can replace the real behavior with a stub that says "yeah, I was called"
<drbrain> real behavior => real class
<andrewvos> drbrain: And how do you write these stubs? Just roll a class?
<drbrain> yeah
<andrewvos> Fair enough.
<andrewvos> Ok feeling a bit better about this now.
<drbrain> or stub = Object.new; def stub.some_method(*args); end
<drbrain> Ruby is an adequate stubbing framework all by itself
<andrewvos> Yeah
<drbrain> I also find it useful to avoid classes that immediately do work in initialize
<drbrain> separating setup from running helps write better tests
<andrewvos> drbrain: Yeah I also try only set instance variables in initialize.
<andrewvos> One thing I can take from statically typed languages that still applies.
<drbrain> it also helps avoid needing stubs
<drbrain> you can call a method on the object to indicate at least one thing you passed is set-up
<drbrain> and trust the tests in the class to be comprehensive for all the behavior
<andrewvos> drbrain: So you mean call initialize("hello") and then check that an attribtue on the class is equal to "hello"?
<drbrain> andrewvos: or something more meaningful to the class
<andrewvos> Fair enough
<drbrain> if you were working with a job queue you might refute_empty the_queue
srbartlett [srbartlett!~srbartlet@202.146.7.239] has joined #ruby-lang
<andrewvos> Don't get what you mean
<drbrain> if you're testing a class that adds items to a job queue you would write:
<rue> Almost universally, code that's easily testable is better
<erikh> not that this helps much, but "avoid coupling" is the fundamental lesson
<drbrain> def add_item(work_to_do) job = pre_process work_to_do; @job_queue.add_item job; end
<drbrain> so if your job queue is empty to start you can add an assertion that it is not empty when the test is done
<drbrain> no need to test that the job queue works, just that it got your message
<erikh> it's like a jungle sometimes
<rue> As a user, when I'm in the jungle
Carnage\ [Carnage\!~carnage@84-75-163-211.dclient.hispeed.ch] has joined #ruby-lang
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
jasox [jasox!~jasox@178.239.26.139] has joined #ruby-lang
desireco_ [desireco_!~textual@108-217-153-195.lightspeed.cicril.sbcglobal.net] has joined #ruby-lang
<injekt> manveru: huh?
<andrewvos> I need to read a book
<andrewvos> Or find someone to pair with who isn't a mockist
wallerdev [wallerdev!~wallerdev@c-68-43-58-191.hsd1.mi.comcast.net] has joined #ruby-lang
<erikh> make a mockery of their test suite.
<erikh> yuk yuk
<andrewvos> heh
<injekt> oh wow
<injekt> you went low then
* injekt pulls erikh back up
mkscrg [mkscrg!~mkscrg@ool-18e4f9d6.dyn.optonline.net] has joined #ruby-lang
<andrewvos> Yea I just laughed to be nice
<andrewvos> haha
<erikh> yeah the humor valve is a bit leaky lately
<andrewvos> erikh: Get drunk. At least it will be funny to you then?
<andrewvos> drbrain: How did you learn to code like this?
<erikh> hm
<erikh> good idea
<andrewvos> Wish I had a beer now actually
<drbrain> lot's of practice
<drbrain> -'
slaytanic [slaytanic!~slaytanic@host226.190-31-167.telecom.net.ar] has joined #ruby-lang
<rue> ^
iande [iande!~ieccles@dynamic-acs-24-144-204-51.zoominternet.net] has joined #ruby-lang
<rue> Find out what doesn't work, and then do something else also works.
<epitron> lol: <freedrull> i think of arrays as a really really long skinny waffle that is only one "waffle-hole" wide
<epitron> that sounds delicious
<epitron> a = []; 1000.times { a << :syrop }
<rue> But waffles can't grow in size
<andrewvos> I have an "executer" class which takes a hash of options now. I want it to use those options to decide what methods to call on another class.
<erikh> leave them out for a few weeks
<epitron> rue: unless you have a special waffle maker which can append a single waffle-hole to an existing one-dimensional waffle
<rue> erikh: They'll turn into hash
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby-lang
<andrewvos> Ok now I'm hungry
<erikh> turing waffle-maker
Lennier [Lennier!~joon_ch@217-162-147-86.dynamic.hispeed.ch] has joined #ruby-lang
<andrewvos> I have an "executer" class which takes a hash of options now. I want it to use those options to decide what methods to call on another class. How can I test that the executioner class is initializing another class with the correct parameters?
<andrewvos> One option is to inject the class constant into the "executer"
<andrewvos> But then how do I test that initialize is being called correctly?
<andrewvos> Oh wait, I could just test an attribute like drbrain said. Hmm.
andrewhl [andrewhl!~andrew@69-165-217-17.dsl.teksavvy.com] has joined #ruby-lang
<erikh> instance_variable_get
<erikh> (if you don't expose it via attrs)
<andrewvos> hmmm
<andrewvos> better perhaps
<andrewvos> Wait but if I'm passing in ClassName and the executer class calls new, how do I get the variable then? This feels wrong somehow.
<erikh> what are you setting the ClassName instance to?
<andrewvos> A fake
<erikh> are you trying to test the type or some operation it performs?
<andrewvos> erikh: Not really. The executer is calling an API class. I want to be sure it passes in the correct url when calling new.
<erikh> ah, hrm. I guess I'd have to see code at this point.
<andrewvos> Basically I just want to be sure that this class is newing up another class with the correct parameters. Also, I'm injecting the class name into the initializer.
<erikh> well you could test the ivar, then test ivars on the ivar
<erikh> this is entering the realm of silly though
<erikh> I'd test the behavior
<andrewvos> erikh: Exactly.
<erikh> (which may be what you're trying to do; I missed the first part of the conversation)
<andrewvos> What I just did was move that line of code out and ignore it.
<andrewvos> erikh: I suppose that's what I have integration tests for.
<erikh> I call those "tests"
<erikh> dunno, never really understood the point of partitioning test suites
<erikh> anyhow, I'll spare you the dogma. best of luck.
Jake232 [Jake232!~textual@5e04f412.bb.sky.com] has joined #ruby-lang
slaytanic [slaytanic!~slaytanic@host226.190-31-167.telecom.net.ar] has joined #ruby-lang
<andrewvos> hehe
<andrewvos> Thanks
tokumine [tokumine!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby-lang
<drbrain> andrewvos: don't be afraid to get your tests "wrong" the first time
<drbrain> write enough tests so that you can safely refactor
<andrewvos> drbrain: cool
<drbrain> then, improve both your code and your tests by refactoring them together
<andrewvos> It's tricky moving away from mocking.
<andrewvos> But I can already see the benefit of less code.
<drbrain> I don't think there's anything inherently wrong with mocking
<drbrain> it's just not for me
<drbrain> there was a really good talk on mocking at RubyConf this year, you should watch the video
<andrewvos> drbrain: Thanks I will.
<drbrain> I think mocking is hard when your design could be better
<drbrain> but it's hard to test the way I do when my design could be better
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
<drbrain> so in short, your tests are telling you things could be better, but recognizing that fact takes practice
<drbrain> and knowing what to do about it
benanne [benanne!~rijdier@ip-213-49-84-172.dsl.scarlet.be] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
WillMarshall [WillMarshall!~willmarsh@203.48.101.90] has joined #ruby-lang
Carmivore [Carmivore!~carmivmor@ec2-50-17-25-180.compute-1.amazonaws.com] has joined #ruby-lang
<andrewvos> Right that feature is done. I fill a bit better about things now.
<andrewvos> s/fill/feel
robotmay [robotmay!~robotmay@5ad8f1da.bb.sky.com] has joined #ruby-lang
desireco_ [desireco_!~textual@108-217-153-195.lightspeed.cicril.sbcglobal.net] has joined #ruby-lang
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby-lang
Marco [Marco!~marco@vtelinet-216-66-104-3.vermontel.net] has joined #ruby-lang
andrewhl [andrewhl!~andrew@out-pq-187.wireless.telus.com] has joined #ruby-lang
Lennier [Lennier!~joon_ch@217-162-147-86.dynamic.hispeed.ch] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
robgleeson [robgleeson!~rob@subtle/contributor/robgleeson] has joined #ruby-lang
alessio_rocco [alessio_rocco!~alessio@dynamic-adsl-84-220-151-102.clienti.tiscali.it] has joined #ruby-lang
<josh9> andrewvos: if u use vim and want to timebox 10 minutes for pairing session, let me know.
<josh9> or just pastebin your test. i am curious to see it.
thrcka [thrcka!~thrcka@ip-89-102-34-33.net.upcbroadband.cz] has joined #ruby-lang
jasox [jasox!~jasox@178.239.26.139] has joined #ruby-lang
<andrewvos> josh9: I could throw it up on github
<josh9> awesome
<rue> Threw up all over github
<andrewvos> josh9: That's it
sora_h [sora_h!~sora_h@mayfield.privs.net] has joined #ruby-lang
<dreinull> didn't we have a comment here on &&= these days?
<josh9> andrewvos: does it work with jenkins?
* josh9 loves minitest
<andrewvos> josh9: Not sure
<rue> dreinull: Day before yesterday
<andrewvos> josh9: I'm writing it to use at work, because if I have to click through the Hudson UI one more time I'm going to lose my mind.
<dreinull> rue: was it any good? I'm using it right now but can't think of anything else :)
<andrewvos> Oh and by the way I remember rue promising to write this code at one point.
<rue> I distinctly recall that I weasel-worded it so that this counts
Newbs [Newbs!~textual@host-78-147-55-216.as13285.net] has joined #ruby-lang
<rue> dreinull: It's useful when it's useful. Much rarer than ||=
<andrewvos> rue: Sounds about right.
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
<dreinull> rue: I have a many to one relationship in my model so I need to test if the A exists and if it does I need a.b. Can't do a ||= a.b
<dreinull> so a &&= a.b seems fine but it's already late here.
<rue> That's useful if you're assigning to a, which may or may not be necessary
<rue> In an accessor-type situation you often just see a && a.b
<rue> (The better option is to ensure a's not nil, obviously)
brushbox [brushbox!~brushbox@203-206-167-26.perm.iinet.net.au] has joined #ruby-lang
<dreinull> in that case I want the value of a.b not just it's existence
<dreinull> its
<rue> Yes, but do you want it to replace a?
<rue> a = a.b if a
RomD` [RomD`!~Roman@nrbg-4d077e0c.pool.mediaWays.net] has joined #ruby-lang
<rue> If so, then &&= is the way to go (unless you want to write it out like I just did, which may be clearer)
<rue> drbrain's use case is a bit more involved, because there's a chain of &&'s
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
<andrewvos> Sometimes I feel like if you give up on SRP completely, and only integration test a small bit of code then you're far better off.
<andrewvos> Looking through how much code I have just to get cucumber and minitest working.
<andrewvos> Would I just be destined to learn the maintenance lesson again though.
<andrewvos> Who knows.
andrewhl_ [andrewhl_!~andrew@199-7-156-34.eng.wind.ca] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-143-5.aei.ca] has joined #ruby-lang
wallerdev [wallerdev!~wallerdev@c-68-43-58-191.hsd1.mi.comcast.net] has joined #ruby-lang
tokumine_ [tokumine_!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby-lang
spuk [spuk!~spuk@187.65.176.82] has joined #ruby-lang
Carnage\ [Carnage\!~carnage@84-75-163-211.dclient.hispeed.ch] has joined #ruby-lang
Lennier [Lennier!~joon_ch@217-162-147-86.dynamic.hispeed.ch] has quit [#ruby-lang]
queequeg1 [queequeg1!~chatzilla@c-71-202-152-67.hsd1.ca.comcast.net] has joined #ruby-lang
<rue> I dunno how SRP and testing are opposing forces?
<rue> Unless you're trying to figure out the SR before testing
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
jensn_ [jensn_!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang