Topic for #ruby is now Ruby programming language || ruby-lang.org || RUBY SUMMER OF CODE! rubysoc.org/ || Paste >3 lines of text in http://pastie.org || Para a nossa audiencia em portugues http://ruby-br.org/
eywu1 [eywu1!~Adium@67-134-147-135.dia.static.qwest.net] has joined #ruby
austinbv [austinbv!~austinbv@2002:6160:bbeb:e472:b181:d9a:fe07:aaf] has joined #ruby
eywu1 [eywu1!~Adium@67-134-147-135.dia.static.qwest.net] has quit [#ruby]
Nss [Nss!~nss@2-227-0-69.ip183.fastwebnet.it] has joined #ruby
austinbv_ [austinbv_!~austinbv@29-133.127-70.tampabay.res.rr.com] has joined #ruby
ilyam_ [ilyam_!~ilyam@eng.nat.mtv.ooyala.com] has joined #ruby
deweysmith [deweysmith!u3113@gateway/web/irccloud.com/x-ledcyzfpmfbudrma] has joined #ruby
pootpoot [pootpoot!~pootpoot@38.108.250.130] has quit [#ruby]
jay_zawrotny [jay_zawrotny!~Jay@c-68-43-28-43.hsd1.mi.comcast.net] has joined #ruby
cooper [cooper!~mitchell@unaffiliated/furryfishy] has joined #ruby
kristopolous [kristopolous!~chris@204.154.109.20] has joined #ruby
<kristopolous> so I have a class, and I want to compare an instance of it to a string, does ruby do type coercion to a string and if so, can I define how that type coercion would work?
roadze [roadze!~roadze@119.224.137.97] has joined #ruby
<tar_> kristopolous: it uses the equality method defined on the left hand side ("asdf" == obj would use String#==) and I don't think String's coerces
<tar_> kristopolous: "coercion" to String is calling to_s on an object, and you can override that method to do whatever
_kinderman [_kinderman!~kinderman@74.201.7.111] has joined #ruby
<Zal> if I "require Math", for example, are the contents of the Math gem inserted into the global scope?
Behi [Behi!~Behi@203-206-227-95.perm.iinet.net.au] has joined #ruby
replore_ [replore_!~replore@203.152.213.161.static.zoot.jp] has joined #ruby
<banisterfiend> Zal: yes of course
<banisterfiend> but no modules are included by default
<Zal> banisterfiend, ok, but I can still access modules using "Math::SomeModule" syntax?
<Zal> just learning about scoping now
<banisterfiend> Zal: Yeah
<Zal> cool, thank you
<banisterfiend> Zal: learn about modules
<Zal> getting there ... :-)
<banisterfiend> modules are probably not what u think they are ;)
<Zal> seems like modules are sort of abstract superclasses
<banisterfiend> Zal: except they're not abstract
<banisterfiend> :P
<Zal> banisterfiend, ok, but they can't be instantiated, right?
<banisterfiend> Zal: yeah they cant be
<banisterfiend> basically a module is quite different to anything in another language
<banisterfiend> and they have many different use-cases in ruby too
dnjaramba_ [dnjaramba_!~dnjaramba@41.72.193.86] has joined #ruby
<banisterfiend> they're kind of multipurpose but pretty powerful
<Zal> very well, I will do my best to avoid making assumptions about them
looopy [looopy!~looopy@pool-141-156-47-88.washdc.btas.verizon.net] has joined #ruby
tomzx [tomzx!~tomzx@dsl-59-207.aei.ca] has joined #ruby
cooper [cooper!~mitchell@unaffiliated/furryfishy] has joined #ruby
skinnymuch [skinnymuch!~skinnymuc@c-68-36-123-133.hsd1.nj.comcast.net] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
VitaoDoidao [VitaoDoidao!vitao@66.197.174.10] has joined #ruby
wilmoore_ [wilmoore_!~wilmoore@70-89-165-49-ISTS-co.hfc.comcastbusiness.net] has joined #ruby
<shevy> a module is basically a crippled class
Seisatsu [Seisatsu!~seisatsu@2001:c08:3700:ffff::53b] has joined #ruby
<shevy> "Good design adds value faster than it adds cost." - Thomas C. Gale
_numbers [_numbers!~xxxxxx@unaffiliated/numbers/x-253875] has quit [#ruby]
dankest [dankest!~dankest@ip68-108-246-82.sb.sd.cox.net] has joined #ruby
chubba [chubba!~chubba@cpc5-dund11-2-0-cust410.sgyl.cable.virginmedia.com] has joined #ruby
WhiteHorse [WhiteHorse!~WhiteHors@201.208.150.8] has joined #ruby
<shadoi> Zal: http://en.wikipedia.org/wiki/Mixin <— Modules are a Mixin.
nari [nari!~nari@raichu.netlab.jp] has joined #ruby
<Zal> ok, cool. I know what a Mixin is!
<Zal> thanks for the clues
looopy [looopy!~looopy@pool-141-156-47-88.washdc.btas.verizon.net] has joined #ruby
chubba [chubba!~chubba@cpc5-dund11-2-0-cust410.sgyl.cable.virginmedia.com] has joined #ruby
emmanuel_ [emmanuel_!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
closedbracket [closedbracket!~closedbra@cpe-098-024-125-117.carolina.res.rr.com] has joined #ruby
eywu [eywu!~Adium@205-170-107-4.dia.static.qwest.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/voxeojohn] has joined #ruby
IrishGringo [IrishGringo!~chatzilla@c-71-229-99-200.hsd1.fl.comcast.net] has joined #ruby
jetblack [jetblack!~jetblack@99-32-20-118.lightspeed.elgnil.sbcglobal.net] has joined #ruby
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<Zal> why is there both #send and #__send__ ?
<Zal> is it just in case I shadow one of them?
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
<samuelkadolph> In case you want to define your own send that doesn't do message dispatch
<samuelkadolph> And others can still call send like normal
<Zal> excellent, thanks
tatsuya_o [tatsuya_o!~tatsuya_o@113x33x226x118.ap113.ftth.ucom.ne.jp] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
brownies [brownies!~brownies@216.38.150.34] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@174-27-214-73.slkc.qwest.net] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
sj26 [sj26!sj26@sj26.com] has joined #ruby
TheShadowFog [TheShadowFog!~TheShadow@ool-1826fa3a.dyn.optonline.net] has joined #ruby
malkomalko [malkomalko!~malkomalk@66-234-41-82.nyc.cable.nyct.net] has joined #ruby
emmanuel_ [emmanuel_!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
wmoxam [wmoxam!~wmoxam@206-248-153-55.dsl.teksavvy.com] has joined #ruby
pen [pen!~pen@2001:288:1001:28:4df5:8b8e:dcbf:ef39] has joined #ruby
looopy [looopy!~looopy@pool-141-156-47-88.washdc.btas.verizon.net] has joined #ruby
incluye [incluye!~incluye@LO1-ESR-74-215-187-208.fuse.net] has joined #ruby
iamjarvo [iamjarvo!~Adium@c-71-230-13-201.hsd1.nj.comcast.net] has joined #ruby
<iamjarvo> is there a classy way to go from integer to symbol? right now im doing 13.to_s.to_sym
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
jbw [jbw!~jbw@dsl-044-084.cust.imagine.ie] has joined #ruby
<Zal> I have to make lots of string comparisons. Would it be much faster to convert each string to a symbol before comparison?
<Zal> (speed counts in this exercise)
emmanuel_ [emmanuel_!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
<davidcelis> Try it
<davidcelis> Best way to find something out like that is to compare
<Zal> I guess that involves learning how to use the benchmark gem
<Zal> I'll write it using strings first, then see if I can speed it all by converting to symbols where appropriate.
<samuelkadolph> Keep in mind that symbols are never garbage collected
<Zal> samuelkadolph, oh, good point. Thank you.
nonotza [nonotza!~nonotza@66.246.94.130] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
pen [pen!~pen@140.112.30.131] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@174-27-214-73.slkc.qwest.net] has joined #ruby
crankycoder [crankycoder!~crankycod@24-246-44-226.cable.teksavvy.com] has joined #ruby
looopy [looopy!~looopy@pool-141-156-47-88.washdc.btas.verizon.net] has joined #ruby
emmanuel_ [emmanuel_!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
<sean_m> t
TheShadowFog [TheShadowFog!~TheShadow@ool-1826fa3a.dyn.optonline.net] has joined #ruby
TomJ [TomJ!~TomJ@unaffiliated/tomj] has joined #ruby
cpruitt [cpruitt!~cpruitt@190-186.126-70.tampabay.res.rr.com] has joined #ruby
randym [randym!~randym@EM114-48-184-76.pool.e-mobile.ne.jp] has joined #ruby
TheShadowFog [TheShadowFog!~TheShadow@ool-1826fa3a.dyn.optonline.net] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@174-27-214-73.slkc.qwest.net] has joined #ruby
yfeldblum [yfeldblum!~Jay@c-71-206-30-119.hsd1.md.comcast.net] has joined #ruby
QaDeS_ [QaDeS_!~mklaus@frbg-4d028956.pool.mediaWays.net] has joined #ruby
thatryan [thatryan!~thatryan@c-71-202-3-49.hsd1.ca.comcast.net] has joined #ruby
luxurymode [luxurymode!~luxurymod@pool-96-246-51-32.nwrknj.fios.verizon.net] has joined #ruby
<austinbv> Sometime I write forget how awesome ruby is until I work on a java project
dbgster [dbgster!~dbgster@CPE0013f7b7170c-CM0013f7b71708.cpe.net.cable.rogers.com] has joined #ruby
rpowell [rpowell!~rpowell@CPE-60-229-137-64.lns4.ken.bigpond.net.au] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
cook1es [cook1es!~chatzilla@c83-248-93-185.bredband.comhem.se] has joined #ruby
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
sdwrage [sdwrage!~sdwrage@cpe-184-57-123-50.columbus.res.rr.com] has joined #ruby
minijupe [minijupe!~benlieb@adsl-74-243-183-162.ard.bellsouth.net] has joined #ruby
iamjarvo [iamjarvo!~Adium@c-71-230-13-201.hsd1.nj.comcast.net] has joined #ruby
abstrusenick [abstrusenick!~abstrusen@bb119-74-130-142.singnet.com.sg] has joined #ruby
andrewpthorp [andrewpthorp!~andrewpth@c-98-244-88-92.hsd1.va.comcast.net] has joined #ruby
michael_mbp [michael_mbp!~Marin@112.134.194.132] has joined #ruby
phantasm66 [phantasm66!~phantasm6@146-115-132-39.c3-0.nwt-ubr1.sbo-nwt.ma.cable.rcn.com] has joined #ruby
ilyam [ilyam!~ilyam@eng.nat.mtv.ooyala.com] has joined #ruby
codefriar [codefriar!~codefriar@cpe-098-026-012-134.nc.res.rr.com] has joined #ruby
LittleBill902 [LittleBill902!smith@c-71-197-103-184.hsd1.ca.comcast.net] has joined #ruby
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
randym [randym!~randym@EM114-48-128-197.pool.e-mobile.ne.jp] has joined #ruby
jergason [jergason!~jergason@c-67-161-248-217.hsd1.ut.comcast.net] has joined #ruby
Brozilla [Brozilla!~Brozilla@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
p0y [p0y!~p0y@121.96.188.176] has joined #ruby
mikepack_ [mikepack_!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
LittleBill902 [LittleBill902!smith@c-71-197-103-184.hsd1.ca.comcast.net] has joined #ruby
roaminghorse [roaminghorse!~roamingho@210.22.86.58] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
p0y_ [p0y_!~p0y@125.212.56.135] has joined #ruby
davidcelis [davidcelis!~david@70-89-180-6-smc-or.hfc.comcastbusiness.net] has joined #ruby
mikepack_ [mikepack_!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
amerine [amerine!~mturner@67.204.184.82] has joined #ruby
ontehfritz [ontehfritz!~ontehfrit@CPE0020a6543eed-CM0026f399f8dd.cpe.net.cable.rogers.com] has joined #ruby
sarmiena_ [sarmiena_!~aldosarmi@2602:306:32e6:ab90:581e:3749:1b91:cfb9] has joined #ruby
<sarmiena_> whoa: (a = []) << true ? 'foo' : 'bar' …. results in a==[true]
wilmoore [wilmoore!~wilmoore@c-67-190-17-108.hsd1.co.comcast.net] has joined #ruby
<sarmiena_> totally see it now, though
<codefriar> is it possible to force the mysql2 gem to build it's .bundle statically ?
LittleBill902 [LittleBill902!smith@c-71-197-103-184.hsd1.ca.comcast.net] has joined #ruby
bier [bier!~bier@p57999BC6.dip.t-dialin.net] has joined #ruby
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
Knodi [Knodi!~Knodi@c-68-43-246-216.hsd1.mi.comcast.net] has joined #ruby
brownies- [brownies-!~brownies@216.38.150.34] has joined #ruby
mikepack_ [mikepack_!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
looopy [looopy!~looopy@pool-151-200-236-181.washdc.btas.verizon.net] has joined #ruby
p0y [p0y!~p0y@121.96.188.176] has joined #ruby
colint_ [colint_!~ColinT@69-11-97-130.regn.static.sasknet.sk.ca] has joined #ruby
austinbv [austinbv!~austinbv@235-187.96-97.tampabay.res.rr.com] has joined #ruby
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-39-170.telstraclear.net] has joined #ruby
rickmasta [rickmasta!~rickmasta@pool-108-21-213-102.nycmny.fios.verizon.net] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
31NAAF8RG [31NAAF8RG!~replore@203.152.213.161.static.zoot.jp] has joined #ruby
emmanuel_ [emmanuel_!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
pen [pen!~pen@140.112.30.131] has joined #ruby
sarkis [sarkis!~sarkis@unaffiliated/sako] has joined #ruby
friskd [friskd!~friskd@wsip-184-180-179-2.sb.sd.cox.net] has joined #ruby
sorin [sorin!~sorin@66-168-187-62.dhcp.gwnt.ga.charter.com] has joined #ruby
NinoScript [NinoScript!~Adium@pc-55-124-83-200.cm.vtr.net] has joined #ruby
LittleBill902_ [LittleBill902_!~smith@c-71-197-103-184.hsd1.ca.comcast.net] has joined #ruby
NinoScript [NinoScript!~Adium@pc-55-124-83-200.cm.vtr.net] has quit [#ruby]
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
mads- [mads-!~mads@2808ds1-by.0.fullrate.dk] has quit [#ruby]
cpruitt [cpruitt!~cpruitt@190-186.126-70.tampabay.res.rr.com] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
piglittlepuffpuf [piglittlepuffpuf!~piglittle@118.82.185.158] has joined #ruby
libertyprime [libertyprime!~libertypr@182.236.125.102] has joined #ruby
LittleBill902_ [LittleBill902_!smith@c-71-197-103-184.hsd1.ca.comcast.net] has joined #ruby
amacgregor_ [amacgregor_!~amacgrego@CPE00222dcb0a53-CM00222dcb0a4f.cpe.net.cable.rogers.com] has joined #ruby
ontehfritz [ontehfritz!~ontehfrit@CPE0020a6543eed-CM0026f399f8dd.cpe.net.cable.rogers.com] has joined #ruby
colint [colint!~ColinT@69-11-97-130.regn.static.sasknet.sk.ca] has joined #ruby
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
LittleBill902 [LittleBill902!smith@c-76-105-23-211.hsd1.ca.comcast.net] has joined #ruby
sarmiena_ [sarmiena_!~aldosarmi@ip68-5-217-198.oc.oc.cox.net] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
yekta [yekta!~yekta@r74-192-21-77.bcstcmta01.clsttx.tl.dh.suddenlink.net] has joined #ruby
radic [radic!~radic@dslb-178-002-234-050.pools.arcor-ip.net] has joined #ruby
xnm [xnm!~ncolgan@c-76-17-197-242.hsd1.mn.comcast.net] has joined #ruby
nyuszika7h [nyuszika7h!nyuszika7h@2001:4ba0:cafe:4d8::1] has joined #ruby
Nanuq [Nanuq!~nanuq@cave45.ecks.ca] has joined #ruby
kawa_xxx [kawa_xxx!~kawa_xxx@FLH9Aan096.tky.mesh.ad.jp] has joined #ruby
Guest76161 [Guest76161!~awesome@212.62.202.84.customer.cdi.no] has joined #ruby
bjorkintosh [bjorkintosh!~bjork@ip70-189-66-194.ok.ok.cox.net] has joined #ruby
daidoji [daidoji!~daidoji@108-206-96-25.lightspeed.okldca.sbcglobal.net] has joined #ruby
verdammelt [verdammelt!~user@c-65-96-170-188.hsd1.ma.comcast.net] has joined #ruby
verdammelt [verdammelt!~user@c-65-96-170-188.hsd1.ma.comcast.net] has joined #ruby
Alex___ [Alex___!~textual@pool-108-46-219-62.nycmny.fios.verizon.net] has joined #ruby
verdammelt [verdammelt!~user@c-65-96-170-188.hsd1.ma.comcast.net] has quit [#ruby]
Alex___ [Alex___!~textual@pool-108-46-219-62.nycmny.fios.verizon.net] has quit [#ruby]
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby
Mohan [Mohan!~nixh0st@cpc1-slou1-2-0-cust65.haye.cable.virginmedia.com] has joined #ruby
Mohan [Mohan!~nixh0st@unaffiliated/mohan] has joined #ruby
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby
x0F_ [x0F_!~x0F@unaffiliated/x0f] has joined #ruby
aresnick [aresnick!~aresnick@pool-74-104-35-77.bstnma.east.verizon.net] has joined #ruby
LittleBill902 [LittleBill902!smith@c-76-105-23-211.hsd1.ca.comcast.net] has joined #ruby
kenperkins [kenperkins!~textual@50-47-18-37.evrt.wa.frontiernet.net] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
sarmiena_ [sarmiena_!~aldosarmi@ip68-5-217-198.oc.oc.cox.net] has joined #ruby
austinbv [austinbv!~austinbv@235-187.96-97.tampabay.res.rr.com] has joined #ruby
jergason [jergason!~jergason@c-67-161-248-217.hsd1.ut.comcast.net] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@174-27-214-73.slkc.qwest.net] has joined #ruby
sorin [sorin!~sorin@66-168-187-62.dhcp.gwnt.ga.charter.com] has joined #ruby
hemanth [hemanth!~hemanth@121.244.159.130] has joined #ruby
Mohan [Mohan!~nixh0st@cpc1-slou1-2-0-cust65.haye.cable.virginmedia.com] has joined #ruby
Mohan [Mohan!~nixh0st@unaffiliated/mohan] has joined #ruby
wmoxam [wmoxam!~wmoxam@206-248-153-55.dsl.teksavvy.com] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-35-43.telstraclear.net] has joined #ruby
LittleBill902_ [LittleBill902_!smith@c-71-197-103-184.hsd1.ca.comcast.net] has joined #ruby
Brozilla [Brozilla!~Brozilla@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
hadees [hadees!~hadees@72-48-91-73.dyn.grandenetworks.net] has joined #ruby
Aaaarg_ [Aaaarg_!~Arthur@121-74-35-43.telstraclear.net] has joined #ruby
rippa [rippa!~splitta@85.158.54.234] has joined #ruby
amacgregor_ [amacgregor_!~amacgrego@CPE00222dcb0a53-CM00222dcb0a4f.cpe.net.cable.rogers.com] has joined #ruby
bratsche_ [bratsche_!~bratsche@cpe-76-187-9-64.tx.res.rr.com] has joined #ruby
eywu [eywu!~Adium@97-93-99-217.static.mtpk.ca.charter.com] has joined #ruby
dbgster [dbgster!~dbgster@CPE0013f7b7170c-CM0013f7b71708.cpe.net.cable.rogers.com] has joined #ruby
sdwrage [sdwrage!~sdwrage@cpe-184-57-123-50.columbus.res.rr.com] has joined #ruby
kenperkins [kenperkins!~textual@50-47-18-37.evrt.wa.frontiernet.net] has joined #ruby
apok [apok!~apok@96.24.67.22] has joined #ruby
namidark [namidark!~namidark@c-98-230-1-143.hsd1.fl.comcast.net] has joined #ruby
p0y_ [p0y_!~p0y@125.212.56.135] has joined #ruby
<bjorkintosh> is every rubyist asleep?
<piglittlepuffpuf> bjorkintosh: no u
<piglittlepuffpuf> bjorkintosh: LOL
<bjorkintosh> no.
<piglittlepuffpuf> bjorkintosh: im making love to 3 icelandic girls at once while i type do u poetry from my fingers
Aaaarg [Aaaarg!~Arthur@121-74-36-0.telstraclear.net] has joined #ruby
<bjorkintosh> of course.
<bjorkintosh> do you know anything about authlogic?
nonotza [nonotza!~nonotza@cpe-72-225-173-7.nyc.res.rr.com] has joined #ruby
<piglittlepuffpuf> bjorkintosh: yes, he was my brother
<bjorkintosh> what happened to him?
<piglittlepuffpuf> bjorkintosh: he died in a field
_kinderman [_kinderman!~kinderman@c-98-223-146-252.hsd1.in.comcast.net] has joined #ruby
<bjorkintosh> okay.
<piglittlepuffpuf> bjorkintosh: do u like rap music
<bjorkintosh> not very much.
tatsuya_o [tatsuya_o!~tatsuya_o@EM114-48-111-186.pool.e-mobile.ne.jp] has joined #ruby
<piglittlepuffpuf> bjorkintosh: what kind of music do you like
<bjorkintosh> <--
bwright [bwright!~bwright@c122-106-254-100.belrs3.nsw.optusnet.com.au] has joined #ruby
joallard [joallard!~jon@modemcable163.197-21-96.mc.videotron.ca] has joined #ruby
<joallard> How do I create an instance while being inside a class method?
<piglittlepuffpuf> joallard: ill tell u i geuss
<joallard> Kind of like 'def initialize' but not initialize
io_syl [io_syl!~io_syl@adsl-69-105-118-125.dsl.pltn13.pacbell.net] has joined #ruby
io_syl [io_syl!~io_syl@unaffiliated/steph021] has joined #ruby
<rippa> joallard: self.new?
<piglittlepuffpuf> rippa: hello!
<rippa> hi
<joallard> rippa: I can't get it with self.new
<joallard> You know how you can define your own initialize method?
<joallard> How can I define such a method, but that wouldn't be called initialize but self.create_custom
<rippa> def self.create_custom; new; end
<piglittlepuffpuf> rippa: you did that well
<joallard> rippa: okay, how do I do that if I want to define parameters after I've newed my object
<rippa> you take that new object and define parameters
<rippa> then return it
<joallard> I mean instance variables
<rippa> though initialize will still be called first
<joallard> Can I define instance variables even with no writers?
<piglittlepuffpuf> rippa: ^ that's using the new pry 'gist -i' ability, do u like it
<rippa> yeah
<rippa> joallard: set_instance_var
<rippa> I think
<rippa> or not
<rippa> joallard: instance_variable_set
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
<joallard> Yeah lemme try
nanoyak [nanoyak!~nanoyak@adsl-69-110-31-236.dsl.pltn13.pacbell.net] has joined #ruby
<joallard> Not quite I think
<joallard> I think you can see what I'm trying to do
<rippa> joallard: new.instance_variable_set("@name", "derp")
<joallard> Wow that's ugly
<rippa> you bet
kingofspain [kingofspain!~king@108-215-232-154.lightspeed.hstntx.sbcglobal.net] has joined #ruby
<piglittlepuffpuf> joallard: why not just do: new.tap { |v| v.instance_eval { @name = "derp" } }
<joallard> Wow this makes me sad
<joallard> I think I'll stick with o = new; @name = :derp; o;
<joallard> err o.name = :derp;
<piglittlepuffpuf> joallard: you never set you had setters
<piglittlepuffpuf> said*
Seisatsu [Seisatsu!~seisatsu@2001:c08:3700:ffff::53b] has joined #ruby
<joallard> I'm not supposed to, indeed
<piglittlepuffpuf> joallard: also, what kind of syntax did you *hope* for ?
<joallard> Fair question
<joallard> Something like new; @name = :derp; return self;
<piglittlepuffpuf> joallard: cos you've obviously against doing it on two lines?
<piglittlepuffpuf> brb
<rippa> @name would refer to self
<rippa> unless you do instance_eval
<joallard> Yeah, I know it doesn't work, that's just what I was hoping for
<piglittlepuffpuf> joallard: if Object#new accepted a block u could do it
<piglittlepuffpuf> joallard: new { @name = :derp }
root_ninja [root_ninja!~Salmon-fr@cl-164.wlg-01.nz.sixxs.net] has joined #ruby
root_ninja [root_ninja!~Salmon-fr@unaffiliated/root-ninja/x-7047552] has joined #ruby
<joallard> Oooh hello sexy
<piglittlepuffpuf> joallard: you can do that if the receiver is a Module, but not with regular objects, dont ask me why
<joallard> Damn
<piglittlepuffpuf> joallard: actually
Samoi [Samoi!~Salmon-fr@unaffiliated/root-ninja/x-7047552] has joined #ruby
<piglittlepuffpuf> joallard: what i said didnt make sense, you can define your initialize method right?
<joallard> Yes
<piglittlepuffpuf> joallard: you could just define it as this: def initialize(&block) instance_eval(&block) end
<piglittlepuffpuf> joallard: then you can do that: new { @name = :derp }
<joallard> evals make me scared
Araxia [Araxia!~Araxia@c-24-22-63-1.hsd1.or.comcast.net] has joined #ruby
<joallard> Thanks to javascript
<piglittlepuffpuf> joallard: no, instance_eval is fine
<piglittlepuffpuf> joallard: it's not a String-based eval, it's not considered evil in ruby
<piglittlepuffpuf> joallard: in fact instance_eval is part of the reason ruby APIs are so sexy
tomzx_ [tomzx_!~tomzx@dsl-216-221-32-204.aei.ca] has joined #ruby
<joallard> This makes me think of the non-existent method I was looking for some time ago (http://stackoverflow.com/q/7582222/720164)
<joallard> Where you have to hack in your own core methods
<joallard> But I don't know if I can mess with initialize in a Rails/AR object
pencilcheck [pencilcheck!~pen@140.112.30.131] has joined #ruby
<piglittlepuffpuf> joallard: "string".reverse.upcase.to_sym.to_proc.call(Object)
<joallard> My point was that a method that returns the block would be nice in Ruby
jonathan___ [jonathan___!~jonathan@121.33.101.79] has joined #ruby
<joallard> send was a mere example
<joallard> But great solution nevertheless
<jonathan___> Hi all, new in Ruby and I've problems among my require ... The logic and tests with Rspec work fine and now I want just to write a small Ruby script to do some examples
drd2 [drd2!53a0482e@gateway/web/freenode/ip.83.160.72.46] has joined #ruby
<jonathan___> Here the structure of my project
<jonathan___> I'm trying to write a Ruby script into the bin folder
<jonathan___> here the code of the trains_app.rb into the bin folder https://gist.github.com/1479959
<jonathan___> so to run it it's "ruby trains_app.rb"
<piglittlepuffpuf> jonathan___: sorry i never liked trains
<jonathan___> and I get this error https://gist.github.com/1479962
maletor [maletor!~maletor@c-69-181-28-195.hsd1.ca.comcast.net] has joined #ruby
mxweas_ [mxweas_!~max@c-71-226-112-145.hsd1.az.comcast.net] has joined #ruby
<joallard> Anyway, thanks pig, I think I'm going to use ARBase.create, way simpler
<jonathan___> the graph.rb requires the trains_helper.rb but it works nice with RSpec
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
brownies- [brownies-!~brownies@216.38.150.34] has joined #ruby
<jonathan___> ok fixed by using some require_relative in the correct places
<jonathan___> but not sure it was the rubiest way
nanoyak [nanoyak!~nanoyak@adsl-69-110-31-236.dsl.pltn13.pacbell.net] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
pen_ [pen_!~pen@140.112.30.131] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@113x33x226x118.ap113.ftth.ucom.ne.jp] has joined #ruby
kawa_xxx [kawa_xxx!~kawa_xxx@FLH9Aan096.tky.mesh.ad.jp] has joined #ruby
Jrz [Jrz!~jrz@d152222.upc-d.chello.nl] has joined #ruby
tonini [tonini!~zastav@194.230.82.98] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@174-27-214-73.slkc.qwest.net] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has quit [#ruby]
randym [randym!~randym@EM114-48-18-54.pool.e-mobile.ne.jp] has joined #ruby
Mohan [Mohan!~nixh0st@cpc1-slou1-2-0-cust65.haye.cable.virginmedia.com] has joined #ruby
Mohan [Mohan!~nixh0st@unaffiliated/mohan] has joined #ruby
luckman212 [luckman212!~irc@pool-108-41-8-176.nycmny.fios.verizon.net] has joined #ruby
skinnymuch [skinnymuch!~skinnymuc@c-68-36-123-133.hsd1.nj.comcast.net] has joined #ruby
tyman [tyman!~tyman@173-12-219-189-Fresno.hfc.comcastbusiness.net] has joined #ruby
symb0l [symb0l!~symb0l@c-50-131-187-183.hsd1.ca.comcast.net] has joined #ruby
aleksi [aleksi!~aleksi@85.235.191.82] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-47-149.telstraclear.net] has joined #ruby
burgestrand [burgestrand!~burgestra@h-163-174.a155.priv.bahnhof.se] has joined #ruby
Mohan [Mohan!~nixh0st@unaffiliated/mohan] has joined #ruby
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby
yxhuvud [yxhuvud!mongo@h-17-224.a149.priv.bahnhof.se] has joined #ruby
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
abstrusenick [abstrusenick!~abstrusen@bb119-74-130-142.singnet.com.sg] has joined #ruby
hiteca [hiteca!~hiteca@121.119.247.177] has joined #ruby
p0y [p0y!~p0y@121.96.188.176] has joined #ruby
davidcelis [davidcelis!~david@c-76-115-58-79.hsd1.or.comcast.net] has joined #ruby
Mohan [Mohan!~nixh0st@cpc1-slou1-2-0-cust65.haye.cable.virginmedia.com] has joined #ruby
Mohan [Mohan!~nixh0st@unaffiliated/mohan] has joined #ruby
xpot [xpot!~xpot@166-70-100-198.ip.xmission.com] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-32-22.telstraclear.net] has joined #ruby
Amirh [Amirh!~amir@2.181.17.191] has joined #ruby
mxweas_ [mxweas_!~max@c-71-226-112-145.hsd1.az.comcast.net] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-40-144.telstraclear.net] has joined #ruby
abstrusenick_ [abstrusenick_!~abstrusen@bb119-74-130-142.singnet.com.sg] has joined #ruby
p0y [p0y!~p0y@125.212.56.135] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@174-27-214-73.slkc.qwest.net] has joined #ruby
Spockz [Spockz!~Spockz@21pc198.sshunet.nl] has joined #ruby
saschaheylik [saschaheylik!~sascha@80-121-2-246.adsl.highway.telekom.at] has joined #ruby
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@174-27-214-73.slkc.qwest.net] has joined #ruby
wilmoore [wilmoore!~wilmoore@c-67-190-17-108.hsd1.co.comcast.net] has joined #ruby
root____1 [root____1!~root@li370-225.members.linode.com] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-45-228.telstraclear.net] has joined #ruby
sonkei [sonkei!~sonkei@d14-69-26-171.try.wideopenwest.com] has joined #ruby
jbpros [jbpros!~jbpros@87.66.47.159] has joined #ruby
azbarcea___ [azbarcea___!~quassel@79.118.7.231] has joined #ruby
danneu [danneu!~danneu@li370-225.members.linode.com] has joined #ruby
mafolz [mafolz!~mafolz@dhcp50-203.start.uni-saarland.de] has joined #ruby
danneu [danneu!~danneu@li370-225.members.linode.com] has joined #ruby
n8ji [n8ji!~n8ji@c-76-105-192-7.hsd1.or.comcast.net] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-33-77.telstraclear.net] has joined #ruby
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-33-77.telstraclear.net] has joined #ruby
dannybtran [dannybtran!~digisyndi@12.198.28.2] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@174-27-214-73.slkc.qwest.net] has joined #ruby
Pip [Pip!~Pip@host-192-146-66-217.spbmts.ru] has joined #ruby
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
rpowell [rpowell!~rpowell@CPE-58-168-99-83.lns7.ken.bigpond.net.au] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-41-38.telstraclear.net] has joined #ruby
axl_ [axl_!~axl@216-43-114-19.ip.mcleodusa.net] has joined #ruby
michaelh [michaelh!~Michael@c-98-213-112-209.hsd1.il.comcast.net] has joined #ruby
p1d [p1d!~p1d@ns1.vonaffenfels.de] has joined #ruby
eko [eko!~eko@unaffiliated/eko] has joined #ruby
MAD [MAD!~MAD@mail.11labo.net] has joined #ruby
pi3r [pi3r!~pi3r@LSt-Amand-152-32-39-189.w80-11.abo.wanadoo.fr] has joined #ruby
heftig [heftig!~Jan@archlinux/developer/heftig] has joined #ruby
denysonique [denysonique!~foobar@static.88-198-98-195.clients.your-server.de] has joined #ruby
denysonique [denysonique!~foobar@unaffiliated/dennisonicc] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-205-136.netcologne.de] has joined #ruby
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-47-9.telstraclear.net] has joined #ruby
azbarcea__ [azbarcea__!~quassel@79.118.7.231] has joined #ruby
EncRyptO [EncRyptO!~encrypto@unaffiliated/encrypto] has joined #ruby
p1d [p1d!~p1d@ns1.vonaffenfels.de] has joined #ruby
zommi [zommi!quassel@nat/ibm/x-lwxxrwhpkslqdjsp] has joined #ruby
bosphorus [bosphorus!~bosphorus@81.214.127.71] has joined #ruby
Aaaarg_ [Aaaarg_!~Arthur@121-74-35-149.telstraclear.net] has joined #ruby
Spockz [Spockz!~Spockz@131.211.234.134] has joined #ruby
chubba [chubba!chubba@cpc5-dund11-2-0-cust410.sgyl.cable.virginmedia.com] has joined #ruby
ikaros [ikaros!~ikaros@dslb-084-059-073-057.pools.arcor-ip.net] has joined #ruby
helllen [helllen!~helllen@91.102.241.62] has joined #ruby
<helllen> helllo
<helllen> I have s string variable with a content similar than "5 days 15 hours 18 minutes 03 seconds"
<helllen> I would like to ignore the seconds
<helllen> how could I do it?
igotnolegs [igotnolegs!~igotnoleg@174-27-214-73.slkc.qwest.net] has joined #ruby
frerich [frerich!~frerich@mail.froglogic.com] has joined #ruby
frerich [frerich!~frerich@kde/raabe] has joined #ruby
Jrz [Jrz!~jrz@87.239.184.141] has joined #ruby
<GreaseMonkey> helllen: try this: s.gsub(/.?[0-9]{2} seconds?/,"")
<GreaseMonkey> maybe that would be {1,2}
looopy [looopy!~looopy@pool-151-200-236-181.washdc.btas.verizon.net] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-39-246.telstraclear.net] has joined #ruby
leehambley [leehambley!~leehamble@pd956c64f.dip0.t-ipconnect.de] has joined #ruby
danneu [danneu!~danneu@li370-225.members.linode.com] has quit [#ruby]
maletor [maletor!~maletor@c-69-181-28-195.hsd1.ca.comcast.net] has joined #ruby
Sigma00 [Sigma00!~freenode@thankyouforhelpingushelpyouhelpusall.net] has joined #ruby
burgestrand [burgestrand!~burgestra@62.65.124.23] has joined #ruby
Helius [Helius!~Adium@212.31.227.18] has joined #ruby
samxor [samxor!samxor@70.32.34.103] has joined #ruby
ph^ [ph^!~ph^@79.135.7.171] has joined #ruby
krz [krz!~foobar@unaffiliated/krz] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-47-124.telstraclear.net] has joined #ruby
looopy [looopy!~looopy@pool-151-200-236-181.washdc.btas.verizon.net] has joined #ruby
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
Manhose [Manhose!~Manhose@2001:690:2200:9a77:7c6b:3fbf:8113:82e7] has joined #ruby
Helius1 [Helius1!~Adium@212.31.227.18] has joined #ruby
Corren [Corren!~textual@50-47-18-37.evrt.wa.frontiernet.net] has joined #ruby
xec [xec!~xec@2a00:10b0:1:1002:5ab0:35ff:fef8:6a01] has joined #ruby
batlock666 [batlock666!~quassel@bvderbau.ugent.be] has joined #ruby
sejo [sejo!~SeJo@exherbo/developer/sejo] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-33-243.telstraclear.net] has joined #ruby
Ammar01 [Ammar01!~hassaa10@gatej.thls.bbc.co.uk] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
nicoulaj [nicoulaj!~nicoulaj@V10K1.bull.fr] has joined #ruby
Helius [Helius!~Adium@212.31.227.18] has joined #ruby
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
dr_bob [dr_bob!c100f615@gateway/web/freenode/ip.193.0.246.21] has joined #ruby
pen [pen!~pen@140.112.30.131] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-37-133.telstraclear.net] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
Spockz [Spockz!~Spockz@131.211.234.134] has joined #ruby
mxweas_ [mxweas_!~max@c-71-226-112-145.hsd1.az.comcast.net] has joined #ruby
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
ikaros [ikaros!~ikaros@studpool-wlan-74-92.fs.fbi.h-da.de] has joined #ruby
musee [musee!~musee@unaffiliated/musee] has joined #ruby
dazoakley [dazoakley!~dazoakley@hocuspokus.vm.bytemark.co.uk] has joined #ruby
pencilcheck [pencilcheck!~pen@dhcp3.csie.ntu.edu.tw] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-40-158.telstraclear.net] has joined #ruby
nari [nari!~nari@2001:268:306:3:6680:99ff:fe23:576c] has joined #ruby
stoffus [stoffus!~stoffus@2001:9b0:1:dead:129a:ddff:fe58:6835] has joined #ruby
james_cotterill [james_cotterill!~james_cot@89.238.149.34] has joined #ruby
Manhose_ [Manhose_!~Manhose@193.136.33.133] has joined #ruby
patant [patant!~patant@212.112.186.180] has joined #ruby
niklasb [niklasb!~codeslay0@p5B3109DE.dip0.t-ipconnect.de] has joined #ruby
helllen [helllen!~helllen@91.102.241.62] has quit ["Saliendo"]
bastilian [bastilian!~bastilian@chello213047077012.23.11.vie.surfer.at] has joined #ruby
ph^ [ph^!~ph^@79.135.7.171] has joined #ruby
roadze [roadze!~roadze@119.224.137.97] has joined #ruby
nari [nari!~nari@raichu.3in.ne.jp] has joined #ruby
kW [kW!~kW@port-92-206-56-8.dynamic.qsc.de] has joined #ruby
kW [kW!~kW@unaffiliated/kw] has joined #ruby
Skaag [Skaag!~skaag@81.26.147.34] has joined #ruby
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-46-181.telstraclear.net] has joined #ruby
VoiDeT [VoiDeT!~voidet@203.219.227.162] has joined #ruby
Spockz [Spockz!~Spockz@131.211.234.134] has joined #ruby
hurikhan|Work [hurikhan|Work!~kakra@82-198-195-142.briteline.de] has joined #ruby
workmad3 [workmad3!~workmad3@vpn153.its.manchester.ac.uk] has joined #ruby
Aaaarg_ [Aaaarg_!~Arthur@121-74-47-111.telstraclear.net] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
wedtm [wedtm!~wedtm@173-12-163-78-oregon.hfc.comcastbusiness.net] has joined #ruby
EddieS [EddieS!~ed@212.59.167.161] has joined #ruby
cousine [cousine!~cousine@196.221.61.89] has joined #ruby
Pip_ [Pip_!~Pip@unaffiliated/pip] has joined #ruby
p0y [p0y!~p0y@125.212.56.135] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
jgrimes_ [jgrimes_!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
encrypto_ [encrypto_!~encrypto@adsl-70-143-66-13.dsl.pltn13.sbcglobal.net] has joined #ruby
EncRyptO [EncRyptO!~encrypto@unaffiliated/encrypto] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
EncRyptO [EncRyptO!~encrypto@unaffiliated/encrypto] has joined #ruby
jgrimes_ [jgrimes_!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
manizzle [manizzle!~manizzle@adsl-99-105-54-182.dsl.pltn13.sbcglobal.net] has joined #ruby
Paladin [Paladin!~paladin@p3m/member/Paladin] has joined #ruby
fermo [fermo!~fermo@ppp-214-24.26-151.libero.it] has joined #ruby
pestouille [pestouille!~adrien@LAubervilliers-151-13-7-1.w217-128.abo.wanadoo.fr] has joined #ruby
clockwize [clockwize!~clockwize@81.19.48.130] has joined #ruby
speggey_ [speggey_!~speggey@62.95.122.142] has joined #ruby
pen [pen!~pen@140.112.30.131] has joined #ruby
josephwilk [josephwilk!~josephwil@109.231.237.58] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
ph^_ [ph^_!~ph^@79.135.7.162] has joined #ruby
VoiDeT [VoiDeT!~voidet@203.219.227.162] has quit [#ruby]
alindeman [alindeman!~adml@freenode/senior-staff-emeritus/alindeman] has joined #ruby
jgrimes_ [jgrimes_!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
p0y [p0y!~p0y@125.212.56.135] has joined #ruby
Manhose [Manhose!~Manhose@193.136.33.133] has joined #ruby
mxweas_ [mxweas_!~max@c-71-226-112-145.hsd1.az.comcast.net] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
tvw [tvw!~tv@212.79.9.150] has joined #ruby
chrismcg [chrismcg!~chrismcg@pdpc/supporter/active/chrismcg] has joined #ruby
BrianE [BrianE!~brian@188-220-10-235.zone11.bethere.co.uk] has joined #ruby
brian [brian!~brian@188-220-10-235.zone11.bethere.co.uk] has joined #ruby
kirun [kirun!~kirun@78-86-154-194.zone2.bethere.co.uk] has joined #ruby
banjara [banjara!~Adium@unaffiliated/banjara] has joined #ruby
banjara [banjara!~Adium@unaffiliated/banjara] has quit [#ruby]
Brozilla [Brozilla!~Brozilla@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
andrewpthorp [andrewpthorp!~andrewpth@c-98-244-88-92.hsd1.va.comcast.net] has joined #ruby
closedbracket [closedbracket!~closedbra@cpe-098-024-125-117.carolina.res.rr.com] has joined #ruby
andrewpthorp [andrewpthorp!~andrewpth@c-98-244-88-92.hsd1.va.comcast.net] has joined #ruby
norex [norex!~quassel@41-135-90-128.dsl.mweb.co.za] has joined #ruby
andrewpthorp [andrewpthorp!~andrewpth@c-98-244-88-92.hsd1.va.comcast.net] has joined #ruby
andrew_ [andrew_!~andrewpth@c-98-244-88-92.hsd1.va.comcast.net] has joined #ruby
iDespera` [iDespera`!~user@120.85.227.6] has joined #ruby
hukl [hukl!~hukl@pdpc/supporter/professional/hukl] has joined #ruby
andrewpthorp [andrewpthorp!~andrewpth@c-98-244-88-92.hsd1.va.comcast.net] has joined #ruby
alindeman [alindeman!~adml@freenode/senior-staff-emeritus/alindeman] has joined #ruby
kawa_xxx [kawa_xxx!~kawa_xxx@d307ba3b.t-net.ne.jp] has joined #ruby
Peter-W [Peter-W!user@brighton.ostc.com] has joined #ruby
andrewpthorp [andrewpthorp!~andrewpth@c-98-244-88-92.hsd1.va.comcast.net] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
jadoe [jadoe!~jadoe@84.200.211.204] has quit [#ruby]
andrewpthorp [andrewpthorp!~andrewpth@c-98-244-88-92.hsd1.va.comcast.net] has joined #ruby
andrewpthorp [andrewpthorp!~andrewpth@c-98-244-88-92.hsd1.va.comcast.net] has joined #ruby
andrewpthorp [andrewpthorp!~andrewpth@c-98-244-88-92.hsd1.va.comcast.net] has joined #ruby
Sliker [Sliker!~ponies@117.163.pn.adsl.brightview.com] has joined #ruby
NinoScript [NinoScript!~Adium@pc-55-124-83-200.cm.vtr.net] has joined #ruby
j3r0m3 [j3r0m3!~j3r0m3@50-0-128-33.dsl.dynamic.sonic.net] has joined #ruby
atmosx [atmosx!~atmosx@191.116.broadband5.iol.cz] has joined #ruby
<atmosx> good morning
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
mksm [mksm!mksm@201.20.236.65.user.ajato.com.br] has joined #ruby
andrewpthorp [andrewpthorp!~andrewpth@c-98-244-88-92.hsd1.va.comcast.net] has joined #ruby
hinogi [hinogi!~Stefan@mnsr-4db0b0c8.pool.mediaWays.net] has joined #ruby
hinogi [hinogi!~Stefan@facade/contributor/hinogi] has joined #ruby
WhiteHorse [WhiteHorse!~WhiteHors@201.208.150.8] has joined #ruby
dr_bob [dr_bob!c100f615@gateway/web/freenode/ip.193.0.246.21] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
codefriar [codefriar!~codefriar@cpe-098-026-012-134.nc.res.rr.com] has joined #ruby
xissburg [xissburg!~xissburg@189.102.48.152] has joined #ruby
tvw [tvw!~tv@212.79.9.150] has joined #ruby
conor___ [conor___!~conor@88-97-244-230.dsl.zen.co.uk] has joined #ruby
t-mart [t-mart!~tim@c-76-97-7-168.hsd1.ga.comcast.net] has joined #ruby
michael_mbp [michael_mbp!~Marin@112.134.195.218] has joined #ruby
jgrimes_ [jgrimes_!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
senny [senny!~senny@edge.garaio.com] has joined #ruby
eugynon [eugynon!~terje@236.80-202-126.nextgentel.com] has joined #ruby
kawa_xxx [kawa_xxx!~kawa_xxx@d307ba3b.t-net.ne.jp] has joined #ruby
TheShadowFog [TheShadowFog!~TheShadow@ool-1826fa3a.dyn.optonline.net] has joined #ruby
xlogic [xlogic!~Adium@170.115.54.77.rev.vodafone.pt] has joined #ruby
sepp2k [sepp2k!~sexy@g224097220.adsl.alicedsl.de] has joined #ruby
ephemerian [ephemerian!~ian@82-69-1-248.dsl.in-addr.zen.co.uk] has joined #ruby
HomeBrand [HomeBrand!~sean@115-64-178-91.static.tpgi.com.au] has joined #ruby
abstrusenick [abstrusenick!~abstrusen@bb116-15-213-210.singnet.com.sg] has joined #ruby
nari [nari!~nari@p62e324.totrnt01.ap.so-net.ne.jp] has joined #ruby
kedare [kedare!~kedare@scuderia.internet-fr.net] has joined #ruby
punkrawkR [punkrawkR!~freddiebo@h-9-122.a328.priv.bahnhof.se] has joined #ruby
provideal [provideal!~hornp@p4FFF85E5.dip.t-dialin.net] has joined #ruby
<provideal> is there -- by default -- something like send_if_respond_to in ruby? Somewhat in analogy to try...
tobiassvn [tobiassvn!u4832@gateway/web/irccloud.com/x-cyfflvqqphilamio] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
<tar_> I don't believe so
<shevy> provideal probably not as a standalone method but you could use send(:foo) if foo.respond_to? :bla or put that into a method you defined?
<provideal> strange... seems like a somewhat natural question...
<provideal> sure
<shevy> though I guess the answer to your question must be no :)
<shevy> at least I couldn't think of a ready-made solution for that case
<provideal> ok, thanxalot!
catphish [catphish!~catphish@2001:9d8:2005:11:222:15ff:fe88:aae2] has joined #ruby
DMKE [DMKE!~DMKE@pdpc/supporter/student/dmke] has joined #ruby
<catphish> is there a method on a string to create an array by using known field sizes?
andreime [andreime!~andrei-ci@82.79.96.20] has joined #ruby
<catphish> oh, unpack will work actually
<catphish> "12345678".unpack('a2a3a4')
<catphish> since it's ascii-only i'm happy with that
Squarepy [Squarepy!~Squarepy@wcw-staff-214-112.wireless.uva.nl] has joined #ruby
<catphish> though it would be nice to see a text-friendly version of that
Squarepy [Squarepy!~Squarepy@unaffiliated/squarepy] has joined #ruby
ramusara [ramusara!~ramusara@220.156.210.236.user.e-catv.ne.jp] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-205-136.netcologne.de] has joined #ruby
ikaros [ikaros!~ikaros@studpool-wlan-74-92.fs.fbi.h-da.de] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
iamjarvo [iamjarvo!~Adium@c-71-230-13-201.hsd1.nj.comcast.net] has joined #ruby
Helius [Helius!~Adium@212.31.227.18] has joined #ruby
banjara1 [banjara1!~Adium@123.238.102.74] has joined #ruby
Manhose [Manhose!~Manhose@193.136.33.133] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-46-152.telstraclear.net] has joined #ruby
rickmasta [rickmasta!~rickmasta@pool-108-21-213-102.nycmny.fios.verizon.net] has joined #ruby
cyri_ [cyri_!~cyri_@236.200.72.86.rev.sfr.net] has joined #ruby
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
yfeldblum [yfeldblum!~Jay@c-68-34-107-252.hsd1.md.comcast.net] has joined #ruby
cjs226 [cjs226!~cjs226@rrcs-71-40-79-154.sw.biz.rr.com] has joined #ruby
abstrusenick [abstrusenick!~abstrusen@207.204.238.118] has joined #ruby
<shevy> hmm is there a way to download a gem without installing it at the same time?
`brendan [`brendan!~b@66-208-246-34-ubr02b-waldlk01-mi.hfc.comcastbusiness.net] has joined #ruby
<shevy> nevermind
<shevy> "gem install win32console" failed on linux logically, but it downloaded the gem :D
abstrusenick [abstrusenick!~abstrusen@bb116-15-213-210.singnet.com.sg] has joined #ruby
dr_bob [dr_bob!c100f615@gateway/web/freenode/ip.193.0.246.21] has joined #ruby
<`brendan> install it via wine :)
Aaaarg [Aaaarg!~Arthur@121-74-47-17.telstraclear.net] has joined #ruby
<shevy> oh
<shevy> I am just downloading that to try on my windows machine
<shevy> supposedly ANSI colours work on windows too then
<shevy> I can't live without colours anymore
TheShadowFog [TheShadowFog!~TheShadow@ool-1826fa3a.dyn.optonline.net] has joined #ruby
<Mon_Ouie> You can do gem fetch
<shevy> cool!
<shevy> I swear Mon_Ouie knows everything
<Mon_Ouie> I don't, I just thought it would be called gem fetch if it existed, and typed gem help fetch to check
<shevy> ah that was more advanced than what I tried
<shevy> I tried "gem help" first
<shevy> note to self - should try "gem help commands"
virtuaposta [virtuaposta!~SR@49.248.155.75] has joined #ruby
<virtuaposta> hi guys need some help here.. noob in RoR :( here is the issue http://pastebin.com/T3xh8VF1
ChampS_ [ChampS_!~ChampS@p54B4BFE9.dip.t-dialin.net] has joined #ruby
rickmasta [rickmasta!~rickmasta@pool-108-21-213-102.nycmny.fios.verizon.net] has joined #ruby
<virtuaposta> hi guys need some help here.. noob in RoR :( here is the issue http://pastebin.com/T3xh8VF1
<Tasser> virtuaposta, #rubyonrails
waspyrr [waspyrr!~waspyrr@dyndsl-085-016-099-229.ewe-ip-backbone.de] has joined #ruby
ixti [ixti!~ixti@251.Red-88-25-53.staticIP.rima-tde.net] has joined #ruby
NinoScript [NinoScript!~Adium@pc-55-124-83-200.cm.vtr.net] has quit [#ruby]
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
ixti [ixti!~ixti@251.Red-88-25-53.staticIP.rima-tde.net] has joined #ruby
andysparsons [andysparsons!~andy@64.134.96.55] has joined #ruby
LittleBill902__ [LittleBill902__!smith@c-71-197-103-184.hsd1.ca.comcast.net] has joined #ruby
jbpros_ [jbpros_!~jbpros@180.59-66-87.adsl-dyn.isp.belgacom.be] has joined #ruby
Ch4rAzZz [Ch4rAzZz!~jiri@HSI-KBW-046-005-196-147.hsi8.kabel-badenwuerttemberg.de] has joined #ruby
codefriar [codefriar!~codefriar@ip-200.it.rdu.bandwidth.com] has joined #ruby
andysparsons_ [andysparsons_!~andy@64.134.70.225] has joined #ruby
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
andysparsons_ [andysparsons_!~andy@64.134.70.225] has quit [#ruby]
szallol [szallol!~quassel@94.52.237.103] has joined #ruby
closedbook [closedbook!~christono@cpe-098-027-049-159.nc.res.rr.com] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-32-101.telstraclear.net] has joined #ruby
<closedbook> hi all, why does puts "hello" and "goodbye" return nil? shouldn't it return false since it's a boolean expression and nil evaluates to false anyway?
<Afal> no
<rippa> it's short-circuiting
<rippa> nil evaluates to nil and second operand is not evaluated
<Afal> puts always returns nil
<rippa> nil and p 1
cousine [cousine!~cousine@196.218.42.9] has joined #ruby
<rippa> I guess he meant that it prints nil
<rippa> or maybe not
<rippa> because it doesn't print anything
<closedbook> ah, short circuiting.. ok
<Afal> rippa: it prints "hello" and returns nil
RomD [RomD!~Roman@nrbg-4dbe3bd9.pool.mediaWays.net] has joined #ruby
<rippa> then yes
<closedbook> well, it prints "hello", but returns nil as well. So when nil is returned, the evaluation ends
<rippa> it returns nil because it always returns nil
<rippa> didn'l look at it closely
<rippa> also it is evaluated as
rippa [rippa!~splitta@85.158.54.234] has quit ["herp derp"]
nanderoo [nanderoo!~nanders@38.124.137.226] has joined #ruby
Bottlecruiser [Bottlecruiser!~splitta@85.158.54.234] has joined #ruby
kennethreitz [kennethreitz!~kennethre@c-24-127-96-129.hsd1.va.comcast.net] has joined #ruby
krz [krz!~foobar@unaffiliated/krz] has joined #ruby
closedbook [closedbook!~christono@cpe-098-027-049-159.nc.res.rr.com] has quit [#ruby]
andrewpthorp [andrewpthorp!~andrewpth@c-98-244-88-92.hsd1.va.comcast.net] has joined #ruby
pusewicz_ [pusewicz_!u2036@gateway/web/irccloud.com/x-lextzzsqlovrimsa] has joined #ruby
wmoxam [wmoxam!~wmoxam@206-248-153-55.dsl.teksavvy.com] has joined #ruby
srid [srid!u3297@gateway/web/irccloud.com/x-swfgjfnsuxokgfub] has joined #ruby
crankycoder [crankycoder!~crankycod@24-246-44-226.cable.teksavvy.com] has joined #ruby
berserkr [berserkr!~david@212.122.111.205.dyn.user.ono.com] has joined #ruby
nonotza [nonotza!~nonotza@cpe-72-225-173-7.nyc.res.rr.com] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@EM114-48-106-0.pool.e-mobile.ne.jp] has joined #ruby
TheShadowFog [TheShadowFog!~TheShadow@ool-1826fa3a.dyn.optonline.net] has joined #ruby
Manhose [Manhose!~Manhose@193.136.33.133] has joined #ruby
jredville [jredville!u3362@gateway/web/irccloud.com/x-ybogpgzefuoyosds] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
dotemacs [dotemacs!u801@gateway/web/irccloud.com/x-hykadlxyfowakthr] has joined #ruby
TheShadowFog [TheShadowFog!~TheShadow@ool-1826fa3a.dyn.optonline.net] has joined #ruby
adac [adac!~adac@85-127-39-241.dynamic.xdsl-line.inode.at] has joined #ruby
<adac> Hi guys. I currently do read out a file like this: <%= File.open(File.expand_path('~') + "/SomeLofFile.log") { |f| f.read } %> But unfotunately when I do this all the formatting seems to be lost. Any ides how to preserve the format?
Imistash [Imistash!~v@77.242.201.52] has joined #ruby
<workmad3> adac: are you spitting it out into HTML?
Mohan [Mohan!~nixh0st@unaffiliated/mohan] has joined #ruby
MetaCosm [MetaCosm!u514@gateway/web/irccloud.com/x-sdnldqwafuzlfehi] has joined #ruby
<adac> workmad3, yes this happens within an erb file
<workmad3> adac: yeah... then the formatting isn't lost
<Imistash> hello all, what is the best way to write a setup.rb file for a ruby application ? concretly I need something to install somes gem, create a conf file in /etc , ... :) Thanks for help :)
<workmad3> adac: but you'd need to translate it to HTML... HTML rendering ignores things like newlines and whitespace stretches
theRoUS [theRoUS!KenCoar@nat/redhat/x-htleaxhrmmttjiae] has joined #ruby
theRoUS [theRoUS!KenCoar@apache/committer/coar] has joined #ruby
<workmad3> adac: or you could spit it out into a <pre> block
<workmad3> adac: which will preserve whitespace etc :)
<adac> workmad3, ah pre that would work, yes
thoraxe [thoraxe!~thoraxe@50-73-95-6-static.hfc.comcastbusiness.net] has joined #ruby
<adac> :)
Synthead [Synthead!~max@173-165-179-126-atlanta.hfc.comcastbusiness.net] has joined #ruby
<adac> lets try this, because it sounds supereasy :)
lorenzo [lorenzo!~quassel@217.33.106.3] has joined #ruby
<workmad3> adac: also, maybe do File.join(File.expand_path('~'), 'SomeLofFile.log") instead of string concating with the /
<workmad3> adac: not to mention that ~ may not be what you expect if you're going to run this inside a webserver at some point ;)
<adac> workmad3, ;)
<adac> I always start it as the correct user :P
closedbracket [closedbracket!~closedbra@cpe-098-024-125-117.carolina.res.rr.com] has joined #ruby
GSpotAssassin [GSpotAssassin!u4086@gateway/web/irccloud.com/x-qarktvvoyswctpth] has joined #ruby
<workmad3> adac: just warning :)
<adac> :)
lorenzo_ [lorenzo_!~quassel@217.33.106.3] has joined #ruby
failshell [failshell!~failshell@li286-190.members.linode.com] has joined #ruby
Spockz` [Spockz`!~Spockz@21pc198.sshunet.nl] has joined #ruby
cousine_ [cousine_!~cousine@196.218.42.9] has joined #ruby
Targen [Targen!~iguana@190.39.181.108] has joined #ruby
kuadrosx [kuadrosx!~quassel@186.87.191.80] has joined #ruby
dkannan [dkannan!u480@gateway/web/irccloud.com/x-kotmemyffzbfphtw] has joined #ruby
cesario [cesario!u2444@gateway/web/irccloud.com/x-arpwgxdeqqojjrqh] has joined #ruby
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby
jomz [jomz!~jomz@83.101.71.187] has joined #ruby
davidboy [davidboy!u3228@gateway/web/irccloud.com/x-nctgusbtlgkvpnpg] has joined #ruby
deweysmith [deweysmith!u3113@gateway/web/irccloud.com/x-pmthoxdeoauxllzr] has joined #ruby
ElitestFX [ElitestFX!~ElitestFX@unaffiliated/elitestfx] has joined #ruby
<jomz> is there a variation on array.pop/shift that returns the array instead of the popped/shifted item?
bier|tp [bier|tp!~bier@p57999BC6.dip.t-dialin.net] has joined #ruby
<jomz> nm, going with array[0..-2]
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@EM114-48-106-0.pool.e-mobile.ne.jp] has joined #ruby
evantravers [evantravers!~textual@fw.luckie.net] has joined #ruby
<shevy> hehe
monkey13 [monkey13!~monkey13@38.98.137.29] has joined #ruby
patricksroberts [patricksroberts!u3278@gateway/web/irccloud.com/x-babimndtydgywvtr] has joined #ruby
kaneda_ [kaneda_!~kaneda@5ad75508.bb.sky.com] has joined #ruby
lorenzo_ [lorenzo_!~quassel@217.33.106.3] has joined #ruby
yekta [yekta!~yekta@r74-192-21-77.bcstcmta01.clsttx.tl.dh.suddenlink.net] has joined #ruby
cloudgeek [cloudgeek!~geekruby@59.177.56.225] has joined #ruby
Sailias [Sailias!~jonathan@99.234.118.225] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
iceduzi [iceduzi!~iceduzi@fat.tng-business.de] has joined #ruby
yfeldblum [yfeldblum!~Jay@pool-71-246-76-76.bltmmd.east.verizon.net] has joined #ruby
Cervajz [Cervajz!~Cervajz@opensuse/member/Cervajz] has joined #ruby
kapowaz [kapowaz!u546@gateway/web/irccloud.com/x-xswdzztbtviatckl] has joined #ruby
norex [norex!~quassel@41-133-239-177.dsl.mweb.co.za] has joined #ruby
pvh [pvh!u717@gateway/web/irccloud.com/x-vfmtfkcwqrlvstob] has joined #ruby
dazoakley [dazoakley!~dazoakley@hocuspokus.vm.bytemark.co.uk] has joined #ruby
pkondzior [pkondzior!u768@gateway/web/irccloud.com/x-vvgrfgdyxdbhfdkn] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
joast [joast!~rick@76.178.187.164] has joined #ruby
evantravers [evantravers!~textual@fw.luckie.net] has joined #ruby
jomz [jomz!~jomz@83.101.71.187] has quit [#ruby]
vjacob [vjacob!~vjacob@94-195-174-165.zone9.bethere.co.uk] has joined #ruby
bwlang [bwlang!~anonymous@70-91-134-14-ma-ne.hfc.comcastbusiness.net] has joined #ruby
fcoury [fcoury!u2238@gateway/web/irccloud.com/x-bapzrafxdgszpuux] has joined #ruby
srid [srid!u3297@gateway/web/irccloud.com/x-sfiacrwwmbcduvgh] has joined #ruby
srid [srid!u3297@unaffiliated/srid] has joined #ruby
srid [srid!u3297@gateway/web/irccloud.com/x-sfiacrwwmbcduvgh] has joined #ruby
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby
pen [pen!~pen@2001:288:1001:28:91a2:7458:f606:d265] has joined #ruby
kapowaz [kapowaz!u546@gateway/web/irccloud.com/x-adcqmiijhvnitczq] has joined #ruby
pkondzior [pkondzior!u768@gateway/web/irccloud.com/x-ujeyzfyqkodkpocc] has joined #ruby
TheShadowFog [TheShadowFog!~TheShadow@ool-1826fa3a.dyn.optonline.net] has joined #ruby
GSpotAssassin [GSpotAssassin!u4086@gateway/web/irccloud.com/x-hgzwiwqxchhkhftf] has joined #ruby
jredville [jredville!u3362@gateway/web/irccloud.com/x-bpwwxitxqrsymerp] has joined #ruby
dnyy [dnyy!u2106@gateway/web/irccloud.com/x-eaweeriprjcvqtid] has joined #ruby
trivol [trivol!~aurelien@gra94-1-81-57-175-179.fbx.proxad.net] has joined #ruby
cloudgeek [cloudgeek!~geekruby@59.177.56.225] has joined #ruby
bbttxu [bbttxu!~adam@nt8rsctf1.unt.ad.unt.edu] has joined #ruby
deweysmith [deweysmith!u3113@gateway/web/irccloud.com/x-cdkhzuhjrfpikmly] has joined #ruby
dotemacs [dotemacs!u801@gateway/web/irccloud.com/x-mrwgfmxsoqqhdihq] has joined #ruby
spyvsspy [spyvsspy!~nonenone@209.145.177.162] has joined #ruby
jgarvey [jgarvey!~jgarvey@cpe-174-097-248-211.nc.res.rr.com] has joined #ruby
abstrusenick [abstrusenick!~abstrusen@bb116-15-213-210.singnet.com.sg] has joined #ruby
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby
chesh [chesh!~mark@15.Red-81-38-77.dynamicIP.rima-tde.net] has joined #ruby
blischalk [blischalk!~brettlisc@173-165-48-46-Illinois.hfc.comcastbusiness.net] has joined #ruby
iocor_ [iocor_!~textual@eduroam-wireless-pat2.nomadic.bris.ac.uk] has joined #ruby
codefriar [codefriar!~codefriar@ip-200.it.rdu.bandwidth.com] has joined #ruby
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
shevy [shevy!~shevy@178-191-179-93.adsl.highway.telekom.at] has joined #ruby
bbttxu [bbttxu!~adam@nt8rsctf1.unt.ad.unt.edu] has joined #ruby
tobiassvn [tobiassvn!u4832@gateway/web/irccloud.com/x-yzxfesxyjaphqyiv] has joined #ruby
asobrasil [asobrasil!~asantioli@palpatine.privatedns.com] has joined #ruby
nonotza [nonotza!~nonotza@66.246.94.130] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@EM114-48-106-0.pool.e-mobile.ne.jp] has joined #ruby
Mohan [Mohan!~nixh0st@cpc1-slou1-2-0-cust65.haye.cable.virginmedia.com] has joined #ruby
Mohan [Mohan!~nixh0st@unaffiliated/mohan] has joined #ruby
dkannan [dkannan!u480@gateway/web/irccloud.com/x-bpsnvwfftfbtjtgo] has joined #ruby
denysonique__ [denysonique__!u484@gateway/web/irccloud.com/x-figgbcabhtugdgkm] has joined #ruby
albemuth [albemuth!~albemuth@201.198.78.18] has joined #ruby
relix [relix!u2146@gateway/web/irccloud.com/x-bbmqzglperhowebl] has joined #ruby
Spockz [Spockz!~Spockz@21pc198.sshunet.nl] has joined #ruby
rippa [rippa!~rippa@87-253-28-78.pppoe.yaroslavl.ru] has joined #ruby
ceej [ceej!~anonymous@cpe-72-190-40-203.tx.res.rr.com] has joined #ruby
karinsofia [karinsofia!~s@signo.lha.sgsnet.se] has joined #ruby
dotnull [dotnull!~DotNull@office.t8webware.com] has joined #ruby
blischalk [blischalk!~brettlisc@173-165-48-46-Illinois.hfc.comcastbusiness.net] has joined #ruby
<dr_bob> jomz there's also slice
<dr_bob> oh, too late
ryh [ryh!~ryh@host-174-45-115-181.bzm-mt.client.bresnan.net] has joined #ruby
Manhose [Manhose!~Manhose@193.136.33.133] has joined #ruby
axl_ [axl_!~axl@173-11-52-113-Minnesota.hfc.comcastbusiness.net] has joined #ruby
jwmann [jwmann!~Adium@modemcable032.85-202-24.mc.videotron.ca] has joined #ruby
fts [fts!~dz@cl-1278.cgn-01.de.sixxs.net] has joined #ruby
fts [fts!~dz@cl-1278.cgn-01.de.sixxs.net] has quit [#ruby]
<adac> workmad3, hmm <%= File.open(File.expand_path('~') + "/SomeLogFile.log") { |f| f.read } %> doesn't seem to show me the whole log file, but only a part... do you may have an idea why this is so?
DrShoggoth [DrShoggoth!~prakwtf@68-188-73-250.static.stls.mo.charter.com] has joined #ruby
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby
kennethreitz [kennethreitz!~kennethre@c-24-127-96-129.hsd1.va.comcast.net] has joined #ruby
wmoxam [wmoxam!~wmoxam@76.9.195.38] has joined #ruby
jbpros [jbpros!~jbpros@180.59-66-87.adsl-dyn.isp.belgacom.be] has joined #ruby
wilmoore [wilmoore!~wilmoore@c-67-190-17-108.hsd1.co.comcast.net] has joined #ruby
kennethreitz [kennethreitz!~kennethre@c-24-127-96-129.hsd1.va.comcast.net] has joined #ruby
azbarcea__ [azbarcea__!~quassel@79.118.7.231] has joined #ruby
emmanuel_ [emmanuel_!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-205-136.netcologne.de] has joined #ruby
<failshell> i'm trying to use the following syntax: (1.."#{variable}").each
<failshell> but im getting a bad value for range
<failshell> what am i doing wrong?
<failshell> damn, just found it
_debo [_debo!~marco.deb@cpc18-enfi16-2-0-cust743.hari.cable.virginmedia.com] has joined #ruby
S1kx [S1kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby
S1kx [S1kx!~S1kx@pdpc/supporter/monthlybyte/s1kx] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
<shevy> failshell I guess "variable" was not an integer
Cervajz [Cervajz!~Cervajz@opensuse/member/Cervajz] has joined #ruby
<shevy> 1.."s" # ArgumentError: bad value for range
zerdman [zerdman!~zerdman@71.255.123.66] has joined #ruby
nonotza [nonotza!~nonotza@66.246.94.130] has joined #ruby
<dr_bob> failshell: you have a range with mixed types Fixnum and String. Why the String interpolation?
<dr_bob> why not jus (1..variable),each ...
<samuelkadolph> shevy: You can't create a range with 2 different types
<failshell> dr_bob: ya noob mistake :)
<failshell> realised my error once i finished asking here
<dr_bob> :-)
<shevy> samuelkadolph why do you tell that to me? :-)
<samuelkadolph> shevy: Because you didn't notice the actual problem
<shevy> I did not?
<samuelkadolph> [10:36:38] <shevy> failshell I guess "variable" was not an integer
<shevy> and?
<samuelkadolph> Even if variable was a number, it would still be trying to create a range between a number and a string.
<shevy> hmm you are right
<failshell> look at this, my noobness starting a mini flame hehe
Mohan [Mohan!~nixh0st@unaffiliated/mohan] has joined #ruby
<shevy> no, that's ok, samuelkadolph is correct
<Zal> if a function *might* mutate one of its arguments, is it conventional to name the function with a "!" ?
<samuelkadolph> Zal: No
<Zal> what is ! used for?
<Zal> (as part of a function name)
<samuelkadolph> ruby convention is to use ! when the method mutates it's receiver and there isn't a non mutating method
<samuelkadolph> Such as String#gsub!
<Zal> isn't, or is?
<Tasser> samuelkadolph, beware of rails ^^
<dr_bob> Zal: typically for methods which change the receiver. generally it just means "watch out!"
<samuelkadolph> Active record's convention is that ! raises an exception instead of returning nil
<samuelkadolph> dr_bob: No, ! does not mean watch out
<Zal> hm, I think I do mean "change the receiver" when I say "mutates its arguments"
<samuelkadolph> No
<samuelkadolph> The receiver is self
<Zal> oh, in-place
<dr_bob> samuelkadolph: what then?
<Zal> samuelkadolph, thank you
<samuelkadolph> "abc".gsub!("b", "c") mutates the string
<Zal> dr_bob, thanks
jbpros [jbpros!~jbpros@180.59-66-87.adsl-dyn.isp.belgacom.be] has joined #ruby
<samuelkadolph> While gsub would return a new string that was mutated, preserving the original
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
<Zal> ok, got it
v4n_ [v4n_!~v4n@2607:fad8:4:0:224:d7ff:feb0:42e8] has joined #ruby
<dr_bob> samuelkadolph: Matz said "!" means "dangerous method".
<samuelkadolph> dr_bob: It depends on the author. The only well defined conventions are mutating vs non mutating and AR's exception raising
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has quit [#ruby]
v0n [v0n!~v4n@2607:fad8:4:0:224:d7ff:feb0:42e8] has joined #ruby
* failshell sits here pretending he understands all that mumbo jumbo!
<v0n> Hi all
<v0n> I have a good practice question:
<samuelkadolph> dr_bob: There are lots of methods that are "dangerous" that don't have a bang.
<dr_bob> samuelkadolph: you can dig up Matz's statement in ruby-talk archive. It just happens that often we have meth and meth! where meth! might mutate self.
<shevy> whoa
<shevy> a "dangerous" method
<shevy> are there also cute and fluffy methods?
<samuelkadolph> Person.new(shevy).kill!
<shevy> :(
<dr_bob> samuelkadolph: wrong logic, if ! means dangerous it does not mean that other methods are not dangerous
<shevy> terrorist methods!!!
<dr_bob> shevy: ? is for fluffy :-)
<shevy> do not use them!!!
<v0n> usually, if I need a new feature, is that better to extend an existing module, or should I better write a function in an Helpers module or something?
<samuelkadolph> v0n: You can't subclass modules if that's what you are trying to do
<samuelkadolph> dr_bob: That doesn't make sense.
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
<dr_bob> samuelkadolph: why?
<shevy> v0n well you need the functionality, right? so you have to make either a change in an existing module, or in your code
<samuelkadolph> There are 2 conventions for bang methods in ruby and that's all you can really say about bang methods
<failshell> that's what i was writing hehe
<v0n> e.g. I need to convert a Time in seconds, so should I create a Helpers::time_to_sec(time) method or create Time.to_sec ?
<dr_bob> v0n: Time has already such a method
<shevy> v0n on a per-project basis, when I make modifications to ruby core classes, I bundle all those modifications into one file
<shevy> the first variant would seem better I think v0n
g0bl1n [g0bl1n!~prokter@a213-22-27-14.cpe.netcabo.pt] has joined #ruby
g0bl1n [g0bl1n!~prokter@unaffiliated/g0bl1n] has joined #ruby
Pip [Pip!~Pip@host-90-156-66-217.spbmts.ru] has joined #ruby
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
<samuelkadolph> dr_bob: Read that blog post I linked and you'll see why ! doesn't mean dangerous method.
<v0n> dr_bob, really? I you meant Time.to_i that's not exactly what I need
<dr_bob> v0n: what DO you need?
airhorns [airhorns!~airhorns@76-10-166-126.dsl.teksavvy.com] has joined #ruby
<dr_bob> samuelkadolph: "The ! in method names that end with ! means, “This method is dangerous”—or, more precisely, this method is the “dangerous” version of an otherwise equivalent method, with the same name minus the !"
<v0n> dr_bob: def time_to_sec(time); time.hour * 3600 + time.min * 60 + time.sec; end
<samuelkadolph> And reading comprehension fail
<failshell> anyone here using sinatra who would point me in the right direction. i'm trying to load a view, and then stream data to it. the streaming part i can handle fine, but it doesn't load my view :(
pen [pen!~pen@g1pc2n249.g1.ntu.edu.tw] has joined #ruby
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
<dr_bob> v0n: that's more like #seconds_since_midnight.
<DrShoggoth> is there a way to turn an array into a hash? [ 1,2,3,4 ] to { 1=>2, 3=>4 } ?
<samuelkadolph> DrShoggoth: Hash[1,2,3,4]
<dr_bob> DrShoggoth: Hash[*arr]
<DrShoggoth> oic, easy enough, thanks :D
dr_bob [dr_bob!c100f615@gateway/web/freenode/ip.193.0.246.21] has quit [#ruby]
ceej [ceej!~anonymous@cpe-72-190-40-203.tx.res.rr.com] has joined #ruby
looopy [looopy!~looopy@pool-151-200-236-181.washdc.btas.verizon.net] has joined #ruby
tomhsx [tomhsx!~tomhsx@c-76-109-169-195.hsd1.fl.comcast.net] has joined #ruby
<v0n> #seconds_since_midnight is an active_record method... Do not mix Ruby and RoR...
<DrShoggoth> another thing, is there a way to spit out mutiple values per iteration in a map? [ 1,2,3 ].map { |v| v, v*10 }
<DrShoggoth> i know that doesn't work ^^^^
<samuelkadolph> DrShoggoth: You can return an array and flatten at the end
DMKE [DMKE!~DMKE@pdpc/supporter/student/dmke] has joined #ruby
<DrShoggoth> ah, yes that would be fine, thanks again
<Mon_Ouie> flat_map
<Mon_Ouie> (that's a method from Enumerable)
sorin [sorin!~sorin@66-168-187-62.dhcp.gwnt.ga.charter.com] has joined #ruby
<samuelkadolph> Mon_Ouie: Interesting
tatsuya_o [tatsuya_o!~tatsuya_o@27-142-96-128.rev.home.ne.jp] has joined #ruby
<DrShoggoth> there we go
<DrShoggoth> Hash[ *[ 1, 2 ,3 ].flat_map { | v | [ v, 'arf' ] } ]
<DrShoggoth> => {1=>"arf", 2=>"arf", 3=>"arf"}
<DrShoggoth> and the pieces come together, tyvm
<samuelkadolph> You can just use map and drop the *
<samuelkadolph> Hash[[1,2],[3,4]] works
<DrShoggoth> ah, cool
bitrot [bitrot!~smd@rrcs-50-84-14-82.sw.biz.rr.com] has joined #ruby
tomzx [tomzx!~tomzx@dsl-216-221-32-204.aei.ca] has joined #ruby
kennethreitz [kennethreitz!~kennethre@c-24-127-96-129.hsd1.va.comcast.net] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@EM114-48-129-213.pool.e-mobile.ne.jp] has joined #ruby
seejohnrun [seejohnrun!~john@ip-160-79-101-2.autorev.intellispace.net] has joined #ruby
looopy [looopy!~looopy@pool-151-200-236-181.washdc.btas.verizon.net] has joined #ruby
skinnymuch [skinnymuch!~skinnymuc@static-173-61-113-6.cmdnnj.fios.verizon.net] has joined #ruby
ghanima [ghanima!~ghanima@alexander.nat.trb.com] has joined #ruby
LiquidInsect [LiquidInsect!~billabney@173-228-63-32.dsl.static.sonic.net] has joined #ruby
Mohan [Mohan!~nixh0st@unaffiliated/mohan] has joined #ruby
Manhose_ [Manhose_!~Manhose@2001:690:2200:9a77:2554:ed4d:3f14:a8f9] has joined #ruby
<v0n> Date.today has been removed?
ckrailo [ckrailo!~ckrailo@208.86.167.247] has joined #ruby
krz [krz!~foobar@unaffiliated/krz] has joined #ruby
<v0n> ho ok, date just need to be required...
PaciFisT [PaciFisT!~PeaCE@76-10-149-67.dsl.teksavvy.com] has joined #ruby
tilde` [tilde`!~tilde@host238-192-dynamic.12-79-r.retail.telecomitalia.it] has joined #ruby
sonkei [sonkei!~sonkei@d14-69-26-171.try.wideopenwest.com] has joined #ruby
<Mon_Ouie> Hash[[1,2],[3,4]] doesn't quite work as you'd want, it should be Hash[ [[1,2], [3,4]] ]
<samuelkadolph> Mon_Ouie: Right, I just forgot the extra []
rtsph [rtsph!rtsph@gateway/shell/xzibition.com/x-thfgdjhxkeusoqkj] has joined #ruby
RomD` [RomD`!~Roman@nrbg-4dbe092a.pool.mediaWays.net] has joined #ruby
<Zal> Where should function documentation go? Comments above the function definition?
TheShadowFog [TheShadowFog!~TheShadow@ool-1826fa3a.dyn.optonline.net] has joined #ruby
<berserkr> i have a question about ruby on apache server
lkba [lkba!~AndChat@afsu194.neoplus.adsl.tpnet.pl] has joined #ruby
wilmoore [wilmoore!~wilmoore@70-89-165-49-ISTS-co.hfc.comcastbusiness.net] has joined #ruby
<berserkr> what is the best way to configure apache for ruby on rails? is necessary make a virtualenv like python?
dwebb [dwebb!~mars@e177102254.adsl.alicedsl.de] has joined #ruby
<dwebb> hi
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
<dwebb> is there a good ruby library that handles deb packages or acts a bit like apt?
<dwebb> i want to be able to install certain packages and it would be great if i do not use the command line directly
eywu [eywu!~Adium@205-170-107-4.dia.static.qwest.net] has joined #ruby
<failshell> dwebb: you should look into chef
<v0n> shevy, how do you usually name that single file containing all modifications to Ruby core classes? :D
<dwebb> failshell: ok thanks
<shevy> v0n hmm
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby
<shevy> v0n core/extensions.rb
<shevy> unfortunately...
<shevy> it has another name in another project ... :\ :/
<shevy> but I shall overcome this inconsistency eventually!
<shevy> oh
rtsph [rtsph!rtsph@gateway/shell/xzibition.com/x-pormamcwmgsbmiki] has joined #ruby
<shevy> the other file is called extensions.rb too but it resides in the directory extensions/
Cervajz_ [Cervajz_!~Cervajz@48.156.broadband12.iol.cz] has joined #ruby
dankest [dankest!~dankest@wsip-174-75-64-190.sb.sd.cox.net] has joined #ruby
omry_ [omry_!~omry@DSL212-235-83-63.bb.netvision.net.il] has joined #ruby
mikepack [mikepack!~mikepack@c-98-245-117-116.hsd1.co.comcast.net] has joined #ruby
wedgeV [wedgeV!~wedge@static-96-239-100-26.nycmny.fios.verizon.net] has joined #ruby
burgestrand [burgestrand!~burgestra@h-163-174.a155.priv.bahnhof.se] has joined #ruby
<berserkr> failshell: mod_ruby is not a good choice for my purpose. I mean for a shared hosting
<berserkr> i'm looking for a shared hosting configuration
looopy [looopy!~looopy@pool-151-200-236-181.washdc.btas.verizon.net] has joined #ruby
Sliker [Sliker!~ponies@117.163.pn.adsl.brightview.com] has joined #ruby
Manhose__ [Manhose__!~Manhose@193.136.33.133] has joined #ruby
looopy [looopy!~looopy@pool-151-200-236-181.washdc.btas.verizon.net] has joined #ruby
Guest76161 [Guest76161!~awesome@212.62.202.84.customer.cdi.no] has joined #ruby
jergason [jergason!~jergason@c-67-161-248-217.hsd1.ut.comcast.net] has joined #ruby
thatryan [thatryan!~thatryan@c-24-4-167-46.hsd1.ca.comcast.net] has joined #ruby
omry_ [omry_!~omry@DSL212-235-83-63.bb.netvision.net.il] has joined #ruby
gabrielcsf [gabrielcsf!~gabrielcs@200-225-197-223.static.ctbctelecom.com.br] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
bier [bier!~bier@p54A5BDAE.dip.t-dialin.net] has joined #ruby
iocor [iocor!~textual@cpc1-aztw25-2-0-cust6.aztw.cable.virginmedia.com] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
bier|tp [bier|tp!~bier@p54A5BDAE.dip.t-dialin.net] has joined #ruby
abner_ [abner_!~abner@200-225-197-223.static.ctbctelecom.com.br] has joined #ruby
Hellojere [Hellojere!~Hellojere@89.7.90.160] has joined #ruby
blischalk_ [blischalk_!~brettlisc@173-165-48-46-Illinois.hfc.comcastbusiness.net] has joined #ruby
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
advorak [advorak!~advorak@216-15-23-116.c3-0.161-ubr1.lnh-161.md.cable.rcn.com] has joined #ruby
fr0gprince_ [fr0gprince_!Bart@178-85-90-223.dynamic.upc.nl] has joined #ruby
gabrielcsf [gabrielcsf!~gabrielcs@200-225-197-223.static.ctbctelecom.com.br] has quit ["Leaving"]
symb0l [symb0l!~symb0l@c-50-131-187-183.hsd1.ca.comcast.net] has joined #ruby
nowthatsamatt [nowthatsamatt!~nowthatsa@rrcs-71-43-23-18.se.biz.rr.com] has joined #ruby
michaelh [michaelh!~Michael@c-98-213-112-209.hsd1.il.comcast.net] has joined #ruby
Jrz [Jrz!~jrz@d152222.upc-d.chello.nl] has joined #ruby
thone_ [thone_!~thone@e179081037.adsl.alicedsl.de] has joined #ruby
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
craigglennie [craigglennie!~craigglen@173-167-99-61-sfba.hfc.comcastbusiness.net] has joined #ruby
adeponte [adeponte!~adeponte@67.110.253.162.ptr.us.xo.net] has joined #ruby
chaddow [chaddow!~chaddow@173-161-238-6-Philadelphia.hfc.comcastbusiness.net] has joined #ruby
chaddow [chaddow!~chaddow@173-161-238-6-Philadelphia.hfc.comcastbusiness.net] has quit [#ruby]
mafolz [mafolz!~mafolz@dhcp50-203.start.uni-saarland.de] has joined #ruby
<Zal> do I need to escape {} characters inside a character class in a regex? Is [{}] ok to match '{' or '}' ?
chaddow [chaddow!~chaddow@173-161-238-6-Philadelphia.hfc.comcastbusiness.net] has joined #ruby
_md [_md!~mduarte@141.0.34.138] has joined #ruby
<rippa> works fine
FlyingFoX [FlyingFoX!~quassel@sanktwendel.weh.RWTH-Aachen.DE] has joined #ruby
<Zal> rippa, cool, thanks for the verification.
omry_ [omry_!~omry@DSL212-235-83-63.bb.netvision.net.il] has joined #ruby
bastilian [bastilian!~bastilian@chello062178156107.9.14.vie.surfer.at] has joined #ruby
ceej [ceej!~anonymous@cpe-72-190-40-203.tx.res.rr.com] has joined #ruby
pootpoot [pootpoot!~pootpoot@38.108.250.130] has joined #ruby
yxhuvud [yxhuvud!mongo@h-17-224.a149.priv.bahnhof.se] has joined #ruby
apeiros_ [apeiros_!~apeiros@77-58-115-24.dclient.hispeed.ch] has joined #ruby
Brozilla [Brozilla!~Brozilla@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
alfism [alfism!~alfism@2620:149:4:1201:88aa:d029:f458:921b] has joined #ruby
jergason [jergason!~jergason@c-67-161-248-217.hsd1.ut.comcast.net] has joined #ruby
Sailias [Sailias!~jonathan@99.234.118.225] has joined #ruby
DMKE [DMKE!~DMKE@pdpc/supporter/student/dmke] has joined #ruby
Araxia [Araxia!~Araxia@173-164-68-213-Oregon.hfc.comcastbusiness.net] has joined #ruby
eldariof [eldariof!~CLD@81.200.24.162] has joined #ruby
voodoofish430 [voodoofish430!~mtorres@NAT5.pas.idealab.com] has joined #ruby
headius [headius!~headius@71-210-151-185.mpls.qwest.net] has joined #ruby
maletor [maletor!~maletor@74.115.25.139] has joined #ruby
Tuxist [Tuxist!~quassel@dyndsl-091-096-126-113.ewe-ip-backbone.de] has joined #ruby
airhorns [airhorns!~airhorns@206-248-184-147.dsl.teksavvy.com] has joined #ruby
kenichi [kenichi!~kenichi@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
Optimis [Optimis!~Optimis@cpe-98-149-171-51.socal.res.rr.com] has joined #ruby
josh_ [josh_!~josh@74-95-43-126-Oregon.hfc.comcastbusiness.net] has joined #ruby
d2dchat [d2dchat!~d2dchat@173-167-20-129-michigan.hfc.comcastbusiness.net] has joined #ruby
adamkittelson [adamkittelson!~adamkitte@c-24-23-252-19.hsd1.ca.comcast.net] has joined #ruby
<zykes-> what should one use over chili project or redmine ?
<shevy> what
<shevy> redmine is neat though
<zykes-> isn't chiliproject a "upgraded" redmine ?
altivec [altivec!~altivec@136.169.152.237] has joined #ruby
sarmiena_ [sarmiena_!~aldosarmi@2602:306:32e6:ab90:95d3:9cd:5683:fde7] has joined #ruby
BiHi [BiHi!~bihi@did75-17-88-165-129-29.fbx.proxad.net] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
stkowski [stkowski!~stkowski@ns25.8x8.com] has joined #ruby
eignerchris [eignerchris!~eignerchr@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
rvmeier [rvmeier!~rodrigo@pc-136-172-241-201.cm.vtr.net] has joined #ruby
Russell^^ [Russell^^!~Russell^^@88.97.51.87] has joined #ruby
Tuxist64bit [Tuxist64bit!~quassel@dyndsl-031-150-001-129.ewe-ip-backbone.de] has joined #ruby
radic_ [radic_!~radic@dslb-178-002-234-050.pools.arcor-ip.net] has joined #ruby
cpruitt [cpruitt!~cpruitt@190-186.126-70.tampabay.res.rr.com] has joined #ruby
amerine [amerine!~mturner@208-100-137-147.bendbroadband.com] has joined #ruby
alfism [alfism!~alfism@2620:149:4:1201:5cc8:ffcf:ddbc:6ffa] has joined #ruby
Brozilla [Brozilla!~Brozilla@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
minijupe [minijupe!~benlieb@adsl-74-243-183-162.ard.bellsouth.net] has joined #ruby
fermo [fermo!~fermo@ppp-214-24.26-151.libero.it] has joined #ruby
PhilK [PhilK!~PhilK@2001:470:1f05:c99:21f:d0ff:fe84:e3ca] has joined #ruby
jensn [jensn!~Jens@c83-251-164-169.bredband.comhem.se] has joined #ruby
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
incluye [incluye!~incluye@216.48.138.26] has joined #ruby
Mohan [Mohan!~nixh0st@cpc1-slou1-2-0-cust65.haye.cable.virginmedia.com] has joined #ruby
Mohan [Mohan!~nixh0st@unaffiliated/mohan] has joined #ruby
Jay_Levitt [Jay_Levitt!~Jay_Levit@c-24-63-250-125.hsd1.ma.comcast.net] has joined #ruby
tvo [tvo!~tvo@5354CF57.cm-6-5d.dynamic.ziggo.nl] has joined #ruby
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
musl [musl!~mike@li44-23.members.linode.com] has joined #ruby
sorin [sorin!~sorin@66-168-187-62.dhcp.gwnt.ga.charter.com] has joined #ruby
milkpost_ [milkpost_!~dec@192.133.84.6] has joined #ruby
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
minijupe [minijupe!~benlieb@adsl-74-243-183-162.ard.bellsouth.net] has joined #ruby
seejohnrun [seejohnrun!~john@ip-160-79-101-2.autorev.intellispace.net] has joined #ruby
jamiemill [jamiemill!~jamiemill@109.204.34.154] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-205-136.netcologne.de] has joined #ruby
GreaseMonkey [GreaseMonkey!~gm@121-74-67-43.telstraclear.net] has joined #ruby
GreaseMonkey [GreaseMonkey!~gm@unaffiliated/greasemonkey] has joined #ruby
ikaros [ikaros!~ikaros@dslb-084-059-073-057.pools.arcor-ip.net] has joined #ruby
DMKE [DMKE!~DMKE@pdpc/supporter/student/dmke] has joined #ruby
Helius [Helius!~Adium@93-35-209-14.ip56.fastwebnet.it] has joined #ruby
<shevy> zykes- no idea, never heard it before
<shevy> I heard a lot about redmine though and I think the ruby bugtracker is using it
<shevy> and that is quite ok
<shevy> I am a fan of github issue tracking though
<shevy> it's such a breeze to use that, compared to i.e. bugzilla
<shevy> I hate bugzilla!
<shevy> trac is also annoying
bluOxigen [bluOxigen!~noreply@unaffiliated/bluOxigen] has joined #ruby
<shevy> sourceforge reporting is ok, but sourceforge is ugly in design and has a strange usability
zommi [zommi!~quassel@HSI-KBW-078-042-009-093.hsi3.kabel-badenwuerttemberg.de] has joined #ruby
g0bl1n [g0bl1n!~prokter@a213-22-27-14.cpe.netcabo.pt] has joined #ruby
trivol [trivol!~aurelien@81.57.175.21] has joined #ruby
<zykes-> shevy: if you where to choose either redmine or chiliprojct then which
<shevy> redmine
<shevy> go with the mass
sepp2k [sepp2k!~sexy@g224101130.adsl.alicedsl.de] has joined #ruby
ascarter [ascarter!~ascarter@209.119.253.66] has joined #ruby
bf4648 [bf4648!~bf4648@206.248.207.14] has joined #ruby
<bf4648> I've got some code that goes like this: $mp4_list[] = $filename;.....how do I read the contents in the array mp4_list[]?
<ReinH> what does "read the contents" mean?
<ReinH> and the array is $mp4_list, not mp4_list[]. mp4_list[] is calling the "[]" method on mp4_list
<bf4648> I just want to print out the value of the array
<ReinH> the array has multiple values
<bf4648> yes
<ReinH> maybe you want #inspect?
<ReinH> it depends on what "print out the value" means to you
<bf4648> I just want to see the values that it got
<ReinH> ok, use inspect
joast [joast!~rick@76.178.187.164] has joined #ruby
apok_ [apok_!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
ryh [ryh!~ryh@host-174-45-115-181.bzm-mt.client.bresnan.net] has joined #ruby
daniel_hinojosa [daniel_hinojosa!~danno@c-68-35-182-153.hsd1.nm.comcast.net] has joined #ruby
davidcelis [davidcelis!~david@70-89-180-6-smc-or.hfc.comcastbusiness.net] has joined #ruby
sarkis_ [sarkis_!~sarkis@rrcs-173-196-183-162.west.biz.rr.com] has joined #ruby
bastilian [bastilian!~bastilian@chello062178156107.9.14.vie.surfer.at] has joined #ruby
amacgregor__ [amacgregor__!~amacgrego@CPE00222dcb0a53-CM00222dcb0a4f.cpe.net.cable.rogers.com] has joined #ruby
jwmann [jwmann!~Adium@modemcable032.85-202-24.mc.videotron.ca] has joined #ruby
mikeycgto [mikeycgto!~mikeycgto@ool-4571c9f5.dyn.optonline.net] has joined #ruby
mikeycgto [mikeycgto!~mikeycgto@pdpc/supporter/active/mikeycgto] has joined #ruby
Optimis [Optimis!~Optimis@cpe-98-149-171-51.socal.res.rr.com] has joined #ruby
Mohan [Mohan!~nixh0st@cpc1-slou1-2-0-cust65.haye.cable.virginmedia.com] has joined #ruby
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
Mohan [Mohan!~nixh0st@unaffiliated/mohan] has joined #ruby
roadze [roadze!~roadze@119.224.137.97] has joined #ruby
mikepack [mikepack!~mikepack@c-98-245-117-116.hsd1.co.comcast.net] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has quit [#ruby]
Mahoek [Mahoek!~Mahoek@ip51ceb6d4.adsl-surfen.hetnet.nl] has joined #ruby
cousine [cousine!~cousine@196.218.42.9] has joined #ruby
ank [ank!~ank@c-67-172-16-188.hsd1.pa.comcast.net] has joined #ruby
nanoyak [nanoyak!~nanoyak@50-0-164-69.dsl.dynamic.sonic.net] has joined #ruby
swistak35 [swistak35!~rlasocha@s21.linuxpl.com] has joined #ruby
Squee-D [Squee-D!~Squee-D@static.visfleet.com] has joined #ruby
JonnieCache [JonnieCache!~jonnie@87.252.60.35] has joined #ruby
savage- [savage-!~savage-@209.118.197.220] has joined #ruby
tonini [tonini!~zastav@78-8.61-188.cust.bluewin.ch] has joined #ruby
elathan [elathan!~elathan@46.103.239.159] has joined #ruby
blischalk [blischalk!~brettlisc@173-165-48-46-Illinois.hfc.comcastbusiness.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
xissburg [xissburg!~xissburg@189.102.48.152] has joined #ruby
<elathan> I have a C extension in mac os x. If compiled as .so, the interpreter is refusing to load it (the error is file not found), if I compile it as a bundle everything goes fine. Is this normal?
axl__ [axl__!~axl@173-11-52-113-Minnesota.hfc.comcastbusiness.net] has joined #ruby
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
<JonnieCache> elathan: bundle is the standard filename for dynamic libraries in os x. so maybe that is normal behaviour
zykes- [zykes-!zykes@2001:470:28:3bc:beaf:da7e:1eaf:5af3] has joined #ruby
n8ji [n8ji!~n8ji@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby
<elathan> Many extensions are built in Linux/Unix where .so is used and they can also compile in Mac OS X. However the Makefiles must be change, and this is not very convenient.
<JonnieCache> yes i think they generally use the mkmkf.rb script to change the makefile depending on the platform
<JonnieCache> but im not sure
jbw [jbw!~jbw@dsl-044-084.cust.imagine.ie] has joined #ruby
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
incluye [incluye!~incluye@LO1-ESR-74-215-187-208.fuse.net] has joined #ruby
incluye [incluye!~incluye@LO1-ESR-74-215-187-208.fuse.net] has joined #ruby
dotplus [dotplus!~dotplus@allgoodbits.com] has joined #ruby
friskd [friskd!~friskd@71-95-209-242.static.mtpk.ca.charter.com] has joined #ruby
<dotplus> I want to test an erb template at the cli. I think I need to do something like erb -x <template> | ruby > output.txt but how do I pass in variables for interpolation?
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
_md [_md!~mduarte@cpc4-finc13-2-0-cust568.4-2.cable.virginmedia.com] has joined #ruby
flip_digits [flip_digits!~textual@c-71-199-243-97.hsd1.fl.comcast.net] has joined #ruby
closedbracket [closedbracket!~closedbra@h135.39.189.173.dynamic.ip.windstream.net] has joined #ruby
pantsman [pantsman!~pantsman@2.25.203.162] has joined #ruby
pantsman [pantsman!~pantsman@pdpc/supporter/active/pantsman] has joined #ruby
colint_ [colint_!~ColinT@69-11-97-130.regn.static.sasknet.sk.ca] has joined #ruby
jbpros [jbpros!~jbpros@180.59-66-87.adsl-dyn.isp.belgacom.be] has joined #ruby
stephans [stephans!~stephans@209.66.114.6] has joined #ruby
bf4648 [bf4648!~bf4648@206.248.207.14] has quit ["Leaving"]
d-snp [d-snp!~d-snp@smurfer.student.utwente.nl] has joined #ruby
albemuth [albemuth!~albemuth@209.213.178.170] has joined #ruby
gearaholic [gearaholic!~gearaholi@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby
looopy [looopy!~looopy@pool-151-200-236-181.washdc.btas.verizon.net] has joined #ruby
Jrz [Jrz!~jrz@d152222.upc-d.chello.nl] has joined #ruby
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
joallard [joallard!~jon@modemcable163.197-21-96.mc.videotron.ca] has joined #ruby
ChampS_ [ChampS_!~ChampS@p54B4CCDE.dip.t-dialin.net] has joined #ruby
chesh [chesh!~mark@168.Red-83-35-109.dynamicIP.rima-tde.net] has joined #ruby
kedare [kedare!~kedare@onyxia.netyxia.net] has joined #ruby
rickmasta [rickmasta!~rickmasta@pool-108-21-213-102.nycmny.fios.verizon.net] has joined #ruby
AzizLight [AzizLight!~AzizLight@85-168-220-242.rev.numericable.fr] has joined #ruby
shadoi [shadoi!~Adium@2001:5a8:4:68e1:ede2:5605:dd8a:41d2] has joined #ruby
guns [guns!~guns@c-98-228-72-208.hsd1.il.comcast.net] has joined #ruby
<DeeJayTwo> I'm creating an instance "b" of class "Blah"
<DeeJayTwo> I can do b.class and see it's a Blah class
<Creeture> I'm cornfused. Any idea what would have changed my Gem::dir from last week 'til now?
<DeeJayTwo> When I put b in a hash
<DeeJayTwo> and read it from another method of the the same calling class
<DeeJayTwo> I see NilClass
<DeeJayTwo> why?
<davidcelis> DeeJayTwo: give us a gist of exactly what you're doing
libertyprime [libertyprime!~libertypr@182.236.125.102] has joined #ruby
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby
<DeeJayTwo> in #getArrays
<DeeJayTwo> at the end... I still can call .class and see the right Class Name...
s0ber_ [s0ber_!~s0ber@114-36-229-85.dynamic.hinet.net] has joined #ruby
y3llow_ [y3llow_!~y3llow@114-36-229-85.dynamic.hinet.net] has joined #ruby
<DeeJayTwo> but when I do it from another method (arrayHasSomethingWrong?)
<DeeJayTwo> it puts a NilClass
<DeeJayTwo> at the end of getArrays, a puts array_status.class returns "RAIDArrayStatus"
kd0t|away [kd0t|away!~kd0t@212.117.173.78] has joined #ruby
<apeiros_> DeeJayTwo: :Status != "Status"
y3llow [y3llow!~y3llow@114-36-229-85.dynamic.hinet.net] has joined #ruby
trivol [trivol!~aurelien@81.57.175.21] has joined #ruby
<DeeJayTwo> a puts aid returns {"Status"=>OK}
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
y3llow [y3llow!~y3llow@114-36-229-85.dynamic.hinet.net] has joined #ruby
<apeiros_> DeeJayTwo: line 31 in your gist is `return true if aid[:Status].to_i != 1`
<apeiros_> line 30 actually
<apeiros_> and in line 29 you use :Status too
<apeiros_> but elsewhere you use "Status"
<apeiros_> again, "Status" and :Status are two different things.
<Tasser> apeiros_, :-(
y3llow [y3llow!~y3llow@114-36-229-85.dynamic.hinet.net] has joined #ruby
<apeiros_> Tasser: why the long face? because of saturday?
<Tasser> kind of
<DeeJayTwo> apeiros_ : What's the difference?
<DeeJayTwo> apeiros_ : It indeed fixed the problem
<apeiros_> DeeJayTwo: do a .class on both and see.
jessopher [jessopher!~jessopher@optimusbrine.com] has joined #ruby
<apeiros_> then read the docs of both classes.
Tuxist [Tuxist!~quassel@host-091-097-105-152.ewe-ip-backbone.de] has joined #ruby
<DeeJayTwo> Nice
<DeeJayTwo> THank you
dotplus [dotplus!~dotplus@allgoodbits.com] has quit [#ruby]
<looopy_> just a general newb question..but how do you use api urls? like for instance i have http://api.worldbank.org/incomeLevels/LIC/countries
fahadsadah [fahadsadah!fahad@unaffiliated/fahadsadah] has joined #ruby
<danheberden> looopy_ i'd use the json gem and do something like http://api.worldbank.org/incomeLevels/LIC/countries?format=json
<looopy_> danheberden: ok so would i use that along with...curl or something?
<looopy_> first time even touching an api...you could say i'm very green. just looking for things to play with
<danheberden> if you google downloading/reading/opening a url from ruby, you'll find how to tackle that approach
<danheberden> as for the api, youll want to look at their commands for what params are available - like ?limit=X or similar
<looopy_> ahh gotcha. that would be better then "ruby api help" lol
chaddow [chaddow!~chaddow@173-161-238-6-Philadelphia.hfc.comcastbusiness.net] has joined #ruby
<looopy_> ok thanks...i'll toy with it a bit
<danheberden> but getting it with json and parsing it into an object will give you the ability to iterate/filter/whatever the dta
<danheberden> *data
fractastical [fractastical!~jdietz@ppp-88-217-21-93.dynamic.mnet-online.de] has joined #ruby
<apeiros_> Tasser: oh, missed your 'kind of'
<apeiros_> sorry about saturday :-/
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
Cervajz [Cervajz!~Cervajz@opensuse/member/Cervajz] has joined #ruby
mikeg [mikeg!~mglenney@nat-uh-admins.apollogrp.edu] has joined #ruby
skrewler [skrewler!~skrewler@209.213.206.58] has joined #ruby
Targen [Targen!~iguana@190.39.181.108] has joined #ruby
andynu [andynu!~andynu@ich.thy.om.orpho.us] has joined #ruby
manizzle [manizzle!~manizzle@dsl081-053-082.sfo1.dsl.speakeasy.net] has joined #ruby
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
kdrsx [kdrsx!~quassel@186.87.191.80] has joined #ruby
akem [akem!~akem@127.147.12.93.rev.sfr.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
youdonotexist [youdonotexist!~youdonote@192.206.158.10] has joined #ruby
cooper [cooper!~mitchell@unaffiliated/furryfishy] has joined #ruby
jgrimes_ [jgrimes_!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
LittleBill902__ [LittleBill902__!~smith@c-71-197-103-184.hsd1.ca.comcast.net] has joined #ruby
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
iamjarvo [iamjarvo!~Adium@c-71-230-13-201.hsd1.nj.comcast.net] has joined #ruby
<shevy> SATURDAY
<shevy> WHAT HAPPENED ON SATURDAY
enroxorz [enroxorz!~enroxorz@65-117-22-130.dia.static.qwest.net] has joined #ruby
enroxorz [enroxorz!~enroxorz@unaffiliated/enroxorz] has joined #ruby
<Creeture> Can't scroll back far enough to see if my question was answered… Where is Gem::dir defined as in ruby -rubygems -e 'puts Gem::dir'?
ceej [ceej!~anonymous@cpe-72-190-40-203.tx.res.rr.com] has joined #ruby
LiquidInsect [LiquidInsect!~billabney@173-228-63-32.dsl.static.sonic.net] has joined #ruby
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby
djMax [djMax!266f2072@gateway/web/freenode/ip.38.111.32.114] has joined #ruby
Ch4rAzZz [Ch4rAzZz!~jiri@HSI-KBW-095-208-069-177.hsi5.kabel-badenwuerttemberg.de] has joined #ruby
<djMax> new to ruby. What does this line by itself in a function mean: "%.2f" % self[prop]
adac [adac!~adac@85-127-39-241.dynamic.xdsl-line.inode.at] has joined #ruby
<djMax> I need to handle if self[prop] is null, because it blows up, but can't seem to get the syntax right
<ReinH> djMax: % is String#%, it's short hand for printf
<Creeture> djMax: Try wrapping it in a if self[prop] … end
<ReinH> "%.2f" % self[prop] if self[prop]
<djMax> yes, but if it's null I need to return something too right?
<ReinH> djMax: dunno, do you?
<djMax> yes. :)
<Creeture> Don't know. Do you?
* Creeture feels like ReinH is in his head.
axl_ [axl_!~axl@173-11-52-113-Minnesota.hfc.comcastbusiness.net] has joined #ruby
<djMax> I feel like this is missing "return" but I assume that's on purpose
<ReinH> self[prop] ? "%.2f" % self[prop] : something_else
<havenn> djMax: self[prop] ? %.2f" % self[prop] : nil
g0bl1n [g0bl1n!~prokter@a213-22-27-14.cpe.netcabo.pt] has joined #ruby
<ReinH> havenn: if it's just nil that's unnevecessary
<ReinH> "foo" if false #=> nil
<havenn> ReinH: good point =P
adac [adac!~adac@85-127-39-241.dynamic.xdsl-line.inode.at] has joined #ruby
<djMax> so this: "%.2f" % self[prop] if self[prop] #=> nil
<djMax> ?
<iamjarvo> can i check if params is nil and use another value ? something like this params[:line_item][w.id.to_s.to_sym][:quantity] unless params[:line_item][w.id.to_s.to_sym][:quantity].nil?
<djMax> sometimes I wonder how this syntax can bear to look itself in the mirror
<adac> hi guys. is it possible to open and output a file like that: File.expand_path('~') + "/some.log") { |f| f.read } ...but output it from bottom up?
<havenn> ReinH: Not just unnecessary, a horrid antipattern. I'll say some extra Hail Marys just to be safe!
Caius [Caius!~Caius@about/apple/macbookpro/Caius] has joined #ruby
QKO [QKO!~reaVer@banzai.speedxs.nl] has joined #ruby
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
jamiejackson [jamiejackson!~jamie@unaffiliated/jamiejackson] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-35-117.telstraclear.net] has joined #ruby
drd2 [drd2!53a0482e@gateway/web/freenode/ip.83.160.72.46] has joined #ruby
LittleBill902 [LittleBill902!~smith@c-76-114-25-2.hsd1.ca.comcast.net] has joined #ruby
<Creeture> Wow…that was nice. Somebody ran gem update —system on me and it changed the Gem::dir from /usr/lib to /usr/lib64 on *one* of my build machines. What a pain in the n00ts.
gioele [gioele!~gioele@unaffiliated/gioele] has joined #ruby
spike2251 [spike2251!~user@c-76-24-24-228.hsd1.ma.comcast.net] has joined #ruby
gioele [gioele!~gioele@unaffiliated/gioele] has quit [#ruby]
billy_ran_away [billy_ran_away!~billy_ran@173-167-194-14-ip-static.hfc.comcastbusiness.net] has joined #ruby
robbkidd [robbkidd!896461f2@gateway/web/freenode/ip.137.100.97.242] has joined #ruby
Lord-Harlot [Lord-Harlot!~Serenity@adsl-87-102-126-62.karoo.KCOM.COM] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-38-253.telstraclear.net] has joined #ruby
mksm [mksm!mksm@pdpc/supporter/professional/mksm] has joined #ruby
minijupe [minijupe!~benlieb@adsl-74-243-183-162.ard.bellsouth.net] has joined #ruby
<billy_ran_away> How come on rubular.com it shows 3 results for /\{([^}]*)\}/ for my string "{a}{b}{c}" but my irb console shows "{a}{b}{c}".match(/\{([^}]*)\}/).captures.count => 1
albemuth [albemuth!~albemuth@209.213.178.170] has joined #ruby
<shadoi> rubular is 1.8, so possibly it's slightly different behavior.
<shadoi> not sure though
<samuelkadolph> It's not that
<samuelkadolph> It's because it's the same capture that was matched 3 times
<shadoi> ah
<samuelkadolph> I can't remember how or if you can get all 3
minijupe_ [minijupe_!~benlieb@adsl-74-243-183-162.ard.bellsouth.net] has joined #ruby
<shadoi> .match returns an array of them I thought
<samuelkadolph> No it turns an instance of MatchData
<samuelkadolph> returns*
<billy_ran_away> shadoi: Well their captures, not matches...
<billy_ran_away> samuelkadolph: I started playing with .scan and that kinda works after I .flatten it.
<billy_ran_away> samuelkadolph: Which makes it look ugly...
skrewler [skrewler!~skrewler@209.213.206.58] has joined #ruby
minijupe [minijupe!~benlieb@adsl-74-243-183-162.ard.bellsouth.net] has joined #ruby
<samuelkadolph> Yeah, you have to use String#scan
manizzle_ [manizzle_!~manizzle@dsl081-053-082.sfo1.dsl.speakeasy.net] has joined #ruby
<billy_ran_away> samuelkadolph: Why is it doing an array of arrays?
flexd2 [flexd2!~flexd@dev.flexd.net] has joined #ruby
<samuelkadolph> Because you have a capture in it
<samuelkadolph> It's so you can get all of the captures of each match
<samuelkadolph> Removing the capture makes it return just an array
andrewhl [andrewhl!~andrew@67.230.167.6] has joined #ruby
<billy_ran_away> samuelkadolph: Okay cool, you know off hand how to get the {}'s as look ahead and look behinds?
<billy_ran_away> samuelkadolph: I can look it up and figure it out myself, but if you know off the top of your head...
<samuelkadolph> Nope, a regexp guru I am not
<billy_ran_away> samuelkadolph: Okay well thanks for your help!
tar_ [tar_!~tar@d118-75-81-132.try.wideopenwest.com] has joined #ruby
<billy_ran_away> shadoi: And you too shadoi!
<billy_ran_away> Really appreciate it guy.
<billy_ran_away> *guys
billy_ran_away [billy_ran_away!~billy_ran@173-167-194-14-ip-static.hfc.comcastbusiness.net] has quit [#ruby]
<shadoi> meh, I just muddied the water. ;)
Aaaarg [Aaaarg!~Arthur@121-74-42-193.telstraclear.net] has joined #ruby
ElitestFX [ElitestFX!~ElitestFX@unaffiliated/elitestfx] has joined #ruby
zerdman [zerdman!~zerdman@71.255.123.66] has quit [#ruby]
Manhose [Manhose!~Manhose@bl6-36-103.dsl.telepac.pt] has joined #ruby
robbkidd [robbkidd!896461f2@gateway/web/freenode/ip.137.100.97.242] has joined #ruby
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-46-193.telstraclear.net] has joined #ruby
<shevy> GOOD!
techhelp [techhelp!~Dan@firebox.rsmart.com] has joined #ruby
<shevy> CONFUSION IS THE VERY BASIS FOR LANGUAGE CREATION
<shevy> LO AND BEHOLD, THERE WAS PERL AND GREAT CONFUSION AND THEN THERE WAS RUBY AND THE CONFUSION DECLINED
eko [eko!~eko@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has joined #ruby
eko [eko!~eko@unaffiliated/eko] has joined #ruby
albemuth [albemuth!~albemuth@209.213.178.170] has joined #ruby
kartouch [kartouch!~kartouch@kartouch.ic-clear.eu] has quit ["Quitte"]
v0id [v0id!~v0id@nat/hp/x-kkcledfgjdfmohnr] has joined #ruby
<shadoi> And then there was python, and confusion was prohibited, so the people rebelled.
techhelp [techhelp!~Dan@firebox.rsmart.com] has quit [#ruby]
nikmus [nikmus!~nikmus@188.123.151.228] has joined #ruby
nikmus [nikmus!~nikmus@188.123.151.228] has quit [#ruby]
paissad [paissad!~paissad@89-92-16-151.hfc.dyn.abo.bbox.fr] has joined #ruby
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
statarb3 [statarb3!~CoreD@546A56AA.cm-12-3b.dynamic.ziggo.nl] has joined #ruby
statarb3 [statarb3!~CoreD@unaffiliated/statarb3] has joined #ruby
<csmrfx> THEN THERE WAS RUBY AND YOU COULD PROGRAM CONFUSION TO BECOME COHESION IF NOT DEFINED
spike2251 [spike2251!~user@c-76-24-24-228.hsd1.ma.comcast.net] has joined #ruby
<csmrfx> *UNLESS
axl__ [axl__!~axl@173-11-52-113-Minnesota.hfc.comcastbusiness.net] has joined #ruby
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
kennethreitz [kennethreitz!~kennethre@c-24-127-96-129.hsd1.va.comcast.net] has joined #ruby
Aaaarg [Aaaarg!~Arthur@121-74-33-56.telstraclear.net] has joined #ruby
Jake232 [Jake232!~textual@5e0eb192.bb.sky.com] has joined #ruby
michael_mbp [michael_mbp!~Marin@112.134.196.79] has joined #ruby
billy_ran_away [billy_ran_away!~billy_ran@173-167-194-14-ip-static.hfc.comcastbusiness.net] has joined #ruby
<billy_ran_away> Let's say I have two classes and those classes share some methods, I'd make a module right?
<Tasser> shadoi, nah, python is explicit, no confusion ;-)
<samuelkadolph> billy_ran_away: And include it in both classes
<billy_ran_away> samuelkadolph: Yep, now what happens if this shared method needs to be called different things in each class?
<samuelkadolph> billy_ran_away: alias
<billy_ran_away> samuelkadolph: But it's otherwise the same...
<billy_ran_away> samuelkadolph: In the classes?
<samuelkadolph> billy_ran_away: Yes
<billy_ran_away> Okay cool
<billy_ran_away> samuelkadolph: Thanks again!
<shadoi> Tasser: that was my point.
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
<shadoi> or… lame joke.
Aaaarg [Aaaarg!~Arthur@121-74-35-148.telstraclear.net] has joined #ruby
cousine [cousine!~cousine@196.221.61.89] has joined #ruby
rramsden [rramsden!~rramsden@s64-180-62-209.bc.hsia.telus.net] has joined #ruby
<Tasser> shadoi, oh, prohibited. I'm tired...
axl_ [axl_!~axl@173-11-52-113-Minnesota.hfc.comcastbusiness.net] has joined #ruby
fayimora [fayimora!~fayimora@2a01:388:201:3721:1c4a:926e:6409:20b4] has joined #ruby
mengu_ [mengu_!~mengu@78.184.201.123] has joined #ruby
mengu_ [mengu_!~mengu@unaffiliated/mengu] has joined #ruby
ianbrandt [ianbrandt!~ianbrandt@99-111-99-153.uvs.sndgca.sbcglobal.net] has joined #ruby
bingomanatee [bingomanatee!~bingomana@204.28.126.210] has joined #ruby
<bingomanatee> Can you stream content through rack?
<shadoi> Unicorn supports it, it's implemented outside of rack though.
albemuth [albemuth!~albemuth@209.213.178.170] has joined #ruby
<shevy> unicorn
<shevy> red bull
<apeiros_> red unicorn
<apeiros_> unibull
<shevy> swissorn!!!
TheShadowFog [TheShadowFog!~TheShadow@ool-1826fa3a.dyn.optonline.net] has joined #ruby
<billy_ran_away> samuelkadolph: Hey you got a second, I'm having trouble thinking of how to design something, hoping I could throw something at you...
<samuelkadolph> There are others here to help as well. So just ask.
<shevy> ask samuelkadolph
<billy_ran_away> Okay well I have some classes that all have a different variable that although named differently, all have "masks".
<billy_ran_away> Masks are variables to substitute in to the variable.
bafilius [bafilius!~lee@wsip-174-75-64-190.sb.sd.cox.net] has joined #ruby
<billy_ran_away> The masks are really different methods to be called on the "parent".
<billy_ran_away> So I'd like this to be a variable type class, like String…
<billy_ran_away> For example, d = MaskedAttribute.new("{foo}-{bar}", :foo, :bar)
jergason [jergason!~jergason@208.97.56.66] has joined #ruby
<shadoi> So just subclass String and add your method.. ?
<billy_ran_away> then d.to_s would return #{parent.send(:foo)}-#{parent.send(:bar)}
<csmrfx> you want code inheritances nao?
<billy_ran_away> shadoi: But how does String know who it's "parent" is? Is that available under caller?
<billy_ran_away> csmrfx: I don't know? : )
<csmrfx> billy_ran_away: you are doing class based inheritance on your own?
<shadoi> ancestors
blaenk [blaenk!~blaenk@unaffiliated/blaenkdenum] has joined #ruby
<csmrfx> why not use the builtin class -> object -hegemony
<billy_ran_away> csmrfx: I'm not sure...
<billy_ran_away> csmrfx: I'm not familiar with that...
<csmrfx> exactly what I was thinking
<billy_ran_away> shadoi: ancestors is that a method available to classes?
<csmrfx> so, look into how ruby does oop and implements inheritance
<shadoi> billy_ran_away: try it in irb.
<csmrfx> billy_ran_away: do you really mean classes, or did you actually mean object-instances?
<billy_ran_away> Here's what I have so far… http://pastie.org/3023373
<billy_ran_away> I haven't even gotten to a point of testing yet...
<billy_ran_away> I'm still grabbling with the design...
<csmrfx> irb is your friend
libertyprime [libertyprime!~libertypr@182.236.125.102] has joined #ruby
luckyruby [luckyruby!~luckyruby@125-187.96-97.tampabay.res.rr.com] has joined #ruby
<csmrfx> seems to me like you could do that simply by subclassing and (re)defining methods
<csmrfx> but not really sure what it is you're doing
bier|tp [bier|tp!~bier@p54A5BDAE.dip.t-dialin.net] has joined #ruby
nanoyak [nanoyak!~nanoyak@50-0-164-69.dsl.dynamic.sonic.net] has joined #ruby
<billy_ran_away> csmrfx: Possibly I could… I'm just trying to make "masks" which are really methods to be run on the ancestor of the MaskedAttribute class.
<billy_ran_away> I need to be able access both the "unmasked" string, i.e. with what is to be run against the ancestor, the masked string, that is the string with methods already ran on the ancestor, and an array of the masks themselves.
<billy_ran_away> http://pastie.org/3023400
<billy_ran_away> A little more work...
tshauck [tshauck!~tshauck@129.237.222.1] has joined #ruby
vjacob [vjacob!~vjacob@94-195-174-165.zone9.bethere.co.uk] has joined #ruby
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
LiquidInsect [LiquidInsect!~billabney@173-228-63-32.dsl.static.sonic.net] has joined #ruby
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
<csmrfx> I guess I would simply make a String class that had accessor for the mask value and methods to mask the strings
<billy_ran_away> csmrfx: The methods have to be run against the ancestor...
<csmrfx> but you probably have a better idea what it is that needs to be done
* apeiros_ doesn't get what billy_ran_away tries to do…
<apeiros_> got an example how that is used? o0
<billy_ran_away> shadoi: Speaking of which, ancestor is returning undefined variable or method.
<apeiros_> (only out of curiosity)
<csmrfx> ancestor as a term refers to the class that another class inherits from
<shadoi> billy_ran_away: run String.ancestors (plural) in irb.
<billy_ran_away> apeiros_: def test; "123"; end; t = MaskedAttribute.new("test-{test}", :test)
<billy_ran_away> t.to_s # => "test-123"
<billy_ran_away> t.masks => [ :test ]
<csmrfx> object instances dont have ancestors, but they might be able to run methods from the ancestor class
<billy_ran_away> t.unmasked => "test-{test}"
<apeiros_> so many times 'test' - I don't know what relates to what…
<csmrfx> unless your design includes some other ancestor-descendant axle
robbyoconnor [robbyoconnor!~wakawaka@guifications/user/r0bby] has joined #ruby
<billy_ran_away> csmrfx: It doesn't...
<apeiros_> also, how can MaskedAttribute access that test method?
<billy_ran_away> apeiros_: That's what I'm trying to figure out.
awesome_ [awesome_!~awesome@212.62.202.84.customer.cdi.no] has joined #ruby
<csmrfx> billy_ran_away: so do you really mean that you want a subclass to inherit methods from its parent-class
<apeiros_> billy_ran_away: why do you need that?
<apeiros_> or what do you need that for?
<billy_ran_away> apeiros_: Its for a Rails thing...
<billy_ran_away> csmrfx: Maybe… I'm not sure to be honest.
<apeiros_> that of course explains all… :) (seriously, still no idea why you try to do what you do - and still don't really get what you actually try to do)
<billy_ran_away> apeiros_: We're like 1" from the ground, I could fly you up to like 1000ft if you want…
<apeiros_> from the simple example, it looks a bit like you reinvent templating
<billy_ran_away> apeiros_: Bingo!
<shadoi> billy_ran_away: try to write some code that shows the way you want it to be used, that may clarify things a bit.
<csmrfx> lol
<apeiros_> billy_ran_away: the common way is to pass an object or a binding then
<csmrfx> or just write a test first
mxweas_ [mxweas_!~max@c-71-226-112-145.hsd1.az.comcast.net] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
<apeiros_> class Foo; def test; 123; end; end; foo = Foo.new; Template.new('my foo is: {foo}', foo).to_s # => "my foo is: 123"
<billy_ran_away> Where is this template class?
nari [nari!~nari@p62e324.totrnt01.ap.so-net.ne.jp] has joined #ruby
<csmrfx> yes
<apeiros_> nowhere
<apeiros_> but that'd be trivial to implement
<csmrfx> next thing you know: he wants ancestors
<billy_ran_away> I must be doing this wrong...
<billy_ran_away> Imagine you're making an art museum layout web app...
<shadoi> lol
<shadoi> I'd rather not.
<apeiros_> billy_ran_away: http://pastie.org/3023466
jbpros_ [jbpros_!~jbpros@185.55-66-87.adsl-dyn.isp.belgacom.be] has joined #ruby
<apeiros_> if that helps you
asobrasil [asobrasil!~asantioli@palpatine.privatedns.com] has quit [#ruby]
<shadoi> which is pretty much exactly what Mustache is. :)
<csmrfx> layout as in web page or floorplan or magazine page
<billy_ran_away> apeiros_: I think it does...
<billy_ran_away> csmrfx: floorplan.
<billy_ran_away> apeiros_: I was hoping to not have to explicitly pass the obj.
<csmrfx> lol
pietrodibello [pietrodibello!~pietrodib@93-50-51-86.ip151.fastwebnet.it] has joined #ruby
<apeiros_> that'll be difficult
berserkr [berserkr!~david@212.122.111.205.dyn.user.ono.com] has joined #ruby
<csmrfx> you could have all the properties picked from template, combined into one string, and have that as a key
<apeiros_> unless all your methods are defined on a single global object (or similar)
<apeiros_> iow, unless your object can be somehow inferred, it'll be very difficult without passing it.
<csmrfx> then you could also flatten objects ... hmm
<shadoi> You could make a class method like: mask_attributes :blah, :foo
<shadoi> use a Module to add the behavior to those attributes.
h4mz1d [h4mz1d!~hamfz@c-69-244-5-169.hsd1.al.comcast.net] has joined #ruby
<billy_ran_away> apeiros_: http://pastie.org/3023483 - this could work for me...
<apeiros_> billy_ran_away: what's the :bar for there?
<billy_ran_away> apeiros_: Oh I need to be present all possible masks back to the user...
<apeiros_> billy_ran_away: you can extract them from the string
randym [randym!~randym@EM111-191-5-133.pool.e-mobile.ne.jp] has joined #ruby
<billy_ran_away> Here's an even easy thing to imagine....
<billy_ran_away> Imagine an mp3 naming program....
<apeiros_> .scan(/\{(\w+)\}/).flatten
<csmrfx> well, now that thats taken care of...
<apeiros_> billy_ran_away: also, what's so bad about having to pass in self there?
<billy_ran_away> I would want to be able to offer the user a chance to structure how the mp3 will be displayed on an individual mp3 basis...
pietrodibello [pietrodibello!~pietrodib@93-50-51-86.ip151.fastwebnet.it] has quit [#ruby]
<billy_ran_away> apeiros_: Nothing per say… just easy if I don't have to since I want to ActiveRecord's composed_of method.
<billy_ran_away> apeiros_: Not all possible choices are going to be in the name the first time it's set...
<billy_ran_away> Imagine I have an ActiveRecord with the following attributes, :display, :artist, :album, :track, :title, :year...
<LiquidInsect> 4
<billy_ran_away> I want to be present to the user a way to set the display attribute and have it be composed of masks of the rest of the attributes.
fractastical [fractastical!~jdietz@ppp-88-217-21-93.dynamic.mnet-online.de] has joined #ruby
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby
<shadoi> 2
<apeiros_> "per say"? per se?
<billy_ran_away> apeiros_: yes that too : )
<macmartine> What's the best way to search a file for squiggly brackets, return what's inside them, then replace the brackets and everything inside? https://gist.github.com/1483389
_debo [_debo!~marco.deb@cpc18-enfi16-2-0-cust743.hari.cable.virginmedia.com] has joined #ruby
<shadoi> or.. "please write my parser for me"
<macmartine> oh, geez
<shadoi> macmartine: scroll up, someone wrote something that will get you almost there about 15 lines up
<macmartine> shadoi: i just logged on , so i don't have it
<apeiros_> billy_ran_away: http://pastie.org/3023504
<billy_ran_away> So in the ActiveRecord rb file I would want to do composed_of :display_title, :mapping => %w(value display), :constructor => Proc.new { |value| MaskedAttribute.new(value, :artist, :album, :year, :track, :title)}
<apeiros_> oh dear, midnight
<apeiros_> gtg
<apeiros_> gn8
<billy_ran_away> apeiros_: Thanks for your help
noobus [noobus!~noobus@137.229.18.180] has joined #ruby
thatryan [thatryan!~thatryan@c-24-4-167-46.hsd1.ca.comcast.net] has joined #ruby
<csmrfx> macmartine: split into arr by bracket open? split each by bracket close and discard latter
noobus [noobus!~noobus@137.229.18.180] has quit [#ruby]
<apeiros_> macmartine: funny enough, what I wrote for billy_ran_away does something along that…
<billy_ran_away> apeiros_: I know right! : )
<billy_ran_away> apeiros_: Thanks agian
<apeiros_> macmartine: string.scan(/\{(\w+)}/).flatten # <-- get content in curly braces from string
<apeiros_> macmartine: string.gsub(/\{(\w+)}/ …block or string here - depends on what you want to do…) # <-- replace them
<apeiros_> depending on what can be within the curly braces, you'll have to adapt the \w+ term
<apeiros_> e.g. [^}]* for anything but the closing brace.
<macmartine> apeiros_: just a number. ok, i'll see what i can do with that.
<macmartine> thanks!
<apeiros_> \d+ then
* apeiros_ off
<csmrfx> gn
benofsky [benofsky!~benofsky@rrcs-184-74-205-234.nyc.biz.rr.com] has joined #ruby
spike2251 [spike2251!~user@c-76-24-24-228.hsd1.ma.comcast.net] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
cjs226 [cjs226!~cjs226@99-61-65-242.lightspeed.austtx.sbcglobal.net] has joined #ruby
tar_ [tar_!~tar@d118-75-81-132.try.wideopenwest.com] has joined #ruby
jbpros [jbpros!~jbpros@185.55-66-87.adsl-dyn.isp.belgacom.be] has joined #ruby
catphish_ [catphish_!~charlie@2001:9d8:2005:12::3] has joined #ruby
<catphish_> is it possible to override enough Kernel methods to make it relatively safe to eval untrusted code?
ceej [ceej!~anonymous@cpe-72-190-40-203.tx.res.rr.com] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
<shevy> catphish_ isn't there a sandbox feature or wasn't there once?
<shevy> and there is BasicObject I think
rpowell [rpowell!~rpowell@CPE-58-168-99-83.lns7.ken.bigpond.net.au] has joined #ruby
<csmrfx> simply override eval
rpowell [rpowell!~rpowell@CPE-58-168-99-83.lns7.ken.bigpond.net.au] has joined #ruby
<catphish_> what will overriding eval do?
<csmrfx> it will make Kernel safe from untrusted code
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
<nlew> It depends how safe you're looking for
<catphish_> csmrfx: how so?
<csmrfx> :}
<catphish_> there was a sandbox but afaik its an unmaintained 1.8
<nlew> Setting $SAFE is a start
matti [matti!matti@acrux.romke.net] has joined #ruby
matti [matti!matti@madwifi/support/matti] has joined #ruby
<catphish_> i basically want a 1.9.3 sandbox
roadze [roadze!~roadze@119.224.137.97] has joined #ruby
<catphish_> it will have no filesystem write permissions or network access
Sigma00 [Sigma00!~freenode@thankyouforhelpingushelpyouhelpusall.net] has joined #ruby
<catphish_> but i'm not sure what else i can do to improve on that
Samoi [Samoi!~Salmon-fr@cl-164.wlg-01.nz.sixxs.net] has joined #ruby
Samoi [Samoi!~Salmon-fr@unaffiliated/root-ninja/x-7047552] has joined #ruby
atmosx [atmosx!~atmosx@191.116.broadband5.iol.cz] has joined #ruby
<shevy> the old sandbox was written by _why I think
<catphish_> i can override a bunch of functions like ` Exec System require etc
<shevy> it was said that it should be included into 1.9.x but I think we only have BasicObject
<catphish_> shevy: yes it was
<catphish_> how does BasicObject help?
<shevy> I am not sure... there was a specific use case, which triggered its creation
<shevy> lemme google
<catphish_> ok
<shevy> "BasicObject is the parent class of all classes in Ruby. It's an explicit blank class."
<shevy> or perhaps it is just the tabula rasa object
<shevy> "clean state" core object
<shevy> "BasicObject can be used for creating object hierarchies independent of Ruby's object hierarchy, proxy objects like the Delegator class, or other uses where namespace pollution from Ruby's methods and classes must be avoided."
<shevy> hmm
<shevy> that description does not sound like sandboxed objects
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<looopy> hi i'm having trouble getting printing json... what am i missing? http://pastie.org/3023626
<shevy> "#__id__ moved from Object to BasicObject"
<shevy> "BasicObject is the new grand-daddy of the inheritance tree in Ruby 1.9 and in 1.9.3 it gains access to the functionality of the object_id method by way of __id__ which has been moved into BasicObject from Object. This may help those of you using BasicObject for delegators, proxies, and the like."
<stpetersburg> shevy: those bitches need to add a #inspect or #to_s to BasicObject too as it breaks in a REPL context
<shevy> hehe
<csmrfx> or, you need an irb wrapper for BasicObject
<shevy> hmm
<shevy> irb code is so messy
<macmartine> How come 'puts (Date.today + 1).to_s' throws 'expected numeric' when in a rake file, but not in IRB?
Brozilla [Brozilla!~Brozilla@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
awesome__ [awesome__!~awesome@212.62.202.84.customer.cdi.no] has joined #ruby
<catphish_> i can only assume that rake extends Date
<macmartine> i have require 'date'
<shevy> hmm or perhaps it tries to use the return value
<catphish_> ah yes thats likely
<catphish_> try returning 0
<shevy> and since it returns nil, it could say that it expected something else
<shevy> but I have to say, I find rake somewhat annoying :/
<macmartine> how does it return nil?
<catphish_> thats what puts returns
<shevy> puts would always return nil afaik
<catphish_> indeed
<shevy> can you upload some larger context into a file macmartine ? so I could test
<macmartine> ah, so how might i get around this?
<shevy> or hmm lemme test here...
rramsden [rramsden!~rramsden@s64-180-62-209.bc.hsia.telus.net] has joined #ruby
<catphish_> macmartine: return 0
<catphish_> after the puts
<catphish_> hmm, you return false
<catphish_> beats me
<shevy> undefined method `today' for Date:Class
<macmartine> require 'date'
<shevy> odd
<catphish_> full stack trace?
Lord-Harlot [Lord-Harlot!~Serenity@adsl-87-102-126-62.karoo.KCOM.COM] has joined #ruby
<macmartine> catphish_: https://gist.github.com/1483523
<shevy> hmmm
<catphish_> ooh
<catphish_> a is not a number
<seejohnrun> shevy: require 'date'
<catphish_> its a string
<shevy> active_support/core_ext/date/calculations.rb:90:in `plus_with_duration'
<catphish_> try a.to_i
<catphish_> puts (Date.today + 1).to_s was a lie!
<shevy> lol
<macmartine> doh, that did it. thanks!!!
wmoxam_ [wmoxam_!~wmoxam@69-196-139-164.dsl.teksavvy.com] has joined #ruby
<shevy> fooled us!
<shevy> catphish_ snooped it down
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
<catphish_> sometimes strings are automatically converted to numbers
<macmartine> catphish_: hah, i guess you're right.
<catphish_> but its best to do it manually
<macmartine> thanks guys
<catphish_> no problem
<catphish_> tbh the error was pretty clear about the problem ;)
<catphish_> seejohnrun: yes?
<catphish_> seejohnrun: there's 2 parts to Date, some core stuff in C, and some extensions in Ruby
<seejohnrun> catphish_: i know.. i thought someone was asking why no `Date.today`
<catphish_> i don't think so
<seejohnrun> catphish_: k
h4mz1d [h4mz1d!~hamfz@c-69-244-5-169.hsd1.al.comcast.net] has joined #ruby
vandemar [vandemar!bella@2001:470:1f10:56b::4] has joined #ruby
<atmosx> Hello
<atmosx> I'm trying to install sqlite3 gem on a local dir, and the install script tries to change permissions
<atmosx> I don't have root access to this server, is there any way to disable permission switch?
<atmosx> here's the error http://pastebin.com/ZNRbia7Z
Steppenwolf [Steppenwolf!~maus@86-45-26-32-dynamic.b-ras1.wtd.waterford.eircom.net] has joined #ruby