apeiros_ changed the topic of #ruby-lang to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
bluepojo_ has joined #ruby-lang
rue|w has quit [Ping timeout: 264 seconds]
datanoise has joined #ruby-lang
bin7me|2 has joined #ruby-lang
punchfac_ has joined #ruby-lang
bluepojo has quit [Ping timeout: 244 seconds]
tdy_ has joined #ruby-lang
bluepojo_ has quit [Remote host closed the connection]
bluepojo has joined #ruby-lang
punchfacechamp has quit [Ping timeout: 246 seconds]
cmckni3 has quit [Quit: Textual IRC Client: www.textualapp.com]
bin7me has quit [Ping timeout: 272 seconds]
punchfac_ has quit [Remote host closed the connection]
psyanid3 has joined #ruby-lang
benanne has quit [Quit: kbai]
cmckni3 has joined #ruby-lang
punchfacechampio has joined #ruby-lang
KA_ has quit [Quit: KA_]
cmckni3 has quit [Client Quit]
punchfacechampio has quit [Client Quit]
punchfacechampio has joined #ruby-lang
amdprophet has quit [Ping timeout: 244 seconds]
lcdhoffman has joined #ruby-lang
wallerdev has joined #ruby-lang
KA_ has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
punchfacechampio has quit [Client Quit]
marr has quit [Ping timeout: 264 seconds]
tdy_ has quit [Ping timeout: 248 seconds]
punchfacechamp has joined #ruby-lang
mjio has quit []
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
krisvage has quit [Remote host closed the connection]
punchfacechamp has quit [Remote host closed the connection]
punchfacechamp has joined #ruby-lang
abuiles_ has left #ruby-lang [#ruby-lang]
punchfacechamp has quit [Remote host closed the connection]
Nisstyre-laptop has quit [Quit: Leaving]
punchfacechamp has joined #ruby-lang
punchfacechamp has quit [Client Quit]
MehLaptop has joined #ruby-lang
agile has joined #ruby-lang
mjio has joined #ruby-lang
postmodern has joined #ruby-lang
soypirate has joined #ruby-lang
sebastiansier has joined #ruby-lang
justinram has quit [Remote host closed the connection]
hakunin has quit [Remote host closed the connection]
KA_ has quit [Quit: KA_]
tylersmith has quit [Quit: tylersmith]
nXqd has quit [Ping timeout: 255 seconds]
geopet has quit [Quit: geopet]
brianpWins has joined #ruby-lang
iamjarvo has joined #ruby-lang
tomzx_mac has joined #ruby-lang
davidbalbert is now known as davidbalber|away
outoftime has quit [Quit: Leaving]
tdy_ has joined #ruby-lang
rue|w has joined #ruby-lang
wasserspiegel has quit [Quit: wasserspiegel]
rue|w has quit [Ping timeout: 260 seconds]
rsl has quit [Quit: Computer has gone to sleep.]
swav has joined #ruby-lang
tdy_ has quit [Ping timeout: 245 seconds]
nXqd has joined #ruby-lang
dopie has joined #ruby-lang
<dopie> Hello all
sam113101 has joined #ruby-lang
sam113101 has left #ruby-lang [#ruby-lang]
gregmore_ has joined #ruby-lang
<dopie> Hello all, is there a method in which I can only allow the user to enter numbers????
gregmoreno has quit [Ping timeout: 248 seconds]
gregmore_ has quit [Ping timeout: 244 seconds]
tylersmith has joined #ruby-lang
<charliesome> dopie: num = loop { gets; break $_.to_i if /^\d+$/ }
tdy_ has joined #ruby-lang
<dopie> howly cow
sepp2k has joined #ruby-lang
__butch__ has quit [Ping timeout: 245 seconds]
<dopie> charliesome: can you explain your code please
<ryanf> haha :)
<dopie> hehehehe
<dopie> i am beginner light green
<dopie> doing the codeschool tuts
<ryanf> charliesome: doesn't it need to be if ~/^\d+$/ ?
sebastiansier has quit [Remote host closed the connection]
<ryanf> answer: yes
__butch__ has joined #ruby-lang
<charliesome> ryanf: nope
<charliesome> ryanf: regex literal in condition will match against $_ (although it'll emit a warning)
<charliesome> i swear if that behaviour is ever removed, i'm quitting ruby and going back to perl
<charliesome> dopie: well
<dopie> im in
<dopie> user_num = Integer (gets.chomp)
<dopie> :)
<charliesome> i get a string from stdin, then i test it against the regex /^\d+$/
<charliesome> which basically makes sure that it's a whole line of digits
<charliesome> if it matches, it breaks the loop and returns $_.to_i
<charliesome> $_ is the string read in by gets
<charliesome> otherwise it goes round the loop again
<ryanf> charliesome: oh, neat
<charliesome> ryanf: does Regexp#~ match against $_?
nXqd has quit [Ping timeout: 264 seconds]
<ryanf> yes
<charliesome> oh cool TIL
<charliesome> i'll have to use that and confuse the fuck out of peopl
<ryanf> yeah one time I used that with flip-flops
<ryanf> it was awesome
njrosati has quit [Quit: Leaving.]
<charliesome> LOL
<charliesome> man flip flops
<charliesome> ruby took far too little from perl
<ryanf> when I was porting an app from rails 2 to 3, I wrote a script that used conditional comments to toggle the codebase back and forth
<ryanf> instead of having to maintain a branch
<ryanf> and I used lots of perlisms in the script, just for fun
__butch__ has quit [Client Quit]
<ryanf> definitely the only time I have ever used flipflops irl
__butch__ has joined #ruby-lang
__butch__ has quit [Remote host closed the connection]
__butch__ has joined #ruby-lang
krisvage has joined #ruby-lang
methods has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
lcdhoffman has quit [Quit: lcdhoffman]
thorncp has left #ruby-lang [#ruby-lang]
jonahR has quit [Read error: Operation timed out]
jondot has quit [Ping timeout: 255 seconds]
MehLaptop has quit [Remote host closed the connection]
krisvage has quit [Ping timeout: 240 seconds]
macmartine has joined #ruby-lang
__butch__ has quit [Remote host closed the connection]
__butch__ has joined #ruby-lang
__butch__ has quit [Remote host closed the connection]
Honeycomb has joined #ruby-lang
__butch__ has joined #ruby-lang
__butch__ has quit [Remote host closed the connection]
yianna has joined #ruby-lang
bin7me|2 has quit [Read error: Connection reset by peer]
methods has left #ruby-lang [#ruby-lang]
__butch__ has joined #ruby-lang
<dopie> so in a unless statement .... the false statement comes first and then the true statement comes 2nd?
<tallship> Time for a SPAM Sannich buoys and gulls: http://martinvalasek.com/blog/pictures-from-a-developers-life
<tallship> Then come back and look at it again. Allz willz be clearz and you can haz cheezburgerz thenz
KA_ has joined #ruby-lang
<yianna> This infographic says that Ruby is the hardest to learn... https://www.udemy.com/blog/modern-language-wars/
yianna is now known as ykk
Domon has joined #ruby-lang
<ryanf> dopie: yes, but lots of people think that unless-else is bad style
<ryanf> including me
drueck has joined #ruby-lang
<dopie> ryanf: hummm what would be it's substitute
<ryanf> if-else with the clauses switched around
<ryanf> unless-else just gets too confusing imo
srbaker has quit [Quit: Computer has gone to sleep.]
<ryanf> unless without else is fine though
MehLaptop has joined #ruby-lang
<zzak> zenspider: ping! might you be around?
dzhulk has joined #ruby-lang
drueck has left #ruby-lang [#ruby-lang]
rking has quit [Quit: Rebooting weechat to see if it helps RAM situation]
rking has joined #ruby-lang
spuk has joined #ruby-lang
KA_ has quit [Quit: KA_]
mwjcomputing has joined #ruby-lang
amdprophet has joined #ruby-lang
dhruvasagar has joined #ruby-lang
ykk_ has joined #ruby-lang
<ryanf> wow
RobertBirnie has quit [Quit: RobertBirnie]
Xzyx987X_ has joined #ruby-lang
ykk has quit [Ping timeout: 248 seconds]
dhruvasagar has quit [Ping timeout: 255 seconds]
pr0ton has quit [Quit: pr0ton]
dhruvasagar has joined #ruby-lang
sn0wb1rd has quit [Quit: sn0wb1rd]
Xzyx987X has quit [Ping timeout: 260 seconds]
gregmoreno has joined #ruby-lang
bluepojo_ has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
bluepojo has quit [Ping timeout: 255 seconds]
bluepojo_ has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Ping timeout: 246 seconds]
soypirate has quit [Quit: Leaving]
dhruvasagar has joined #ruby-lang
io_syl has quit [Quit: Computer has gone to sleep.]
ykk_ has quit [Remote host closed the connection]
sn0wb1rd has joined #ruby-lang
gregmoreno has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mistym has joined #ruby-lang
jbsan has joined #ruby-lang
Honeycomb has quit [Quit: Leaving.]
jsilver has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
Guest34862 is now known as ddd
mwjcomputing has quit [Ping timeout: 245 seconds]
lsegal has joined #ruby-lang
__Big0__ has joined #ruby-lang
gregmoreno has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
klebervirgilio has quit [Remote host closed the connection]
ivanoats has quit [Ping timeout: 276 seconds]
krz has joined #ruby-lang
jonahR has joined #ruby-lang
mistym has quit [Remote host closed the connection]
psyanid3 has quit [Quit: Textual IRC Client: www.textualapp.com]
torrieri has joined #ruby-lang
tylersmith has quit [Quit: tylersmith]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
delqn has joined #ruby-lang
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Xzyx987X_ has quit [Ping timeout: 240 seconds]
ioga_wrk has quit [Read error: Operation timed out]
__butch__ has quit [Quit: Leaving.]
ioga_wrk has joined #ruby-lang
torrieri has quit [Quit: Linkinus - http://linkinus.com]
chendo_ has joined #ruby-lang
krz has quit [Ping timeout: 255 seconds]
datanoise has quit [Ping timeout: 260 seconds]
tomzx_mac_ has joined #ruby-lang
concernedcitizen has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 276 seconds]
KA_ has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
methods has joined #ruby-lang
fire has joined #ruby-lang
gregmoreno has joined #ruby-lang
krz has joined #ruby-lang
rue|w has joined #ruby-lang
MehLaptop has quit [Remote host closed the connection]
methods has left #ruby-lang [#ruby-lang]
rue|w has quit [Ping timeout: 246 seconds]
__Big0__ has quit [Remote host closed the connection]
[[johnonymous]] has quit [Quit: Computer has gone to sleep.]
gregmoreno has quit [Remote host closed the connection]
datanoise has joined #ruby-lang
mistym has quit [Remote host closed the connection]
mantono has quit [Ping timeout: 272 seconds]
mantono has joined #ruby-lang
Qfwfq has joined #ruby-lang
Qfwfq has quit [Client Quit]
Qfwfq has joined #ruby-lang
klebervirgilio has joined #ruby-lang
Qfwfq has quit [Client Quit]
klebervirgilio has quit [Ping timeout: 256 seconds]
mjio has quit []
r0bgleeson has quit [Ping timeout: 264 seconds]
Honeycomb has joined #ruby-lang
rippa has joined #ruby-lang
datanoise has quit [Ping timeout: 246 seconds]
datanoise has joined #ruby-lang
xcombelle has joined #ruby-lang
punchfacechampio has joined #ruby-lang
punchfacechampio has quit [Client Quit]
punchfacechampio has joined #ruby-lang
znz_jp has quit [Quit: kill -QUIT $$]
bzalasky has joined #ruby-lang
methods has joined #ruby-lang
znz_jp has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
methods has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 256 seconds]
chimkan_ has joined #ruby-lang
concernedcitizen has quit [Ping timeout: 255 seconds]
bzalasky has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
macmartine has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
rue|w has joined #ruby-lang
chimkan_ has quit [Quit: chimkan_]
chimkan has joined #ruby-lang
hakunin has joined #ruby-lang
rue|w has quit [Ping timeout: 240 seconds]
njrosati has joined #ruby-lang
sn0wb1rd has quit [Read error: Connection reset by peer]
KA_ has quit [Quit: KA_]
klebervirgilio has joined #ruby-lang
dankest has quit [Quit: Leaving...]
Xzyx987X has joined #ruby-lang
njrosati has quit [Ping timeout: 256 seconds]
tomzx_mac has joined #ruby-lang
klebervirgilio has quit [Ping timeout: 244 seconds]
chimkan has quit [Quit: chimkan]
mistym has quit [Remote host closed the connection]
tomzx_mac_ has quit [Ping timeout: 248 seconds]
jonahR has quit [Quit: jonahR]
io_syl has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
Xzyx987X has quit [Ping timeout: 248 seconds]
jaimef_ has joined #ruby-lang
badeball_ has joined #ruby-lang
bzalasky has joined #ruby-lang
HansPampel has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
badeball has quit [Ping timeout: 248 seconds]
mantono has quit [Ping timeout: 248 seconds]
jaimef has quit [Ping timeout: 248 seconds]
krz has quit [Quit: krz]
scepticulous has quit [Quit: No Ping reply in 180 seconds.]
Xzyx987X has joined #ruby-lang
sn0wb1rd has joined #ruby-lang
dankest has joined #ruby-lang
klebervi_ has joined #ruby-lang
mantono has joined #ruby-lang
Weems has quit [Ping timeout: 260 seconds]
iamjarvo has quit [Quit: Leaving.]
mantono has quit [Ping timeout: 240 seconds]
geopet has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 256 seconds]
datanoise has quit [Ping timeout: 255 seconds]
dankest has quit [Quit: Leaving...]
RobertBirnie has joined #ruby-lang
klebervi_ has quit [Remote host closed the connection]
iamjarvo has joined #ruby-lang
rue|w has joined #ruby-lang
Artheist has joined #ruby-lang
kgrz has joined #ruby-lang
rue|w has quit [Read error: Operation timed out]
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
noop has joined #ruby-lang
brianpWins has joined #ruby-lang
JohnBat26|2 has joined #ruby-lang
JohnBat26 has quit [Read error: Operation timed out]
davidbalber|away is now known as davidbalbert
JohnBat26 has joined #ruby-lang
datanoise has joined #ruby-lang
kgrz has quit [Read error: Connection reset by peer]
iamjarvo has quit [Quit: Leaving.]
bzalasky has quit [Remote host closed the connection]
JohnBat26|2 has quit [Ping timeout: 255 seconds]
Mon_Ouie has joined #ruby-lang
RobertBirnie has quit [Quit: RobertBirnie]
kgrz has joined #ruby-lang
sush24 has joined #ruby-lang
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
JohnBat26|2 has joined #ruby-lang
havenwood has joined #ruby-lang
swav has quit [Remote host closed the connection]
swav has joined #ruby-lang
davidbalbert is now known as davidbalber|away
toretore has joined #ruby-lang
swav has quit [Ping timeout: 276 seconds]
fire has quit [Quit: WeeChat 0.4.0]
wardrop has quit [Quit: wardrop]
apeiros_ has joined #ruby-lang
kgrz has quit [Ping timeout: 276 seconds]
fire has joined #ruby-lang
bzalasky has joined #ruby-lang
__Big0__ has joined #ruby-lang
geopet has quit [Quit: geopet]
dhruvasagar has joined #ruby-lang
fsvehla has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 240 seconds]
torrieri has joined #ruby-lang
robbyoconnor has joined #ruby-lang
mercwithamouth has quit [Ping timeout: 264 seconds]
rue|w has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
rue|w has quit [Ping timeout: 246 seconds]
kgrz has joined #ruby-lang
mercwithamouth has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
nXqd has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
kgrz has quit [Quit: Computer has gone to sleep.]
Mon_Ouie has quit [Ping timeout: 248 seconds]
nXqd has quit [Ping timeout: 248 seconds]
postmodern has quit [Ping timeout: 248 seconds]
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
__Big0__ has quit [Remote host closed the connection]
fire has quit [Ping timeout: 248 seconds]
kurko_ has quit [Quit: Computer has gone to sleep.]
francisfish has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
apeiros_ has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
postmodern has joined #ruby-lang
sush24 has joined #ruby-lang
nXqd has joined #ruby-lang
fjfish has joined #ruby-lang
francisfish has quit [Ping timeout: 276 seconds]
sush24 has quit [Quit: This computer has gone to sleep]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
gphillips has joined #ruby-lang
beho has joined #ruby-lang
wankel has joined #ruby-lang
zmike123 has joined #ruby-lang
sush24 has joined #ruby-lang
vlad_starkov has joined #ruby-lang
gnufied has joined #ruby-lang
ottbot has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 264 seconds]
rue|w has joined #ruby-lang
dc5ala has joined #ruby-lang
rue|w has quit [Ping timeout: 255 seconds]
solars has joined #ruby-lang
mytrile has joined #ruby-lang
krz has joined #ruby-lang
Honeycomb has quit [Quit: Leaving.]
Honeycomb has joined #ruby-lang
Honeycomb has quit [Client Quit]
solars has quit [Quit: WeeChat 0.3.7]
Honeycomb has joined #ruby-lang
solars has joined #ruby-lang
voker57 has quit [Remote host closed the connection]
brianpWins has joined #ruby-lang
fjfish has quit [Remote host closed the connection]
sush24 has quit [Ping timeout: 246 seconds]
xcombelle has quit [Ping timeout: 264 seconds]
dankest has joined #ruby-lang
havenn has joined #ruby-lang
krisvage has joined #ruby-lang
wardrop has joined #ruby-lang
havenn has quit [Ping timeout: 244 seconds]
wallerdev has quit [Quit: wallerdev]
brianpWins has quit [Quit: brianpWins]
Artheist has quit [Ping timeout: 248 seconds]
judofyr has joined #ruby-lang
JohnBat26|2 has quit [Read error: Connection reset by peer]
marr has joined #ruby-lang
maxmanders has joined #ruby-lang
maxmanders has quit [Client Quit]
gphillips has quit [Remote host closed the connection]
maxmanders has joined #ruby-lang
<yorickpeterse> morning kids
swav has joined #ruby-lang
<yorickpeterse> Oh great, ruby-doc.org now has ads
<yorickpeterse> at least I only just noticed them because my adblocker was a cunt
kevinfagan has joined #ruby-lang
swav has quit [Ping timeout: 240 seconds]
rue|w has joined #ruby-lang
blacktulip has joined #ruby-lang
rue|w has quit [Ping timeout: 260 seconds]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
earthquake has joined #ruby-lang
jxie has quit [Quit: leaving]
lele|w has quit [Ping timeout: 264 seconds]
nXqd_ has joined #ruby-lang
Honeycomb has quit [Quit: Leaving.]
Honeycomb has joined #ruby-lang
beho has quit [Remote host closed the connection]
wankel has quit [Ping timeout: 264 seconds]
nXqd has quit [Ping timeout: 244 seconds]
charliesome_ has joined #ruby-lang
Honeycomb has quit [Client Quit]
Criztian has joined #ruby-lang
agnitio has joined #ruby-lang
charliesome has quit [Disconnected by services]
caral has joined #ruby-lang
charliesome_ is now known as charliesome
lele|w has joined #ruby-lang
KU0N has joined #ruby-lang
io_syl has quit [Quit: Computer has gone to sleep.]
Axsuul has quit [Ping timeout: 255 seconds]
<antbody> morning
workmad3 has joined #ruby-lang
swav has joined #ruby-lang
ngw has joined #ruby-lang
jbsan has quit [Quit: jbsan]
beiter has joined #ruby-lang
beho has joined #ruby-lang
nXqd_ has quit [Quit: leaving]
nXqd has joined #ruby-lang
jbsan has joined #ruby-lang
rue|w has joined #ruby-lang
jbsan has quit [Client Quit]
krz has quit [Ping timeout: 240 seconds]
nkr has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
marr has quit [Ping timeout: 246 seconds]
rue|w has quit [Ping timeout: 276 seconds]
caral has quit [Quit: caral]
<andrewvos> wat
<andrewvos> yorickpeterse: That is sad
krz has joined #ruby-lang
<injekt> sad
pbjorklund has quit [Read error: Operation timed out]
ngw has quit [Quit: ngw]
rue has quit [Remote host closed the connection]
pbjorklund has joined #ruby-lang
dankest has quit [Quit: Leaving...]
beho_ has joined #ruby-lang
agnitio has quit [Ping timeout: 264 seconds]
beho has quit [Ping timeout: 248 seconds]
KA_ has joined #ruby-lang
agnitio has joined #ruby-lang
agnitio has quit [Read error: Connection reset by peer]
fire has joined #ruby-lang
<andrewvos> liek dis if u kry evry tiem
KA_ has quit [Quit: KA_]
dr_bob has joined #ruby-lang
kgrz has joined #ruby-lang
jxie has joined #ruby-lang
cultureulterior_ has joined #ruby-lang
Domon has quit [Remote host closed the connection]
badeball_ is now known as badeball
* yorickpeterse shudders at the thought of actually ever using memegenerator
<yorickpeterse> lelelelelleel upboats
zmike123 has quit [Ping timeout: 256 seconds]
<andrewvos> haha
klebervi_ has joined #ruby-lang
<yorickpeterse> hue hue hue
klebervi_ has quit [Read error: Connection reset by peer]
klebervi_ has joined #ruby-lang
beho_ has quit [Remote host closed the connection]
klebervirgilio has joined #ruby-lang
pcboy_ has quit [Ping timeout: 244 seconds]
geson has joined #ruby-lang
zmike123 has joined #ruby-lang
Jaynx has quit [Read error: No route to host]
<yorickpeterse> wat
Jaynx has joined #ruby-lang
klebervi_ has quit [Ping timeout: 240 seconds]
klebervirgilio has quit [Ping timeout: 244 seconds]
<yorickpeterse> Also fuck me, I forgot how much better it is to listen to white people's metal music while coding
<yorickpeterse> Instead of hip-hop or electro/house/techno/etc
<faces> i can't listen to music while i code anymore, i realised i was associating music with code after a while and it ruins the music forever
<andrewvos> faces: Listen to dubstep then, it's not like you'll ever want to listen to it while doing anything else
<yorickpeterse> Please don't make him jump off a building
<faces> any dubstep i hear just reminds me of this now http://www.youtube.com/watch?v=gEJHrmliVQw
<yorickpeterse> faces: shit, have you seen the one with the dancing truck?
<faces> i dont think so, at least i don't remember it but to be honest i don't find this stuff when i'm of sound mind
<yorickpeterse> the dancing tractor or w/e it was
<yorickpeterse> Right fuck this, lunch
krz has quit [Read error: Connection reset by peer]
<yorickpeterse> LEEEEROOOY
dzhulk has quit [Ping timeout: 244 seconds]
dzhulk has joined #ruby-lang
<andrewvos> JEEENKIIINSSS
beho has joined #ruby-lang
geson has left #ruby-lang [#ruby-lang]
workmad3 has quit [Ping timeout: 240 seconds]
pcboy_ has joined #ruby-lang
workmad3 has joined #ruby-lang
sush24 has joined #ruby-lang
fire has quit [Ping timeout: 246 seconds]
zmike123 has quit [Ping timeout: 244 seconds]
beho has quit [Remote host closed the connection]
zmike123 has joined #ruby-lang
<charliesome> holy shit
<charliesome> so i have these openssl segfaults on 2.0.0-p0
<charliesome> i thought my install of openssl must've been buggered
<charliesome> but nope, 2.0.0-rc2 works perfectly
pcboy_ has quit [Ping timeout: 248 seconds]
klebervirgilio has joined #ruby-lang
banister`sleep has joined #ruby-lang
pcboy_ has joined #ruby-lang
beho has joined #ruby-lang
beho has quit [Remote host closed the connection]
fire has joined #ruby-lang
fsvehla has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 248 seconds]
pcboy_ has quit [Ping timeout: 248 seconds]
zmike123 has quit [Quit: Выходжу]
<kke> hmm i don't understand how i can require unpacked soap4r gem
<kke> gem install soap4r -> require 'soap4r' works just fine but if i unpack it, there's no obvious file to require
<yorickpeterse> kke: require 'path/to/soap4r/lib/soapr4'
<yorickpeterse> * soap4r
<kke> soap4r-1.5.8$ find ./ -name soap4r*
<kke> nothing
<kke> there's no gemspec either
<kke> soap4r-1.5.8$ ls
<kke> bin lib test
sebastiansier has joined #ruby-lang
<kke> $ ls lib
<kke> soap tags wsdl xsd
marr has joined #ruby-lang
<yorickpeterse> Hm, then the Gemspec probably adds lib/soap to the loadpath
<yorickpeterse> instead of what would normally be used (lib/soap4r.rb)
<kke> but why there's no gemspec when i gem unpack
<yorickpeterse> Define unpack
<yorickpeterse> Using `tar` or the gem CLI?
<kke> gem unpack soap4r
<kke> it has worked fine for other gems
<yorickpeterse> Chances are the soap4r Gem doesn't include the Gemspec
<kke> how does it work as a gem then?
robbyoconnor has quit [Ping timeout: 248 seconds]
<yorickpeterse> Yup, doesn't include it
<injekt> DARN IT
<yorickpeterse> injekt: hue hue hue
<injekt> slow on the trigger, injekt
<kke> so how do i require it like require 'soap4r' does?
<kke> add lib to load_paths?
<injekt> yes
<injekt> that's what rubygems does after all
<injekt> path = File.expand_path('path/to/soa4r/lib'); $: << path; require 'soap4r'
<injekt> can I ask, why are you doing this?
<kke> didn't work
<injekt> how descriptive of you
<yorickpeterse> "k"
<kke> because i can't add it to gemfile, as it conflicts with actionwebservice and there's a custom soap4r based piece of turd service that needs to run too
<kke> $:.unshift File.expand_path('../soap4r-1.5.8/lib', __FILE__); > require 'soap4r'
<kke> LoadError: no such file to load -- soap4r
<yorickpeterse> kke: require 'soap'
<yorickpeterse> There's no file called soap4r.rb
<kke> LoadError: no such file to load -- soap
<kke> lib/soap then
<kke> => true
<kke> maybe now
<yorickpeterse> kke: hm, apparently there's no soap.rb file either, there is instead soap/soap.rb
<manveru> lol
rolfb has joined #ruby-lang
<injekt> wow
<kke> argh still no SOAP::RPC::Router::SOAPEnvelope
<apeiros_> soap is only good for dirty things
<yorickpeterse> I see what you did there
krisvage has quit [Ping timeout: 245 seconds]
* manveru likes handsoap
<manveru> as much as i can like anything related to soap :P
<kke> which has funnily been placed in soap4r-1.5.8/lib/soap/element.rb:class SOAPEnvelope
krz has joined #ruby-lang
<ddv> anything but simple or object orientated
<yorickpeterse> apparently savon is popular in here
<kke> savon seems to work ok but every version breaks compatibility with old code
<kke> but it's only a client
<kke> wash_out is some sort of rails3 soap endpoint that should be nicer than action web service, good for those lucky folks that managed to upgrade.. just upgraded from 2.0.2 to 2.3.17, took quite an effort
yalue has joined #ruby-lang
ikst has joined #ruby-lang
dzhulk has quit [Quit: Leaving.]
carloslopes has joined #ruby-lang
dzhulk has joined #ruby-lang
TaQ has joined #ruby-lang
banister`sleep has quit [Remote host closed the connection]
jxie has quit [Quit: leaving]
kgrz has quit [Quit: Computer has gone to sleep.]
rue has joined #ruby-lang
mister_zombie has joined #ruby-lang
<mister_zombie> Hello! I have a quick question. What would be a good way in Ruby to implement a multi-process fifo kind of thing, kind of like Go's channels?
<mister_zombie> While my question is quick, I understand the answer may be much, much longer. :P
sush24 has quit [Read error: Connection reset by peer]
pcboy_ has joined #ruby-lang
<manveru> mister_zombie: the hard part is the "in ruby" :)
<mister_zombie> I figured out that if I'm working in a Linux environment, FIFO's are probably what I'm looking for.
<mister_zombie> That and forking like a dirty hooker.
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
<manveru> well, i'd recommend beanstalkd :)
<cored> hello all
<cored> I have a doubt regarding a refactoring
<cored> the person who review my code just decide to not merge the code to master
<cored> this was his answer:
<cored> Not merging this refactor. It adds needless overhead on what should be simple methods.
<cored> and here is the code before
<mister_zombie> manveru: Will read about that. Thanks! Will still look into system FIFO's
mister_zombie has left #ruby-lang [#ruby-lang]
<cored> this method was inside an mongo mapper model named Project
Stilo has joined #ruby-lang
ikst has quit [Remote host closed the connection]
<yorickpeterse> cored: it's a bit hard to read
<yorickpeterse> plus `if task = self.tasks.find(tid) || (tid.length < 6 ? self.tasks.find_by_task_id(tid.to_i) : nil)` is a no-no for me
<cored> wait
<cored> I want to show you guys my refactor
<cored> it's the same code but I just wanted to isolate persistence testing
<yorickpeterse> oh, that's existing code?
<cored> this application had just integration tests which were very slow, after I've done wih that
<cored> yes
<cored> still the same
<yorickpeterse> ah
<cored> I extract the entire logic and put it in another class, just to send the model and stub that in my tests
<cored> so after that I was about to refactor it
<cored> the guy in charge/arquitect just respond with that
<cored> I did a lot of changes to that model because we don't have actual unit tests
<yorickpeterse> pastie your refactor, it says more than a thousand words
<yorickpeterse> Something unrelated: always ask first before you start doing big refactors so you don't end up wasting your time
jxpx777 has quit [Quit: Leaving...]
cored has quit [Ping timeout: 246 seconds]
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
beho has joined #ruby-lang
<cored> my connection dropped
<cored> yorickpeterse: here the two gists, notice that those are explanotory tests
caral has joined #ruby-lang
caral has quit [Client Quit]
<yorickpeterse> Those are the same URLs :)
<yorickpeterse> I meant the refactor for the method, not the tests
nyuszika7h has quit [Quit: -yes]
nyuszika7h has joined #ruby-lang
<cored> oh sorry
<cored> wait
<cored> there you go
iamjarvo has joined #ruby-lang
TaQ has left #ruby-lang [#ruby-lang]
jondot has joined #ruby-lang
adambeynon has joined #ruby-lang
davidbalber|away is now known as davidbalbert
rolfb has quit [Quit: Linkinus - http://linkinus.com]
<yorickpeterse> That's not much of a refactor
<yorickpeterse> The problem here isn't the location/container of the method, it's the logic in it
<yorickpeterse> e.g. the `tid.length < 6 ? @project.tasks.find_by_task_id(tid.to_i` bit ought to go in its own method
<yorickpeterse> The `step = foo if bar` bits can probably also go in one
dblack__ has joined #ruby-lang
beho has quit [Remote host closed the connection]
<yorickpeterse> http://pastie.org/private/fsj1ihkzkobhzed65vtxqa probably broke something but it should clear things up
mytrile has quit [Remote host closed the connection]
davidbalbert is now known as davidbalber|away
r0bgleeson has joined #ruby-lang
<cored> yorickpeterse: but what do you think of moving the logic out of the model?
<cored> yorickpeterse: I think that's causing a project of testing in isolation that particular logic, I can't wait 1:30 minutes for the 230 examples to run, that's too much
<yorickpeterse> I'm not familiar with what it eventually does but it seems to be a good thing to do that
<yorickpeterse> Since it's a mix of tasks, projects, etc
<cored> exactly my point
yfeldblum has quit [Ping timeout: 245 seconds]
carloslopes has quit [Remote host closed the connection]
noop has quit [Remote host closed the connection]
banister`sleep has joined #ruby-lang
wmoxam has joined #ruby-lang
<andrewvos> Which one of you is @hipsterhacker?
jxpx777 has joined #ruby-lang
<cored> hm
<yorickpeterse> andrewvos: ...that's not a rubyist
<yorickpeterse> it's a novelty account
rippa has joined #ruby-lang
<andrewvos> yorickpeterse: I know!
<yorickpeterse> suuure
dustint has joined #ruby-lang
<andrewvos> :)
sush24 has joined #ruby-lang
ebouchut has joined #ruby-lang
kgrz has joined #ruby-lang
sush24 has quit [Client Quit]
sockmonk has joined #ruby-lang
rue has quit [Remote host closed the connection]
rue has joined #ruby-lang
sush24 has joined #ruby-lang
<oddmunds> :)
<cored> hahaha
<cored> really funny
sush24 has quit [Ping timeout: 260 seconds]
breakingthings has joined #ruby-lang
kurko_ has joined #ruby-lang
rue has quit [Ping timeout: 276 seconds]
rsl has joined #ruby-lang
mistym has joined #ruby-lang
fn___ has joined #ruby-lang
sailias has joined #ruby-lang
dustint has quit [Remote host closed the connection]
fn____ has joined #ruby-lang
fn____ has quit [Client Quit]
fn___ has quit [Client Quit]
fn___ has joined #ruby-lang
fn____ has joined #ruby-lang
yfeldblum has joined #ruby-lang
<injekt> :-/
krz has quit [Quit: krz]
geson_ has joined #ruby-lang
fn____ has quit []
fn__ has joined #ruby-lang
sebastiansier has quit [Remote host closed the connection]
fn____ has joined #ruby-lang
fn___ has quit [Remote host closed the connection]
fn____ has quit [Client Quit]
dr_bob has quit [Quit: Leaving.]
srbaker has joined #ruby-lang
fn__ has quit []
tomzx_mac has joined #ruby-lang
lbb has joined #ruby-lang
geson_ has quit [Quit: Leaving.]
dr_bob has joined #ruby-lang
methods has joined #ruby-lang
sush24 has joined #ruby-lang
methods has quit [Client Quit]
Swimming_Bird has joined #ruby-lang
Swimming_Bird has quit [Max SendQ exceeded]
lbb has quit [Ping timeout: 276 seconds]
Swimming_Bird has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
mistym has quit [Remote host closed the connection]
MaddinXx_ has joined #ruby-lang
chrismar035 has joined #ruby-lang
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
ebouchut has quit [Quit: Quitte]
kristofferrr has joined #ruby-lang
robbyoconnor has joined #ruby-lang
sailias1 has joined #ruby-lang
krz has joined #ruby-lang
dustint has joined #ruby-lang
sailias has quit [Ping timeout: 245 seconds]
mailo has joined #ruby-lang
slyphon has joined #ruby-lang
sebastiansier has joined #ruby-lang
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
gustavnils has joined #ruby-lang
<dopie> How do I make this print only the odd numbers
<gnufied> aw
<dopie> !=
<dopie> :)
mistym has joined #ruby-lang
Sarcophabus has joined #ruby-lang
dblack__ has left #ruby-lang [#ruby-lang]
realDAB has joined #ruby-lang
fn_ has joined #ruby-lang
sailias1 has quit [Quit: Leaving.]
jxpx777 has quit [Ping timeout: 245 seconds]
Austin__ has joined #ruby-lang
sailias has joined #ruby-lang
<sailias> dopie: 0.upto(20) {|i| print "#{i} " if i.odd?}
<dopie> not there yet
<dopie> :)
<sailias> lol, ok np
<realDAB> sailias: you don't have to do interpolation there, just print i
<dopie> but thank you very much
<dopie> i wrote 6 lines of code and you wrote 1
<dopie> freaking amazing
outoftime has joined #ruby-lang
<sailias> realDAB: just wanted the space in between
<realDAB> sailias: ah, didn't spot that
<sailias> some might like: 0.upto(20).select{|i| i.odd?}.join(",")
<sailias> but w/e :)
banister`sleep has left #ruby-lang [#ruby-lang]
banisterfiend has joined #ruby-lang
<banisterfiend> (0..20).select(&:odd?).join(" ").display
<apeiros_> banisterfiend: ping
<banisterfiend> apeiros_: sup
<apeiros_> banisterfiend: in pry, when using a variable named 'history', am I really supposed to always add a space in front of it? :)
<apeiros_> i.e., 'history = 1' # won't work, since this triggers the `history` command
<apeiros_> ' history = 1' # work around
<dopie> interpolation = ?
<banisterfiend> apeiros_: or this: Pry.commands.delete("history")
<banisterfiend> since 'hist' is another alias anyway
gnufied has quit [Quit: Leaving.]
<apeiros_> yeah, into which I ran right after history :D
<apeiros_> ok, command_prefix it is
<apeiros_> % seems sane
<apeiros_> thx
<sailias> see dopie, there is always another way. I even wrote the (&:odd?) in console first, but for simplicity i used the full select {|i|} but you can count on banister to give you a sweet one liner :)
<dopie> I haven't learned upto or .odd yet as you can tell with my pastie :)
enebo has joined #ruby-lang
cmckni3 has joined #ruby-lang
<zzak> .select(&:odd?) is the same as: (0..20).select { |num| num.odd? }
robbyoconnor has quit [Max SendQ exceeded]
fn_ has quit [Remote host closed the connection]
robbyoconnor has joined #ruby-lang
<dopie> sailias: where did you get to learn those in tuts???
<dopie> or you just basically read a book on it
__Big0__ has joined #ruby-lang
forrest has joined #ruby-lang
<sailias> dopie: just takes time, you can read up on ruby arrays
<banisterfiend> i wish ruby enumerables accepted plain: (0..20).select(:odd?) syntax
jxpx777 has joined #ruby-lang
Sarcophabus has quit [Read error: Connection reset by peer]
<judofyr> banisterfiend: yeah, it'd odd that it only works with .reduce
Sarcophabus has joined #ruby-lang
<banisterfiend> yeah
gnufied has joined #ruby-lang
<zzak> judofyr++
<judofyr> judofyr # => 1
jxpx777 has quit [Ping timeout: 248 seconds]
<realDAB> banisterfiend: that would run aground on (possible edge) cases where they could take a symbol argument that wasn't meant to be a method name
<realDAB> e.g., each_with_object(:x)
solars has quit [Ping timeout: 244 seconds]
<realDAB> (like i said, an edge case :-)
sailias1 has joined #ruby-lang
<crankharder> if I Kernel.system("cd ~/path_with_rvm_rc_in_it && bundle install") I get all kinds of fun failures becuase, I believe, the command isn't run in a login shell. Ideas on how to fix that?
<crankharder> basically rvm doesn't load properly when trying to do that
jonahR has joined #ruby-lang
enebo has quit [*.net *.split]
outoftime has quit [*.net *.split]
slyphon has quit [*.net *.split]
djinni` has quit [*.net *.split]
Caius has quit [*.net *.split]
bcol has quit [*.net *.split]
asio has quit [*.net *.split]
zanea has quit [*.net *.split]
ggreer has quit [*.net *.split]
dustint has quit [*.net *.split]
sailias has quit [*.net *.split]
ruskie has quit [*.net *.split]
amateurhuman has quit [*.net *.split]
snk has quit [Quit: going down with ship.]
dustint has joined #ruby-lang
amateurhuman has joined #ruby-lang
ruskie has joined #ruby-lang
enebo has joined #ruby-lang
Caius has joined #ruby-lang
bcol has joined #ruby-lang
djinni` has joined #ruby-lang
slyphon has joined #ruby-lang
asio has joined #ruby-lang
ggreer has joined #ruby-lang
zanea has joined #ruby-lang
outoftime has joined #ruby-lang
sailias1 is now known as sailias
snk has joined #ruby-lang
postmodern has quit [Quit: Leaving]
gnufied has quit [Quit: Leaving.]
poga has joined #ruby-lang
ged has quit [Quit: WeeChat 0.4.0]
tomzx_mac has quit [Ping timeout: 255 seconds]
mistym has quit [Ping timeout: 255 seconds]
Mon_Ouie has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
fire has quit [Quit: WeeChat 0.4.0]
bzalasky has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
kristofferrr has quit [Quit: ❤]
bzalasky has joined #ruby-lang
davidbalber|away is now known as davidbalbert
robbyoconnor has quit [Ping timeout: 256 seconds]
jondot has quit [Ping timeout: 276 seconds]
judofyr has quit [Remote host closed the connection]
nXqd has quit [Ping timeout: 255 seconds]
geopet has joined #ruby-lang
Austin__ has quit [Quit: Leaving.]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
kgrz has quit [Quit: Computer has gone to sleep.]
gnufied has joined #ruby-lang
fn__ has joined #ruby-lang
io_syl has joined #ruby-lang
fn__ has quit [Remote host closed the connection]
nXqd has joined #ruby-lang
rsl has quit [Quit: Textual IRC Client: www.textualapp.com]
bzalasky has quit [Remote host closed the connection]
rsl has joined #ruby-lang
s1n4 has joined #ruby-lang
timur has joined #ruby-lang
Austin__ has joined #ruby-lang
Austin__ has quit [Remote host closed the connection]
s1n4 has quit [Client Quit]
<timur> Hey guys, why does the Ruby Resolv class (and Dnsruby) cache the hosts file?
rsl has quit [Client Quit]
urbanmonk has joined #ruby-lang
rsl has joined #ruby-lang
nXqd has quit [Ping timeout: 252 seconds]
ddfreyne has quit [Excess Flood]
ddfreyne has joined #ruby-lang
chrismar035 has quit [Quit: chrismar035]
nkr has quit [Quit: Linkinus - http://linkinus.com]
KA__ has joined #ruby-lang
urbanmonk has quit [Quit: Bye!]
urbanmonk has joined #ruby-lang
wallerdev has joined #ruby-lang
fn__ has joined #ruby-lang
timur has quit [Ping timeout: 245 seconds]
dc5ala has quit [Quit: Ex-Chat]
sepp2k has quit [Ping timeout: 245 seconds]
anonymuse has joined #ruby-lang
sepp2k has joined #ruby-lang
blacktul_ has joined #ruby-lang
blacktulip has quit [Ping timeout: 255 seconds]
Sarcophabus has quit [Quit: Leaving...]
KA__ has quit [Quit: KA__]
realDAB has quit [Quit: realDAB]
sn0wb1rd has quit [Quit: sn0wb1rd]
fn__ has quit [Remote host closed the connection]
glebm has quit [Read error: Operation timed out]
__butch__ has joined #ruby-lang
mbull9 has joined #ruby-lang
__butch__ has quit [Remote host closed the connection]
__butch__ has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
workmad3 has quit [Read error: Connection reset by peer]
havenwood has joined #ruby-lang
carloslopes has joined #ruby-lang
beho has joined #ruby-lang
dr_bob has left #ruby-lang [#ruby-lang]
gregmoreno has joined #ruby-lang
brianpWins has joined #ruby-lang
glebm has joined #ruby-lang
mercwithamouth has joined #ruby-lang
timur has joined #ruby-lang
__Big0__ has quit [Remote host closed the connection]
tylersmith has joined #ruby-lang
dblack_ has joined #ruby-lang
dblack__ has joined #ruby-lang
__Big0__ has joined #ruby-lang
sebastiansier has quit [Read error: Connection reset by peer]
havenwood has quit [Remote host closed the connection]
thone has joined #ruby-lang
apeiros_ has joined #ruby-lang
<zzak> judofyr's streak is incredibly tough
thone_ has quit [Ping timeout: 240 seconds]
sebastiansier has joined #ruby-lang
<andrewvos> timur: Performance?
jondot has joined #ruby-lang
tdy_ has quit [Ping timeout: 276 seconds]
Qwak has joined #ruby-lang
My_Hearing has joined #ruby-lang
<timur> andrewvos: but it's not correct, as far as i can tell. there are no guarantees that the file is not changed
carloslopes has quit [Read error: Connection reset by peer]
mailo has quit [Quit: Linkinus - http://linkinus.com]
carloslopes has joined #ruby-lang
thorncp has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 245 seconds]
_carloslopes has joined #ruby-lang
sush24 has quit [Quit: Leaving]
kevinfagan has quit [Ping timeout: 245 seconds]
timur has quit [Ping timeout: 246 seconds]
dankest has joined #ruby-lang
carloslopes has quit [Ping timeout: 264 seconds]
timur has joined #ruby-lang
<andrewvos> timur: :(
davidbalbert is now known as davidbalber|away
davidbalber|away is now known as davidbalbert
mistym has quit [Remote host closed the connection]
tdy_ has joined #ruby-lang
thone_ has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
thone has quit [Ping timeout: 255 seconds]
__Big0__ has quit [Remote host closed the connection]
__Big0__ has joined #ruby-lang
breakingthings has quit []
dankest has quit [Quit: Leaving...]
tdy_ has quit [Ping timeout: 256 seconds]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
tallship has quit [Quit: Too Hip gotta go - Going..... Down..... Mr. Tyler?]
davidbalbert is now known as davidbalber|away
RickHull has joined #ruby-lang
<RickHull> anyone used bindata gem before?
<RickHull> they have BitFields, seemingly convenient
<RickHull> but no way to get or set the value of any bit?
vmoravec has quit [Quit: Leaving]
fn_ has joined #ruby-lang
My_Hearing has quit [Ping timeout: 255 seconds]
larrybolt has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
cultureulterior_ has quit [Quit: cultureulterior_]
KA_ has joined #ruby-lang
<larrybolt> Hi, I'm learning ruby and I'm a bit confused and cannot find where to find the correct documentation, or how to read the documentation.
_carloslopes has quit [Read error: Connection reset by peer]
<larrybolt> Tho at http://www.ruby-doc.org/core-2.0/File.html I cannot find the foreach method, neither what the File objects returns.
<larrybolt> I'm following the tryruby.org tutorial, and just tried out File.forea­ch(path)
<larrybolt> Hi, I'm learning ruby and I'm a bit confused and cannot find where to find the correct documentation, or how to read the documentation.
carloslopes has joined #ruby-lang
<RickHull> ruby tends to use #each rather than #foreach
<larrybolt> (sorry for the weird order of messages, tried copy/pasting after noticing I wasn't identified with nickserv :P)
<RickHull> as well, #each is defined on enumerations. Files at their essence are enumerable on bytes, or possibly lines
sn0wb1rd has joined #ruby-lang
<RickHull> start with File.open
<RickHull> you can also do, but not generally recommended, File.readlines.each
<RickHull> File.readlines(path).each
<RickHull> keep in mind you are looking at reference documentation, whereas you should probably be consulting tutorial-style
fsvehla has quit [Remote host closed the connection]
fsvehla has joined #ruby-lang
<RickHull> http://docs.ruby-doc.com/docs/ProgrammingRuby/ see Basic Input and Ouput section
<larrybolt> Oh! That probably is where it is going wrong! I was amazed by the beautify of the reference docs but was a bit frustrated when a quick search for ::foreach didn't returned any results.
<larrybolt> I have a php background btw
<larrybolt> Would it be a good idea to just jump into rails or better leave that for a bit until I have a better understanding of ruby?
<larrybolt> I'm guessing the latter :P
<RickHull> i think that's a better long term plan
<RickHull> if you need to crank something out in the short term you could skip some things
fn_ has quit [Remote host closed the connection]
<larrybolt> Thanks for the link RickHull! tryruby.org skips quite some stuff and I start wondering why exactly something works
<zzak> :D
<RickHull> this one is good too http://pine.fm/LearnToProgram/
<zzak> noones ever called the docs beautiful <3
<larrybolt> Well everything I experienced today (just started with ruby and rails) is stunning and b-e-a-utiful!
marr has quit [Ping timeout: 245 seconds]
<larrybolt> I just fear for how easy it will be to find a job as a ruby/rails developer here in Belgium as PHP is pretty common
zorbyte has quit [Quit: leaving]
<larrybolt> And I must say the admin-feature of django and web2py almost made me reconsider my choice when comparing ruby and python as next step.
<crankharder> it appears that cmd line args and gets do not play very nicely together... if I run a script like this: ruby my_fun_script foo_arg -- and that script has a 'gets' command, I get this error: `gets': No such file or directory - foo_arg (Errno::ENOENT)
<crankharder> can i have my cake and eat it too?
<RickHull> paste your script
mbull9 has quit [Remote host closed the connection]
<RickHull> the answer to your question is yes
torrieri has joined #ruby-lang
<drbrain> crankharder: Kernel#gets is ARGF.gets not $stdin.gets
davidbalber|away is now known as davidbalbert
<RickHull> and ARGF is a perlism right?
<RickHull> takes a little bit of explanation IIRC
<crankharder> drbrain: ty
<drbrain> RickHull: I think perl has a similar feature, yes
<RickHull> ARGF definitely tries to have its cake and eat it too, representing the "input file" IIRC. either piped in or named in a command line arg
breakingthings has joined #ruby-lang
<drbrain> yeah, I've bit myself a couple times recently with Kernel#gets
pr0ton has joined #ruby-lang
swav has quit [Remote host closed the connection]
swav has joined #ruby-lang
jonahR has quit [Quit: jonahR]
blacktul_ has quit [Remote host closed the connection]
<RickHull> crankharder: "The arguments passed to your script are stored in the ARGV Array, one argument per element. ARGFassumes that any arguments that aren't filenames have been removed fromARGV."
<RickHull> so you can use naked/ARGF gets, just make sure to consume ARGV first
<crankharder> I used $stdin.gets
swav has quit [Ping timeout: 272 seconds]
<crankharder> works like gravey
mrsolo has joined #ruby-lang
KA_ has quit [Quit: KA_]
nyuszika7h has quit [Ping timeout: 246 seconds]
nyuszika7h has joined #ruby-lang
methods has joined #ruby-lang
Nisstyre has quit [Quit: Leaving]
kevinfagan has joined #ruby-lang
MaddinXx_ has quit [Remote host closed the connection]
methods has left #ruby-lang [#ruby-lang]
jonahR has joined #ruby-lang
krz has quit [Quit: krz]
ruby-lang680 has joined #ruby-lang
ruby-lang680 has left #ruby-lang [#ruby-lang]
larrybolt has quit [Remote host closed the connection]
snarfmason has joined #ruby-lang
__Big0__ has quit [Read error: Connection reset by peer]
jastix has joined #ruby-lang
__Big0__ has joined #ruby-lang
datanoise has quit [Ping timeout: 255 seconds]
KA_ has joined #ruby-lang
My_Hearing has joined #ruby-lang
Qwak has quit []
tdy_ has joined #ruby-lang
havenwood has joined #ruby-lang
<crankharder> can I run a get a system command and get both the output and the exit code returned somehow?
<drbrain> crankharder: Process.spawn
<drbrain> + Process.wait
<drbrain> you can do it with popen also
<crankharder> smells like newfangled 1.9 hotness
timur has quit [Quit: Lost terminal]
<crankharder> but ty, will look at both
<drbrain> you can get the last exit status with $?, but I'm always worried I'll get the wrong status code (due to racing) when using just system or `` with multiple processes
<crankharder> Process.spawn seems to be dumping the cmd's STDOUT, but not returning it to a variable
<crankharder> er, yea, just returning it
<drbrain> crankharder: you can redirect IO
<crankharder> ah, ok fair
<drbrain> crankharder: check the documentation
<crankharder> yep
<drbrain> I use it with Tempfile or IO.pipe
fn__ has joined #ruby-lang
marr has joined #ruby-lang
bluepojo has joined #ruby-lang
marr123 has joined #ruby-lang
marr123 has quit [Client Quit]
__Big0__ has quit [Remote host closed the connection]
larrybolt has joined #ruby-lang
intellitech has quit [Ping timeout: 264 seconds]
robbyoconnor has joined #ruby-lang
trappist has joined #ruby-lang
marr has quit [Ping timeout: 252 seconds]
<trappist> this is driving me nuts, why would a rescue not rescue? I'm rescuing Koala::Facebook::APIError in my method, but it still raises a Koala::Facebook::APIError and blows up
<RickHull> paste it
pkrnj has joined #ruby-lang
datanoise has joined #ruby-lang
My_Hearing is now known as Mon_Ouie
pr0ton has quit [Quit: pr0ton]
<trappist> k one sec
marr has joined #ruby-lang
<yxhuvud> trappist: how do the ancestor chain of Koala::Facebook::APIError look like? Is it a descendant of StandardError?
<trappist> yxhuvud: let me check that out
<yxhuvud> shouldn't matter if you explicitly check for *that* exception, but if you hadn't, then it would have expressed itself in that way.
sebastiansier has quit [Remote host closed the connection]
<yxhuvud> trappist: try rescuing Exception => e and print whatever exception you get at that point.
<trappist> yxhuvud: yeah it inherits directly from StandardError
urbanmonk has quit [Ping timeout: 272 seconds]
<RickHull> are you sure fail_auth! isn't raising another excp?
<yxhuvud> (or well, not being a descendant of standarderror would express itself in that way)
<trappist> no change if I rescue Exception
<yxhuvud> looking at that stacktrace, OAuthException looks like a candidate
<trappist> oh... it's in fail_auth!... if I comment that out it behaves as expected
<RickHull> \o/
<trappist> yxhuvud: tried that too, but debugged e.class and it was Koala::Facebook::APIError
fn__ has quit [Remote host closed the connection]
kurko_ has quit [Quit: Computer has gone to sleep.]
<trappist> still very confused though, there's no way for fail_auth! to raise a Koala::Facebook::APIError
swav has joined #ruby-lang
<yxhuvud> of course it is, since you pass the exception to it
<trappist> oh, right
<trappist> but, that's nowhere in the backtrace
mbull9 has joined #ruby-lang
intellitech has joined #ruby-lang
intellitech has quit [Client Quit]
<trappist> well, I just reproduced what fail_auth! does in my method and it's ok... still very confused though
swav has quit [Ping timeout: 248 seconds]
<RickHull> try outside of irb
<RickHull> extract to a file and run with ruby
punchfacechampio has quit []
punchfacechamp has joined #ruby-lang
fire has joined #ruby-lang
beiter has quit [Quit: beiter]
intellitech has joined #ruby-lang
mehwork has quit [Quit: leaving]
kurko_ has joined #ruby-lang
snarfmason has quit [Quit: Computer has gone to sleep.]
snarfmason has joined #ruby-lang
rsl has quit [Quit: Computer has gone to sleep.]
k4k1-c0der has joined #ruby-lang
ddd has quit [Read error: Connection reset by peer]
io_syl has quit [Ping timeout: 264 seconds]
io_syl has joined #ruby-lang
KA_ has quit [Quit: KA_]
KA_ has joined #ruby-lang
KA_ has quit [Client Quit]
fire has quit [Quit: WeeChat 0.4.0]
robbyoconnor has quit [Ping timeout: 248 seconds]
hahuang65 has joined #ruby-lang
jastix has quit [Remote host closed the connection]
glebm has quit [Quit: Computer has gone to sleep.]
carloslopes has quit [Remote host closed the connection]
glebm has joined #ruby-lang
Artheist has joined #ruby-lang
mehwork has joined #ruby-lang
ottbot has quit [Ping timeout: 240 seconds]
intellitech has quit [Quit: intellitech]
snarfmason has quit [Quit: Computer has gone to sleep.]
s0ber has quit [Read error: Connection reset by peer]
sebastiansier has joined #ruby-lang
sebastiansier has quit [Remote host closed the connection]
s0ber has joined #ruby-lang
jondot has quit [Ping timeout: 272 seconds]
jondot has joined #ruby-lang
dblack__ has quit [Quit: dblack__]
dblack_ has quit [Quit: dblack_]
sockmonk has quit [Ping timeout: 256 seconds]
sn0wb1rd_ has joined #ruby-lang
intellitech has joined #ruby-lang
sn0wb1rd has quit [Ping timeout: 272 seconds]
sn0wb1rd_ is now known as sn0wb1rd
yalue has quit [Quit: Leaving]
lcdhoffman has joined #ruby-lang
lcdhoffman has quit [Client Quit]
yfeldblum has quit [Ping timeout: 245 seconds]
hahuang65 has quit [Quit: Computer has gone to sleep.]
hahuang65 has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
snarfmason has joined #ruby-lang
<hahuang65> anyone know how to profile what is in the realtime section of Benchmark results?
<drbrain> hahuang65: "profile"?
<hahuang65> yeah, just trying to figure out which component is taking up the most time
<hahuang65> and why
<drbrain> hahuang65: you can use -rprofile or other profilers, but Benchmark.measure (and friends) are like a stopwatch
sailias has quit [Ping timeout: 245 seconds]
<outoftime> hahuang65: I have had tremendously good luck with perftools.rb
<larrybolt> Just out of being curious
wmoxam has quit [Ping timeout: 246 seconds]
<larrybolt> Topaz is a high performance implementation of the Ruby programming language, written in Python on top of RPython (the toolchain that powers PyPy).
<larrybolt> So that means writing Ruby but having just a different compiler/interpreter?
<drbrain> larrybolt: yes
<hahuang65> perftools.rb? thanks
<hahuang65> i'll check those out
<hahuang65> thank you
<drbrain> similar to JRuby
<outoftime> hahuang65: no problem. i have a script that will convert pprof --raw output into a full call tree (for some reason perftools doesn't have this built in, even though the data generated by perftools makes it entirely possible)
<larrybolt> Why are there so many different ways to run Ruby?
<outoftime> hahuang65: it's very messy, but it works -- i'd be happy to gist it for you
<RickHull> larrybolt: why not?
<RickHull> there is one official way, from the guy who created it
<hahuang65> outoftime: that'd be fantastic. Thank you.
<drbrain> larrybolt: because it's fun to do
<drbrain> larrybolt: why are there so many different ways to compile C?
<larrybolt> Good point, as long as any code your write works across all platforms, I guess it's not bad.
<RickHull> also different platforms and implementations can optimize for different things
<larrybolt> I haven't though about it that way, just realising that now, thank you
ottbot has joined #ruby-lang
davidbalbert is now known as davidbalber|away
<hahuang65> outoftime: appreciate it
<outoftime> hahuang65: no problem, let me know if it's useful. someday I'll clean it up and release it in a more formal way
<outoftime> hahuang65: the really cool thing about perftools is that its impact on performance is low enough that you can reasonably run it on live production code
<outoftime> unlike, say, ruby-prof
snarfmason has quit [Quit: Computer has gone to sleep.]
fn__ has joined #ruby-lang
intellitech has quit [Quit: intellitech]
mercwithamouth has quit [Ping timeout: 248 seconds]
r0bgleeson has quit [Quit: WeeChat 0.3.8]
pr0ton has joined #ruby-lang
fn__ has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 245 seconds]
fn__ has joined #ruby-lang
mercwithamouth has joined #ruby-lang
earthquake has quit [Quit: earthquake]
fn__ has quit [Remote host closed the connection]
poga_ has joined #ruby-lang
fn_ has joined #ruby-lang
poga has quit [Ping timeout: 244 seconds]
sailias has joined #ruby-lang
intellitech has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
ryanf has quit [Quit: leaving]
ryanf has joined #ruby-lang
klebervirgilio has quit [Remote host closed the connection]
earthquake has joined #ruby-lang
klebervirgilio has joined #ruby-lang
beho has quit [Remote host closed the connection]
<hahuang65> where do I get pprof?
<hahuang65> I have perftools via gem install... but I dunno where pprof is
<hahuang65> I just gotta download the zip and it'll be a ruby script in there?
<hahuang65> yeah found it.
jonahR has quit [Quit: jonahR]
fn_ has quit [Remote host closed the connection]
klebervirgilio has quit [Ping timeout: 248 seconds]
anonymuse has quit [Quit: Leaving...]
glebm has quit [Quit: Computer has gone to sleep.]
glebm has joined #ruby-lang
forrest has quit [Quit: Leaving]
davidbalber|away is now known as davidbalbert
earthquake has quit [Quit: earthquake]
k4k1-c0der has quit [Quit: Ex-Chat]
snarfmason has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 248 seconds]
<outoftime> hahuang65: the gem should provide a pprof.rb executable
breakingthings has quit []
<outoftime> hahuang65: i believe you'll have a much easier time using that
<hahuang65> yup, i just didn't notice it :)
yfeldblum has joined #ruby-lang
poga_ has quit [Remote host closed the connection]
poga has joined #ruby-lang
sailias has quit [Quit: Leaving.]
wmoxam has joined #ruby-lang
ottbot has quit [Ping timeout: 248 seconds]
snarfmason has quit [Quit: Computer has gone to sleep.]
dustint has quit [Read error: Operation timed out]
davidbalbert is now known as davidbalber|away
RickHull has left #ruby-lang [#ruby-lang]
cmckni3 has quit [Ping timeout: 276 seconds]
davidbalber|away is now known as davidbalbert
iamjarvo has quit [Quit: Leaving.]
postmodern has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
geopet has quit [Quit: geopet]
gustavnils has quit [Quit: Textual IRC Client: www.textualapp.com]
toretore has quit [Quit: Leaving]
mbull9 has quit [Remote host closed the connection]
glebm has quit [Quit: Computer has gone to sleep.]
outoftime has quit [Quit: Leaving]
kurko_ has quit [Quit: Computer has gone to sleep.]