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/
alse [alse!~Alex@108.162.180.72] has joined #ruby
philcrissman_ [philcrissman_!~philcriss@206.57.45.116] has joined #ruby
samuel02 [samuel02!~samuel02@c-46-162-87-154.cust.bredband2.com] has joined #ruby
albemuth [albemuth!~albemuth@201.198.78.18] has joined #ruby
CodeZombie [CodeZombie!~CodeZombi@65.19.245.153] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
fayimora [fayimora!~fayimora@95.175.159.42] has joined #ruby
tesmar [tesmar!~tesmar@adsl-74-242-255-79.rmo.bellsouth.net] has joined #ruby
fixl [fixl!~fixl@203.214.34.17] has joined #ruby
cespare [cespare!~cespare@eng.nat.mtv.ooyala.com] has joined #ruby
cespare [cespare!~cespare@eng.nat.mtv.ooyala.com] has quit [#ruby]
td123 [td123!~tom@archlinux/trusteduser/td123] has joined #ruby
h4mz1d [h4mz1d!~hamfz@99-0-57-199.lightspeed.tsclal.sbcglobal.net] has joined #ruby
cespare [cespare!~cespare@eng.nat.mtv.ooyala.com] has joined #ruby
replore [replore!~replore@203.152.213.161.static.zoot.jp] has joined #ruby
thecreators [thecreators!~rskagy@cpe-65-27-201-150.cinci.res.rr.com] has joined #ruby
juarlex [juarlex!~juarlex@189.249.64.139] has joined #ruby
_debo [_debo!~marco.deb@cpc18-enfi16-2-0-cust743.hari.cable.virginmedia.com] has joined #ruby
td123 [td123!~tom@archlinux/trusteduser/td123] has quit ["WeeChat 0.3.6"]
stringoO [stringoO!~JLstring@bas1-toronto42-1279598844.dsl.bell.ca] has joined #ruby
davidcelis [davidcelis!~david@70-89-180-6-smc-or.hfc.comcastbusiness.net] has joined #ruby
ConstantineXVI [ConstantineXVI!~constanti@74-138-221-74.dhcp.insightbb.com] has joined #ruby
mengu [mengu!~mengu@95.13.68.170] has joined #ruby
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
Constant_ [Constant_!~constanti@74-138-221-74.dhcp.insightbb.com] has joined #ruby
randym [randym!~randym@113x33x226x118.ap113.ftth.ucom.ne.jp] has joined #ruby
crazed [crazed!~crazed@unaffiliated/cr4z3d] has joined #ruby
CreativeEmbassy [CreativeEmbassy!~CreativeE@pool-72-72-205-186.altnpa.east.verizon.net] has joined #ruby
_debo [_debo!~marco.deb@cpc18-enfi16-2-0-cust743.hari.cable.virginmedia.com] has joined #ruby
josh___ [josh___!~josh@74-95-43-126-Oregon.hfc.comcastbusiness.net] has joined #ruby
toy_battery [toy_battery!~choldbroo@c-67-181-185-107.hsd1.ca.comcast.net] has joined #ruby
arpegius [arpegius!~arpegius@c-50-133-254-74.hsd1.ma.comcast.net] has joined #ruby
cespare [cespare!~cespare@eng.nat.mtv.ooyala.com] has joined #ruby
banisterfiend [banisterfiend!~baniseter@122.63.230.166] has joined #ruby
fermion [fermion!~textual@pool-108-7-224-176.bstnma.fios.verizon.net] has joined #ruby
<zaargy>
so i have a regular expression and i want to generate a pattern that matches that regular expression, any ideas?
<banisterfiend>
zaargy: there's a gem for that
Skaag [Skaag!~Skaag@cpe-67-247-51-89.nyc.res.rr.com] has joined #ruby
achiu [achiu!~Adium@ip68-5-18-17.oc.oc.cox.net] has joined #ruby
esufan [esufan!~nekid@c-24-6-170-1.hsd1.ca.comcast.net] has joined #ruby
redgetan [redgetan!~reg@user226-189.wireless.utoronto.ca] has joined #ruby
<hkhalid>
anyone here using opencv with Ruby?
<hkhalid>
anyone here like paani puri or gol guppa
mxweas [mxweas!~max@199-83-223-125.PUBLIC.monkeybrains.net] has joined #ruby
beseku [beseku!~beseku@p31228-ipngn2501marunouchi.tokyo.ocn.ne.jp] has joined #ruby
ascarter [ascarter!~ascarter@209.119.253.66] has joined #ruby
headius [headius!~headius@71-210-151-185.mpls.qwest.net] has joined #ruby
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby
ksinkar [ksinkar!~ksinkar@115.241.202.178] has joined #ruby
[1]Kichael [[1]Kichael!~Kichael@70-36-49-167.dyn.novuscom.net] has joined #ruby
mxweas [mxweas!~max@199-83-223-125.PUBLIC.monkeybrains.net] has joined #ruby
maletor [maletor!~maletor@c-69-181-24-86.hsd1.ca.comcast.net] has joined #ruby
bobss8 [bobss8!4a48c6db@gateway/web/freenode/ip.74.72.198.219] has joined #ruby
dhodgkin [dhodgkin!~dhodgkin@cpe-76-178-249-57.maine.res.rr.com] has joined #ruby
mxweas [mxweas!~max@199-83-223-125.PUBLIC.monkeybrains.net] has joined #ruby
josesaldana [josesaldana!~josesalda@186.73.99.124] has joined #ruby
krz [krz!~foobar@unaffiliated/krz] has joined #ruby
radic [radic!~radic@dslb-178-002-229-035.pools.arcor-ip.net] has joined #ruby
mxweas [mxweas!~max@199-83-223-125.PUBLIC.monkeybrains.net] has joined #ruby
apok [apok!~apok@96.24.67.22] has joined #ruby
x0F_ [x0F_!~x0F@unaffiliated/x0f] has joined #ruby
blueadept [blueadept!~blueadept@72.21.137.199] has joined #ruby
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby
Norrin [Norrin!~Norrin@c-67-160-193-132.hsd1.ca.comcast.net] has joined #ruby
stoor [stoor!~stoor@ip4da85716.direct-adsl.nl] has joined #ruby
hadees [hadees!~hadees@72-48-91-73.dyn.grandenetworks.net] has joined #ruby
mxweas [mxweas!~max@nat-sonicnet.noisebridge.net] has joined #ruby
davidcelis [davidcelis!~david@c-76-115-58-79.hsd1.or.comcast.net] has joined #ruby
Pip [Pip!~Pip@176.214.13.82] has joined #ruby
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
xsdg [xsdg!~xsdg@SIPB-VM-99.MIT.EDU] has joined #ruby
kenperkins [kenperkins!~textual@50-47-18-37.evrt.wa.frontiernet.net] has joined #ruby
manizzle [manizzle!~manizzle@pcp046785pcs.pcv.reshall.calpoly.edu] has joined #ruby
lobak [lobak!~quack@202.190.85.36] has joined #ruby
juarlex_alt [juarlex_alt!~juarlex@189.249.64.139] has joined #ruby
SamWhited [SamWhited!~SamWhited@c-71-56-64-198.hsd1.ga.comcast.net] has joined #ruby
<SamWhited>
I have a question about using Postgresql with Ruby 1.9.3 (specifically the pg gem); is that outside of the scope of this channel? (and if so, where would be the best place to ask?)
<Boohbah>
SamWhited: nobody would think less of you for asking :)
rippa [rippa!~splitta@85.158.54.234] has joined #ruby
<SamWhited>
Good to know :) (you know how some channels get...) anyhow, my problem is this: I upgarded to Ruby 1.9.3 (from 1.9.2, on rvm 1.10.1), and attempted to gem install pg. However, I get the error "Can't find the PostgreSQL client library (libpq)" although it is installed, and it finds pg_config, and the include files fine.
<SamWhited>
It finds libpq-dev and libpq5 alright; but then can't bind to them for some reason (in the output it has a few lines like "checking for PQconnectdb() in -lpq... no")
ank [ank!~ank@c-67-172-16-188.hsd1.pa.comcast.net] has joined #ruby
davidboy [davidboy!u3228@gateway/web/irccloud.com/x-oxfnpxrbhztuiymz] has joined #ruby
Doppp [Doppp!~Doppp@unaffiliated/doppp] has joined #ruby
denysonique_ [denysonique_!u484@gateway/web/irccloud.com/x-auuosopbincjrwcv] has joined #ruby
MetaCosm [MetaCosm!u514@gateway/web/irccloud.com/x-cfxxmrxaprekompe] has joined #ruby
patricksroberts [patricksroberts!u3278@gateway/web/irccloud.com/x-jrogrmemlvmiatfw] has joined #ruby
_|christian|_ [_|christian|_!~christian@190.42.250.168] has joined #ruby
SeanTAllen [SeanTAllen!u4855@gateway/web/irccloud.com/x-jktdysnetigfersj] has joined #ruby
shaatar [shaatar!u648@gateway/web/irccloud.com/x-qqjjpjohzqdhocby] has joined #ruby
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has quit ["Leaving"]
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby
headius [headius!~headius@71-210-151-185.mpls.qwest.net] has joined #ruby
cylence [cylence!~cylence@68.25.78.77] has joined #ruby
manizzle [manizzle!~manizzle@pcp046785pcs.pcv.reshall.calpoly.edu] has joined #ruby
kapowaz [kapowaz!u546@gateway/web/irccloud.com/x-hqqjqlskeilujjyh] has joined #ruby
cesario [cesario!u2444@gateway/web/irccloud.com/x-knjaabmemxavizej] has joined #ruby
andrewhl [andrewhl!~andrew@24-246-14-26.cable.teksavvy.com] has joined #ruby
djr [djr!~djr@dsl-208-196.madisontelco.com] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
djr [djr!~djr@dsl-208-196.madisontelco.com] has joined #ruby
cylence [cylence!~cylence@68.25.78.77] has joined #ruby
djr [djr!~djr@dsl-208-196.madisontelco.com] has joined #ruby
dotemacs [dotemacs!u801@gateway/web/irccloud.com/x-vutowpiqeliroldt] has joined #ruby
dnyy [dnyy!u2106@gateway/web/irccloud.com/x-qxcnrjijzwqfxqxs] has joined #ruby
mxweas [mxweas!~max@199-83-223-125.PUBLIC.monkeybrains.net] has joined #ruby
fcoury [fcoury!u2238@gateway/web/irccloud.com/x-szccavedttqxxsps] has joined #ruby
relix [relix!u2146@gateway/web/irccloud.com/x-raurxaustmrsfikm] has joined #ruby
mxweas [mxweas!~max@nat-sonicnet.noisebridge.net] has joined #ruby
rboyd [rboyd!~rboyd@d3-6.rb3.clm.centurytel.net] has joined #ruby
juarlex [juarlex!~juarlex@189.249.64.139] has joined #ruby
ziggles [ziggles!~ziggles@c-24-6-247-92.hsd1.ca.comcast.net] has joined #ruby
apucacao [apucacao!~apucacao@S0106602ad075859e.vc.shawcable.net] has joined #ruby
idoru [idoru!idoru@freenode/utility-bot/ex-server/idoru] has joined #ruby
<RubyPanther>
SamWhited: what OS?
idoru [idoru!idoru@freenode/utility-bot/ex-server/idoru] has joined #ruby
<SamWhited>
RubyPanther: Ubuntu 10.04.3
idoru [idoru!idoru@freenode/utility-bot/ex-server/idoru] has joined #ruby
RudyValencia [RudyValencia!me@unaffiliated/rudyvalencia] has joined #ruby
Helius [Helius!~Adium@212.31.227.18] has joined #ruby
cyri_ [cyri_!~cyri_@236.200.72.86.rev.sfr.net] has joined #ruby
nonotza [nonotza!~nonotza@cpe-72-225-173-7.nyc.res.rr.com] has joined #ruby
<toy_battery>
what is considered a "jr. ruby developer"
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
RudyValencia [RudyValencia!me@unaffiliated/rudyvalencia] has joined #ruby
andrewmcdonough [andrewmcdonough!~amcdonoug@mcdonoughs.plus.com] has joined #ruby
nd_______ [nd_______!~nd@mnhm-5f74ccb8.pool.mediaWays.net] has joined #ruby
brownies- [brownies-!~brownies@70-36-236-129.dsl.static.sonic.net] has joined #ruby
bluOxigen [bluOxigen!~noreply@unaffiliated/bluOxigen] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
Spockz [Spockz!~Spockz@21pc198.sshunet.nl] has joined #ruby
Spockz` [Spockz`!~Spockz@21pc198.sshunet.nl] has joined #ruby
_debo [_debo!~marco.deb@cpc18-enfi16-2-0-cust743.hari.cable.virginmedia.com] has joined #ruby
JohnBat26 [JohnBat26!~Eugene@89.175.77.79] has joined #ruby
cohakim [cohakim!~cohakim@p14064-ipbffx02osakakita.osaka.ocn.ne.jp] has joined #ruby
mafolz [mafolz!~mafolz@dhcp50-210.start.uni-saarland.de] has joined #ruby
cohakim [cohakim!~cohakim@p14064-ipbffx02osakakita.osaka.ocn.ne.jp] has quit [#ruby]
snearch [snearch!~snearch@e178060235.adsl.alicedsl.de] has joined #ruby
estan_ [estan_!~astan@90-227-105-216-no13.business.telia.com] has joined #ruby
<estan_>
hi. can i split a regex literal over multiple lines?
snearch [snearch!~snearch@e178060235.adsl.alicedsl.de] has joined #ruby
snearch [snearch!~snearch@e178060235.adsl.alicedsl.de] has joined #ruby
luoluoluo [luoluoluo!~sheng@123.120.47.232] has joined #ruby
luoluoluo [luoluoluo!~sheng@123.120.47.232] has quit ["离开"]
<rippa>
estan_: yes
snearch [snearch!~snearch@e178060235.adsl.alicedsl.de] has joined #ruby
<rippa>
escape the newlines
mklappstuhl [mklappstuhl!~mklappstu@p5B2C5634.dip.t-dialin.net] has joined #ruby
parus [parus!parus@gateway/shell/anapnea.net/x-wwanxymvmzlxygil] has joined #ruby
snearch [snearch!~snearch@e178060235.adsl.alicedsl.de] has joined #ruby
adman65 [adman65!~adman65@85-156-215-240.elisa-mobile.fi] has joined #ruby
<estan_>
rippa: alright.
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
Pip [Pip!~Pip@176.214.13.82] has joined #ruby
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
snearch [snearch!~snearch@e178060235.adsl.alicedsl.de] has joined #ruby
cableray [cableray!~cableray@wl-dhcp156-160.Mines.EDU] has joined #ruby
geaif [geaif!~geaif@xdsl-188-155-129-176.adslplus.ch] has joined #ruby
dazoakley [dazoakley!~dazoakley@hocuspokus.vm.bytemark.co.uk] has joined #ruby
pantsman [pantsman!~pantsman@2.25.208.246] has joined #ruby
pantsman [pantsman!~pantsman@pdpc/supporter/active/pantsman] has joined #ruby
snearch [snearch!~snearch@e178060235.adsl.alicedsl.de] has joined #ruby
shevy [shevy!~shevy@93-82-139-90.adsl.highway.telekom.at] has joined #ruby
ikaros [ikaros!~ikaros@dslb-188-107-221-154.pools.arcor-ip.net] has joined #ruby
BiHi [BiHi!~bihi@did75-17-88-165-129-29.fbx.proxad.net] has joined #ruby
pi3r [pi3r!~pi3r@LSt-Amand-152-32-39-189.w80-11.abo.wanadoo.fr] has joined #ruby
SPYGAME [SPYGAME!~mfa@110.93.205.130] has joined #ruby
ephemerian [ephemerian!~ian@82-69-1-248.dsl.in-addr.zen.co.uk] has joined #ruby
wedtm [wedtm!~wedtm@173-12-163-78-oregon.hfc.comcastbusiness.net] has joined #ruby
<wedtm>
Is it possible to use Timeout::timeout inside the EventMachine reactor?
freelanceful [freelanceful!~jamesfend@c-71-228-225-167.hsd1.tn.comcast.net] has joined #ruby
adman65 [adman65!~adman65@85-156-215-240.elisa-mobile.fi] has joined #ruby
adeponte [adeponte!~adeponte@pool-173-51-131-197.lsanca.fios.verizon.net] has joined #ruby
<kiero__>
in each loop
<kiero__>
how to get next element?
andrewmcdonough [andrewmcdonough!~amcdonoug@mcdonoughs.plus.com] has joined #ruby
cousine [cousine!~cousine@196.221.242.180] has joined #ruby
<kiero__>
ok, nvm
roaminghorse [roaminghorse!~roamingho@210.22.86.58] has joined #ruby
<heftig>
wedtm: i think so. but you should avoid blocking the event loop anyway
tekknolagi [tekknolagi!~tekknolag@c-67-180-21-25.hsd1.ca.comcast.net] has joined #ruby
<wedtm>
I might be doing this wrong, but I need to open approx. 6k TCPSockets in as short of time as possible. I've been using Synchrony to help with the callback hell, but it still takes approx. 3 minutes. In nodeJS it was done in approx. 30 seconds.
<wedtm>
heftig: Is there a way to set the timeout time on TCPSocket?
EddieS [EddieS!~ed@212.59.167.161] has joined #ruby
<estan_>
hrm. how come /[-a-zA-Z0-9!#\$%*\/?|^{}`~&'+=_]+/ will match the string ".foo" ?
<estan_>
what is it that i'm not escaping properly?
<heftig>
wedtm: setsockopt, probably
<wedtm>
ah, I thought so :(
<wedtm>
Alright, thanks :)
tekknolagi [tekknolagi!~tekknolag@c-67-180-21-25.hsd1.ca.comcast.net] has joined #ruby
geaif [geaif!~geaif@xdsl-188-155-129-176.adslplus.ch] has joined #ruby
<estan_>
i've tried escaping the ?, * and + too, in different combinations, but can't seem to get it right :/
<workmad3>
estan_: it's not that you're not escaping... it's that you're not anchoring
gillstein [gillstein!~jgill@cpe-98-14-249-94.nyc.res.rr.com] has joined #ruby
<workmad3>
estan_: it's matching ".foo" because it contains the string "foo" which matches your regex
<estan_>
workmad3: ah. doh. thx.
Gautam [Gautam!~Gautam@115.248.175.50] has joined #ruby
<estan_>
works great now.
<estan_>
thanks workmad3.
<workmad3>
estan_: np... maybe consider using something like [^.]+ as well ;)
<workmad3>
estan_: or reducing it down to [\w!#...]
letsgojuno [letsgojuno!~mmathews8@host217-34-228-202.in-addr.btopenworld.com] has joined #ruby
josesaldana [josesaldana!~josesalda@186.73.99.124] has joined #ruby
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
<estan_>
workmad3: yea. it's ugly i know, it's a school assignment that is due in 30 min ;)
tcurdt [tcurdt!~tcurdt@p5B03DADF.dip.t-dialin.net] has joined #ruby
<estan_>
but i'll take you up on the \w advice at least.
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby
Gautam [Gautam!~Gautam@115.248.175.50] has joined #ruby
Gautam [Gautam!~Gautam@115.248.175.50] has joined #ruby
Ammar01 [Ammar01!~hassaa10@gatek.thls.bbc.co.uk] has joined #ruby
tk_ [tk_!~tk@p083005.doubleroute.jp] has joined #ruby
_debo [_debo!~marco.deb@141.0.34.138] has joined #ruby
Helius [Helius!~Adium@212.31.227.18] has joined #ruby
mohits [mohits!~mohit@unaffiliated/mohits] has joined #ruby
Barakas [Barakas!~v@77.242.201.52] has joined #ruby
canton7 [canton7!~canton7@87-194-161-58.bethere.co.uk] has joined #ruby
andrewmcdonough [andrewmcdonough!~amcdonoug@188-220-46-108.zone11.bethere.co.uk] has joined #ruby
wenbert [wenbert!~wenbert@119.93.75.161] has joined #ruby
Ammar01 [Ammar01!~hassaa10@gatek.thls.bbc.co.uk] has joined #ruby
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
ramusara [ramusara!~ramusara@220.156.210.236.user.e-catv.ne.jp] has joined #ruby
kennethreitz [kennethreitz!~kennethre@173-13-176-158-sfba.hfc.comcastbusiness.net] has joined #ruby
Helius1 [Helius1!~Adium@212.31.227.18] has joined #ruby
tvw [tvw!~tv@212.79.9.150] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
cousine [cousine!~cousine@196.221.242.180] has joined #ruby
toy_battery_ [toy_battery_!~choldbroo@c-67-181-185-107.hsd1.ca.comcast.net] has joined #ruby
faber [faber!~faber@ppp-34-25.26-151.libero.it] has joined #ruby
atmosx [atmosx!~atmosx@191.116.broadband5.iol.cz] has joined #ruby
fermion [fermion!~textual@venkman.brightcove.com] has joined #ruby
panterax__ [panterax__!~panterax@31.176.176.176] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@213.152.255.138] has joined #ruby
John_P [John_P!~john@188.29.197.1.threembb.co.uk] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
fixl [fixl!~fixl@203.214.34.17] has joined #ruby
rippa [rippa!~splitta@85.158.54.234] has joined #ruby
adman65 [adman65!~adman65@80-186-115-142.elisa-mobile.fi] has joined #ruby
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
diverdude [diverdude!~user@1709ds1-vbr.0.fullrate.dk] has joined #ruby
<diverdude>
Hello. i installed ruby 1.9.2 using sudo make install. I need to remove it again due to compatibility issues. How do i do that?
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
<atmosx>
diverdude: sudo make uninstall
<diverdude>
atmosx: but then i get make: *** No rule to make target `uninstall'. Stop.
<atmosx>
diverdude: what OS r you using anyway? did you compile it manually?
<diverdude>
atmosx: ubuntu 10.10
<diverdude>
serveredition
<atmosx>
uhm
<atmosx>
and why did you not use apt-get ?
<atmosx>
type 'sudo make --help'
<diverdude>
atmosx: well i should have...i followed a tutorial and did not think
<atmosx>
diverdude: You can always type "make install" again, see what files are installed in which directories and delete them manually
<atmosx>
however , it's alayws best to use your system's package manager
otakutom_ [otakutom_!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
<atmosx>
it handles a whola lot of hassles (most of the times)
<diverdude>
yes
<diverdude>
that is true
<atmosx>
I'm off
<atmosx>
cya
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
mohits [mohits!~mohit@unaffiliated/mohits] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
bier_ [bier_!~bier@p54A597C9.dip.t-dialin.net] has joined #ruby
gianlucadv [gianlucadv!~gianlucad@host61-81-dynamic.245-95-r.retail.telecomitalia.it] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
mk03 [mk03!~mk03@61.245.119.34.er.eaccess.ne.jp] has joined #ruby
xec [xec!~xec@2a00:10b0:1:1002:5ab0:35ff:fef8:6a01] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
djanatyn [djanatyn!~djanatyn@mail.digitalkingdom.org] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
poindontcare [poindontcare!~user@cloudbovina.bovinasancta.com] has joined #ruby
d3c [d3c!~d3c@x1-6-e0-46-9a-98-0e-ca.k560.webspeed.dk] has joined #ruby
Clooth [Clooth!~Clooth@193-64-22-169-nat.elisa-mobile.fi] has joined #ruby
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
BryanWB [BryanWB!a8ca23c2@gateway/web/freenode/ip.168.202.35.194] has joined #ruby
<Hanmac>
i dont know ... maybe something wrong with your regex
<d3c>
Hanmac: alright but the +'-'+ is legal?
Sliker [Sliker!~ponies@216.66.125.91.rb4.adsl.brightview.com] has joined #ruby
mklappstuhl [mklappstuhl!~mklappstu@p5B2C5634.dip.t-dialin.net] has joined #ruby
<Hanmac>
mostly yeah
raincole_ [raincole_!~raincole@123.50.40.140] has joined #ruby
trivol [trivol!~aurelien@gra94-1-81-57-175-179.fbx.proxad.net] has joined #ruby
bier [bier!~bier@p54A597C9.dip.t-dialin.net] has joined #ruby
berserkr [berserkr!~david@212.122.111.205.dyn.user.ono.com] has joined #ruby
RudyValencia [RudyValencia!me@unaffiliated/rudyvalencia] has joined #ruby
Nicke\ [Nicke\!~nickelito@h32n5c1o260.bredband.skanova.com] has joined #ruby
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
jbpros [jbpros!~jbpros@100-178-112-217.dyn.adsl.belcenter.be] has joined #ruby
skaczor [skaczor!~quassel@mail.prognosoft.biz] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
igaiga [igaiga!~igaiga@softbank126126155190.bbtec.net] has joined #ruby
RudyValencia [RudyValencia!me@unaffiliated/rudyvalencia] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
<d3c>
Hanmac: apparantly, 1.2.3 wasn't interpreted as a string by ruby. had to do $2.to_s ($2 being the version number outputted by PEAR)
mengu_ [mengu_!~mengu@88.234.202.90] has joined #ruby
mengu_ [mengu_!~mengu@unaffiliated/mengu] has joined #ruby
Pip [Pip!~Pip@176.214.13.82] has joined #ruby
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
atmosx [atmosx!~atmosx@191.116.broadband5.iol.cz] has joined #ruby
Mahoek [Mahoek!~Mahoek@ip51ceb6d4.adsl-surfen.hetnet.nl] has joined #ruby
Squarepy [Squarepy!~Squarepy@wcw-staff-214-78.wireless.uva.nl] has joined #ruby
ConstantineXVI [ConstantineXVI!~constanti@74-138-221-74.dhcp.insightbb.com] has joined #ruby
arex\ [arex\!arex@158.36.150.14] has joined #ruby
<arex\>
I need some tips on benchmarking the total execution time of a method which is very small but used thousands of times. Is there a good way to do this?
Squarepy [Squarepy!~Squarepy@unaffiliated/squarepy] has joined #ruby
jensn [jensn!~Jens@167-244-96-87.cust.blixtvik.se] has joined #ruby
<workmad3>
arex\: check out the ruby benchmark stuff, or if it's not called thousands of times sequentially, check out the ruby profiler which can give you a report on total time spent in a method
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
<arex\>
yes i mean the latter
<workmad3>
arex\: ruby
<workmad3>
arex\: ruby-prof then
<workmad3>
(damn return key too close and easy to press at times :( )
<arex\>
thanks! looking at docs now
<workmad3>
arex\: that sort of thing is generally called profiling, not benchmarking, btw ;)
<arex\>
ops :)
<arex\>
now i feel like rick perry
<workmad3>
arex\: not a problem :)
<arex\>
is it possible to use Time to measure really precise? like the time it takes to do a simple operation
<arex\>
i seem to get a lot of 0.0
<arex\>
precisely*
wedgeV [wedgeV!~wedge@2002:5638:c234:0:7c5f:849c:3db5:3dbf] has joined #ruby
<apeiros_>
Time will only measure real time passed
<apeiros_>
not CPU time spent
<apeiros_>
so if your CPU is busy (which it always is, to a certain degree), you get a wrong measure
<arex\>
ah
<apeiros_>
but yes, afaik on most systems, Time is precise to 1e-6s
tatsuya_o [tatsuya_o!~tatsuya_o@213.152.255.138] has joined #ruby
wedgeV [wedgeV!~wedge@cm56-194-52.liwest.at] has joined #ruby
<workmad3>
apeiros_: on most systems, time is given to microsecond precision... that doesn't mean it's that precise though
<apeiros_>
true, but afaik it is indeed that precise on most systems
josesaldana [josesaldana!~josesalda@206.132.224.107] has joined #ruby
<apeiros_>
(not considering windows, I've no idea and windows tends to be fucked up in areas I'd never expect…)
<workmad3>
apeiros_: the update granularity can be different
<Hanmac>
is it possible for rb_scan_args to require 12 params and 2 extra optional?
<workmad3>
apeiros_: which makes it microsecond precision, but not microsecond accuracy
<apeiros_>
I understood your argument
<workmad3>
apeiros_: I think you're right though, I believe windows is the one that's different there (from what I recall, the normal timer in windows was poor accuracy/resolution, but if you were lucky, a high resolution timer could be obtained)
asobrasil [asobrasil!~asantioli@palpatine.privatedns.com] has joined #ruby
asobrasil [asobrasil!~asantioli@palpatine.privatedns.com] has quit [#ruby]
asobrasil [asobrasil!~asantioli@palpatine.privatedns.com] has joined #ruby
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
<rippa>
in windows regular timer is 10 or 15 millisecs
<heftig>
you do have the HighPerformanceTimer, though
<arex\>
hmm
<heftig>
sorry, the "Performance Counter"
<arex\>
link?
<arex\>
found it
nicoulaj [nicoulaj!~nicoulaj@V10K3.bull.fr] has joined #ruby
kaiwren [kaiwren!~KaiWren@122.172.248.47] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
marra [marra!marra@fly.srk.fer.hr] has joined #ruby
pencilcheck [pencilcheck!~pen@140.112.30.144] has joined #ruby
fixl [fixl!~fixl@203.214.34.17] has joined #ruby
am88b [am88b!~siim@q.xf.ee] has joined #ruby
<am88b>
Hello. I noticed that I am able to use classes in threaded environment without any consistency problems even when not using Mutexes, is this by design or I was just lucky?
<apeiros_>
lucky
<apeiros_>
or you didn't use them in a concurrent manner.
<apeiros_>
(though, given how you asked, that sounds like lucky too :-p)
<heftig>
am88b: also, the standard vm isn't concurrent
<apeiros_>
heftig: he said "in threaded environment"
<apeiros_>
and that's sufficient to get concurrency issues. you don't need native threads/real concurrency to get that.
<heftig>
so we have a mt program using libruby?
<apeiros_>
?
<heftig>
nvm
<apeiros_>
Thread.new - part of ruby
rickmasta [rickmasta!~rickmasta@pool-71-183-247-164.nycmny.fios.verizon.net] has joined #ruby
<am88b>
basicly what I did was class (let's say a= Data.new)
<am88b>
oops sorry, pressed enter too fast..
<am88b>
I'll better write a quick prototype and paste it to pastebin
<apeiros_>
am88b: to answer your question as clear as possible: *no* class in ruby is thread safe unless *explicitly* stated it is. so if you have threads that *share* data and even only a single one writes to it, you must use synchronization of some sort
esufan [esufan!~nekid@c-24-6-170-1.hsd1.ca.comcast.net] has joined #ruby
rly [rly!~rly@unaffiliated/rly] has joined #ruby
<rly>
Why do gems require root?
<apeiros_>
rly: they don't.
geaif [geaif!~geaif@xdsl-188-155-129-176.adslplus.ch] has joined #ruby
<apeiros_>
assuming by "root" you mean "root rights"
<apeiros_>
+ "when installing them"
<rly>
apeiros_: in the default command recommended at every known hippy page on the Internet, it does.
<rly>
apeiros_: i.e. gem install whatever
<apeiros_>
then read serious pages instead of the hippy ones
<heftig>
if you don't have root, they get installed in ~/.gem/
<rly>
apeiros_: also gem --help doesn't say.
<rly>
heftig: in this case, it said that it wanted to write something to /var/
<heftig>
debian?
<rly>
heftig: yes
<heftig>
they're being stupid
<heftig>
or maybe it's an ancient rubygems
<apeiros_>
both
<rly>
apeiros_: ok, so how do I save me from such stupity?
<rly>
apeiros_: is there some non-broken version somewhere?
<apeiros_>
they're being stupid, they broke rubygems and usually only provide ancient versions.
<apeiros_>
rly: install ruby via rvm
<rly>
apeiros_: rvm doesn't mean anything to me.
<apeiros_>
you get the newest ruby, you get a reasonably new gem, and per-user is default there.
<apeiros_>
rly: "rvm ruby", good luck at google.
<rippa>
but rvm doesn't install system ruby
<rly>
Found it
<rly>
rippa: isn't that exactly what I want?
<rippa>
maybe
<rly>
rippa: ah, you mean that the ruby vm is still ancient?
<rippa>
I don\t know what you want
`brendan [`brendan!~b@66-208-246-34-ubr02b-waldlk01-mi.hfc.comcastbusiness.net] has joined #ruby
<rly>
(because Selenium failed its first trivial test drive)
geaif [geaif!~geaif@7-239.62-188.cust.bluewin.ch] has joined #ruby
<heftig>
rly: what debian provides in their repositories is ancient
<am88b>
OK, I will rephrase my question... can I, instead of Mutex, use a simple 'is this concurrently-used data in this class ready' type of true/false attribute in threaded environment? (quick example: http://pastie.org/3165955)
<heftig>
rvm is a script that downloads and compiles ruby and manages ruby environments
<`brendan>
morning
josesaldana [josesaldana!~josesalda@206.132.224.107] has joined #ruby
<heftig>
am88b: implement the usual concurrent reader/exclusive writer pattern
<heftig>
you need a mutex and a counter.
<heftig>
or was it two mutexes and a counter?
andrewmcdonough [andrewmcdonough!~amcdonoug@188-220-46-108.zone11.bethere.co.uk] has joined #ruby
<heftig>
right, two i think. one to protect the data, one to protect the reader counter variable
boodle [boodle!~boodle@174.46.129.34] has joined #ruby
denysonique_ [denysonique_!u484@gateway/web/irccloud.com/x-lmjiznelifmdxajf] has joined #ruby
rickmasta [rickmasta!~rickmasta@pool-71-183-247-164.nycmny.fios.verizon.net] has joined #ruby
dcarper1 [dcarper1!~Adium@c-76-125-233-64.hsd1.pa.comcast.net] has joined #ruby
<am88b>
so in above example, I would need to but both the 'somearray' and 'ready' values into Mutex to be safe? (even though then in above example 'ready' value is pretty useless anyway, but in theory it should be in mutex aswell?)
<am88b>
although it escapes me how can value of boolean be non-consistent... isn't the changing of it so atomic that even in threads it doesn't matter? Or there is no such thing in case of threads?
BiHi [BiHi!~bihi@did75-17-88-165-129-29.fbx.proxad.net] has joined #ruby
kf8a [kf8a!~kf8a@user-33c730.user.msu.edu] has joined #ruby
cousine [cousine!~cousine@196.221.242.180] has joined #ruby
nonotza [nonotza!~nonotza@cpe-72-225-173-7.nyc.res.rr.com] has joined #ruby
panterax__ [panterax__!~panterax@31.176.176.176] has quit ["Ex-Chat"]
<JustinCampbell>
JonnieCache: thanks! that looks promising
<JonnieCache>
those os specific things are always where you're going to run into differences with stuff like jruby
incluye [incluye!~inclooye@208.102.195.210] has joined #ruby
<JonnieCache>
but if youre only targetting os x and linux then it shouldnt be a problem
altivec [altivec!~altivec@li196-93.members.linode.com] has joined #ruby
icrazyhack [icrazyhack!~horieyui@114.119.1.1] has joined #ruby
<Hanmac>
windows should only be a target for viruses
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby
estan [estan!~astan@90-227-105-216-no13.business.telia.com] has joined #ruby
<JonnieCache>
windows 7 is actually alright. when you compare it to the decade of sheer nothing that they produced after XP, then the awfulness of vista, they turned it around with windows 7 in a tiny amount of time
includex [includex!~includex@194.65.5.235] has joined #ruby
<JonnieCache>
just a shame they sat around playing hackey sack or whatever from 2001-2010
daed [daed!~daed@daed.org] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
altivec [altivec!~altivec@li196-93.members.linode.com] has joined #ruby
dcarper1 [dcarper1!~Adium@50-73-187-102-pennsylvania.hfc.comcastbusiness.net] has joined #ruby
willb [willb!~wibenton@99-100-185-10.lightspeed.mdsnwi.sbcglobal.net] has joined #ruby
benj [benj!~benj@host238.lshift.net] has joined #ruby
looopy [looopy!~looopy@pool-141-156-60-133.washdc.btas.verizon.net] has joined #ruby
altivec [altivec!~altivec@li196-93.members.linode.com] has joined #ruby
Knodi [Knodi!~Knodi@c-68-43-246-216.hsd1.mi.comcast.net] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby
emocakes [emocakes!~om@187.54.14.193] has joined #ruby
hkhalid [hkhalid!hkhalid@pool-173-79-49-114.washdc.fios.verizon.net] has joined #ruby
<hkhalid>
soup
Sailias [Sailias!~jonathan@s72-38-77-178.static.comm.cgocable.net] has joined #ruby
Kakaskin-ru [Kakaskin-ru!~CLDG@87.252.227.117] has joined #ruby
<workmad3>
JonnieCache: it was half a decade of nothing, then the crapness of vista followed by windows 7
eldariof [eldariof!~CLD@95.143.213.11] has joined #ruby
colint [colint!~ColinT@189.164.82.90] has joined #ruby
kakaskin [kakaskin!~CLDG@87.252.227.117] has joined #ruby
letsgojuno [letsgojuno!~mmathews8@host217-34-228-202.in-addr.btopenworld.com] has joined #ruby
blinki [blinki!~blink@reality.is-after.me] has joined #ruby
pootpoot [pootpoot!~pootpoot@38.108.250.130] has joined #ruby
Marco [Marco!~marco@dhcp-210-147.cs.dartmouth.edu] has joined #ruby
dcarper2 [dcarper2!~Adium@50-73-187-102-pennsylvania.hfc.comcastbusiness.net] has joined #ruby
strife25 [strife25!strife25@nat/ibm/x-tystvrthdvkhcdas] has joined #ruby
kreantos [kreantos!~kreantos@178.113.16.12.wireless.dyn.drei.com] has joined #ruby
baroquebobcat [baroquebobcat!~nick@70-90-113-174-co.denver.hfc.comcastbusiness.net] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
ckrailo [ckrailo!~ckrailo@208.86.167.247] has joined #ruby
mksm_ [mksm_!~mksm@200-185-227-52.user.ajato.com.br] has joined #ruby
zenergi [zenergi!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
MasterIdler_ [MasterIdler_!~MasterIdl@static-66-225-153-161.ptr.terago.net] has joined #ruby
blinki [blinki!~blink@reality.is-after.me] has quit [#ruby]
estan [estan!~astan@90-227-105-216-no13.business.telia.com] has joined #ruby
LiquidInsect [LiquidInsect!~billabney@173-228-63-32.dsl.static.sonic.net] has joined #ruby
<shevy>
windows 7 was percieved "better" because vista was purposely made crappier than it should have been
senny [senny!~senny@77-56-67-120.dclient.hispeed.ch] has joined #ruby
letsgojuno [letsgojuno!~mmathews8@host217-34-228-202.in-addr.btopenworld.com] has joined #ruby
senny [senny!~senny@edge.garaio.com] has joined #ruby
<emocakes>
lies shevy
<emocakes>
im sure you use something like, 'ubuntu'
<emocakes>
hah
sonkei [sonkei!~sonkei@d14-69-26-171.try.wideopenwest.com] has joined #ruby
thoraxe [thoraxe!~thoraxe@50-73-95-6-static.hfc.comcastbusiness.net] has joined #ruby
<atmosx>
UBUNTU!
<shevy>
emocakes nah, I compile from source. Distributions suck just as much as win does, often even more
<shevy>
I even wanted to move back to windows for some time, but when I actually was more serious and tried, a wave of HATE hit me again. Why can't things just work, why do developers want to annoy me :(
<Okasu>
shevy: LFS?
<shevy>
Okasu nah. LFS is mostly a teaching environment ... it is not that useful for wanting to maintain something
<shevy>
well, LFS for the base, yeah
<shevy>
so that the toolchain is ok
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby
samsamsupersam [samsamsupersam!~sam@ws227-49.walker.dynamic.msstate.edu] has joined #ruby
ksinkar_ [ksinkar_!~ksinkar@115.241.137.39] has joined #ruby
cooper [cooper!~mitchell@unaffiliated/furryfishy] has joined #ruby
nonotza [nonotza!~nonotza@66.246.94.130] has joined #ruby
kenperkins [kenperkins!~textual@174-24-171-37.tukw.qwest.net] has joined #ruby
fantazo [fantazo!~fantazo@85-127-82-38.dynamic.xdsl-line.inode.at] has joined #ruby
ksk [ksk!ksk@im.knubz.de] has quit [#ruby]
kennyd [kennyd!~kennyd@93-138-234-20.adsl.net.t-com.hr] has joined #ruby
blueadept [blueadept!~blueadept@pool-96-251-83-184.lsanca.dsl-w.verizon.net] has joined #ruby
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
Guest37669 [Guest37669!Guest37669@200-185-227-52.user.ajato.com.br] has joined #ruby
<workmad3>
shevy: no matter how bad a linux distro is, it's better than windows if only because at least you can manage it with chef ;)
alphabitcity [alphabitcity!~Adium@pool-108-41-134-165.nycmny.fios.verizon.net] has joined #ruby
<alphabitcity>
is there a way to insert into a hash and have the return value be the hash itself?
dasfugufish [dasfugufish!~Adium@174-27-233-214.slkc.qwest.net] has joined #ruby
<alphabitcity>
trying to map through an array of hashes inserting a new k/v pair .. and having the return of the map be the new hash, but instead it's an array of the values
maletor [maletor!~maletor@c-69-181-24-86.hsd1.ca.comcast.net] has joined #ruby
<shevy>
workmad3 they kinda trade in the goods ands the bads ... I'd like to cherry-pick things together into an OS easily... a winux!
<shevy>
*and
impulze [impulze!~impulze@eta-ori.net] has quit ["Leaving"]
kevinbond [kevinbond!~kevinbond@112.50.204.68.cfl.res.rr.com] has joined #ruby
atmosx [atmosx!~atmosx@191.116.broadband5.iol.cz] has quit ["Life is a bitch, but I'm happy with it!"]
Helius [Helius!~Adium@109.112.238.218] has joined #ruby
mensch [mensch!~mensch@c-174-62-210-182.hsd1.ma.comcast.net] has joined #ruby
chrisja [chrisja!~chris@5ac7d92c.bb.sky.com] has joined #ruby
alfism [alfism!~alfism@2620:149:4:1201:a84d:f56d:9eaf:d3d7] has joined #ruby
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
<rippa>
alphabitcity: Hash#merge?
estan [estan!~astan@90-227-105-216-no13.business.telia.com] has joined #ruby
Guest37669 [Guest37669!~mksm@200-185-227-52.user.ajato.com.br] has joined #ruby
<alphabitcity>
rippa: seems hackish to have to create a new hash each time it loops .. http://pastie.org/3167105
<rippa>
alphabitcity: Hash#merge!
<alphabitcity>
ahh
<alphabitcity>
interesting
tuppy_ [tuppy_!~quassel@ip68-231-151-143.tc.ph.cox.net] has joined #ruby
<codatory>
collect always returns an array
hydrozen [hydrozen!~textual@modemcable110.38-37-24.static.videotron.ca] has joined #ruby
tuppy [tuppy!~quassel@ip68-231-151-143.tc.ph.cox.net] has joined #ruby
Guest37669 [Guest37669!Guest37669@200-185-227-52.user.ajato.com.br] has joined #ruby
strife25 [strife25!strife25@nat/ibm/x-ubyiqccctocwgjwa] has joined #ruby
<arex\>
SomeClass.someClassVariable = 1 <- Would this ever work?
kenichi [kenichi!~kenichi@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
veronatii [veronatii!~citrus@ip68-6-95-91.sb.sd.cox.net] has joined #ruby
estan [estan!~astan@90-227-105-216-no13.business.telia.com] has joined #ruby
<JonnieCache>
someClassVariable=(value) would have to be a method
Nisstyre [Nisstyre!~yours@c-208-90-102-250.netflash.net] has joined #ruby
<JonnieCache>
in ruby everything is set through methods
cylence [cylence!~cylence@68.25.78.77] has joined #ruby
<arex\>
Is attr_accessor only for instance variables?
nobitanobi [nobitanobi!~novito@103.Red-213-96-26.staticIP.rima-tde.net] has joined #ruby
<codatory>
Yes; but cattr_accessor is for class variables
<nobitanobi>
hi
<arex\>
aaah
<arex\>
that's it
<arex\>
thanks to you both
<nobitanobi>
shevy: good afternoon :)
<JonnieCache>
arex\: you should know that most people dont use class variables
<shevy>
hi nobitanobi
<JonnieCache>
arex\: not the true @@-prefixed kind of class variables, they behave oddly
<JonnieCache>
its more common to use instance variables on classes, which gives you the same kind of effect
<arex\>
codatory: cattr_accessor is only for Rails?
<codatory>
Yep; and if you're trying to be threadsafe you definitely can't use @@-prefixed variables
<arex\>
JonnieCache: hum. What do you mean?
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
<codatory>
arex\: Looks like it's part of ActiveSupport
hadees [hadees!~hadees@64.132.24.248] has joined #ruby
<JonnieCache>
arex\: its kind of a quirk of ruby's object model
<arex\>
codatory: I'm trying to avoid that dependency :D
<JonnieCache>
basically all classes are objects of class Class
<JonnieCache>
so you can attach instance variables to classes like any other object
<JonnieCache>
giving you all the behaviour you would expect of "class variables" but they behave like any normal instance variable
eywu [eywu!~Adium@205-170-107-4.dia.static.qwest.net] has joined #ruby
<JonnieCache>
ill try and find a link that expalins it better
<arex\>
JonnieCache: i just need an example of how to set one, and i should be all good
silky [silky!~silky@pool-74-108-142-22.nycmny.fios.verizon.net] has joined #ruby
<arex\>
i can always just use a constant :P
<codatory>
If you don't need to change it, do that.
<arex\>
it's basically a command line argument i want to use later
<arex\>
seems i cant use a constant for that
<JonnieCache>
ahhh i wish i could find the article i want on this subject
<JonnieCache>
its actually quite simple but hard to explain
<arex\>
it's not a one line example?
<csmrfx>
whats a simple place to learn lambda calculus?
ascarter [ascarter!~ascarter@209.119.253.66] has joined #ruby
td123 [td123!~tom@archlinux/trusteduser/td123] has joined #ruby
impulze [impulze!~impulze@eta-ori.net] has joined #ruby
<JonnieCache>
yeah it is a one line thing but its better you actually understand wtf ruby is actually doing
<td123>
is there a ruby interpreter like bpython2 but for ruby?
<arex\>
JonnieCache: i might understand it from the example
notjoeflynn_ [notjoeflynn_!~notjoefly@74-132-146-116.dhcp.insightbb.com] has joined #ruby
sonkei [sonkei!~sonkei@d14-69-26-171.try.wideopenwest.com] has joined #ruby
<td123>
bpython2 just adds syntax coloring and completion among other things to the interactive shell
<impulze>
using this syntax: "create_table :authors_books, id: false do |t|" seems to have worked in 1.9.2-p290 but seems to fail with "unexpected ','" in ruby-1.9.3-p0
<rippa>
td123: irb is interactive shell
<impulze>
any suggestions for a proper fix? am i using the wrong syntax?
<rippa>
pry is enhanced interactive shell
<td123>
ya, I'm asking for an enhanced shell, I was just giving an example
<td123>
thanks, i'll check it out
davidcelis [davidcelis!~david@70-89-180-6-smc-or.hfc.comcastbusiness.net] has joined #ruby
adeponte [adeponte!~adeponte@67.110.253.162.ptr.us.xo.net] has joined #ruby
estan [estan!~astan@90-227-105-216-no13.business.telia.com] has joined #ruby
<JonnieCache>
impulze: that line looks fine, the error is probably on another line closeby, the parser cannot always tell you perfectly where the error is
axl_ [axl_!~axl@75-149-152-225-Minnesota.hfc.comcastbusiness.net] has joined #ruby
savage- [savage-!~savage-@209.118.197.220] has joined #ruby
thoraxe [thoraxe!~thoraxe@50-73-95-6-static.hfc.comcastbusiness.net] has joined #ruby
<JonnieCache>
writing a compiler is easy. writing a compiler with good error messages is really hard.
SegFaultAX|work [SegFaultAX|work!~mkbernard@173.228.45.162] has joined #ruby
kreantos_ [kreantos_!~kreantos@77.117.166.77.wireless.dyn.drei.com] has joined #ruby
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby
letsgojuno [letsgojuno!~mmathews8@host217-34-228-202.in-addr.btopenworld.com] has joined #ruby
<impulze>
well clang did it ;)
cylence [cylence!~cylence@68-25-78-77.pools.static.spcsdns.net] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
snearch [snearch!~snearch@e178060235.adsl.alicedsl.de] has joined #ruby
<Mon_Ouie>
The line-break after create_table
<impulze>
d'oh
<impulze>
thanks a lot
ascarter_ [ascarter_!~ascarter@209.119.253.66] has joined #ruby
looopy [looopy!~looopy@pool-141-156-60-133.washdc.btas.verizon.net] has joined #ruby
PaciFisT [PaciFisT!~PeaCE@76-10-149-67.dsl.teksavvy.com] has joined #ruby
Skaag [Skaag!~Skaag@207-38-192-60.c3-0.43d-ubr4.qens-43d.ny.static.cable.rcn.com] has joined #ruby
<hkhalid>
hi
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
Targen [Targen!~iguana@159.90.11.250] has joined #ruby
bier [bier!~bier@p54A5A77E.dip.t-dialin.net] has joined #ruby
badabim [badabim!~badabim@17.245.88.204] has joined #ruby
Jackneill [Jackneill!~Jackneill@unaffiliated/jackneill] has joined #ruby
senny [senny!~senny@edge.garaio.com] has joined #ruby
kreantos [kreantos!~kreantos@77.119.13.23.wireless.dyn.drei.com] has joined #ruby
Marco [Marco!~marco@pat32.dartmouth-secure.border1-cfw.Dartmouth.EDU] has joined #ruby
btanaka [btanaka!~textual@17.245.88.150] has joined #ruby
dazoakley [dazoakley!~dazoakley@hocuspokus.vm.bytemark.co.uk] has quit [#ruby]
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
quest88 [quest88!~quest88@12.181.53.123] has joined #ruby
ciopte7 [ciopte7!~thomascio@cpe-071-071-047-213.triad.res.rr.com] has joined #ruby
Nisstyre [Nisstyre!~yours@c-208-90-102-250.netflash.net] has joined #ruby
tuppy_ [tuppy_!~quassel@ip68-231-151-143.tc.ph.cox.net] has joined #ruby
jtmengel [jtmengel!~slm@c-67-176-116-43.hsd1.co.comcast.net] has joined #ruby
jamiejackson [jamiejackson!~jamie@unaffiliated/jamiejackson] has joined #ruby
jtmengel [jtmengel!~slm@c-67-176-116-43.hsd1.co.comcast.net] has joined #ruby
aantix [aantix!~jjones@50.0.102.2] has joined #ruby
Aristata [Aristata!~Adium@adsl-69-209-65-126.dsl.chcgil.ameritech.net] has quit [#ruby]
raincole_ [raincole_!~raincole@140.112.239.113] has joined #ruby
Azure [Azure!~azt@unaffiliated/azure] has joined #ruby
<nobitanobi>
I've a question. If I have a method in a class called 'foo' which returns 'im foo' and then later I have this: foo = 0 if false . Why if I try printing foo I get nil? Does ruby take into account the foo = 0 even if it has never been assigned?
lorandi [lorandi!~lorandi@gateway/tor-sasl/lorandi] has joined #ruby
cdabba [cdabba!~cdabba_@n128-227-83-86.xlate.ufl.edu] has joined #ruby
jackerran [jackerran!~jackerran@fw.luckie.net] has joined #ruby
kreantos [kreantos!~kreantos@178.114.143.35.wireless.dyn.drei.com] has joined #ruby
Tuxist [Tuxist!~quassel@dyndsl-085-016-109-127.ewe-ip-backbone.de] has joined #ruby
<cdabba>
I've installed the bioruby gem in a rails app, and when I try to start the bioruby shell, I get a nomethoderror: <class:Application>: undefined method 'autoload_paths' for {}:Hash (NoMethodError)... any suggestions?
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
cylence [cylence!~cylence@70-89-66-138-ca.sfba.hfc.comcastbusiness.net] has joined #ruby
Pip [Pip!~Pip@176.214.13.82] has joined #ruby
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
<yekta>
If x = "a b c" and y = "a c" whats the shortest/easiest way to check that?
stkowski [stkowski!~stkowski@ns25.8x8.com] has joined #ruby
cylence [cylence!~cylence@70-89-66-138-ca.sfba.hfc.comcastbusiness.net] has joined #ruby
FreddieBoi [FreddieBoi!~freddiebo@c83-252-234-115.bredband.comhem.se] has joined #ruby
<yekta>
oops, to check if x contains a and c
<workmad3>
yekta: so you want to check if x contains the same characters as y?
<workmad3>
yekta: will they always be space-separated?
<yekta>
Its for name parsing but yeah so "fname m_initial lname" and "fname lname"
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
nadirvardar [nadirvardar!~nadirvard@204.235.122.5] has joined #ruby
<workmad3>
yekta: you'd need to sort both sides
<yekta>
yea, oops
<workmad3>
yekta: and it's quicker to get the length than to sort :)
<yekta>
oh cool, neat, I think I've got some ammunition to go with, fun stuff, thanks guys
Araxia_ [Araxia_!~Araxia@173-164-68-213-Oregon.hfc.comcastbusiness.net] has joined #ruby
wmoxam [wmoxam!~wmoxam@69-196-130-209.dsl.teksavvy.com] has joined #ruby
yekta [yekta!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
priteshjain [priteshjain!~priteshja@113.193.63.103] has joined #ruby
Marco [Marco!~marco@pat32.dartmouth-secure.border1-cfw.Dartmouth.EDU] has joined #ruby
ciopte7_ [ciopte7_!~thomascio@cpe-071-071-047-213.triad.res.rr.com] has joined #ruby
milktrader [milktrader!~milktrade@67.197.35.103] has joined #ruby
cjlicata [cjlicata!~carlyle@70.43.205.70.nw.nuvox.net] has joined #ruby
letsgojuno [letsgojuno!~mmathews8@188.220.153.25] has joined #ruby
<cdabba>
yekta: also, (x[0] + x[-1]) == (y[0] + y[-1]), as long as your patterns are always f m l, and f l
Helius [Helius!~Adium@93-35-215-3.ip56.fastwebnet.it] has joined #ruby
<milktrader>
given an array a = ['1', '2', '3', '4'] how do you return everything *but* the first two elements? ['3','4']
<Tasser>
milktrader, a.drop(2)
<milktrader>
wow
<Tasser>
hm?
<milktrader>
Tasser, ruby is cool. Thanks.
thoefer [thoefer!~chatzilla@p4FF76FD9.dip.t-dialin.net] has joined #ruby
SegFaultAX|work [SegFaultAX|work!~mkbernard@173.228.45.162] has joined #ruby
ReTFEF [ReTFEF!JS@unaffiliated/thetfef] has joined #ruby
<thoefer>
anyone has basic compiler skills? PREDICT(X → ; P X) intersection PREDICT(X → eps) = what´s the result set of this?
looopy [looopy!~looopy@pool-141-156-60-133.washdc.btas.verizon.net] has joined #ruby
Russell^^ [Russell^^!~Russell^^@88.97.51.87] has joined #ruby
voodoofish430 [voodoofish430!~mtorres@208.76.2.200] has joined #ruby
supergiantrobot_ [supergiantrobot_!~supergian@cpe-174-097-169-208.nc.res.rr.com] has joined #ruby
p1d [p1d!~p1d@ns1.vonaffenfels.de] has joined #ruby
carlyle [carlyle!~carlyle@216.133.69.20] has joined #ruby
achiu [achiu!~Adium@ip68-5-18-17.oc.oc.cox.net] has joined #ruby
sdwrage [sdwrage!~sdwrage@cpe-184-57-123-50.columbus.res.rr.com] has joined #ruby
robyurkowski [robyurkowski!~robyurkow@64.254.250.82] has joined #ruby
adamkittelson [adamkittelson!~adamkitte@50.0.132.2] has joined #ruby
BiHi [BiHi!~bihi@did75-17-88-165-129-29.fbx.proxad.net] has joined #ruby
jlogsdon [jlogsdon!~jlogsdon@50.0.84.226] has joined #ruby
ldh [ldh!~Adium@static-217-37.vpn.wisc.edu] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
josh___ [josh___!~josh@74-95-43-126-Oregon.hfc.comcastbusiness.net] has joined #ruby
cook1es [cook1es!~chatzilla@c83-248-93-185.bredband.comhem.se] has joined #ruby
ilyam [ilyam!~ilyam@2620:65:0:281:7c06:a05e:627e:d936] has joined #ruby
brngardner [brngardner!~brngardne@c-98-192-3-166.hsd1.ga.comcast.net] has joined #ruby
PhilK [PhilK!~PhilK@108-94-166-51.lightspeed.sntcca.sbcglobal.net] has joined #ruby
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby
mando [mando!~mando@99-39-117-82.lightspeed.austtx.sbcglobal.net] has joined #ruby
evantravers [evantravers!~textual@fw.luckie.net] has joined #ruby
ghanima [ghanima!~ghanima@alexander.nat.trb.com] has joined #ruby
evantravers [evantravers!~textual@fw.luckie.net] has joined #ruby
p0y_ [p0y_!~p0y@121.96.188.176] has joined #ruby
artOfWar [artOfWar!~artofwar@nat/yahoo/x-mvlrrcisvkmbmzfi] has joined #ruby
savage-_ [savage-_!~savage-@209.118.197.220] has joined #ruby
savage-_ [savage-_!~savage-@209.118.197.220] has joined #ruby
<Tasser>
wtf?
mksm [mksm!Guest37669@pdpc/supporter/professional/mksm] has joined #ruby
kuzushi [kuzushi!~kuzushi@ip98-165-117-197.ph.ph.cox.net] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
nobitanobi [nobitanobi!~novito@103.Red-213-96-26.staticIP.rima-tde.net] has quit [#ruby]
minijupe [minijupe!~benlieb@97-95-236-58.dhcp.sffl.va.charter.com] has joined #ruby
awesomenickname [awesomenickname!~awesomeni@av24495.comex.ru] has joined #ruby
looopy [looopy!~looopy@pool-141-156-60-133.washdc.btas.verizon.net] has joined #ruby
<awesomenickname>
was it a bad idea to install multi-user rvm?
apucacao [apucacao!~apucacao@24.82.128.142] has joined #ruby
shadoi [shadoi!~Adium@2001:5a8:4:68e0:c0d4:5bbb:d4c2:1780] has joined #ruby
luxurymode [luxurymode!~luxurymod@rrcs-184-75-21-21.nyc.biz.rr.com] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
roadze [roadze!~roadze@119.224.137.97] has joined #ruby
ConstantineXVI [ConstantineXVI!~constanti@216-24-48-34.ip.win.net] has joined #ruby
kreantos [kreantos!~kreantos@178.114.84.181.wireless.dyn.drei.com] has joined #ruby
evantravers [evantravers!~textual@fw.luckie.net] has joined #ruby
nd___ [nd___!~nd@mnhm-5f74d15b.pool.mediaWays.net] has joined #ruby
Marco [Marco!~marco@vtelinet-216-66-104-4.vermontel.net] has joined #ruby
<Clooth>
Buying a life.
achiu [achiu!~Adium@216.174.109.254] has joined #ruby
ascarter [ascarter!~ascarter@209.119.253.66] has joined #ruby
nowthatsamatt [nowthatsamatt!~nowthatsa@adsl-98-85-32-162.mco.bellsouth.net] has quit [#ruby]
ctp [ctp!~ctp@port-87-234-198-134.static.qsc.de] has joined #ruby
shadoi1 [shadoi1!~Adium@gw.sfo.cloudscaling.com] has joined #ruby
savage-_ [savage-_!~savage-@209.118.197.220] has joined #ruby
rboyd [rboyd!~rboyd@216.106.40.113] has joined #ruby
rboyd [rboyd!~rboyd@216.106.40.113] has joined #ruby
shadoi [shadoi!~Adium@2001:5a8:4:68e1:816c:5d61:ecce:bd86] has joined #ruby
robotmay [robotmay!~robotmay@5ad8f1da.bb.sky.com] has joined #ruby
cableray [cableray!~cableray@wl-dhcp176-151.Mines.EDU] has joined #ruby
savage- [savage-!~savage-@209.118.197.220] has joined #ruby
Tomasso [Tomasso!~papito@186.23.14.175] has joined #ruby
<shevy>
maninthemiddle I think installing rvm or rbenv is always a bad idea
<shevy>
people do it because they are lazy
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby
mark_azevedo [mark_azevedo!~mark_azev@50-78-101-2-static.hfc.comcastbusiness.net] has joined #ruby
strife25 [strife25!strife25@nat/ibm/x-ojswqwwkhjyegmgr] has joined #ruby
<jlogsdon>
shevy: I agree about RVM, but what's wrong with rbenv? It makes managing multiple versions of ruby (which I have to use) insanely easy, but doesn't do anything "magical" like RVM
Synthead [Synthead!~max@50-76-231-54-static.hfc.comcastbusiness.net] has joined #ruby
<shevy>
jlogsdon: so does using Versioned Directories. My ruby versions reside in /Programs/Ruby/Version and I never had a problem with the versioning. I don't need to pick any of them because I feel there is no real need for any of them.
kirun [kirun!~kirun@78-86-154-194.zone2.bethere.co.uk] has joined #ruby
<shevy>
admittedly though I use my own collection of ruby scripts to handle things
rb2k [rb2k!~rb2k@HSI-KBW-078-042-219-156.hsi3.kabel-badenwuerttemberg.de] has joined #ruby
<jlogsdon>
shevy: and with rbenv mine live in $RBENV/versions. I need 1.8.7 (for work) and 1.9.2 (for personal)
<Gate>
shevy: ? I have 4 different projects I work on each requires a different ruby version, incompatible gems. My job would be unmanagable without something like rvm
<jlogsdon>
with rbenv I can easily switch between the versions on a per-project basis
<rb2k>
is there a way to access the filename of a file that includes a module from inside that module
<Gate>
I would probably have ended up using vagrant for everything
<jlogsdon>
sure, I could write my own shims or funky logic to use the correct version, but why?
<shevy>
jlogsdon I can easily switch between versions too
<rb2k>
I have a module that has a self.included() method
<rb2k>
usually I can just access __FILE__
<jlogsdon>
Just by changing directories? Or do you have to run a command and think about it?
<rb2k>
but that will show me the file where the module is defined in
<shevy>
I just let the symlink point at the ruby version I want to use
<jlogsdon>
right
<jlogsdon>
I don't want to have to think about it.
<jlogsdon>
that's not lazy, thats being pragmatic
<mksm>
rb2k, perhaps #caller
<shevy>
jlogsdon I see no difference. you need to tell rbenv which version to use too right?
<jlogsdon>
echo '1.9.2-p290' > .rbenv-version and then never again. How do you do it?
<rb2k>
mksm: hmm, I'll try
<shevy>
jlogsdon ok so you store the information in a file and rbenv checks on that right? I am using a symlink to point at the version in use right now, but it's no big deal to use a file instead to have the same functionality. I'll add that next to my scripts, then I am on-par with it. :)
seb__ [seb__!~seb@83.158.89.94] has joined #ruby
<jlogsdon>
So you do the same thing rbenv does but you are against it? okay
<jlogsdon>
That makes sense ^___^
<shevy>
no i use versioned appdirs
<shevy>
where does rbenv store things?
<jlogsdon>
.rbenv/versions
<jlogsdon>
$HOME/.rbenv
<davidcelis>
~/.rbenv/versions
<davidcelis>
lol
<jlogsdon>
so, exactly what you are doing
<shevy>
is that a directory?
<davidcelis>
its pretty much what you're doing dude
<jlogsdon>
Yes
<jlogsdon>
so 1.9.2 is ~/.rbenv/versions/1.9.2 (with lib/gems/etc as normal)
<jlogsdon>
its just a prefix to ./configure
<shevy>
ah so it is even versioned
<jlogsdon>
Oh, you mean versioned with the project?
<jlogsdon>
what?
<jlogsdon>
i don't get why you want to version binaries
<shevy>
I did not know that rbenv uses versioned directories
<jlogsdon>
yeah
bsbravo [bsbravo!~BrunoSoar@187.72.55.179] has joined #ruby
<jlogsdon>
sorry if i wasn't clear
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has quit [#ruby]
<shevy>
do you happen to know whether RVM uses versioned directories as well?
emocakes [emocakes!~om@187.54.14.193] has joined #ruby
<jlogsdon>
It does
<mksm>
rvm's dir name is version@gemset
<mksm>
or just version if you don't use a gemset
dida [dida!~dida@5403E808.catv.pool.telekom.hu] has joined #ruby
<dida>
hello.
<jlogsdon>
My problem with RVM is that it takes over system commands (cd is the big one)
<dida>
i'd like to know if it's possible to read out three values from a line of a file. currently my file has two values separated by a space: <username> <rank> ; i'd like to add a <password> to it. the problem with this is that I can not use hash.pair anymore then, could you help me with finding a solution?
mengu [mengu!~mengu@95.13.68.170] has joined #ruby
<dida>
ReinH, i meant each_pair
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
lorandi [lorandi!~lorandi@gateway/tor-sasl/lorandi] has joined #ruby
toy_battery [toy_battery!~choldbroo@c-67-181-185-107.hsd1.ca.comcast.net] has joined #ruby
m_p [m_p!~m_p@107.0.83.66] has joined #ruby
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
<dida>
Gate, here is the part of my script that defines the file-functions: http://pastebin.com/6q63kLT9 - where do you think I could implement split(' ')?
<dida>
and how could I get the line where for example dida user's data are?
<jlogsdon>
dida: 17
<jlogsdon>
change that to: username, rank, password = line.split
<Gate>
dida: you are already close to doing it
<Gate>
dida: as jlogsdon said
pantsman [pantsman!~pantsman@2.25.207.149] has joined #ruby
pantsman [pantsman!~pantsman@pdpc/supporter/active/pantsman] has joined #ruby
<Gate>
I would say on line 18: $users[user[0]] = { :rank => user[1], :password => user[2] }
yekta [yekta!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
<Gate>
now, when you use that has of users, instead of the value being a rank, the value will be another hash containing rank and password
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby
<dida>
hmm
<dida>
so $users[dida[1]] will have my rank, right?
<dida>
and $users[dida[2]] my password
<jlogsdon>
no
<ReinH>
dida: no
<jlogsdon>
$users['dida'][:rank]
<jlogsdon>
$users['dida'][:password]
<jlogsdon>
like that
<dida>
oh, thanks! and I also have to edit line 27, right?
<dida>
and line 26 too, actually
kaiwren [kaiwren!~KaiWren@122.172.37.161] has joined #ruby
yekta [yekta!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
<ReinH>
yes, it's a fair assumption that you will have to change other things when you make a change
<dida>
^^
<dida>
but what could I use instead of each_pair there?
<ReinH>
each
orange33 [orange33!~orange33@c-69-255-136-27.hsd1.va.comcast.net] has joined #ruby
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<dida>
alright, i'm testing ^^
mickn [mickn!~mickn@unaffiliated/mickn] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
bbttxu [bbttxu!~adam@24-178-212-229.static.ftwo.tx.charter.com] has joined #ruby
<jlogsdon>
dida: that means that $users[nick] has no value (nil)
<jlogsdon>
make sure you are filling that hash out correctly in your load method
zalesz [zalesz!~zalesz@user-164-127-15-200.play-internet.pl] has joined #ruby
<dida>
well it obviously doesn't, i just want to add it a value
<dida>
" $users[nick][:rank] = 1
<dida>
$users[nick][:password] = password2
<dida>
send "PRIVMSG #{nick} :You have successfully registered!""
<dida>
that's the register method
<jlogsdon>
that's correct. the problem isn't that
<jlogsdon>
the problem has to be either in your #load method, or the fact that the nick does not currently exist in the hash
<jlogsdon>
i'd put $users[nick] ||= {} at the top of #register
Emmanuel_Chanel [Emmanuel_Chanel!star2@ZQ115148.ppp.dion.ne.jp] has joined #ruby
Iraepurface [Iraepurface!~enroxorz@unaffiliated/enroxorz] has quit [#ruby]
<jlogsdon>
that will set the nick's data to an empty hash if ther eis no value there
<dida>
the #load method is the same, except for the two lines you told me to change
<dida>
let me try "$users[nick] ||= {}"
veronatii [veronatii!~citrus@ip68-6-95-91.sb.sd.cox.net] has joined #ruby
<jlogsdon>
if the nick isn't in the file you're loading then of course $users[nick] will be nil.
SegFaultAX|work [SegFaultAX|work!~mkbernard@173.228.45.162] has joined #ruby
<jlogsdon>
that's what the $users[nick] ||= {} will fix
<dida>
how come it worked without that before?
<jlogsdon>
because before you were setting a single value on the hash-key. now you're setting a value inside of another hash nested in the first one
<jlogsdon>
so $users[nick] = nil unless you set it. $users[nick] = 1 sets it (old code). $users[nick][:rank] throws an exception because $users[nick] is not a hash yet
<dida>
oh.
<jlogsdon>
that last one is like say `user = $users[nick]; user[:rank];`
<dida>
it works now, except for i can register more than once
<jlogsdon>
$users.include? nick is not correct
<jlogsdon>
$users.key? nick is what you want
<jlogsdon>
#include? checks for the inclusion of a *value*, you want to check for the existance of a *key*
<jlogsdon>
now i must go do my own work. good luck
leoncamel [leoncamel!~user@KD175129170046.ppp-bb.dion.ne.jp] has joined #ruby
<orange33>
I installed 1.8.7 and RubyGems separately from source but couldn't get the gem command working. Is RubyGems supposed to be installed into the 1.8.7 tree, either in whole or part?
<codatory>
RubyGems should be included in 1.8.7
impulze [impulze!~impulze@eta-ori.net] has quit ["Leaving"]
<orange33>
codatory: Where at? I don't see gem in bin/.
bwlang [bwlang!~anonymous@70-91-134-14-ma-ne.hfc.comcastbusiness.net] has joined #ruby
<orange33>
(I read a bunch of stuff but this didn't seem clear)
hydrozen [hydrozen!~textual@modemcable110.38-37-24.static.videotron.ca] has joined #ruby
<orange33>
I installed both separately but was getting: "bin/gem:8:in `require': no such file to load -- rubygems (LoadError)"
<orange33>
One solution suggested moving the contents of lib/rubygems and rubygems.rb into the 1.8.7 tree, so I'm trying to figure out how it's supposed to be installed.
Squarepy [Squarepy!~Squarepy@vpn-144-138.vpn.uva.nl] has joined #ruby
impulze [impulze!~impulze@eta-ori.net] has joined #ruby
Squarepy [Squarepy!~Squarepy@unaffiliated/squarepy] has joined #ruby
<codatory>
orange33: Hrm; looks like 1.8.7 doesn't come w/ rubygems. I hadn't compiled it from scratch in ages since it's dead soon.
enroxorz [enroxorz!~enroxorz@unaffiliated/enroxorz] has joined #ruby
Jakee` [Jakee`!~Jakee`@5ad317fe.bb.sky.com] has joined #ruby
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
<orange33>
I know, I'm running into all kinds of problems with 1.8.7 but I'm stuck supporting it on a project. I couldn't get p330 compiled on Ubuntu due to openssl problems (again), but p357 worked.
<shevy>
I am also still on the 1.8.x branch. ruby 1.8.7 (2011-12-28 patchlevel 357) [i686-linux]
<codatory>
Server or dev box install?
<orange33>
shevy: Yeah, that's the one that worked for me. codatory: Yes, server dev box. ;)
<shevy>
orange33 when I compile rubygems, it works though
<shevy>
gem env says first GEM PATH is at /usr/lib/ruby/gems/1.8
<codatory>
Why not use REE (like I am)
zommi [zommi!~quassel@HSI-KBW-078-042-009-093.hsi3.kabel-badenwuerttemberg.de] has joined #ruby
<orange33>
shevy: I compiled both separately, put the gem bin in my path, but when I execute any gem command I got the error I posted above.
<orange33>
codatory: Have to mirror production for testing, using 1.8.7-p330 (and I can't do that since I couldn't get the right patch level installed so p357 it is).
rottenrec1 [rottenrec1!~ADMIN@75-140-8-252.static.rvsd.ca.charter.com] has joined #ruby
<shevy>
odd
<Boohbah>
orange33: is there any way you can convince these people to let you use 1.9?
<codatory>
What version of RubyGems did you install?
<shevy>
orange33, when require 'rubygems' fails then you dont have a rubygems/ directory in your SITE_LIB
<orange33>
Boohbah: Thx, already went down that path but can't take the time required to rewrite the project.
<shevy>
my rubygems resides under /usr/lib/ruby/site_ruby/1.8/rubygems/ I assume you dont have that directory?
rottenrec1 [rottenrec1!~ADMIN@75-140-8-252.static.rvsd.ca.charter.com] has joined #ruby
<orange33>
shevy: That's exactly what I'm wondering: does RubyGems get installed into the 1.8.7 tree, or separately and then referenced by --prefix and/or --distdir?
rottenrec1 [rottenrec1!~ADMIN@75-140-8-252.static.rvsd.ca.charter.com] has joined #ruby
<orange33>
I can't find simple instructions for this, this probably looks stupid to people who know how this works.
<orange33>
codatory: Was looking at that today after my misadventures with rvm.
<shevy>
orange33 not sure ... if the --prefix was --prefix=/usr then it should just work. at least it seems to do for me here
rottenrec1 [rottenrec1!~ADMIN@75-140-8-252.static.rvsd.ca.charter.com] has joined #ruby
ianbrandt [ianbrandt!~ianbrandt@99-111-99-153.uvs.sndgca.sbcglobal.net] has joined #ruby
<shevy>
on debian I have had something strange happen
<shevy>
but I removed all old ruby things, compiled on my own and things worked from that point
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
<orange33>
Which is why I ask, because it suggests a sequence where RubyGems was installed externally but then needed to be partially moved into the 1.8.7 tree, if that makes sense.
<shevy>
you should find out where rubygems/ is on your system
<orange33>
shevy: Oh I know where everything is--I prefix everything, which is probably why I'm having a problem. ;)
<shevy>
where is it!!! :(
josemota [josemota!~josemota@188.250.142.104] has joined #ruby
<orange33>
shevy: In a custom directory under a user account created to manage the app (/home/user/blah).
<shevy>
ok
<shevy>
I think just copying that should work
<shevy>
I mean rubygems.rb + rubygems/
<orange33>
So that means RubyGems is supposed to be installed into the 1.8.7 tree from the beginning, right? That's what I'm trying to figure out.
rottenrec1 [rottenrec1!~ADMIN@75-140-8-252.static.rvsd.ca.charter.com] has joined #ruby
JustinCampbell [JustinCampbell!~justinCam@74-94-59-225-Philadelphia.hfc.comcastbusiness.net] has quit [#ruby]
<shevy>
yeah
<shevy>
it sits here in my SITE_DIR
<shevy>
and gems work for me
<orange33>
So when I get the source for RubyGems, specify --prefix (or --distdir?) somewhere in the 1.8.7 tree, like lib/1.8/whatever.
<shevy>
dunno never used --distdir
<shevy>
but hey
<shevy>
it's just copying some files
<shevy>
if it does not work, you can remove those files!
bsbravo [bsbravo!~BrunoSoar@187.72.55.179] has joined #ruby
rottenrec1 [rottenrec1!~ADMIN@75-140-8-252.static.rvsd.ca.charter.com] has joined #ruby
<codatory>
What issue were you having w/ RVM? I've found it generally easy to work with and use it daily... The only thing that hasn't worked well for me is system-wide installs.
gillstein [gillstein!~jgill@rrcs-50-74-0-42.nyc.biz.rr.com] has joined #ruby
<orange33>
codatory: Not gonna go there. I'm done. ;)
Marco [Marco!~marco@Marco-2.Kiewit.Dartmouth.EDU] has joined #ruby
ryanf [ryanf!~ryanf@5.sub-174-253-241.myvzw.com] has joined #ruby
canton7 [canton7!~canton7@188-222-105-229.zone13.bethere.co.uk] has joined #ruby
Jake232 [Jake232!~textual@5e0e5331.bb.sky.com] has joined #ruby
PaciFisT [PaciFisT!~PeaCE@76-10-149-67.dsl.teksavvy.com] has joined #ruby
ctp [ctp!~ctp@212.60.237.26] has joined #ruby
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
gillstein [gillstein!~jgill@rrcs-50-74-0-42.nyc.biz.rr.com] has joined #ruby
crodas [crodas!~crodas@git.crodas.org] has joined #ruby
akem [akem!~akem@222.144.120.78.rev.sfr.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
Skaag [Skaag!~Skaag@cpe-67-247-51-89.nyc.res.rr.com] has joined #ruby
cableray [cableray!~cableray@wl-dhcp176-151.Mines.EDU] has joined #ruby
rickmasta [rickmasta!~rickmasta@pool-71-183-247-164.nycmny.fios.verizon.net] has joined #ruby
geaif [geaif!~geaif@7-239.62-188.cust.bluewin.ch] has joined #ruby
wedtm [wedtm!~wedtm@50-78-101-2-static.hfc.comcastbusiness.net] has joined #ruby
tvw [tvw!~tv@e176009133.adsl.alicedsl.de] has joined #ruby
nealstewart [nealstewart!~nealstewa@blk-222-118-172.eastlink.ca] has joined #ruby
<nealstewart>
why is the test::unit documentation for 1.9.2 so abysmal?
<nealstewart>
s/2/3
stephans [stephans!~stephans@209.66.114.6] has joined #ruby
kakashi__ [kakashi__!~kakashi_@nltk/kakashi] has joined #ruby
<codatory>
nealstewart: Because MiniTest is the new hotness
<nealstewart>
google is telling me more
<soulcutter>
you can always contribute documentation...
thordsvin [thordsvin!~porky1353@adsl-99-70-14-188.dsl.bumttx.sbcglobal.net] has joined #ruby
Clordio [Clordio!~textual@c-174-52-72-79.hsd1.ut.comcast.net] has joined #ruby
crodas [crodas!~crodas@git.crodas.org] has joined #ruby
cjs226 [cjs226!~cjs226@99-61-65-242.lightspeed.austtx.sbcglobal.net] has joined #ruby
<shevy>
... especially for software written by lazy others
<nealstewart>
soulcutter: well, as it turns out i shouldn't have been using it anyway...
fermion [fermion!~textual@pool-108-7-224-176.bstnma.fios.verizon.net] has joined #ruby
<nealstewart>
unfortunately this is after i just test::unit exporting junit xml
crankycoder [crankycoder!~crankycod@out-on-169.wireless.telus.com] has joined #ruby
<shevy>
xml!
<shevy>
the last room before hell!
<nealstewart>
selenium tests woop woop.
geekbri [geekbri!~geekbri@64.119.145.106] has joined #ruby
carlyle [carlyle!~carlyle@216.133.69.20] has joined #ruby
stephans [stephans!~stephans@209.66.114.6] has joined #ruby
emocakes [emocakes!~om@187.54.14.193] has joined #ruby
thordsvin [thordsvin!~porky1353@adsl-99-70-14-188.dsl.bumttx.sbcglobal.net] has joined #ruby
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby
Liothen [Liothen!~liothen@pdpc/supporter/professional/liothen] has joined #ruby
youdonotexist [youdonotexist!~youdonote@192.206.158.10] has joined #ruby
sterNiX [sterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
ctp [ctp!~ctp@dslc-082-083-128-247.pools.arcor-ip.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
cylence [cylence!~cylence@68.25.78.77] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
sterNiX [sterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
eignerchris_ [eignerchris_!~eignerchr@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
tayy [tayy!~tayy@208.59.93.230] has joined #ruby
rickmasta [rickmasta!~rickmasta@pool-71-183-247-164.nycmny.fios.verizon.net] has joined #ruby
diverdude [diverdude!~diverdude@1709ds1-vbr.0.fullrate.dk] has joined #ruby
<diverdude>
hmm its strange... i do gem install bundler <-- it seems to be installing fine. then do do bundle install but then i get bundle: command not found. What am I doing wrong?
kf8a [kf8a!~kf8a@dslfw4.mei.net] has joined #ruby
atmosx [atmosx!~atmosx@191.116.broadband5.iol.cz] has joined #ruby
Mchl [Mchl!~Mchl@h1881165560.rev.rootvps.pl] has joined #ruby
<diverdude>
got it..had to update PATH
virunga [virunga!~virunga@151.64.57.94] has joined #ruby
headius [headius!~headius@75.107.48.100] has joined #ruby
dcarper1 [dcarper1!~Adium@50-73-187-102-pennsylvania.hfc.comcastbusiness.net] has joined #ruby
jackerran [jackerran!~jackerran@fw.luckie.net] has joined #ruby
donahue [donahue!~johnmdona@4.71.142.195] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
confounds [confounds!~confounds@216.209.34.66] has joined #ruby
Clordio [Clordio!~textual@c-174-52-72-79.hsd1.ut.comcast.net] has joined #ruby
thepix [thepix!~pix@as3-16.starogard.dialup.inetia.pl] has joined #ruby
pantsman [pantsman!~pantsman@2.25.205.98] has joined #ruby
pantsman [pantsman!~pantsman@pdpc/supporter/active/pantsman] has joined #ruby
akem [akem!~akem@222.144.120.78.rev.sfr.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
November [November!november@osiris.parodius.com] has joined #ruby
axl__ [axl__!~axl@173-11-52-113-Minnesota.hfc.comcastbusiness.net] has joined #ruby
jay_zawrotny [jay_zawrotny!~Jay@c-71-205-218-131.hsd1.mi.comcast.net] has joined #ruby
colint [colint!~ColinT@189.164.82.90] has joined #ruby
bbttxu [bbttxu!~adam@pool-71-96-208-205.dfw.dsl-w.verizon.net] has joined #ruby
s0ber [s0ber!~s0ber@114-36-230-145.dynamic.hinet.net] has joined #ruby
y3llow [y3llow!~y3llow@114-36-230-145.dynamic.hinet.net] has joined #ruby
yekta [yekta!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
billy_ran_away [billy_ran_away!~billy_ran@pool-173-69-211-31.bltmmd.fios.verizon.net] has joined #ruby
crankycoder [crankycoder!~crankycod@out-on-169.wireless.telus.com] has joined #ruby
<billy_ran_away>
Can anyone tell me the "standard" error message for ArgumentError when you're missing a series of arguments… def initialize(required, *list_of_arguments) Would it be "wrong number of arguments, only 1"?
<billy_ran_away>
Or would it be wrong number of arguments, minimum 2?
y3llow [y3llow!~y3llow@114-36-230-145.dynamic.hinet.net] has joined #ruby
<codatory>
>> File.open()
<codatory>
ArgumentError: wrong number of arguments (0 for 1)
<codatory>
from (irb):6:in `initialize'
<codatory>
from (irb):6:in `open'
<codatory>
from (irb):6
<billy_ran_away>
codatory: Right but I have a variable number of arguments, just has to be more than 1...
iocor [iocor!~textual@ip-207-090.eduroam.soton.ac.uk] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
<billy_ran_away>
I need list_of_arguments not to be empty...
<codatory>
I believe things that take a variable number of args still use (0 for 1)
avitzurel [avitzurel!~avitzurel@212.179.244.22] has joined #ruby
y3llow [y3llow!~y3llow@114-36-230-145.dynamic.hinet.net] has joined #ruby
<Ankhers>
File.open as optional params.
<Ankhers>
has*
<billy_ran_away>
codatory: Oh okay thanks!
<codatory>
Ankhers: yes, you're right, it does...
<billy_ran_away>
Ankhers: Thank you too. : )
<billy_ran_away>
Oh so that won't work as an example...
<Hanmac>
i test it with a self defined method ... it is also 0 for 1
<billy_ran_away>
I need something that has a minimum number of arguments...
jtmengel [jtmengel!~slm@c-67-176-116-43.hsd1.co.comcast.net] has joined #ruby
goodieboy [goodieboy!~goodieboy@c-68-57-35-79.hsd1.va.comcast.net] has joined #ruby
<Ankhers>
File.open has one mandatory parameter, the filename.
j3r0m3 [j3r0m3!~j3r0m3@70-36-215-74.dsl.dynamic.sonic.net] has joined #ruby
<Ankhers>
That is why when 0 arguments were passed, it said 0 for 1
<billy_ran_away>
Yea but only the first argument is *required* by Ruby, but my programming logic requires that the *optional* arguments have at least 1
y3llow [y3llow!~y3llow@114-36-230-145.dynamic.hinet.net] has joined #ruby
<codatory>
So 0 for 2
<billy_ran_away>
Maybe I should just change it to expect an array...
<jlogsdon>
Well, list_of_arguments would be an array. Just raise your own argumentError if its empoty
berkes [berkes!~ber@a83-163-58-51.adsl.xs4all.nl] has joined #ruby
<Hanmac>
i am still in bad mond because rb_scan_args does not support 12 required and 2 optional params ... :(
trivol [trivol!~aurelien@ip-178.net-89-2-84.rev.numericable.fr] has joined #ruby
emocakes [emocakes!~om@187.54.14.193] has joined #ruby
FrEaKmAn_ [FrEaKmAn_!~Erol@93.103.159.32] has joined #ruby
<RubyPanther>
Hanmac: that is considered a feature
headius [headius!~headius@mobile-166-147-100-097.mycingular.net] has joined #ruby
<RubyPanther>
Hanmac: use an options hash :)
<Hanmac>
nope, an options hash would look bad in this way ... i need (x,y,color)×4 + z,mode
sdwrage [sdwrage!~sdwrage@cpe-184-57-123-50.columbus.res.rr.com] has joined #ruby
goodieboy [goodieboy!~goodieboy@c-68-57-35-79.hsd1.va.comcast.net] has joined #ruby
fifteenhundred [fifteenhundred!~Adium@12.130.119.52] has joined #ruby
rpowell [rpowell!~rpowell@CPE-121-217-0-40.lnse1.cht.bigpond.net.au] has joined #ruby
vraa [vraa!~vraa@c-76-30-135-64.hsd1.tx.comcast.net] has joined #ruby
cableray [cableray!~cableray@wl-dhcp180-224.Mines.EDU] has joined #ruby
strife25 [strife25!~strife25@cpe-098-026-018-050.nc.res.rr.com] has joined #ruby
apeiros_ [apeiros_!~apeiros@77-58-113-31.dclient.hispeed.ch] has joined #ruby
enroxorz [enroxorz!~enroxorz@unaffiliated/enroxorz] has quit [#ruby]
Carmivore [Carmivore!~carmivmor@ec2-174-129-65-235.compute-1.amazonaws.com] has joined #ruby
<jlogsdon>
Amnesia: url.split('/').last
<Amnesia>
thx
Evixion [Evixion!Evixion@67.235.70.231] has joined #ruby
* apeiros_
smells reinvented wheels
Espen-_- [Espen-_-!Espen@sjarken.org] has joined #ruby
<apeiros_>
url[/^\/*$/]
<Amnesia>
jlogsdon: .last is probably 1.9.2 ?
<apeiros_>
no, .last is 1.8.0 or earlier
<jlogsdon>
no... last is on Array
<jlogsdon>
split turns the string into an array exploded by the key given ('/').
<Amnesia>
hm well it's a string..:)
<Amnesia>
ah ok
<Amnesia>
thanks
<jlogsdon>
so api.imgur.com/2/delete would become [api.imgur.com,2,delete]
<diverdude>
ok this is really weird. The gemfile and gemfile.lock directories are located inside a script...i dont get this...why make things so weird? The content of /var/lib/gems/1.8/gems/rails-3.1.3/bin/rails is this: somehttps://gist.github.com/1597078 How do i enter this "directory" ?
<jlogsdon>
the gemfile would be one level up from that...
<jlogsdon>
so /var/lib/gems/1.8/gems/rails-3.1.3/Gemfile
dcarper1 [dcarper1!~Adium@50-73-187-102-pennsylvania.hfc.comcastbusiness.net] has joined #ruby
jbpros [jbpros!~jbpros@100-178-112-217.dyn.adsl.belcenter.be] has joined #ruby
paissad [paissad!~paissad@89-92-16-151.hfc.dyn.abo.bbox.fr] has joined #ruby