apeiros changed the topic of #ruby-lang to: Ruby 2.0.0-p195: http://ruby-lang.org (Ruby 1.9.3-p429) || Paste >3 lines of text on http://gist.github.com
<havenwood> naquad: You can leave off the #join argument, since you are specifying same as default.
<naquad> havenwood, indeed, thanks
MagBo_ has left #ruby-lang [#ruby-lang]
<havenwood> naquad: ['6173'].pack 'H*'; #=> "as"
<naquad> cool!
<naquad> thats what i was looking for
<naquad> thanks
<havenwood> np
mdedetrich has joined #ruby-lang
marr has quit [Ping timeout: 246 seconds]
DomKM1 has joined #ruby-lang
DomKM has quit [Read error: Operation timed out]
mistym has quit [Remote host closed the connection]
postmodern has joined #ruby-lang
rippa has quit [Ping timeout: 240 seconds]
Axsuul has joined #ruby-lang
Axsuul has quit [Excess Flood]
Axsuul has joined #ruby-lang
sepp2k has quit [Remote host closed the connection]
lguardiola has joined #ruby-lang
lguardiola has quit [Ping timeout: 248 seconds]
dingus_khan has quit [Remote host closed the connection]
rx has joined #ruby-lang
teleological has joined #ruby-lang
lguardiola has joined #ruby-lang
havenwood has quit [Read error: Connection reset by peer]
havenwood has joined #ruby-lang
blaix has quit [Ping timeout: 252 seconds]
elia has quit [Quit: Computer has gone to sleep.]
djwonk has quit [Quit: djwonk]
krohrbaugh has quit [Quit: Leaving.]
blaix has joined #ruby-lang
blaix has quit [Read error: Connection reset by peer]
teleological has quit [Remote host closed the connection]
Johz has quit [Quit: AH HELP ITS ALL CRASHING AT ONCE I CANT STOP IT HELP HELP HELP <transmission ends>]
elia has joined #ruby-lang
<bnagy> anyone good with build stuff on OSX?
<bnagy> trying to build a jni gem and configure can't find a header that seems to be there
tdy has quit [Quit: WeeChat 0.4.0]
tdy has joined #ruby-lang
pskosinski has quit [Ping timeout: 264 seconds]
jperry has joined #ruby-lang
fedesilva has joined #ruby-lang
dhruvasagar has joined #ruby-lang
djwonk has joined #ruby-lang
krohrbaugh has joined #ruby-lang
<bnagy> ha! ok fixed it
<bnagy> lame
<bnagy> Oracle moved jni_md.h into headers/darwin, and jni.h silently looks for it
<bnagy> so it shows up as jni.h not present, but that's not the actual problem
jperry has quit [Quit: jperry]
djwonk has quit [Quit: djwonk]
cofin has joined #ruby-lang
jperry has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 264 seconds]
ruurd has quit [Quit: Leaving...]
ruurd has joined #ruby-lang
ruurd has quit [Client Quit]
ruurd has joined #ruby-lang
ruurd has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
jperry has quit [Quit: jperry]
havenwood has quit [Remote host closed the connection]
Sm3lly has joined #ruby-lang
<dingus_khan> I need someone to yell some wisdom into my head real quick...
hashkey has quit [Ping timeout: 256 seconds]
<bnagy> DON'T CHEW GROUND GLASS
<dingus_khan> thank almighty baby t-rex you're here bnagy, I was REALLY thirsty and didn't feel like getting up
<dingus_khan> also, THIS: http://pastebin.com/h47xX7mY
<dingus_khan> QUE?!
Jungy has joined #ruby-lang
<bnagy> >> [[]]==[[]]
<eval-in> bnagy => true (http://eval.in/31500)
dhruvasagar has joined #ruby-lang
<bnagy> ROBOT BRA
<bnagy> also, == is 'soft' equality
hashkey has joined #ruby-lang
<dingus_khan> hmmm...
<bnagy> mind you eql? would work for that as well
<dingus_khan> as in a soft way as well?
Gaelan has quit [Remote host closed the connection]
<dingus_khan> I just got the robot bra thing, thought you were going surfer dude on me
<bnagy> well the hash to the same, so you can use them as Hash keys
<dingus_khan> I did not understand that sentence
Gaelan has joined #ruby-lang
<bnagy> ok, so a={'foo' => 'bar'}
mdedetrich has quit [Quit: Computer has gone to sleep.]
<dingus_khan> yes
<bnagy> when we then do a['foo'] that is not actually literally the same string ( object id ) as we used as the key
<bnagy> but we want the lookup to work
<dingus_khan> OK
<bnagy> so we say they .eql? each other
<bnagy> even though they're not precisely the same object
<dingus_khan> ahhhhhh....
<bnagy> same with your robot bra
<dingus_khan> interesting, because the blog I got that from said it would return false...
mouse_ has joined #ruby-lang
LinkedoT has quit [Ping timeout: 245 seconds]
<dingus_khan> oh right, I'm using ruby 1.9.3, if that makes a difference (doesn't say so, at least)
LinkedoT has joined #ruby-lang
<bnagy> guess they fixed it. Sorry I didn't really think about the recursion before
MouseTheLuckyDog has quit [Read error: Operation timed out]
<erikh> hi friends
<dingus_khan> fixed it how? so it was always supposed to resolve true because of the soft thing you explained?
<bnagy> I was quite happy when my patch was accepted a week ago, so the current head of Ruby 1.9 deals with recursion perfectly
<bnagy> dingus_khan: it should definitely be true
<bnagy> morning erikh
<dingus_khan> hi erikh! bit presumptuous of me, I know, but I make great waffles if that moves me up the friend ladder any quicker
<erikh> what
<dingus_khan> ok, thank you for that explanation bnagy
<erikh> why do you have such low self-esteem?
<erikh> and why does my opinion matter?
<dingus_khan> it's a personal defect of mine
<erikh> fair 'nuff
<dingus_khan> it's also recursive
dhruvasagar has quit [Read error: Operation timed out]
<dingus_khan> also, BECAUSE YOU'RE ERIKH MAN, tres importante
mouse_ has quit [Ping timeout: 240 seconds]
<erikh> haha what
<dingus_khan> true story.jpeg
mistym has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
Gaelan has joined #ruby-lang
benxao has joined #ruby-lang
mouse_ has joined #ruby-lang
rx has quit [Quit: Textual IRC Client: www.textualapp.com]
krohrbaugh has quit [Quit: Leaving.]
mdedetrich has joined #ruby-lang
<dingus_khan> I can't figure it out... :( : http://pastebin.com/6xEEQJYS
<bnagy> a) what? b) please stop using pastebin
mouse__ has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
cofin has quit [Quit: cofin]
mouse_ has quit [Read error: Operation timed out]
cofin has joined #ruby-lang
mouse__ has quit [Ping timeout: 248 seconds]
<dingus_khan> I was told explicitly to use pastebin when I first came to this chat room. sigh
<bnagy> I think you misheard
<dingus_khan> I don't know why I'm getting a "no method error" on the '+' in that and I don't know why.
<dingus_khan> naw, I can't remember who, but they said "use pastebin", like verbatim
<dingus_khan> they got mad when I used gist
<bnagy> dingus_khan: try http://codepad.org/
havenwood has joined #ruby-lang
<bnagy> I can tell you why it's broken right away though
* FiXato prefers gist over pastebin
<bnagy> you're trying to + two booleans
baba has quit [Ping timeout: 246 seconds]
<havenwood> class TrueClass; def + this; :really_really_true end end
dingus_khan has quit [Remote host closed the connection]
mouse__ has joined #ruby-lang
Senjai has joined #ruby-lang
Senjai has joined #ruby-lang
Senjai has quit [Changing host]
mdedetrich has quit [Quit: Computer has gone to sleep.]
<bnagy> wow, is_fib? is really interesting
djwonk has joined #ruby-lang
krohrbaugh has joined #ruby-lang
mouse_ has joined #ruby-lang
baba has joined #ruby-lang
<bnagy> >> is_fib = proc {|n| [5*(n**2)+4,5*(n**2)-4].any? {|q| Math.sqrt(q).floor**2==q}}; is_fib.call 144
<eval-in> bnagy => true (http://eval.in/31505)
<bnagy> sweeet
<bnagy> >> is_fib = proc {|n| [5*(n**2)+4,5*(n**2)-4].any? {|q| Math.sqrt(q).floor**2==q}}; is_fib.call 145
<eval-in> bnagy => false (http://eval.in/31506)
zachlatta has quit [Remote host closed the connection]
mouse__ has quit [Ping timeout: 248 seconds]
solars has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
nazty has quit [Read error: No route to host]
nignaztic has joined #ruby-lang
mouse_ has quit [Ping timeout: 246 seconds]
<bnagy> breaks at Fib 76
<bnagy> that's Floats for ya :/
<bnagy> it's also probably the slowest way to approach the problem, but it's COOL
madb055 has joined #ruby-lang
[[thufir]] has quit [Quit: Leaving.]
dingus_khan has joined #ruby-lang
MouseTheLuckyDog has joined #ruby-lang
madb055 has quit [Quit: Konversation terminated!]
madb055 has joined #ruby-lang
oldbay has joined #ruby-lang
oldbay has quit []
mbj has quit [Ping timeout: 248 seconds]
xxaM has quit [Quit: lololol]
xxaM has joined #ruby-lang
solars has quit [Ping timeout: 264 seconds]
Jungy has quit [Ping timeout: 246 seconds]
Guest3804 has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
cofin has quit [Quit: cofin]
dingus_khan has quit [Remote host closed the connection]
Jungy has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 246 seconds]
fedesilva is now known as fedesilva_zzzzZZ
henrikho_ has joined #ruby-lang
DomKM1 has quit [Quit: Leaving.]
MouseTheLuckyDog has quit [Read error: Operation timed out]
dingus_khan has joined #ruby-lang
henrikhodne has quit [Ping timeout: 252 seconds]
MasterNayru has joined #ruby-lang
cofin has joined #ruby-lang
MouseTheLuckyDog has joined #ruby-lang
crudson has left #ruby-lang [#ruby-lang]
jsullivandigs has joined #ruby-lang
henrikho_ has quit [Quit: Computer has gone to sleep.]
<dingus_khan> bnagy: thank you for that explanation
dhruvasagar has joined #ruby-lang
<dingus_khan> I don't know why this works then, bnagy: http://codepad.org/DlNG8Dds
lsegal has quit [Ping timeout: 252 seconds]
lsegal has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
GeissT has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
rippa has joined #ruby-lang
cofin has quit [Quit: cofin]
krohrbaugh has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
Senjai has quit [Read error: Operation timed out]
poga has joined #ruby-lang
nertzy has quit [Quit: Leaving]
<MouseTheLuckyDog> Anyone still around on a Sat night? I popen("comand |filter1") then I popen("command| filter 2); in a loop. Command takes a long time.Would it be safe to do something like: a=popen("command").readlines.merge_to_one_string popen("cat #{a}| filter1") popen("cat #{a}|filter2")?
amerine has quit [Quit: Textual IRC Client: www.textualapp.com]
sriehl_ has joined #ruby-lang
ihme-TTilus has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
sriehl has quit [Write error: Broken pipe]
TTilus has quit [Write error: Broken pipe]
Caius has quit [Ping timeout: 361 seconds]
Caius has joined #ruby-lang
amerine has joined #ruby-lang
amerine has quit [Client Quit]
sush24 has joined #ruby-lang
amerine has joined #ruby-lang
TheNotary has joined #ruby-lang
<rue> Yes, if you mean whether the returned string is somehow modified (it isn’t)
joshnz has joined #ruby-lang
<joshnz> Hi all. Can anyone help with a metaprogramming / send method with blocks issue? Example here: http://pastebin.com/cHKmt4DG
<joshnz> Unsure how to correctly pass the block to the send method
<rue> joshnz: Is there a problem with that?
<rue> (Also, you probably want to use # for comments…)
<joshnz> lol, nope ;)
<joshnz> facepalm on the comments ;) I'm a c# dev by day unfortunately, so I've got c-style commenting in mind.
<joshnz> The reason I asked the question was from an earlier test I was doing. I failed to remove the actual definitions which is why I was having issues. Just realised my mistake.
<joshnz> It's been a long day. Thanks for the code review though!
intellitech has quit [Ping timeout: 248 seconds]
<MouseTheLuckyDog> rue: I'm worried about escape characters.
<rue> MouseTheLuckyDog: You can use shellescape if you need to
<rue> MouseTheLuckyDog: IO.spawn might have a better interface at any rate
dhruvasagar has quit [Ping timeout: 245 seconds]
Quatrerwin has quit [Remote host closed the connection]
cordax has joined #ruby-lang
mistym has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
Senjai has joined #ruby-lang
Senjai has joined #ruby-lang
Senjai has quit [Changing host]
TheNotary has quit [Quit: Leaving]
ruurd has joined #ruby-lang
workmad3 has quit [Read error: Operation timed out]
Senjai has quit [Read error: Operation timed out]
cordax has quit [Quit: Computer has gone to sleep.]
<heftig> don't shellescape
<heftig> just popen the filters and write the string to the IO
<heftig> f1 = popen("filter1"); f1.write(a);
tomzx_mac has quit [Ping timeout: 246 seconds]
ruskie has quit [Excess Flood]
mootpointer has joined #ruby-lang
mootpointer has quit [Client Quit]
yellow5 has quit [Ping timeout: 245 seconds]
ruskie has joined #ruby-lang
yellow5 has joined #ruby-lang
blowmage has quit [Remote host closed the connection]
blowmage has joined #ruby-lang
stamina has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<MouseTheLuckyDog> If I open a file in ruby is there a way to finds it's name?
krohrbaugh has joined #ruby-lang
kgrz has joined #ruby-lang
havenwood has joined #ruby-lang
workmad3 has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
Cakey has joined #ruby-lang
dfdf has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 252 seconds]
baba has quit [Quit: WeeChat 0.4.0]
saarinen has joined #ruby-lang
jxie has quit [Quit: leaving]
hramrach_ has quit [Remote host closed the connection]
ruurd has quit [Quit: Leaving...]
dingus_khan has quit [Remote host closed the connection]
hramrach_ has joined #ruby-lang
dingus_khan has joined #ruby-lang
vlad_starkov has joined #ruby-lang
marr has joined #ruby-lang
Cakey has quit [Ping timeout: 246 seconds]
hashkey has quit [Ping timeout: 248 seconds]
meizaps has quit [Ping timeout: 264 seconds]
Cakey has joined #ruby-lang
fedesilv_ has joined #ruby-lang
workmad3 has quit [Ping timeout: 264 seconds]
Glass_saga has quit [Remote host closed the connection]
Glass_saga has joined #ruby-lang
fedesilva_zzzzZZ has quit [Ping timeout: 252 seconds]
Glass_saga has quit [Remote host closed the connection]
hashkey has joined #ruby-lang
benanne has joined #ruby-lang
Glass_saga has joined #ruby-lang
Glass_saga has quit [Remote host closed the connection]
meizaps has joined #ruby-lang
Glass_saga has joined #ruby-lang
Jungy has quit [Quit: Leaving]
kgrz has quit [Ping timeout: 256 seconds]
kennyvb_ has quit [Quit: ZNC - http://znc.in]
kennyvb has joined #ruby-lang
teleological has joined #ruby-lang
workmad3 has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
ruurd has joined #ruby-lang
DEac- has quit [Ping timeout: 252 seconds]
krohrbaugh has joined #ruby-lang
dfdf has quit [Remote host closed the connection]
sush24 has quit [Quit: This computer has gone to sleep]
krohrbaugh has quit [Ping timeout: 252 seconds]
workmad3 has quit [Read error: Operation timed out]
DEac- has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
pskosinski has joined #ruby-lang
dfdf has joined #ruby-lang
arubin has quit [Quit: Textual IRC Client: www.textualapp.com]
dingus_khan has quit [Remote host closed the connection]
chendo has quit [Ping timeout: 276 seconds]
chendo_ has joined #ruby-lang
apeiros has joined #ruby-lang
Axsuul has quit [Ping timeout: 264 seconds]
chendo_ has quit [Excess Flood]
apeiros_ has quit [Ping timeout: 256 seconds]
chendo_ has joined #ruby-lang
marr has quit [Ping timeout: 252 seconds]
tylersmith has joined #ruby-lang
bashdy has joined #ruby-lang
dfdf has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
tylersmith has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby-lang
workmad3 has joined #ruby-lang
kgrz has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 248 seconds]
maxmanders has joined #ruby-lang
kgrz has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby-lang
mbj has joined #ruby-lang
krohrbaugh has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 252 seconds]
feedruby has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 252 seconds]
henrikhodne has joined #ruby-lang
zmike has joined #ruby-lang
zmike has quit [Read error: Connection reset by peer]
feedruby has quit [Client Quit]
ruby-lang366 has joined #ruby-lang
ruby-lang366 has quit [Client Quit]
barttenbrinke has joined #ruby-lang
apeiros has quit [Ping timeout: 248 seconds]
ruby-lang466 has joined #ruby-lang
<spike|spiegel> MouseTheLuckyDog: umm still looking? there's #path
<MouseTheLuckyDog> spike|spiegel, thanks
elia has joined #ruby-lang
pskosinski has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
pskosinski has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
Asher has quit [Read error: Operation timed out]
DEac- has quit [Ping timeout: 252 seconds]
dfdf has joined #ruby-lang
workmad3 has quit [Read error: Operation timed out]
Johz has joined #ruby-lang
dingus_khan has joined #ruby-lang
dfdf has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
ruby-lang466 has quit [Ping timeout: 250 seconds]
DEac- has joined #ruby-lang
dingus_khan has quit [Ping timeout: 245 seconds]
barttenbrinke has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
tylersmith has joined #ruby-lang
joshnz has quit [Read error: Connection reset by peer]
kgrz has quit [Ping timeout: 240 seconds]
tylersmith has quit [Ping timeout: 246 seconds]
glebm has quit [Ping timeout: 246 seconds]
madb055 has quit [Ping timeout: 252 seconds]
marr has joined #ruby-lang
madb055 has joined #ruby-lang
vlad_starkov has joined #ruby-lang
solars has joined #ruby-lang
charliesome has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby-lang
charliesome has joined #ruby-lang
ia___ has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 252 seconds]
krohrbaugh has joined #ruby-lang
madb055 has quit [Remote host closed the connection]
madb055 has joined #ruby-lang
benxao has quit [Remote host closed the connection]
krohrbaugh has quit [Ping timeout: 252 seconds]
swav has quit [Remote host closed the connection]
elia has quit [Quit: Computer has gone to sleep.]
workmad3 has quit [Ping timeout: 245 seconds]
symm- has joined #ruby-lang
bashdy has quit [Quit: bashdy]
machuga|away is now known as machuga
dingus_khan has quit [Remote host closed the connection]
apeiros has quit [Read error: Connection reset by peer]
apeiros has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
marr has quit [Ping timeout: 252 seconds]
toretore has joined #ruby-lang
alessandro1997 has joined #ruby-lang
mbj has quit [Ping timeout: 252 seconds]
mbj has joined #ruby-lang
tylersmith has joined #ruby-lang
tylersmith has quit [Ping timeout: 256 seconds]
Senjai has joined #ruby-lang
Senjai has quit [Changing host]
Senjai has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 252 seconds]
apeiros has joined #ruby-lang
zenspider has quit [Ping timeout: 256 seconds]
Guest26259 has quit [Ping timeout: 246 seconds]
mksm has joined #ruby-lang
mksm is now known as Guest9315
wasnotrice has quit [Ping timeout: 246 seconds]
wasnotrice has joined #ruby-lang
halorgium has quit [Ping timeout: 246 seconds]
krohrbaugh has joined #ruby-lang
alessandro1997 has quit [Quit: Sto andando via]
apeiros has quit [Remote host closed the connection]
halorgium has joined #ruby-lang
krohrbaugh has quit [Read error: Operation timed out]
Senjai has quit [Remote host closed the connection]
GeissT_ has joined #ruby-lang
_dumfries has quit [Ping timeout: 256 seconds]
PacketMonkey has quit [Ping timeout: 246 seconds]
PacketMonkey has joined #ruby-lang
GeissT has quit [Ping timeout: 252 seconds]
agile has quit [Ping timeout: 256 seconds]
agile has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
_dumfries has joined #ruby-lang
GeissT_ has quit [Quit: MillBroChat AdIRC User]
GeissT has joined #ruby-lang
apeiros has joined #ruby-lang
snk has quit [Quit: rebut]
symm- has quit [Ping timeout: 248 seconds]
GeissT has quit [Ping timeout: 252 seconds]
snk has joined #ruby-lang
GeissT has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
sush24 has joined #ruby-lang
tylersmith has joined #ruby-lang
enebo has joined #ruby-lang
tylersmith has quit [Ping timeout: 248 seconds]
teleological has quit [Remote host closed the connection]
jperry has joined #ruby-lang
Mon_Ouie has quit [Remote host closed the connection]
poga has quit [Remote host closed the connection]
krohrbaugh has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
hashkey has quit [Ping timeout: 264 seconds]
hashkey has joined #ruby-lang
hashkey is now known as Guest44444
krohrbaugh has quit [Read error: Operation timed out]
elia has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 248 seconds]
Mon_Ouie has joined #ruby-lang
glebm has joined #ruby-lang
jperry has quit [Quit: jperry]
vlad_starkov has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
Guest44444 has quit []
madb055 has quit [Ping timeout: 256 seconds]
hashkey_temp has joined #ruby-lang
GeissT has quit [Ping timeout: 240 seconds]
enebo has quit [Quit: enebo]
hashkey_temp is now known as hashkey
mdedetrich has joined #ruby-lang
Kabaka has quit [Excess Flood]
mdedetrich has quit [Client Quit]
elia has joined #ruby-lang
mdedetrich has joined #ruby-lang
wallerdev has joined #ruby-lang
mucker has joined #ruby-lang
ikrima has quit [Quit: Computer has gone to sleep.]
anonymuse has joined #ruby-lang
GeissT has joined #ruby-lang
tylersmith has joined #ruby-lang
s0ber has quit [Remote host closed the connection]
s0ber has joined #ruby-lang
Kabaka has joined #ruby-lang
jperry has joined #ruby-lang
kgrz has joined #ruby-lang
Kabaka has quit [Excess Flood]
tylersmith has quit [Ping timeout: 256 seconds]
henrikhodne has quit [Quit: Computer has gone to sleep.]
Kabaka has joined #ruby-lang
nignaztic has quit [Ping timeout: 252 seconds]
djwonk has quit [Quit: djwonk]
dfdf has joined #ruby-lang
postmodern has quit [Quit: Leaving]
ryez has quit [Ping timeout: 250 seconds]
jperry has quit [Quit: jperry]
Asher has joined #ruby-lang
mose has quit [Quit: leaving]
zommi has joined #ruby-lang
dfdf has quit [Remote host closed the connection]
Gaelan has joined #ruby-lang
Gaelan has quit [Client Quit]
Gaelan has joined #ruby-lang
zommi has quit [Remote host closed the connection]
anonymuse has quit [Quit: Leaving...]
dfdf has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
tylersmith has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
wallerdev has joined #ruby-lang
tylersmith has quit [Ping timeout: 246 seconds]
jperry has joined #ruby-lang
mdedetrich has quit [Quit: Computer has gone to sleep.]
GeissT has quit [Quit: MillBroChat AdIRC User]
mucker has quit [Quit: leaving]
teleological has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
apeiros has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
dfdf has quit [Remote host closed the connection]
Gaelan has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
apeiros__ has joined #ruby-lang
apeiros has quit [Ping timeout: 252 seconds]
mrfelix has joined #ruby-lang
apeiros_ has quit [Ping timeout: 256 seconds]
banister_ has joined #ruby-lang
apeiros has joined #ruby-lang
apeiros__ has quit [Ping timeout: 264 seconds]
banister_ has quit [Read error: Connection reset by peer]
jperry has quit [Quit: jperry]
henrikhodne has joined #ruby-lang
jperry has joined #ruby-lang
mrfelix has quit [Quit: Computer has gone to sleep.]
kgrz has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
dhruvasagar has joined #ruby-lang
havenwood has joined #ruby-lang
kgrz has joined #ruby-lang
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
jperry has quit [Quit: jperry]
rippa has quit [Ping timeout: 240 seconds]
MasterNayru has quit [Remote host closed the connection]
kgrz has quit [Ping timeout: 252 seconds]
jperry has joined #ruby-lang
jperry has quit [Client Quit]
benxao has joined #ruby-lang
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
whitemage has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 245 seconds]
jacknagel has quit [Ping timeout: 240 seconds]
norplr has quit [Ping timeout: 264 seconds]
jacknagel has joined #ruby-lang
Spaceghost|cloud has quit [Ping timeout: 264 seconds]
UziMonkey__ has quit [Ping timeout: 264 seconds]
rafeed has joined #ruby-lang
intellitech has joined #ruby-lang
tomzx_mac has joined #ruby-lang
tylersmith has joined #ruby-lang
rafeed__ has joined #ruby-lang
rafeed has quit [Quit: Lost terminal]
rafeed__ has quit [Client Quit]
tylersmith has quit [Ping timeout: 256 seconds]
cordax has joined #ruby-lang
hramrach_ has quit [Remote host closed the connection]
hramrach_ has joined #ruby-lang
jxie has joined #ruby-lang
rafeed has joined #ruby-lang
cordax has quit [Client Quit]
randym_ has joined #ruby-lang
ironcame1 has joined #ruby-lang
neurodam1ge has joined #ruby-lang
tpope_ has joined #ruby-lang
lianj_ has joined #ruby-lang
lianj_ has quit [Changing host]
lianj_ has joined #ruby-lang
rafeed has quit [Quit: Lost terminal]
spectra_ has joined #ruby-lang
rafeed_ has joined #ruby-lang
DEac- has quit [Quit: leaving]
glebm has quit [Ping timeout: 252 seconds]
madveru has joined #ruby-lang
dhruvasagar has joined #ruby-lang
kgrz has joined #ruby-lang
whitemage has quit [Ping timeout: 252 seconds]
DEac- has joined #ruby-lang
rafeed_ has quit [Ping timeout: 240 seconds]
kgrz has quit [Client Quit]
intellitech has quit [*.net *.split]
tomzx_mac has quit [*.net *.split]
henrikhodne has quit [*.net *.split]
Johz has quit [*.net *.split]
Caius has quit [*.net *.split]
ironcamel has quit [*.net *.split]
spectra has quit [*.net *.split]
rondale_sc has quit [*.net *.split]
GitNick has quit [*.net *.split]
machuga has quit [*.net *.split]
lianj has quit [*.net *.split]
supyo has quit [*.net *.split]
tpope has quit [*.net *.split]
anekos_ has quit [*.net *.split]
manveru has quit [*.net *.split]
neurodamage has quit [*.net *.split]
henrikhodne has joined #ruby-lang
krohrbaugh has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
glebm has joined #ruby-lang
supyo has joined #ruby-lang
benxao has quit [Remote host closed the connection]
rafeed1 has joined #ruby-lang
intellitech has joined #ruby-lang
rondale_sc has joined #ruby-lang
Caius has joined #ruby-lang
machuga has joined #ruby-lang
anekos_ has joined #ruby-lang
GitNick has joined #ruby-lang
Johz has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
TheNotary has joined #ruby-lang
ihme-TTilus is now known as TTilus
MartynKeigher has quit [Ping timeout: 240 seconds]
<rafeed1> hey all
<rafeed1> anyone available to answer some questions for a newbie?
tylersmith has joined #ruby-lang
<havenwood> rafeed1: Sure. What's up?
<rafeed1> hey. So I finally wrote my first ruby code… http://pastebin.com/Sq9Dhi93
<rafeed1> it basically searches my google starred json and attempts to find links to all of my starred 500px images
<rafeed1> but some images on 500px are deleted so it errors out
<rafeed1> and doesn't keep going through the list of photo id's that I have
<rafeed1> This works if all of the photo id's are still alive, but bugs out if a photo's been deleted
tylersmith has quit [Ping timeout: 246 seconds]
MartynKeigher has joined #ruby-lang
<rafeed1> sorry if the code makes your eyes bleed haha
<apeiros> rafeed1: there's always eyebleach.com
mrfelix has joined #ruby-lang
<havenwood> rafeed1: Sounds like you might be looking for rescuing an exception? Do you know about `begin rescue`?
<rafeed1> apeiros: haha good one
<rafeed1> havenwood: no, never heard about it, but it seems like I do indeed need to gracefully get out of the exception that's caused by the 404
<havenwood> rafeed1: Just rescue the type of exception that is being raised. E.g.: begin; #code here gets 404; rescue TypeOfErrorHere;end
mrfelix has quit [Client Quit]
<rafeed1> ah okay. thanks havenwood.
<rafeed1> I'll look into it
<rafeed1> I get a "gstarpx.rb:115:in `block in <main>': undefined method `[]' for nil:NilClass (NoMethodError)"
<apeiros> rafeed1: line 115 is `imurl = photo["image_url"]`
<havenwood> rafeed1: Ahh. So you are returning `nil` and then trying to do: nil[something]
<apeiros> the only place where you call the [] method there is `photo["image_url"]`
<apeiros> so this error tells you that you call [] on nil, hence you can infer that photo is nil
<apeiros> all you have to do is check whether photo is nil or not
<apeiros> also, clean up your code and indent properly :-p
<rafeed1> ahhh yeah, there's no url if it 404's out
<rafeed1> hahaha yeah sublime takes care of that ;)
<apeiros> doesn't seem like
<apeiros> your pasted code is wrongly indented
<rafeed1> haha
<rafeed1> so basically all i have to do is check if imurl returns nil and then continue in the loop?
workmad3 has joined #ruby-lang
<apeiros> that's too late
<apeiros> as I said, *photo* is nil
<apeiros> so photo["image_url"] fails
<rafeed1> ah right
LinkedoT has quit [Ping timeout: 240 seconds]
<rafeed1> is there a simple line that would fix that? i.e. like if photo?nil then do.something
kgrz has joined #ruby-lang
LinkedoT has joined #ruby-lang
fedesilva_zzzzZZ has joined #ruby-lang
teleological has quit [Remote host closed the connection]
lsegal has joined #ruby-lang
fedesilv_ has quit [Ping timeout: 246 seconds]
<havenwood> rafeed1: unless photo.nil?; photo[]; end
<havenwood> rafeed1: But you can just: if photo; photo[]; end
kgrz has quit [Ping timeout: 245 seconds]
<rafeed1> havenwood: thanks, I'll try that
<rafeed1> apeiros: thanks as well
mistym has quit [Remote host closed the connection]
fedesilva_zzzzZZ is now known as fedesilva
<apeiros> yeah, just `if photo then … end`
<apeiros> rafeed1: `open(imurl).read` is bad style. sadly it's shown in multiple places like that. if you want a similarly terse but better form, use `open(imurl, &:read)
<apeiros> `
<rafeed1> apeiros: yeah definitely. I did find it in a lot of places. Thanks for the suggestion. On that note, is there a way to change those last lines to write out the image name as the photo id instead of just 5.jpg?
elia has joined #ruby-lang
maxmanders has joined #ruby-lang
<apeiros> if you have the image name somewhere, sure
teleological has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
<yorickpeterse> whitequark: y u break parser
<yorickpeterse> beta1 gives me this shit:
<yorickpeterse> http://pastie.org/7963603 this is with a custom AST builder though, that might be the culprit
vlad_sta_ has joined #ruby-lang
mbj has quit [Ping timeout: 246 seconds]
<whitequark> show me your builder
mbj has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 256 seconds]
judofyr has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
arooni-mobile has joined #ruby-lang
norplr has joined #ruby-lang
UziMonkey__ has joined #ruby-lang
Spaceghost|cloud has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
<rafeed1> apeiros and havenwood: the if photo line works perfectly
<rafeed1> thanks for both your help!
<rafeed1> and I figured out how to write it out into their photo id for the name of the files
havenwood has quit [Read error: Connection reset by peer]
havenwood has joined #ruby-lang
tylersmith has joined #ruby-lang
<whitequark> yorickpeterse: ahhh
<whitequark> I indeed broke that
<yorickpeterse> heh
<yorickpeterse> I have no idea what's causing it though
<whitequark> s,source_map,location,
<yorickpeterse> when I run parser standalone (e.g. in Pry) it works just fine
<yorickpeterse> so it seems to happen when using a custom builder
judofyr_ has joined #ruby-lang
judofyr_ has left #ruby-lang [#ruby-lang]
<whitequark> yorickpeterse: just told ya
judofyr has quit [Ping timeout: 256 seconds]
<whitequark> replace source_map with location
<yorickpeterse> ah
marr has joined #ruby-lang
<whitequark> one of the (few) API changes in 2.0
saarinen has quit [Quit: saarinen]
<yorickpeterse> FUCKING CATS OUTSIDE
<whitequark> that's ambiguous
<yorickpeterse> if I knew where they were I'd throw my old pair of shoes at them
<yorickpeterse> either way, back to code
tylersmith has quit [Ping timeout: 252 seconds]
mucker has joined #ruby-lang
<workmad3> whitequark: if they're making a real racket, chances are both meanings are appropriate
mrfelix has joined #ruby-lang
maxmanders has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 252 seconds]
krohrbaugh has joined #ruby-lang
maxmanders has quit [Client Quit]
brianpWins has joined #ruby-lang
brianpWins has left #ruby-lang [#ruby-lang]
krohrbaugh has quit [Ping timeout: 246 seconds]
tomzx_mac has joined #ruby-lang
mrfelix has quit [Quit: Textual IRC Client: www.textualapp.com]
machuga is now known as machuga|away
apeiros_ has joined #ruby-lang
baba has joined #ruby-lang
djwonk has joined #ruby-lang
apeiros has quit [Ping timeout: 264 seconds]
TheNotary has quit [Quit: Leaving]
arubin has joined #ruby-lang
workmad3 has quit [Ping timeout: 245 seconds]
wallerdev has joined #ruby-lang
symm- has joined #ruby-lang
poga has joined #ruby-lang
dingus_khan has joined #ruby-lang
atomrubyist has joined #ruby-lang
tdy has quit [Read error: Connection reset by peer]
Cakey has quit [Ping timeout: 264 seconds]
arooni-mobile has joined #ruby-lang
atomrubyist has quit [Quit: atomrubyist]
saarinen has joined #ruby-lang
atomrubyist has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
stfn_ has joined #ruby-lang
glebm has quit [Quit: Textual IRC Client: www.textualapp.com]
atomrubyist has quit [Client Quit]
glebm has joined #ruby-lang
pskosinski has quit [Remote host closed the connection]
sush24 has joined #ruby-lang
djwonk has quit [Quit: djwonk]
teleological has quit [Remote host closed the connection]
djwonk has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 240 seconds]
atomrubyist has joined #ruby-lang
_baba_ has joined #ruby-lang
baba has quit [Ping timeout: 256 seconds]
floyd2 has quit [Read error: Operation timed out]
poga has quit [Remote host closed the connection]
brianpWins has joined #ruby-lang
floyd2 has joined #ruby-lang
jonahR has joined #ruby-lang
jonahR has quit [Client Quit]
jonahR has joined #ruby-lang
ikrima has joined #ruby-lang
stfn_ has quit [Quit: Textual IRC Client: www.textualapp.com]
dingus_khan has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
KillerFox has joined #ruby-lang
copycatzen has joined #ruby-lang
_baba_ has quit [Quit: WeeChat 0.4.0]
baba has joined #ruby-lang
copycatzen has quit [Read error: Connection reset by peer]
jacktrick has joined #ruby-lang
jbsan has quit [Quit: jbsan]
jbsan has joined #ruby-lang
benanne has quit [Quit: kbai]
dingus_khan has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
workmad3 has joined #ruby-lang
atomrubyist has left #ruby-lang [#ruby-lang]
tylersmith has joined #ruby-lang
yxhuvud has quit [Quit: Nettalk6 - www.ntalk.de]
yxhuvud has joined #ruby-lang
nirix has quit [Ping timeout: 252 seconds]
tylersmith has quit [Ping timeout: 276 seconds]
nirix has joined #ruby-lang
bashdy has joined #ruby-lang
saarinen has quit [Quit: saarinen]
bashdy has quit [Client Quit]
vlad_sta_ has quit [Read error: Connection reset by peer]
teleological has joined #ruby-lang
pskosinski has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
teleological has quit [Remote host closed the connection]
workmad3 has quit [Read error: Operation timed out]
sush24 has quit [Quit: This computer has gone to sleep]
JoelMcCracken has joined #ruby-lang
gjackson has joined #ruby-lang
nirix has quit [Ping timeout: 252 seconds]
<JoelMcCracken> is there a good way to check on the status of a drb server? I just want to see if a drb server is running, and if so, to use it; otherwise do nothing
workmad3 has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
nirix has joined #ruby-lang
<JoelMcCracken> ok, going the exception-catching route
brianpWins has joined #ruby-lang
tdy has joined #ruby-lang
benanne has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
lianj_ is now known as lianj
machuga|away is now known as machuga
dingus_khan has joined #ruby-lang
tylersmith has joined #ruby-lang
<MouseTheLuckyDog> Foes strip remove newlines too?
<apeiros_> >> "foo\n".strip
<eval-in> apeiros_ => "foo" (http://eval.in/31553)
<apeiros_> irb can help you with "does X do Y" questions
tylersmith has quit [Ping timeout: 240 seconds]
gjackson has left #ruby-lang [#ruby-lang]
dingus_khan has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
krohrbaugh has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 264 seconds]
apeiros_ has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
mbj has quit [Read error: Operation timed out]
Sm3lly has quit [Read error: Connection reset by peer]
jsullivandigs has quit [Read error: Connection reset by peer]
jsullivandigs has joined #ruby-lang
mbj has joined #ruby-lang
solars has quit [Ping timeout: 248 seconds]
Sm3lly has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
brianpWins has quit [Ping timeout: 276 seconds]
JoelMcCracken has quit [Ping timeout: 256 seconds]
ikrima has quit [Ping timeout: 256 seconds]
sandbags has quit [Remote host closed the connection]
ikrima has joined #ruby-lang
nirix has quit [Ping timeout: 252 seconds]
nirix has joined #ruby-lang
tdy has quit [Read error: Connection reset by peer]
tdy has joined #ruby-lang
tylersmith has joined #ruby-lang
s0ber has quit [Read error: Connection reset by peer]
s0ber has joined #ruby-lang
tylersmith has quit [Ping timeout: 256 seconds]
stfn_ has joined #ruby-lang
stonerfish has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
krohrbaugh has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
krohrbaugh has quit [Ping timeout: 264 seconds]
LinkedoT has quit [Ping timeout: 252 seconds]
stonerfish has quit [Quit: Leaving.]
LinkedoT has joined #ruby-lang
ruurd has joined #ruby-lang
Sm3lly has quit [Ping timeout: 240 seconds]
Wardrop has joined #ruby-lang
workmad3 has quit [Read error: Operation timed out]
ikrima has quit [Quit: Computer has gone to sleep.]
jacktrick has quit [Quit: Leaving]
rafeed1 has quit [Quit: Leaving.]
Johz has quit [Quit: AH HELP ITS ALL CRASHING AT ONCE I CANT STOP IT HELP HELP HELP <transmission ends>]
Averna has joined #ruby-lang
havenwood has joined #ruby-lang
justinmb_ has joined #ruby-lang
stfn_ has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
fosky has joined #ruby-lang
dingus_khan has joined #ruby-lang
tylersmith has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
Gaelan has joined #ruby-lang
tylersmith has quit [Ping timeout: 246 seconds]
ikrima has joined #ruby-lang
lcdhoffman has joined #ruby-lang
blaix has joined #ruby-lang
krohrbaugh has joined #ruby-lang
workmad3 has joined #ruby-lang
krombr has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 264 seconds]
benanne has quit [Quit: kbai]
blaix has quit [Quit: Leaving.]
ruurd has quit [Quit: Linkinus - http://linkinus.com]
elia has quit [Quit: Computer has gone to sleep.]
mdedetrich has joined #ruby-lang
woollyams has joined #ruby-lang
jonahR has quit [Quit: jonahR]
ryez has joined #ruby-lang
justinmb_ has quit [Remote host closed the connection]
ia___ has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 256 seconds]
ryez has quit [Quit: Page closed]
postmodern has joined #ruby-lang
tylersmith has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
tylersmith has quit [Ping timeout: 256 seconds]