apeiros_ changed the topic of #ruby-lang to: Ruby 1.9.3-p327: http://ruby-lang.org (ruby-2.0.0-preview2) || Paste >3 lines of text on http://gist.github.com
mrsolo has quit [Quit: Leaving]
bluepojo has quit [Quit: Leaving.]
bluepojo has joined #ruby-lang
briantrust has joined #ruby-lang
heftig has quit [Read error: Connection reset by peer]
heftig has joined #ruby-lang
Nisstyre has quit [Ping timeout: 244 seconds]
coliflor has quit [Ping timeout: 245 seconds]
zhul_mechanos has quit [Quit: zhul_mechanos]
Nisstyre has joined #ruby-lang
leopard_me has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby-lang
<banisterfiend> charliesome: sup
krohrbaugh has quit [Quit: Leaving.]
harmon has quit [Quit: Page closed]
<ryanf> banisterfiend: sup
<banisterfiend> ryanf: getting drunk at a restaurant
<banisterfiend> do you think restaurants get pissy when you treat them as a bar
<drbrain> banisterfiend: no, the margin on alcohol is likely higher
<banisterfiend> drbrain: kinda lol when you're getting drunk at a table by yourself surrounded by respectable diners
<seanstickle> On a related note, I just read that most movie theatre chains lose money on the films.
<seanstickle> And only make money on their concessions.
<seanstickle> They are basically concession-selling companies with films to lure people in.
<chris2> how much is a film at yours?
srbaker has quit [Quit: Computer has gone to sleep.]
<seanstickle> $12 or something like that.
<drbrain> chris2: in Seattle, $10-11, outside Seattle, $7-8
<chris2> wow
<chris2> like $16 here
<drbrain> prices ramp up quickly as population density does
<chris2> thus i cannot believe that
<drbrain> there are some small $4 and $5 theaters in Seattle, they generally don't show first-runs though
<chris2> for current blockbusters
<seanstickle> chris2: over half of that gets turned over to distrutors
<chris2> we have some indie stuff for $5 too
srbaker has joined #ruby-lang
<banisterfiend> drbrain: tell me if this excites you http://showterm.io/dd5e990a1a4b7b63ff74a#fast
<drbrain> drbrain :D
<drbrain> oops, "drbain"
wyhaines has quit [Remote host closed the connection]
<drbrain> that's pretty sweet
<drbrain> it's like smalltalk
<ryanf> banisterfiend: you always have such good example data :)
<ryanf> banisterfiend: you forgot to use edit-method -p though
yfeldblum has quit [Ping timeout: 248 seconds]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
nXqd has quit [Ping timeout: 246 seconds]
<banisterfiend> drbrain: the great thing about living in europe is you occasionally get beautiful french girls as your waitresses
davidbalbert is now known as davidbalber|away
<banisterfiend> drbrain: we can continue pure ruby excepptions (those using 'raise') using judofyr's fancy trick http://oldblog.judofyr.net/posts/never-gonna-let-you-go.html
MarcOnline has joined #ruby-lang
<drbrain> heh
MarcOnline has quit [Client Quit]
<banisterfiend> drbrain: it would be awesome (and insane) to be able to set continuations on parent stack frames
febuiles has quit [Quit: febuiles]
<drbrain> insane is a good word
<banisterfiend> ruby core ruined the fun with their hysterical symbol invisibility mission on 1.9.3
madish has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.1/20121026125834]]
Banistergalaxy has quit [Ping timeout: 245 seconds]
AlHafoudh has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
achiu has quit [Ping timeout: 264 seconds]
Banistergalaxy has joined #ruby-lang
jackhammer2022 has joined #ruby-lang
postmodern has joined #ruby-lang
enebo has quit [Quit: enebo]
Ziioynx has joined #ruby-lang
ddd has quit [Quit: Leaving.]
banisterfiend has quit [Ping timeout: 256 seconds]
bluepojo has quit [Ping timeout: 248 seconds]
krohrbaugh has joined #ruby-lang
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
sent-hil has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
achiu has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
havenn has quit [Ping timeout: 252 seconds]
meatballhat has joined #ruby-lang
meatballhat has quit [Changing host]
meatballhat has joined #ruby-lang
Dan_ has joined #ruby-lang
banisterfiend has joined #ruby-lang
yfeldblum has joined #ruby-lang
Dan_ has quit [Client Quit]
jtoy has joined #ruby-lang
dankest has quit [Ping timeout: 245 seconds]
burgestrand has joined #ruby-lang
reppard has quit [Ping timeout: 256 seconds]
sn0wb1rd has quit [Quit: sn0wb1rd]
efrainolivares__ has quit [Quit: efrainolivares__]
efrainolivares has joined #ruby-lang
efrainolivares has left #ruby-lang [#ruby-lang]
kurko_ has quit [Ping timeout: 265 seconds]
kurko_ has joined #ruby-lang
havenn has joined #ruby-lang
robotmay has quit [Remote host closed the connection]
KA_ has quit [Quit: KA_]
srbaker has quit [Quit: Computer has gone to sleep.]
KA_ has joined #ruby-lang
sn0wb1rd has joined #ruby-lang
klebervi_ has quit [Ping timeout: 244 seconds]
joevandyk has quit [*.net *.split]
znouza_ has quit [*.net *.split]
yibe_ has quit [*.net *.split]
pcboy__ has quit [*.net *.split]
ryanf has quit [*.net *.split]
dreamfactory has quit [*.net *.split]
musl has quit [*.net *.split]
TTilus has quit [*.net *.split]
s4muel_ has quit [*.net *.split]
wycats has quit [*.net *.split]
Guedes has quit [*.net *.split]
linc01n has quit [*.net *.split]
amdprophet has quit [*.net *.split]
jsilver has quit [*.net *.split]
kirin` has quit [*.net *.split]
havenn has quit [*.net *.split]
firefux has quit [*.net *.split]
achiu has quit [*.net *.split]
faustman has quit [*.net *.split]
steez has quit [*.net *.split]
Croms_ has quit [*.net *.split]
listrophy has quit [*.net *.split]
flori has quit [*.net *.split]
vmoravec has quit [*.net *.split]
DEac- has quit [*.net *.split]
benteaa has quit [*.net *.split]
benwoody has quit [*.net *.split]
aef has quit [*.net *.split]
weeb1e has quit [*.net *.split]
dvorak has quit [*.net *.split]
shachaf has quit [*.net *.split]
kuja has quit [*.net *.split]
sn0wb1rd has quit [*.net *.split]
joast has quit [*.net *.split]
pabs has quit [*.net *.split]
robbyoconnor has quit [*.net *.split]
jnoon has quit [*.net *.split]
wang has quit [*.net *.split]
jds__ has quit [*.net *.split]
snk has quit [*.net *.split]
faces has quit [*.net *.split]
jds_ has quit [*.net *.split]
randym has quit [*.net *.split]
eban has quit [*.net *.split]
freedrull has quit [*.net *.split]
ged has quit [*.net *.split]
bedouin has quit [*.net *.split]
Kuukunen has quit [*.net *.split]
esad has quit [*.net *.split]
briantrust has quit [*.net *.split]
mahlon has quit [*.net *.split]
kurko_ has quit [*.net *.split]
drbrain has quit [*.net *.split]
Xzyx987X has quit [*.net *.split]
wallerdev has quit [*.net *.split]
Mch1 has quit [*.net *.split]
wmoxam has quit [*.net *.split]
babinho_ has quit [*.net *.split]
db1382 has quit [*.net *.split]
Silex has quit [*.net *.split]
wnd has quit [*.net *.split]
hibariya_ has quit [*.net *.split]
bougyman has quit [*.net *.split]
jarib has quit [*.net *.split]
rking has quit [*.net *.split]
kalleth has quit [*.net *.split]
_br_ has quit [*.net *.split]
canton7 has quit [*.net *.split]
mephux has quit [*.net *.split]
bastl has quit [*.net *.split]
dedis has quit [*.net *.split]
io_syl has quit [*.net *.split]
nazty has quit [*.net *.split]
jayne has quit [*.net *.split]
FiXato has quit [*.net *.split]
jaimef has quit [*.net *.split]
ReinH has quit [*.net *.split]
hackeron_ has quit [*.net *.split]
matti has quit [*.net *.split]
yxhuvud has quit [*.net *.split]
kain has quit [*.net *.split]
zzak has quit [*.net *.split]
crankharder has quit [*.net *.split]
adgar has quit [*.net *.split]
hagabaka has quit [*.net *.split]
ironcamel has quit [*.net *.split]
schroedinbug1 has quit [*.net *.split]
lianj has quit [*.net *.split]
KA_ has quit [*.net *.split]
rtl has quit [*.net *.split]
yfeldblum has quit [*.net *.split]
Ziioynx has quit [*.net *.split]
jackhammer2022 has quit [*.net *.split]
Banistergalaxy has quit [*.net *.split]
imajes has quit [*.net *.split]
slyphon has quit [*.net *.split]
lcdhoffman has quit [*.net *.split]
dabradley has quit [*.net *.split]
brixen has quit [*.net *.split]
dbussink has quit [*.net *.split]
b3nt_pin has quit [*.net *.split]
grandy has quit [*.net *.split]
djinni` has quit [*.net *.split]
Cherrum has quit [*.net *.split]
Spaceghost|cloud has quit [*.net *.split]
spectra has quit [*.net *.split]
franckverrot has quit [*.net *.split]
akahn has quit [*.net *.split]
beawesomeinstead has quit [*.net *.split]
pkondzior_ has quit [*.net *.split]
terite has quit [*.net *.split]
mccraig has quit [*.net *.split]
Paradox has quit [*.net *.split]
Y_Ichiro has quit [*.net *.split]
zenspider has quit [*.net *.split]
fuzzy8balls has quit [*.net *.split]
no_i_wont has quit [*.net *.split]
tpope has quit [*.net *.split]
Smol has quit [*.net *.split]
jaska has quit [*.net *.split]
cyndis_ has quit [*.net *.split]
ahf has quit [*.net *.split]
Kero has quit [*.net *.split]
zarubin has quit [*.net *.split]
io_syl has joined #ruby-lang
KA_ has joined #ruby-lang
dbussink has joined #ruby-lang
djinni` has joined #ruby-lang
b3nt_pin has joined #ruby-lang
grandy has joined #ruby-lang
dabradley has joined #ruby-lang
slyphon has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
brixen has joined #ruby-lang
Ziioynx has joined #ruby-lang
imajes has joined #ruby-lang
jackhammer2022 has joined #ruby-lang
Cherrum has joined #ruby-lang
yfeldblum has joined #ruby-lang
lcdhoffman has joined #ruby-lang
io_syl has quit [Client Quit]
swav has quit [Remote host closed the connection]
robbyoconnor has joined #ruby-lang
WillMarshall has quit [Quit: Computer has gone to sleep.]
jsilver has joined #ruby-lang
headius has quit [Quit: headius]
banisterfiend has quit [Read error: Connection reset by peer]
postmodern has quit [Quit: Leaving]
io_syl has joined #ruby-lang
postmodern has joined #ruby-lang
io_syl has quit [Client Quit]
crazyhorse18 has joined #ruby-lang
kirin` has joined #ruby-lang
drbrain has joined #ruby-lang
briantrust has joined #ruby-lang
babinho_ has joined #ruby-lang
wallerdev has joined #ruby-lang
Xzyx987X has joined #ruby-lang
wmoxam has joined #ruby-lang
db1382 has joined #ruby-lang
esad has joined #ruby-lang
wnd has joined #ruby-lang
Silex has joined #ruby-lang
hibariya_ has joined #ruby-lang
Mch1 has joined #ruby-lang
bougyman has joined #ruby-lang
jarib has joined #ruby-lang
rking has joined #ruby-lang
kalleth has joined #ruby-lang
_br_ has joined #ruby-lang
canton7 has joined #ruby-lang
mephux has joined #ruby-lang
bastl has joined #ruby-lang
dedis has joined #ruby-lang
zarubin has joined #ruby-lang
kirin` has quit [Max SendQ exceeded]
dedis has quit [Max SendQ exceeded]
ryanf has joined #ruby-lang
s4muel_ has joined #ruby-lang
musl has joined #ruby-lang
TTilus has joined #ruby-lang
dreamfactory has joined #ruby-lang
kirin` has joined #ruby-lang
KA_ has quit [*.net *.split]
Ziioynx has quit [*.net *.split]
yfeldblum has quit [*.net *.split]
jackhammer2022 has quit [*.net *.split]
Banistergalaxy has quit [*.net *.split]
imajes has quit [*.net *.split]
slyphon has quit [*.net *.split]
lcdhoffman has quit [*.net *.split]
dabradley has quit [*.net *.split]
brixen has quit [*.net *.split]
dbussink has quit [*.net *.split]
b3nt_pin has quit [*.net *.split]
grandy has quit [*.net *.split]
Cherrum has quit [*.net *.split]
djinni` has quit [*.net *.split]
brixen_ has joined #ruby-lang
io_syl has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
djinni` has joined #ruby-lang
blazes816 has quit [Quit: blazes816]
charlie__some has joined #ruby-lang
sn0wb1rd has joined #ruby-lang
joast has joined #ruby-lang
jds__ has joined #ruby-lang
jnoon has joined #ruby-lang
pabs has joined #ruby-lang
randym has joined #ruby-lang
wang has joined #ruby-lang
freedrull has joined #ruby-lang
faces has joined #ruby-lang
eban has joined #ruby-lang
bedouin has joined #ruby-lang
jds_ has joined #ruby-lang
mahlon has joined #ruby-lang
Kuukunen has joined #ruby-lang
snk has joined #ruby-lang
ged has joined #ruby-lang
kirin` has quit [Changing host]
kirin` has joined #ruby-lang
charliesome has quit [Disconnected by services]
terite has joined #ruby-lang
franckverrot has joined #ruby-lang
akahn has joined #ruby-lang
Spaceghost|cloud has joined #ruby-lang
beawesomeinstead has joined #ruby-lang
Paradox has joined #ruby-lang
mccraig has joined #ruby-lang
pkondzior_ has joined #ruby-lang
Y_Ichiro has joined #ruby-lang
zenspider has joined #ruby-lang
tpope has joined #ruby-lang
spectra has joined #ruby-lang
no_i_wont has joined #ruby-lang
fuzzy8balls has joined #ruby-lang
jaska has joined #ruby-lang
Smol has joined #ruby-lang
cyndis_ has joined #ruby-lang
ahf has joined #ruby-lang
Kero has joined #ruby-lang
charlie__some is now known as charliesome
wycats has joined #ruby-lang
firefux has joined #ruby-lang
amdprophet has joined #ruby-lang
Guedes has joined #ruby-lang
linc01n has joined #ruby-lang
stonerfish has joined #ruby-lang
yxhuvud has joined #ruby-lang
jayne has joined #ruby-lang
zzak has joined #ruby-lang
matti has joined #ruby-lang
adgar has joined #ruby-lang
nazty has joined #ruby-lang
lianj has joined #ruby-lang
FiXato has joined #ruby-lang
kain has joined #ruby-lang
rtl has joined #ruby-lang
ironcamel has joined #ruby-lang
ReinH has joined #ruby-lang
crankharder has joined #ruby-lang
jaimef has joined #ruby-lang
schroedinbug1 has joined #ruby-lang
hagabaka has joined #ruby-lang
hackeron_ has joined #ruby-lang
drbrain has quit [Remote host closed the connection]
joevandyk has joined #ruby-lang
pcboy__ has joined #ruby-lang
znouza_ has joined #ruby-lang
yibe_ has joined #ruby-lang
meatballhat has quit [Ping timeout: 246 seconds]
ddd has joined #ruby-lang
Cherrum has joined #ruby-lang
lcdhoffman has joined #ruby-lang
jackhammer2022 has joined #ruby-lang
slyphon has joined #ruby-lang
b3nt_pin has joined #ruby-lang
KA_ has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
dabradley has joined #ruby-lang
dbussink has joined #ruby-lang
grandy has joined #ruby-lang
imajes has joined #ruby-lang
yfeldblum has joined #ruby-lang
havenn has joined #ruby-lang
steez has joined #ruby-lang
benwoody has joined #ruby-lang
listrophy has joined #ruby-lang
faustman has joined #ruby-lang
flori has joined #ruby-lang
Croms_ has joined #ruby-lang
achiu has joined #ruby-lang
shachaf has joined #ruby-lang
DEac- has joined #ruby-lang
benteaa has joined #ruby-lang
weeb1e has joined #ruby-lang
dvorak has joined #ruby-lang
kuja has joined #ruby-lang
vmoravec has joined #ruby-lang
faces has quit [Ping timeout: 260 seconds]
aef has joined #ruby-lang
crazyhorse18 has left #ruby-lang ["Leaving..."]
crazyhorse18 has joined #ruby-lang
seanstickle has quit [Quit: seanstickle]
seanstickle has joined #ruby-lang
<crazyhorse18> hey.. is there anything like heredoc but that doesn't parse for #{this}
<ryanf> you can do a heredoc with single-quoting rules
<ryanf> it's like <<-'EOS or <<-EOS' I think
<crazyhorse18> ahhh yes!
<crazyhorse18> hmm couldn't get either of those to work
<badeball> crazyhorse18: <<'EOS' \n bla bla \nEOS
srbaker has joined #ruby-lang
poga has joined #ruby-lang
poga has quit [Remote host closed the connection]
poga has joined #ruby-lang
<crazyhorse18> haha excellent thankyou
<crazyhorse18> lol.. my IDE really doesn't like that
poga has quit [Remote host closed the connection]
<crazyhorse18> messed up all the colours
<badeball> crazyhorse18: which ide are you using?
<crazyhorse18> sublimetext
gsav has joined #ruby-lang
<crazyhorse18> it's my favorites!
joevandyk_ has joined #ruby-lang
<firefux> dumb horse
<crazyhorse18> not dumb!
<crazyhorse18> crazy
ryanlecompte has quit [Remote host closed the connection]
robbyoconnor has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby-lang
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
tjadc has joined #ruby-lang
joevandyk_ has quit [Quit: joevandyk_]
DEac- has quit [Read error: No route to host]
DEac-_ has joined #ruby-lang
kith has quit [Read error: Connection reset by peer]
kith has joined #ruby-lang
kurko_ has joined #ruby-lang
spuk has joined #ruby-lang
drbrain has joined #ruby-lang
stonerfish has quit [Ping timeout: 276 seconds]
drbrain has quit [Remote host closed the connection]
drbrain has joined #ruby-lang
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
gregmoreno has joined #ruby-lang
havenn has quit [Ping timeout: 264 seconds]
headius has joined #ruby-lang
alvaro_o has quit [Quit: Ex-Chat]
KA_ has quit [Quit: KA_]
wyhaines has joined #ruby-lang
KA_ has joined #ruby-lang
KA_ has quit [Client Quit]
meatballhat has joined #ruby-lang
briantrust has quit [Remote host closed the connection]
banister_ has joined #ruby-lang
jtoy has quit [Quit: jtoy]
drbrain has quit [Remote host closed the connection]
drbrain has joined #ruby-lang
setmeaway2 has quit [Ping timeout: 256 seconds]
drbrain has quit [Read error: Connection reset by peer]
drbrain has joined #ruby-lang
drbrain has quit [Ping timeout: 255 seconds]
stonerfish has joined #ruby-lang
<Technodrome> question, class methods ….do you need to create an instance of a class to call that method or can you call it directly?
<cirwin> you can just call it
<cirwin> FooClass.classy_methody
stardiviner has joined #ruby-lang
<Technodrome> just asking, i don't make to many class methods just wondering cirwin
<Technodrome> i know, i could have made a quick test but you know
<cirwin> Technodrome: I didn't mind answering until you admitted to being lazy :p
<stardiviner> I have a string variable: format_string = "%m/%d/%Y [%a] %I:%M:%S %p" , how to check this string variable contains characters "%S" ?
<Technodrome> cirwin: aren't we all lazy, just varying levels? :)
<cirwin> of course
<cirwin> it's not something to boast about though
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
ryanf has quit [Ping timeout: 255 seconds]
imajes has quit [Excess Flood]
<Technodrome> cirwin: yeah, just kidding
<Technodrome> been a long week
imajes has joined #ruby-lang
banister_ has quit [Ping timeout: 264 seconds]
lcdhoffman has quit [Quit: lcdhoffman]
faces has joined #ruby-lang
kurko_ has quit [Ping timeout: 264 seconds]
tdy has quit [Ping timeout: 264 seconds]
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
stardiviner has joined #ruby-lang
tdy has joined #ruby-lang
socialcoder has joined #ruby-lang
<socialcoder> hey all
jsilver has quit [Ping timeout: 252 seconds]
olds22 has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
sush24 has joined #ruby-lang
lcdhoffman has joined #ruby-lang
tdy has quit [Ping timeout: 245 seconds]
tdy has joined #ruby-lang
headius has quit [Quit: headius]
setmeaway has joined #ruby-lang
seanstickle has quit [Quit: seanstickle]
poga has joined #ruby-lang
drbrain has joined #ruby-lang
mercwithamouth has joined #ruby-lang
ryanf has joined #ruby-lang
Pyro111 has joined #ruby-lang
sent-hil has joined #ruby-lang
Pyro111 has left #ruby-lang [#ruby-lang]
imajes has quit [Excess Flood]
Technodrome has quit [Quit: Leaving.]
imajes has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
socialcoder has quit []
Z_Mass has joined #ruby-lang
meatballhat has quit [Ping timeout: 260 seconds]
ryanf_ has joined #ruby-lang
guns has joined #ruby-lang
wyhaines has quit [Ping timeout: 256 seconds]
ryanf has quit [Ping timeout: 245 seconds]
havenn has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
wyhaines has joined #ruby-lang
poga has quit [Remote host closed the connection]
ryanf_ has quit [Quit: broken pipes |||]
havenn has quit [Remote host closed the connection]
sush24 has quit [Quit: This computer has gone to sleep]
havenn has joined #ruby-lang
ryanf has joined #ruby-lang
havenn has quit [Ping timeout: 256 seconds]
jobicoppola has joined #ruby-lang
esad has quit [Quit: Computer has gone to sleep.]
crazyhorse18 has left #ruby-lang ["Leaving..."]
cirwin has quit [Ping timeout: 265 seconds]
ryanf has quit [Quit: broken pipes |||]
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
ryanf has joined #ruby-lang
brianpWins has joined #ruby-lang
meatballhat has joined #ruby-lang
meatballhat has quit [Changing host]
meatballhat has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
<charliesome> TIL ruby 1.9 regexps are context free grammars: http://eval.in/4659
gregmore_ has joined #ruby-lang
esad has joined #ruby-lang
imajes has quit [Excess Flood]
gregmoreno has quit [Ping timeout: 256 seconds]
imajes has joined #ruby-lang
<zzak> e2mm is magical
<charliesome> zzak: e2mm?
<charliesome> oh it's one of those obscure stdlib libraries
sent-hil has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
drbrain has quit [Remote host closed the connection]
methods has joined #ruby-lang
<zzak> irb uses it to define some custom exceptions, such as FrameOverflow
<zzak> but since its magic, rdoc doesn't know about them
<charliesome> you can tell a stdlib library is old by the presence of capital letters in method names
<ryanf> whoa, wtf
<ryanf> re: e2mm
<ryanf> I like how the documentation and examples give no indication of what it actually does
methods has left #ruby-lang [#ruby-lang]
cirwin has joined #ruby-lang
headius has joined #ruby-lang
<ryanf> that inspired me to go looking for stdlibs I'd never heard of: http://ruby-doc.org/stdlib-1.9.2/libdoc/tsort/rdoc/TSort.html
<zzak> charliesome: haha
<zzak> tsort is neat
gregmore_ has quit [Remote host closed the connection]
<zzak> i love the stdlib, it smells of rich mahogany and leather bound books
<ryanf> haha
<ryanf> zzak: are you going to document e2mm?
<zzak> i hope to
<zzak> and tsort / tsort::cyclic too
<zzak> im still working on irb
<zzak> slow but steady, irb is almost 50%
<ryanf> cool
<zzak> when i started it was 8%
<cirwin> wow, I have no idea what E2MM even does...
<ryanf> cirwin: same
<ryanf> zzak: I'll be very interested to read it actually
<zzak> check IRB::Frame
<ryanf> I have a vague idea of the things it can do, but I'm sure there's stuff I don't know about
<zzak> makes a bit more sense
<zzak> def_exception is e2mm
sush24 has joined #ruby-lang
<cirwin> I think I see
<zzak> and Fail is alias for Raise
gregmoreno has joined #ruby-lang
<cirwin> def_exception just gives you an exception class with a default error
<zzak> i still havent figured out where Raise comes from
<ryanf> why does e2mm need a special fail method for the classes it produces
<ryanf> couldn't the class just define #message to have a default
<cirwin> dunno
<cirwin> maybe it's not implemented like that :p
<ryanf> :)
<cirwin> def Raise(err = nil, *rest)
<cirwin> Exception2MessageMapper.Raise(self.class, err, *rest)
<cirwin> end
<ryanf> oh well in that csae
<ryanf> *case
<cirwin> hah, it aliases "fail" to Raise as well
<cirwin> but leaves "raise" alone :)
<zzak> oh
<zzak> Raise is also in e2mm
<cirwin> yeah
gregmoreno has quit [Remote host closed the connection]
<zzak> def Raise(err = nil, *rest)
<zzak> haha
<ryanf> it's funny how different in character irb's source is from pry's
<cirwin> yeah
<ryanf> I guess it solves some different problems
<cirwin> it's an internationalization moduule
<cirwin> says so at the top :p
<cirwin> wow, each_sublocale is terrifying
<zzak> it hasnt changed much since matz original implementation: https://github.com/ruby/ruby/blob/3db12e8b236ac8f88db8eb4690d10e4a3b8dbcd4/lib/e2mmap.rb
<cirwin> oh interesting
<zzak> 12 years ago
<zzak> haha
<cirwin> localization frameworks + e2mm
<cirwin> it all makes sense now
<zzak> yeah :)
<zzak> its funny they didnt add the other exceptions tho
<zzak> like FrameUnderflow/FrameOverflow
<zzak> probably a patch waiting to happen
<cirwin> they probably moved on to more exciting things before then :)
<zzak> 12 years in the making
jobicoppola has quit [Quit: Computer has gone to sleep.]
<cirwin> heh
<zzak> that is all part of it
<cirwin> interesting
<cirwin> pry has a similar thing where inputs can eof and it's all ok
<cirwin> but I can't see the similarity beyond that
<zzak> irb lets you provide a separate context for each io
<zzak> it could be anything that responds to inspect, i think
<cirwin> that's nice and generic :)
<zzak> but i think it prefers Stdio, File or Readline
Taranis has quit [Remote host closed the connection]
<zzak> i am not sure on it tho, parts of irb are confusing, like input, workspaces, inspector, frame, and extend-command
<zzak> basically the whole thing then :D
<cirwin> yeah
<cirwin> I've browsed it a bit
<cirwin> but never tried to comprehend more than small chunks
<zzak> i always welcome another set of eyes
<zzak> im working another another ~1k diff
<zzak> so things are still changing
<cirwin> are you working on the code or docs?
<zzak> its very much a WIP
lcdhoffman has quit [Quit: lcdhoffman]
<zzak> docs, but i am collecting ideas for other patches, like that input method name mispelling and exception locale
<cirwin> cool
<zzak> i dont think anyone would object
<zzak> i just commit at will, no bug report or feature request :D
<zzak> if maintainer has problem, i kill them
<zzak> ill take over ruby! :D
<cirwin> I like your style
Z_Mass has quit [Quit: WeeChat 0.3.9.2]
<charliesome> introducing tinyparse: https://gist.github.com/4291702
<charliesome> check it out
<ryanf> haha @ readable_atfer_eof
<ryanf> that's great
<ryanf> I like that it's defined three times in that file
<zzak> charliesome: needs docs/tests before i can commit it, but ok
<charliesome> haha
<zzak> ryanf: yeha! haha
<ryanf> charliesome: nice
<charliesome> if only oniguruma/onigmo allowed you to run code when a subexp gets matched
<cirwin> heh, that's clever :)
<zzak> ryanf: encoding, eof?, gets, line, all duplcate
crazyhorse18 has joined #ruby-lang
<zzak> charliesome++ for being clevar
rue has quit [Remote host closed the connection]
<crazyhorse18> !(Hash === whatever) should be what? Hash !== whatever doesn't seem to work
<cirwin> crazyhorse18: !whatever.is_a?(Hash) is more usual
<crazyhorse18> ah yeah
<zzak> you managed to use tap and map in the same class
rue has joined #ruby-lang
<crazyhorse18> that is nicer and less magic
<crazyhorse18> cirwin: i'll use that instead
<cirwin> crazyhorse18: coolio
<charliesome> this means you CAN parse html with ruby regexps
<cirwin> hehe
crazyhorse18 has left #ruby-lang ["Leaving..."]
<cirwin> charliesome: I guess the only hard bit is extracting the nested matches?
<ryanf> yeah, I think that blog post said that's impossible, actually :)
<ryanf> but you can at least validate html !
<cirwin> heh
<ryanf> for a loose definition of "validate"
<charliesome> cirwin: yeah not even going to try that
<cirwin> I started reading the HTML 5 parser spec
<cirwin> it's really nicely written
<ryanf> cool
<ryanf> I always wondered about that actually
<charliesome> cirwin: can html5 be parsed with a cfg?
<ryanf> it must have lots of hairy special cases baked into it, right?
<cirwin> charliesome: not at all
<charliesome> fuck
<cirwin> it's full of exceptions and rules
<charliesome> xml can be though
<cirwin> hmm
<ryanf> yeah, this is xhtml vs html5 all over again:)
<cirwin> actually it probably can be
<cirwin> if you treat some tag-names as terminals
<cirwin> but it'd be messy
<charliesome> but theoretically, you could parse it with a ruby regexp
<cirwin> i guess so
<cirwin> though the parser spec actually also covers document.write() inside <script> tags
<cirwin> so you might need a js runtime to implement it fully
<charliesome> cirwin: haha seriously?
<cirwin> yeah :/
<charliesome> the web is fucked beyond belief
<cirwin> I have a great appreciation for things like the web
<cirwin> they work
<cirwin> and no one knows why
<cirwin> or how
<cirwin> or who was responsible
anannie has quit [Ping timeout: 250 seconds]
<zzak> martin is a ruby committer also on w3c
<whitequark> ryanf: xhtml is basically dead atm
<ryanf> whitequark: I know
<zzak> is topmost a word?
<zzak> or is it top-most
<zzak> or just top most
<cirwin> topmost is fine
<zzak> what about non-native speakers?
<zzak> is there a better word
<cirwin> first?
<cirwin> highest?
<cirwin> what's the context
<zzak> first
<zzak> an array
<zzak> first probably applies somewhat
meatballhat has quit [Ping timeout: 248 seconds]
<zzak> +n+*
<cirwin> hmm, which way up is first and last?
<cirwin> I guess the method name tells you that :)
<zzak> Frame uses Kernel#set_trace_func
<zzak> when event happens, it #push'es to @frames
<zzak> so, maybe top is really #last
<zzak> what do you think?
<cirwin> my head hurts :p
sush24 has quit [Quit: This computer has gone to sleep]
<cirwin> ok
<zzak> have you used set_trace_func before?
<cirwin> so top is the frames closest to the current point
<cirwin> I think?
<zzak> frames is [TOPLEVEL_BINDING] * 3
sush24 has joined #ruby-lang
<zzak> so just Binding object
<ryanf> this is the problem pry-stack_explorer has, right?
<zzak> ryanf: i am not familiar
<ryanf> oh nvm, I get it
<zzak> irb frame explorer ;)
meatballhat has joined #ruby-lang
<zzak> i think just use Array#[] as reference
<zzak> -1 is from end, whole number is from 0 index
<zzak> that is enough
<charliesome> wrote a json parser with my thing… RegexpError: never ending recursion:
<charliesome> fark
imajes has quit [Excess Flood]
<zzak> haha
imajes has joined #ruby-lang
<zzak> charliesome: do you work with json a lot?
<charliesome> zzak: a bit
<charliesome> i am a web developer by day
srbaker has joined #ruby-lang
cirwin has quit [Ping timeout: 245 seconds]
<zzak> have you seen json gem from stdlib?
sush24 has quit [Quit: This computer has gone to sleep]
<charliesome> zzak: haven't looked at the source
gsav has joined #ruby-lang
<zzak> there was a release back in august, but nothing since then
<zzak> and still a few tickets open
<charliesome> oh is that the gem itself?
<charliesome> s/gem/library/
<zzak> its a stdlib gem, that gets imported every so often
<zzak> very few maintainers import stdlib gems
<zzak> drbrain handles rake, rubygems, rdoc, etc
<zzak> they have to be imported manually, i dont think theres a tool to help
<zzak> nurse usually does json, but he is part-time
<ryanf> oh, I always thought stdlib json was pure ruby
<zzak> there has been a java extension for some time
<zzak> i think stdlib gems get overlooked because they are on github but still active
<zzak> so, any help there is always appreciated
<zzak> i wish irb was gemified
<charliesome> pry :p
<zzak> i just mean, its easier to maintain that way
esad has quit [Quit: Computer has gone to sleep.]
<ryanf> haven't they been talking about stdlib gems basically forever
<zzak> but less attraction from ruby-core, since most committers dont monitor github
<ryanf> i.e., shipping them as gems and versioning them independently
<zzak> yeh, nahi has been working on this for some time
<zzak> drbrain has been doing a great job with rdoc
<zzak> but he is like the only person who commits anything for it
<zzak> i try to submit bugs, but that only goes so far
<zzak> i think stdlib gems get overlooked
<ryanf> minitest might be an exception
<zzak> yes, and rubygems
headius has quit [Quit: headius]
<zzak> gemify is a tricky subject, it helps some maintainers more comfortable with git, and welcomes new contributors
<zzak> other libs, like bigdecimal get a lot of traction in redmine
drbrain has joined #ruby-lang
<ryanf> it kind of sounds like dependency hell to me tbh
<ryanf> if all the components of stdlib that depend on each other are evolving at different rate
<ryanf> s
<zzak> exactly
<ryanf> I guess if it's just "leaf" libs that nothing depends on it's cool though
<zzak> seems wrong to break them up to me
<zzak> but it benefits other implementations
<zzak> like obviously jruby doesnt use redmine for bugs with json lib
<zzak> say someone wanted to write a plugin for pry
<zzak> but they wanted to write it in python
<ryanf> haha
<ryanf> they could use that one thing
<ryanf> rubypython
<zzak> that is exactly what happened
<zzak> you would have to move pry to bitbucket
<zzak> to get all those awesome python contributors
drbrain has quit [Ping timeout: 244 seconds]
rippa has joined #ruby-lang
<ryanf> I'm not sure I follow
joevandyk has quit [Read error: Connection reset by peer]
joevandyk has joined #ruby-lang
<zzak> well, pry is on github right now, since majority of github contributors use ruby
<zzak> and pry is ruby
srbaker has quit [Quit: Computer has gone to sleep.]
<zzak> but someone wrote a popular plugin for pry using pythong
cirwin has joined #ruby-lang
<zzak> what would that mean for pry?
<ryanf> no, I get that part :)
sush24 has joined #ruby-lang
<ryanf> I don't get the implications for what you're talking about with ruby, jruby, and json
<ryanf> you're saying it fragments development of stdlib stuff into more places than just redmine?
<ryanf> if so, fair enough but I don't really see what it has to do with jruby
<zzak> json was gemified and implemented in java specifically for jruby
<zzak> it's kind of a farfetched analogy because pry is a library, where mri is a language
methods has joined #ruby-lang
<zzak> and pry doesnt depend on its plugins, like in some cases mri does
methods has left #ruby-lang [#ruby-lang]
<zzak> charliesome: you should write a json inspector for irb
<charliesome> like a json pretty printer or something?
<charliesome> note that i have no idea about irb internals
<charliesome> all i've ever used irb for could be implemented as loop { puts eval gets }
<ryanf> does irb actually have a way to integrate something like that? or do you just mean "for use in irb"
<zzak> yeah
<zzak> totally
<zzak> one sec
havenn has joined #ruby-lang
<zzak> there is already pp, yaml, and marshal
<zzak> i think json would be an awesome example
<charliesome> how do you tell it to use an inspector?
<ryanf> INSPECTORS.def_inspector([:marshal, :Marshal, :MARSHAL, Marshal])
<ryanf> :3
<charliesome> marshal? marshal!
<ryanf> :mArSh4l
<zzak> i still need to figure that out
<ryanf> haha
<ryanf> for all you know, that's just decoy code
<zzak> sec
<zzak> you have to set inspect_mode
<ryanf> how do you do that?
andrewhl has joined #ruby-lang
<zzak> IRB.conf[:INSPECT_MODE]
<zzak> or
<zzak> IRB.CurrentContext.inspect_mode
<charliesome> are they supposed to be true?
<ryanf> zzak: then what
<ryanf> I was assuming that setting it to Marshal would mean it prints expression retvals as marshal dumps
pcboy_ has joined #ruby-lang
<ryanf> but that is not actually true
<charliesome> also this git svn fetch has been going for like 3 hours so far
znouza_ has quit [*.net *.split]
pcboy__ has quit [*.net *.split]
yibe_ has quit [*.net *.split]
<zzak> mode is a key to INSPECTORS
<ryanf> oh, just realized why you're using svn
<ryanf> you asked for it ;)
<ryanf> zzak: yeah, I get that, but
<ryanf> how do you actually make it do anything after setting that
<zzak> IRB.CurrentContext.inspect_mode = :yaml
<zzak> for instance
<charliesome> brb
<zzak> see what i mean?
<ryanf> haha that completely doesn't work for me
<ryanf> oh, I'm probably accidentally running 1.8.7
<ryanf> there we go!
<ryanf> that explains a lot.
<ryanf> that's pretty cool
<zzak> i created my own inspector!
<zzak> omg!
<zzak> it is fubar tho, haha
headius has joined #ruby-lang
<zzak> now write one in json >:}
havenn has quit [Remote host closed the connection]
<zzak> maybe we can merge it into irb before feature freeze
havenn has joined #ruby-lang
havenn has quit [Ping timeout: 246 seconds]
sush24_ has joined #ruby-lang
sush24 has quit [Ping timeout: 245 seconds]
stonerfish has quit [Ping timeout: 276 seconds]
<matti> zzak: ;]
znouza_ has joined #ruby-lang
yibe_ has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
sambae has joined #ruby-lang
faustman has quit [Ping timeout: 244 seconds]
nXqd has joined #ruby-lang
thufir_ has joined #ruby-lang
workmad3 has joined #ruby-lang
sambae has quit [Quit: Page closed]
meatballhat has quit [Ping timeout: 265 seconds]
faustman has joined #ruby-lang
<charliesome> zzak: hasn't feature freeze long passeD?
sush24_ has quit [Quit: This computer has gone to sleep]
<zzak> sorry, code freeze
<zzak> since its not really bug fix
blacktulip has joined #ruby-lang
<charliesome> i'd like to sneak Kernel#used_refinements in
<charliesome> but feature freeze :\
<zzak> well, i think feature in stdlib is ok
<zzak> it depends
drbrain has joined #ruby-lang
dzhulk has joined #ruby-lang
imajes has quit [Excess Flood]
wyhaines has quit [Remote host closed the connection]
guns has quit [Quit: guns]
imajes has joined #ruby-lang
nXqd has quit [Ping timeout: 255 seconds]
stonerfish has joined #ruby-lang
<ryanf> charliesome: uh, didn't feature freeze happen when the refinement spec was completely different from the way it is right now?
<charliesome> yes
<charliesome> but
<charliesome> since refinements were already accepted by the time feature freeze happened, i guess it was allowed to bend the rules a bit
<ryanf> yeah, I guess I'm saying that the rules already seem pre-bent in this exact area
<ryanf> I feel like used_refinements was one of the things headius found problematic though?
vlad_starkov has joined #ruby-lang
<ryanf> unless I'm misremembering what that means, it has to be special like Module.nesting, right?
havenn has joined #ruby-lang
<headius> used_refinements?
jsaak has joined #ruby-lang
<ryanf> I'm assuming that means "which refinements are active in this spot"
<ryanf> but that might not be a valid assumption
<headius> ok, figured
<headius> that's what I was assuming
<ryanf> ps hi headius, sorry to summon you gratuitously :)
<headius> that's not really a huge deal…the more context-sensitive methods we add, though, the more we pollute the namespace
<headius> more and more methods get tagged as "might need frame access"
Croms_ has quit [Quit: Croms_]
<ryanf> headius: check out this extremely valid use of binding_of_caller, btw https://gist.github.com/4292203
<zzak> headius: congrats on your commit bit, btw, welcome to the team :)
<headius> zzak: thanks!
<headius> one of these weeks I'll do something with it
<charliesome> ryanf: that's brilliant
<charliesome> headius: i figured that Kernel#used_refinements would be useful for debuggers
<headius> oh come on
<zzak> headius: should assign this to you? https://bugs.ruby-lang.org/issues/7400
<headius> ryanf: it's a very nice toy :)
<charliesome> similar to local_variables, it's a method that is useless in normal usage, but lets debuggers introspect more
havenn has quit [Ping timeout: 260 seconds]
<headius> that's the sort of thing that I'll just leave interpreted and say "you're on your own, bud
<headius> charliesome: I'd totally get on board an idea of specific, well-defined debug modes that needed to provide X
drbrain has quit [Remote host closed the connection]
drbrain has joined #ruby-lang
<headius> our interpreter could hande most of those cases, and expecting our optimized path to handle arbitrary debugging requests is unreasonable
<charliesome> headius: agreed
<headius> our interpreter is still like 1.8 speeds…plenty for debugging
jackhammer2022 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<charliesome> i wouldn't have any issue with jruby being slower in development
<charliesome> if it means all the funky introspective features are available
<headius> sure
<charliesome> i understand these features can ruin the potential for optimization
<ryanf> yeah, I don't think anyone would have a problem with b_o_c usage losing performance
<zzak> you want to see some code..
<headius> I have implemented it before just for kicks…it's not hard
<charliesome> b_o_c is great, but it's unstable-ish
<ryanf> like, even banisterfiend isn't crazy enough to think that apis should use it
<ryanf> in production
<headius> we could even do arbitrary-depth b_o_c in the interpreter
<ryanf> although that would be very funny
<charliesome> headius: b_o_c can do that too
<zzak> check out IRB::InputCompletor::CompletionProc
<headius> there ya go
<charliesome> i imagine if that sort of functionality were baked into implementations, it'd be more stable than b_o_c is currently
<headius> but I don't like adding a new flag or option for every one of these things
<headius> we should just define a debug profile and go with it
<zzak> headius: have you seen tracepoint?
<headius> yeah
<headius> it's not a whole lot different than how jruby implements trace funcs right now
andrewhl has quit [Remote host closed the connection]
<headius> a few additional trace points in execution, but they're not odd
<headius> we don't do full tracing unless you set --debug anyway
<zzak> headius: you are an MRI guy now ;)
<zzak> gotta update your avatar
<apeiros_> headius: sounds like a good idea to me
<apeiros_> stuff like ObjectSpace could go to debug mode only too IMO
<ryanf> headius: are you saying you're only interested in supporting b_o_c in a way that requires restarting the ruby process in a different mode?
<headius> I'll never work on JRuby again
<headius> ryanf: it's pretty hard to support the bigger optimizations without that guarantee
<ryanf> that's too bad, because it's really nice to be able to drop into debugging fluidly when you discover a problem
<charliesome> headius: is it possible to add a magic $DEBUG var that switches jruby into debug mode, or would it need to be started in debug mode?
<ryanf> it's too hard to just stop optimizing when you hit one of those constructs?
faces has quit [Ping timeout: 244 seconds]
<headius> charliesome: that sort of thing is just fine
<headius> jruby's --debug flag is different than debug more
mercwithamouth has quit [Ping timeout: 244 seconds]
<headius> turns on set_trace_func, etc
<headius> doesn't really slow things down much, but there's no reason to make the default the slow path
<ryanf> ah
<ryanf> maybe instead you should have --hyper mode ;)
<headius> we used to have --fast …I thought that was cute
<charliesome> is that like the turbo button?
<ryanf> yeah, takes you all the way from 8 KHz to 12 KHz
<headius> it just led to more bugs about "feature X" doesn't work with --fast"
<charliesome> LO to HI
<ryanf> oops I mean MHz
<headius> hah
<headius> yeah I was going to say
<workmad3> ryanf: 33MHz to 66MHz :D
<zzak> what
<headius> I don't think I ever programmed an 8khz processor
<ryanf> anyway if "debug mode" is actually fast enough to develop on, that seems pretty reasonable
<ryanf> when I hear "debug mode" I think more like "set_trace_func turned on" levels of performance
olds22 has quit [Quit: Leaving]
Croms has joined #ruby-lang
<headius> yeah, even the atari 400 was a 1-2MHz 6502
<headius> sinclair 1000 was 3.25MHz
<charliesome> i feel incredibly young
<headius> ryanf: well, things like set_trace_func have massive perf overhead on any imple
<headius> charliesome: 400 was probably my first real computer
<charliesome> my first computer had a p4 in it
<headius> I just found the sinclair 1000 at a yard sale
<headius> hah
<headius> that's pretty good :)
<headius> I remember when circuit board parts used to have these pointy doo-dads sticking out the bottom that went *in* to the circuit board
<headius> we had to solder uphill both ways
<thufir_> I'm trying to load a very simple yaml: https://gist.github.com/4292316 how do I assign the user ?symbol? from the script?
coliflor has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<headius> I have no idea :)
* apeiros_ 's first computer had, I believe 8MHz, 2.5MB Ram (which was *tons* back then) and a 5MB Hard drive
workmad3 has quit [Ping timeout: 248 seconds]
<headius> I can't say I have any idea of a parsed yaml file's structure
<ryanf> thufir_: try "puts yp.inspect"
<headius> which is funny, because I implemented the java version of psych
<apeiros_> thufir_: you probably want .load_file instead of .load_documents
<apeiros_> and then it's just data['user'] = value
<apeiros_> also :: for method calls looks so antiquated
<thufir_> I'll try that thanks. be back in a few :)
<headius> I advocated :: should change to give you what .method does
<headius> since nobody except thufir_ actually uses it for method calls
<thufir_> headius: hmm?
<apeiros_> headius: isn't that what it already does?
<ryanf> headius: that's a cool idea
<headius> I mean for it to return a method reference
<apeiros_> headius: ah
<apeiros_> yes
<apeiros_> that'd be nice
<headius> so you always get an object back from ::
<headius> not do a call
<headius> anyway, late…gotta bail
headius has quit [Quit: headius]
<thufir_> ok, makes more sense. I can inspect the .yml file correctly. how do I do something like "password = email.get_password" where "email" is the yaml file?
<thufir_> while I can output the whole yaml, I just want a particular ?value?, in this case the password stored in the yaml.
<apeiros_> thufir_: YAML.load_file gives you a normal ruby object back
<apeiros_> inspect it how you inspect all ruby objects
<apeiros_> and then use the docs of those objects to figure how to use them
stonerfish has quit [Quit: Leaving.]
<thufir_> inspect returns a map, I believe, in this case.
<apeiros_> you know how to use irb (or pry)?
<apeiros_> thufir_: no need to believe. you can ask the object. .class
<thufir_> I'm using rvm, and haven't installed irb as of yet.
<apeiros_> irb comes with ruby
<apeiros_> pry would be an additional install (and is IMO totally worth it)
<thufir_> in any event, it doesn't seem to be on the classpath (irb)
<apeiros_> classpath?
<apeiros_> irb is an app, an executable, like ruby itself.
<thufir_> perhaps it's there, but typing "irb" doesn't do anything. I haven't looked into it.
<apeiros_> and since you use rvm, you should run `rvm docs generate`, that allows you to use `ri` (another program, allows you access to rubys documentation)
<thufir_> pardon, it does now. don't know why I thought it didn't. irb works.
<thufir_> ok, it's a Hash. so, just treat it like a Hash and get the user, password that way?
<apeiros_> yes
<thufir_> thanks
<apeiros_> yw
adambeynon has joined #ruby-lang
<thufir_> ok. similar but different, coming from Java. got my output, though :)
imajes has quit [Excess Flood]
<thufir_> on line 14: https://gist.github.com/4292316 I want to use the user and password variables, but I'm inferring that I'm not using them correctly? if I just put in the raw strings it works fine, and the yaml seems to get loaded and parsed correctly.
imajes has joined #ruby-lang
<thufir_> ohhh, do I need to use @ or something to specify it's a variable?
<charliesome> thufir_: @foo is an instance variable
<charliesome> thufir_: @@foo is a class variable, like a static field in java
gjaldon has joined #ruby-lang
<charliesome> thufir_: if you just write 'foo' then it's either a local variable or a method call
zarubin has quit [Read error: No route to host]
<gjaldon> what's a testing framework that runs fast and has concise syntax?
<thufir_> PEBKAC. so sorry. I forgot that the I was using password "password" just here, so I just put my real password into the yaml and it works (using @password). LOL, pardon.
<ryanf> gjaldon: minitest
ebouchut has joined #ruby-lang
<gjaldon> ryanf: you prfer minitest to rspec 2 then?
<thufir_> In reading http://www.ruby-doc.org/stdlib-1.9.3/libdoc/net/imap/rdoc/Net/IMAP.html I want to grab the headers, which I expect to find in a Hash or similar but don't see that in the docs. Any guidance or suggestions?
<ryanf> gjaldon: I dunno. maybe? rspec is the slowest ruby test framework, though, so it's clearly not a valid answer to your question
<ryanf> I also don't know what "concise syntax" means in this context
<apeiros_> thufir_: use YAML.load_file instead of YAML::load_file, the latter looks like your code was written 1990 or so…
<thufir_> apeiros_: heh, ok. I'll update that link in a sec. thanks. ohhh, does no one use :: anymore?
<apeiros_> not for method calls
<thufir_> hmm, ok.
<ryanf> except eventmachine stuff for some reason
<thufir_> updated https://gist.github.com/4292316 and off to google :)
<thufir_> https://github.com/mikel/mail is a good ruby mail API? I can get an e-mail with the Net::IMAP and then parse the message with mikel mail?
<apeiros_> thufir_: yes
<apeiros_> Mail is the defacto standard for mails I'd say
<thufir_> apeiros_: the one I linked to, mikel/mail ?
<apeiros_> yes
<apeiros_> gem install mail
<apeiros_> gives you the one you linked
cirwin has quit [Quit: sleep...ping!]
<thufir_> apeiros_: thanks :)
headius has joined #ruby-lang
<thufir_> does it matter whether you install a gem directly, or put, I think: require: ruby-gems at the top of a script?
headius has quit [Client Quit]
thone_ has joined #ruby-lang
Croms has quit [Quit: Croms]
<matled> uh, the first file I look at of the mail gem (patches/sendmail.patch) reveals that it uses sh -c to call out to sendmail... why don't people use the proper form to use an array as arguments...
<apeiros_> hm, can't figure out how Haml::Engine#precompiled is supposed to be used
<apeiros_> matled: open an issue on github
<apeiros_> and yeah, totally agree
thone has quit [Ping timeout: 264 seconds]
<matled> it just feels like almost every gem I randomly looked at does this..
<ryanf> apeiros_: you mean what it's good for, or how to execute it?
<apeiros_> ryanf: I assumed I could use it to cache templates
<apeiros_> ryanf: but I don't know how I could render the precompiled eval string
<apeiros_> it seems deeply embedded in #render
<apeiros_> and I don't see a way to construct a Haml::Engine from a precompiled string
<ryanf> hmm, that's a good point
<ryanf> I can kind of see how you could make a fake compiler class and thread the string through it to the right place :)
<ryanf> it wouldn't be particularly nice though
<apeiros_> yeah, I don't like messing with internals for something like that
<apeiros_> either it's got an API or I consider it "not doable"
<ryanf> I've only used #precompiled for syntax verification
<ryanf> I think maybe it's just not meant to be public api
<apeiros_> yeah, I don't know why precompiled in the current state is public
ebouchut has quit [Quit: This computer has gone to sleep]
KA__ has joined #ruby-lang
kain has quit [Quit: exit]
<thufir_> msg = imap.fetch(id,'RFC822')[0].attr['RFC822'] #how do I "cast" (I know ruby doesn't need to cast objects) this into something the mail api can handle?
leopard_me has joined #ruby-lang
<rue> thufir_: Explain what your goal is
<rue> Assume I have no idea if you just made that above syntax up
<thufir_> in Java, you get an object of type ImapMail, let's say. you then need to cast it into MyMail for whatever reason.
<thufir_> so, the msg above is a bunch of text, so far as I can tell. I want use the mail API on it, and do things like msg.subject but how do I call mail.subject on msg?
<thufir_> pardon, msg.subject I mean.
<thufir_> I want to get the subject of msg using the mail API
toretore has joined #ruby-lang
leopard_me has quit [Quit: Computer has gone to sleep.]
crazyhorse18 has joined #ruby-lang
<crazyhorse18> hey .. how can i skip an interation inside map?
voker57 has quit [Read error: Connection reset by peer]
<crazyhorse18> next doesn't work
imajes has quit [Excess Flood]
<crazyhorse18> [1,nil,3].map {|a| next; 5 } basically, i want an empty array in this case
<crazyhorse18> [1, nil, 3].map {|a| if a.nil?; next; else; a end }
<apeiros_> you won't be able to do it that way
<apeiros_> map will always return an array of the same length
<apeiros_> (except if you use break or return, but that isn't what you want either as it'll abort .map completely)
ryanf has quit [Ping timeout: 244 seconds]
<crazyhorse18> ah right yep
<apeiros_> you want either .map { … }.compact or write your own .compact_map
<matled> a #map_compact would be nice (i.e. map and then ignore values that are nil)
<crazyhorse18> :( rails has ).each_with_object({}
<apeiros_> that's from ruby, not from rails
imajes has joined #ruby-lang
<thufir_> aha! something like: mail = TMail::Mail.parse(msg) from http://stackoverflow.com/questions/1101101/how-to-read-the-body-text-of-an-email-using-rubys-net-imap-library. should I use tmail or just regular mail gem?
<apeiros_> TMail is deprecated
<apeiros_> Mail is the successor
<thufir_> LOL, that's answered there.
<apeiros_> afaik you can just do Mail.new(msg)
<apeiros_> s/afaik/afair/
<apeiros_> crazyhorse18: don't use &blk if you use yield
<apeiros_> you force ruby to do needless work
<crazyhorse18> yep just removed that
<crazyhorse18> :)
<thufir_> apeiros_: ohhhh, ok. quite simple. what's the terminology for that?
<apeiros_> IMO that method is pointless. it does the same (but probably slower) as .map {}.compact
<apeiros_> thufir_: terminology for what?
<thufir_> what's the terminology for mail = Mail.new(msg) ?
<apeiros_> there's no special terminology for that.
<apeiros_> you create a new Mail instance
<crazyhorse18> apeiros_:nah
<crazyhorse18> aperios: contains nested hashes
<crazyhorse18> and arrays
<apeiros_> crazyhorse18: tab completion for nicks :-p
<apeiros_> makes you not typo them
<crazyhorse18> apeiros_: haha ok
<thufir_> ok, but you're passing another type of object, a string in this case I think, and getting back a Mail object. not a cast. factory? something like that?
<apeiros_> crazyhorse18: I don't see how nesting changes what I said…
<crazyhorse18> hmm
<crazyhorse18> apeiros_: let me go think about it
<apeiros_> thufir_: there's no type-casting in ruby
<crazyhorse18> if that just works.. i'll get rid of the two methods
<thufir_> apeiros_: right, but msg certainly isn't a Mail object. oh well.
<crazyhorse18> apeiros_: yep. ur right
<crazyhorse18> [1, nil, [nil], 2, nil, [nil, nil], {nil => nil}].compact
<apeiros_> thufir_: just read the readme from top to bottom. it covers the important parts.
faces has joined #ruby-lang
robotmay has joined #ruby-lang
faces has quit [Read error: Connection reset by peer]
sepp2k has joined #ruby-lang
faces has joined #ruby-lang
thufir_ has quit [Remote host closed the connection]
dzhulk has quit [Quit: Leaving.]
zmack has joined #ruby-lang
faces has quit [Ping timeout: 244 seconds]
KA__ has quit [Quit: KA__]
zmack has quit [Ping timeout: 248 seconds]
<crazyhorse18> hmm
<crazyhorse18> how do you test stuff that gets passed to blocks in recursive functions
<crazyhorse18> basically i need to test that a) the block got executed 3 times only b) that the params passed to those blocks were a, b,c or d,e,f or g,h,i
qwerxy_ has joined #ruby-lang
qwerxy_ has quit [Client Quit]
<manveru> ?
<crazyhorse18> so.. some_nesty_recursive_function {|param_1, param_2, param_3| do some shit }
<apeiros_> just record the yield
<apeiros_> got_yielded = []; foo { |*args| got_yielded << args }
<apeiros_> then test whether got_yielded contains what you expected
<crazyhorse18> ohhhhhh
<crazyhorse18> yeah
<crazyhorse18> clever!
<crazyhorse18> perfect thankyou :)
<manveru> p,q,r = [a,b,c], [d,e,f], [g,h,i]; n = 0; snrf{|*x| break if n+=1 >= 3; x == p || x == q || x == r }
<manveru> that's how i read it :P
dzhulk has joined #ruby-lang
<manveru> not making much sense at all...
<crazyhorse18> i'm confused
<manveru> ok = [[a,b,c],[d,e,f],[g,h,i]]; n = 0; snrf{|*x| break if n+=1 >= 3; ok.include?(x) }
<manveru> me too
sush24 has joined #ruby-lang
<crazyhorse18> my newest version of yaml
<crazyhorse18> has started putting *id001 *id002
<crazyhorse18> and &id001 references everyhwer
<crazyhorse18> and it's soooooooooo annoying
ebouchut has joined #ruby-lang
<manveru> what do you use it for?
<crazyhorse18> debugging
<crazyhorse18> i've got these big nested hashes i need to look through
<crazyhorse18> but when it replaces half of them with numbers, i have to look back up and find the original reference
<crazyhorse18> i've tried pp (pretty print) but that doesnt seem to layout anything nice
<manveru> there are prettier printers
<crazyhorse18> oh yes?
<crazyhorse18> got one with colours and everything?
<manveru> pry uses one like that
wallerdev has quit [Quit: wallerdev]
<manveru> there must be a couple in the ruby toolbox
<crazyhorse18> having a look
<manveru> for example
<manveru> hell, that can even output html
<Mon_Ouie> Pry uses pretty_print + CodeRay to colorize by default
io_syl has quit [Quit: Computer has gone to sleep.]
<manveru> coderay is still alive?
<Mon_Ouie> I don't know, but I do know Pry uses it. Is there something new people use instead?
<manveru> must be one of the oldest gems around nowadays...
<manveru> dunno, i usually use pygments
<manveru> or if possible, just google code prettifier
<crazyhorse18> awesome print is damn nice
<manveru> was a big ultraviolet fan, until 1.9 came along
<manveru> matz didn't like the patch i made for oniguruma to make UV work again
<manveru> so now it's in limbo...
<whitequark> manveru: huh? surely you could just fix UV
<manveru> i can't fix the regexps that UV has to process, they come from textmate syntax files
<manveru> and textmate uses the official ongiuruma, not the ruby fork
<manveru> and ruby has no way of setting the flag i need...
<whitequark> I see. Which flag, btw?
<manveru> rubinius has accepted my patch :)
<manveru> hm, one second
imajes has quit [Excess Flood]
io_syl has joined #ruby-lang
<crazyhorse18> pity awesome print doesn't have a depth option
imajes has joined #ruby-lang
socialcoder has joined #ruby-lang
<socialcoder> hey there
<socialcoder> got a question that is kinda frustrating me. Anyone in please?
<manveru> just ask
<shachaf> There is only silence and some second-hand clothes.
<socialcoder> kewl
<manveru> answering your question whether someone might be able to answer would result in 330 lines of "ask away" :P
io_syl has quit [Quit: Computer has gone to sleep.]
<socialcoder> what in plain english is ARGv? Is it soemthing that holds more than one variable?
<socialcoder> FYI - I am a noob studying Learn Ruby Hard Way
<manveru> ARGV is a remnant from C, i think
<whitequark> it is an array of command-line options
<Mon_Ouie> It holds the arguments that the user passed to your program through the command line. e.g. if he types ruby script.rb foo bar baz, ARGV is ["foo", "bar", "baz"]
<socialcoder> I read the C explanation, butcouldn't digest it
<socialcoder> it holds the argument , so its somethinglike a super variable
<socialcoder> ability to hold multiple arguments
<manveru> the v stands for vector, which is kind of an array
<socialcoder> or multiple values?
<Mon_Ouie> It's just an array, nothing that special
<socialcoder> Zed says the V is variable
<socialcoder> what is a vector?
<manveru> []
<apeiros_> argc & argv - arg count and arg value I'd say
<manveru> arg vector
<crazyhorse18> what do you geezers think of this ash.search('apps.*.skip_stages')
<crazyhorse18> hash.search('apps.*.skip_stages') even and hash.search('apps.*')and hash.search('apps.*.something.*')
<apeiros_> manveru: ah
<manveru> crazyhorse18: what for?
<crazyhorse18> pass it a block and then you can edit the hash on all the matching records
<manveru> what does search mean?
<socialcoder> okthanks on that guys...just one more...what isSTDIN
<whitequark> crazyhorse18: that only works for string keys
<crazyhorse18> so lets say you have the hash {:apps => { :something => {:skip_stages => [1,2,3] hash.search('apps'.something.skip_stages') will return [1,2,3] or you can do .*.skip_stages and you can match them all
<crazyhorse18> whitequark: yeah.. and symbols.. it checks for both
agarie has quit [Remote host closed the connection]
<crazyhorse18> haven't got it working with arrays yeat
<Mon_Ouie> It stands for "standard input". Typically, if you run the program in a terminal, it allows you to read what the user is typing.
<crazyhorse18> https://gist.github.com/4faccd783ab39521ffa2 << examples of what i'm using it for
vlad_starkov has quit [Remote host closed the connection]
<socialcoder> whats its connection with gets chomp
<socialcoder> stdin gets chomp
* apeiros_ thinks crazyhorse18 should subclass Hash, use / as separator and call it glob instead of search, and use ** for arbitrary deep search and * for single level
<crazyhorse18> ohhh yeah
<crazyhorse18> that's much better
<whitequark> I'd say avoid subclassing
<whitequark> abstract a hash.
<crazyhorse18> apps/**/node
<crazyhorse18> i tried to make all these lovely error messages
<crazyhorse18> like couldn't find branch , couldn't find leaf etc
<Mon_Ouie> #gets is a method that reads from an input stream; STDIN is just the input stream you want to read from
<socialcoder> errr?
<apeiros_> careful, Kernel#gets reads from ARGF, not $stdin
<crazyhorse18> but the recursion was doing my head in.. so had to change them to "couldn't find bla" for everyone
<crazyhorse18> every message
<apeiros_> cause of much confusion
dzhulk has quit [Quit: Leaving.]
rwalker has joined #ruby-lang
<Mon_Ouie> It returns a line, and you remove the trailing line terminator, "\n" using #gets
<socialcoder> can you give me an example please
<Mon_Ouie> For the second part, "foo\n".chomp #=> "foo"
<Mon_Ouie> For the first part, try typing $stdin.gets in e.g. IRB and enter a line after that
rwalker has left #ruby-lang [#ruby-lang]
<apeiros_> puts "Enter your name:"; name = $stdin.gets; …
<socialcoder> where does chomp come in to play
havenn has joined #ruby-lang
reppard has joined #ruby-lang
<Mon_Ouie> If you pass "socialcoder" to your program, name will actually be equal to "socialcoder\n"
<Mon_Ouie> Since you may not want that, you'd often use $stdin.gets.chomp, to get "socialcoder" instead
havenn has quit [Ping timeout: 252 seconds]
<whitequark> Mon_Ouie: that's wrong
<whitequark> if you press ^D gets will return nil
<socialcoder> thanks guys
<socialcoder> catch yalater
<socialcoder> thanks Mon Quie
socialcoder has quit []
<Mon_Ouie> whitequark: Not if there's still input.
<Mon_Ouie> (You can type "foo^D" and it will return "foo"
reppard has quit [Ping timeout: 250 seconds]
Technodrome has joined #ruby-lang
Technodrome has joined #ruby-lang
Technodrome has quit [Changing host]
Technodrome has quit [Remote host closed the connection]
telemachus_ is now known as telemachus
leopard_me has joined #ruby-lang
neocoin has joined #ruby-lang
vlad_starkov has joined #ruby-lang
MaddinXx_ has joined #ruby-lang
<whitequark> Mon_Ouie: yeah
<whitequark> but if you just use $stdin.gets.chomp, it'll explode
<whitequark> and that isn't good
<Mon_Ouie> Oh, right
<whitequark> I've made that mistake countless times
madish has joined #ruby-lang
postmodern has quit [Quit: Leaving]
meatballhat has joined #ruby-lang
meatballhat has quit [Changing host]
meatballhat has joined #ruby-lang
crazyhorse18 has quit [Ping timeout: 264 seconds]
Technodrome has joined #ruby-lang
Technodrome has joined #ruby-lang
Technodrome has quit [Changing host]
jxie has quit [Quit: leaving]
vlad_starkov has quit [Ping timeout: 244 seconds]
reppard has joined #ruby-lang
beiter has joined #ruby-lang
ebouchut has quit [Quit: This computer has gone to sleep]
kain has joined #ruby-lang
meatballhat has quit [Ping timeout: 252 seconds]
meatballhat has joined #ruby-lang
meatballhat has quit [Changing host]
meatballhat has joined #ruby-lang
reppard has quit [Ping timeout: 245 seconds]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
leopard_me has quit [Quit: Computer has gone to sleep.]
zmack has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
ddd has quit [Quit: Leaving.]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
vlad_starkov has joined #ruby-lang
x0F_ is now known as x0F
MaddinXx_ has quit [Remote host closed the connection]
kennyvb has quit [Quit: ZNC - http://znc.in]
vlad_starkov has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
kennyvb has joined #ruby-lang
ebouchut has joined #ruby-lang
vlad_starkov has joined #ruby-lang
srbaker has joined #ruby-lang
reppard has joined #ruby-lang
meatballhat has quit [Ping timeout: 252 seconds]
srbaker has quit [Quit: Computer has gone to sleep.]
zmack_ has joined #ruby-lang
lcdhoffman has joined #ruby-lang
<reppard> good moring everyone
zmack has quit [Ping timeout: 255 seconds]
banisterfiend has quit [Remote host closed the connection]
nignaztic has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
<Technodrome> why in the world would you want class level instance variables acting like class variables?
dzhulk has joined #ruby-lang
leopard_me has joined #ruby-lang
<apeiros_> Technodrome: you think class instance variables act like class variables?
<Technodrome> no i'm just saying, why would you want a class variable to act like an instance variable?
<Technodrome> i mean i see the difference there as well, but if you want every subclass to have its own value for the same variable , just use an instance variable?
<telemachus> Technodrome: To avoid the problems with class level variables.
<telemachus> Did you read the initial part of the piece?
<Technodrome> yes
<Technodrome> it just seems like a bit of a hack, but i could be wrong
<apeiros_> Technodrome: I don't see anything in that article that says "I want class level ivars to act like class variables" - so I don't get why you ask that question…
<apeiros_> obviously you *don't* want class level ivars to act like cvars, as that would cause issues.
beiter has quit [Quit: beiter]
<Technodrome> nevermind i get it
<telemachus> I think it's a pretty popular way to handle it. Many Rubyists recommend not using class variables because of the confusing semantics with inheritcance.
<Technodrome> i was unaware that setting a class variable on a child, changes it for every super class on up
<telemachus> s/inheritcance/inheritance/ # sighs
* apeiros_ is one of those rubyists who recommends not using @@cvars
<Technodrome> is that how class variables work in smalltalk?
<Technodrome> changes for every superclass on up?
havenn has joined #ruby-lang
dzhulk has quit [Quit: Leaving.]
havenn has quit [Ping timeout: 264 seconds]
banister_ has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 245 seconds]
Banistergalaxy has joined #ruby-lang
MaddinXx has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
havenn has joined #ruby-lang
dzhulk has joined #ruby-lang
retro|cz has joined #ruby-lang
dzhulk has quit [Quit: Leaving.]
dzhulk has joined #ruby-lang
srbaker has joined #ruby-lang
leopard_me has quit [Quit: Computer has gone to sleep.]
imajes has quit [Excess Flood]
srbaker has quit [Quit: Computer has gone to sleep.]
imajes has joined #ruby-lang
kurko_ has joined #ruby-lang
Technodrome has quit [Quit: Leaving.]
anannie has joined #ruby-lang
banister_ has quit [Read error: Connection timed out]
kurko_ has quit [Ping timeout: 264 seconds]
reppard is now known as reppard-away
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
leopard_me has joined #ruby-lang
reppard-away has quit [Ping timeout: 248 seconds]
vlad_starkov has quit [Remote host closed the connection]
Technodrome has joined #ruby-lang
Technodrome has joined #ruby-lang
Technodrome has quit [Changing host]
ebouchut has quit [Quit: This computer has gone to sleep]
<Technodrome> whitequark: such a nice person :)
mwjcomputing has joined #ruby-lang
reppard-away has joined #ruby-lang
vlad_starkov has joined #ruby-lang
dzhulk has quit [Quit: Leaving.]
brunocoelho has joined #ruby-lang
reppard-away has quit [Ping timeout: 248 seconds]
brunocoelho has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
imperator has joined #ruby-lang
ebouchut has joined #ruby-lang
Technodrome has quit [Quit: Leaving.]
nignaztic has quit [Ping timeout: 255 seconds]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
srbaker has joined #ruby-lang
marr has joined #ruby-lang
swav has joined #ruby-lang
Technodrome has joined #ruby-lang
Technodrome has quit [Changing host]
Technodrome has joined #ruby-lang
dzhulk has joined #ruby-lang
srbaker has quit [Client Quit]
ebouchut has quit [Quit: This computer has gone to sleep]
rcvalle has joined #ruby-lang
mercwithamouth has joined #ruby-lang
dzhulk has quit [Quit: Leaving.]
zmack_ has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
jxie has joined #ruby-lang
sush24_ has joined #ruby-lang
sush24 has quit [Ping timeout: 248 seconds]
andrewhl has joined #ruby-lang
Nisstyre has quit [Quit: Leaving]
vlad_starkov has joined #ruby-lang
MaddinXx_ has joined #ruby-lang
tallship has joined #ruby-lang
esad has joined #ruby-lang
io_syl has joined #ruby-lang
gjaldon has quit [Quit: Leaving]
vlad_starkov has quit [Ping timeout: 264 seconds]
havenn has quit [Remote host closed the connection]
mwjcomputing has quit [Ping timeout: 260 seconds]
havenn has joined #ruby-lang
dzhulk has joined #ruby-lang
sent-hil has joined #ruby-lang
havenn has quit [Ping timeout: 250 seconds]
dzhulk has quit [Client Quit]
ebouchut has joined #ruby-lang
vlad_starkov has joined #ruby-lang
esad has quit [Quit: Computer has gone to sleep.]
jobicoppola has joined #ruby-lang
dzhulk has joined #ruby-lang
esad has joined #ruby-lang
headius has joined #ruby-lang
imajes has quit [Excess Flood]
io_syl has quit [Quit: Computer has gone to sleep.]
imajes has joined #ruby-lang
havenn has joined #ruby-lang
mercwithamouth has quit [Ping timeout: 248 seconds]
sent-hil has quit [Remote host closed the connection]
Maddin___ has joined #ruby-lang
sent-hil has joined #ruby-lang
MaddinXx_ has quit [Ping timeout: 250 seconds]
stonerfish has joined #ruby-lang
havocjoseph has joined #ruby-lang
gregmoreno has joined #ruby-lang
seanstickle has joined #ruby-lang
headius has quit [Quit: headius]
esad has quit [Quit: Computer has gone to sleep.]
reppard-away has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
srbaker has joined #ruby-lang
seanstickle has quit [Client Quit]
headius has joined #ruby-lang
gregmoreno has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
seanstickle has joined #ruby-lang
dorei has joined #ruby-lang
mercwithamouth has joined #ruby-lang
<dorei> Hello, I have a: myServer = TCPServer.open(9900).accept , if a client connects to my tcpserver, I can use myServer.puts(data) to send data. Is there a way to find out if the client has closed the connection to my server?
dzhulk has quit [Quit: Leaving.]
dzhulk has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
<whitequark> dorei: try #eof?
nignaztic has joined #ruby-lang
srbaker has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
matthewd has quit [Ping timeout: 240 seconds]
matthewd has joined #ruby-lang
esad has joined #ruby-lang
JohnBat26 has joined #ruby-lang
heftig has quit [Ping timeout: 245 seconds]
Technodrome has quit [Quit: Leaving.]
<dorei> whitequark: eof? seems to only work after the client has sent something, if the client didnt sent something, eof? blocks
dzhulk has quit [Quit: Leaving.]
ryanlecompte has joined #ruby-lang
gregmoreno has joined #ruby-lang
dzhulk has joined #ruby-lang
nignaztic has quit [Ping timeout: 264 seconds]
<imperator> if the client didn't send anything, did it ever connect? ;)
Technodrome has joined #ruby-lang
Technodrome has quit [Changing host]
Technodrome has joined #ruby-lang
heftig has joined #ruby-lang
<dorei> yeap
<dorei> i manually connect with telnet
<dorei> and then just quit it
<dorei> i connected but didnt send anything :p
sent-hil has quit [Remote host closed the connection]
<dorei> but puts/write from server dont seem to know that (they just return nil just like when the connection is established)
esad has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mwjcomputing has joined #ruby-lang
spuk has quit [Ping timeout: 252 seconds]
jsaak has quit [Ping timeout: 252 seconds]
BigO_ has joined #ruby-lang
sush24_ has quit [Ping timeout: 264 seconds]
ebouchut has quit [Quit: This computer has gone to sleep]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
sush24_ has joined #ruby-lang
dabradley has quit [Ping timeout: 245 seconds]
mwjcomputing has quit [Ping timeout: 250 seconds]
jobicoppola has quit [Quit: Computer has gone to sleep.]
ryanf has joined #ruby-lang
slyphon has joined #ruby-lang
havocjoseph has quit [Quit: Leaving.]
BigO_ has quit [Remote host closed the connection]
BigO_ has joined #ruby-lang
havocjoseph has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
ebouchut has joined #ruby-lang
BigO_ has quit [Ping timeout: 255 seconds]
dzhulk1 has joined #ruby-lang
ebouchut has quit [Client Quit]
dabradley has joined #ruby-lang
banisterfiend has joined #ruby-lang
dzhulk has quit [Ping timeout: 244 seconds]
BigO_ has joined #ruby-lang
jsaak has joined #ruby-lang
archi has joined #ruby-lang
archi has left #ruby-lang [#ruby-lang]
BigO_ has quit [Ping timeout: 255 seconds]
ryanf has quit [Quit: broken pipes |||]
wallerdev has joined #ruby-lang
dzhulk1 has quit [Quit: Leaving.]
joevandyk_ has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
workmad3 has joined #ruby-lang
dzhulk has joined #ruby-lang
ryanf has joined #ruby-lang
havocjoseph has left #ruby-lang [#ruby-lang]
joevandyk_ has quit [Ping timeout: 244 seconds]
BigO_ has joined #ruby-lang
PolPot_ has joined #ruby-lang
gregmoreno has joined #ruby-lang
rcvalle has quit [Quit: Leaving]
ebouchut has joined #ruby-lang
wyhaines has joined #ruby-lang
dzhulk1 has joined #ruby-lang
dzhulk has quit [Ping timeout: 265 seconds]
dorei has quit [Ping timeout: 264 seconds]
ryanf has quit [Quit: broken pipes |||]
reppard-away has left #ruby-lang [#ruby-lang]
reppard has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
methods has joined #ruby-lang
ebouchut has quit [Quit: This computer has gone to sleep]
spuk has joined #ruby-lang
methods has left #ruby-lang [#ruby-lang]
gregmoreno has quit [Ping timeout: 264 seconds]
BigO_ has quit [Remote host closed the connection]
PolPot_ has quit []
ebouchut has joined #ruby-lang
ebouchut has quit [Client Quit]
banisterfiend has quit [Ping timeout: 245 seconds]
BigO_ has joined #ruby-lang
KA_ has joined #ruby-lang
ryanf has joined #ruby-lang
wallerdev has joined #ruby-lang
BigO_ has quit [Ping timeout: 264 seconds]
Nisstyre-laptop has joined #ruby-lang
sush24_ has quit [Ping timeout: 246 seconds]
sush24_ has joined #ruby-lang
joevandyk_ has joined #ruby-lang
workmad3 has quit [Ping timeout: 250 seconds]
brianpWins has quit [Quit: brianpWins]
mercwithamouth has quit [Ping timeout: 255 seconds]
dzhulk1 has quit [Quit: Leaving.]
KA_ has quit [Quit: KA_]
srbaker has quit [Quit: Computer has gone to sleep.]
glebm has quit [Quit: Computer has gone to sleep.]
<yorickpeterse> https://bugs.php.net/bug.php?id=47494 I propose we add this feature to Ruby
blacktulip has quit [Remote host closed the connection]
joevandyk_ has quit [Read error: Connection reset by peer]
srbaker has joined #ruby-lang
brixen_ has left #ruby-lang [#ruby-lang]
brixen has joined #ruby-lang
joevandyk_ has joined #ruby-lang
sslern has joined #ruby-lang
thufir_ has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
<thufir_> once I have a mail object, how do I get the header object from it? http://rdoc.info/github/mikel/mail/Mail/Header
apeiros_ has quit [Ping timeout: 246 seconds]
joevandyk_ has quit [Ping timeout: 260 seconds]
apeiros_ has joined #ruby-lang
Maddin___ has quit [Remote host closed the connection]
sslern has left #ruby-lang [#ruby-lang]
mark06 has joined #ruby-lang
<mark06> cols.each_with_index { |col, ix| row.gsub!(/##{ix + 1}/, col) }
<mark06> row.gsub!(/#\d+/, '')
<mark06> first line doesn't work if second line is run
<mark06> why?
<mark06> it does work if # is replaced with $ in both lines
<mark06> (except for the #{} of course)
joevandyk_ has joined #ruby-lang
mark06 has left #ruby-lang [#ruby-lang]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
brianpWins has joined #ruby-lang
ryanlecompte has quit [Remote host closed the connection]
neocoin has joined #ruby-lang
lsegal has joined #ruby-lang
<rue> thufir_: Also, the method list and then search for header
workmad3 has joined #ruby-lang
joevandyk_ has quit [Read error: Connection reset by peer]
robotmay has quit [Remote host closed the connection]
AndChat| has joined #ruby-lang
<thufir_> I see h = Header.new in the method docs, but I don't see the inverse, if you will. h =msg.header ?
Banistergalaxy has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Ping timeout: 245 seconds]
<thufir_> rue: ok, that worked :) thanks.
reppard has quit [Ping timeout: 265 seconds]
<rue> You’ll usually want to search where you want to do something *from*, not what the result should be :)
rippa has quit [Ping timeout: 245 seconds]
<thufir_> ok
robotmay has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
robotmay has quit [Remote host closed the connection]
faustman has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby-lang
reppard has joined #ruby-lang
dzhulk has joined #ruby-lang
reppard has quit [Ping timeout: 265 seconds]
dzhulk has quit [Quit: Leaving.]
stonerfish has quit [Quit: Leaving.]
nick_h has quit [Ping timeout: 265 seconds]
workmad3 has quit [Ping timeout: 260 seconds]
reppard has joined #ruby-lang
io_syl has joined #ruby-lang
mwjcomputing has joined #ruby-lang
MaddinXx has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
reppard has quit [Ping timeout: 255 seconds]
nick_h has joined #ruby-lang
sush24_ has quit [Quit: This computer has gone to sleep]
sn0wb1rd has quit [Quit: sn0wb1rd]
sn0wb1rd has joined #ruby-lang
robotmay has joined #ruby-lang
kurko_ has joined #ruby-lang
dzhulk has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
wyhaines has quit [Remote host closed the connection]
socialcoder has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
<socialcoder> hey guys
srbaker has joined #ruby-lang
<socialcoder> I am wowed...was going thru an HN thread 781 days old. wow wow. There is so much flame between Python / Ruby andeven more Django / Rails. Crazy.
meizaps has quit [Ping timeout: 246 seconds]
<drbrain> socialcoder: maybe on hacker news
sepp2k1 has joined #ruby-lang
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<manveru> nowadays we're both hating on nodejs, so pythonistas are our best buddies :)
<yorickpeterse> just don't start talking about Lisp or you'll attract all the neckbeards
* apeiros_ doesn't get why some coder think they should hate a language
<apeiros_> I mean, unless you're forced to write in it
sepp2k has quit [Ping timeout: 264 seconds]
<chris2> or its php
<manveru> hating php is just a waste of time
<manveru> most hate is :P
<Technodrome> hate is becoming less and less popular these days
<Technodrome> for some
<socialcoder> lol
<Technodrome> but still strong for many!
<socialcoder> u guys talk like some cult
<socialcoder> drbrain, yea I was referring to hacker news
<Technodrome> the thing I absolutely <3 is when really new rails developers who barely know ruby feel like its their "right of passion" to hate on PHP
<chris2> manveru: haha
<Technodrome> its like dude, you barely know what a class is
dzhulk has quit [Quit: Leaving.]
<chris2> manveru: now we save the net by hating zed
<drbrain> Technodrome: :D
<apeiros_> aaaah, zed :D
<socialcoder> i was doing a comparison search on google
<drbrain> chris2: full cicrle?
<socialcoder> and came across this
<socialcoder> one thing is clear
<chris2> :)
<socialcoder> the majority opeinion favoprs ruby/rails
<Technodrome> I use django mainly for work , but i love them all
<manveru> i love ruby, but hate rails
<havenn> ^^
meizaps has joined #ruby-lang
<manveru> i'd rather use django :)
<Technodrome> I love ruby more than Python but like Django more than Rails
<socialcoder> some guy was telling me if I learn ruby and rails, it maybe difficult to learn python, but the other way around is easier..is that true?
<havenn> socialcoder: no
<chris2> i hate webdev :P
<apeiros_> I hate everything. Long live the reinvented wheel!
<Technodrome> it will be equally easy or hard to learn any of any given time
<yorickpeterse> I like cats
<Technodrome> with django, i get stuff done quick
<manveru> the internet was made for ... kitten
<socialcoder> interesting
<apeiros_> coming out of the toaster… with rainbows following them… while the fly in a black sky…
<socialcoder> techodrome, the guy was saying ruby's simplicity is addictive
<socialcoder> and may make me a disorganised programmer
<socialcoder> python is good because it has a standard way of doing stuff...blah blah
<seanstickle> Can we stop talking about what some other guy said to you as though it weren't really just you saying it and pretending it was someone else?
<manveru> ruby and python are more alike than they're different...
<socialcoder> why wud I do that
<seanstickle> "I have this … friend … who is a PHP programmer. And he said Ruby sucks."
<socialcoder> big deal..
* seanstickle rolls eyes
<socialcoder> if I want to ask something
<socialcoder> I will ask
<chris2> weird friends you have :P
<socialcoder> did I make a general statement like that Sean
<socialcoder> anyways
<socialcoder> nevermind...dont wanna fight
vlad_starkov has quit [Remote host closed the connection]
<chris2> learning never hurt
<seanstickle> Sometimes it hurts a lot.
<seanstickle> And sometimes it's just really really boring.
<seanstickle> Sometimes it's interesting.
<seanstickle> It's sort of all over the map.
<chris2> well, dont do boring stuff if you dont want to
<socialcoder> true
<socialcoder> is ruby primarily for the web?
<seanstickle> chris2: what!
<seanstickle> chris2: the boring stuff is sometimes necessary to the goal
<seanstickle> Memorizing all the Latin declensions was really dull. But now I can read Latin, which is super awesome.
workmad3 has joined #ruby-lang
<seanstickle> socialcoder: no. it's for most general programming tasks.
<seanstickle> Wouldn't advise using it for an operating system kernel though.
<seanstickle> …yet.
<socialcoder> then Sean, why do they say its slow when programmed for non web purposes?
<seanstickle> socialcoder: who?
<seanstickle> socialcoder: who is "they"?
<manveru> the illuminati
<socialcoder> couple articles I read, plus some HN discussion
<seanstickle> Mein Gott, the Illuminati are into programming now?!
<socialcoder> haha
<socialcoder> guys pls...
<socialcoder> :(
<seanstickle> socialcoder: I don't know why they say that.
<seanstickle> socialcoder: ask them.
<seanstickle> I'm not a psychic.
<socialcoder> well, "they" did. some technical talks about memory problems
<socialcoder> psychic reminded me, I have to watch my favorite show The Mentalist
<seanstickle> If you didn't understand the reasons, it does't make any difference for you.
<manveru> you want fast, you can always use fortran
<socialcoder> hmm
<seanstickle> manveru: or APL
<manveru> can't argue with that
<seanstickle> :D
workmad3 has quit [Ping timeout: 250 seconds]
ryanf has quit [Quit: leaving]
srbaker has quit [Quit: Computer has gone to sleep.]
jcr has joined #ruby-lang
<jcr> is there a rvm equivelent for rehash from rbenv?
<manveru> what does rehash do?
<havenn> jcr: No, rvm doesn't use shims.
<havenn> jcr: Neither does chruby for that matter.
ryanf has joined #ruby-lang
<havenn> manveru: Rehash sets up new shims for ruby and gems. Gotta rehash all the time with rbenv. :P
<jcr> havenn: what is chruby
<jcr> cruby?
<jcr> MRI?
<havenn> jcr: Nope, chruby not CRuby :P
<manveru> havenn: ok, haven't had to use rbenv yet
<manveru> in rvm we trust :)
<havenn> chruby is lovely too :)
<manveru> first time i hear of it too
<jcr> I added another local repo of octopress... this is all I am getting category_generator.rb:114:in `throw': uncaught throw "No 'category_index'
<manveru> doesn't seem like something i'd like though
<yorickpeterse> Besides the rehashing, any reason to use chruby over rbenv?
<jcr> I did not rehash
<jcr> this is my second install and i did nor rehash the first time that I remember as I do not have rbenv on my system
<havenn> yorickpeterse: Fuzzy matching of Ruby names. Has tests.
<havenn> yorickpeterse: Easier to point at any Ruby, no matter where it was installed as well.
<manveru> rvm has tests :P
<yorickpeterse> havenn: hmm
<manveru> not too fuzzy matching though
<yorickpeterse> Is there a guarantee it will be maintained 6 months from now?
<manveru> jcr: i don't see how that's related to rvm
<havenn> yorickpeterse: Postmodern seems pretty committed to it, and it has rapidly gained additional committers. I suspect it will very much be around. :)
agarie has joined #ruby-lang
<yorickpeterse> Hm, suppose I'll have to take a look at it
<yorickpeterse> rbenv seems dead anyway, and the rehash bit pisses me off
<havenn> Evil shims are evil.
lcdhoffman has joined #ruby-lang
wyhaines has joined #ruby-lang
<jcr> manveru: its not except for the devs are saying the instructions must be followed explicitly for an install
<jcr> manveru: however I did use rbenv for my first install and thus my questions
<manveru> yeah, they usually have to
<jcr> manveru: correction - I did not use rbenv for the first install
<jcr> which works like a gem
<jcr> in more ways then one
<manveru> color me confused
<manveru> do you have a question? do you have a problem?
Technodrome has left #ruby-lang [#ruby-lang]
stonerfish has joined #ruby-lang
<jcr> manveru: so am I simpy put - I am getting an error the devs say is cuased by not following the install directions to the letter even though my other install works flawlessly and I did not follw the directions to a t
stonerfish has quit [Client Quit]
<manveru> so you're saying that the installation is like a casino, and the house always wins?
stonerfish has joined #ruby-lang
<manveru> i better get some sleep before i say more nonsense :)
<manveru> basically, the devs tell you to use a train to go from A to B, you decide to take a train 30 minutes earlier, but the next time you try to drive with a car and get lost
<yorickpeterse> manveru: go to bed already
wyhaines has quit [Remote host closed the connection]
<manveru> on my way :)
mwjcomputing has quit [Quit: Leaving]
guns has joined #ruby-lang
io_syl has quit [Quit: Computer has gone to sleep.]
<yorickpeterse> havenn: "Does not automatically switch Rubies upon login or when changing directories." Yeah, I kinda want the first
<yorickpeterse> otherwise I'll just end up forgetting I'm using system Ruby
<havenn> yorickpeterse: Should be landed soon. :) https://github.com/postmodern/chruby/issues/40
anannie has quit [Remote host closed the connection]
<yorickpeterse> hmm
<havenn> yorickpeterse: Yeah, I just put 'chruby 1.9' in my .zshrc for now. The auto-change feature though really works well. Will be included in forthcoming 3.0 release methinks.
<havenn> yorickpeterse: RVM adopting same method as chruby so no need to hook cd. Nice to be sharing code between RVM and chruby.
MaddinXx has joined #ruby-lang
<yorickpeterse> What file does chruby use for local Ruby versions? .ruby-version?
<havenn> yorickpeterse: yup, .ruby-version
<yorickpeterse> hmm
anannie has joined #ruby-lang
jackhammer2022 has joined #ruby-lang
agarie has quit [Ping timeout: 245 seconds]
io_syl has joined #ruby-lang
kurko_ has quit [Ping timeout: 244 seconds]
io_syl has quit [Client Quit]
vlad_starkov has joined #ruby-lang
segfault- has quit [Quit: ZNC - http://znc.in]
postmodern has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 252 seconds]
faustman has joined #ruby-lang
headius has quit [Quit: headius]
<postmodern> drbrain, zenspider, is there a list of every ENV variable which rake responds to?
<postmodern> drbrain, zenspider, there's no Environment Variables section in rake's man page
gsav has quit [Read error: Connection reset by peer]
wyhaines has joined #ruby-lang
gsav has joined #ruby-lang
workmad3 has joined #ruby-lang
seanstickle has quit [Quit: seanstickle]
toretore has quit [Quit: Leaving]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
wyhaines has quit [Remote host closed the connection]
<apeiros_> hrm, there's no method to escape globbing special chars?
AlHafoudh has joined #ruby-lang
AlHafoudh has quit [Excess Flood]
AlHafoudh has joined #ruby-lang
AlHafoudh has quit [Excess Flood]
AlHafoudh has joined #ruby-lang
AlHafoudh has quit [Excess Flood]
AlHafoudh has joined #ruby-lang
AlHafoudh has quit [Excess Flood]
<heftig> apeiros_: shellescape?
AlHafoudh has joined #ruby-lang
AlHafoudh has quit [Excess Flood]
<apeiros_> that one does too much
AlHafoudh has joined #ruby-lang
agarie has joined #ruby-lang
srbaker has joined #ruby-lang
<zzak> postmodern: rake treats ENV like any hash
<zzak> postmodern: what did you need it for?
wyhaines has joined #ruby-lang
<postmodern> zzak, didn't realize it's ruby() method uses $RUBY
<postmodern> zzak, need a list of RUBY*/GEM_* variables, so as to not clobber them in my code
<apeiros_> *its
<zzak> would RBConfig help?
MaddinXx has quit [Remote host closed the connection]
<zzak> RUBY_ROOT looks good
<postmodern> hopefully that was the last env variable conflict
<postmodern> surprised rake's man-page doesn't have an Env Variables sections
<postmodern> but im guessing it hasn't been updated in forever
<zzak> it's not realy rake's fault tho, those are ruby env's
<postmodern> zzak, no, it is kind of rake's fault :)
lcdhoffman has quit [Quit: lcdhoffman]
<postmodern> zzak, also ruby's man-page does have an Env Variables section, which lists stuff like RUBYOPT, RUBYSHELL, RUBYLIB
<zzak> ahh
<postmodern> zzak, awesome!
<zzak> do you think rake man page should include these?
wyhaines has quit [Remote host closed the connection]
io_syl has joined #ruby-lang
<postmodern> zzak, not sure about the TEST* ones, as that's the testtask, which I think is going to be deprecated?
<postmodern> zzak, all RAKE_* ones definitely should
<postmodern> zzak, and all the win32 HOME* related ones
<socialcoder> what is rake?
<zzak> postmodern: thank you, ill check on testtask
<havenn> socialcoder: Ruby Make: https://github.com/jimweirich/rake
<socialcoder> and what is make? I mean what is this for? sorry for too many Qs..read something, but didnt understand
<postmodern> socialcoder, make is a dev tool for defining tasks, which run a series of commands
<postmodern> socialcoder, and you could define variables, which the commands could use
<postmodern> socialcoder, and dependencies between files/commands
<postmodern> socialcoder, so like foo.o would depend on foo.c, and run the gcc command if foo.c changes
<matti> zzak: ;]
<postmodern> socialcoder, Rake is like that but with Ruby code, instead of shell commands
<zzak> matti: hi!
<socialcoder> I see
<socialcoder> Thanks PM
<matti> :)
iosctr has joined #ruby-lang
workmad3 has quit [Ping timeout: 245 seconds]
<socialcoder> 5 AM
<socialcoder> going to bed
<socialcoder> this community here has been a patient and helpful one
<socialcoder> sallute you all
Croms has joined #ruby-lang
<socialcoder> enjoy your Sunday!
apeiros_ has quit [Remote host closed the connection]
<whitequark> how do I check if Net::HTTP request is ok?
<whitequark> as in: foo.class # => Net::HTTPOK; foo.ok? # => true
socialcoder has quit []
Hakon has joined #ruby-lang