apeiros changed the topic of #ruby-lang to: Nick registration required to talk || Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com
iraja has joined #ruby-lang
<drbrain> foucist: I have never seen that, nor needed to do that
<Mon_Ouie> I've only seen this for variables that aren't used but still given a name for reference (that doesn't seem to be the case in your example though)
<drbrain> foucist: I guess "it is an odd convention"
<drbrain> maybe they don't understand ruby's local variable/method ambiguity
iraja has quit [Ping timeout: 240 seconds]
beastieboy is now known as banister
<foucist> drbrain: would it cause problems?
<drbrain> the _ in the local variable name? no
vlad_starkov has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
<foucist> Mon_Ouie: well this would be the full example: https://gist.github.com/foucist/c22220432ee78eac0da0
<foucist> just in a rails model, but doesn't seem like there's a reason for it
<drbrain> foucist: I suppose there is also a #categories method?
havenwood has joined #ruby-lang
<foucist> nope
<drbrain> huh
norplr_ has joined #ruby-lang
toretore has quit [Quit: Leaving]
<lianj> damn you rails for link_to remote:true + js.erb
vlad_starkov has quit [Ping timeout: 240 seconds]
havenwood has quit [Ping timeout: 260 seconds]
cads has joined #ruby-lang
fijimunkii has joined #ruby-lang
ldnunes has quit [Ping timeout: 260 seconds]
ldnunes has joined #ruby-lang
snarfmason has joined #ruby-lang
kireevco_ has joined #ruby-lang
micalexander has quit [Remote host closed the connection]
jeff_r_ has quit [Remote host closed the connection]
micalexander has joined #ruby-lang
Coincide_ has quit [Ping timeout: 272 seconds]
jeff_r has joined #ruby-lang
ninjago has quit [Remote host closed the connection]
ninjago has joined #ruby-lang
stardiviner has joined #ruby-lang
jeff_r has quit [Ping timeout: 245 seconds]
ldnunes has quit [Quit: Leaving]
micalexander has quit [Ping timeout: 272 seconds]
ldnunes has joined #ruby-lang
Coincidental has joined #ruby-lang
mistym has quit [Quit: Leaving]
ninjago has quit [Ping timeout: 264 seconds]
sevvie has joined #ruby-lang
slyphon has joined #ruby-lang
Elico has quit [Ping timeout: 252 seconds]
francisfish has joined #ruby-lang
saarinen has quit [Quit: saarinen]
slyphon has quit [Client Quit]
amerine has quit [Quit: Computer has gone to sleep.]
x0nic has quit [Ping timeout: 268 seconds]
sevvie has quit [Ping timeout: 245 seconds]
francisfish has quit [Ping timeout: 268 seconds]
julweber_ has joined #ruby-lang
cads has quit [Ping timeout: 240 seconds]
mistym has joined #ruby-lang
x0nic has joined #ruby-lang
julweber has quit [Ping timeout: 268 seconds]
Coincidental has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
Coincidental has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby-lang
Coincidental has joined #ruby-lang
hahuang61 has quit [Ping timeout: 268 seconds]
ecnalyr has joined #ruby-lang
stardiviner has quit [Ping timeout: 272 seconds]
ykk` has joined #ruby-lang
Coincidental has quit [Ping timeout: 240 seconds]
nathanstitt has quit [Quit: I growing sleepy]
bzalasky has joined #ruby-lang
enmand has joined #ruby-lang
ItSANgo has joined #ruby-lang
jsullivandigs has joined #ruby-lang
ldnunes has quit [Quit: Leaving]
kireevco_ has quit [Ping timeout: 272 seconds]
shinnya has quit [Ping timeout: 245 seconds]
stardiviner has joined #ruby-lang
ykk` has quit [Ping timeout: 268 seconds]
slyphon has joined #ruby-lang
sevvie has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
jxie has quit [Read error: Connection reset by peer]
jxie_ has joined #ruby-lang
bzalasky has joined #ruby-lang
badboy4471 has joined #ruby-lang
bzalasky has quit [Read error: Connection reset by peer]
bzalasky has joined #ruby-lang
sevvie has quit [Ping timeout: 240 seconds]
brianpWins has quit [Quit: brianpWins]
momomomomo has joined #ruby-lang
micalexander has joined #ruby-lang
ykk` has joined #ruby-lang
martndemus has joined #ruby-lang
benlovell has joined #ruby-lang
martndemus has quit [Ping timeout: 245 seconds]
benlovell has quit [Ping timeout: 272 seconds]
ecnalyr has quit [Remote host closed the connection]
Andrevan has joined #ruby-lang
ninjago has joined #ruby-lang
ninjago has quit [Ping timeout: 245 seconds]
tubbo has joined #ruby-lang
cored has quit [Ping timeout: 240 seconds]
jeff_r has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
stamina has quit [Ping timeout: 268 seconds]
tubbo has quit [Ping timeout: 272 seconds]
jeff_r has quit [Ping timeout: 240 seconds]
brianpWins has joined #ruby-lang
mj12albert has joined #ruby-lang
mj12albert has quit [Max SendQ exceeded]
mj12albert has joined #ruby-lang
io_syl has quit []
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
stardiviner has quit [Ping timeout: 272 seconds]
bzalasky has quit [Ping timeout: 245 seconds]
badboy4471 has quit [Quit: 离开]
saarinen has joined #ruby-lang
dhruvasagar has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
Domon has joined #ruby-lang
lfox has joined #ruby-lang
nathanstitt has joined #ruby-lang
jeff_r has joined #ruby-lang
pr0ton has quit [Quit: pr0ton]
lsegal has joined #ruby-lang
fijimunkii has quit [Ping timeout: 240 seconds]
Grimscribe has joined #ruby-lang
flip_digits has quit [Remote host closed the connection]
flip_digits has joined #ruby-lang
foucist has quit [Ping timeout: 240 seconds]
mdedetrich has joined #ruby-lang
flip_digits has quit [Ping timeout: 245 seconds]
alexju has joined #ruby-lang
tylersmith has joined #ruby-lang
martndemus has joined #ruby-lang
flip_digits has joined #ruby-lang
martndemus has quit [Ping timeout: 245 seconds]
Grimscribe has quit [Quit: Grimscribe]
tylersmith has quit [Read error: Connection reset by peer]
ninjago has joined #ruby-lang
lfox has quit [Quit: ZZZzzz…]
Grimscribe has joined #ruby-lang
ninjago has quit [Ping timeout: 268 seconds]
kitak_ has joined #ruby-lang
kitak has quit [Read error: Connection reset by peer]
ykk` has quit [Quit: ykk`]
hahuang61 has joined #ruby-lang
mdedetrich has quit [Quit: Computer has gone to sleep.]
tubbo has joined #ruby-lang
D9 has joined #ruby-lang
foucist has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
tubbo has quit [Ping timeout: 272 seconds]
mannyt has joined #ruby-lang
musty has joined #ruby-lang
<imperator> matz contemplated using a leading underscores for private instance variables that couldn't be seen by subclasses
<banister> hmm
<musty> banister: Indeed.
<imperator> back in 2005 :)
<banister> i was thinking u could setup a class-level hash key'd by the instance to achieve something similar
jithu has joined #ruby-lang
Domon__ has joined #ruby-lang
Domon__ has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
<imperator> apparently there was a library called superhash that was designed for that
<imperator> though, it was on the RAA, now defunct, and the current superhash gem appears to be unrelated
Domon has quit [Ping timeout: 272 seconds]
mannyt has quit [Quit: mannyt]
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<imperator> on an unrelated note, rust takes quite a while to build
benlovell has joined #ruby-lang
martndemus has joined #ruby-lang
Oloryn_lt2 has joined #ruby-lang
kitak_ has quit [Remote host closed the connection]
tylersmith has joined #ruby-lang
Domon has joined #ruby-lang
benlovell has quit [Ping timeout: 245 seconds]
martndemus has quit [Ping timeout: 245 seconds]
soba has joined #ruby-lang
Oloryn_lt21 has quit [Ping timeout: 272 seconds]
kitak has joined #ruby-lang
natevick has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 245 seconds]
mannyt has joined #ruby-lang
natevick has quit [Remote host closed the connection]
kireevco_ has joined #ruby-lang
julweber_ has quit [Remote host closed the connection]
julweber has joined #ruby-lang
julweber has quit [Ping timeout: 272 seconds]
a1ph4g33k has quit [Quit: Leaving]
brianpWins has quit [Read error: Connection reset by peer]
nathanstitt has quit [Quit: I growing sleepy]
heathjs is now known as heath
postmodern has quit [Quit: Leaving]
Grimscribe has quit [Quit: Grimscribe]
mucker has joined #ruby-lang
hahuang61 has quit [Ping timeout: 245 seconds]
imperator has left #ruby-lang ["Leaving"]
brianpWins has joined #ruby-lang
Hung has joined #ruby-lang
jonahR has joined #ruby-lang
io_syl has joined #ruby-lang
r0bby_ has joined #ruby-lang
saarinen has quit [Quit: saarinen]
fijimunkii has joined #ruby-lang
havenwood has quit [Ping timeout: 240 seconds]
Asher has quit [Quit: Leaving.]
Asher has joined #ruby-lang
Cakey has joined #ruby-lang
martndemus has joined #ruby-lang
yellow5 has quit [Ping timeout: 248 seconds]
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
yellow5 has joined #ruby-lang
foucist has quit [Quit: leaving]
fijimunkii has quit [Ping timeout: 272 seconds]
ecnalyr has joined #ruby-lang
banister has quit [Quit: Computer has gone to sleep.]
Cakey has left #ruby-lang [#ruby-lang]
martndemus has quit [Ping timeout: 272 seconds]
jsullivandigs has quit [Ping timeout: 240 seconds]
hahuang61 has joined #ruby-lang
Andrevan has quit [Quit: WeeChat 0.4.2-rc1]
ninjago has joined #ruby-lang
ninjago has quit [Ping timeout: 264 seconds]
Domon has quit [Remote host closed the connection]
Asher has quit [Quit: Leaving.]
Asher has joined #ruby-lang
francisfish has joined #ruby-lang
cads has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
malev has quit [Quit: Leaving]
francisfish has quit [Ping timeout: 268 seconds]
jeff_r has quit [Remote host closed the connection]
jeff_r has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
ledestin has quit [Ping timeout: 272 seconds]
dhruvasagar has joined #ruby-lang
guest_________ has left #ruby-lang [#ruby-lang]
guest_________ has joined #ruby-lang
jeff_r has quit [Ping timeout: 245 seconds]
postmodern has joined #ruby-lang
amerine has joined #ruby-lang
ninjago has joined #ruby-lang
toretore has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 240 seconds]
hahuang61 has quit [Ping timeout: 245 seconds]
jeer has quit [Ping timeout: 260 seconds]
mac_ has joined #ruby-lang
jeer has joined #ruby-lang
ecnalyr has quit [Remote host closed the connection]
Hung has quit [Remote host closed the connection]
mucker has quit [Remote host closed the connection]
hahuang61 has joined #ruby-lang
Domon has joined #ruby-lang
arBmind has joined #ruby-lang
Domon has quit [Read error: Connection reset by peer]
majjoha has joined #ruby-lang
Domon has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
mgberlin has joined #ruby-lang
benlovell has joined #ruby-lang
martndemus has joined #ruby-lang
jerrytgarcia has quit [Ping timeout: 245 seconds]
musty has quit [Read error: Connection reset by peer]
musty_ has joined #ruby-lang
arBmind has quit [Ping timeout: 245 seconds]
benlovell has quit [Ping timeout: 268 seconds]
D9 has quit [Ping timeout: 245 seconds]
martndemus has quit [Ping timeout: 245 seconds]
musty_ has quit [Ping timeout: 240 seconds]
schaerli has joined #ruby-lang
mgberlin has quit [Quit: mgberlin]
mdedetrich has joined #ruby-lang
<mistym> Anyone able to help out with a ruby-ffi issue?
<rickhull> on its face, i hate the idea of special naming conventions implying mechanism
guest_________ has quit [Ping timeout: 250 seconds]
<rickhull> "leading underscores"
mgberlin has joined #ruby-lang
<rickhull> as opposed to private/protected or the @ sigil
<rickhull> if underscore were promoted to a proper sigil, then sure/maybe
Elico has joined #ruby-lang
mac_ has quit [Remote host closed the connection]
<crankharder> I've got a String that has multiple "<html>etc...</html>" blocks in it. can I leverage scan and some regex to split it into strings beginning and ending w/ the html tag?
rickhull1 has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
jerrytgarcia has joined #ruby-lang
<crankharder> .scan(/<html>.*<\/html>/m).length => 1
<crankharder> so that's being greedy
rickhull1 has quit [Client Quit]
mgberlin has quit [Quit: mgberlin]
flip_digits has quit [Remote host closed the connection]
flip_digits has joined #ruby-lang
<crankharder> so... simpler version: "ABetcBAABdefBA".scan(/AB.*BA/m) => ["ABetcBAABdefBA"]
vmoravec has joined #ruby-lang
<crankharder> looking for this: ["ABetcBA", "ABdefBA"]
<toretore> .*?
rickhull has quit [Ping timeout: 245 seconds]
<crankharder> yay, mind explaining that? :)
mdedetrich has quit [Ping timeout: 240 seconds]
flip_digits has quit [Ping timeout: 245 seconds]
<toretore> ? makes it non-greedy
kgrz has joined #ruby-lang
jonahR has quit [Quit: jonahR]
<crankharder> thanks!
JohnBat26 has joined #ruby-lang
io_syl has quit []
io_syl has joined #ruby-lang
jeff_r has joined #ruby-lang
ninjago has quit [Remote host closed the connection]
ninjago has joined #ruby-lang
mdedetrich has joined #ruby-lang
jeff_r has quit [Ping timeout: 272 seconds]
ninjago has quit [Ping timeout: 272 seconds]
CoreData has quit [Read error: Connection reset by peer]
CoreData1 has joined #ruby-lang
kgrz has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
mdedetrich has quit [Ping timeout: 272 seconds]
alexju has quit [Remote host closed the connection]
alexju has joined #ruby-lang
JasonC_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
r0bgleeson has quit [Read error: Connection reset by peer]
r0bgleeson has joined #ruby-lang
Scader has joined #ruby-lang
slyphon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alexju has quit [Ping timeout: 240 seconds]
kohgpat has joined #ruby-lang
kireevco_ has quit [Ping timeout: 272 seconds]
martndemus has joined #ruby-lang
yfeldblum has quit [Ping timeout: 268 seconds]
apeiros has quit [Remote host closed the connection]
madb055 has quit [Ping timeout: 272 seconds]
dagobah_ has quit [Remote host closed the connection]
diegoviola has joined #ruby-lang
r0bgleeson has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby-lang
arBmind has joined #ruby-lang
martndemus has quit [Ping timeout: 272 seconds]
schaerli has joined #ruby-lang
Coincidental has joined #ruby-lang
stardiviner has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
stevepsharpe has quit [Quit: Linkinus - http://linkinus.com]
vlad_starkov has joined #ruby-lang
JasonC_ has joined #ruby-lang
JasonC_ has quit [Client Quit]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
julweber has joined #ruby-lang
knu has quit [Ping timeout: 240 seconds]
JohnBat26 has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
knu has joined #ruby-lang
martndemus has joined #ruby-lang
barttenbrinke has joined #ruby-lang
jxie_ has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
solars has joined #ruby-lang
jeer has quit [Ping timeout: 268 seconds]
jxie has joined #ruby-lang
jeer has joined #ruby-lang
bastilian has joined #ruby-lang
h_kon has joined #ruby-lang
arBmind has joined #ruby-lang
bzb has joined #ruby-lang
mistym has quit [Remote host closed the connection]
bzb has quit [Read error: Connection reset by peer]
mucker has joined #ruby-lang
benlovell has joined #ruby-lang
benlovell has quit [Ping timeout: 240 seconds]
hogeo has joined #ruby-lang
stevepsharpe has joined #ruby-lang
Elico has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby-lang
io_syl has quit []
relix has joined #ruby-lang
ledestin has joined #ruby-lang
m6n has quit [Ping timeout: 240 seconds]
pcwormald has joined #ruby-lang
pcwormald has left #ruby-lang [#ruby-lang]
vlad_starkov has quit [Ping timeout: 245 seconds]
tbuehlmann has joined #ruby-lang
pcw888 has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
ssb123 has quit [Remote host closed the connection]
ssb123 has joined #ruby-lang
benlovell has joined #ruby-lang
simoz has joined #ruby-lang
jbsan has quit [Quit: jbsan]
apeiros has joined #ruby-lang
hakunin has quit [Ping timeout: 272 seconds]
ssb123 has quit [Ping timeout: 245 seconds]
pcw888 has left #ruby-lang [#ruby-lang]
hakunin has joined #ruby-lang
fuhgeddaboudit has quit [Ping timeout: 240 seconds]
mdedetrich has joined #ruby-lang
knu has quit [Ping timeout: 272 seconds]
arBmind has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
julweber has quit [Write error: Broken pipe]
julweber has joined #ruby-lang
arBmind has quit [Client Quit]
Coincidental has quit [Ping timeout: 244 seconds]
julweber has quit [Ping timeout: 245 seconds]
workmad3 has joined #ruby-lang
Elico has joined #ruby-lang
fuhgeddaboudit has joined #ruby-lang
JoshuaPaling has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jsullivandigs has joined #ruby-lang
canton7 has joined #ruby-lang
adambeynon has joined #ruby-lang
elia has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 245 seconds]
rue_XIW has quit [Remote host closed the connection]
rue|w has joined #ruby-lang
ssb123 has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
mdedetrich has quit [Read error: Connection reset by peer]
schaerli has joined #ruby-lang
<yorickpeterse> morning
Authenticator has quit [Ping timeout: 272 seconds]
elia has quit [Ping timeout: 245 seconds]
schaerli has quit [Ping timeout: 272 seconds]
elia has joined #ruby-lang
ssb123 has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby-lang
mucker has quit [Remote host closed the connection]
mucker has joined #ruby-lang
kek has joined #ruby-lang
dagobah has joined #ruby-lang
julweber has joined #ruby-lang
mucker has quit [Ping timeout: 245 seconds]
julweber has quit [Remote host closed the connection]
julweber has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
Cumol has joined #ruby-lang
flip_digits has joined #ruby-lang
schaerli has joined #ruby-lang
flip_digits has quit [Ping timeout: 272 seconds]
mannyt has quit [Quit: mannyt]
cnivolle has joined #ruby-lang
kitak has quit [Remote host closed the connection]
zz_michael_mbp is now known as michael_mbp
martndem1s has joined #ruby-lang
jbsan has joined #ruby-lang
martndemus has quit [Read error: Connection reset by peer]
Elico has quit [Ping timeout: 272 seconds]
jithu has quit [Read error: Connection reset by peer]
jithu has joined #ruby-lang
kohgpat has quit [Quit: leaving]
Kabaka has quit [Ping timeout: 240 seconds]
jeer has quit [Ping timeout: 272 seconds]
Elico has joined #ruby-lang
nofxx has quit [Ping timeout: 240 seconds]
jeer has joined #ruby-lang
Cumol has quit [Quit: Textual IRC Client: www.textualapp.com]
Kabaka has joined #ruby-lang
kek has quit [Remote host closed the connection]
kek has joined #ruby-lang
jbsan has quit [Quit: jbsan]
Cumol has joined #ruby-lang
kek_ has joined #ruby-lang
kek has quit [Read error: Connection reset by peer]
sepp2k has joined #ruby-lang
francisfish has joined #ruby-lang
francisfish has quit [Read error: No route to host]
francisfish has joined #ruby-lang
mucker has joined #ruby-lang
Cumol has quit [Quit: Textual IRC Client: www.textualapp.com]
JoshuaPaling has joined #ruby-lang
simoz has quit [Ping timeout: 260 seconds]
kitak has joined #ruby-lang
mimi has joined #ruby-lang
h_kon has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 245 seconds]
h_kon has joined #ruby-lang
martndem1s has quit [Quit: Lost terminal]
kek has joined #ruby-lang
h_kon has quit [Ping timeout: 246 seconds]
mimi has quit [Ping timeout: 272 seconds]
h_kon has joined #ruby-lang
kek_ has quit [Ping timeout: 272 seconds]
stamina has joined #ruby-lang
Elico has quit [Ping timeout: 272 seconds]
CoreData1 has quit [Ping timeout: 245 seconds]
tbuehlmann has quit [Ping timeout: 264 seconds]
knu has joined #ruby-lang
simoz has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kitak has quit [Read error: Connection reset by peer]
jsullivandigs has joined #ruby-lang
kitak has joined #ruby-lang
relix has joined #ruby-lang
ninjago has joined #ruby-lang
sr78ger has joined #ruby-lang
banisterfiend has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 272 seconds]
tbuehlmann has joined #ruby-lang
ninjago has quit [Ping timeout: 246 seconds]
kek has quit [Remote host closed the connection]
enmand has joined #ruby-lang
enmand has quit [Ping timeout: 246 seconds]
kek has joined #ruby-lang
simoz has quit [Ping timeout: 246 seconds]
mdedetrich has joined #ruby-lang
kek has quit [Remote host closed the connection]
hogeo has quit [Remote host closed the connection]
mdedetrich has quit [Client Quit]
hogeo has joined #ruby-lang
melter_ has quit [Ping timeout: 260 seconds]
hogeo has quit [Ping timeout: 246 seconds]
melter_ has joined #ruby-lang
barttenbrinke has quit [Remote host closed the connection]
barttenbrinke has joined #ruby-lang
barttenbrinke has quit [Ping timeout: 253 seconds]
Domon has quit [Remote host closed the connection]
sascha_d has quit [Quit: obai]
ninjago has joined #ruby-lang
yfeldblum has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
soba has quit [Ping timeout: 245 seconds]
mucker has quit [Remote host closed the connection]
mucker has joined #ruby-lang
relix has joined #ruby-lang
ninjago has quit [Ping timeout: 272 seconds]
mucker has quit [Ping timeout: 245 seconds]
barttenbrinke has joined #ruby-lang
Authenticator has joined #ruby-lang
imperator has joined #ruby-lang
heftig has quit [Quit: Quitting]
barttenbrinke has quit [Ping timeout: 268 seconds]
mdedetrich has joined #ruby-lang
kith has quit [Quit: kith]
arBmind has joined #ruby-lang
ldnunes has joined #ruby-lang
kith has joined #ruby-lang
kith has quit [Client Quit]
kith has joined #ruby-lang
io_syl has joined #ruby-lang
io_syl has quit [Client Quit]
francisfish has quit [Remote host closed the connection]
mdedetrich has quit [Quit: Computer has gone to sleep.]
francisfish has joined #ruby-lang
postmodern has quit [Quit: Leaving]
nisstyre has quit [Quit: Leaving]
francisfish has quit [Ping timeout: 245 seconds]
kek has joined #ruby-lang
io_syl has joined #ruby-lang
enmand has joined #ruby-lang
enmand has quit [Max SendQ exceeded]
JoshuaPaling has quit [Quit: Textual IRC Client: www.textualapp.com]
io_syl has quit [Client Quit]
<ddfreyne> mornin yorickpeterse
<ljarvis> hi
<ddfreyne> sup ell-jay
<ljarvis> ohi ddfreyne
h_kon has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
michael_mbp is now known as zz_michael_mbp
zz_michael_mbp is now known as michael_mbp
barttenbrinke has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 272 seconds]
sjltaylo_ has joined #ruby-lang
<yorickpeterse> ddfreyne: you're late slacker
cored has joined #ruby-lang
ninjago has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
ninjago has quit [Ping timeout: 272 seconds]
cnivolle has quit [Remote host closed the connection]
cnivolle has joined #ruby-lang
enmand has joined #ruby-lang
slyphon has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 272 seconds]
kitak_ has joined #ruby-lang
kitak has quit [Read error: Connection reset by peer]
heftig has joined #ruby-lang
jvrmaia has joined #ruby-lang
mucker has joined #ruby-lang
tomzx_mac has joined #ruby-lang
ruby-lang860 has joined #ruby-lang
barttenbrinke has quit [Remote host closed the connection]
barttenbrinke has joined #ruby-lang
benlovell has quit [Ping timeout: 268 seconds]
ruby-lang860 has quit [Client Quit]
ruby-lang985 has joined #ruby-lang
stamina has quit [Read error: Connection reset by peer]
ruby-lang985 has quit [Client Quit]
flip_digits has joined #ruby-lang
stardiviner has quit [Ping timeout: 245 seconds]
cnivolle_ has joined #ruby-lang
barttenbrinke has quit [Ping timeout: 245 seconds]
breakingthings has joined #ruby-lang
flip_digits has quit [Remote host closed the connection]
flip_digits has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
cnivolle has quit [Ping timeout: 245 seconds]
jxie has quit [Quit: leaving]
malev has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
MaddinXx_ has joined #ruby-lang
schaerli has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Ping timeout: 272 seconds]
kgrz has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 246 seconds]
barttenbrinke has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
kitak_ has quit [Ping timeout: 246 seconds]
hogeo has joined #ruby-lang
arBmind has joined #ruby-lang
kitak has joined #ruby-lang
superdealloc has joined #ruby-lang
ledestin has quit [Quit: ledestin]
benlovell has joined #ruby-lang
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
iraja has joined #ruby-lang
sjltaylo_ has quit [Quit: Textual IRC Client: www.textualapp.com]
slyphon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nathanstitt has joined #ruby-lang
nathanstitt has quit [Client Quit]
kurko_ has joined #ruby-lang
kek has quit [Remote host closed the connection]
kek has joined #ruby-lang
Grimscribe has joined #ruby-lang
enmand has quit [Ping timeout: 272 seconds]
pcw888 has joined #ruby-lang
kek has quit [Ping timeout: 245 seconds]
enmand has joined #ruby-lang
mannyt has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 268 seconds]
arBmind has quit [Quit: Leaving.]
Mon_Ouie has joined #ruby-lang
slyphon has joined #ruby-lang
mannyt has quit [Quit: mannyt]
yfeldblum has joined #ruby-lang
kek has joined #ruby-lang
barttenbrinke has quit [Remote host closed the connection]
mmorga has joined #ruby-lang
majjoha has quit [Read error: Connection reset by peer]
barttenbrinke has joined #ruby-lang
francisfish has joined #ruby-lang
r0bby_ has quit [Ping timeout: 240 seconds]
mmorga has quit [Read error: Connection reset by peer]
mmorga has joined #ruby-lang
benlovell has quit [Ping timeout: 272 seconds]
kitak has quit [Remote host closed the connection]
kitak has joined #ruby-lang
barttenbrinke has quit [Ping timeout: 272 seconds]
majjoha has joined #ruby-lang
kitak has quit [Ping timeout: 246 seconds]
Lench has joined #ruby-lang
<Lench> hello
kurko_ has quit [Ping timeout: 272 seconds]
melter_ is now known as melter
kurko_ has joined #ruby-lang
<Lench> i read a line of a textfile, the line looks kinda like this: "123 bla blabla 567" its seperated with tabstops. my question is: how do i get each word in that line with regex? is it wise to use something like .gsub(/\t/, ' ') ?
<Lench> *can i safely work with \t?
majjoha has quit [Read error: Connection reset by peer]
majjoha has joined #ruby-lang
JohnBat26 has joined #ruby-lang
benlovell has joined #ruby-lang
vondruch has quit [Quit: Ex-Chat]
slyphon has quit [Ping timeout: 272 seconds]
<Lench> there are a lot of tabstops (like 25) in a line, my current regex does not look very efficient ._.
hogeo has quit [Remote host closed the connection]
slyphon has joined #ruby-lang
hogeo has joined #ruby-lang
kgrz has joined #ruby-lang
h_kon has joined #ruby-lang
h_kon has quit [Remote host closed the connection]
hogeo has quit [Ping timeout: 268 seconds]
Mon_Ouie has quit [Ping timeout: 260 seconds]
ecnalyr has joined #ruby-lang
jsullivandigs has joined #ruby-lang
<bougyman> Lench: .split works
michael_mbp is now known as zz_michael_mbp
pcw888 has quit [Ping timeout: 240 seconds]
enebo has joined #ruby-lang
bean__ has joined #ruby-lang
tdm00 has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 272 seconds]
tdm00 has quit [Client Quit]
[spoiler] has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
barttenbrinke has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
xdccmule has joined #ruby-lang
sr78ger has quit [Ping timeout: 246 seconds]
CoreData has joined #ruby-lang
Grimscribe has quit [Quit: Grimscribe]
pcw888 has joined #ruby-lang
barttenbrinke has quit [Remote host closed the connection]
barttenbrinke has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 272 seconds]
tkuchiki has quit [Ping timeout: 245 seconds]
Mon_Ouie has joined #ruby-lang
majjoha has quit [Read error: Connection reset by peer]
jperry has joined #ruby-lang
Guest60861 has joined #ruby-lang
ninjago has joined #ruby-lang
slyphon has quit [Ping timeout: 268 seconds]
kedibasi has joined #ruby-lang
xdccmule has quit []
heftig has quit [Ping timeout: 268 seconds]
guest_______ has joined #ruby-lang
havenwood has joined #ruby-lang
majjoha has joined #ruby-lang
hrs has joined #ruby-lang
MaddinXx_ has quit [Remote host closed the connection]
arBmind has joined #ruby-lang
julweber has quit [Write error: Connection reset by peer]
julweber has joined #ruby-lang
ssb123 has joined #ruby-lang
<Lench> bougyman: thank you!
VTLob has joined #ruby-lang
hackndoes has joined #ruby-lang
hackndoes is now known as Guest88247
kitak has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
Grimscribe has joined #ruby-lang
havenwood has joined #ruby-lang
<Guest60861> Does anyone know anything about Curses and command prompt?
Elico has joined #ruby-lang
lfox has joined #ruby-lang
<darix> Lench: CSV module might also be an option
<Lench> darix: I played with CSV already, but since I already use rubyXL in another script, I tend to keep using that one
<Lench> *a bit
<Lench> (dunno if rubyXL is known, but it does what it should)
tomzx_mac has quit [Ping timeout: 246 seconds]
Mon_Ouie has quit [Ping timeout: 260 seconds]
jiuweigui has joined #ruby-lang
heftig has joined #ruby-lang
jeff_r has joined #ruby-lang
nathanstitt has joined #ruby-lang
mannyt has joined #ruby-lang
JasonC_ has joined #ruby-lang
hrs has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
slyphon has joined #ruby-lang
<darix> Lench: so if rubyXL handles CSV style files ... why not use that instead of split?;)
lfox has quit [Ping timeout: 245 seconds]
slyphon has quit [Client Quit]
lfox has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
slyphon has joined #ruby-lang
<Lench> darix: oh, it's because I need xls files and it would not make much sense to create a csv from the textfile and then convert it into a xls imo
<Lench> ^ it handles xls files, i shouldve mentioned that
hrs has joined #ruby-lang
<Guest60861> Nobody know anything about Curses?
<Guest60861> dr.brain: Are you available?
francisfish has quit [Remote host closed the connection]
francisfish has joined #ruby-lang
cnivolle_ has quit [Remote host closed the connection]
vmoravec has quit [Quit: Leaving]
cnivolle has joined #ruby-lang
<ddfreyne> Guest60861: Curses has a very C-like API, so you should check out the C manual (including man pages)
<Guest60861> ddfreyne: I have actually been reading that :)
arBmind has quit [Quit: Leaving.]
<Guest60861> I'm getting a really strange error though.
<ddfreyne> Guest60861: If you have a question, ask it
<Guest60861> Basically, if a window is larger than 89 columns, it crashes with a "window already closed error"
<Guest60861> But only when using Command Prompt with Ruby on Rails, which is installed by this: http://rubyinstaller.org/
francisfish has quit [Ping timeout: 246 seconds]
JohnBat26 has quit [Ping timeout: 260 seconds]
apeiros has quit [Remote host closed the connection]
<Guest60861> I think it's because, for some reason, the window (the actual program's window) of Command Prompt with Ruby on Rails doesn't widen any more than 89 columns
<Guest60861> really weird, it just doesn't.
<Guest60861> ddfreyne: Do you have any idea for a workaround?
cnivolle has quit [Ping timeout: 245 seconds]
<Guest60861> ddfreyne: Maybe something involving Pads
<Guest60861> or
francisfish has joined #ruby-lang
<Guest60861> at least testing to see if it's in this command prompt so it can tell the user to use a different program/
<Guest60861> ?
r0bgleeson has joined #ruby-lang
momomomomo has joined #ruby-lang
arBmind has joined #ruby-lang
madb055 has joined #ruby-lang
barttenbrinke has quit [Remote host closed the connection]
barttenbrinke has joined #ruby-lang
slyphon has quit [Ping timeout: 272 seconds]
arBmind has quit [Ping timeout: 272 seconds]
Lench has quit [Quit: Page closed]
guest_______ has quit [Ping timeout: 250 seconds]
barttenbrinke has quit [Ping timeout: 272 seconds]
dhruvasagar has joined #ruby-lang
barttenbrinke has joined #ruby-lang
kek has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
kek has joined #ruby-lang
micalexander has quit [Remote host closed the connection]
alexju has joined #ruby-lang
micalexander has joined #ruby-lang
zz_michael_mbp is now known as michael_mbp
micalexander has quit [Read error: Connection reset by peer]
mmorga has quit [Remote host closed the connection]
mistym has joined #ruby-lang
foucist has joined #ruby-lang
<foucist> is there a shortcut for: h.reject{|k,v| k==:sku}
Grimscribe has quit [Quit: Grimscribe]
kek has quit [Ping timeout: 272 seconds]
mmorga has joined #ruby-lang
tubbo has joined #ruby-lang
<foucist> .except(:sku) in rails, yay
<ddfreyne> foucist: Hash#delete(key) but that is mutable
jithu has quit [Quit: Mother, did it need to be so high?]
<ddfreyne> foucist: so if you don't want to mutate, you'd probably have to clone + delete(key)
<whitequark> .dup
cnivolle has joined #ruby-lang
<ddfreyne> dup clone, meh ;)
bean__ is now known as julian-delphiki
<foucist> i suppose h.tap {|x| x.delete(:name) } works too (i don't care about mutating, just the return)
sr78ger has joined #ruby-lang
<workmad3> ddfreyne: it would matter if things were frozen ;)
Grimscribe has joined #ruby-lang
<ddfreyne> workmad3: Ahh, now I know the difference between dup and clone. Never needed it!
barttenbrinke has quit [Remote host closed the connection]
barttenbrinke has joined #ruby-lang
tkuchiki has joined #ruby-lang
barttenbrinke has quit [Ping timeout: 272 seconds]
sascha_d has joined #ruby-lang
rippa has joined #ruby-lang
<banisterfiend> ddfreyne clone also copies the singleton class
barttenbrinke has joined #ruby-lang
<Guest60861> Right
<Guest60861> Right
<Guest60861> hello
<Guest60861> asdf
TheMoonMaster has quit [Excess Flood]
<Guest60861> ;asdfk
<Guest60861> ghghj
<banisterfiend> Guest60861 shh
arBmind has joined #ruby-lang
<Guest60861> kk
TheMoonMaster has joined #ruby-lang
<Guest60861> bla
<Guest60861> asdasd
<Guest60861> ll
<Guest60861> ]lll
<ddfreyne> Guest60861: please don't spam
francisfish has quit [Remote host closed the connection]
<TTilus> cat on kbd
CoreData has quit [Ping timeout: 245 seconds]
Guest60861 has left #ruby-lang [#ruby-lang]
francisfish has joined #ruby-lang
Guest60861 has joined #ruby-lang
<Guest60861> Hello
<Guest60861> Does anyone know
<Guest60861> how I can resize a Command Prompt window with Ruby?
sepp2k has quit [Quit: Konversation terminated!]
julian-delphiki has quit [Quit: Textual IRC Client: www.textualapp.com]
solars has quit [Ping timeout: 272 seconds]
kitak has quit [Remote host closed the connection]
arBmind has quit [Quit: Leaving.]
francisfish has quit [Ping timeout: 245 seconds]
kitak has joined #ruby-lang
superdealloc has quit [Quit: Leaving...]
bean__ has joined #ruby-lang
kitak has quit [Ping timeout: 246 seconds]
MaddinXx_ has joined #ruby-lang
<havenwood> Guest60861: def resize x, y; printf "\e[8;#{y};#{x}t" end
<havenwood> Guest60861: Check out XTerm control sequences: http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
jsullivandigs has joined #ruby-lang
<Guest60861> havenwood: Awesome! have a look at that
<Guest60861> *i'll
jxie has joined #ruby-lang
mmorga has quit [Remote host closed the connection]
jsullivandigs has quit [Ping timeout: 260 seconds]
sr78ger has quit [Ping timeout: 268 seconds]
hakunin has quit [Read error: Connection reset by peer]
CoreData has joined #ruby-lang
<Guest60861> havenwood: Ah I'm not sure it's working :(
hakunin has joined #ruby-lang
sr78ger has joined #ruby-lang
francisfish has joined #ruby-lang
julweber has quit [Remote host closed the connection]
shinnya has joined #ruby-lang
julweber has joined #ruby-lang
rr87 has joined #ruby-lang
alexju_ has joined #ruby-lang
<foucist> is there a shortcut for .split('.').first ? i.e. some kind of truncate or something
wyhaines has joined #ruby-lang
bean__ has quit [Read error: Connection reset by peer]
pglombardo has joined #ruby-lang
pcw888 has quit []
bean__ has joined #ruby-lang
julweber has quit [Ping timeout: 245 seconds]
alexju has quit [Ping timeout: 268 seconds]
bean__ has quit [Read error: Connection reset by peer]
banisterfiend has quit [Quit: Computer has gone to sleep.]
alexju_ has quit [Ping timeout: 258 seconds]
bean__ has joined #ruby-lang
stevepsharpe has quit [Quit: Linkinus - http://linkinus.com]
CoreData has quit [Ping timeout: 245 seconds]
bzalasky has joined #ruby-lang
<workmad3> foucist: .gsub(/(\..*)/, '')
pcw888 has joined #ruby-lang
francisfish has quit [Read error: Connection reset by peer]
stevepsharpe has joined #ruby-lang
francisfish has joined #ruby-lang
<FiXato> class String;def truncate(str='.');return self.split(str,2).first;end;end
<FiXato> if you want to monkeypatch :P
<FiXato> I wonder which approach is quicker; gsub or split
<FiXato> could benchmark; but I'm lazy :)
mistym has quit [Remote host closed the connection]
<foucist> heh
jsullivandigs has joined #ruby-lang
wallerdev has joined #ruby-lang
tbuehlmann has quit [Quit: Konversation terminated!]
mmorga has joined #ruby-lang
mannyt has quit [Ping timeout: 245 seconds]
alekst has joined #ruby-lang
rue has quit [Remote host closed the connection]
rue has joined #ruby-lang
rue_XIV has joined #ruby-lang
heftig has quit [Quit: Quitting]
<vbatts|work> FiXato: user system total real
<vbatts|work> split 0.130000 0.000000 0.130000 ( 0.132833)
<vbatts|work> gsub 0.460000 0.000000 0.460000 ( 0.459227)
<vbatts|work> that's with split('.',2).first
rue has quit [Ping timeout: 268 seconds]
sepp2k has joined #ruby-lang
<FiXato> thanks :) So the split approach would be quicker? :)
mannyt has joined #ruby-lang
<vbatts|work> if you just do split('.').first it's twice as much time, but still cheaper than gsub
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
banisterfiend has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
francisfish has joined #ruby-lang
francisfish has quit [Read error: No route to host]
francisfish has joined #ruby-lang
mistym has joined #ruby-lang
bzalasky_ has joined #ruby-lang
bzalasky has quit [Ping timeout: 272 seconds]
schaerli has joined #ruby-lang
jithu has joined #ruby-lang
<Guest60861> hi all
<Guest60861> if you could look at Lưu Vĩnh Phúc's answer
<Guest60861> can Ruby access Window's APIs and do this?
schaerli has quit [Read error: No route to host]
schaerli has joined #ruby-lang
__butch__ has joined #ruby-lang
<mistym> Guest60861: You can access the Windows API using something like ffi - https://github.com/ffi/ffi
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mistym> Guest60861: The ffi wiki includes some Windows examples - https://github.com/ffi/ffi/wiki/Windows-Examples
<Guest60861> Thank's mistym :)
bzalasky_ has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
pcw888 has quit []
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
bzalasky has quit [Ping timeout: 272 seconds]
dagobah has quit [Remote host closed the connection]
rr87 has quit [Ping timeout: 272 seconds]
rr87 has joined #ruby-lang
sevvie has joined #ruby-lang
diegoviola has joined #ruby-lang
tkuchiki has quit [Ping timeout: 272 seconds]
micalexander has joined #ruby-lang
kireevco has quit [Remote host closed the connection]
tubbo has quit [Ping timeout: 272 seconds]
kitak has joined #ruby-lang
benlovell has quit [Ping timeout: 246 seconds]
alexju has joined #ruby-lang
kitak has quit [Ping timeout: 246 seconds]
elia has quit [Ping timeout: 268 seconds]
banisterfiend has quit [Quit: Computer has gone to sleep.]
madb055 has quit [Read error: No route to host]
madb055 has joined #ruby-lang
lfox has quit [Quit: ZZZzzz…]
apeiros has joined #ruby-lang
michael_mbp is now known as zz_michael_mbp
vlad_starkov has joined #ruby-lang
<Guest60861> imperator: That seems like a really good link
<Guest60861> fifi does seem a bit overkill, but an option
<Guest60861> imperator: Sorry for noobishness...but that's C++, how would I do the same with Ruby?
D9_ has joined #ruby-lang
Grimscribe has quit [Quit: Grimscribe]
Guest88247 has quit [Read error: Connection reset by peer]
havenwood has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
hrs has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
schaerli has joined #ruby-lang
havenwood has joined #ruby-lang
<workmad3> Guest60861: you use something like FFI to write a wrapper around the bits you need in C
<workmad3> Guest60861: and that exposes the API calls to ruby
rikai_ has quit [Remote host closed the connection]
Grimscribe has joined #ruby-lang
barttenbrinke has quit [Remote host closed the connection]
mmorga has quit [Remote host closed the connection]
barttenbrinke has joined #ruby-lang
<imperator> Guest60861, that's C, not C++
<Guest60861> ah
havenwood has quit [Ping timeout: 246 seconds]
schaerli has quit [Ping timeout: 272 seconds]
<Guest60861> Bit out of my depth here..
<Guest60861> all I want to do is resize the command prompt window
enmand has joined #ruby-lang
danrabinowitz has left #ruby-lang ["Textual IRC Client: www.textualapp.com"]
<imperator> there's a win32console library that may do what you want
tubbo has joined #ruby-lang
workmad3 is now known as tubbot
<Guest60861> I'm creating a custom rake task, and I don't really want any dependencies
tubbot is now known as workmad3
<Guest60861> so is win32console a ruby standard library? :)
<imperator> then you'll have to use Win32API and wrap the functions yourself
<imperator> no, it's not
barttenbrinke has quit [Read error: Connection reset by peer]
barttenbrinke has joined #ruby-lang
<Guest60861> imperator: Wrap the functions?
<imperator> oh, apparently win32console is deprecated in favor of https://github.com/adoxa/ansicon
<Guest60861> imperator: Is it possible to run a command line command from a ruby application?
<Guest60861> because all I need to run is: mode con:cols=120 lines=40
Mon_Ouie has joined #ruby-lang
workmad3 has quit [Ping timeout: 268 seconds]
kireevco has joined #ruby-lang
charliesome has joined #ruby-lang
<imperator> system("your command")
MrZYX|off is now known as MrZYX
<Guest60861> can't really find a ffi example to resize console window..
tubbo has quit [Ping timeout: 272 seconds]
<Guest60861> imperator: Thanks for the help..but that doesn't work
<Guest60861> system("mode con:cols=920 lines=40")
<Guest60861> Am I doing it right? :)
havenwood has joined #ruby-lang
<Guest60861> oh wow
<Guest60861> it works now
<Guest60861> not sure what I was doing wrong
kireevco has quit [Read error: Connection reset by peer]
heftig has joined #ruby-lang
<Guest60861> but thankyou very very very much for your altruism :)
bean__ has quit [Quit: Computer has gone to sleep.]
guest132435 has joined #ruby-lang
<Guest60861> I will try and give my knowledge back to the community once I've been de-noobified x)
guest132435 has quit [Client Quit]
brianpWins has joined #ruby-lang
guest132435 has joined #ruby-lang
kek has joined #ruby-lang
Gacha has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
<imperator> yw
Coincidental has joined #ruby-lang
ecnalyr has quit [Ping timeout: 245 seconds]
jeff_r has quit [Remote host closed the connection]
jeff_r has joined #ruby-lang
hrs has joined #ruby-lang
kireevco has joined #ruby-lang
hahuang61 has quit [Ping timeout: 272 seconds]
jeff_r has quit [Ping timeout: 245 seconds]
tubbo has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
bean__ has joined #ruby-lang
shinnya has quit [Ping timeout: 260 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nofxx has joined #ruby-lang
lfox has joined #ruby-lang
cnivolle has quit [Remote host closed the connection]
sevvie has quit [Read error: Connection reset by peer]
momomomomo has quit [Quit: momomomomo]
dhruvasagar has joined #ruby-lang
tubbo has quit [Quit: bounce wit me]
kitak has joined #ruby-lang
x0f has joined #ruby-lang
x0f_ has quit [Ping timeout: 240 seconds]
schaerli has joined #ruby-lang
kitak has quit [Remote host closed the connection]
saarinen has joined #ruby-lang
jeff_r has joined #ruby-lang
kitak has joined #ruby-lang
JohnBat26 has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
kek has quit [Remote host closed the connection]
kitak has quit [Ping timeout: 246 seconds]
mmorga has joined #ruby-lang
kek has joined #ruby-lang
arBmind has joined #ruby-lang
chendo has quit [Ping timeout: 256 seconds]
hahuang61 has joined #ruby-lang
rikai has joined #ruby-lang
cnivolle has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
ingof has joined #ruby-lang
ingof has quit [Remote host closed the connection]
ingof has joined #ruby-lang
D9_ has quit [Ping timeout: 272 seconds]
mmorga has quit [Remote host closed the connection]
whitehat101 has quit [Remote host closed the connection]
D9_ has joined #ruby-lang
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby-lang
billybob0001 has joined #ruby-lang
billybob0001 has left #ruby-lang [#ruby-lang]
enmand has joined #ruby-lang
slyphon has joined #ruby-lang
billybob000 has joined #ruby-lang
mmorga has joined #ruby-lang
<billybob000> is it considered bad practice to do rescue-type stuff inside a constructor?
<billybob000> i'm trying to instantiate another object inside the constructor, and need to rescue an exception
jithu has quit [Quit: Mother, did it need to be so high?]
nignaztic has quit [Quit: Leaving]
nazty has joined #ruby-lang
tylersmith has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
rexunyzarc has joined #ruby-lang
rexunyzarc has left #ruby-lang [#ruby-lang]
metus_violarium has joined #ruby-lang
pglombardo has quit [Remote host closed the connection]
Oloryn_lt2 has quit [Read error: Connection reset by peer]
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arBmind has quit [Quit: Leaving.]
havenwood has quit [Read error: Connection reset by peer]
havenn has joined #ruby-lang
MaddinXx_ has quit [Remote host closed the connection]
kedibasi has quit [Quit: Leaving]
D9_ has quit [Ping timeout: 272 seconds]
barttenbrinke has quit [Remote host closed the connection]
barttenbrinke has joined #ruby-lang
benlovell has joined #ruby-lang
barttenbrinke has quit [Ping timeout: 272 seconds]
benlovell has quit [Ping timeout: 246 seconds]
krzyzaq has joined #ruby-lang
<imperator> billybob000, depends, are you planning on re-raising it?
<imperator> swallowing errors is generally bad form
<imperator> makes debugging failures very difficult
enmand has joined #ruby-lang
relix has joined #ruby-lang
yfeldblum has quit [Ping timeout: 245 seconds]
majjoha has quit [Ping timeout: 272 seconds]
Oloryn_lt2 has joined #ruby-lang
Oloryn_lt2 has quit [Read error: Connection reset by peer]
banisterfiend has quit [Quit: Computer has gone to sleep.]
yfeldblum has joined #ruby-lang
kek has quit [Remote host closed the connection]
kek has joined #ruby-lang
tubbo` has joined #ruby-lang
tubbo` is now known as tubbo
kitak has joined #ruby-lang
CoreData has joined #ruby-lang
ecnalyr has joined #ruby-lang
supergeek has joined #ruby-lang
supergeek has quit [Read error: Connection reset by peer]
kek has quit [Ping timeout: 272 seconds]
kek has joined #ruby-lang
CoreData has quit [Read error: Connection reset by peer]
kitak has quit [Ping timeout: 246 seconds]
bastilian has quit [Quit: Leaving...]
kek has quit [Remote host closed the connection]
kek has joined #ruby-lang
kek_ has joined #ruby-lang
kek has quit [Read error: Connection reset by peer]
micalexander has quit [Remote host closed the connection]
kek_ has quit [Remote host closed the connection]
mmorga has quit [Remote host closed the connection]
micalexander has joined #ruby-lang
kek has joined #ruby-lang
MartynKeigher has quit [Quit: http://www.martynkeigher.com]
kek_ has joined #ruby-lang
kek has quit [Read error: Connection reset by peer]
kek_ has quit [Remote host closed the connection]
kek has joined #ruby-lang
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rr87 has quit [Remote host closed the connection]
sr78ger has quit [Quit: Textual IRC Client: www.textualapp.com]
mmorga has joined #ruby-lang
elia has joined #ruby-lang
MartynKeigher has joined #ruby-lang
enmand has joined #ruby-lang
mannyt has quit [Ping timeout: 245 seconds]
kek has quit [Ping timeout: 272 seconds]
tubbo has quit [Quit: WeeChat 0.4.2-rc2]
majjoha has joined #ruby-lang
torrieri has joined #ruby-lang
tubbo` has joined #ruby-lang
<tubbo`> test
tubbo` is now known as tubbo
<tubbo> there we go :)
majjoha has quit [Ping timeout: 272 seconds]
momomomomo has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
pglombardo has joined #ruby-lang
duard has joined #ruby-lang
[spoiler] has quit [Quit: Leaving]
mbj has joined #ruby-lang
Gacha has quit [Read error: No route to host]
banisterfiend has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
julweber has joined #ruby-lang
schaerli has joined #ruby-lang
enmand has joined #ruby-lang
foucist has quit [Quit: leaving]
mbj has quit [Ping timeout: 252 seconds]
schaerli has quit [Read error: Connection reset by peer]
schaerli has joined #ruby-lang
mistym has quit [Quit: Leaving]
<Guest60861> Heloo
<Guest60861> is there a way for a Ruby application to detect if it's running in Command Prompt or Terminal?
<Guest60861> not critical but I'd like to know
<Guest60861> Ruby 2.0.0
majjoha has joined #ruby-lang
duardbr has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
rikai_ has joined #ruby-lang
duard has quit [Ping timeout: 272 seconds]
<Kero> Guest60861: s/thing like $stdout.isatty
jerrytgarcia has quit [Quit: WeeChat 0.4.1]
rikai has quit [Ping timeout: 272 seconds]
mistym has joined #ruby-lang
<Guest60861> Kero: Don't quite follow. The dollar sign?
<Guest60861> Is that something to run in the terminal from ruby
<Kero> it's Ruby cod, the global variable called 'stdout'
<Kero> and a 'tty' is unixy for a terminal. May not work on non-unixy OS's.
yfeldblum has quit [Ping timeout: 268 seconds]
kurko_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
pglombardo has left #ruby-lang [#ruby-lang]
<Kero> what would you do when you know the program is running from a prompt or terminal?
pglombardo has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<Guest60861> Kero: I'm creating a command like GUI. Works well in unixy OS', completely mauled in Command Prompt because Command Prompt window is a set size
<Guest60861> I can programatically increase Command Prompt window size use Ruby's system() method
<Guest60861> but I only want to utilise such a method when the program is indeed running in Command Prompt
<drbrain> Guest60861: like highline or like curses? (and why aren't you using either)?
<Guest60861> I'm using curses
<Guest60861> Command Prompt mangles curses
julweber has quit [Remote host closed the connection]
<Guest60861> actually, it crashes if a curses window is larger than the commant prompt window (already closed window error--very odd)
<Guest60861> anyway, I've got around it
<Guest60861> but I just want to implement my work around when command prompt is being utilised
julweber has joined #ruby-lang
<drbrain> probably need to check your parent process name
julweber has quit [Read error: Connection reset by peer]
julweber has joined #ruby-lang
<Kero> can't you check the window size, rpogrammatically? refrain from opening a too-large-curses window?
<joevandyk> drbrain: i'm running into http://bugs.ruby-lang.org/issues/8182 (exact same problem, communicating with mailchimp fails after moving to 2.0). Should I patch my Ruby? Or do something else?
<Guest60861> Kero: Sometimes the GUI needs to be a certain size
julweber has quit [Remote host closed the connection]
<Guest60861> it's fine, everything's working wonderfully, I was just wondering if it could be a little better...
<drbrain> joevandyk: I guess you'll need to patch your ruby
<Guest60861> then again, if it ain't broke don't fix it
julweber has joined #ruby-lang
<Guest60861> drbrain: How could I check my parent process?
<drbrain> on *NIX, use ps. I don't know about windows
<Guest60861> don't blame you :)
ingof has quit [Remote host closed the connection]
jerrytgarcia has joined #ruby-lang
<drbrain> Guest60861: maybe https://rubygems.org/gems/sys-proctable
chendo has joined #ruby-lang
<Kero> not saying you need to shrink your GUI, plenty of other options (helpful msg to user)
arBmind has joined #ruby-lang
<Kero> does Process.ppid not work?
majjoha has quit [Ping timeout: 245 seconds]
<Kero> mm, that'd give you the shell, not the window...
<drbrain> Kero: you'd still need the name
mmorga has quit [Read error: Connection reset by peer]
mmorga has joined #ruby-lang
<joevandyk> drbrain: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/56431 -- seemed to say the fix wasn't needed for 2.0?
<drbrain> is there's another method in stdlib that provides that?
<drbrain> joevandyk: it says: 2.0.0: REQUIRED
<drbrain> so it's needed for 2.0
<joevandyk> ha
<joevandyk> i can't read
<joevandyk> so the fix is in 2.0, I just need to run the stable release?
julweber has quit [Ping timeout: 245 seconds]
<joevandyk> looks like it
majjoha has joined #ruby-lang
<drbrain> joevandyk: you'd have to check the branch to see if it's been committed and released
priodev has quit [Ping timeout: 240 seconds]
* Kero realizes there is something named "Command Prompt", rather than something just being a command prompt.
<Kero> not aware of a stdlib call to get the name
priodev has joined #ruby-lang
krzyzaq has quit [Quit: This computer has gone to sleep]
jvrmaia has quit [Quit: Leaving]
MaddinXx has joined #ruby-lang
majjoha has quit [Ping timeout: 272 seconds]
torrieri has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 245 seconds]
<mistym> Having a little trouble calling a C function via FFI.
<mistym> Its C definition in the header: gme_err_t gme_open_file( const char path [], Music_Emu** out, int sample_rate );
<mistym> I've wrapped it like so: attach_function :gme_open_file, [ :string, :pointer, :int ], :gme_err_t
<mistym> Then called it via gme_open_file('path', emu.get_pointer(0), 0)
<mistym> Doesn't seem to be working - didn't segfault, but is failing due to an assert in the function body. When I called it in a simple C test program, I didn't run into the same issue: https://gist.github.com/mistydemeo/f6e0c6e716b3e8a57939
<drbrain> mistym: how does the function fill in out?
<drbrain> mistym: might need ptr = emu.get_pointer(0); gme_open_file('path', ptr.to_ptr, 0)
<drbrain> my FFI knowledge is poor, so I might be wrong, but I don't think emu.pointer(0) is the same as &emu in the C example
<mistym> Maybe not, I'll check - thanks
<drbrain> I think the FFI side is just "emu"
<drbrain> … on the C side
<mistym> out is a C++ object being passed through C as an opaque struct. gme_open_file() sets *out = 0;, then instantiates a Music_Emu object at the pointer
<mistym> drbrain: Aha - I realized get_pointer(0) isn't doing what I thought it was
<mistym> It's returning a pointer with absolute(?) address 0, not a pointer to offset 0 of the FFI::MemoryPointer
<drbrain> ah
<drbrain> yeah
<drbrain> probably need ptr = FFI::MemoryPointer.new; gme_open_file('path', ptr.to_ptr, 0) ?
<mistym> There isn't a #to_ptr instance method on MemoryPointer, so wondering if FFI::Pointer.new(ptr) is the most concise way
<mistym> I'm finding it seriously weird that #get_pointer isn't doing what I thought it would, given that it doesn't seem to be relative to the instance at all
<mistym> Oh! Derrrp, I see why now
<mistym> #get_pointer is equivalent to #get_bytes - reading n pointers from the pointer, *not* convering ptr into a pointer
<mistym> Joy, now it's segfaulting on the next function call. This is progress at least.
<drbrain> :D
<drbrain> that's me every time I try to FFI something
<Guest60861> drbrain: Why isn't this curses window colored red?
schaerli has quit [Remote host closed the connection]
<Guest60861> The "I'm in red. Press any ket to see a red box" text is in red
<Guest60861> but then the window is just white + black
schaerli has joined #ruby-lang
MartynKeigher has quit [Ping timeout: 264 seconds]
<Guest60861> Thankyou
<drbrain> Guest60861: you have lots of extra indentation here
bean__ has quit [Quit: Computer has gone to sleep.]
<drbrain> Guest60861: also, if has_colors? == false => if not has_colors? => unless has_colors?
elia has joined #ruby-lang
<drbrain> Guest60861: http://pastebin.com/GbFVbBjU
<drbrain> Guest60861: each window has its own set of color
<drbrain> see line 35-38
<drbrain> Guest60861: if you want the window border to be colored too, put the win.box inside the attron block
<mistym> drbrain: OK, so given the next function: gme_err_t gme_start_track( Music_Emu*, int index ); wrapped as: attach_function :gme_start_track, [ :pointer, :int ], :gme_err_t
mannyt has joined #ruby-lang
schaerli has quit [Ping timeout: 265 seconds]
<mistym> drbrain: Can you think of why passing the FFI::MemoryPointer to gme_start_track() would cause it to segfault?
<Guest60861> drbrain: Isn't the win.box inside the attron block?
bean__ has joined #ruby-lang
<drbrain> Guest60861: for a different window
<drbrain> so it won't apply
<Guest60861> So I need a new set of attron and attroff for each window?
<drbrain> yes
<Guest60861> and it's not working because I have a string in there first?
<drbrain> Guest60861: you should use the block form, it'll be easier to remember
<drbrain> which is not working?
<drbrain> mistym: can you paste it?
<Guest60861> the coloring of win1 isn't working
<Guest60861> because it's coloring the string in first?
vlad_starkov has quit [Remote host closed the connection]
<drbrain> Guest60861: look at my paste
<Guest60861> right oh :)
<Guest60861> thankyou
yfeldblum has joined #ruby-lang
JohnBat26 has quit [Ping timeout: 245 seconds]
<drbrain> mistym: that looks right to me
<mistym> drbrain: That's what I thought too
<mistym> I did (what I think is) the equivalent in the C sample I showed you, which works fine
<drbrain> mistym: yeah
<drbrain> it's odd that the Pointer classes don't have method equivalents of * and & in C
Scader has quit [Ping timeout: 272 seconds]
bean__ has quit [Quit: Computer has gone to sleep.]
<mistym> drbrain: Yeah, this way of doing it is fairly awkward
superdealloc has joined #ruby-lang
benlovell has joined #ruby-lang
<drbrain> ah, ptr.address maybe?
diegoviola has quit [Quit: WeeChat 0.4.2]
<Guest60861> drbrain: Thanks a lot for your paste it works :). You know if I wanted to create a background color, would I create large 'parent window', apply a color attribute and fill it with spaces?
<Guest60861> would that be a good practise?
<Guest60861> just wondering
<drbrain> Guest60861: I think so
<Guest60861> kewl. I'll get stuck in
<drbrain> Guest60861: you should also be able to set the background color of the default window
io_syl has joined #ruby-lang
<drbrain> I think there's a different call than attron
<drbrain> ah, bkgd
superdealloc has quit [Ping timeout: 245 seconds]
<Guest60861> by default window you mean the 'invisible' master window that everything's inside? So addstr "hi" is actually appending to this master window?
<mistym> drbrain: #address returns an int
<drbrain> mistym: I wonder if that matters when you specify :pointer
<mistym> drbrain: Oh, the int value to FFI::Pointer is in fact the address
<mistym> That said, FFI::Pointer.new(ptr) and FFI::Pointer.new(ptr.address) are the same except the latter doesn't have a size attributre
<mistym> *attribute
<drbrain> instead of line 16 in player.rb, gme_open_file(file, @player.address, @frequency)
benlovell has quit [Ping timeout: 260 seconds]
<mistym> Oh, I see what you mean
banisterfiend has quit [Ping timeout: 272 seconds]
<mistym> drbrain: Nope, doesn't like taking an int for a :pointer
<drbrain> :(
majjoha has joined #ruby-lang
<drbrain> Guest60861: yes, but it's not really invisible :D
<Guest60861> that's true!
<drbrain> you can still call box, addstr, attron, etc.
<Guest60861> wow.. win1.bkgd(COLOR_RED) gives me a load of smiley faces!
<Guest60861> a background of smiley faces
a1ph4g33k has joined #ruby-lang
<drbrain> Guest60861: maybe bkgd is wrong
<Guest60861> no...it's from the docs
<drbrain> … I've never used it
<Guest60861> fair enough
<Guest60861> was not expecting a load of smilies
<Guest60861> madness
apeiros has quit [Remote host closed the connection]
MartynKeigher has joined #ruby-lang
apeiros has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
bean__ has joined #ruby-lang
majjoha has quit [Ping timeout: 252 seconds]
Coincidental has joined #ruby-lang
<mistym> drbrain: Thanks for your help, I'm pretty perplexed. Going to ask about this on the ffi mailing list
<drbrain> mistym: I really want to like FFI/Fiddle, but I always get myself confused and write C programs to figure out what I'm doing wrong
<drbrain> … so then I usually switch to C :/
<mistym> drbrain: :/
<mistym> drbrain: Makes sense :/
<drbrain> I think I spent two or three hours on that two function fiddle code I linked
<mistym> Heh, that makes me feel a little better
diegoviola has joined #ruby-lang
<Guest60861> drbrain: What does CH mean?
<Guest60861> as in bkgdset(ch)
mistym has quit [Remote host closed the connection]
<charliesome> Guest60861: character
<charliesome> i'd say
<Guest60861> what would a character be? :L
apeiros has quit [Ping timeout: 272 seconds]
<charliesome> 'x'
<Guest60861> wouldn't that be str for string or something?
Coincidental has quit [Ping timeout: 265 seconds]
<drbrain> since it's wrapping a C API, things get weird
ledestin has joined #ruby-lang
<charliesome> Guest60861: a character is different to a string
banisterfiend has joined #ruby-lang
<charliesome> in c, single quotes are for chars and double quotes are for strings
<Guest60861> meh
<Guest60861> oh, that's interesting
<Guest60861> BAH! I just can't get this background thing working..I'll just fill it with colored spaces and overwrite them
duardbr has quit [Ping timeout: 272 seconds]
duard has joined #ruby-lang
metus_violarium has quit [Quit: Konversation terminated!]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
MartynKeigher has quit [Quit: http://www.martynkeigher.com]
ledestin has quit [Quit: ledestin]
kitak has joined #ruby-lang
sevvie has joined #ruby-lang
mannyt has quit [Quit: mannyt]
mmorga has quit [Remote host closed the connection]
havenn is now known as havenwood
workmad3 has joined #ruby-lang
nigerianceo has joined #ruby-lang
<nigerianceo> this is terrible
<nigerianceo> whats faster way to iterate through 2d arrays?
majjoha has joined #ruby-lang
ingof has joined #ruby-lang
adambeynon has joined #ruby-lang
ldnunes has quit [Quit: Leaving]
slyphon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<matled> nigerianceo: are you looking for shorter code?
imperator has quit [Quit: Leaving]
krzyzaq has joined #ruby-lang
hrs has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
wyhaines has quit [Remote host closed the connection]
wyhaines has joined #ruby-lang
majjoha has quit [Ping timeout: 272 seconds]
hrs has joined #ruby-lang
kireevco_ has joined #ruby-lang
MrZYX is now known as MrZYX|off
wyhaines has quit [Ping timeout: 252 seconds]
duardbr has joined #ruby-lang
duard has quit [Ping timeout: 245 seconds]
ledestin has joined #ruby-lang
enmand has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MaddinXx has quit [Remote host closed the connection]
flip_digits has quit [Remote host closed the connection]
breakingthings has quit []
sevvie has quit [Quit: leaving]
solars has joined #ruby-lang
krzyzaq has quit [Quit: krzyzaq]
momomomomo has quit [Quit: momomomomo]
torrieri has quit [Quit: Leaving...]
mannyt has joined #ruby-lang
enmand has joined #ruby-lang
torrieri has joined #ruby-lang
krzyzaq has joined #ruby-lang
dus7 has joined #ruby-lang
kgrz has quit [Remote host closed the connection]
duardbr has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
dus7 has quit [Remote host closed the connection]
majjoha has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
mannyt has quit [Quit: mannyt]
kgrz has quit [Ping timeout: 265 seconds]
majjoha has quit [Ping timeout: 245 seconds]
slyphon has joined #ruby-lang
bean__ has quit [Quit: Computer has gone to sleep.]
pglombardo has quit [Remote host closed the connection]
nathanstitt has quit [Quit: I growing sleepy]
alexju has quit [Remote host closed the connection]
alexju has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
slyphon has quit [Ping timeout: 260 seconds]
a1ph4g33k has quit [Quit: Leaving]
CoreData has joined #ruby-lang
mistym has left #ruby-lang ["Leaving"]
mistym has joined #ruby-lang
julweber has joined #ruby-lang
slyphon has joined #ruby-lang
mannyt has joined #ruby-lang
torrieri has joined #ruby-lang
Nisstyre-laptop has quit [Ping timeout: 245 seconds]
iraja has quit [Remote host closed the connection]
JoshuaPaling has joined #ruby-lang
iraja has joined #ruby-lang
vlad_starkov has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kireevco_ has quit [Ping timeout: 272 seconds]
malev has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
iraja has quit [Ping timeout: 272 seconds]
krzyzaq has quit [Quit: krzyzaq]
GarethAdams has quit [Ping timeout: 252 seconds]
kgrz has joined #ruby-lang
Xzyx987X_ has quit [Read error: Connection reset by peer]
jeff_r has quit [Remote host closed the connection]
majjoha has joined #ruby-lang
jeff_r has joined #ruby-lang
Xzyx987X has joined #ruby-lang
kireevco_ has joined #ruby-lang
GarethAdams has joined #ruby-lang
Grimscribe has quit [Quit: Grimscribe]
nisstyre has joined #ruby-lang
majjoha has quit [Ping timeout: 272 seconds]
jeff_r has quit [Ping timeout: 272 seconds]
mdedetrich has joined #ruby-lang
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
kgrz has quit [Ping timeout: 265 seconds]
slyphon has quit [Read error: Connection reset by peer]
bf4 has quit [Ping timeout: 272 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hrs has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
io_syl has quit []
toretore has quit [Quit: Leaving]
enebo has quit [Quit: enebo]
Grimscribe has joined #ruby-lang
ingof has quit [Remote host closed the connection]
nisstyre has quit [Quit: Leaving]
benlovell has joined #ruby-lang
vlad_starkov has joined #ruby-lang
cads has quit [Ping timeout: 272 seconds]
benlovell has quit [Ping timeout: 272 seconds]
Coincidental has joined #ruby-lang
dus7 has joined #ruby-lang
majjoha has joined #ruby-lang
dus7 has quit [Remote host closed the connection]
atongen has joined #ruby-lang
kgrz has joined #ruby-lang
lfox has quit [Quit: ZZZzzz…]
torrieri has quit [Quit: Leaving...]
majjoha has quit [Ping timeout: 265 seconds]
vlad_starkov has quit [Ping timeout: 245 seconds]
enmand has quit [Ping timeout: 272 seconds]
kgrz has quit [Ping timeout: 252 seconds]
enmand has joined #ruby-lang
CoreData has quit [Ping timeout: 245 seconds]
slyphon has joined #ruby-lang
tomzx_mac has joined #ruby-lang
torrieri has joined #ruby-lang
sepp2k has quit [Ping timeout: 245 seconds]
sepp2k1 has joined #ruby-lang
workmad3 has quit [Ping timeout: 272 seconds]
jeff_r has joined #ruby-lang
Guest60861 has quit [Ping timeout: 268 seconds]
solars has quit [Ping timeout: 246 seconds]
majjoha has joined #ruby-lang
kitak has quit [Remote host closed the connection]
retro|cz has quit [Ping timeout: 265 seconds]
kireevco_ has quit [Read error: Connection reset by peer]
Grimscribe has quit [Ping timeout: 246 seconds]
majjoha has quit [Ping timeout: 272 seconds]
kireevco_ has joined #ruby-lang
ldnunes has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
macsplean has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
elia has quit [Read error: Connection reset by peer]
alexju has quit [Remote host closed the connection]
alexju has joined #ruby-lang
awkwords has joined #ruby-lang
retro|cz has joined #ruby-lang
atongen has quit [Quit: leaving]
<awkwords> hi so to find out methods avaiable to objects in IRB i do object.public_methods.sort.. is their anyway to setup something like an alias in IRB so i can do <object>.showmethods
fn_ has joined #ruby-lang
elia has joined #ruby-lang
<mistym> awkwords: Yep, just define a `show_methods` method on Object that returns public_methods.sort
andyhuynh has joined #ruby-lang
alexju has quit [Ping timeout: 272 seconds]
<awkwords> is their anyway to alias this when irb starts up so its in scope for all objects?
fn_ has quit [Remote host closed the connection]
<mistym> Put it in your ~/.irbrc, which will be executed when you start irb.
<mistym> All objects inherit from Object, so if you open the class and define the method there, all objects will get it.
<awkwords> thanks mistym
Forgetful_Lion has quit [Remote host closed the connection]
VTLob has quit [Quit: VTLob]
kitak has joined #ruby-lang
nigerianceo has quit []
<micalexander> wanna make a method that does a gsub based on the arguments passed. I'm using the lambda version of gsub and cant seem to pass in a the groups match argument to it. is it even possible to do so?
<micalexander> here is what I have
<micalexander> https://eval.in/55241
<micalexander> any ideas?
bastilian has joined #ruby-lang
<drbrain> micalexander: that's not possible
shinnya has joined #ruby-lang
<drbrain> you can do it a different way
majjoha has joined #ruby-lang
<micalexander> is there any way I can accomplish this
lfox has joined #ruby-lang
<micalexander> drbrain: cool how
<drbrain> def find_and_replace(input, pattern, file = nil, &block); new_output = input.gsub!(pattern, &block); … end
andyhuynh has quit [Quit: andyhuynh]
<drbrain> then find_and_replace input, pattern, { "#{$1}life" }
<drbrain> … I think
<micalexander> what is &block?
<drbrain> a block is the { } you send to a method
<drbrain> &block turns it into an object you can pass on to another method that takes a block
<drbrain> also, you probably want gsub, not gsub! if you're returning a value
<micalexander> does &block have to be last?
<drbrain> yes
<drbrain> always
<micalexander> /tmp/execpad-7253143faa33/source-7253143faa33:13: syntax error, unexpected '}', expecting =>
<micalexander> find_and_replace input, pattern, { "#{$1}life" }
<micalexander> ^
majjoha has quit [Ping timeout: 272 seconds]
<micalexander> ok it gives me
D9_ has joined #ruby-lang
<micalexander> that mess
julian_ has joined #ruby-lang
<drbrain> can you repaste?
<micalexander> https://eval.in/55245
<drbrain> micalexander: remove the last , on line 13
ldnunes has quit [Ping timeout: 262 seconds]
jeff_r has quit [Remote host closed the connection]
jeff_r has joined #ruby-lang
<julian_> drbrain: No, I haven't been working on this all this time :P But..it's still bugging me that my program could be better. If you had to guess, how would you get win1.bkgd(ch) to work
<micalexander> drbrain: now it thinks pattern is a method
<drbrain> julian_: I played with it for a bit but couldn't figure it out
<drbrain> julian_: it seems like you're supposed to set it to something like win.bkgd(' '.ord | Curses.color_pair(1))
<mistym> micalexander: https://eval.in/55250
<drbrain> oh yeah, parens ↑
<mistym> micalexander: Need the parens around the method parameters, otherwise in this case it interpreted the block as being an argument to a method called pattern
postmodern has joined #ruby-lang
<micalexander> mistym: yes but it still didnt retain the first part of my input string
<awkwords> is their anyway to list methods and ignore any provided by the kernel object? mistym
andyhuynh has joined #ruby-lang
<drbrain> micalexander: ah, right, $1 in the gsub block doesn't work that way
<drbrain> its special :/
jeff_r has quit [Ping timeout: 245 seconds]
<mistym> magic_globals--
<micalexander> drbrain: so there is no what to make this piece of code modular
<julian_> drbrain: Okay, thanks v much though!
<drbrain> micalexander: https://eval.in/55252 works
<drbrain> gsub replacement strings :D
<micalexander> thats amazing
saarinen has quit [Quit: saarinen]
<micalexander> drbrain: whats the \\ all abpout
<micalexander> about
<drbrain> in "" you need to escape \
<drbrain> so it becomes \\
<micalexander> drbrain: ok so what is \1 all about vs #{$1}
<mistym> postmodern: Am I remembering right that you have some involvement in ffi?
<micalexander> drbrain: whats the deal with it
<drbrain> micalexander: '\1' is the same as "#{$1}" inside the block
sepp2k1 has quit [Quit: Leaving.]
<micalexander> drbrain: I guess my question is, is it specific to sending it through variables or something
<mistym> awkwords: How about public_methods.reject {|m| method(m).owner == Kernel}.sort
<drbrain> micalexander: it's how gsub and sub process the replacement string
diegoviola has quit [Ping timeout: 252 seconds]
<micalexander> drbrain: in other words why does that work and #{$1} doesnt in this instance
<drbrain> $1 relies on scope, \1 is part of the string
<micalexander> make sense thanks for the help
<drbrain> gsub can walk down the string and perform all the replacements directly
<drbrain> for the block form, the block needs to be in the correct scope for $1 to exist
<micalexander> nice
ldnunes has joined #ruby-lang
<micalexander> drbrain: doesn't gsub! physically change the string?
<drbrain> micalexander: yes
<drbrain> it changes input, in your case
<micalexander> so you would you suggest gsub over gsub!
<drbrain> yes
<micalexander> y?
<drbrain> it's not a good practice to edit your inputs unless you absolutely know they won't be reused