apeiros changed the topic of #ruby to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
chrisja has quit [Quit: leaving]
ehaliewi` has joined #ruby
clov3r has quit [Ping timeout: 256 seconds]
<heftig> by the way, in bash: read lavg1 lavg5 lavg15 tasks lastpid </proc/loadavg
blackmesa has quit [Ping timeout: 240 seconds]
scmaccal has quit [Read error: Connection reset by peer]
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
sectionme has quit [Ping timeout: 240 seconds]
ehaliewicz has quit [Read error: Connection reset by peer]
<heftig> in ruby: lavg1, lavg5, lavg15, tasks, lastpid = File.read("/proc/loadavg").split
jerius has joined #ruby
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
Nogbit has quit [Quit: Leaving.]
deens has quit [Remote host closed the connection]
AzizLight has joined #ruby
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
ehc has quit [Quit: ehc]
baroquebobcat has quit [Quit: baroquebobcat]
coaster has joined #ruby
lukec has quit [Quit: lukec]
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
ehc has joined #ruby
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
ehc has quit [Client Quit]
choobie has quit [Remote host closed the connection]
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
<[gnubie]> heftig: thank you! ;)
ehc has joined #ruby
ehc has quit [Client Quit]
mlpinit has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
IceDragon has joined #ruby
AzizLight has quit [Ping timeout: 245 seconds]
baroquebobcat has joined #ruby
brennanMKE has quit [Read error: Connection reset by peer]
brennanM_ has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
tomzx_mac has quit [Ping timeout: 245 seconds]
tsykoduk is now known as zz_tsykoduk
fgo has quit [Remote host closed the connection]
mlpinit has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
snovak has quit [Ping timeout: 240 seconds]
ehc has joined #ruby
ehc has quit [Client Quit]
osvico has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
RichardBaker has quit [Quit: RichardBaker]
ehc has joined #ruby
ehc has quit [Client Quit]
freezey has quit [Remote host closed the connection]
popl has quit [Quit: We must make an idol of our fear, and call it God.]
ehc has joined #ruby
ehc has quit [Client Quit]
platzhirsch has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
<platzhirsch> Does anyone use syntastic for Ruby in Vim?
allanm__ has joined #ruby
jetblack has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
<[gnubie]> heftig: how do you convert this command in ruby? $ free -m | grep -i "buffers/cache" | awk '{ print $3 }'
allanm_ has quit [Ping timeout: 246 seconds]
ehc has joined #ruby
julian-delphiki has joined #ruby
ehc has quit [Client Quit]
<[gnubie]> heftig: i mean, if there is a direct way to get the same output without calling different shell commands
<platzhirsch> nvm
lukec has joined #ruby
sailias has joined #ruby
ehc has joined #ruby
sailias has quit [Read error: Connection reset by peer]
ehc has quit [Client Quit]
peregrine81 has quit []
ehc has joined #ruby
ehc has quit [Client Quit]
zenloop has quit [Quit: zenloop]
b00stfr3ak has quit [Ping timeout: 246 seconds]
ehc has joined #ruby
ehc has quit [Client Quit]
bean has quit [Ping timeout: 245 seconds]
fschuindt has joined #ruby
<heftig> [gnubie]: this, I guess:
ehc has joined #ruby
<heftig> meminfo = Hash[ File.read("/proc/meminfo").scan(/^(\w+):\s*(\d+)/).map { |(name,amount)| [name,amount.to_i] } ]
ehc has quit [Client Quit]
<heftig> (meminfo["MemTotal"] - meminfo["MemFree"] - meminfo["Cached"]) / 1024
hogeo has joined #ruby
Valesk has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
Bira__ has joined #ruby
ChronocityLC has joined #ruby
pkrnj has joined #ruby
cads has joined #ruby
<heftig> ah, this is better:
ehc has joined #ruby
ehc has quit [Client Quit]
<heftig> meminfo = Hash[ File.read("/proc/meminfo").scan(/^([^:]+):\s*(\d+)/).map { |(name,amount)| [name,amount.to_i] } ]
<heftig> (meminfo["MemTotal"] - meminfo["MemFree"] - meminfo["Cached"]) / 1024
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ehc has joined #ruby
peregrine81 has joined #ruby
ehc has quit [Client Quit]
<[gnubie]> heftig: let me try it. thanks.
rburton- has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
Bira has quit [Ping timeout: 240 seconds]
ehc has joined #ruby
ehc has quit [Client Quit]
zz_tsykoduk is now known as tsykoduk
jerius has quit []
ehc has joined #ruby
ehc has quit [Client Quit]
ehc has joined #ruby
ehc has quit [Client Quit]
tyfighter has quit [Quit: tyfighter]
jerius has joined #ruby
DonRichie has quit [Read error: Operation timed out]
ehc has joined #ruby
DonRichie has joined #ruby
ehc has quit [Client Quit]
AzizLight has joined #ruby
zeade has quit [Quit: Leaving.]
ehc has joined #ruby
ehc has quit [Client Quit]
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
xcv has quit [Remote host closed the connection]
Mattx has joined #ruby
ssvo has quit [Ping timeout: 264 seconds]
<Mattx> Is there any way to do more than one substitution at the same time?
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
xcv has joined #ruby
<Mattx> I want for example to replace 1 -> "a" and 2 -> "b"
<Mattx> in "foo 1 bar 2"
<Mattx> in one line
ehc has joined #ruby
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
<heftig> >> "foo 1 bar 2".tr("12","ab")
<eval-in> heftig => "foo a bar b" (https://eval.in/53161)
ehc has quit [Client Quit]
<Mattx> ohh, cool
<Mattx> thanks heftig
<heftig> only works with single characters, though
scmaccal has joined #ruby
xk_id has quit [Quit:
snovak has joined #ruby
ericmathison has joined #ruby
Guest64204 has quit [Remote host closed the connection]
ehc has joined #ruby
<Mattx> that's exactly what I'm looking for
ehc has quit [Client Quit]
Mars has joined #ruby
<popl> tr is transliteration, not substitution
Mars is now known as Guest29053
Guest29053 has quit [Read error: Connection reset by peer]
ehc has joined #ruby
ehc has quit [Client Quit]
devoldmx3 has quit [Ping timeout: 264 seconds]
ehc has joined #ruby
ukd1 has quit [Remote host closed the connection]
ehc has quit [Client Quit]
kvirani has quit [Remote host closed the connection]
ciziar has quit [Ping timeout: 245 seconds]
ukd1 has joined #ruby
xcv has quit [Ping timeout: 256 seconds]
kvirani has joined #ruby
kitak_ has joined #ruby
ehc has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
ehc has quit [Client Quit]
ukd1_ has joined #ruby
butblack has quit [Quit: butblack]
cephalopod has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
gazzik has quit [Remote host closed the connection]
snovak has quit [Ping timeout: 240 seconds]
ehc has joined #ruby
ehc has quit [Client Quit]
kitak has quit [Ping timeout: 246 seconds]
ehc has joined #ruby
ehc has quit [Client Quit]
AzizLight has quit [Ping timeout: 264 seconds]
nari has quit [Ping timeout: 264 seconds]
ukd1 has quit [Ping timeout: 240 seconds]
kitak_ has quit [Remote host closed the connection]
kvirani has quit [Ping timeout: 248 seconds]
Ahti333 has joined #ruby
devoldmx has joined #ruby
kitak has joined #ruby
ehc has joined #ruby
Raboo has quit [Ping timeout: 252 seconds]
ehc has quit [Client Quit]
ukd1_ has quit [Ping timeout: 268 seconds]
jamescarr has joined #ruby
<Ahti333> hi! i'm currently trying to compile ruby 2, but i get a bunch of undefined symbol errors while linking. all begin with 'RUBY_DTRACE', and i could indeed not find any place these functions would be defined
rainbyte has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
T_T has quit [Remote host closed the connection]
kevinykchan has quit [Quit: Computer has gone to sleep.]
ehc has joined #ruby
deens has joined #ruby
kitak_ has joined #ruby
ehc has quit [Client Quit]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ahti333> does anyone know how i might fix this?
ehc has joined #ruby
kitak has quit [Read error: Connection reset by peer]
jrobeson has quit [Ping timeout: 245 seconds]
ehc has quit [Client Quit]
tjbarber has joined #ruby
Beoran has quit [Read error: Connection reset by peer]
Beoran has joined #ruby
burlyscudd has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
ehc has joined #ruby
ehc has quit [Client Quit]
g0bl1n has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
tomzx_mac has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
marcdel has joined #ruby
decoydrone has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
Inside has quit [Ping timeout: 264 seconds]
brennanM_ has quit [Remote host closed the connection]
T_T has joined #ruby
brennanMKE has joined #ruby
marcdel has quit [Client Quit]
g0bl1n has quit [Client Quit]
ehc has joined #ruby
rainbyte has quit [Quit: Leaving]
ehc has quit [Client Quit]
ukd1 has joined #ruby
rainbyte has joined #ruby
platzhirsch has left #ruby [#ruby]
iliketurtles has quit [Quit: zzzzz…..]
rainbyte has quit [Read error: Connection reset by peer]
ehc has joined #ruby
ehc has quit [Client Quit]
jkline has quit [Quit: jkline]
<havenwood> Ahti333: Can you paste a Gist of the failure?
ehc has joined #ruby
ehc has quit [Client Quit]
rainbyte has joined #ruby
jrobeson has joined #ruby
jerius has quit []
loc` has joined #ruby
Bira__ has quit [Remote host closed the connection]
loc` has left #ruby [#ruby]
ehc has joined #ruby
ehc has quit [Client Quit]
momomomomo has quit [Quit: momomomomo]
cephalopod has quit [Ping timeout: 245 seconds]
<Ahti333> i am also trying to build for ios, armv7, i guess that would be a part of the problem?
brennanMKE has quit [Ping timeout: 245 seconds]
ehc has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
petey has joined #ruby
ehc has quit [Client Quit]
ehc has joined #ruby
ehc has quit [Client Quit]
soheil has quit [Remote host closed the connection]
devoldmx has joined #ruby
aspires has quit [Quit: aspires]
maletor_ has quit [Quit: Computer has gone to sleep.]
tjbarber has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ehc has joined #ruby
ehc has quit [Client Quit]
c0rn has quit [Quit: Computer has gone to sleep.]
DanKnox is now known as DanKnox_away
ehc has joined #ruby
ehc has quit [Client Quit]
brennanMKE has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
ukd1 has quit [Remote host closed the connection]
ehc has joined #ruby
codeFiend has joined #ruby
devoldmx3 has joined #ruby
ehc has quit [Client Quit]
sevenseacat has joined #ruby
i_s has quit [Remote host closed the connection]
lyanchih has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
ehc has joined #ruby
ehc has quit [Client Quit]
Voodoofish430 has quit [Quit: Leaving.]
nari has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
decoydrone has left #ruby [#ruby]
baroquebobcat has quit [Quit: baroquebobcat]
T_T has quit [Remote host closed the connection]
ehc has joined #ruby
lfox has quit [Quit: ZZZzzz…]
ehc has quit [Client Quit]
devoldmx3 has quit [Read error: Connection reset by peer]
snovak has joined #ruby
devoldmx has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
peregrine81 has quit []
ColKurtz has quit [Quit: Textual IRC Client: www.textualapp.com]
butblack has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
gyutyuglf has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
T__T has joined #ruby
GeissT has joined #ruby
yourmysin has quit [Ping timeout: 248 seconds]
ehc has joined #ruby
peregrine81 has joined #ruby
ehc has quit [Client Quit]
Ox6abe has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
fijimunkii has quit [Ping timeout: 240 seconds]
danshultz has joined #ruby
SHyx0rmZ has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
saarinen has joined #ruby
amacgregor_ has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
rjhunter has joined #ruby
zo_ has quit [Ping timeout: 248 seconds]
ehc has joined #ruby
ehc has quit [Client Quit]
dmiller has joined #ruby
amacgregor has quit [Ping timeout: 240 seconds]
twoism has quit [Remote host closed the connection]
ehc has joined #ruby
ehc has quit [Client Quit]
twoism has joined #ruby
dhruvasagar has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
petey has quit [Remote host closed the connection]
petey has joined #ruby
ehc has joined #ruby
lfox has joined #ruby
ehc has quit [Client Quit]
ehc has joined #ruby
ehc has quit [Client Quit]
dankest has quit [Quit: Peace]
ehc has joined #ruby
twoism has quit [Ping timeout: 248 seconds]
ehc has quit [Client Quit]
T__T has quit [Remote host closed the connection]
tkuchiki has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
petey has quit [Ping timeout: 245 seconds]
devoldmx3 has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
codeFiend has quit [Quit: codeFiend]
ehc has joined #ruby
ehc has quit [Client Quit]
[gnubie] has quit [Quit: [gnubie]]
cutmail has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
devoldmx has quit [Ping timeout: 248 seconds]
ehc has joined #ruby
saarinen has quit [Quit: saarinen]
ehc has quit [Client Quit]
ehc has joined #ruby
ehc has quit [Client Quit]
ehc has joined #ruby
ehc has quit [Client Quit]
soheil has joined #ruby
gyutyuglf has left #ruby [#ruby]
ehc has joined #ruby
ehc has quit [Client Quit]
brianpWins has quit [Quit: brianpWins]
burlyscudd has quit [Quit: Leaving.]
cephalopod has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
cephalopod has quit [Client Quit]
ehc has joined #ruby
ehc has quit [Client Quit]
marwan_ has quit [Ping timeout: 248 seconds]
agent_white has joined #ruby
benweint has quit [Quit: Computer has gone to sleep.]
marwa504 has quit [Ping timeout: 256 seconds]
peregrine81 has quit []
ehc has joined #ruby
Guest40543 has quit [Ping timeout: 240 seconds]
ehc has quit [Client Quit]
sambao21 has quit [Quit: Computer has gone to sleep.]
ehc has joined #ruby
saarinen has joined #ruby
<tjbiddle> Hey guys - is there a way I can force a CLI to give me a stack trace? I'm running puppet and it eats it
ehc has quit [Client Quit]
volty has quit [Quit: Konversation terminated!]
SHyx0rmZ has quit [Ping timeout: 245 seconds]
ehc has joined #ruby
<danshultz> tjbiddle: what command are you using to run puppet?
ehc has quit [Client Quit]
<tjbiddle> puppet autoami run --debug --verbose
<tjbiddle> I think there's --trace actually, trying now.
<tjbiddle> danshultz: (Forgot to tag)
taternuts has joined #ruby
<danshultz> yeah, usually they is a --trace on most commands to force a trace
ehc has joined #ruby
AzizLight has joined #ruby
<danshultz> that's just general convention many apps follow
ehc has quit [Client Quit]
marcdel_ has joined #ruby
soheil has quit [Ping timeout: 245 seconds]
SHyx0rmZ has joined #ruby
<tjbiddle> danshultz: Success. Yeah - Figured. Just `puppet help` doesn't print out options (I had to guess that --verbose and --debug existed, granted I probably should have just checked the man page :-))
<tjbiddle> Thanks!
ehc has joined #ruby
ehc has quit [Client Quit]
<danshultz> yep :) - also, would be better to pose that question in the #puppet room
<tjbiddle> danshultz: Already had :-) I was asking #ruby just if there was a way to force any arbitrary CLI app to do something, puppet was just an unnecessary detail
ehc has joined #ruby
fridim_ has joined #ruby
dkamioka has joined #ruby
snovak has quit [Ping timeout: 264 seconds]
AzizLight has quit [Ping timeout: 248 seconds]
ehc has quit [Client Quit]
<danshultz> tjbiddle: yeah, there isn't way to force a stack, etc
ehc has joined #ruby
<danshultz> it's up to the CLI app to suppress or provide that
ehc has quit [Client Quit]
<danshultz> typically though, out of the gate, you'll get a full stack
<tjbiddle> danshultz: Yeah, didn't think there would be a way since it's normally a rescue statement - but was crossing my fingers, heh
ehc has joined #ruby
ehc has quit [Client Quit]
vpretzel has quit [Remote host closed the connection]
vpretzel has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
Mars has joined #ruby
jamescarr has quit [Quit: jamescarr]
ewnd9 has joined #ruby
Mars is now known as Guest31731
ehc has joined #ruby
ehc has quit [Client Quit]
kevinykchan has joined #ruby
deens has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
ehc has joined #ruby
ehc has quit [Client Quit]
vpretzel has quit [Ping timeout: 240 seconds]
hamakn has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
ehc has joined #ruby
ehc has quit [Client Quit]
ewnd9 has quit [Ping timeout: 248 seconds]
justsee has joined #ruby
jamescarr has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
Guest31731 has quit [Remote host closed the connection]
ehc has joined #ruby
ehc has quit [Client Quit]
vishal has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
rburton- has quit [Quit: Leaving...]
Naoe-Kanno has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
ehc has joined #ruby
ehc has quit [Client Quit]
danshultz has joined #ruby
rburton- has joined #ruby
Naoe_Kanno has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
deens has joined #ruby
SHyx0rmZ has quit [Ping timeout: 264 seconds]
whunt has quit [Quit: Computer has gone to sleep.]
ehc has joined #ruby
ehc has quit [Client Quit]
danshult_ has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
pen has quit [Remote host closed the connection]
Naoe-Kanno has quit [Ping timeout: 240 seconds]
pen has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
ehc has joined #ruby
ehc has quit [Client Quit]
burlyscudd has joined #ruby
rburton- has quit [Quit: Linkinus - http://linkinus.com]
ehc has joined #ruby
danshultz has quit [Ping timeout: 256 seconds]
ehc has quit [Client Quit]
peregrine81 has joined #ruby
vikhyat has joined #ruby
vikhyat has quit [Remote host closed the connection]
ehc has joined #ruby
Naoe_Kanno has quit [Read error: Connection reset by peer]
ehc has quit [Client Quit]
pen has quit [Ping timeout: 248 seconds]
Senjai has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
deens has quit [Remote host closed the connection]
Deele has quit [Ping timeout: 260 seconds]
ehc has joined #ruby
ehc has quit [Client Quit]
dayepa has quit [Quit: dayepa]
gregj has quit [Ping timeout: 245 seconds]
Heero has joined #ruby
ehc has joined #ruby
dayepa has joined #ruby
Buuyo has quit [Ping timeout: 260 seconds]
ehc has quit [Client Quit]
snovak has joined #ruby
gregj has joined #ruby
ehc has joined #ruby
ukd1 has joined #ruby
ehc has quit [Client Quit]
ehc has joined #ruby
ehc has quit [Client Quit]
ehc has joined #ruby
ehc has quit [Client Quit]
heidi has quit [Quit: Leaving.]
ehc has joined #ruby
ehc has quit [Client Quit]
existensil has quit [Quit: Lost terminal]
ehc has joined #ruby
ehc has quit [Client Quit]
snovak has quit [Ping timeout: 264 seconds]
ehc has joined #ruby
ehc has quit [Client Quit]
jamescarr has quit [Quit: jamescarr]
radic_ has joined #ruby
radic has quit [Disconnected by services]
ehc has joined #ruby
ehc has quit [Client Quit]
vpretzel has joined #ruby
ehc has joined #ruby
Ox6abe has quit [Remote host closed the connection]
yuroyoro has joined #ruby
ehc has quit [Client Quit]
Ox6abe has joined #ruby
yuroyoro has quit [Remote host closed the connection]
gja has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
IceDragon has quit [Ping timeout: 264 seconds]
lusory has quit [Ping timeout: 252 seconds]
ehc has joined #ruby
ehc has quit [Client Quit]
IceDragon has joined #ruby
codeFiend has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
jamescarr has joined #ruby
Ox6abe has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
ehc has joined #ruby
ehc has quit [Client Quit]
varfoo has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
codeFiend has quit [Client Quit]
ehc has joined #ruby
ehc has quit [Client Quit]
bklane has quit [Remote host closed the connection]
s00pcan has quit [Quit: leaving]
ehc has joined #ruby
ehc has quit [Client Quit]
cutmail has quit [Remote host closed the connection]
s00pcan has joined #ruby
cutmail has joined #ruby
ehc has joined #ruby
cutmail has quit [Remote host closed the connection]
ehc has quit [Client Quit]
ics has joined #ruby
cutmail has joined #ruby
tkuchiki has quit [Ping timeout: 268 seconds]
ehc has joined #ruby
ehaliewi` is now known as ehaliewicz
danshult_ has quit [Remote host closed the connection]
gazzik has joined #ruby
ukd1 has quit [Remote host closed the connection]
s00pcan has quit [Client Quit]
ukd1 has joined #ruby
s00pcan has joined #ruby
peregrine81 has quit []
Apocalypse has quit [Ping timeout: 264 seconds]
vpretzel has quit [Ping timeout: 245 seconds]
ukd1 has quit [Ping timeout: 248 seconds]
peregrine81 has joined #ruby
peregrine81 has quit [Client Quit]
ldnunes has quit [Quit: Leaving]
AzizLight has joined #ruby
burlyscudd has quit [Quit: Leaving.]
snovak has joined #ruby
maycon has joined #ruby
maycon has quit [Changing host]
maycon has joined #ruby
AzizLight has quit [Ping timeout: 246 seconds]
Targen has quit [Read error: Operation timed out]
varfoo has quit [Quit: WeeChat 0.4.0]
soba has joined #ruby
helloworld has quit [Ping timeout: 245 seconds]
varfoo has joined #ruby
ehc has quit [Quit: ehc]
zenloop has joined #ruby
helloworld has joined #ruby
Apocalypse has joined #ruby
varfoo has quit [Client Quit]
varfoo has joined #ruby
chinkung has quit [Read error: Connection reset by peer]
Bry8Star{T2 has joined #ruby
pkrnj has quit [Quit: Computer has gone to sleep.]
gazzik has quit [Remote host closed the connection]
tkuchiki has joined #ruby
<nhmood> Is there any way to treat STDOUT (or $stdout) as a File type where I can use the .write method with it? (http://pastebin.kde.org/ptwrqbh3h)
fijimunkii has joined #ruby
gr33n7007h has quit [Ping timeout: 240 seconds]
alvaro_o has quit [Quit: Ex-Chat]
<bnagy> >> STDOUT.write "hi\n"
<eval-in> bnagy => hi ... (https://eval.in/53162)
Newbcake has joined #ruby
zz_michael_mbp is now known as michael_mbp
justsee has left #ruby [#ruby]
NealJ has quit [Read error: Operation timed out]
io_syl_ has quit [Ping timeout: 248 seconds]
<nhmood> Whoops, my error wasn't related to using #write on STDOUT :-[, that seems to work fine, thanks!
Newbcake has quit [Client Quit]
vpretzel has joined #ruby
scottstamp is now known as zz_scottstamp
lgierth has joined #ruby
zz_scottstamp is now known as scottstamp
mary5030 has joined #ruby
<lgierth> i'm having a fun time raising frozen errors: https://gist.github.com/lgierth/0ce6f5d119d1bfae12af
Buuyo has joined #ruby
<lgierth> i'd expect __id__ to be the same after rescueing, and using jruby and rubinius, it is
tabolario has joined #ruby
<lgierth> but 1.8.7, 1.9.3, and 2.0.0 all create a new object that's not frozen, similar to what #dup does
vpretzel has quit [Read error: Connection reset by peer]
vpretzel has joined #ruby
<lgierth> anybody got an idea what that's about? i didn't find it in rubyspec either
araujo has quit [Quit: Leaving]
mando has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
burlyscudd has joined #ruby
vpretzel has quit [Ping timeout: 248 seconds]
burlyscudd has quit [Client Quit]
yxhuvud has quit [Ping timeout: 240 seconds]
xjiujiu has joined #ruby
snovak has quit [Ping timeout: 268 seconds]
pkrnj has joined #ruby
locriani has quit [Remote host closed the connection]
IceDragon has quit [Quit: Space~~~]
dankest has joined #ruby
PeNNyWiSe182__ has joined #ruby
PeNNyWiSe182__ has quit [Client Quit]
dhruvasagar has quit [Ping timeout: 256 seconds]
aryaching has joined #ruby
ffranz has quit [Quit: Leaving]
dhruvasagar has joined #ruby
aryaching_ has quit [Ping timeout: 248 seconds]
vim_shim has joined #ruby
monsterment has joined #ruby
x1337807x has joined #ruby
someish has quit [Quit: someish]
cads has quit [Read error: Operation timed out]
jonahR has joined #ruby
monsterment has quit [Read error: Connection reset by peer]
nutella has joined #ruby
nutella is now known as Guest26018
jonahR has quit [Ping timeout: 248 seconds]
mando has quit [Remote host closed the connection]
jonahR has joined #ruby
mando has joined #ruby
sectionme has joined #ruby
io_syl has joined #ruby
fridim_ has quit [Ping timeout: 248 seconds]
yxhuvud has joined #ruby
danman has joined #ruby
flagg0204 has quit [Remote host closed the connection]
chrisbolton has joined #ruby
ehc has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
revans has joined #ruby
<bnagy> lgierth: consider asking in #ruby-lang as well, just let em know you're crossposting
mando has quit [Ping timeout: 240 seconds]
sectionme has quit [Ping timeout: 245 seconds]
revans has quit [Client Quit]
danman has quit [Ping timeout: 245 seconds]
flagg0204 has joined #ruby
taternuts has quit []
flagg0204 has quit [Client Quit]
havenwood has quit [Remote host closed the connection]
snovak has joined #ruby
havenwood has joined #ruby
horrorvacui has joined #ruby
horrorvacui has left #ruby [#ruby]
SerafF has joined #ruby
SerafF has left #ruby [#ruby]
r0bby_ has joined #ruby
asdasdasdasdasd_ has joined #ruby
cads has joined #ruby
saarinen has quit [Quit: saarinen]
petey has joined #ruby
havenwood has quit [Ping timeout: 246 seconds]
locriani has joined #ruby
codeFiend has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
locriani has quit [Remote host closed the connection]
locriani has joined #ruby
lgierth has quit [Ping timeout: 248 seconds]
mva3212 has joined #ruby
devbox_ has joined #ruby
snovak has quit [Ping timeout: 268 seconds]
devbox_ has quit [Client Quit]
baroquebobcat has quit [Quit: baroquebobcat]
jkline has joined #ruby
pkrnj has quit [Ping timeout: 268 seconds]
gazzik has joined #ruby
baroquebobcat has joined #ruby
Inside has joined #ruby
ewnd9 has joined #ruby
michael_mbp is now known as zz_michael_mbp
pkrnj has joined #ruby
ewnd9 has quit [Remote host closed the connection]
ewnd9 has joined #ruby
havenwood has joined #ruby
iliketurtles has joined #ruby
snovak has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gazzik has quit [Read error: Connection reset by peer]
gazzik has joined #ruby
ewnd9 has quit [Remote host closed the connection]
snovak has quit [Ping timeout: 240 seconds]
zenloop has quit [Quit: zenloop]
havenwood has quit [Remote host closed the connection]
ewnd9 has joined #ruby
<chrisbolton> K, I'm taking a second stab at this … https://gist.github.com/Iknewthisguy/6875557, I need to clean this up, not let the wallets or cost go below zero and retain the wallet totals. Oh yeah and a lot of help.
alx- has quit [Quit: Leaving...]
ewnd9 has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
ewnd9 has joined #ruby
ukd1 has joined #ruby
lyanchih has quit [Quit: lyanchih]
polaco is now known as polaco_zZz
vpretzel has joined #ruby
gstamp has quit [Read error: No route to host]
lfox has quit [Quit: ZZZzzz…]
Sheeplet has quit [Read error: Connection reset by peer]
gstamp has joined #ruby
poisonarms has quit [Ping timeout: 246 seconds]
dankest has quit [Quit: dankest]
valesk_ has joined #ruby
Valesk has quit [Read error: Connection reset by peer]
vpretzel has quit [Ping timeout: 256 seconds]
weeb1e has quit [Ping timeout: 256 seconds]
lyanchih has joined #ruby
mary5030 has quit [Remote host closed the connection]
<asdasdasdasdasd_> bnagy: got it by reading code. an exception needs a backtrace, and if it doesn't, mri just builds a whole new object instead of just assigning the backtrace
mary5030 has joined #ruby
weeb1e has joined #ruby
asdasdasdasdasd_ is now known as lgierth
lfox has joined #ruby
locriani has quit [Remote host closed the connection]
x1337807x has joined #ruby
locriani has joined #ruby
locriani has quit [Read error: Connection reset by peer]
pheno has joined #ruby
locriani has joined #ruby
cubicme has joined #ruby
Xanderby has left #ruby [#ruby]
weeb1e has quit [Ping timeout: 245 seconds]
mary5030 has quit [Ping timeout: 264 seconds]
lyanchih has quit [Quit: lyanchih]
phenocode has quit [Ping timeout: 252 seconds]
serp` has joined #ruby
locriani has quit [Ping timeout: 240 seconds]
krz has joined #ruby
lukec has quit [Quit: lukec]
xkickflip has quit [Quit: h..hi]
lfox has quit [Quit: ZZZzzz…]
DrCode has joined #ruby
serp` has quit [Quit: serp`]
saarinen has joined #ruby
<bnagy> chrisbolton: what are you actually trying to do?
tsykoduk is now known as zz_tsykoduk
scottstamp is now known as zz_scottstamp
ChronocityLC has quit [Ping timeout: 240 seconds]
<bnagy> this is a programming exercise, right? Do you have the actual exercise?
snovak has joined #ruby
osvico has quit [Ping timeout: 245 seconds]
<chrisbolton> bnagy: something like this https://gist.github.com/Iknewthisguy/6875557
<chrisbolton> Not a programming exercise. An actual problem I'm trying to solve.
<bnagy> I looked at the code. Set it on fire, then tell me what you're actually trying to do
dmiller has quit [Remote host closed the connection]
<sevenseacat> lol
zz_scottstamp is now known as scottstamp
mrnugget has joined #ruby
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
scottstamp is now known as zz_scottstamp
<chrisbolton> Nice.
<chrisbolton> I have three buckets of money. I need to empty them in order until I've paid for whatever item.
<bnagy> just saying, no code that looks like that is ever correct ruby. If you explain your algorithm we can fit it into actual idiom
snovak has quit [Ping timeout: 245 seconds]
fuhgeddaboudit has joined #ruby
<chrisbolton> I also need to keep track of the the amounts left in whatever buckets I've got.
<bnagy> ok so no load sharing, no 'most efficient' or anything
<chrisbolton> I know there's a beautiful ruby way to do it I just don't know how.
<chrisbolton> Yeah no load sharing. Need to iterate over the buckets/wallets/whatever you want to call them.
carraroj has joined #ruby
<bnagy> there are a lot. I'll give you what I personally think is the clearest, but I won't write working code :)
<chrisbolton> Cool with me.
serp` has joined #ruby
<bnagy> make a paid variable first, paid = 0. Now we're going to iterate the wallets, that looks like wallets.each {|wallet|
habanany has joined #ruby
Targen has joined #ruby
<heftig> lgierth: actually, i think rbx and jruby are wrong here
habanany has quit [Client Quit]
<heftig> lgierth: raising an exception modifies the object, so it can't be frozen
<bnagy> now, if total - paid > 0, take money from this wallet
<bnagy> if paid is now enough, break
end_guy has joined #ruby
<heftig> mri works around it by dupping, rbx violates the freeze
<lgierth> heftig: if i set the backtrace before raising, it isn't modified
poisonarms has joined #ruby
<bnagy> you could make it much shorter and golfier, but this code should be very obvious
<poisonarms> Is there a way to tell rubygems to not download from an HTTPS source?
<chrisbolton> golfier?
<lgierth> so it just seems to be a lack of `ex.set_backtrace(caller) if ex.kind_of?(Exception)`
saarinen has quit [Read error: Connection reset by peer]
<bnagy> chrisbolton: yeah, like 'cooler' / shorter
<chrisbolton> Gotcha.
saarinen has joined #ruby
<heftig> lgierth: and in that case, it's not dupped, either
<bnagy> so just start out with wallets as a simple array of numbers
cubicme has quit [Quit: leaving]
<lgierth> yeah, it essentially does exception_class.new(ex.to_s), as far as i understand
<bnagy> chrisbolton: uh you know what each blocks look like in ruby?
<chrisbolton> bnagy: yeah
<poisonarms> Figured it out.
<bnagy> cool
<poisonarms> gem source --add <source>
cutmail has quit [Remote host closed the connection]
cutmail has joined #ruby
<bnagy> chrisbolton: so the core logic in the block is if total - paid > w; #put it all in, set this wallet to 0; else #put in just enough; break
<chrisbolton> bnagy: Exactly. I'm taking a swag at it right now.
<bnagy> if you get to the end and paid < total then all the wallets will be 0
<bnagy> and I guess you handle that
<bnagy> although it's a lot easier if you just don't start the block until you know they can afford it
ewokchewy has joined #ruby
Guest26018 has quit [Ping timeout: 256 seconds]
<bnagy> chrisbolton: AUGH sorry my brain is fried
<chrisbolton> bnagy, exactly I would check to make sure the total wallets is greater than the cost before starting the loop.
<bnagy> you're going to have to work with each_index or map not each, I think
<bnagy> map is pretty idiomatic
cutmail has quit [Ping timeout: 245 seconds]
<bnagy> but break in a map won't work right
<chrisbolton> I'll figure out the loop and break
rjhunter has quit [Remote host closed the connection]
<bnagy> if you want to break then iterate with each_index
<bnagy> and operate on wallets[i]
jaikeerthi has joined #ruby
Inside has quit [Ping timeout: 246 seconds]
<poisonarms> Is there a way to tell RubyGems where Ruby is when installing a gem? For example, I have 1.8.7 and 2.0.0, but by default, gems tries to build with 1.8.7. I want to build with 2.0.0, but I'm not sure how to accomplish this.
momomomomo has joined #ruby
<bnagy> poisonarms: use one of the version managers, or install systemwide from source, depending on your os
<poisonarms> Version managers?
<bnagy> rbenv chruby rvm, in (my) order of preference
zz_tsykoduk is now known as tsykoduk
<sevenseacat> \o/ chruby
saarinen has quit [Quit: saarinen]
zz_michael_mbp has quit [Excess Flood]
serp` has quit [Quit: serp`]
michael_mbp has joined #ruby
T_T has joined #ruby
aagdbl has joined #ruby
lgierth has quit [Quit: Ex-Chat]
lyanchih has joined #ruby
T_T has quit [Remote host closed the connection]
nutella has joined #ruby
ssvo has joined #ruby
nutella is now known as Guest16650
snovak has joined #ruby
cutmail has joined #ruby
Jetchisel has joined #ruby
St_Marx has joined #ruby
<xybre> Man that yak is gonna be SO naked when I'm done..
<bnagy> what you shaving?
locriani has joined #ruby
cutmail has quit [Remote host closed the connection]
cutmail_ has joined #ruby
<xybre> bnagy: All kinds of silly things. Picking tools for the job, fixing my prompt setup, getting zsh back up and running again, pull down old code spikes for reference, setting up CI services.. Maybe I should just spike some more code so I feel useful.
snovak has quit [Ping timeout: 240 seconds]
tsykoduk is now known as zz_tsykoduk
|jemc| has joined #ruby
vpretzel has joined #ruby
momomomomo has quit [Quit: momomomomo]
benweint has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krz has quit [Quit: krz]
vpretzel has quit [Ping timeout: 248 seconds]
coderhs has joined #ruby
lyanchih has quit [Quit: lyanchih]
jaikeerthi has quit [Ping timeout: 246 seconds]
Koshian has quit [Ping timeout: 245 seconds]
keanehsiao has joined #ruby
butblack has quit [Quit: butblack]
kobain has quit []
Hobogrammer has quit [Read error: Connection reset by peer]
tomzx_mac has quit [Ping timeout: 248 seconds]
randomnick_ has quit [Quit: Leaving]
T_T has joined #ruby
T_T has quit [Remote host closed the connection]
lyanchih has joined #ruby
T_T has joined #ruby
T_T has quit [Read error: Connection reset by peer]
fuhgeddaboudit has quit [Ping timeout: 264 seconds]
sectionme has joined #ruby
momomomomo has joined #ruby
locriani has quit [Ping timeout: 248 seconds]
momomomomo has quit [Client Quit]
dankest has joined #ruby
Hobogrammer has joined #ruby
sectionme has quit [Ping timeout: 248 seconds]
jkline has quit [Quit: jkline]
chrisbolton has quit [Quit: chrisbolton]
aagdbl has quit [Quit: Leaving.]
adeponte has joined #ruby
keanehsiao has quit [Quit: keanehsiao]
pen has joined #ruby
codecop has joined #ruby
zz_tsykoduk is now known as tsykoduk
dhruvasagar has joined #ruby
gja has joined #ruby
senayar has joined #ruby
robertjpayne has joined #ruby
Hganavak has joined #ruby
senayar has quit [Remote host closed the connection]
serp` has joined #ruby
SilverKey has quit [Quit: Cheerio!]
senayar has joined #ruby
soheil has joined #ruby
SilverKey has joined #ruby
SilverKey has quit [Max SendQ exceeded]
kil0byte has joined #ruby
jaikeerthi has joined #ruby
Koshian has joined #ruby
sam3 has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
tagrudev has joined #ruby
Koshian is now known as Koshian
senayar has quit [Ping timeout: 260 seconds]
sam3 has quit [Quit: WeeChat 0.4.1]
SilverKey has joined #ruby
soheil has quit [Ping timeout: 268 seconds]
roadt_ has joined #ruby
brianpWins has joined #ruby
aagdbl has joined #ruby
shadoi has joined #ruby
senayar has joined #ruby
roadt has quit [Ping timeout: 264 seconds]
gja has quit [Ping timeout: 256 seconds]
marcdel_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
cubicme has joined #ruby
locriani has joined #ruby
marcdel has joined #ruby
shadoi1 has quit [Ping timeout: 264 seconds]
QKO has quit [Quit: leaving]
QKO has joined #ruby
gowrishankar has joined #ruby
senayar has quit [Ping timeout: 245 seconds]
JohnBat26 has joined #ruby
benweint has quit [Quit: Computer has gone to sleep.]
coderhs has quit [Ping timeout: 256 seconds]
locriani has quit [Ping timeout: 248 seconds]
ananthakumaran has joined #ruby
diegoviola has joined #ruby
<funburn> I need to send unix epoch time to a legacy app but I need to send it adjusted for local time so Time.to_i doesn't work, suggestions?
kaldrenon has joined #ruby
benweint has joined #ruby
T_T has joined #ruby
michael_mbp is now known as zz_michael_mbp
<apeiros> funburn: Time#to_i + basic arithmetics.
brianpWins has quit [Ping timeout: 248 seconds]
pen has quit [Read error: Connection reset by peer]
<funburn> that gets a little complicated with DST but I guess
pen has joined #ruby
<funburn> I was hoping there was some pre-existing method chain that could do it cleanly
kaldrenon has quit [Ping timeout: 248 seconds]
<apeiros> Time#dst?
* apeiros got to commute
apeiros has quit [Remote host closed the connection]
<funburn> thanks for the pointer
ewnd9 has quit [Ping timeout: 245 seconds]
ehc has quit [Quit: ehc]
ewokchewy has quit [Remote host closed the connection]
<xybre> funburn: ActiveSupport has a TimeWithZones class that might be useful.
mengu has joined #ruby
<funburn> xybre, trying not to use rails classes, but thanks for the suggestion!
<xybre> What about tzinfo?
<funburn> as in the unix command
T_T has quit [Remote host closed the connection]
dzhulk has joined #ruby
mengu has quit [Remote host closed the connection]
bricker`1A has quit [Ping timeout: 245 seconds]
<funburn> ah!
* xybre gets the trimmers, more yaks need shaving!
zachrab has joined #ruby
mengu has joined #ruby
<funburn> thanks!
<sevenseacat> shave all of the yakkkkks
<zachrab> anybody have any experience using cocoapods gem?
coderhs has joined #ruby
<funburn> oh actually #gmt_offset does all the heavy lifting here
<sevenseacat> thats rubymotion specific isnt it?
<zachrab> sevenseacat: yes
benweint has quit [Quit: Computer has gone to sleep.]
realcasually has joined #ruby
atSetKey has quit [Remote host closed the connection]
snovak has joined #ruby
<sevenseacat> might be worth asking in a rubymotion place then
jhn has joined #ruby
mengu has quit [Ping timeout: 248 seconds]
brianpWins has joined #ruby
<zachrab> did so but no active participants
<realcasually> quick question--i have a float.round(1), but i want it to also round to the nearest integer if its close
<realcasually> e.g. 5.01 -> 5
<popl> quick questions rarely are :)
<realcasually> but 5.23 -> 5.2
<realcasually> right now i get 5.0
<realcasually> which id like to avoid
bricker`LA has joined #ruby
<realcasually> true, but i always like to think they will be ;)
snovak has quit [Ping timeout: 248 seconds]
valesk_ has quit [Remote host closed the connection]
zoee has joined #ruby
vpretzel has joined #ruby
<popl> 5.2 is not an integer
<popl> what do you want 5.23 to round to?
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
Senjai has quit [Ping timeout: 245 seconds]
Targen has quit [Read error: Connection reset by peer]
Targen_ has joined #ruby
jefflyne has joined #ruby
jefflyne_ has quit [Ping timeout: 264 seconds]
vpretzel has quit [Ping timeout: 245 seconds]
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
zz_michael_mbp is now known as michael_mbp
kevinykchan has quit [Quit: Computer has gone to sleep.]
<coderhs> hey i installed a ruby gem, but doing so didn't install its dependencies
<coderhs> any idea why>
<coderhs> ?
mrnugget has quit [Quit: mrnugget]
kevinykchan has joined #ruby
<sevenseacat> what did it install?
<coderhs> just the actual gem
<sevenseacat> then you probably already have all the other dependencies
<sevenseacat> there arent many
<coderhs> nope
<coderhs> rubygen is not in my system, due to that the gem isn't working
<coderhs> or <newgem> to be precise
twinklerock has joined #ruby
noop has joined #ruby
Xeago has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
Al___ has joined #ruby
tonni has quit [Remote host closed the connection]
Ahti333 has quit [Quit: Textual IRC Client: www.textualapp.com]
dhruvasagar has joined #ruby
tatsuya_o has joined #ruby
<popl> coderhs: how are you trying to install it?
tatsuya_o has quit [Remote host closed the connection]
<coderhs> gem install grape_goliath
<realcasually> popl: i want 5.23 to round to 5.2
<realcasually> but 5.0 to round to 5
tatsuya_o has joined #ruby
<popl> so the next significant figure?
<popl> I don't know that there's a float method to do that. you will probably have to write the logic
mengu has joined #ruby
gowrishankar has quit [Ping timeout: 250 seconds]
<sevenseacat> two significant figures unless the last one is a 0
<sevenseacat> then only one :P
bricker`LA has quit [Ping timeout: 246 seconds]
<popl> 0 is not a significant figure
gazzik has quit [Remote host closed the connection]
kevinykchan has quit [Quit: Computer has gone to sleep.]
lsmola has joined #ruby
<sevenseacat> it is if its on the right of another
<sevenseacat> only leading 0s are insignificant
<popl> I think you've got that backwards
realcasually has quit [Ping timeout: 250 seconds]
<sevenseacat> no, 0.5 and 000000.5 are both only one significant figure
<sevenseacat> 00000.50 is two
tatsuya_o has quit [Ping timeout: 245 seconds]
pheno has quit [Ping timeout: 256 seconds]
s2013 has quit [Read error: Connection reset by peer]
tatsuya_o has joined #ruby
serp` has quit [Quit: serp`]
<popl> 00000.50 has one significant figure
<popl> .5
<sevenseacat> sigh
bubbajones has quit [Ping timeout: 252 seconds]
<popl> don't sigh, point me to documentation which corrects me if I am misled.
zachrab has quit [Remote host closed the connection]
<popl> I am reading a definition of it now and I think you are incorrect.
<sevenseacat> "Trailing zeros in a number containing a decimal point are significant. For example, 12.2300 has six significant figures: 1, 2, 2, 3, 0 and 0. The number 0.000122300 still has only six significant figures (the zeros before the 1 are not significant). "
<popl> trailing zeros
zachrab has joined #ruby
carraroj has quit [Ping timeout: 245 seconds]
Al___ has quit [Quit: Al___]
<popl> the introduction of that article contradicts what you just quoted
<popl> ask wolfram mathworld instead
<sevenseacat> its exactly what i just said
Xeago has quit [Remote host closed the connection]
bubbajones has joined #ruby
<popl> "The significant figures of a number are those digits that carry meaning contributing to its precision. This includes all digits except: * All leading zeros; * Trailing zeros [...]"
<popl> you are wrong. just admit it. :P
dhruvasagar has quit [Read error: Connection reset by peer]
<sevenseacat> now copy the rest of the line
<sevenseacat> instead of only the bits that back up what you say
<popl> which parts?
thesheff17 has quit [Ping timeout: 256 seconds]
<sevenseacat> "Trailing zeros when they are merely placeholders to indicate the scale of the number (exact rules are explained at Identifying significant figures); " (which links to the part i pasted above)
T_T has joined #ruby
<sevenseacat> this is like high school maths
<popl> yeah I know
cutmail_ has quit [Ping timeout: 240 seconds]
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
zachrab has quit [Ping timeout: 240 seconds]
<popl> I like this, it is less amibiguous: http://mathworld.wolfram.com/SignificantDigits.html
s2013_ has joined #ruby
mando has joined #ruby
<sevenseacat> ... which also says what i was saying
<sevenseacat> this is fun.
<popl> you're saying 0.50 has two sig figs?
Atrumx has quit [Quit: Quitting]
habanany has joined #ruby
habanany has quit [Client Quit]
cutmail has joined #ruby
<popl> or three?
<sevenseacat> two.
<popl> 0.5
robertjpayne has quit [Read error: Connection reset by peer]
<sevenseacat> one.
<popl> no, is 0.5 the two significant figures of 0.50?
<sevenseacat> no
<sevenseacat> .50
<popl> because the trailing zero means jack
<sevenseacat> sigh
dhruvasagar has joined #ruby
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
<popl> how am I misinterpreting the wolfram alpha def'n?
adeponte has quit [Read error: Connection reset by peer]
mando has quit [Ping timeout: 248 seconds]
adeponte has joined #ruby
jamescarr has quit [Quit: jamescarr]
dkamioka has quit [Remote host closed the connection]
tonni has joined #ruby
<popl> fyi that wolframalpha article does _not_ say what you were saying.
<sevenseacat> if you say so buddy.
jaikeerthi has quit [Quit: Leaving.]
<popl> whatever man. if I'm wrong then I'll admit it, but you
<sevenseacat> clearnt not :P
<popl> 're just telling me I'm wrong and not showing me
<sevenseacat> clearly
soba has quit [Read error: Connection reset by peer]
soba has joined #ruby
T_T has quit [Remote host closed the connection]
twinklerock has left #ruby [#ruby]
T_T has joined #ruby
nisstyre has quit [Read error: Connection timed out]
<popl> :(
Jetchisel has joined #ruby
iliketurtles has quit [Ping timeout: 240 seconds]
jprovazn has joined #ruby
brennanMKE has quit [Remote host closed the connection]
aganov has joined #ruby
nisstyre has joined #ruby
tonni has quit [Read error: Connection reset by peer]
bigkevmcd has joined #ruby
T_T has quit [Ping timeout: 264 seconds]
locriani has joined #ruby
dagobah has joined #ruby
jaikeerthi has joined #ruby
Ins3kt has joined #ruby
<Ins3kt> hi
<sevenseacat> howdy
jfelchner has quit [Ping timeout: 245 seconds]
arturas_ has joined #ruby
jsaak has joined #ruby
St_Marx has quit [Ping timeout: 240 seconds]
xkickflip has joined #ruby
iliketurtles has joined #ruby
locriani has quit [Ping timeout: 240 seconds]
jfelchner has joined #ruby
iliketurtles has quit [Client Quit]
cutmail_ has joined #ruby
cutmail has quit [Read error: Connection reset by peer]
cubicme has quit [Read error: Connection reset by peer]
dawkirst has joined #ruby
cubicme has joined #ruby
michael_mbp is now known as zz_michael_mbp
ahawkins has joined #ruby
zz_michael_mbp is now known as michael_mbp
sergicles has quit [Quit: sergicles]
tonni has joined #ruby
threesome has joined #ruby
tonni is now known as ta
haxrbyte has joined #ruby
rrichardsr3 has joined #ruby
rrichardsr3 has quit [Max SendQ exceeded]
arturas_ has quit [Ping timeout: 246 seconds]
vim_shim has quit [Ping timeout: 248 seconds]
popl has quit [Quit: We must make an idol of our fear, and call it God.]
Guest5748 is now known as sumark
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dhruvasagar has quit [Read error: Connection reset by peer]
ta has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
kil0byte has quit [Remote host closed the connection]
agent_white has quit [Quit: leaving]
snovak has joined #ruby
St_Marx has joined #ruby
casheew_ has joined #ruby
Guest16650 has quit [Ping timeout: 248 seconds]
s2013_ has quit [Quit: Leaving]
lkba has quit [Ping timeout: 256 seconds]
utkarsh_ has joined #ruby
Xuerian_ has joined #ruby
Gnubie has joined #ruby
eval-in_ has joined #ruby
Gnubie is now known as Guest87897
Ins3kt has left #ruby [#ruby]
haxrbyte has quit [Remote host closed the connection]
mikemac has joined #ruby
prophile_ has joined #ruby
sixtenei1hty has joined #ruby
Muz_ has joined #ruby
vpretzel has joined #ruby
ozzloy_ has joined #ruby
SJrX has joined #ruby
Al___ has joined #ruby
bnagy_ has joined #ruby
Columcil1e has joined #ruby
Kelet_ has joined #ruby
pdtpatri1k has joined #ruby
ninegrid_ has joined #ruby
apeiros has joined #ruby
iliketurtles has joined #ruby
yeltzooo6 has joined #ruby
ta has joined #ruby
germanstudent_ has joined #ruby
PLejeck has joined #ruby
Tobarja_yikes has joined #ruby
brennanMKE has joined #ruby
Brando753-o_O_o has joined #ruby
_br_ has joined #ruby
ivanoats_ has joined #ruby
vpretzel has quit [Ping timeout: 256 seconds]
shtirlic_ has joined #ruby
Nuck has quit [*.net *.split]
octarine has quit [*.net *.split]
smlgs has quit [*.net *.split]
SJr has quit [*.net *.split]
ninegrid has quit [*.net *.split]
Brando753 has quit [*.net *.split]
jeekl has quit [*.net *.split]
shtirlic has quit [*.net *.split]
bnagy has quit [*.net *.split]
denysonique has quit [*.net *.split]
Muz has quit [*.net *.split]
_br_- has quit [*.net *.split]
Kelet has quit [*.net *.split]
dziga has quit [*.net *.split]
prophile has quit [*.net *.split]
crazymykl has quit [*.net *.split]
ivanoats has quit [*.net *.split]
Xuerian has quit [*.net *.split]
casheew has quit [*.net *.split]
Columcille has quit [*.net *.split]
yeltzooo has quit [*.net *.split]
germanstudent has quit [*.net *.split]
Tobarja has quit [*.net *.split]
linduxed has quit [*.net *.split]
thomasvs has quit [*.net *.split]
eval-in has quit [*.net *.split]
sixteneighty has quit [*.net *.split]
utkarsh has quit [*.net *.split]
ozzloy has quit [*.net *.split]
pdtpatrick has quit [*.net *.split]
Gnubie_ has quit [*.net *.split]
Tobarja_yikes is now known as Tobarja
ivanoats_ is now known as ivanoats
atSetKey has joined #ruby
Brando753-o_O_o is now known as Brando753
timonv has joined #ruby
rdark has joined #ruby
arturaz has joined #ruby
lucazi has joined #ruby
Davey has joined #ruby
lucazi has quit [Client Quit]
lucazi has joined #ruby
troessner has joined #ruby
snovak has quit [Ping timeout: 248 seconds]
h_kon has joined #ruby
lyanchih_ has joined #ruby
atSetKey has quit [Ping timeout: 256 seconds]
lyanchih has quit [Ping timeout: 264 seconds]
jeekl has joined #ruby
brennanMKE has quit [Ping timeout: 240 seconds]
marcdel has joined #ruby
slevinn has joined #ruby
linduxed has joined #ruby
mrnugget has joined #ruby
marcdel_ has joined #ruby
realcasually has joined #ruby
octarine has joined #ruby
<realcasually> sorry--got disconnected
Heero has quit [Ping timeout: 248 seconds]
<realcasually> so, i am not sure what to use
Kar- has joined #ruby
<realcasually> i need 5.0 going to 5, but i need 5.12 going to 5.1
<realcasually> is there a way to do that with ruby Floats?
marcdel has quit [Ping timeout: 246 seconds]
<apeiros> realcasually: (num*10).round.fdiv(10)
<apeiros> err, just round(1) ?
tatsuya_o has quit [Remote host closed the connection]
Heero has joined #ruby
tatsuya_o has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
|jemc| has quit [Ping timeout: 240 seconds]
<realcasually> apeiros: thanks--reading about fdiv
Zeeraw has quit [Quit: Computer has gone to sleep.]
<apeiros> forget that
<apeiros> that's just emulating round(1)
<realcasually> apeiros: i want a max of 2 decimals
ta has quit [Read error: Connection reset by peer]
<realcasually> but always try to reduce decimal count
<realcasually> so 5.00 should be 5
<apeiros> realcasually: um, you're not being consistent
<apeiros> 5.12 *is* 2 decimals
<apeiros> yet you say you want 5.1
tatsuya_o has quit [Ping timeout: 245 seconds]
<apeiros> can you please make up your mind and then ask again?
<realcasually> d'oh sorry, 5.12 stays 5.12
<realcasually> 5.123 becomes 5.12
<apeiros> also, 5.00 *is* 5
<realcasually> 5.10 becomes 5.1
<apeiros> oh I suspect you're not talking about numbers but about presentation.
<realcasually> correct
<realcasually> i eventually display it in a string
<apeiros> since 5.00 is 5 and 5.10 is 5.1
ssvo has quit [Ping timeout: 240 seconds]
<apeiros> well, you should say that. it matters. just a tiny bit. you know?
<apeiros> I don't think there's a formatting option in sprintf to do that directly.
mikeric has joined #ruby
<sevenseacat> where's popi to yell at apeiros for 'getting it wrong'
<sevenseacat> popl rather
<apeiros> you could sub away trailing zeroes: .sub(/(\.[^0]+)0*$/, '\1')
codecop has quit [Ping timeout: 246 seconds]
jefflyne has quit [Ping timeout: 264 seconds]
gazzik has joined #ruby
soheil has joined #ruby
<apeiros> popl? huh? haven't seen him do that.
<realcasually> apeiros: thanks--that would likely work
<realcasually> just not sure if someone has solved this already
<realcasually> but i didnt see anything in the float API that made sense
<sevenseacat> apeiros: sorry, just a reference to a significant-figures debate we had before
<apeiros> hm, that one is incomplete, though. it'll not turn 5.0 into 5
<realcasually> i tried to write something with a bunch of % functions, but the float precision bit me
<apeiros> sevenseacat: ah. missed that.
lkba has joined #ruby
gazzik has quit [Ping timeout: 240 seconds]
cubicme has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
soheil has quit [Ping timeout: 240 seconds]
funburn has quit [Quit: funburn]
cubicme has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
tesuji has joined #ruby
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<realcasually> seems odd there isnt a way to do that built it
carraroj has joined #ruby
araujo has joined #ruby
Kar- has quit [Ping timeout: 246 seconds]
ta has joined #ruby
Matip has joined #ruby
<realcasually> *built in
Hanmac has joined #ruby
<apeiros> um, not really
<apeiros> usually you want a specific precision
<apeiros> not a "oh once I'd like this, the other time I'd like that"
Xeago has quit [Ping timeout: 260 seconds]
<Hanmac> hihihi apeiros i found a new "toy" … i played with NaN a bit … did you know that "-@" can do to an NaN ? ;P
<apeiros> what you do is basically robbing the viewer of the information, how precise your numbers actually are.
<apeiros> hanmac: I'd expect it to return NaN?
timonv has quit [Ping timeout: 248 seconds]
<apeiros> since all mathematical operations with NaN should result in NaN
<Hanmac> yes and no
<Hanmac> >> [[Float::NAN].pack("g"), [0.0/0.0].pack("g"), [-(0.0/0.0)].pack("g")]
<eval-in_> Hanmac => ["\x7F\xC0\0\0", "\xFF\xC0\0\0", "\x7F\xC0\0\0"] (https://eval.in/53166)
iliketurtles has quit [Quit: zzzzz…..]
<apeiros> o0
locriani has joined #ruby
<apeiros> ok, interesting. but not interesting enough for me to go read IEEE 754
<Hanmac> other operations like NaN +/- other return the same as self, but -@ is a little bit different
Mattx has quit [Ping timeout: 264 seconds]
<Hanmac> apeiros: it seems that -@ is used in ruby to turn an loud nan into an quiet one … (hm it may be not 100% correct for that IEEE one .. )
<realcasually> apeiros: on a mobile device, and when 2 digits tends to be rare, it is a better use of the space
tobago has joined #ruby
<realcasually> the point isnt to justify if you would do it the same as me, its to figure out if ruby offers an option
olivier_bK has joined #ruby
<Hanmac> apeiros: i make a ticket for that to make it more clear: https://bugs.ruby-lang.org/issues/8994
<apeiros> realcasually: I have a better term for that: it's an inconsistent use of the space
<realcasually> yep, optimized for the mainline case
<realcasually> yet still supporting some edge cases
<apeiros> realcasually: look, it's your thing. I told you why there's no pre-made tool to do what you want (because it's usually not a good idea). you can accept it or go all around how what you do is a good idea anyway.
codecop has joined #ruby
jbpros has joined #ruby
sectionme has joined #ruby
dankest has quit [Quit: dankest]
ta has quit [Remote host closed the connection]
<Hanmac> shevy: you are so quiet, are you an NaN too? ;D
vlad_starkov has joined #ruby
iIlL10Oo has joined #ruby
<iIlL10Oo> how to convert a integer to ipaddr ?
shvelo has joined #ruby
Zeeraw has joined #ruby
lyanchih_ has quit [Quit: lyanchih_]
Ahti333 has joined #ruby
<heftig> iIlL10Oo: IPAddr.new(i, Socket::AF_INET)
<Hanmac> iIlL10Oo: what kind of integer and what kind of ipaddr?
petey has quit [Remote host closed the connection]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
petey has joined #ruby
aryaching has quit [Ping timeout: 245 seconds]
marcdel_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
varfoo has quit [Quit: WeeChat 0.4.0]
supergeek has joined #ruby
varfoo has joined #ruby
Davey_ has joined #ruby
petey has quit [Ping timeout: 248 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_sta_ has joined #ruby
rezzack has quit [Quit: Leaving.]
Davey has quit [Ping timeout: 240 seconds]
nutella has joined #ruby
nutella is now known as Guest41387
relix has joined #ruby
beilabs has quit [Ping timeout: 268 seconds]
<Ahti333> is there someone in here who is familiar with the details of building ruby? I am getting a bunch of undefined symbol errors during linking. all of them start with _RUBY_TRACE
<Ahti333> i can not find where these functions should be defined, so i am a bit confused about why they are used in a bunch of places in ruby code
beilabs has joined #ruby
<Ahti333> *_RUBY_DTRACE
jonahR has quit [Quit: jonahR]
<realcasually> apeiros: a=num.round(2).to_s; a.chop! while a.length > 1 and (a.end_with? '.' or a.end_with? '0');
thomasvs has joined #ruby
thomasvs has quit [Changing host]
thomasvs has joined #ruby
snovak has joined #ruby
gyre007 has joined #ruby
ta has joined #ruby
Guest41387 has quit [Ping timeout: 248 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
aryaching has joined #ruby
blaxter_ has joined #ruby
shanlar- has joined #ruby
elaptics`away is now known as elaptics
bpgoldsb has quit [Ping timeout: 246 seconds]
shanlar has quit [Ping timeout: 245 seconds]
pencilcheck has joined #ruby
<iIlL10Oo> heftig: thank you , it works
jaikeerthi1 has joined #ruby
pen has quit [Ping timeout: 240 seconds]
Bry8Star{T2 has quit [Remote host closed the connection]
jaikeerthi has quit [Ping timeout: 245 seconds]
vpretzel has joined #ruby
adeponte has quit [Remote host closed the connection]
bpgoldsb has joined #ruby
adeponte has joined #ruby
realcasually has quit [Quit: Page closed]
timonv has joined #ruby
ged has quit [Ping timeout: 245 seconds]
Bry8Star{T2 has joined #ruby
vpretzel has quit [Ping timeout: 246 seconds]
iIlL10Oo has left #ruby [#ruby]
mengu has quit [Read error: No route to host]
mengu has joined #ruby
adeponte has quit [Ping timeout: 264 seconds]
ephemerian has joined #ruby
<shevy> hanmac just got home from a biochemistry lecture
lyanchih has joined #ruby
<Hanmac> shevy: i am sorry but i need to tell you that there is also one of my requests in ruby core … https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/43107
ukd1 has quit [Remote host closed the connection]
Davey_ has quit [Quit: Computer has gone to sleep.]
ukd1 has joined #ruby
<shevy> hanmac do you micro-optimize now? :P
barratt has joined #ruby
einarj has joined #ruby
<shevy> I want mruby finished!
<Hanmac> shevy: no i looked at the Changelog and see some stuff commited that i requested 7 month ago
locriani has quit [Ping timeout: 240 seconds]
<shevy> hehe
snovak has quit [Ping timeout: 245 seconds]
gja has joined #ruby
<Hanmac> i mean i didnt had it on the radar anymore ;D
<Hanmac> shevy: did you see my pun .. ah i mean fun with NaN objects and the -@ method? ;D
ftiasch has joined #ruby
marcgg_ has joined #ruby
Zeeraw has quit [Quit: Computer has gone to sleep.]
ftiasch has left #ruby [#ruby]
<shevy> half the time I have no idea what you are talking about :P
<Hanmac> xD
ukd1 has quit [Ping timeout: 264 seconds]
alup has joined #ruby
varfoo has quit [Read error: Connection reset by peer]
Mon_Ouie has quit [Ping timeout: 264 seconds]
supergeek has quit [Quit: Leaving]
varfoo has joined #ruby
marcgg has quit [Ping timeout: 245 seconds]
pencilcheck has quit [Read error: Connection reset by peer]
leonidlm has joined #ruby
joshwines_ has joined #ruby
pen has joined #ruby
jaikeerthi1 has quit [Quit: Leaving.]
aagdbl has quit [Quit: Leaving.]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
codecop has quit [Quit: Išeinu]
dangerousdave has joined #ruby
tziOm has joined #ruby
thomasvs has quit [Read error: Operation timed out]
thomasvs has joined #ruby
thomasvs has quit [Changing host]
thomasvs has joined #ruby
timonv has quit [Remote host closed the connection]
noname001 has joined #ruby
tatsuya_o has joined #ruby
jlebrech has joined #ruby
bluenemo has joined #ruby
noname001 has quit [Remote host closed the connection]
shaunbaker has joined #ruby
arturaz has quit [Read error: Connection reset by peer]
noname001__ has joined #ruby
arturaz has joined #ruby
blackmesa has joined #ruby
apfelbox has joined #ruby
apfelbox has quit [Remote host closed the connection]
jb41 has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
mengu has quit [Read error: No route to host]
mengu has joined #ruby
denysonique has joined #ruby
ehaliewicz has quit [Read error: No route to host]
St_Marx has quit [Ping timeout: 240 seconds]
Zai00 has joined #ruby
nari has quit [Ping timeout: 245 seconds]
Kar- has joined #ruby
TheNumb has joined #ruby
sergicles has joined #ruby
mcrmfc has joined #ruby
kil0byte has joined #ruby
Dave has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
Dave is now known as Guest43122
workmad3 has joined #ruby
buibex has joined #ruby
kung has joined #ruby
jb41 has quit [Ping timeout: 260 seconds]
adambeynon has joined #ruby
funburn has joined #ruby
sheerun has joined #ruby
SkuliOskarsson has joined #ruby
io_syl has quit []
xcv has joined #ruby
p8952 has quit [Remote host closed the connection]
xcv has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 248 seconds]
mengu has quit [Remote host closed the connection]
faoiseamh has joined #ruby
senayar has joined #ruby
pjackson_desktop has quit [Ping timeout: 260 seconds]
tatsuya__ has joined #ruby
nutella has joined #ruby
nutella is now known as Guest11973
ananthakumaran has quit [Ping timeout: 240 seconds]
PLejeck has quit [Changing host]
PLejeck has joined #ruby
nari has joined #ruby
fschuindt has quit [Quit: Computer has gone to sleep.]
sevenseacat has quit [Quit: Leaving.]
PLejeck is now known as Nuck
tatsuya_o has quit [Ping timeout: 248 seconds]
ananthakumaran has joined #ruby
dziga has joined #ruby
poisonarms has quit [Quit: Computer has gone to sleep]
marwan__ has joined #ruby
marwa535 has joined #ruby
snovak has joined #ruby
nomenkun has joined #ruby
Guest11973 has quit [Ping timeout: 245 seconds]
jfelchner has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
ahawkins_ has joined #ruby
aagdbl has joined #ruby
jfelchner has joined #ruby
wildroman has joined #ruby
sjltaylo_ has joined #ruby
ahawkins has quit [Ping timeout: 248 seconds]
sjltaylo_ has quit [Remote host closed the connection]
wildroman has quit [Remote host closed the connection]
vpretzel has joined #ruby
sjltaylo_ has joined #ruby
wildroman has joined #ruby
obs has joined #ruby
Stygia has joined #ruby
skaflem has joined #ruby
sjltaylo_ has quit [Ping timeout: 248 seconds]
buibex has quit [Remote host closed the connection]
vpretzel has quit [Ping timeout: 264 seconds]
locriani has joined #ruby
amacgregor__ has joined #ruby
amacgregor_ has quit [Ping timeout: 248 seconds]
marcgg has joined #ruby
xk_id has joined #ruby
pen has quit [Remote host closed the connection]
blaxter_ is now known as blaxter
xcv has joined #ruby
decoponio has joined #ruby
adeponte has joined #ruby
marcgg_ has quit [Ping timeout: 245 seconds]
zarubin has joined #ruby
user258467 has quit [Ping timeout: 268 seconds]
ewnd9 has joined #ruby
slevinn has left #ruby [#ruby]
mklappstuhl has joined #ruby
shvelo has quit [Read error: Operation timed out]
jetblack has quit [Ping timeout: 240 seconds]
adeponte has quit [Ping timeout: 245 seconds]
xcv has quit [Remote host closed the connection]
snovak has quit [Ping timeout: 264 seconds]
xcv has joined #ruby
timonv has joined #ruby
ericmathison has quit [Ping timeout: 245 seconds]
user258467 has joined #ruby
ssvo has joined #ruby
wallerdev has quit [Quit: wallerdev]
gregj has quit [Changing host]
gregj has joined #ruby
Muz_ is now known as Muz
xcv has quit [Ping timeout: 240 seconds]
<xybre> Can I IO#read_nonblock everything available? Or do I need to just set the length to some absurdly high value.
bnagy_ is now known as bnagy
dhruvasagar has quit [Read error: Connection reset by peer]
mklappstuhl has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
mikeric has quit []
<bnagy> xybre: .. think about what you just said
ssvo has quit [Ping timeout: 256 seconds]
<xybre> IO#read_nonblock requires a maxlen argument.
<bnagy> "hi is everything available yet" "no." "how about now?"
<Hanmac> xD
<xybre> I want everything thats currently buffered without blocking.
<olivier_bK> i try to make a ssh connection in ruby but all the time i get this (Net::SSH::AuthenticationFailed)
<olivier_bK> i try to pass my ssh_key
<xybre> I don't mean EOF.
akemrir has joined #ruby
poison has joined #ruby
<apeiros> xybre: absurdly high value
<Hanmac> like Infinity + 1? :D
<apeiros> alternatively: buffer until it raises the "try again later" exception
<apeiros> then you actually know that there's nothing left
SkuliOskarsson has quit [Quit: SkuliOskarsson]
<Hanmac> you mean like in the banks of the usa? ;P
<xybre> I was thinking I could do `while has_data? do; string << io.read_nonblock(1024); end` (where has_data? is a wrapper around IO.select) but I thought there might be a better way.
<workmad3> hanmac: Infinity + 1 == Infinity :P
<apeiros> usa? that 3rd world country?
<funburn> apeiros: I just wanted to follow up on my query earlier. I found that I could get what I trying for with this time.to_i + time.gmt_offset
arturaz has quit [Ping timeout: 246 seconds]
<Hanmac> workmad3: look at this:
<Hanmac> >> [[Float::NAN].pack("g"), [0.0/0.0].pack("g"), [-(0.0/0.0)].pack("g")]
<eval-in_> Hanmac => ["\x7F\xC0\0\0", "\xFF\xC0\0\0", "\x7F\xC0\0\0"] (https://eval.in/53169)
<apeiros> funburn: gah! I thought of Time#offset, but that didn't exist. didn't think of gmt_offset
<bnagy> xybre: I've always just used threads or wrapped reactors
<apeiros> funburn: good you found it!
<funburn> thank dog for documentation :)
arturaz has joined #ruby
* apeiros bows to almighty dog
<funburn> :)
<workmad3> hanmac: what about it?
Guest44566 has joined #ruby
varfoo has quit [Quit: WeeChat 0.4.0]
<xybre> bnagy: Yeah, for some reason Rubinius doesn't implement one of the Socket methods I'm using so threading becomes problematic.
<xybre> (rather, so I'm using MRI)
varfoo has joined #ruby
<bnagy> eh?
pedda has joined #ruby
<Hanmac> that the -@ function alters the NaN … imo should not do that
<workmad3> hanmac: no, the odd thing is that the middle value is different ;)
amacgregor__ has quit [Ping timeout: 240 seconds]
<Hanmac> hm no its the -@ function on the NaN object that alters the third from the second
<workmad3> hanmac: for some reason '0.0/0.0' gives you a different NaN to 'Float::NAN'
<workmad3> hanmac: first and third values are the same
<workmad3> hanmac: second one is different
<apeiros> http://de.wikipedia.org/wiki/NaN says it's actually legit
<Hanmac> thats because Float::NAN is a quiet one, and 0.0 / 0.0 is not …
<workmad3> hanmac: first is a straight Float::NAN... so why is that different to 0.0/0.0
<apeiros> you can have a number of different values which all mean NaN
* apeiros off for lunch
<Hanmac> workmad3: i make a ticket about it https://bugs.ruby-lang.org/issues/8994
<xybre> bnagy: Rubinius doesn't implement TCPSocket#connect_address
Xeago has joined #ruby
<workmad3> hanmac: ok, so -(0.0/0.0) is a quiet NaN
<workmad3> hanmac: and 0.0/0.0 isn't
<workmad3> hanmac: which seems correct
SkuliOskarsson has joined #ruby
<bnagy> xybre: that's on basicsocket, no?
<workmad3> hanmac: a signalling NaN should, if appropriate, be converted into a quiet NaN by an operation
Xeago_ has joined #ruby
senayar has quit [Remote host closed the connection]
jaikeerthi has joined #ruby
<xybre> bnagy: Yes, but that's the error Rubinius displays.
senayar has joined #ruby
<bnagy> does it have local_address?
<bnagy> like.. all that does is give you an addrinfo, no?
<bnagy> there's a million ways to get those
<Hanmac> workmad3: hm yeah but i dont think -@ is the right operation for that … (beause thats two different flags in the value)
jhn has quit [Ping timeout: 264 seconds]
<bnagy> pack it by hand if you have to..
<xybre> bnagy: I assume the difference is that TCPServer.open(port).accept returns a TCPSocket in Rubinius, but a BasicSocket in MRI.
<xybre> bnagy: Yes, I just am not working on that codebase right now and so haven't changed lanes to tackle finding a different method.
<bnagy> *shrug* I never used TCPSocket tbh
<workmad3> hanmac: 'Floating point operations on a signaling NaN (sNaN) signal an invalid operation exception, the default exception action is then the same as for qNaN operands and they produce a qNaN if producing a floating point result.'
<bnagy> always seemed like gumf
locriani has quit [Ping timeout: 240 seconds]
Xeago has quit [Ping timeout: 245 seconds]
<bnagy> Socket is a wafer thin socket wrapper, adding a micron via TCPSocket is kinda lame
<xybre> Well.. if I want to use TCP sockets, thats the only way I'm aware of to do them in Ruby.
<workmad3> hanmac: seems correct to me
<bnagy> xybre: just use Socket
user258467 has quit [Ping timeout: 248 seconds]
<xybre> bnagy: Whats the difference?
<bnagy> TCPSocket is some pure ruby hand wavy shit
nari has quit [Ping timeout: 256 seconds]
mrnugget has quit [Quit: mrnugget]
<bnagy> Socket is a straightline socket.h port more or less
<bnagy> well wrap not port
senayar has quit [Ping timeout: 245 seconds]
<Hanmac> workmad3: wikipedia says: "For example, a bit-wise IEEE floating-point standard single precision (32-bit) NaN would be: s111 1111 1axx xxxx xxxx xxxx xxxx xxxx where s is the sign (most often ignored in applications), a determines the type of NaN, and x is an extra payload (most often ignored in applications). If a = 1, it is a quiet NaN; if a is zero and the payload is nonzero, then it is a signaling NaN." … so i think -@ should alter "s" an
<xybre> s.connect Socket.pack_sockaddr_in(80, 'example.com') # I think I'll pass
<bnagy> xybre: well sockaddr is sockaddr, it's not like _super_ tricky
<bnagy> but yes, Socket is ugly
chinkung has joined #ruby
<xybre> Well, in all fairness I'm going to build a wrapper around TCPSocket anyway.
<bnagy> hence all the rainbow shiny ruby gems to do every kind of socket IO with DSLs and all
<xybre> I haven't seen a good gem for that, I've seens lots of gems, but they're mostly chained to one platform and don't really cover a lot of ground.
kung has quit [Ping timeout: 240 seconds]
snovak has joined #ruby
senayar has joined #ruby
aagdbl has quit [Read error: Connection reset by peer]
aagdbl1 has joined #ruby
kung has joined #ruby
<bnagy> anyways, bedtime out here :)
aagdbl has joined #ruby
aagdbl1 has quit [Read error: Connection reset by peer]
senayar has quit [Remote host closed the connection]
ferdev has quit [Quit: ferdev]
senayar has joined #ruby
gja has quit [Ping timeout: 240 seconds]
chinkung has quit [Ping timeout: 245 seconds]
avril14th has joined #ruby
mengu has joined #ruby
Deele has joined #ruby
aagdbl1 has joined #ruby
aagdbl has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
jaikeerthi has quit [Ping timeout: 268 seconds]
senayar has quit [Ping timeout: 264 seconds]
mrnugget has joined #ruby
nutella has joined #ruby
gyzmodo has joined #ruby
nutella is now known as Guest41315
Xaitec has joined #ruby
Guest41315 has quit [Ping timeout: 246 seconds]
Guest44566 has quit [Remote host closed the connection]
ged has joined #ruby
andikr has joined #ruby
jkline has joined #ruby
johchri has joined #ruby
dash_ has joined #ruby
gja has joined #ruby
vpretzel has joined #ruby
wudofyr has quit [Remote host closed the connection]
ferdev has joined #ruby
wudofyr has joined #ruby
kitak has joined #ruby
lyanchih has quit [Quit: lyanchih]
sheerun has quit [Quit: Textual IRC Client: www.textualapp.com]
Xaitec has quit [Read error: Connection reset by peer]
kitak_ has quit [Read error: Connection reset by peer]
snovak has quit [Ping timeout: 264 seconds]
vpretzel has quit [Ping timeout: 245 seconds]
Xaitec has joined #ruby
AzizLight has joined #ruby
mrnugget has quit [Quit: mrnugget]
schaerli has joined #ruby
codecop has joined #ruby
jaikeerthi has joined #ruby
kil0byte_ has joined #ruby
allanm__ has quit [Read error: Connection reset by peer]
allanm has joined #ruby
xcv has joined #ruby
aagdbl1 is now known as aagdbl
beilabs has quit [Ping timeout: 264 seconds]
jaikeerthi has quit [Quit: Leaving.]
kil0byte has quit [Ping timeout: 240 seconds]
narcan has joined #ruby
Heero has quit [Read error: Connection reset by peer]
Heero has joined #ruby
Heero has quit [Changing host]
Heero has joined #ruby
tvw has joined #ruby
beilabs has joined #ruby
Xaitec has quit [Read error: Connection reset by peer]
cubicme has quit [Read error: Connection reset by peer]
cubicme has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
Xaitec has joined #ruby
cads has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby
haxrbyte has joined #ruby
r0bby_ has quit [Read error: Operation timed out]
haxrbyte has quit [Remote host closed the connection]
narcan has quit [Ping timeout: 248 seconds]
r0bby_ has joined #ruby
buibex has joined #ruby
levin has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
mrnugget has joined #ruby
Hganavak has quit [Quit: Leaving]
levin is now known as Guest8398
Xaitec has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby
nari has joined #ruby
Asher has quit [Ping timeout: 240 seconds]
johchri has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aryaching has quit []
jkline has quit [Quit: jkline]
codecop has quit [Remote host closed the connection]
mupkoo has quit [Remote host closed the connection]
nat2610 has quit [Quit: Leaving.]
ixti has joined #ruby
jbpros has quit [Quit: jbpros]
snovak has joined #ruby
keanehsiao has joined #ruby
lyanchih has joined #ruby
funburn has quit [Quit: funburn]
blackmesa has quit [Ping timeout: 240 seconds]
atno has joined #ruby
Asher has joined #ruby
locriani has joined #ruby
kil0byte_ has quit [Ping timeout: 240 seconds]
diegoviola has quit [Quit: WeeChat 0.4.1]
kil0byte has joined #ruby
locriani has quit [Ping timeout: 264 seconds]
xk_id has quit [Quit:
cutmail_ has quit [Remote host closed the connection]
snovak has quit [Ping timeout: 240 seconds]
cutmail has joined #ruby
cutmail has quit [Read error: Connection reset by peer]
skogis has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
cutmail has joined #ruby
dhruvasagar has joined #ruby
skogis has quit [Client Quit]
fijimunkii has quit [Read error: Connection reset by peer]
skogis has joined #ruby
<_br_> What is the go-to solution if I want to integrate Twitter/Facebook login into a Sinatra based site that already uses Warden?
leonidlm has quit [Ping timeout: 240 seconds]
shvelo has joined #ruby
aSuit has joined #ruby
Kar- has quit [Ping timeout: 268 seconds]
aSuit has quit [Quit: Leaving]
aSuit has joined #ruby
butblack has joined #ruby
senayar has joined #ruby
skaflem has quit [Quit: Leaving]
lkba has joined #ruby
skaflem has joined #ruby
haxrbyte has joined #ruby
zarubin has quit [Read error: Operation timed out]
k5673 has joined #ruby
butblack has quit [Ping timeout: 264 seconds]
chairabanta has joined #ruby
kaspergrubbe has joined #ruby
mklappstuhl has joined #ruby
vpretzel has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
haxrbyte has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]
beilabs has quit [Read error: Operation timed out]
mlpinit has joined #ruby
vpretzel has quit [Ping timeout: 248 seconds]
kil0byte has quit [Ping timeout: 245 seconds]
kil0byte has joined #ruby
rdark has quit [Ping timeout: 256 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
michael_mbp is now known as zz_michael_mbp
dhruvasagar has joined #ruby
<bonhoeffer> \exit
bonhoeffer has quit [Quit: Leaving]
rdark has joined #ruby
nari has quit [Ping timeout: 240 seconds]
mklappstuhl has quit [Ping timeout: 248 seconds]
<jmaister> /part and /quit sat in a boat. /part fell out, who was left?
<aagdbl> lol
SkuliOskarsson has quit [Quit: SkuliOskarsson]
<aagdbl> {left: /quit/}
<_br_> cute
SkuliOskarsson has joined #ruby
snovak has joined #ruby
WillAmes has quit [Remote host closed the connection]
SkuliOskarsson has quit [Client Quit]
WillAmes has joined #ruby
varfoo has quit [Quit: WeeChat 0.4.0]
SkuliOskarsson has joined #ruby
cubicme has quit [Read error: Connection reset by peer]
cubicme has joined #ruby
ssvo has joined #ruby
gja has joined #ruby
beilabs has joined #ruby
nari has joined #ruby
gja has quit [Client Quit]
aleron has joined #ruby
razi has joined #ruby
nat2610 has joined #ruby
<shevy> jmaister I once fell for /join #0
<jmaister> hirr
ssvo has quit [Ping timeout: 240 seconds]
<jmaister> That's almost as good as `sudo rm -fr /`
ewnd9 has quit [Ping timeout: 246 seconds]
pygospa has quit [Ping timeout: 246 seconds]
aagdbl has quit [Quit: Leaving.]
Ahti333 has quit [Ping timeout: 264 seconds]
SkuliOskarsson has quit [Quit: SkuliOskarsson]
pygospa has joined #ruby
Guest63811 has quit [Ping timeout: 245 seconds]
SkuliOskarsson has joined #ruby
sk87 has joined #ruby
pen has joined #ruby
<xybre> /quit was left
Ahti333 has joined #ruby
raar has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
raar is now known as Guest18130
dhruvasagar has joined #ruby
snovak has quit [Ping timeout: 248 seconds]
dash_ has quit [Ping timeout: 240 seconds]
jbpros has joined #ruby
habanany has joined #ruby
darkc0met has quit [Quit: ZNC - http://znc.in]
slevinn has joined #ruby
dash_ has joined #ruby
Ahti333 has quit [Ping timeout: 248 seconds]
Ahti333 has joined #ruby
Kar- has joined #ruby
AzizLight has quit [Ping timeout: 248 seconds]
locriani has joined #ruby
kil0byte_ has joined #ruby
ravster has joined #ruby
chairabanta has quit [Quit: Leaving...]
marwa535 has quit [Ping timeout: 240 seconds]
marwan__ has quit [Ping timeout: 264 seconds]
ldnunes has joined #ruby
darkc0met has joined #ruby
kil0byte has quit [Ping timeout: 240 seconds]
locriani has quit [Ping timeout: 256 seconds]
vlad_sta_ has quit [Remote host closed the connection]
funburn has joined #ruby
jibi has joined #ruby
marwan__ has joined #ruby
marwa50 has joined #ruby
dhruvasagar has quit [Ping timeout: 268 seconds]
sectionme has quit [Ping timeout: 268 seconds]
ghr has quit [Quit: Textual IRC Client: www.textualapp.com]
ghr has joined #ruby
endash has quit [Quit: endash]
jetblack has joined #ruby
g0bl1n has joined #ruby
user258467 has joined #ruby
schaerli has quit [Remote host closed the connection]
lyanchih has quit [Ping timeout: 248 seconds]
schaerli has joined #ruby
lyanchih has joined #ruby
hside has quit [Remote host closed the connection]
gyre008 has joined #ruby
hside has joined #ruby
<hugohagogo> aloha
kvirani has joined #ruby
<olivier_bK> hi
gyre007 has quit [Read error: No route to host]
lyanchih has quit [Client Quit]
slevinn has quit [Quit: slevinn]
schaerli has quit [Ping timeout: 246 seconds]
kil0byte has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
NicolasTarzia has quit [Ping timeout: 240 seconds]
snovak has joined #ruby
kil0byte_ has quit [Ping timeout: 268 seconds]
rdark has quit [Ping timeout: 264 seconds]
AzizLight has joined #ruby
sk87 has joined #ruby
dash_ has quit [Ping timeout: 268 seconds]
johchri has joined #ruby
cmarques has joined #ruby
rdark has joined #ruby
vpretzel has joined #ruby
snovak has quit [Ping timeout: 248 seconds]
xcv has quit [Remote host closed the connection]
kvirani has quit [Remote host closed the connection]
Squarepy has joined #ruby
xcv has joined #ruby
cutmail has quit [Remote host closed the connection]
TMM has joined #ruby
TMM has quit [Changing host]
TMM has joined #ruby
kevinykchan has joined #ruby
jb41 has joined #ruby
<TMM> xybre, did you have a chance to look at my suggested implementation? I'd really appreciate some of your feedback if you have the time
keanehsiao has quit [Quit: keanehsiao]
kvirani has joined #ruby
r0bby_ has quit [Ping timeout: 245 seconds]
vpretzel has quit [Ping timeout: 264 seconds]
dash_ has joined #ruby
xcv has quit [Ping timeout: 265 seconds]
kevinykchan has quit [Client Quit]
asobrasil has joined #ruby
jkamenik has joined #ruby
scmaccal has quit [Ping timeout: 240 seconds]
ewnd9 has joined #ruby
aagdbl has joined #ruby
GeissT has quit [Quit: MillBroChat AdIRC User]
akesterson has joined #ruby
shevy is now known as ClappyHappy
St_Marx has joined #ruby
funburn has quit [Quit: funburn]
<akesterson> I have a library that appears to be calling exit() when it hits an error (mcollective gem, rpc client, failing to read the config file and it's dying), but rescue SystemExit isn't catching it ... It's definitely exiting, however, a 'puts' immediately after the failing line does not print ... what can I do to catch this exit and stop it from killing my program, and fail gracefully?
mklappstuhl has joined #ruby
kil0byte_ has joined #ruby
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
zz_michael_mbp is now known as michael_mbp
scmaccal has joined #ruby
kil0byte has quit [Ping timeout: 252 seconds]
scmaccal has quit [Excess Flood]
breakingthings has joined #ruby
<apeiros> akesterson: you can smack the developer and tell him to do better. and to solve your problem without violence, you can monkey-patch Kernel#exit
rahulkmr has joined #ruby
<apeiros> though, a `rescue SystemExit` worked nicely here
<_br_> Maybe of type fatal?
<akesterson> 'rescue SystemExit' didn't catch it
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
allsystemsarego has joined #ruby
<akesterson> I opened the source after asking the question, and they're doing 'exit!' which apparently 'rescue SystemExit' and 'rescue Exception' doesn't catch
<apeiros> or exit!, not exit
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
<akesterson> but thankfully there is an undocumented flag on the initializer to prevent that behavior, so that solved the problem
hasrb has joined #ruby
senayar has quit [Remote host closed the connection]
<akesterson> I may go and smack the developer anyway tho :)
<apeiros> akesterson: correct. exit! is non-rescuable.
senayar has joined #ruby
scmaccal has joined #ruby
<apeiros> don't use the term `catch`, it means something different in ruby.
scmaccal has quit [Excess Flood]
<_br_> Yeah, still waiting for 'punch-over-tcpip' for this kind of nonsense.
<apeiros> also electrocute-over-tcpip-via-keyboard
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<_br_> oh yeah, big like
* apeiros thinks of 7of9 and an uncooperative alien
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
<_br_> stvoy?
peregrine81 has joined #ruby
sectionme has joined #ruby
Guest43122 has quit [Quit: Linkinus - http://linkinus.com]
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
mobileblue has quit [Read error: Connection reset by peer]
<_br_> She actually fainted during the first few episodes due to the suit making it difficult to breathe.
BizarreCake has joined #ruby
soba has quit [Ping timeout: 248 seconds]
jamescarr has joined #ruby
habanany has quit [Ping timeout: 240 seconds]
hogeo has quit [Remote host closed the connection]
<apeiros> _br_: yes. when she electroshocked that guy remotely because he was uncooperative.
<apeiros> and yes, stvoy
senayar has quit [Ping timeout: 252 seconds]
hogeo has joined #ruby
<apeiros> heh, didn't know about her fainting. poor her.
slevinn has joined #ruby
<_br_> ah
<workmad3> she had to be sewn into it for filming, didn't she?
akesterson has left #ruby [#ruby]
vishal has quit [Remote host closed the connection]
<_br_> Bodycast :D
<apeiros> workmad3: well, there have been worse costumes…
vishal has joined #ruby
<_br_> really?
<apeiros> didn't worf spend like hours in the mask?
<_br_> ah true
ClappyHappy is now known as shevy
burlyscudd has joined #ruby
kaldrenon has joined #ruby
mlpinit has quit [Remote host closed the connection]
Xeago_ has quit [Remote host closed the connection]
mlpinit has joined #ruby
mark_locklear has joined #ruby
kil0byte has joined #ruby
hogeo has quit [Ping timeout: 268 seconds]
PeNNyWiSe182__ has joined #ruby
jamescarr has quit [Quit: jamescarr]
vishal has quit [Ping timeout: 248 seconds]
tobiasvl has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
atno has quit [Remote host closed the connection]
tvl has joined #ruby
kil0byte_ has quit [Ping timeout: 248 seconds]
tvl is now known as tobiasvl
dangerousdave has joined #ruby
someish has joined #ruby
dash_ is now known as d45h
habanany has joined #ruby
cody-- has joined #ruby
nwertman_ has quit [Ping timeout: 246 seconds]
cody-- has quit [Read error: Connection reset by peer]
alx- has joined #ruby
cody-- has joined #ruby
St_Marx has quit [Remote host closed the connection]
vpretzel has joined #ruby
locriani has joined #ruby
vpretzel has quit [Read error: Connection reset by peer]
vpretzel has joined #ruby
mengu has quit [Remote host closed the connection]
amacgregor has joined #ruby
mengu has joined #ruby
nutella has joined #ruby
nutella is now known as Guest99650
schaerli has joined #ruby
r0bby_ has joined #ruby
v0n has joined #ruby
gyre008 has quit [Remote host closed the connection]
locriani has quit [Ping timeout: 268 seconds]
angusiguess has joined #ruby
habanany has quit [Remote host closed the connection]
jaynewstrom has joined #ruby
mengu has quit [Ping timeout: 260 seconds]
razi has quit [Quit: Leaving.]
amacgregor has quit [Ping timeout: 248 seconds]
mrnugget has quit [Quit: mrnugget]
senayar has joined #ruby
tomzx_mac has joined #ruby
AndChat| has joined #ruby
atSetKey has joined #ruby
jaikeerthi has joined #ruby
robbyoconnor has joined #ruby
r0bby_ has quit [Ping timeout: 248 seconds]
Banistergalaxy has quit [Ping timeout: 240 seconds]
sergicles has quit [Quit: sergicles]
aagdbl has quit [Read error: Connection reset by peer]
aagdbl has joined #ruby
mansi has joined #ruby
devoldmx has joined #ruby
Xeago has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
nyuszika7h has left #ruby ["WeeChat 0.4.2-rc2"]
iamjarvo has joined #ruby
ij has joined #ruby
darkc0met has quit [Quit: ZNC - http://znc.in]
devoldmx3 has quit [Ping timeout: 240 seconds]
iamjarvo has quit [Remote host closed the connection]
<TMM> https://gist.github.com/hpvb/6870084 <--- if anyone wants to critique that would be great
serp` has joined #ruby
ij has left #ruby ["WeeChat 0.4.1"]
lysw123 has joined #ruby
iamjarvo has joined #ruby
AzizLight has quit [Ping timeout: 248 seconds]
someish has quit [Quit: someish]
sergicles has joined #ruby
lysw123 has quit [Remote host closed the connection]
kay has joined #ruby
mobileblue has joined #ruby
lysw123 has joined #ruby
kay is now known as Guest65723
slevinn has quit [Quit: slevinn]
Guest99650 has quit [Ping timeout: 248 seconds]
<Hanmac> TMM: def define_attr(*attr); singleton_class.send(:attr_accessor,*attr); end
MrZYX|off is now known as MrZYX
atSetKey has quit [Remote host closed the connection]
snovak has joined #ruby
gja has joined #ruby
jerius has joined #ruby
mengu has joined #ruby
darkc0met has joined #ruby
banisterfiend has joined #ruby
gyre007 has joined #ruby
zenloop has joined #ruby
<Hanmac> TMM and you need to understand that the @@classes variable is shared between your LFactory and your CSFactory … (so they are the same for both)
someish has joined #ruby
sevenseacat has joined #ruby
cubicme has quit [Read error: Connection reset by peer]
lysw123 has left #ruby [#ruby]
cubicme has joined #ruby
T_T has joined #ruby
haxrbyte has joined #ruby
lkba has quit [Ping timeout: 240 seconds]
mklappstuhl has quit [Remote host closed the connection]
peregrine81 has quit []
mklappstuhl has joined #ruby
serp` has quit [Quit: serp`]
tkuchiki has quit [Remote host closed the connection]
snovak has quit [Ping timeout: 248 seconds]
tkuchiki has joined #ruby
nwertman has joined #ruby
devoldmx3 has joined #ruby
lkba has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
cody-- has quit [Ping timeout: 248 seconds]
hashpuppy has joined #ruby
beilabs has quit [Ping timeout: 268 seconds]
duggiefresh has joined #ruby
johchri has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beilabs has joined #ruby
cody-- has joined #ruby
mklappstuhl has quit [Ping timeout: 256 seconds]
lyanchih has joined #ruby
tkuchiki has quit [Ping timeout: 268 seconds]
T_T has quit [Remote host closed the connection]
AzizLight has joined #ruby
Ox6abe has joined #ruby
ahawkins has joined #ruby
devoldmx3 has quit [Ping timeout: 264 seconds]
cubicme has quit [Read error: Connection reset by peer]
lyanchih has quit [Quit: lyanchih]
xcv has joined #ruby
philcrissman_ has joined #ruby
nutella_ has joined #ruby
cubicme has joined #ruby
peregrine81 has joined #ruby
snovak has joined #ruby
AzizLight has quit [Ping timeout: 268 seconds]
<tobiasvl> ugh don't use @@vars :(
AzizLight has joined #ruby
aganov has quit [Read error: Connection reset by peer]
carraroj has quit [Ping timeout: 248 seconds]
sambao21 has joined #ruby
aganov has joined #ruby
<Hanmac> someday ruby would have @@@vars … ;P
<kaldrenon> @@@vars are accessible even when your program isn't running.
<Hanmac> XXD
cody-- has quit [Quit: derp]
<sevenseacat> lol
johchri has joined #ruby
cmarques has quit [Remote host closed the connection]
<Hanmac> so they are available before the program is running? ;D
moeSeth__ has quit []
polaco_zZz is now known as polaco
ssvo has joined #ruby
moeSeth has joined #ruby
<tobiasvl> yes, they exist in Platon's ideal world
<tobiasvl> they're always the same in any ruby program ever
sailias has joined #ruby
robbyoconnor has quit [Ping timeout: 240 seconds]
robbyoconnor has joined #ruby
dzhulk has quit [Quit: Leaving.]
zenloop has quit [Quit: zenloop]
<kaldrenon> They're UberGlobals. They can be modified via REST API, SQL queries, reflection, and interpretive dance.
DrShoggoth has joined #ruby
AzizLight has quit [Remote host closed the connection]
banisterfiend has quit [Quit: Computer has gone to sleep.]
<Hanmac> hm if they are UberGlobals i think they should be like $$vars
mando has joined #ruby
kvirani has quit [Remote host closed the connection]
ssvo has quit [Ping timeout: 264 seconds]
kevind has joined #ruby
cubicme has quit [Read error: Connection reset by peer]
enebo has joined #ruby
<apeiros> hanmac: \@$!vars
zenloop has joined #ruby
mrsolo_ has joined #ruby
cubicme has joined #ruby
<Hanmac> XD
kobain has joined #ruby
<ccooke> That's just silly. I think it would be far better just to bring in global namespaces
<ccooke> For instance, $variable is visible in most of the code, while £variable only in parts. €variable might be visible in most of it, too, but not quite overlapping with $variable
noop has quit [Ping timeout: 264 seconds]
<ccooke> and a *true* global variable would be ¤variable
snovak_ has joined #ruby
someish has quit [Quit: someish]
Fire-Dragon-DoL has joined #ruby
<apeiros> please, it should be
<apeiros> and
<TMM> hanmac, I rely on those being shared between the different factories that's on purpose. Thanks for the attr_accessor thing, I didn't think you could do that for some reason
snovak has quit [Read error: Operation timed out]
<TMM> hanmac, do you like the way the factories work? would you write code like this?
<ccooke> apeiros: ... what glyph are those supposed to be? Doesn't seem to be visible here.
fijimunkii has joined #ruby
<apeiros> ccooke: http://imgur.com/qHNGU5C
<ccooke> *laugh*
<ccooke> nice
dkamioka has joined #ruby
<ccooke> Unfortunately my font doesn't have those glyphs
<apeiros> your font is so 2012
gazzik has joined #ruby
<sevenseacat> heh i didnt see those characters either
<ccooke> apeiros: that's just what I'd expect from a *ruby* developer ;-)
sectionme has quit [Ping timeout: 248 seconds]
freerobby has joined #ruby
jaikeerthi has quit [Quit: Leaving.]
ArchSteamOS is now known as ArchBeOS
mikepack has joined #ruby
<apeiros> you mean "developer"
<apeiros> we all know ruby "developers" are all "developers".
jaikeerthi has joined #ruby
<apeiros> only ASM *developers* are *developers*. the rest is developers.
interactionjaxsn has joined #ruby
<ccooke> no, no, I think the ruby part is the main problem.
<ccooke> I mean, it's a great language, but such a shame about the community
* ccooke grins
g0bl1n has quit [Quit: g0bl1n]
gazzik has quit [Ping timeout: 246 seconds]
lfox has joined #ruby
momomomomo has joined #ruby
zerun0_ has quit [Ping timeout: 246 seconds]
<Hanmac> apeiros: i thought ASM ones are *devilopers*
locriani has joined #ruby
<apeiros> no, no, malbolge is *evilopers*
<apeiros> d'oh, sorry, I accidentally the 'd'
<ccooke> hanmac: no, that's C developers who exploit undefined conditions
tobago has quit [Remote host closed the connection]
<Hanmac> ccooke: hm no the only shame is in the dark part of the rails ;P
<ccooke> hanmac: heh. There is some, there
brennanMKE has joined #ruby
<ccooke> I do have a few actual problems with the ruby community. The packaging issue, mainly.
<Hanmac> hm apeiros what do you think? should i make my own overload gem that supports method overloading? … (maybe with some magic i can get 'super' working)
<TMM> only bad C developers rely on UB
<apeiros> hanmac: errrr
* ccooke is primarily a sysadmin, and he really hates that his favourite language is such an absolute bastard to install sensibly on a server estate
<apeiros> hanmac: it's your time, up to you to waste it :-p
aagdbl has quit [Quit: Leaving.]
<ccooke> TMM: and when demons shoot out of their nose, it is their own fault
burlyscudd has quit [Quit: Leaving.]
<TMM> ccooke, use the puppetlabs ruby packages if you use RHEL, then use FPM to automatically package all your gems and dependencies into separate RPMs
ehc has joined #ruby
<TMM> ccooke, it's the most sensible way I've found to manage ruby-on-servers
<ccooke> TMM: yeah, we've started to use those.
zoee has quit [Quit: zoee]
<ccooke> I use Debian distros at home, though, which is a nightmare
momomomomo has quit [Client Quit]
<TMM> debian should be much easier
<ccooke> IT *should* be
<ccooke> but it isn't
<TMM> the alternatives system makes it quite easy to handle
<TMM> if you use debian packages of course :)
<ccooke> Too much of the ruby community thinks that rvm is an acceptable installation method
<TMM> it's acceptable for testing
mrsolo_ has quit [Ping timeout: 240 seconds]
DeanH has joined #ruby
locriani has quit [Ping timeout: 268 seconds]
<sevenseacat> yeah most people i know swear by rvm.
<ccooke> (I mean, it's a great developer and test tool, but it's terrible for end users or systems people)
<TMM> I like it on my development workstation a lot :)
petey has joined #ruby
<TMM> yeah, what we really need is multiple roots of version information on a production system
<TMM> if we could have a BUNCH that would be great
<TMM> /sarcasm
<ccooke> in fact, I think the biggest issue I have with ruby as a whole is that there's very little actual thought for how an end user could use the code
<Hanmac> i curse rvm but its useful on Mac (because of the better install and automatic compiler finding )
<TMM> rvm is fantastic on desktops and ci systems
<ccooke> rvm is not something you should ever recommend a non-developer use
<TMM> I really like that I can just run rspec for 1.8, 1.9 and 2.0 without any issues (and consistently show 2.0 beating the pants of 1.8 speed wise)
S0da has joined #ruby
<TMM> but yeah... rvm is no solution for keeping servers up to date or automating deployments etc.
<ccooke> I have some code that runs faster on 1.8 than 2.0. But that's okay, because it's awful code and the replacement is faster on 2.0 ;-)
kobain_ has joined #ruby
<TMM> I like to make tons of little objects :P
<TMM> 2.0's gc is so much better it's not even funny
<TMM> I wonder if it comes close to jruby now
<cout> cute wittle objjewcts
ananthakumaran has quit [Quit: Leaving.]
<ccooke> I should sort out rubinius packaging
<ccooke> it's looking really good
<TMM> my test suites don't pass on rubinius
<TMM> it's mostly just citrus actually
<TMM> maybe I should replace it with something else
kobain has quit [Read error: Connection timed out]
tjbarber has joined #ruby
tjbarber has joined #ruby
tjbarber has quit [Changing host]
s2013 has joined #ruby
<TMM> most of my one-shot code actually runs with "GC.disable" :) if it runs out of cron it doesn't get GC
<TMM> is my rule
<TMM> :)
<ccooke> heh
tabolario has joined #ruby
<ccooke> that makes sense
petey_ has joined #ruby
<ccooke> I don't think my code would be good for that
<ccooke> or that would be good for my code, even
mrsolo_ has joined #ruby
<TMM> it's not going to make it slower
<ccooke> My irc bot has been running for a couple of weeks now, for instance :-)
<TMM> that's for sure
<TMM> oh yeah, of course
razi has joined #ruby
ta has quit [Remote host closed the connection]
<TMM> this is for one-shot stuff daemons get GC :)
momomomomo has joined #ruby
petey has quit [Read error: Connection reset by peer]
<ccooke> heh
razi has quit [Read error: Connection reset by peer]
<ccooke> hmm. 1.3g virtual memory, 87m resident. No, I don't think I'll turn off GC for that.
nomenkun_ has joined #ruby
<TMM> it may help to disable gc before a request and enable it only just after
<ccooke> for a high-throughput server, aye
zerun0_ has joined #ruby
tomzx_mac has quit [Ping timeout: 260 seconds]
<TMM> I've never actually done this
<ccooke> I think it's better to have a good GC rather than much around
<TMM> there's going to be some stuff to consider wrt exceptions and whatnot
razi has joined #ruby
Matip has quit [Ping timeout: 248 seconds]
philcrissman_ has quit [Remote host closed the connection]
sectionme has joined #ruby
<ccooke> after all, turning off the GC for a request means you're *either* single threading your requests *or* eventually randomly enabling and disabling the GC all the time in the middle of other requests
<ccooke> better to code for minimal object creation and tune the GC for your workload
<ccooke> (although the tunables in ruby are nowhere near as mature as JAva, of course)
robbyoconnor has quit [Read error: Connection reset by peer]
johnnyfuchs has joined #ruby
nomenkun has quit [Ping timeout: 248 seconds]
mikepack has quit [Remote host closed the connection]
h_kon has quit [Remote host closed the connection]
yacks has joined #ruby
boboc has joined #ruby
AlSquire has joined #ruby
ukd1 has joined #ruby
v0n has quit [Quit: WeeChat 0.4.3-dev]
sectionme has quit [Ping timeout: 248 seconds]
v0n has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
dhruvasagar has joined #ruby
kindjal has joined #ruby
<apeiros> ccooke: some also never GC and just kill the process :)
rdark has quit [Ping timeout: 265 seconds]
SkuliOskarsson has quit [Ping timeout: 245 seconds]
lukec has joined #ruby
Senjai has joined #ruby
<Hanmac> yeah, write the ruby script that it force-kill itself if its finish ; P
Kar- has quit [Ping timeout: 264 seconds]
dangerousdave has quit [Quit: Leaving...]
razi has quit [Ping timeout: 265 seconds]
johnnyfuchs has quit [Quit: Leaving.]
buibex has quit [Remote host closed the connection]
St_Marx has joined #ruby
buibex has joined #ruby
razi1 has joined #ruby
snovak_ has quit [Remote host closed the connection]
cubicme has quit [Read error: Connection reset by peer]
slevinn has joined #ruby
buibex has quit [Read error: Connection reset by peer]
snovak has joined #ruby
buibex_ has joined #ruby
Senjai has quit [Ping timeout: 248 seconds]
<coderhs> hanmac: can we do that
<coderhs> :D
ta has joined #ruby
cubicme has joined #ruby
coderhs has quit [Quit: Leaving]
ij has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby
mrsolo_ has quit [Ping timeout: 268 seconds]
boboc has quit [Remote host closed the connection]
xjiujiu has quit [Read error: Connection reset by peer]
tziOm has quit [Remote host closed the connection]
<Morrolan> Have your script create tons of objects after it's done with its task, and wait for the system to kill the ruby process. ;)
<kaldrenon> What would be a clean way to sort an array of tuples by the second term? For example, if I have [[3,'b'], [1,'c'], [2,'a']], I want to get [[2,'a'], [3,'b'], [1,'c'] back from the sort
mando has quit [Remote host closed the connection]
razi1 has quit [Ping timeout: 256 seconds]
<apeiros> kaldrenon: ary.sort_by { |a,b| b }
<kaldrenon> apeiros: Haha, I just realized that right after I hit enter. THanks. :)
Aryasam has joined #ruby
<apeiros> alternatively: ary.sort_by(&:last)
newbiehacker has joined #ruby
<Hanmac> dam i wanted to type that! ;P
ij has left #ruby ["WeeChat 0.4.1"]
atSetKey has joined #ruby
<kaldrenon> I did ary.sort{ |a,b| a[1] <=> b[1] }
rahulkmr1 has joined #ruby
<Hanmac> kaldrenon: i think your variant is slower
<kaldrenon> Hm, interesting
bean has joined #ruby
cubicme has quit [Read error: Connection reset by peer]
arturaz has quit [Ping timeout: 256 seconds]
aryaching has joined #ruby
rahulkmr has quit [Ping timeout: 240 seconds]
nomenkun_ has quit [Remote host closed the connection]
<kaldrenon> I'm actually going to switch it to the &:last form - even if it's not a performance issue (the arrays in question are rarely > 10 elements), it prevents line wrap. :P
mrsolo_ has joined #ruby
nomenkun has joined #ruby
burlyscudd has joined #ruby
apeiros has quit [Remote host closed the connection]
ferdev has quit [Quit: ferdev]
atSetKey has quit [Ping timeout: 252 seconds]
someish has joined #ruby
<kaldrenon> Actually, that brings up a related question. So I'm doing this sort on the output of a map, so I have foo.map{|f| n = method_call(f); [f,n] if n }.compact.sort_by(&:last) - it occurs to me that I can probably clean that up
<kaldrenon> Can I fold the compacting and sorting into the block by changing the method I use, or similar?
slevinn has quit [Quit: slevinn]
Mon_Ouie has joined #ruby
zenloop has quit [Quit: zenloop]
tagrudev has quit [Remote host closed the connection]
Ox6abe has quit [Remote host closed the connection]
Ox6abe has joined #ruby
MrThePlague has joined #ruby
<kaldrenon> I suppose I can replace map with select and drop the compact.
St_Marx has quit [Remote host closed the connection]
burlyscudd has quit [Ping timeout: 240 seconds]
MrThePlague has quit [Remote host closed the connection]
sarbull has joined #ruby
St_Marx has joined #ruby
Ox6abe_ has joined #ruby
snovak_ has joined #ruby
d45h has quit [Quit: d45h]
sambao21 has joined #ruby
<kaldrenon> Wait, that doesn't work; I need the array of tuples, select gives me the original values
<kaldrenon> Sorry, I'll stop thinking out loud in the channel now. :P
<lectrick> I need someone to build a polynomial curve fit graph function for google docs. I'd do it myself but I don't have time. I'll be happy to pay them in BTC. :)
<sarbull> How should i handle "Cannot visit Proc"?
<Mon_Ouie> What gives you that error?
<waxjar> kaldrenon what does foo look like and what should it be mapped to?
slevinn has joined #ruby
johnnyfuchs has joined #ruby
nutella_ has quit [Ping timeout: 248 seconds]
mklappstuhl has joined #ruby
PeNNyWiSe182__ has quit [Read error: Operation timed out]
ffranz has joined #ruby
jbpros has quit [Quit: jbpros]
cody-- has joined #ruby
locriani has joined #ruby
serp` has joined #ruby
cubicme has joined #ruby
snovak has quit [Ping timeout: 268 seconds]
Ox6abe has quit [Ping timeout: 256 seconds]
<kaldrenon> waxjar: foo starts out as an array of ints. I call a method which will return a string if the int meets a condition, nil otherwise. The end result I want is an array of [int,string] tuples, sorted by the string.
Ox6abe_ has quit [Ping timeout: 248 seconds]
Senjai has joined #ruby
lukec has quit [Quit: lukec]
fmcgeough has joined #ruby
locriani has quit [Remote host closed the connection]
<kaldrenon> using foo.select successfully rejects nils, but returns the original int, not [int,string]
locriani has joined #ruby
<waxjar> something like foo.map { |int| [int, that_method int] }.reject { |_, string| string.nil? }.sort_by { |_, string| string } ?
yacks has quit [Read error: Operation timed out]
pen has quit [Remote host closed the connection]
Fuzai has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
zenloop has joined #ruby
Senjai has quit [Ping timeout: 248 seconds]
<kaldrenon> waxjar: Well, my map is {|int| n = method(int); [c,n] if n} because method() returns nil when appropriate. So I can just do .compact on the end of the map (which I'm doing). I was wondering if I could fold it into the map, but I'm thinking it's okay as is.
<kaldrenon> Sorry, s/c/int/ there
mary5030 has joined #ruby
dangerousdave has joined #ruby
locriani has quit [Ping timeout: 264 seconds]
lkba has quit [Ping timeout: 264 seconds]
jamescarr has joined #ruby
<Hanmac> you could also try: foo.each_with_object([]) {|int,a| a[int] = method(int) || nil} ;P
sambao21 has joined #ruby
funburn has joined #ruby
fuhgeddaboudit has joined #ruby
<waxjar> kaldrenon: i guess it doesn't matter much, yeah. i like to have #map and friends return elements that look the same, feels a little cleaner :P
ananthakumaran has joined #ruby
eka has joined #ruby
<Mon_Ouie> If you want to map every item to 0, 1, or more items you can us flat_map (which is map and then concatenates all the results)
zenloop has quit [Quit: zenloop]
thesheff17 has joined #ruby
<Mon_Ouie> (a.ka. collect_concat)
kraljev2 has joined #ruby
xk_id has joined #ruby
<kraljev2> I know ruby has permutations built in
Aryasam has quit [Ping timeout: 265 seconds]
<waxjar> he wants an Array of tuples
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<kraljev2> [[1,4],[1],[2,3]] would procude [1,1,2], [1,1,3],[4,1,2],[4,1,3]
<kraljev2> how to do that
jonathanwallace has quit [Ping timeout: 264 seconds]
funburn has quit [Ping timeout: 252 seconds]
Aryasam has joined #ruby
<bean> kraljev2: thats not a permutation.
<bean> :)
<kraljev2> i know
<Hanmac> Mon_Ouie: hm i had an idea for a moment, what about some kind of Array-like structure that has sorted_insert ? so that each time you add an element inside it its automatically added to the right place?
<kraljev2> I just wanted to say ruby has a lot of combinatorical function built-in
maoko has joined #ruby
<kraljev2> it is a product of some sor
<kraljev2> *sort
raphaelivan has joined #ruby
gazzik has joined #ruby
<Mon_Ouie> hanmac: You could implement that efficiently (log(n) insertion time) using binary trees
<Hanmac> kraljev2:
<Hanmac> >> a=[[1,4],[1],[2,3]];a.shift.product(*a)
<eval-in_> Hanmac => [[1, 1, 2], [1, 1, 3], [4, 1, 2], [4, 1, 3]] (https://eval.in/53195)
<bean> nice, hanmac
<kraljev2> >> a = [[1,4],[1],[2,3],[10,11]]; a.shift.product(*a)
<eval-in_> kraljev2 => [[1, 1, 2, 10], [1, 1, 2, 11], [1, 1, 3, 10], [1, 1, 3, 11], [4, 1, 2, 10], [4, 1, 2, 11], [4, 1, 3, 10], [4, 1, 3, 11]] (https://eval.in/53196)
svector has joined #ruby
JMcAfreak has joined #ruby
<kraljev2> really nice, thanks
<kraljev2> a = [[1,4],[1],[2,3,4]]; a.shift.product(*a)
svector has quit [Max SendQ exceeded]
<kraljev2> >> a = [[1,4],[1],[2,3,4]]; a.shift.product(*a)
<eval-in_> kraljev2 => [[1, 1, 2], [1, 1, 3], [1, 1, 4], [4, 1, 2], [4, 1, 3], [4, 1, 4]] (https://eval.in/53197)
Aryasam has quit [Ping timeout: 256 seconds]
Asher has quit [Ping timeout: 264 seconds]
<Hanmac> kraljev2: there is a ticket for a class method ala Array.product: https://bugs.ruby-lang.org/issues/8970 but its not commited yet
Gooder has joined #ruby
<kraljev2> this'd really useful
cubicme has quit [Read error: Connection reset by peer]
svector has joined #ruby
devdazed has quit [Ping timeout: 240 seconds]
cubicme has joined #ruby
VTLob has joined #ruby
svector has quit [Max SendQ exceeded]
<kraljev2> Who here agree ruby needs method naming overhaul
<bean> nope
<pontiki> nope
<kraljev2> there are many duplicates
<pontiki> i don't have a problem with that
<kraljev2> Array#take and Array#first
kil0byte_ has joined #ruby
<kraljev2> for example
svector has joined #ruby
zachrab has joined #ruby
<kraljev2> a lot of legacy stuff
SilverKey has quit [Ping timeout: 248 seconds]
<pontiki> map/collect, inject/reduce...
<pontiki> so what?
axl_ has joined #ruby
<kraljev2> why do we have #delete_if and #reject
svector has quit [Max SendQ exceeded]
dash_ has joined #ruby
<kraljev2> it would be more rubyish if we had #reject and #reject!
<Mon_Ouie> We do have those
svector has joined #ruby
devdazed has joined #ruby
<Mon_Ouie> And #delete_if and #reject! are slightly different in that reject! returns nil if no change was made
Stygia has quit [Quit: Leaving]
<kraljev2> Well, that is not KISS
kil0byte has quit [Ping timeout: 248 seconds]
gazzik has quit [Remote host closed the connection]
AzizLight has joined #ruby
<kraljev2> Still, ruby is a great language, I just miss a new major version 3.0
<kraljev2> where we'd throw out all legacy restrictions
<kraljev2> for example iterators not being lazy by default
<kaldrenon> When dealing with a hash, is there a concise way to do a create_or_append action for a field? I know I can do foo[:bar] = foo[:bar] ? foo[:bar] + new_val : [new_val] for example, but surely there's a better way? (this is in a situation where I -don't- want to create the hash with Hash.new([])
robbyoconnor has joined #ruby
jerius has quit [Ping timeout: 260 seconds]
robbyoconnor has quit [Read error: Connection reset by peer]
d2dchat has joined #ruby
<kraljev2> Hash#default
robbyoconnor has joined #ruby
mikecmpbll has joined #ruby
MetaCosm_ has joined #ruby
<kraljev2> #default=
<kraljev2> sorry
svector has quit [Max SendQ exceeded]
taptapdan has joined #ruby
m00nlight has joined #ruby
alex__c2022 has joined #ruby
wallerdev has joined #ruby
svector has joined #ruby
<sevenseacat> 3.0? we just got 2.0
kaspergr_ has joined #ruby
<kraljev2> 2.1 is on the way
jerius has joined #ruby
apeiros has joined #ruby
svector has quit [Max SendQ exceeded]
burlyscudd has joined #ruby
<sevenseacat> yes, but we dont have it yet
lyanchih has joined #ruby
jprovazn has quit [Quit: Leaving]
svector has joined #ruby
razi has joined #ruby
r0bby_ has joined #ruby
svector has quit [Max SendQ exceeded]
baordog_ has joined #ruby
svector has joined #ruby
kaspergrubbe has quit [Ping timeout: 264 seconds]
<Hanmac> kaldrenon: important: when using Hash + defaut_value: foo[:bar] += new_val works, but foo[:bar] << new_value does not
AzizLight has quit [Ping timeout: 265 seconds]
svector has quit [Max SendQ exceeded]
claymore has joined #ruby
slevinn has quit [Quit: slevinn]
freezey has joined #ruby
<kaldrenon> >> a = {}; a.default = []; a[:foo] << 1; a
<eval-in_> kaldrenon => {} (https://eval.in/53198)
bluenemo has quit [Remote host closed the connection]
<kaldrenon> >> a = {}; a.default = []; a[:foo] += 1; a
<eval-in_> kaldrenon => no implicit conversion of Fixnum into Array (TypeError) ... (https://eval.in/53199)
AzizLight has joined #ruby
svector has joined #ruby
maycon_ has joined #ruby
robbyoconnor has quit [Ping timeout: 246 seconds]
<Hanmac> that exactly what i mean
<kaldrenon> Interesting.
svector has quit [Max SendQ exceeded]
<Hanmac> hm ok its += [new_value]
kaspergr_ has quit [Ping timeout: 252 seconds]
<apeiros> kaldrenon: you mutate the default value
<kaldrenon> >> a = {}; a.default = []; a[:foo] += [1]; a
<eval-in_> kaldrenon => {:foo=>[1]} (https://eval.in/53200)
lkba has joined #ruby
<apeiros> >> a = {}; a.default = []; a[:foo] << 1; a.default
<eval-in_> apeiros => [1] (https://eval.in/53201)
slevinn has joined #ruby
slevinn has quit [Client Quit]
svector has joined #ruby
<kaldrenon> apeiros: That is very helpful to know.
gyre008 has joined #ruby
svector has quit [Max SendQ exceeded]
AzizLight has quit [Read error: Connection reset by peer]
<waxjar> you should use Hash.new { |hash, key| hash[key] = [] } or #default_proc=
<apeiros> i.e., `a[:foo] << 1` --> `a[:foo]` returns the default value, then `<< 1` pushes 1 to the default value. you do not assign a value to a key in that code.
r0bby_ has quit [Ping timeout: 268 seconds]
maoko has quit [Quit: Textual IRC Client: www.textualapp.com]
<Hanmac> apeiros: hm i had an idea while you was away, what about an Array like structure that has sorted_insert? so when you add an element its automatically inserted into the right place?
svector has joined #ruby
freezey has quit [Read error: Connection reset by peer]
maycon has quit [Ping timeout: 240 seconds]
freezey has joined #ruby
petey_ has quit [Remote host closed the connection]
<Hanmac> waxjar: important info: default_proc maybe not always an option because the Hash cant be Mashalled anymore
<kaldrenon> waxjar: What are the advantages of that approach? Is it creating a new object each time as opposed to referencing the same one?
dhruvasagar has quit [Ping timeout: 252 seconds]
<apeiros> hanmac: that's called a heap ;-)
<waxjar> yes, exactly that kaldrenon
boxmein has joined #ruby
petey has joined #ruby
<apeiros> hanmac: but yes, you could do it with an array too
digital-ghost has joined #ruby
svector has quit [Max SendQ exceeded]
gyre007 has quit [Ping timeout: 256 seconds]
<Morrolan> kaldrenon: It executes the supplied proc whenever a default value is needed, and uses its return value for the default value, yea.
echevemaster has quit [Ping timeout: 245 seconds]
nari has quit [Ping timeout: 264 seconds]
serp` has quit [Quit: serp`]
<apeiros> depending on what your aim is, you'd choose a different underlying datastructure for a sorted collection
svector has joined #ruby
<workmad3> kaldrenon: that particular proc also sets the value to the hash key
duggiefresh has quit [Remote host closed the connection]
tesuji has quit [Read error: Connection reset by peer]
<Hanmac> hm i had an imagination for an Array like object that has callback functions like before_insert, after_insert, before_sort, after_sort etc … (so you can make arry << obj, and the arry will be sorted after something was inserted … ;P )
echevemaster has joined #ruby
<workmad3> kaldrenon: whereas a normal default value doesn't set the key that wasn't present
<apeiros> hanmac: you can have my old SortedArray code if you want
NealJ has joined #ruby
<kaldrenon> Could you show me an example of using #default_proc= ? I'm working with a hash that's passed as an argument, and I want to set a default after the fact.
tatsuya__ has quit [Remote host closed the connection]
svector has quit [Max SendQ exceeded]
<workmad3> kaldrenon: gonna go out on a limb here and suggest 'hsh.default_proc = proc{|h, k| h[k] = []}' :P
tatsuya_o has joined #ruby
<hoelzro> yikes
<Hanmac> apeiros: hm ok maybe at next weekend
<hoelzro> I wouldn't alter a hash like that
Stygia has joined #ruby
<Morrolan> workmad3: Oh, does the proc need to take care of setting the default value itself? I thought the value it returns would be used.
<kaldrenon> workmad3: Aha. I have not worked with procs before. Thanks
<hoelzro> sounds like it could potentially cause headaches from the dev using it
svector has joined #ruby
petey has quit [Ping timeout: 240 seconds]
<workmad3> Morrolan: depends on if you want the value to be placed into the hash or not
petey has joined #ruby
<workmad3> Morrolan: if you don't set it, then the value is returned, but the key isn't set in the hash
<Morrolan> I see.
svector has quit [Max SendQ exceeded]
<Morrolan> And yes, when setting Hash#default_proc I normally want a value to be set in the hash. ;D
<workmad3> >> a = Hash.new{"hi"}; a[:foo]; a.keys
<eval-in_> workmad3 => [] (https://eval.in/53202)
ukd1 has quit [Remote host closed the connection]
burlyscudd has quit [Quit: Leaving.]
freezey_ has joined #ruby
<workmad3> Morrolan: yeah, the common case is to initialize to an array or a hash, so you'd want it in the hash :)
svector has joined #ruby
ukd1 has joined #ruby
svector has quit [Max SendQ exceeded]
sectionme has joined #ruby
<kaldrenon> >> a = Hash.new{|h,k| h[k] = "hi"}; a[:foo]; a.keys
<eval-in_> kaldrenon => [:foo] (https://eval.in/53203)
burlyscudd has joined #ruby
<kaldrenon> I learned a thing!
cubicme has quit [Ping timeout: 248 seconds]
svector has joined #ruby
cubicme has joined #ruby
<Hanmac> kaldrenon: if you need Marshal remind this:
iamjarvo has quit [Remote host closed the connection]
<Hanmac> >> Marshal.dump(Hash.new {})
<eval-in_> Hanmac => can't dump hash with default proc (TypeError) ... (https://eval.in/53204)
pwh has joined #ruby
tatsuya_o has quit [Ping timeout: 240 seconds]
iamjarvo has joined #ruby
saarinen has joined #ruby
Valesk has joined #ruby
ewnd9 has quit [Remote host closed the connection]
aspires has joined #ruby
geggam_ has joined #ruby
<apeiros> >> dp = proc { |h,k| h[k]=[] }; h = Hash.new(&dp); h.default_proc = nil; h2 = Marshal.load(Marshal.dump(h)); h2.default_proc = dp; h2[:foo]
<eval-in_> apeiros => [] (https://eval.in/53205)
ahawkins has quit [Ping timeout: 240 seconds]
<apeiros> tadaa
<apeiros> that'd be the workaround
gyre007 has joined #ruby
freezey has quit [Ping timeout: 256 seconds]
ahawkins has joined #ruby
diegoviola has joined #ruby
kung has quit [Read error: Connection reset by peer]
svector has quit [Max SendQ exceeded]
<Hanmac> i need to write more Hash and Array like structures ;p
kung has joined #ruby
kung has quit [Changing host]
kung has joined #ruby
tjsousa has joined #ruby
svector has joined #ruby
<Hanmac> apeiros: look https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/43107 one of my requests are in ruby CORE ;D
dangerousdave has quit [Quit: Leaving...]
gyre008 has quit [Ping timeout: 260 seconds]
svector has quit [Max SendQ exceeded]
ewnd9 has joined #ruby
ewnd9 has quit [Remote host closed the connection]
alup has quit [Quit: Leaving]
ahawkins_ has quit [Ping timeout: 245 seconds]
ahawkins has quit [Read error: Operation timed out]
boxmein has quit [Quit: [02:26.00] <Ristovski> mozzarella filofax fadget]
platzhirsch1 has joined #ruby
<apeiros> hanmac: I don't understand
ciziar has joined #ruby
<platzhirsch1> That's awkard, any idea why `xclip some_file.txt` takes multiple seconds to execute on Ruby 2.0.0 as opposed to system('xclip some_file.txt') which is instantly?
<platzhirsch1> System uses a fork, backticks just opens a pipe, but I don't see explaining this
platzhirsch1 is now known as platzhirsch
wildroman has quit [Remote host closed the connection]
<hoelzro> platzhirsch: strace it?
svector has joined #ruby
<Hanmac> apeiros: didnt you say last time that it would be the end of the world if my code would go into ruby-core? ;D
<platzhirsch> hoelzro: oh, didn't know this tool yet
<apeiros> hanmac: that wasn't me I think
svector has quit [Max SendQ exceeded]
<Hanmac> oh ok ;P
<hoelzro> strace is one of the most useful tools in the toolbox =)
svector has joined #ruby
<apeiros> I'm only cruel to people who deserve it (or know that I'm kidding)
gyre007 has quit [Remote host closed the connection]
peregrine81 has quit []
bluetho has joined #ruby
gyre007 has joined #ruby
rippa has joined #ruby
Xeago has quit [Remote host closed the connection]
<platzhirsch> hoelzro: sweet, although I feel a bit stunned by all the system calls that are printed now :D
svector has quit [Max SendQ exceeded]
<platzhirsch> ah right, I wanted to see where it hangs with Ruby
<hoelzro> platzhirsch: you can filter with -e trace=$SYSCALL
<platzhirsch> hoelzro: thanks :)
svector has joined #ruby
<hoelzro> but since you're looking for which system call, that might not help here =/
wallerdev has quit [Quit: wallerdev]
<platzhirsch> I don't know what I am looking for
svector has quit [Max SendQ exceeded]
<hoelzro> you're looking for any system call that blocks for a few seconds
<hoelzro> strace might not help
svector has joined #ruby
<platzhirsch> that's pretty awesome I have attached it to a pry session
freezey has joined #ruby
adeponte has joined #ruby
<platzhirsch> prints everytime I type something
<hoelzro> but it's a good first step, since it reveals a lot of information with little investment
svector has quit [Max SendQ exceeded]
adeponte has quit [Remote host closed the connection]
dsabanin has joined #ruby
<hoelzro> you can also attach to an existing process with -p
svector has joined #ruby
<hoelzro> I wouldn't use it in pry =/
adeponte has joined #ruby
<platzhirsch> too much noise?
svector has quit [Max SendQ exceeded]
wildroman has joined #ruby
svector has joined #ruby
<hoelzro> yeah
* hoelzro had to use strace last week to debug sshd
kraljev2 has quit [Ping timeout: 240 seconds]
<hoelzro> that was fun =/
svector has quit [Max SendQ exceeded]
<platzhirsch> well obviously it's stuck at a read operation, but that doesn't explain the behavior
svector has joined #ruby
<hoelzro> what's it reading?
pel_daniel has joined #ruby
vlad_starkov has joined #ruby
svector has quit [Max SendQ exceeded]
<platzhirsch> I have no idea, xclip does not return anything
ta has quit [Read error: Connection reset by peer]
zz_scottstamp is now known as scottstamp
svector has joined #ruby
svector has quit [Max SendQ exceeded]
<hoelzro> well, you see a read blocking in strace, don't you?
boxmein has joined #ruby
<platzhirsch> yes
svector has joined #ruby
danman has joined #ruby
svector has quit [Max SendQ exceeded]
freezey_ has quit [Ping timeout: 268 seconds]
|jemc| has joined #ruby
jaikeerthi has quit [Quit: Leaving.]
<hoelzro> can you ls -l /proc/$PID/fd to find out what it's reading from?
<platzhirsch> read(7, "`xclip text.txt`\n", 8192) = 17 ... read(7, "", 8192) = 0
mengu has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
zmike123 has joined #ruby
svector has joined #ruby
Dwarf has quit [Max SendQ exceeded]
svector has quit [Max SendQ exceeded]
Gooder has quit [Ping timeout: 264 seconds]
sr78ger has joined #ruby
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
svector has joined #ruby
locriani has joined #ruby
<hoelzro> is your entire script `xclip text.txt`?
<platzhirsch> yes
svector has quit [Max SendQ exceeded]
<hoelzro> and *that* read is blocking for a while/
<platzhirsch> /dev/pts/1,2 and 3 and 5 pipes
adeponte has quit [Ping timeout: 252 seconds]
<hoelzro> because that seems to be Ruby reading your script
freezey has quit [Read error: Connection reset by peer]
<platzhirsch> oh you are right
svector has joined #ruby
freezey has joined #ruby
sectionme has quit [Ping timeout: 240 seconds]
Dwarf has joined #ruby
<platzhirsch> but the read after that is what is actually returned, an empty string
svector has quit [Max SendQ exceeded]
kevinykchan has joined #ruby
ixti has quit [Read error: Connection reset by peer]
<bean> why would you use ruby to invoke a shell command if thats all you're doing
dash_ has quit [Ping timeout: 260 seconds]
<hoelzro> Ruby's probably doing a while(read(fd, buffer, SIZE) != 0)
troessner has quit [Quit: Leaving]
bluetho has left #ruby [#ruby]
schaerli has quit [Remote host closed the connection]
svector has joined #ruby
<hoelzro> so it performs a useless read at the end
<hoelzro> bean: debugging
svector has quit [Max SendQ exceeded]
schaerli has joined #ruby
tkuchiki has joined #ruby
svector has joined #ruby
<platzhirsch> bean: Just trying to understand the behavior, I don't need this at all and if I would I would invoke system
svector has quit [Max SendQ exceeded]
<platzhirsch> hoelzro: but that while would have a time out, wouldn't it?
svector has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
zenloop has joined #ruby
<hoelzro> no, because there's nothing left in the file
Ahti333 has quit [Quit: Computer has gone to sleep.]
svector has quit [Max SendQ exceeded]
zarul has quit [Ping timeout: 264 seconds]
freezey has quit [Remote host closed the connection]
<hoelzro> it would go into kernel land, and kernel will (more or less) immediately reply "there's nothing left"
zarul has joined #ruby
freezey has joined #ruby
svector has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
clov3r has joined #ruby
svector has quit [Max SendQ exceeded]
p8952 has joined #ruby
dash_ has joined #ruby
aryaching_ has joined #ruby
b00stfr3ak has joined #ruby
svector has joined #ruby
svector has quit [Max SendQ exceeded]
sk87 has joined #ruby
coderhs has joined #ruby
Kelet_ is now known as Kelet
svector has joined #ruby
jlast has joined #ruby
svector has quit [Max SendQ exceeded]
<hoelzro> hmm
<hoelzro> well
<hoelzro> here 7 is a pipe
Kelet has quit [Changing host]
Kelet has joined #ruby
io_syl has joined #ruby
<hoelzro> you should probably use strace -f to trace across forks
schaerli has quit [Ping timeout: 246 seconds]
svector has joined #ruby
baroquebobcat has joined #ruby
<hoelzro> hmm
<hoelzro> your child process exits
svector has quit [Max SendQ exceeded]
digital-ghost has quit [Remote host closed the connection]
aspires has quit [Quit: aspires]
jlast has quit [Remote host closed the connection]
svector has joined #ruby
<hoelzro> odd that read blocks for a while after the child exits
svector has quit [Max SendQ exceeded]
aryaching has quit [Ping timeout: 265 seconds]
jlast has joined #ruby
svector has joined #ruby
<platzhirsch> hoelzro: do you think it has to do with Resource temporarily unavailable here? https://gist.github.com/platzhirsch/d6e7b0fcd6acaef49154
aspires has joined #ruby
burlyscudd has quit [Quit: Leaving.]
<hoelzro> hmm
svector has quit [Max SendQ exceeded]
<hoelzro> what's 3? I assume a socket?
funburn has joined #ruby
svector has joined #ruby
<hoelzro> the blocking would make sense if the child process spawned another child that does the writing to the pipe
svector has quit [Max SendQ exceeded]
valesk_ has joined #ruby
petey has quit [Remote host closed the connection]
svector has joined #ruby
svector has quit [Max SendQ exceeded]
petey has joined #ruby
<hoelzro> huh
svector has joined #ruby
<hoelzro> OT, but I noticed you're based in Berlin.
<hoelzro> I was just there this weekend =)
svector has quit [Max SendQ exceeded]
<platzhirsch> how did you know?
Valesk has quit [Ping timeout: 256 seconds]
<platzhirsch> cool thing
<hoelzro> Github =)
<platzhirsch> ah right :P
svector has joined #ruby
devoldmx has joined #ruby
svector has quit [Max SendQ exceeded]
sectionme has joined #ruby
svector has joined #ruby
svector has quit [Max SendQ exceeded]
razi has quit [Ping timeout: 248 seconds]
tvw has quit []
svector has joined #ruby
funburn has quit [Ping timeout: 268 seconds]
svector has quit [Max SendQ exceeded]
<platzhirsch> it polls, so it waits for an event on a file descriptor
ssvo has joined #ruby
aapzak has quit [Ping timeout: 246 seconds]
svector has joined #ruby
locriani has quit [Ping timeout: 240 seconds]
<platzhirsch> and this poll has a timeout which runs out
fijimunk1i has joined #ruby
Anticom has joined #ruby
ukd1_ has joined #ruby
io_syl has quit []
svector has quit [Max SendQ exceeded]
devoldmx has quit [Read error: Connection reset by peer]
RichardBaker has joined #ruby
wallerdev has joined #ruby
svector has joined #ruby
devoldmx has joined #ruby
devoldmx has quit [Write error: Broken pipe]
jfelchner has quit [Ping timeout: 245 seconds]
svector has quit [Max SendQ exceeded]
<platzhirsch> but the timeout is higher than it's actually waiting, well.. whatever, I am giving up, at least I have learnt something
ukd1 has quit [Ping timeout: 246 seconds]
<hoelzro> hmm
<hoelzro> well
devoldmx has joined #ruby
aapzak has joined #ruby
svector has joined #ruby
<hoelzro> it'll poll for less than the timeout if data is available
<hoelzro> whether it's real data for an EOF
svector has quit [Max SendQ exceeded]
<hoelzro> s/for/or/
svector has joined #ruby
funburn has joined #ruby
schaerli has joined #ruby
T_T has joined #ruby
peregrine81 has joined #ruby
schaerli has quit [Remote host closed the connection]
svector has quit [Max SendQ exceeded]
fijimunkii has quit [Ping timeout: 264 seconds]
schaerli has joined #ruby
svector has joined #ruby
svector has quit [Max SendQ exceeded]
svector has joined #ruby
jfelchner has joined #ruby
ixti has joined #ruby
svector has quit [Max SendQ exceeded]
svector has joined #ruby
svector has quit [Max SendQ exceeded]
bricker`LA has joined #ruby
zachrab has quit [Remote host closed the connection]
svector has joined #ruby
svector has quit [Max SendQ exceeded]
zachrab has joined #ruby
jlebrech has quit [Quit: Konversation terminated!]
svector has joined #ruby
svector has quit [Max SendQ exceeded]
svector has joined #ruby
svector has quit [Max SendQ exceeded]
lukec has joined #ruby
funburn has quit [Ping timeout: 248 seconds]
gja has joined #ruby
schaerli has quit [Ping timeout: 265 seconds]
<platzhirsch> hoelzro: My guess is that it tries to read from the pipe, but the pipe is not available, freed yet, so it does a poll. The pipe gets freed again and the execution finishes
S0da has quit [Remote host closed the connection]
phenocode has joined #ruby
zachrab has quit [Ping timeout: 240 seconds]
<hoelzro> that's what's so weird; according to the trace, the child has exited
codeFiend has quit [Quit: codeFiend]
<hoelzro> so the pipe's write end should be closed
<hoelzro> so a read should immediately return
locriani has joined #ruby
<platzhirsch> huh
dankest has joined #ruby
ananthakumaran has quit [Ping timeout: 252 seconds]
dankest has quit [Read error: Connection reset by peer]
Dan_ has joined #ruby
<platzhirsch> I enter xclip test.txt it finished, when I enter xclip -verbose text.txt I get: Reading text.txt and the Waiting for selection requests, Control-C to quit
adeponte has joined #ruby
Dan_ is now known as Guest53216
<platzhirsch> and then it quits after a time
svector has joined #ruby
Zesty has joined #ruby
svector has quit [Max SendQ exceeded]
lukec has quit [Quit: lukec]
lyanchih has quit [Quit: lyanchih]
miskander has joined #ruby
<platzhirsch> Apparently Xclip does not close stdout when it's done
svector has joined #ruby
blaxter has quit [Read error: Operation timed out]
<nhmood> Is there an easy way to reference Constants that are defined within a Class outside of the class (without the use of MyModule::MyClass::Constant)
svector has quit [Max SendQ exceeded]
headius has joined #ruby
jhn has joined #ruby
svector has joined #ruby
gja has quit [Ping timeout: 248 seconds]
Guest53216 has quit [Client Quit]
<hoelzro> interesting
svector has quit [Max SendQ exceeded]
zarubin has joined #ruby
svector has joined #ruby
svector has quit [Max SendQ exceeded]
svector has joined #ruby
svector has quit [Max SendQ exceeded]
cubicme has quit [Read error: Connection reset by peer]
kaspergrubbe has joined #ruby
dagobah has quit [Remote host closed the connection]
<s2013> anyone here does nlp with ruby
cubicme has joined #ruby
<platzhirsch> hoelzro: it's getting really weird, if I try select the console output while it's waiting, it finishes instantly :P
<s2013> also is there some sort of speech recognition gem for ruby
pwh has quit []
<hoelzro> platzhirsch: I'm guessing xclip is waiting for a selection, and you're giving it one?
svector has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 264 seconds]
svector has quit [Max SendQ exceeded]
<platzhirsch> well I just mark it with my mouse
svector has joined #ruby
<hoelzro> that populates the selection on X
deception has joined #ruby
adeponte has quit [Ping timeout: 248 seconds]
<hoelzro> did you know that you only need to select + middle click on X?
iliketurtles has joined #ruby
<platzhirsch> hoelzro: yes
<hoelzro> ok, just checking =)
svector has quit [Max SendQ exceeded]
adeponte has joined #ruby
svector has joined #ruby
svector has quit [Max SendQ exceeded]
kindjal has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<platzhirsch> hoelzro: you are right
svector has joined #ruby
<platzhirsch> I just printed the content of the XA_PRIMARY the default one, and it is what I have selected
36DABJ31H has joined #ruby
77CAAFXGM has joined #ruby
tatsuya_o has joined #ruby
dash_ has quit [Ping timeout: 252 seconds]
mklappstuhl has quit [Remote host closed the connection]
svector has quit [Max SendQ exceeded]
<platzhirsch> but is that really supposed to happen? Shouldn't the file content go into the selection
svector has joined #ruby
tkuchiki has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
mklappstuhl has quit [Read error: Connection reset by peer]
ukd1_ has quit [Remote host closed the connection]
<hoelzro> that would make sense...
ukd1 has joined #ruby
freezey has quit [Remote host closed the connection]
dash_ has joined #ruby
leonidlm has joined #ruby
devoldmx3 has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
<hoelzro> that's odd
* hoelzro goes home
<platzhirsch> so it seems not to terminate at all if I don't do something
sarbull has quit [Remote host closed the connection]
<platzhirsch> hoelzro: anyway, thanks a lot for showing me strace :)
Squarepy has quit [Quit: Leaving]
brianpWins has quit [Quit: brianpWins]
sevenseacat has quit [Quit: Leaving.]
TMM has quit [Quit: Ex-Chat]
Senjai has joined #ruby
Senjai has joined #ruby
Senjai has quit [Changing host]
timonv has quit [Remote host closed the connection]
boxmein has quit [Ping timeout: 260 seconds]
Voodoofish430 has joined #ruby
gyzmodo has quit [Ping timeout: 268 seconds]
rdark has joined #ruby
Zesty has quit [Quit: Linkinus - http://linkinus.com]
maletor has joined #ruby
akemrir has quit [Quit: WeeChat 0.4.1]
BSaboia has joined #ruby
chrisja has joined #ruby
johchri has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
svector has quit [Max SendQ exceeded]
fuhgeddaboudit has joined #ruby
jkline has joined #ruby
svector has joined #ruby
svector has quit [Max SendQ exceeded]
iamjarvo has quit [Remote host closed the connection]
miskander has quit [Quit: miskander]
shvelo has quit [Ping timeout: 240 seconds]
iamjarvo has joined #ruby
svector has joined #ruby
lfox has quit [Quit: ZZZzzz…]
diegoviola has quit [Quit: WeeChat 0.4.1]
svector has quit [Max SendQ exceeded]
aspires has quit [Quit: aspires]
Anticom has quit [Ping timeout: 248 seconds]
svector has joined #ruby
svector has quit [Max SendQ exceeded]
svector has joined #ruby
svector has quit [Max SendQ exceeded]
iamjarvo has quit [Ping timeout: 256 seconds]
valesk_ has quit [Ping timeout: 248 seconds]
ukd1 has quit [Remote host closed the connection]
Dwarf has quit [Max SendQ exceeded]
tatsuya_o has quit [Remote host closed the connection]
ukd1 has joined #ruby
DanKnox_away is now known as DanKnox
tatsuya_o has joined #ruby
carraroj has joined #ruby
svector has joined #ruby
noname001__ has quit [Ping timeout: 256 seconds]
burlyscudd has joined #ruby
Dwarf has joined #ruby
aSuit has quit [Quit: Leaving]
cmarques has joined #ruby
dash_ has quit [Ping timeout: 240 seconds]
keanehsiao has joined #ruby
svector has quit [Max SendQ exceeded]
Kar- has joined #ruby
Valesk has joined #ruby
saarinen has quit [Quit: saarinen]
svector has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
xcv has quit [Remote host closed the connection]
marwa50 has quit [Ping timeout: 248 seconds]
marwan__ has quit [Ping timeout: 256 seconds]
xcv has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
sectionme has quit [Ping timeout: 252 seconds]
thesheff17 has quit [Remote host closed the connection]
tatsuya_o has quit [Ping timeout: 265 seconds]
mcrmfc has quit [Ping timeout: 248 seconds]
dash_ has joined #ruby
36DABJ31H has quit [Read error: Connection reset by peer]
petey has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 256 seconds]
77CAAFXGM has quit [Read error: Connection reset by peer]
petey has joined #ruby
dash_ has quit [Max SendQ exceeded]
jaikeerthi has joined #ruby
wildroman has quit [Remote host closed the connection]
dash_ has joined #ruby
xcv has quit [Read error: Connection reset by peer]
wildroman has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
xcv has joined #ruby
amacgregor has joined #ruby
devoldmx has joined #ruby
johnnyfuchs has quit [Quit: Leaving.]
zlog_ has joined #ruby
aspires has joined #ruby
petey has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
gazzik has joined #ruby
wildroman has quit [Read error: No route to host]
wildroman has joined #ruby
pwh has joined #ruby
cody-- has quit [Quit: derp]
hasrb has quit [Remote host closed the connection]
hasrb has joined #ruby
obs has quit [Quit: Konversation terminated!]
jbpros has joined #ruby
Zesty has joined #ruby
rahulkmr has joined #ruby
simplyaubs has joined #ruby
jaikeerthi has quit [Ping timeout: 268 seconds]
angelxmoreno has joined #ruby
jbpros has quit [Client Quit]
Xeago has quit [Ping timeout: 252 seconds]
iliketurtles has quit [Quit: zzzzz…..]
petey has joined #ruby
einarj has quit [Remote host closed the connection]
hasrb has quit [Read error: Operation timed out]
barratt has quit [Ping timeout: 256 seconds]
rahulkmr1 has quit [Ping timeout: 265 seconds]
beilabs has quit [Read error: Operation timed out]
cascalheira has joined #ruby
burlyscudd has quit [Quit: Leaving.]
petey has quit [Remote host closed the connection]
Stygia has quit [Quit: Leaving]
DrShoggoth has quit [Read error: Connection reset by peer]
amacgregor has quit [Ping timeout: 256 seconds]
petey has joined #ruby
keanehsiao has quit [Read error: Connection reset by peer]
mlpinit_ has joined #ruby
scottstamp has quit [Ping timeout: 268 seconds]
mlpinit has quit [Read error: Connection reset by peer]
jibi has quit [Quit: .]
b3hnam has joined #ruby
lfox has joined #ruby
locriani has quit [Remote host closed the connection]
angelxmoreno has left #ruby [#ruby]
wildroman has quit [Remote host closed the connection]
zlog_ has quit [Ping timeout: 250 seconds]
mary5030 has quit [Remote host closed the connection]
wildroman has joined #ruby
someish has quit [Quit: someish]
dangerousdave has joined #ruby
petey has quit [Ping timeout: 252 seconds]
a1ph4g33k has joined #ruby
ephemerian has quit [Quit: Leaving.]
Sammael has quit [Ping timeout: 264 seconds]
Kar- has quit [Ping timeout: 264 seconds]
rainbyte16 has joined #ruby
pwh has quit []
funburn has joined #ruby
funburn has quit [Client Quit]
mary5030 has joined #ruby
mrsolo_ has quit [Ping timeout: 268 seconds]
mary5030 has quit [Read error: Connection reset by peer]
bean has quit [Quit: Computer has gone to sleep.]
mlpinit_ has quit [Read error: Connection reset by peer]
mlpinit has joined #ruby
Kar- has joined #ruby
ghr has quit [Quit: Computer has gone to sleep.]
wildroman has quit [Ping timeout: 260 seconds]
<b3hnam> Here is my code http://dpaste.com/1409900/ the output of "puts client" is #<Twitter::REST::Client:0x00000002a99cf8> How can I find out the methods
ghr has joined #ruby
mary5030 has joined #ruby
dawkirst has quit [Read error: Operation timed out]
mary5030 has quit [Read error: Connection reset by peer]
beilabs has joined #ruby
locriani has joined #ruby
ciziar has quit [Quit: Computer has gone to sleep.]
pedda has quit [Quit: Textual IRC Client: www.textualapp.com]
platzhirsch has quit [Quit: Leaving.]
platzhirsch has joined #ruby
Zesty has quit [Quit: Linkinus - http://linkinus.com]
crus has quit [Ping timeout: 245 seconds]
sparq_ has joined #ruby
<heftig> try (client.methods - Object.methods)
buibex_ has quit [Ping timeout: 252 seconds]
crus has joined #ruby
Xeago has joined #ruby
alvaro_o has joined #ruby
Advocation has joined #ruby
<_br_> Anyone here have a snippet for warden facebook/twitter login strategy? (running sinatra)
pellenation has joined #ruby
jhn has quit [Ping timeout: 240 seconds]
devoldmx has quit [Read error: Connection reset by peer]
Advocation has quit [Client Quit]
devoldmx has joined #ruby
Guest8398 has quit [Remote host closed the connection]
glaksmono has joined #ruby
<glaksmono> anyone is around?
<glaksmono> what's a way to format the active record result ?
brianpWins has joined #ruby
simplyaubs has quit [Quit: simplyaubs]
<Hanmac> glaksmono: #rubyonrails
beilabs has quit [Ping timeout: 265 seconds]
<_br_> glaksmono: look at awesome_print gem
rainbyte16 has quit [Quit: Leaving]
rainbyte16 has joined #ruby
xcv has quit [Remote host closed the connection]
pwh has joined #ruby
m8 has joined #ruby
terrellt has quit [Ping timeout: 240 seconds]
xcv has joined #ruby
burlyscudd has joined #ruby
io_syl has joined #ruby
peregrine81 has quit []
amacgregor has joined #ruby
aagdbl has joined #ruby
poisonarms has joined #ruby
tylersmith has joined #ruby
adeponte has quit [Remote host closed the connection]
kaldrenon has quit [Remote host closed the connection]
havenwood has joined #ruby
adeponte has joined #ruby
svector has quit [Ping timeout: 248 seconds]
kaldrenon has joined #ruby
eliasp has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<a1ph4g33k> good morning all.
dawkirst has joined #ruby
mary5030 has joined #ruby
<havenwood> g'morn
c0rn has joined #ruby
eliasp has joined #ruby
rdark has quit [Quit: leaving]
adeponte has quit [Ping timeout: 248 seconds]
kaldrenon has quit [Ping timeout: 260 seconds]
kaldrenon has joined #ruby
BSaboia has quit [Ping timeout: 264 seconds]
freezey has joined #ruby
boxmein has joined #ruby
boxmein has quit [Max SendQ exceeded]
beilabs has joined #ruby
shaunbaker has quit [Remote host closed the connection]
boxmein has joined #ruby
shaunbaker has joined #ruby
Al___ has quit [Quit: Al___]
amacgregor has quit [Ping timeout: 248 seconds]
b3hnam has left #ruby [#ruby]
c0rn has quit [Quit: Computer has gone to sleep.]
jb41 has quit [Quit: leaving]
ixti has quit [Ping timeout: 240 seconds]
iamjarvo has joined #ruby
iamjarvo has quit [Remote host closed the connection]
MetaCosm has quit [Quit: ZNC - http://znc.in]
iliketurtles has joined #ruby
danshultz has joined #ruby
iamjarvo has joined #ruby
peregrine81 has joined #ruby
xargoon has quit [Ping timeout: 240 seconds]
zeade has joined #ruby
whunt has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
platzhirsch has left #ruby [#ruby]
shaunbaker has quit [Ping timeout: 252 seconds]
mlpinit_ has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
Sammael has joined #ruby
iamjarvo has joined #ruby
mlpinit_ has quit [Remote host closed the connection]
mlpinit has quit [Ping timeout: 260 seconds]
tsykoduk is now known as zz_tsykoduk
mlpinit has joined #ruby
miskander has joined #ruby
heidi has joined #ruby
aspires has quit [Quit: aspires]
vlad_starkov has quit [Remote host closed the connection]
deens has joined #ruby
aspires has joined #ruby
sparq_ has quit [Ping timeout: 256 seconds]
sr78ger has quit [Quit: Textual IRC Client: www.textualapp.com]
punktechnology has joined #ruby
c0rn has joined #ruby
nhhagen has quit [Read error: Connection reset by peer]
cody-- has joined #ruby
ta has joined #ruby
xargoon has joined #ruby
mlpinit_ has joined #ruby
nhhagen has joined #ruby
gja has joined #ruby
jfelchner has quit [Ping timeout: 245 seconds]
jamescarr has quit [Quit: jamescarr]
moted has joined #ruby
gja has quit [Client Quit]
mlpinit has quit [Ping timeout: 240 seconds]
olivier_bK has quit [Ping timeout: 248 seconds]
aganov has quit [Remote host closed the connection]
dsabanin has left #ruby ["Linkinus - http://linkinus.com"]
jamescarr has joined #ruby
volty has joined #ruby
vim_shim has joined #ruby
codeFiend has joined #ruby
vim_shim has quit [Max SendQ exceeded]
zz_tsykoduk is now known as tsykoduk
joshu_ has joined #ruby
vim_shim has joined #ruby
vim_shim has quit [Max SendQ exceeded]
interactionjaxsn has quit [Remote host closed the connection]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
joshu has quit [Ping timeout: 246 seconds]
vim_shim has joined #ruby
sectionme has joined #ruby
interactionjaxsn has joined #ruby
interactionjaxsn has quit [Read error: Connection reset by peer]
interactionjaxsn has joined #ruby
milesforrest|afk is now known as milesforrest
milesforrest has left #ruby [#ruby]
freezey has quit [Remote host closed the connection]
Ox6abe has joined #ruby
kil0byte has joined #ruby
xcv has quit [Remote host closed the connection]
xcv has joined #ruby
momomomomo has quit [Quit: momomomomo]
atSetKey_ has joined #ruby
nadirvardar has joined #ruby
Zai00 has quit [Quit: Zai00]
snovak has joined #ruby
kil0byte_ has quit [Ping timeout: 248 seconds]
vim_shim has quit [Ping timeout: 256 seconds]
schaerli has joined #ruby
raphaelivan has quit [Ping timeout: 256 seconds]
xk_id has quit [Quit:
jaikeerthi has joined #ruby
valesk_ has joined #ruby
ixti has joined #ruby
xcv has quit [Ping timeout: 248 seconds]
snovak_ has quit [Ping timeout: 248 seconds]
dankest has joined #ruby
Valesk has quit [Ping timeout: 268 seconds]
germanstudent_ is now known as germanstudent
freezey has joined #ruby
kraljev2 has joined #ruby
<kraljev2> someone suggested this before
<kraljev2> temp.shift.product(*temp)
<kraljev2> for combinatorical product
<kraljev2> Do you have any idea how to make it lazy
<kraljev2> except recursive def
SilverKey has joined #ruby
ehaliewicz has joined #ruby
heidi has quit [Quit: Leaving.]
sectionme has quit [Ping timeout: 241 seconds]
lucazi has quit [Ping timeout: 245 seconds]
jaikeerthi has quit [Ping timeout: 248 seconds]
ahawkins has joined #ruby
ahawkins_ has joined #ruby
saarinen has joined #ruby
timonv has joined #ruby
timonv has quit [Remote host closed the connection]
<apeiros> kraljev2: enum_for(:product, *args)
adeponte has joined #ruby
<volty> hi, is there a good gem for ruby parsing || tokenizing ?
<^conner> is there a pure rspec equivalent of aruba for cucumber?
havenwood has quit [Remote host closed the connection]
Ox6abe has quit [Remote host closed the connection]
<dkamioka> volty: which type of parsing?
<dkamioka> volty: to tokenize, the .split i think is enough, depending of the string.
<volty> ruby source code
<dkamioka> oh.
<apeiros> volty: there's the one by whitequark (over in #ruby-lang), also rubys own ripper
<volty> dkamioka: i'm not not this low level :)
<dkamioka> you want some lexic and syntatic parser, like in compiler's subject ?
<apeiros> and zenspiders parsetree (I think that was the name)
<dkamioka> I took the compiler class in college... i used somthing like that....
Asher has joined #ruby
rubyracer has joined #ruby
<^conner> dkamioka, treetop is an option too I believe
hello_world has joined #ruby
schaerli has quit [Remote host closed the connection]
<^conner> dkamioka, there's also racc which is like lex/yacc
<dkamioka> hmmm quick question, ||= sets if nil what does |= do? And why?!?!?!!? I tried and it set to "true"
<volty> dkamioka: I already wrote a tokenizer that I needed for scanning my files
<volty> i'm just trying to see what's there -- for future use
lukec has joined #ruby
<dkamioka> volty: unfortunately I had some java thing not ruby, so cant help.
<volty> apeiros: thx, going to goolge
<^conner> volty, I would look into racc if it's something serious as the generated code doesn't have runtime deps
S0da has joined #ruby
<dkamioka> apeiros, ^conner: nice to know some references, will keep that for future too.. thanks.
rkrdo has joined #ruby
<^conner> volty, but I have never used racc :)
locriani has quit [Remote host closed the connection]
miskander has quit [Quit: miskander]
locriani has joined #ruby
einarj has joined #ruby
rkrdo has quit [Remote host closed the connection]
Sc0rp10n has joined #ruby
jkline has quit [Quit: jkline]
peregrine81 has quit []
<volty> ^conner: i tried racc long time ago, though without a real goal // I'll look again if I start thinking about capturing class dependencies // for now I'll go to see what is the ruby's own ripper
dhruvasagar has joined #ruby
thesheff17 has joined #ruby
<apeiros> volty: hu? I understood you wanted to parse ruby source code - did I get that wrong? (or did you try that with racc a long time ago? or is that entirely disconnected?)
valesk_ has quit [Ping timeout: 252 seconds]
<cubicme> hi, is there any clean way to map a hash to anoter hash, except converting it to array and hash again?
S0da has quit [Remote host closed the connection]
awarner_ has joined #ruby
<apeiros> cubicme: no
einarj has quit [Ping timeout: 260 seconds]
awarner__ has joined #ruby
<apeiros> I mean, you could do it without converting. but I don't think it'd be any cleaner: mapped={}; source.each do |k,v| mapped[map(k)] = map(v) end
saarinen has quit [Ping timeout: 246 seconds]
siezer has left #ruby [#ruby]
awarner has quit [Ping timeout: 240 seconds]
tjbarber has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ox6abe has joined #ruby
<cubicme> apeiros: thanks, right now i'm doing mapped = Hash[source.map { |k,v| [k,v] }]
iamjarvo has quit [Remote host closed the connection]
jaikeerthi has joined #ruby
haxrbyte has quit [Ping timeout: 240 seconds]
iamjarvo has joined #ruby
someish has joined #ruby
awarner_ has quit [Ping timeout: 246 seconds]
_maes_ has joined #ruby
andikr has quit [Remote host closed the connection]
beilabs has quit [Read error: Connection reset by peer]
gyre007 has quit [Remote host closed the connection]
sumark is now known as Guest91821
<volty> apeiros: i just wrote an enumerator that generates ruby tokens. For now it's enough for intended use of indexing & mapping to files. Then I was thinking about mapping to classes & modules and, before I proceed to think about ... wanted to see what is already ready there
barratt has joined #ruby
predator117 has quit [Ping timeout: 246 seconds]
twoism has joined #ruby
ahawkins_ has quit [Ping timeout: 256 seconds]
ahawkins has quit [Ping timeout: 256 seconds]
twoism has quit [Remote host closed the connection]
saarinen has joined #ruby
bean has joined #ruby
cubicme has quit [Read error: Connection reset by peer]
twoism has joined #ruby
soheil has joined #ruby
nouitfvf has joined #ruby
<kraljev2> apeiros:
iamjarvo has quit [Read error: Connection reset by peer]
<volty> for now it's all about searching on source files
<kraljev2> sorry, your solution isn't lazy
cubicme has joined #ruby
<kraljev2> enum_for doesn't do it
<kraljev2> temp = [[1,2]] * 50
<kraljev2> p temp.shift.product(*temp).take(10)
iamjarvo has joined #ruby
<kraljev2> this announces out of ram
alvaro_o has quit [Quit: Ex-Chat]
yacks has joined #ruby
<apeiros> cubicme: yeah, IMO the nicer variant
jprovazn has joined #ruby
xk_id has joined #ruby
<kraljev2> oh, nevermind
devoldmx has quit [Read error: Connection reset by peer]
<apeiros> kraljev2: sorry but enum_for is lazy.
devoldmx3 has joined #ruby
<volty> no no
Biohazard has quit [Quit: tropicraft.net]
<kraljev2> my fault, thanks :)
x1337807x has joined #ruby
heidi has joined #ruby
schaerli has joined #ruby
adeponte has quit [Read error: Connection reset by peer]
Biohazard has joined #ruby
<volty> kraljev2: it's not your fault, and neither his
johnnyfuchs has joined #ruby
<volty> if you want lazy you have to reimplement the product func
simplyaubs has joined #ruby
x1337807x has quit [Client Quit]
<volty> in a way that returns an enum
<apeiros> volty: no
<volty> why?
<apeiros> that's precisely what enum_for does.
dzhulk has joined #ruby
alvaro_o has joined #ruby
<volty> not in this case
<apeiros> yes, also in this case.
<volty> product returns an array and not an enum
<volty> am I wrong?
<apeiros> if you do something with the enumerator which in turn does not return an enumerator, that's not due to enum_for
<apeiros> you're wrong
<apeiros> enum_for is NOT about return value
Ox6abe has quit [Remote host closed the connection]
<apeiros> enum_for is about yielding.
<volty> yes, i know very well, i was playing with enumerators
<apeiros> >> [1,2].product([3,4,5])
<eval-in_> apeiros => [[1, 3], [1, 4], [1, 5], [2, 3], [2, 4], [2, 5]] (https://eval.in/53209)
<apeiros> >> [1,2].enum_for(:product, [3,4,5])
<eval-in_> apeiros => #<Enumerator: [1, 2]:product([3, 4, 5])> (https://eval.in/53210)
predator117 has joined #ruby
gazzik has quit [Remote host closed the connection]
wildroman has joined #ruby
<Mon_Ouie> volty: If you call product with a block it will yield the elements of the product instead of returning the array. That's all you need to be able to use #enum_for
<volty> naaa
wildroman has quit [Remote host closed the connection]
|jemc| has quit [Read error: Operation timed out]
<volty> i saw now what we are talking about, sorry, i didn't read well the kraljev2's code
wildroman has joined #ruby
maasha has joined #ruby
rubyracer has quit [Quit: Konversation terminated!]
<apeiros> >> $d=[]; def foo; $d<<1;yield(1); $d<<2;yield(2); $d<<3;yield(3);$d<<4;end; enum_for(:foo).first(2); $d
<eval-in_> apeiros => [1, 2] (https://eval.in/53211)
<apeiros> lazy.
<apeiros> it does not evaluate the rest of the method.
<s2013> whats the easiest way to say difference between load and require
<volty> yes, i was playing with reading one line at a time a whole bunch of files with file mask
<apeiros> s2013: define 'easiest'.
cads has joined #ruby
<s2013> i guess.. shortest way
<volty> even with IO.foreach(fn) ...
<s2013> ive been reading and i sort of get it
<apeiros> s2013: load does not load native code. load requires the suffix. load can/will load a file multiple times.
enebo has quit [Ping timeout: 268 seconds]
freezey has quit [Remote host closed the connection]
<maasha> hey, I am looking for a map like method that iterates over a specified number of times, but still returns a enum.
<volty> i found something strange with ranges
interactionjaxsn has quit [Remote host closed the connection]
<s2013> gotcha
Valesk has joined #ruby
enebo has joined #ruby
interactionjaxsn has joined #ruby
rubyracer has joined #ruby
<volty> going to dinner now, later I'll find the code and paste
<a1ph4g33k> bad timing ... the day after I spent a couple of hours to do a programming challenge for newrelic ( for a ruby instrumentation engineer position ) ... the position was removed from the website ... *sigh*
dash_ has quit [Quit: dash_]
Bry8Star{T2 has quit [Remote host closed the connection]
devoldmx3 has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
jalcine has quit [Excess Flood]
kaspergrubbe has quit [Remote host closed the connection]
kindjal has joined #ruby
b3hnam has joined #ruby
petey has joined #ruby
kaspergrubbe has joined #ruby
decoponio has quit [Quit: Leaving...]
T_T has left #ruby [#ruby]
DanKnox is now known as DanKnox_away
Bry8Star{T2 has joined #ruby
interactionjaxsn has quit [Ping timeout: 252 seconds]
<b3hnam> Is a better way to this substr : a[0,a.length-1] ?
beilabs has joined #ruby
<b3hnam> a[0,a.length-1]
ned has quit [Ping timeout: 246 seconds]
kaspergr_ has joined #ruby
kaspergrubbe has quit [Read error: Connection reset by peer]
<onewheelskyward> how about a[0..-1]?
rainbyte16 has quit [Quit: Leaving]
terrellt has joined #ruby
alex__c2022 has joined #ruby
DanKnox_away is now known as DanKnox
<MrZYX> b3hnam: .chop
<lectrick> b3hnam: what onewheelskyward said
<MrZYX> no, wait, actually that's the entire string, so just a
ahawkins has joined #ruby
rezzack has joined #ruby
hello_world has quit [Ping timeout: 250 seconds]
kaspergr_ has quit [Remote host closed the connection]
<MrZYX> or .dup if you need a copy
<lectrick> string_or_array[0..-1] is likely the fastest way to lop off the last element
<waxjar> it's -2, actually
kaspergrubbe has joined #ruby
alekst has joined #ruby
<lectrick> actually, it's not
axl_ has quit [Quit: axl_]
<a1ph4g33k> do you want the element returned when it is removed ? or just chopped off ?
<MrZYX> we need b3hnam to clarify what behavior he wants ;)
pwh has quit []
<onewheelskyward> >> "abcde"[0...-1]
<eval-in_> onewheelskyward => "abcd" (https://eval.in/53212)
<onewheelskyward> >> "abcde"[0..-1]
<eval-in_> onewheelskyward => "abcde" (https://eval.in/53213)
<lectrick> fuck it is
<lectrick> fuck. sorry
<lectrick> seriously?
<onewheelskyward> right. either triple dot or double dot negative plus one.
<lectrick> waxjar: my bad!
devoldmx3 has joined #ruby
tjbarber has joined #ruby
ahawkins_ has joined #ruby
m00nlight has quit [Remote host closed the connection]
<lectrick> i don't normally screw that up. /shocked. Maybe I was thinking of the triple dot version
<MrZYX> >> "abcde".chop
<eval-in_> MrZYX => "abcd" (https://eval.in/53214)
<waxjar> it's because if it were to be 0 ruby wouldn't know wether to start from the beginning or the end i guess
<lectrick> chop works well too
axl_ has joined #ruby
deens has quit [Remote host closed the connection]
nfk has quit [Ping timeout: 268 seconds]
ananthakumaran has joined #ruby
ananthakumaran has quit [Client Quit]
devoldmx27 has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
kaspergrubbe has quit [Ping timeout: 248 seconds]
ananthakumaran has joined #ruby
devoldmx has quit [Read error: No route to host]
ananthakumaran has quit [Max SendQ exceeded]
ozzloy_ is now known as ozzloy
robbyoconnor has joined #ruby
ozzloy has quit [Changing host]
ozzloy has joined #ruby
ananthakumaran has joined #ruby
<apeiros> lol
codeFiend has quit [Quit: codeFiend]
nfk has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
kaspergrubbe has joined #ruby
devoldmx3 has quit [Ping timeout: 248 seconds]
kaspergrubbe has quit [Remote host closed the connection]
|jemc| has joined #ruby
kaspergrubbe has joined #ruby
devoldmx27 has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
beilabs has quit [Ping timeout: 248 seconds]
kaspergrubbe has quit [Read error: Operation timed out]
sergicles has quit [Quit: sergicles]
rrichardsr3 has joined #ruby
awarner__ has quit [Remote host closed the connection]
deens has joined #ruby
iamjarvo_ has joined #ruby
brennanMKE has quit [Remote host closed the connection]
boxmein has quit [Ping timeout: 248 seconds]
beilabs has joined #ruby
NinjaPenguin has joined #ruby
iamjarvo_ has quit [Remote host closed the connection]
brennanMKE has joined #ruby
T_T has joined #ruby
awarner has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
iamjarvo_ has joined #ruby
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
<NinjaPenguin> Does hash have a .reverse! method?
fijimunk1i has quit [Ping timeout: 240 seconds]
iamjarvo has quit [Read error: Connection reset by peer]
ericmathison has joined #ruby
adeponte has joined #ruby
pwh has joined #ruby
levberlin has joined #ruby
Dreamer3 has joined #ruby
<levberlin> Hey guys - I'm helping a hackathon this weekend by having remote experts available that can't make it to NYC. If you want to help out for just a few hours, you can do so here: https://onscreenexpert.com/feast. Can also join the discussion on HN: https://news.ycombinator.com/item?id=6516895.
fijimunkii has joined #ruby
<NinjaPenguin> Never mind, I completely missed the fact that sort_by returns an array which can be reversed.
<riceandbeans> not a fan of NYC
ananthakumaran has quit [Quit: Leaving.]
brennanMKE has quit [Ping timeout: 248 seconds]
alex__c2022 has quit [Quit: alex__c2022]
<levberlin> riceandbeans: that's why you can help out from home :)
ace_striker has joined #ruby
bradhe has joined #ruby
fenicks has joined #ruby
timonv has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
timonv has quit [Remote host closed the connection]
devoldmx has joined #ruby
jalcine has joined #ruby
anderson has left #ruby ["Leaving"]
levberlin has left #ruby [#ruby]
pellenation has quit [Quit: Leaving.]
asteros has joined #ruby
Aloysius1 has quit [Remote host closed the connection]
petey has quit [Remote host closed the connection]
kil0byte has quit [Remote host closed the connection]
petey has joined #ruby
sk87 has joined #ruby
robbyoconnor has quit [Ping timeout: 268 seconds]
tjbiddle has joined #ruby
|jemc| has quit [Ping timeout: 268 seconds]
petey_ has joined #ruby
petey has quit [Read error: Connection reset by peer]
adeponte has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
adeponte has joined #ruby
sk87 has quit [Client Quit]
NinjaPenguin has quit [Ping timeout: 248 seconds]
allsystemsarego has quit [Quit: Leaving]
nutella has joined #ruby
nfk has quit [Ping timeout: 246 seconds]
theRoUS has quit [Ping timeout: 248 seconds]
nutella is now known as Guest1459
jcromart_ has joined #ruby
Ox6abe has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
adeponte has quit [Ping timeout: 265 seconds]
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
v0n has quit [Ping timeout: 248 seconds]
adeponte has joined #ruby
rrichardsr3 has quit [Quit: -- I'm out --]
kirun has joined #ruby
p8952 has quit [Quit: Leaving]
p8952 has joined #ruby
byprdct has joined #ruby
Valesk has quit [Ping timeout: 248 seconds]
wildroman has quit [Remote host closed the connection]
wildroman has joined #ruby
maasha has quit [Ping timeout: 250 seconds]
Aloysius1 has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
buibex has joined #ruby
devoldmx has joined #ruby
[spoiler] has joined #ruby
|jemc| has joined #ruby
vim_shim has joined #ruby
aleron has quit [Quit: leaving]
wildroman has quit [Ping timeout: 246 seconds]
Squarepy has joined #ruby
aspires has quit [Quit: aspires]
kobain_ has quit [Remote host closed the connection]
<volty> not the same object, i checked that
kobain has joined #ruby
Ox6abe has quit [Read error: Connection reset by peer]
rainbyte16 has joined #ruby
funburn has joined #ruby
devoldmx3 has joined #ruby
funburn has quit [Client Quit]
angusigu1ss has joined #ruby
fgh2 has joined #ruby
burlyscudd has quit [Quit: Leaving.]
ephemerian has joined #ruby
glaksmono has quit [Quit: This computer has gone to sleep]
burlyscudd has joined #ruby
DonRichie has quit [Read error: Connection reset by peer]
yzzz has quit [Read error: Connection reset by peer]
headius has quit [Quit: headius]
xkickflip has quit [Quit: h..hi]
DonRichie has joined #ruby
angusiguess has quit [Read error: Connection reset by peer]
someish has quit [Read error: Connection reset by peer]
devoldmx has quit [Ping timeout: 264 seconds]
elaptics is now known as elaptics`away
someish has joined #ruby
ace_striker has quit [Ping timeout: 250 seconds]
twoism_ has joined #ruby
glaksmono has joined #ruby
<volty> do not waste your time: https://eval.in/private/4bc97bdd5360f3
interactionjaxsn has joined #ruby
v0n has joined #ruby
angusigu1ss is now known as angusiguess
petey_ has quit [Remote host closed the connection]
heidi has quit [Quit: Leaving.]
petey has joined #ruby
b3hnam has left #ruby [#ruby]
twoism has quit [Ping timeout: 260 seconds]
cubicme has quit [Read error: Connection reset by peer]
<Hanmac> volty: whats wrong with them? i mean what did you excepted?
<volty> isn't that obvious ?
someish has quit [Quit: someish]
dash_ has joined #ruby
nouitfvf has quit [Excess Flood]
skaflem has quit [Quit: Leaving]
BizarreCake has quit [Ping timeout: 246 seconds]
twoism_ has quit [Ping timeout: 248 seconds]
nouitfvf has joined #ruby
cubicme has joined #ruby
<volty> if objects are 'a'..'b', 'a'..'c', i expect an array of ['a'..'b', 'a'..'c']
RichardBaker has quit [Quit: RichardBaker]
zachrab has joined #ruby
<[spoiler]> hanmac, if you check his first link (https://eval.in/private/7976bfd38aa94c) I believe he expected the to_a/map to return:["a".."b", "a".."c", "a".."d", "a".."e", "a".."f"]
<Hanmac> haha look what i did try: https://eval.in/private/496f272de62482 ;D
c0rn has joined #ruby
<[spoiler]> Frankly, I expected it too
<volty> of course, the objects are checked (shown) with each and inside the map proc
petey has quit [Ping timeout: 248 seconds]
<volty> it is not consistent.
randomnick_ has joined #ruby
<volty> I can make it work in many ways
ace_striker has joined #ruby
<volty> the prob. is why this bug / inconsistency
petey has joined #ruby
<MrZYX> looks like range doesn't copy the object, so you modify the the object you gave to the earlier ranges you created
zachrab has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 245 seconds]
freezey has joined #ruby
digitalcake has joined #ruby
headius has joined #ruby
Davey_ has joined #ruby
workmad3 has joined #ruby
Es0teric has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
<apeiros> volty: check o.end.object_id in your first one
dangerousdave has joined #ruby
alekst has quit [Quit: Leaving...]
<apeiros> you're using succ!, so you're yieling the same string as range end all the time
<apeiros> *yielding
hasrb has joined #ruby
<digitalcake> I just noticed something odd, Array.new(3, MyObject.new ) will produce 3 MyObjects but they will all be the same instance.
prophile_ is now known as prophile
<apeiros> digitalcake: use block form
<apeiros> Array.new(3) { MyObject.new }
<digitalcake> thanks.
tjsousa has quit [Ping timeout: 248 seconds]
<apeiros> yw
<volty> apeiros: there's the each and there's the map that should return the same result
<volty> your explanation is ok, i'm not going to check it either
poisonarms has quit [Quit: Computer has gone to sleep]
iamjarvo has joined #ruby
punktechnology has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> volty: which example? (you should name/number them if you make multiple - it's not nice playing guessing games on which you mean)
<volty> the same object SEMANTICALLY
<Hanmac> hm i need to rebuild my ruby … for some reason i found a way to make SEGFAULTs with Range.new … oO
freezey has quit [Read error: Connection reset by peer]
<volty> the first one, i print the object from inside the map block before returning it
<apeiros> volty: again: *which example*
b3hnam has joined #ruby
<apeiros> you pasted 3
freezey has joined #ruby
aagdbl has quit [Quit: Leaving.]
jonathanwallace has quit [Ping timeout: 248 seconds]
JohnBat26 has quit [Ping timeout: 248 seconds]
dangerousdave has quit [Quit: Leaving...]
<[spoiler]> volty: the `bg` variable is the same in all of the ranges, that's why you get a..f everywhere
nadirvardar has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<apeiros> volty: again, your range end is staying the same object
<apeiros> gimme a minute
Davey_ has quit [Quit: Computer has gone to sleep.]
<[spoiler]> because "bg" is the reference to the same object
iamjarvo_ has quit [Ping timeout: 256 seconds]
gazzik has joined #ruby
rippa has quit [Read error: Connection reset by peer]
<[spoiler]> succ! modifies the character in place
<[spoiler]> object*
<[spoiler]> it doesn't create a new one
brennanMKE has joined #ruby
<apeiros> volty: http://pastie.org/8387519
<apeiros> this is what you're doing
<[spoiler]> this, for example, will solve the problem: https://eval.in/private/ef9b658658af87
<volty> let me finish with a question: should that be the expected behavior?
<[spoiler]> volty, yes
<apeiros> and you're surprised that when you look between the succ!'s, you get different results, but at when looking at it in the end, all are the same.
<apeiros> and yes, that's expected behavior.
<Hanmac> apeiros: can you try some code on your mashine? it crashs for me but it works for eval.in for some reason … (https://eval.in/private/988430e10aa948 … i tested it with ruby-trunk)
<volty> ok
Valesk has joined #ruby
<[spoiler]> apeiros lol at that example
<apeiros> [spoiler]: well, that's what he does, unrolled.
tsykoduk is now known as zz_tsykoduk
<apeiros> and without the range part. since that part is irrelevant to what he observes.
<[spoiler]> hanmac, it worked for me
petey has quit [Remote host closed the connection]
<apeiros> hanmac: Segmentation fault: 11
<Hanmac> yeah thats what i mean oO ;P
<apeiros> bug
<[spoiler]> irb(main):025:0> RUBY_VERSION
<[spoiler]> => "2.0.0"
mayorga has joined #ruby
petey has joined #ruby
<[spoiler]> on Windows
<apeiros> RUBY_DESCRIPTION -> ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]
Xeago has quit [Remote host closed the connection]
<Hanmac> yeah i am on darwin too ..
<[spoiler]> oh right, let me print that too
zmike123 has quit [Quit: ~]
<Hanmac> (for some reason it works for eval.in)
<[spoiler]> RUBY_VERSION #=> "ruby 2.0.0p247 (2013-06-27) [i386-mingw32]"
gazzik has quit [Ping timeout: 248 seconds]
<[spoiler]> eval.in's RUBY_DESCRIPTION: ruby 2.0.0p0 (2013-02-24 revision 39474) [i686-linux]"
jfelchner has joined #ruby
<Hanmac> hm it could be an 64 bit problem? oO
coderhs has quit [Ping timeout: 264 seconds]
<[spoiler]> Report a bug, if it wasn't already reported
simplyaubs has quit [Quit: simplyaubs]
petey has quit [Ping timeout: 268 seconds]
binaryplease has joined #ruby
ethank has joined #ruby
nomenkun has joined #ruby
tanema has joined #ruby
nisstyre has quit [Quit: Leaving]
<Hanmac> currently flling the formula
jfelchner has quit [Ping timeout: 245 seconds]
Squarepy has quit [Quit: Leaving]
T_T has quit [Remote host closed the connection]
tanema has quit [Remote host closed the connection]
locriani has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
tanema has joined #ruby
<Hanmac> hm can someone try it with 64bit ruby on linux?
T_T has joined #ruby
tatsuya_o has joined #ruby
jfelchner has joined #ruby
chairabanta has joined #ruby
nat2610 has quit [Quit: Leaving.]
<havenwood> hanmac: fails on: "ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]"
<banisterfiend> havenwood are you decent at coffeescript?
<havenwood> banisterfiend: nope
sambao21 has joined #ruby
<banisterfiend> ah np :)
axl_ has quit [Quit: axl_]
<havenwood> banisterfiend: been poking around at ClojureScript :P
<havenwood> banisterfiend: CoffeeScript looks neat, but i haven't used it enough to be procient ;(
<deception> Am I asking for trouble using activerecord outside of rails?
<deception> I'm thinking of just using datamapper then
ethank has quit []
deens has quit [Remote host closed the connection]
ehaliewicz has quit [Remote host closed the connection]
ehaliewicz has joined #ruby
dzhulk has quit [Quit: Leaving.]
<havenwood> deception: AR is meant to be usable outside Rails. DM actually is funnily also active record pattern, but the upcoming successor to DM, rom-rb, is data mapper pattern.
<havenwood> deception: Prolly too early to use ROM, but looks neat. :)
neaer has joined #ruby
<deception> Haven't heard of ROM, I'll have to go check it out
dzhulk has joined #ruby
T_T has quit [Ping timeout: 268 seconds]
devoldmx3 has quit [Ping timeout: 268 seconds]
<aedorn> hanmac: it works on Rubinius 2.0 x86_64 ;)
rubyracer has quit [Quit: Konversation terminated!]
aldodelgado has joined #ruby
fenicks has quit [Remote host closed the connection]
<havenwood> hanmac: SystemStackError: stack level too deep on JRuby :P
miskander has joined #ruby
<Hanmac> havenwood: hm yeah thats why i rescue the StackError (or did JRuby ignore that?? )
dllama has joined #ruby
jkline has joined #ruby
Tearan has joined #ruby
rubyracer has joined #ruby
<havenwood> hanmac: it ignored it
petey has joined #ruby
kaspergrubbe has joined #ruby
notjohn has joined #ruby
<Hanmac> HUCH!! (another reason why i hate JRuby!)
<havenwood> <3 JRuby
workmad3 has quit [Ping timeout: 252 seconds]
enebo has quit [Ping timeout: 248 seconds]
deception has quit [Quit: Goodbye]
poison has left #ruby [#ruby]
<Hanmac> hm ok then imo its also an bug in jruby, because imo it should not make an StackError
SHyx0rmZ has joined #ruby
mgorbach has quit [Ping timeout: 252 seconds]
<dllama> hey guys. hoping someone might be able to point me in the right direction here. I'm using mongo in a rails4 app. but can't seem to figure out how to do eager loading for an association and google results haven't worked for me
coderhs has joined #ruby
mansi has quit [Read error: Connection reset by peer]
kraljev2 has left #ruby [#ruby]
mansi has joined #ruby
asteros has quit [Quit: asteros]
byprdct has quit [Read error: Connection reset by peer]
<[spoiler]> havenwood, Oh! rom-rb seems pretty badass, actually
<havenwood> dllama: Might have better luck with Rails issues in #RubyOnRails
Guest1459 has quit [Ping timeout: 260 seconds]
mansi has quit [Read error: Connection reset by peer]
<havenwood> [spoiler]: Yeah, i'm looking forward to it!
<dllama> havenwood, I've asked there, was ignored.
mansi has joined #ruby
mark_locklear has quit [Ping timeout: 268 seconds]
Zerogrifter has quit [Remote host closed the connection]
kaspergrubbe has quit [Ping timeout: 256 seconds]
<dllama> went to #mongo and #mognoid too, and still can't seem to find what i'm looking for
pwh has quit []
iliketurtles has quit [Quit: Textual IRC Client: www.textualapp.com]
<Hanmac> havenwood: i try to file the bug on #jruby … hm i will look how long it takes until they react of my call that i found a bug
<zenloop> Hey guys, simple question, how do I load a cookbook from a file into shef?
<havenwood> hanmac: :D
joshwines has quit [Ping timeout: 256 seconds]
robustus has quit [Ping timeout: 245 seconds]
digitalcake has quit [Quit: Leaving.]
<Hanmac> and i need to kick karma in the ass, i mean why am i the person that found this creepy bugs? it seems that i am to experimentalphily ;P
robustus has joined #ruby
<[spoiler]> zenloop, is shef a library/gem or are you kidding? haha
nomenkun has quit [Remote host closed the connection]
mansi has quit [Read error: Connection reset by peer]
phenocode has quit [Quit: Leaving]
mansi has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
iliketurtles has joined #ruby
<havenwood> hanmac: You are like the truffle pig of seg faults!
dllama has left #ruby [#ruby]
S0da has joined #ruby
<Hanmac> havenwood: is that the game "pick the ruby interpreter with an stick until it segfaults" ? ;P
<havenwood> haha
devoldmx has joined #ruby
kindjal has quit [Ping timeout: 240 seconds]
brennanMKE has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
<nhmood> Is there a way to add arbitrary code to every method in a class in one place?
jkline has quit [Quit: jkline]
mayorga has quit [Ping timeout: 265 seconds]
colonolGron has joined #ruby
brennanMKE has joined #ruby
<nhmood> e.g. If I want a debug print I have to add debug_print "This is #{self}" to every method I write
jfelchner has quit [Quit: jfelchner]
<nhmood> Is there a way to bake that into every method that is created under a given class
brennanMKE has quit [Read error: Connection reset by peer]
digitalcake has joined #ruby
brennanMKE has joined #ruby
nfk has joined #ruby
<[spoiler]> nhmood, only thing that comes to mind is loading + parsing the file, injecting your code, evaling it... I don't think you can "open" a method?
jkline has joined #ruby
<lectrick> This is probably heresy, but I believe unit tests should live inside the class they are testing
user__ has joined #ruby
<lectrick> thoughts? apeiros? banisterfiend?
aldodelgado has quit [Quit: Linkinus - http://linkinus.com]
<lectrick> I wrote a little framework to help that work and it seemed to work well. "Building" the class by running it, runs the unit test.
Lewix has quit [Remote host closed the connection]
<havenwood> hanmac: maybe a silly question, but does MRI successfully rescue SystemStackError?
Lewix has joined #ruby
<lectrick> Sorry, by running it I meant running the class directly (not including it from another class)
<Hanmac> havenwood: hm yeah it does
aldodelgado has joined #ruby
S0da has quit [Ping timeout: 268 seconds]
RichardBaker has joined #ruby
<havenwood> hanmac: figured...
b3hnam has left #ruby [#ruby]
devoldmx has quit [Ping timeout: 252 seconds]
AndChat| has quit [Ping timeout: 248 seconds]
<apeiros> lectrick: quoi?
<[spoiler]> apeiros, > <nhmood> Is there a way to add arbitrary code to every method in a class in one place?
devoldmx has joined #ruby
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
<[spoiler]> <nhmood> e.g. If I want a debug print I have to add debug_print "This is #{self}" to every method I write
heidi has joined #ruby
<[spoiler]> <nhmood> Is there a way to bake that into every method that is created under a given class
<[spoiler]> Oh, my irc client can display hiragana and katagana. Plesantly surprised
iamjarvo has quit [Remote host closed the connection]
<apeiros> nhmood: see Module#method_added
<apeiros> and yes
iamjarvo has joined #ruby
Banistergalaxy has joined #ruby
<apeiros> not as nicely as an AOP language would allow you to, though.
Zai00 has joined #ruby
<[spoiler]> apeiros, I think you misunderstood. He wants to add code *into* the method
iamjarvo has quit [Read error: Connection reset by peer]
<apeiros> [spoiler]: define *into*. if it's at the start or the end: yes. within the method: no.
<havenwood> nhmood: you wanna know when a method is added to the class or when it's called?
iamjarvo has joined #ruby
<nhmood> I have a generic debug message that identifies which method I am currently in (used for debugging) (always at the beginning of the method)
<nhmood> Right now I manually add this one liner to every method I write
<apeiros> [spoiler]: see - at the beginning. and that's possible.
<nhmood> Using method_added?
<apeiros> nhmood: that's a rather bad solution to your problem, though.
<nhmood> apeiros: What would you suggest instead
asteros has joined #ruby
<apeiros> well, you won't like it as it's not a recipe: debug in a saner fashion :)
nat2610 has joined #ruby
<apeiros> for existing methods you can use instance_methods to iterate over them
miskander has quit [Quit: miskander]
jonathanwallace has joined #ruby
MiguelGD has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
<volty> nhmood: i use, like you, manual debugging but not with the method name, just numbers or variables with binding, file number and line number
iamjarvo has joined #ruby
schaerli has quit [Remote host closed the connection]
ciziar has joined #ruby
<volty> you have to pass to classic debugging for that
iamjarvo has quit [Remote host closed the connection]
schaerli has joined #ruby
<nhmood> Yeah, it is more of a general debugging tool than oen I use to fix specific problems
iamjarvo has joined #ruby
<[spoiler]> apeiros, Hmm. How would you inject code into the method? I know of a way to run code before or after the method that's called, but I can't think of a way to inject code into one
<nhmood> It is easier when I notice unexpected behavior to turn on a Debug constant flag and then read the flow of my program in and out of methods
<[spoiler]> Just curious, I doubt I'd ever need it though
Xeago has joined #ruby
<apeiros> [spoiler]: read the backlog
<onewheelskyward> Once I learned about visual debuggers, I've never gone back.
* [spoiler] reads
<apeiros> I said *within* was not possible. but that's not what he wants.
<[spoiler]> oh
burlyscudd has quit [Ping timeout: 248 seconds]
barratt has quit [Quit: Leaving...]
<apeiros> and "not possible" is actually just a lame hand waving for "very hard"
<apeiros> you could use tools like ruby2ruby or similar
<apeiros> but it's ugly, error-prone and nothing I'd recommend.
<[spoiler]> "<apeiros> if it's at the start or the end: yes. within the method: no" found it :P I missed it earlier
<yxhuvud> or open the files and load them again :D
spalenza has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
<apeiros> yxhuvud: he wants to add the code dynamically
<apeiros> i.e. generated code
xkickflip has joined #ruby
schaerli has quit [Ping timeout: 248 seconds]
iamjarvo has quit [Ping timeout: 240 seconds]
<Hanmac> apeiros: it seems i have some kind of "pauli-effect" on programs … when i poke them, they break ;P
spalenza has quit [Remote host closed the connection]
spalenza has joined #ruby
<apeiros> hanmac-pauli you shall be called henceforth
aldodelgado has quit [Quit: Linkinus - http://linkinus.com]
<[spoiler]> hanmac, I think your pokes break out of the "poke" zone and become "probes" :P
<nhmood> So when #method_added for before method call and #method_removed for after it seems?
dhruvasagar has joined #ruby
<banisterfiend> hanmac can you speak to apeiros in german for a while
<nhmood> Besides not being the best way to debug (:p) are there any other downsides to this?
devoldmx3 has joined #ruby
axl_ has joined #ruby
tjsousa has joined #ruby
c0rn has quit [Ping timeout: 268 seconds]
<apeiros> nhmood: method_added is executed when you define a method. the idea is that you use that callback to redefine your method.
devoldmx has quit [Ping timeout: 248 seconds]
<apeiros> i.e. you alias the method away and replace it with a new definition which does your debug print and then calls the alias
kaspergrubbe has joined #ruby
c0rn has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
<nhmood> I see
iamjarvo has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
<nhmood> It seems like it applies to a class instance
devoldmx has joined #ruby
yano has quit [Quit: WeeChat, The Better IRC Client: http://weechat.org/]
<nhmood> aka. would I have to add the method for each class I create or would defining it under the Module carry down to all classes?
lfox has quit [Quit: ZZZzzz…]
<apeiros> yes. classes are instance of Class. hence an instance method of Class (and Module, which is Class' superclass) become "class methods"
mrsolo_ has joined #ruby
spalenza has quit [Remote host closed the connection]
<apeiros> class methods are inherited. define it on Object and you'll get all (unless some descendant redefines it and doesn't call super)
newbiehacker has quit [Ping timeout: 264 seconds]
<apeiros> careful though, not that you create an infinite loop :) (adding within method_added will trigger method_added)
<nhmood> Ooo that is tricky
yano has joined #ruby
<nhmood> Object --> Module --> Class is the correct heirarchy?
iamjarvo_ has joined #ruby
whunt has quit [Quit: Computer has gone to sleep.]
<[spoiler]> nhmood, BasicObject
joshwines has joined #ruby
<nhmood> I see, thanks
<[spoiler]> I meant to say that it's BasicObject - Object - Module - Class
whunt has joined #ruby
<[spoiler]> You can check by calling `super_class` on Class
<[spoiler]> wait
<[spoiler]> it might be superclass
<[spoiler]> actually... superclass looks more familiar
<nhmood> Yes, it is superclass
iamjarvo has quit [Ping timeout: 248 seconds]
buibex has quit [Remote host closed the connection]
<nhmood> I figured the BasicObject --> Object... part haha
zz_tsykoduk is now known as tsykoduk
jaikeerthi has quit [Quit: Leaving.]
fmcgeough has quit [Quit: fmcgeough]
<Hanmac> [spoiler] & nhmood http://ruby-doc.org/core-2.0/Class.html there is a diagram for thar
leonidlm has quit [Ping timeout: 260 seconds]
buibex has joined #ruby
Kar- has quit [Ping timeout: 256 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
boxmein has joined #ruby
simplyaubs has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
ehc has quit [Quit: ehc]
buibex has quit [Ping timeout: 264 seconds]
xk_id has quit [Quit:
schaerli has joined #ruby
v0n has quit [Quit: WeeChat 0.4.3-dev]
v0n has joined #ruby
<havenwood> the '+' is a swordsman and the '^' is a bat, so be careful as you navigate the castle
mark_locklear has joined #ruby
Zeeraw has joined #ruby
buibex has joined #ruby
<havenwood> ruby object model roguelike
iamjarvo_ has quit [Remote host closed the connection]
rahulkmr1 has joined #ruby
<Hanmac> "ruby hierarchy - now a dungeon crawler"
someish has joined #ruby
rahulkmr has quit [Ping timeout: 248 seconds]
iamjarvo has joined #ruby
dash_ has quit [Quit: dash_]
sambao21 has quit [Quit: Computer has gone to sleep.]
ArchBeOS has quit [Quit: Peace Out, jerks!]
<nhmood> lol thanks hanmac
<[spoiler]> havenwood, hanmac lol
RichardBaker has quit [Quit: RichardBaker]
sambao21 has joined #ruby
ace_striker has quit [Quit: Page closed]
snovak_ has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
flyinprogramer has joined #ruby
devoldmx has joined #ruby
<flyinprogramer> rabl question: http://pastebin.com/BRE3WMty
iamjarvo has quit [Ping timeout: 264 seconds]
Valesk has quit [Ping timeout: 264 seconds]
Kar- has joined #ruby
funburn has joined #ruby
rahulkmr1 has quit [Ping timeout: 240 seconds]
boycey has joined #ruby
snovak has quit [Ping timeout: 264 seconds]
<boycey> hi. need to change d/l server for rvm. any ideas ? getting just 40kbs atm
colonolGron is now known as movieGron
yacks has quit [Ping timeout: 246 seconds]
RichardBaker has joined #ruby
iamjarvo has joined #ruby
ninegrid_ is now known as ninegrid
clov3r has quit [Remote host closed the connection]
interactionjaxsn has quit [Remote host closed the connection]
clov3r has joined #ruby
interactionjaxsn has joined #ruby
iamjarvo has quit [Remote host closed the connection]
adambeynon has joined #ruby
<havenwood> boycey: Not sure, maybe try #rvm
Valesk has joined #ruby
iamjarvo has joined #ruby
<havenwood> boycey: oh, nvm - see you're already there
forced_request has joined #ruby
<havenwood> tsk tsk S3
<havenwood> the invincible cloud...
twoism has joined #ruby
mansi has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
petey has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
petey has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
tjsousa has quit [Ping timeout: 260 seconds]
iamjarvo has joined #ruby
petey has quit [Read error: Connection reset by peer]
clov3r has quit [Ping timeout: 260 seconds]
interactionjaxsn has quit [Ping timeout: 248 seconds]
petey has joined #ruby
burlyscudd has joined #ruby
buibex has quit [Remote host closed the connection]
Kar- has quit [Ping timeout: 245 seconds]
T_T has joined #ruby
kindjal has joined #ruby
pangur has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
jkamenik has quit [Quit: Leaving.]
devoldmx has joined #ruby
pel_daniel has quit [Ping timeout: 248 seconds]
postmodern has joined #ruby
hashpuppy has quit [Quit: Textual IRC Client: www.textualapp.com]
<pangur> Why does ... arr = IO.read("base.csv", "r", "\t") ... give me an error that says: roll.rb:9:in `read': no implicit conversion from string (TypeError) from roll.rb:9:in `<main>'? I take it that it is to do with the first element of each csv record being an integer? How do I get it solve this, please?
<pangur> It is a tab-separated file rather than a comma separated one.
<apeiros> pangur: what should the 3rd argument "\t" do?
<pangur> I was expecting it to indicate that the delimiter was a tab rather than a comma
raphaelivan has joined #ruby
chairabanta has quit [Quit: Leaving...]
k5673 has quit [Read error: Connection reset by peer]
adeponte has quit [Remote host closed the connection]
<[spoiler]> Isn't IO#read name, length, offset?
<apeiros> pangur: you're aware that you're using *IO* read?
<apeiros> IO has absolutely no concept of CSV
<pangur> Can I dispense with the IO then?
<apeiros> ?
smashwilson has joined #ruby
cubicme has quit [Read error: Connection reset by peer]
<pangur> I am taking that I do not need the IO part of IO.read
adeponte has joined #ruby
rainbyte16 has quit [Quit: Leaving]
<[spoiler]> Well, the big problem here is that I don't think #read does what you think it does.
<apeiros> oh… I think you'll have to learn a bit about how OO works.
c0rn has quit [Quit: Computer has gone to sleep.]
angusiguess has quit [Ping timeout: 245 seconds]
DeanH has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cubicme has joined #ruby
<apeiros> pangur: any class can have a read method. and no, you can't just "do away with IO and just use 'read'"
kevind_ has joined #ruby
pwh has joined #ruby
<apeiros> if you want to read CSV files and don't want to parse yourself, you'll have to use a class which deals with CSVs. IO does not.
<pangur> I basically just want to open a file of lines, read each one, split it into "fields" and play about with that.
<apeiros> ruby stdlib includes the CSV class.
<[spoiler]> IO.read("blah.cvs", <how many btyes to read>, <offset>) #=> String
tjbarber has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> also, how the heck did you get the idea to "just try and use 3rd param of read as separator"?
kpshek has joined #ruby
<apeiros> programming doesn't work by wishing really hard that a method does what you want from it…
<shevy> hmm
<shevy> what!
<shevy> lies!
<shevy> LIEEES!!!
<[spoiler]> apeiros, keyword: try haha
* apeiros gives shevy a cake
<shevy> .cvs, didn't someone write a replacement for that... :D
* pangur was trying to import some of the idioms from other scripting languages of which he is vaguely aware.
<shevy> bad [spoiler] baaaad
kevind has quit [Ping timeout: 248 seconds]
kevind_ is now known as kevind
klaas_ has joined #ruby
clov3r has joined #ruby
<shevy> I can't remember the name...
amacgregor has joined #ruby
bluepojo_ has joined #ruby
aspires has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
<pangur> It seemed to me that I had seen "\t" begin used as a delimiter in one of the forums, somewhere.
<[spoiler]> shevy, Pfft. My typos are like unicorns
julian-delphiki has quit [Read error: Connection reset by peer]
rickmasta has quit [Read error: Connection reset by peer]
bluepojo has quit [Read error: Connection reset by peer]
jcromart_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nfk has quit [Quit: yawn]
devoldmx has joined #ruby
<shevy> pangur File.readlines is too simple?
tjbarber has joined #ruby
<pangur> I would not have thought so, shevy :)
julian-delphiki has joined #ruby
<shevy> well dunno...
* pangur is very rusty on ruby
Kabaka has quit [Ping timeout: 240 seconds]
klaas has quit [Read error: Connection reset by peer]
<shevy> I always dread running .gsub on it leading to incompatible encoding stuff
ceverett has joined #ruby
Targen_ has quit [Remote host closed the connection]
crazysim_ has quit [Excess Flood]
crazysim has joined #ruby
Boohbah has quit [Ping timeout: 240 seconds]
breakingthings has quit []
yacks has joined #ruby
<[spoiler]> pangur, take a look at this: http://ruby-doc.org/stdlib-1.9.2/libdoc/csv/rdoc/CSV.html
<pangur> I have installed my ruby using rvm
c0rn has joined #ruby
Targen has joined #ruby
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
end_guy has quit [Ping timeout: 240 seconds]
St_Marx has quit [Ping timeout: 240 seconds]
_br_ has quit [Ping timeout: 264 seconds]
caveat- has quit [Ping timeout: 264 seconds]
Alina-malina has quit [Read error: Connection reset by peer]
<BraddPitt> is there a way to programmatically get a ruby method definition?
zxq9 has quit [Remote host closed the connection]
boxmein has quit [Quit: [02:26.00] <Ristovski> mozzarella filofax fadget]
msuszczy has quit [Ping timeout: 264 seconds]
sivoais has quit [Ping timeout: 264 seconds]
Rylee has quit [Ping timeout: 264 seconds]
rcs has quit [Ping timeout: 264 seconds]
<[spoiler]> BraddPitt, use the #method :name method
* pangur is looking at [spoiler]'s link.
msuszczy has joined #ruby
jcromart_ has joined #ruby
<BraddPitt> no like
<BraddPitt> uh
<BraddPitt> the documentation
caveat- has joined #ruby
Alina-malina has joined #ruby
Boohbah has joined #ruby
classix has quit [Ping timeout: 264 seconds]
matrixise has quit [Ping timeout: 264 seconds]
<apeiros> BraddPitt: no
sivoais has joined #ruby
<apeiros> BraddPitt: pry provides means
<BraddPitt> damn
<apeiros> `? Time.now` <- docs
<apeiros> `$ Time.now` <- code
matrixise has joined #ruby
<apeiros> core methods require an additional gem, though
Rylee has joined #ruby
newbiehacker has joined #ruby
<shevy> BraddPitt try __method__ inside a method perhaps?
_br_ has joined #ruby
kpshek has quit [Ping timeout: 248 seconds]
classix has joined #ruby
<BraddPitt> i just meant like in a REPL
sambao21 has quit [Quit: Computer has gone to sleep.]
<apeiros> pry is a repl
<shevy> hmm the language Io had cool introspection, you could get the content and I think definition for any method at runtime whenever you wanted
someish has quit [Quit: someish]
<shevy> BraddPitt show_method perhaps?
<apeiros> shevy: JS too. Function has toString
rcs has joined #ruby
<shevy> damn
<shevy> I want to continue hating JS
<[spoiler]> shevy, you can get the "content" (code) of a function in Javascript, too
kaldrenon has quit [Remote host closed the connection]
<shevy> :(
devoldmx3 has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
notjohn has quit [Quit: notjohn]
tjbiddle has quit [Ping timeout: 265 seconds]
nobitanobi has joined #ruby
someish has joined #ruby
jcromart_ has quit [Client Quit]
<[spoiler]> shevy, you could do something like `new Function(<arguments, if any>, "bleh(); return;")`
staafl has quit [Ping timeout: 240 seconds]
<shevy> hmm
DonRichie has quit [Quit: Verlassend]
<shevy> why is the Function part upcased?
Zeeraw has quit [Quit: Computer has gone to sleep.]
<[spoiler]> it's the same as doing `function() { bleh(<arguments, if any>); return; }`
<shevy> hmm
martxel has quit [Quit: WeeChat 0.4.1]
tjbiddle has joined #ruby
Bry8Star{T2 has joined #ruby
<[spoiler]> Because "Function" is a, well... function
<[spoiler]> it's like a class, i suppose
<[spoiler]> except JS has no classes
end_guy has joined #ruby
BraddPitt has quit [Quit: Leaving]
gazzik has joined #ruby
<[spoiler]> i mean
<shevy> I find JS confusing
<shevy> although Io language also is prototypic
<[spoiler]> You can't really use lowerface cunction because "function" is a keyword
<shevy> ruby is like the most prototypic class-based language out there
devoldmx3 has quit [Read error: Connection reset by peer]
tanema has quit [Remote host closed the connection]
<shevy> ok, I can't use downcased function
devoldmx has joined #ruby
aspires has quit [Quit: aspires]
ahawkins_ has quit [Ping timeout: 248 seconds]
<shevy> but the new Function part still confuses me...
martxel has joined #ruby
tanema has joined #ruby
ahawkins has quit [Ping timeout: 265 seconds]
martxel is now known as Guest28490
<[spoiler]> it's like
<[spoiler]> Function.new
<[spoiler]> in ruby
<[spoiler]> like, ruby has a class keyword and a Class class
<shevy> ok, that is just class Function; end yes?
<shevy> or is it more like Function = method(name_here)
<[spoiler]> Uh
<[spoiler]> It's like doing
movieGron has quit [Read error: Connection reset by peer]
notjohn has joined #ruby
<[spoiler]> ok hold on
iamjarvo_ has joined #ruby
Guest28490 is now known as martxel
martxel has quit [Changing host]
martxel has joined #ruby
* shevy holds on
Ahti333 has joined #ruby
endash has joined #ruby
tanema has quit [Ping timeout: 252 seconds]
iamjarvo has quit [Ping timeout: 248 seconds]
binarypl1 has joined #ruby
* shevy wonders if [spoiler] is still alive ...
kevind has quit [Quit: kevind]
<[spoiler]> he is :D
threesome has quit [Ping timeout: 264 seconds]
<nobitanobi> Anybody familiar with Nokogiri? I am trying to find all images that are children of an anchor which href value is equal to 'a', 'b' or 'c'. So far I have done this: https://gist.github.com/novito/6891911 -- but I fail to see how to get the images. Any thoughts? Thanks
notjohn has quit [Ping timeout: 248 seconds]
danshultz has quit [Remote host closed the connection]
digitalcake has quit [Quit: Leaving.]
binaryplease has quit [Ping timeout: 260 seconds]
sambao21 has joined #ruby
movieGron has joined #ruby
<[spoiler]> Well, the ruby equivalent of example 2 would be a proc/block
funburn has quit [Quit: funburn]
marcdel has joined #ruby
<[spoiler]> but I didn't use it so you get an idea of how JS works, I know you know ruby
kaspergrubbe has quit [Remote host closed the connection]
kevind has joined #ruby
<shevy> [spoiler] interesting
<shevy> does this mean that javascript has a feature that ruby does not have?
<[spoiler]> nobitanobi, erm, did you try using attribute selectors inside css?
aspires has joined #ruby
<shevy> [spoiler] I know only some ruby, not 100%... lots of the meta-stuff is rather complicated so I avoid it when I can
<[spoiler]> shevy, Ruby has it, it just implements it differently
Mon_Ouie has quit [Ping timeout: 256 seconds]
<nobitanobi> uhm? [spoiler] I am able to get the anchors that satisfies href = a, b or c. But after that, I don't know how to get the images inside each of those anchors
<[spoiler]> nobitanobi, is it an img element?
<nobitanobi> yes
aryaching_ has quit [Ping timeout: 256 seconds]
olivier_bK has joined #ruby
<nobitanobi> I know I can do. anchor_element.children
petey has quit [Remote host closed the connection]
<nobitanobi> but I just want the <img> elements
<nobitanobi> particularly, the src attribute of the img elements
<nobitanobi> :)
Mon_Ouie has joined #ruby
simplyaubs has quit [Quit: simplyaubs]
petey has joined #ruby
<[spoiler]> how about
<[spoiler]> you call css on the anchor inside the block?
taptapdan has quit [Quit: taptapdan]
<nobitanobi> uh
mlpinit_ has quit [Remote host closed the connection]
<nobitanobi> what do you mean? as a condition?
iamjarvo_ has quit [Remote host closed the connection]
<nobitanobi> oh ok. I know what you mean
<[spoiler]> something like https://gist.github.com/omninonsense/6892009 (not sure what elements are inside anchors, but I think it should be nokogiri compatible)
mlpinit has joined #ruby
<nobitanobi> Oh interesting. I can call css on any nokogiri element
aspires has quit [Client Quit]
<nobitanobi> Yeah [spoiler] exactly thanks
senayar has quit [Remote host closed the connection]
<[spoiler]> nobitanobi, probably. I'm not 100% sure, but I think it should work
<nobitanobi> do you think it would make sense to do all this in just one line?
<[spoiler]> nobitanobi, yeah, I think it can be truncated
<nobitanobi> I mean, finding all anchors that satisfy href = 'a', 'b' or 'c' and get the images?
senayar has joined #ruby
momomomomo has joined #ruby
<nobitanobi> I think is cleaner in two steps...
ldnunes has quit [Quit: Leaving]
<nobitanobi> uh
nari has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
devoldmx3 has joined #ruby
petey has quit [Ping timeout: 248 seconds]
petey has joined #ruby
<[spoiler]> Also, I think this should work:
<[spoiler]> anchors = page.css('a[href]').select { |anchor| roots.include? anchor['href'] }.
awc737_ has quit [Excess Flood]
aspires has joined #ruby
<[spoiler]> shevy, JavaScript is pretty cool. If you want to "transition" into JS from Ruby, you can try CoffeeScript! I still think Ruby is a nicer than JS, but I also love JS
<nobitanobi> uh, interesting. I thought that by doing that, you would just select href, not the anchor itself
interactionjaxsn has joined #ruby
<[spoiler]> Nope. It's an attribute-selector. It selects all elements that have that attribute
<[spoiler]> you could even do [href]
dkamioka has quit [Remote host closed the connection]
<[spoiler]> but there's no point, I guess
awc737 has joined #ruby
DeanH has joined #ruby
<nobitanobi> [spoiler], thanks.
DeanH has quit [Client Quit]
<[spoiler]> nobitanobi, if you wanna read more about attribute selectors: http://www.w3.org/TR/CSS2/selector.html#attribute-selectors
senayar has quit [Ping timeout: 252 seconds]
<nobitanobi> [spoiler], thanks I will read that.
maycon_ has quit [Quit: Saindo]
<[spoiler]> nobitanobi, also don't forget that they can used to target *any* attribute (even data-* attributes)
Alina-malina has quit [Ping timeout: 260 seconds]
devoldmx3 has quit [Read error: Connection reset by peer]
Atrumx has joined #ruby
<nobitanobi> [spoiler], you know, when doing this "anchor.css('img').attr('src')" I get "undefined method `attribute' for nil:NilClass"
digitalcake has joined #ruby
devoldmx has joined #ruby
<nobitanobi> [spoiler], ok. I am guessing I might need to look at xpath too, for more complex operations
headius has quit [Ping timeout: 265 seconds]
<[spoiler]> nobitanobi, Hmm. Are you sure there's an img tage inside the anchor?
obs has joined #ruby
<nobitanobi> nop, not always.
fijimunkii has quit [Ping timeout: 240 seconds]
<nobitanobi> right, I might need to make sure first..
<nobitanobi> anchor.css('img').attribute('src') if anchor.attibute('img')
<nobitanobi> oh shut
<nobitanobi> no sorry. I would need to make sure that anchor.children contains img.
aspires has quit [Quit: aspires]
dallasm has joined #ruby
dallasm has quit [Client Quit]
<[spoiler]> I'm not sure if the anchor is even a nokogiri object. Try debugging it to see
nisstyre has joined #ruby
jamescarr has quit [Quit: jamescarr]
fijimunkii has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
mark_locklear has quit [Quit: Leaving]
<nobitanobi> yup, it is : Nokogiri::XML::Element
jamescarr has joined #ruby
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
relix has joined #ruby
<[spoiler]> nobitanobi, Great! Also, I don't remember if #css returns an element or an array?
nat26101 has joined #ruby
nat2610 has quit [Read error: Connection reset by peer]
<nobitanobi> array
banisterfiend has quit [Quit: Computer has gone to sleep.]
Xeago has quit [Remote host closed the connection]
<[spoiler]> anchor.css('img').attribute('src') wouldn't work, then
<apeiros> d'oh
<nobitanobi> I'm doing soomething like this: if images = anchor.css('img') images.each do |image| srcs << image.attribute('src')
<apeiros> I think I got my wife addicted to the pc game 'fez'
<[spoiler]> Oh, okay then
<[spoiler]> apeiros, is that the rabbit game?
<nobitanobi> [spoiler], thanks
<apeiros> [spoiler]: it's the retro game where you start 2d and later learn how to "rotate" the worldview
BraddPitt has joined #ruby
banisterfiend has joined #ruby
claymore has quit [Quit: Leaving]
<apeiros> nobitanobi: `images.each do |image| srcs << image.attribute('src')` --> `srcs = images.map { |image| image.attribute('src') }` please
devoldmx has quit [Read error: Connection reset by peer]
<bnagy> rrr fez
d2dchat has quit [Remote host closed the connection]
<[spoiler]> Oh! I know that game! I played it hahahaha
devoldmx has joined #ruby
<apeiros> she accidentally played from my save-point (played through) and found a full cube I missed :-S
senayar has joined #ruby
<[spoiler]> Damn, she's got you! :P
<apeiros> yeah
<bnagy> there is one bit where I am stuck because it requires non-retarded jumping on things skills
<apeiros> lava?
<bnagy> yeah
<[spoiler]> retarded jumping is how I play Guild Wars 2
<apeiros> :)
ukd1 has quit [Remote host closed the connection]
<apeiros> yeah, the lava bit was where she asked me to help her
<apeiros> jumping isn't her thing either
<bnagy> I have like 58 cubes or something :<
tjsousa has joined #ruby
ukd1 has joined #ruby
platzhirsch has joined #ruby
thesheff17 has quit [Remote host closed the connection]
<platzhirsch> [1..5].include?(3) => false, literate programming? You are doing it wrong
headius has joined #ruby
jprovazn has quit [Quit: Odcházím]
<[spoiler]> platzhirsch, that's an array with 1 element haha
<platzhirsch> [spoiler]: ^^
kevinykchan has quit [Quit: Computer has gone to sleep.]
<[spoiler]> At first I didn't understand what was wrong, and then I noticed the brackets
<platzhirsch> yeah, I was going for something like this [1..40, 41..90,91..100]
ukd1 has quit [Read error: Operation timed out]
<Hanmac> >>[*1..5]
<eval-in_> Hanmac => [1, 2, 3, 4, 5] (https://eval.in/53257)
notjohn has joined #ruby
notjohn has quit [Client Quit]
jamescarr has quit [Quit: jamescarr]
snovak_ has quit [Read error: Connection reset by peer]
horst has joined #ruby
snovak has joined #ruby
<Hanmac> >> [*1..40,*41..90,*91..100] == [1..40,41..90,91..100].flat_map(&:to_a)
<eval-in_> Hanmac => true (https://eval.in/53258)
SJrX is now known as SJr
tjsousa has quit [Ping timeout: 248 seconds]
kevinykchan has joined #ruby
machuga is now known as machuga|away
<Hanmac> platzhirsch: see thats how you can make it with your sample
<platzhirsch> hanmac: yeah :)
devoldmx has quit [Read error: No route to host]
bsaboia_ has joined #ruby
<apeiros> bnagy: oh wow, I have probably some 40-50.
devoldmx has joined #ruby
notjohn has joined #ruby
geggam_ has quit [Remote host closed the connection]
jkline has quit [Quit: jkline]
tanema has joined #ruby
kevinykchan has quit [Client Quit]
robbyoconnor has joined #ruby
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
ciziar has quit [Ping timeout: 248 seconds]
sailias has quit [Ping timeout: 248 seconds]
PragCypher has quit [Quit: Leaving]
<Hanmac> havenwood: look what old rubinius1.2 do with my newest founding: https://eval.in/private/7e56c6b1c83ff7
<shevy> man
<shevy> are you crashing things again
<shevy> no wonder you dont finish your GUI bindings!
nwertman_ has joined #ruby
kevinykchan has joined #ruby
Ox6abe has joined #ruby
apeiros has quit [Remote host closed the connection]
petey has quit [Remote host closed the connection]
apeiros has joined #ruby
petey has joined #ruby
riceandbeans has quit [Ping timeout: 268 seconds]
vinay_ has joined #ruby
btanaka has joined #ruby
crazysim has quit [Read error: Operation timed out]
jkline has joined #ruby
crazysim has joined #ruby
Sc0rp10n has quit [Read error: Connection reset by peer]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
aspires has joined #ruby
cubicme has quit [Read error: Connection reset by peer]
cubicme has joined #ruby
peregrine81 has joined #ruby
pwh has quit []
nwertman1 has joined #ruby
flyinprogramer has quit [Quit: flyinprogramer]
petey has quit [Ping timeout: 260 seconds]
burlyscudd has quit [Quit: Leaving.]
someish has quit [Read error: Connection reset by peer]
petey has joined #ruby
someish has joined #ruby
nwertman has quit [Ping timeout: 256 seconds]
nwertman_ has quit [Ping timeout: 264 seconds]
butblack has joined #ruby
<bnagy> apeiros: once you decode the alphabet and start second playthrough lots of them are just grunt work
<bnagy> but then I got distracted by coding Go
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
<[spoiler]> hanmac, isn't that a normal error, considering Object is a not a valid object type for a range? o:
devoldmx3 has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
iliketurtles has quit [Quit: zzzzz…..]
<[spoiler]> `bad value for range (ArgumentError)`
RichardBaker has quit [Quit: RichardBaker]
<Hanmac> [spoiler]: hm yeah but i manage to get pass this error, and then it raise an StackError (imo it should not)
brisbin has quit [Ping timeout: 252 seconds]
nwertman has joined #ruby
brisbin has joined #ruby
polymar has joined #ruby
v0n has quit [Ping timeout: 252 seconds]
iliketurtles has joined #ruby
<[spoiler]> hanmac, oh, I thuoght you're still messing with the segfault bug
<Hanmac> [spoiler]: the problem: Range only checks if < method or something exist, it does not check if the <=> is possible missing
T_T has quit [Read error: Connection reset by peer]
<Hanmac> [spoiler]: imo its a bit of combined (it should neigher segfault and not StackError)
RTG` has quit []
<pangur> Thanks, apeiros and [spoiler]. Got it all working now. Thanks again.
snovak has quit [Remote host closed the connection]
RTG` has joined #ruby
ukd1 has joined #ruby
snovak has joined #ruby
nfk has joined #ruby
senayar has quit [Remote host closed the connection]
nfk has quit [Changing host]
nfk has joined #ruby
kobain_ has joined #ruby
mlpinit has quit [Ping timeout: 240 seconds]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
senayar has joined #ruby
Ox6abe_ has joined #ruby
cmarques has quit [Remote host closed the connection]
devoldmx3 has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
Ox6abe has quit [Ping timeout: 248 seconds]
<[spoiler]> hanmac, You don't resuce an Argument error. You rescue SystemStackError 3 times
freezey has quit [Remote host closed the connection]
RTG` has quit [Client Quit]
nobitanobi has quit [Ping timeout: 256 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
tanema has quit [Remote host closed the connection]
<[spoiler]> or maybe my dyslexia is kicking in and I'm not reading this properly
redondos has joined #ruby
nobitanobi has joined #ruby
kobain has quit [Ping timeout: 256 seconds]
BrightNewFuture has joined #ruby
RTG` has joined #ruby
tanema has joined #ruby
<[spoiler]> pangur, yw :)
workmad3 has joined #ruby
nari has quit [Ping timeout: 264 seconds]
<Hanmac> [spoiler]: like i said … the code inside should not raise an StackError (i only catch them to show when the Segfault appears)
nwertman1 has quit [Ping timeout: 248 seconds]
<Hanmac> i mean currently it does raise an StackError but imo that is wrong, thats why i make a ticket
snovak has quit [Ping timeout: 245 seconds]
nat26101 has left #ruby [#ruby]
<[spoiler]> hanmac, o.o I thought it's raising an ArgumentError, I don't see a StackError. Damnit, I am confused!
<Hanmac> haha, just try it on jruby … because jruby cant rescue StackErrors ;D
senayar has quit [Ping timeout: 252 seconds]
jaynewstrom has quit [Remote host closed the connection]
kirun has quit [Quit: Client exiting]
baordog_ has quit [Remote host closed the connection]
raphaelivan has quit [Read error: Operation timed out]
tanema has quit [Ping timeout: 248 seconds]
mayorga has joined #ruby
RichardBaker has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
<[spoiler]> If I run the code & remove all the `SystemStackError`s, then it works fine. So, rbx is not raising a stack error? Also, i tried changing it to ArgumentError and there was no stack error
marwa973 has joined #ruby
marwan_ has joined #ruby
<Hanmac> rbx seems to work, but the others make dump
Ox6abe has joined #ruby
<[spoiler]> Ooooh, ok let me test the other ones
<[spoiler]> Oh yeah it takes a shit
<Hanmac> [spoiler]: i already tested some https://bugs.ruby-lang.org/issues/9003
atSetKey_ has quit [Remote host closed the connection]
kreeves has joined #ruby
jerius has quit []
xcv has joined #ruby
xk_id has joined #ruby
einarj has joined #ruby
<[spoiler]> hanmac, Oh okay. I get it now.
* [spoiler] slaps his forehead
jlast has quit [Remote host closed the connection]
Ox6abe_ has quit [Ping timeout: 268 seconds]
xcv has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
* Hanmac - finding Segfaults since '88 ;P
<[spoiler]> Haha
<platzhirsch> Having a positive integer, how do I map it into one of three categories using ranges? Any idea how to make this as a one liner?
xcv has joined #ruby
MrZYX is now known as MrZYX--
pangur has quit [Quit: Quit]
<platzhirsch> { range => categoriy, ... }
<[spoiler]> platzhirsch, You have 3 ranges and want to see if it fits?
momomomomo has quit [Quit: momomomomo]
freerobby has joined #ruby
<platzhirsch> [spoiler]: Yes, like so: { 0..20 => 'a', 21..80 => 'b', 81..100 => 'c' }[5] => 'a'
MrZYX-- is now known as MrZYX
MrZYX is now known as MrZYX--
Tearan has quit [Quit: Sleepy Badger....]
ravster has quit [Quit: Leaving.]
<platzhirsch> I could add an array with the same ranges and pick it with select and include? ^^
someish has quit [Quit: someish]
<Hanmac> platzhirsch:
<Hanmac> >> {1..3 => "A", 4..6 => "B"}.find{|r,_| r === 5}.last
<eval-in_> Hanmac => "B" (https://eval.in/53273)
<crus> why does my irb prompt change from >> to ?> if i type ; ? what does ?> mean?
<platzhirsch> case equality, nice one
MrZYX-- is now known as MrZYX
<platzhirsch> crus: parsing, it displays the staet of the parser, it is expecting something which closes the state again
devoldmx has quit [Read error: Connection reset by peer]
<crus> platzhirsch: how can i close the state?
cody-- has quit [Quit: derp]
devoldmx has joined #ruby
xcv has quit [Ping timeout: 264 seconds]
echevemaster has quit [Quit: Leaving]
<platzhirsch> crus: if you enter something that is syntactical correct it should not happen in the first place, but maybe I get this wrong
<crus> platzhirsch: okay yes, it happens if i just presss enter without entering anything too.. typing something syntactically correct gives me the >> prompt - thanks.
<platzhirsch> ah I see what you mean, I don't get the question mark, but everthing is indented
<platzhirsch> err the semicolo
<[spoiler]> Okay, I'm off to bed
<[spoiler]> see ya!
<platzhirsch> [spoiler]: good fight
nisstyre has quit [Quit: Leaving]
[spoiler] has quit [Quit: Leaving]
MrZYX is now known as MrZYX|off
aspires has quit [Quit: aspires]
sambao21 has joined #ruby
v0n has joined #ruby
aspires has joined #ruby
tjsousa has joined #ruby
sparq_ has joined #ruby
T_T has joined #ruby
sambao21 has quit [Client Quit]
bean has quit [Quit: Computer has gone to sleep.]
burlyscudd has joined #ruby
Zai00 has quit [Quit: Zai00]
Senjai has quit [Remote host closed the connection]
bluepojo_ has quit [Ping timeout: 248 seconds]
mary5030 has quit [Ping timeout: 248 seconds]
deens has joined #ruby
sambao21 has joined #ruby
m8 has quit [Quit: Sto andando via]
sambao21 has quit [Client Quit]
marcdel has joined #ruby
maZtah has quit [Quit: Coyote finally caught me]
snovak has joined #ruby
pixelshuck has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
xk_id has quit [Quit:
devoldmx has joined #ruby
deens has quit [Ping timeout: 248 seconds]
bluepojo has joined #ruby
burlyscudd has quit [Ping timeout: 260 seconds]
nobitanobi has quit [Read error: Connection reset by peer]
cubicme has quit [Read error: Connection reset by peer]
pixelshuck has quit [Client Quit]
Spami has joined #ruby
Spami has joined #ruby
freerobby has quit [Quit: Leaving.]
cubicme has joined #ruby
Tearan has joined #ruby
tkuchiki has joined #ruby
io_syl has quit []
sambao21 has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
vx9 has joined #ruby
devoldmx has joined #ruby
T_T has quit [Read error: Connection reset by peer]
T_T has joined #ruby
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
c0rn has quit [Quit: Computer has gone to sleep.]
platzhirsch has left #ruby [#ruby]
snovak has quit [Ping timeout: 252 seconds]
maroloccio has quit [Quit: WeeChat 0.4.0]
banisterfiend has quit [Quit: Computer has gone to sleep.]
kindjal has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
atSetKey has joined #ruby
jonr22 has joined #ruby
Xeago has joined #ruby
c0rn has joined #ruby
c0rn has quit [Client Quit]
xk_id has joined #ruby
jonr22 has quit [Client Quit]
horst has quit [Quit: horst]
devoldmx has quit [Read error: Connection reset by peer]
asobrasil has left #ruby [#ruby]
devoldmx has joined #ruby
c0rn has joined #ruby
petey has quit [Remote host closed the connection]
nwertman_ has joined #ruby
simplyaubs has joined #ruby
brennanMKE has quit [Remote host closed the connection]
nwertman has quit [Read error: Connection reset by peer]
petey has joined #ruby
Atrumx has quit [Quit: Quitting]
tkuchiki has quit [Remote host closed the connection]
petey has quit [Read error: Connection reset by peer]
petey has joined #ruby
simplyaubs has quit [Client Quit]
Xeago has quit [Ping timeout: 245 seconds]
jkline has quit [Quit: jkline]
brennanMKE has joined #ruby
sergicles has joined #ruby
deens has joined #ruby
cubicme has quit [Ping timeout: 264 seconds]
brennanMKE has quit [Remote host closed the connection]
Atrumx has joined #ruby
atSetKey has quit [Ping timeout: 252 seconds]
tkuchiki has joined #ruby
pwh has joined #ruby
digitalcake has quit [Quit: Leaving.]
MiguelGD has quit [Quit: • IRcap • 8.6 •]
funburn has joined #ruby
clov3r has quit [Remote host closed the connection]
danman has quit [Quit: danman]
clov3r has joined #ruby
<Deele> hey, is it possible to make a fully standalone ruby app with gems and other libraries?
bsaboia_ has quit [Ping timeout: 248 seconds]
devoldmx has quit [Read error: Connection reset by peer]
olivier_bK has quit [Ping timeout: 252 seconds]
devoldmx has joined #ruby
polymar has quit [Remote host closed the connection]
|Frederik has quit [Ping timeout: 268 seconds]
jetblack has quit [Ping timeout: 248 seconds]
mrwn has joined #ruby
digitalcake has joined #ruby
xcv has joined #ruby
clov3r has quit [Ping timeout: 268 seconds]
hasrb has quit [Remote host closed the connection]
hasrb has joined #ruby
vim_shim has quit [Read error: Operation timed out]
jkline has joined #ruby
tanema has joined #ruby
banisterfiend has joined #ruby
deens has quit [Remote host closed the connection]
tjbarber has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hanmac has quit [Quit: Leaving.]
kevind has quit [Quit: kevind]
hasrb has quit [Read error: Operation timed out]
<shevy> what is "fully standalone"
jetblack has joined #ruby
<shevy> it seems to imply that it depends on something
<shevy> basically, the target computer needs to have a working version of ruby. once that is the case, you could wrap everything into a gem and add that to that "app"
<Deele> like allinoneruby which allows to carry around ruby code and run on any os
<shevy> well it has not been maintained in 6 years :\
<Deele> oh, I see
<Deele> didn't notice
<froy> ruby code can already run on any OS
<Deele> yeah, but afaik, it should be installed, and gem package manager should be installed
heftig has quit [Ping timeout: 245 seconds]
<froy> yeah. why is that a problem? so install it.
brennanMKE has joined #ruby
<froy> are you trying to bundle the ruby vm with an application or something?
c0rn has quit [Quit: Computer has gone to sleep.]
johnnyfuchs has quit [Quit: Leaving.]
petey has quit [Ping timeout: 268 seconds]
<Deele> I guess so
jamescarr has joined #ruby
a1ph4g33k has quit [Quit: Leaving]
|Frederik has joined #ruby
<Deele> I think, I'm asking too complex questions, before even being fully capable of coding in ruby
Ahti333 has quit [Quit: Textual IRC Client: www.textualapp.com]
jamescarr has quit [Client Quit]
<froy> if you want to distribute your application with an install of ruby, you'll have to have different distributions which are made for different platforms.
<froy> on the other hand, it's not hard to ask them to install ruby.
devoldmx has quit [Read error: Connection reset by peer]
<froy> and even then, most unix operating systems come with ruby.
xcv has quit [Remote host closed the connection]
devoldmx has joined #ruby
<Deele> I'm thinking about creating a gui app with shoes
jonr22 has joined #ruby
ephemerian has quit [Quit: Leaving.]
xcv has joined #ruby
<Deele> and before that, thinking how will look installation of that app on brand new Win and *nix computer
<froy> this isn't any different from distributing an app for java.
<froy> if you need to run a java app, you have to install the vm.
dayepa has quit [Quit: dayepa]
Valesk has quit [Quit: Leaving]
axl_ has quit [Quit: axl_]
heftig has joined #ruby
dayepa has joined #ruby
tkuchiki has quit [Remote host closed the connection]
rubyracer has quit [Quit: Konversation terminated!]
tkuchiki has joined #ruby
newbiehacker has quit [Ping timeout: 268 seconds]
someish has joined #ruby
einarj has quit [Remote host closed the connection]
mrsolo_ has quit [Quit: Leaving]
simplyaubs has joined #ruby
predator217 has joined #ruby
<volty> bandle, package -> click & go
<volty> there are people that have to deploy their apps with least messing on the client side
senayar has joined #ruby
<volty> so the answer is (if froy is right): no, ruby does not have that yet // and the answer cannot be ' shouldn't be difficult etc etc '
<volty> sorry
xcv has quit [Ping timeout: 268 seconds]
notjohn has quit [Ping timeout: 264 seconds]
echevemaster has joined #ruby
VTLob has quit [Quit: VTLob]
predator117 has quit [Ping timeout: 240 seconds]
<volty> java comes in one click
bsaboia_ has joined #ruby
xcv has joined #ruby
hasrb has joined #ruby
tkuchiki has quit [Ping timeout: 268 seconds]
notjohn has joined #ruby
havenwood has quit [Remote host closed the connection]
<Deele> ok
<volty> my ho is that some people should stop thinking that everybody can play, like us, installing ruby's, gem's, rvm's etc etc
tomzx_mac has joined #ruby
notjohn has quit [Client Quit]
<Deele> you mean?
sergicles has quit [Quit: sergicles]
<volty> Deele: i was at froy
verto_ has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
senayar has quit [Ping timeout: 252 seconds]
airdisa has joined #ruby
boycey has left #ruby [#ruby]
devoldmx has joined #ruby
<volty> sometimes here people ask simple questions but receive hackerish answers
workmad3 has quit [Ping timeout: 268 seconds]
coderhs has quit [Ping timeout: 248 seconds]
notjohn has joined #ruby
verto has quit [Ping timeout: 248 seconds]
zarubin has quit [Ping timeout: 252 seconds]
joshwines has quit [Remote host closed the connection]
cubicme has joined #ruby
|jemc| has quit [Ping timeout: 256 seconds]
lfox has joined #ruby
movieGron has quit [Quit: Lost terminal]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
habstinat has joined #ruby
<BrightNewFuture> Deele, try stackoverflow.com.
tjsousa has quit [Ping timeout: 264 seconds]
freezey has joined #ruby
<Deele> what should I try exactly?
c0rn has joined #ruby
<BrightNewFuture> Specifically, try asking that question on stackoverflow.com Deele.
<volty> anybody knows how to send a text to a terminal ?
devoldmx3 has joined #ruby
<Deele> I'm asking here, as I'm not really sure, what is my question
<Deele> or should I really need answer :)
whowantstolivef2 has quit [Read error: Connection reset by peer]
<Deele> I need to write a working program and only then think about deploying it
whowantstolivef2 has joined #ruby
<volty> ah, ok :) write it and come back later
cubicme has quit [Ping timeout: 264 seconds]
jlundy has joined #ruby
<jlundy> hey guys, silly question
devoldmx has quit [Ping timeout: 240 seconds]
<jlundy> can you use rescue on a single line?
<jlundy> without begin that is
<Deele> volty thx, now I know what is my question
peregrine81 has quit []
asteros has quit [Ping timeout: 265 seconds]
<jlundy> such as something like "1/0 rescue 0" (if you wanted to do something crazy)
ravster has joined #ruby
taternuts has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
gstamp has quit [Ping timeout: 256 seconds]
marcdel has joined #ruby
tatsuya_o has joined #ruby
<bnagy> jlundy: you should check our irb or pry
Ox6abe_ has joined #ruby
<bnagy> then you can try these things yourself easily
fijimunkii has quit [Ping timeout: 264 seconds]
<bnagy> >> 1/0 rescue 0
<eval-in_> bnagy => 0 (https://eval.in/53281)
<volty> jlundy: you cannot since ruby has to know what to guard for rescuing
Nilium has quit [Read error: Connection reset by peer]
<jlundy> ah weird that it doesnt complain
<bnagy> it doesn't complain because it's valid
<bnagy> volty is just being wrong as usual
mahlon_ has joined #ruby
gstamp has joined #ruby
<bnagy> and now we'll have some epic discussion about how it's all context blah blah blah
<volty> yes dear -- as always :)
burlyscudd has joined #ruby
tjbarber has joined #ruby
<jlundy> if (@selenium.find_element(:css, '.save-cancel .message') rescue false)
<volty> you have to grow yet -- out of your context :)
<jlundy> is what Im trying to do essentially
Ox6abe has quit [Ping timeout: 264 seconds]
<jlundy> if selenium throws the exception because the element doesnt exist
<jlundy> I wanted to rescue and set the conditional to false
mahlon has quit [Ping timeout: 268 seconds]
<jlundy> so that the rest of the logic will run
io_syl has joined #ruby
<bnagy> jlundy: yeah it works, I'd probably use nil, but same same
<jlundy> ah. seems to not work for me is why I was curious
Nilium has joined #ruby
<bnagy> if there's more than one thing that could be wrong in find_element then you should handle it 'properly'
<jlundy> sure, its either there or not
tatsuya_o has quit [Ping timeout: 248 seconds]
snovak has joined #ruby
jamescarr has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
jonr22 has quit [Ping timeout: 245 seconds]
<bnagy> >> if (raise rescue true); puts "lol"; end
<eval-in_> bnagy => lol ... (https://eval.in/53286)
<bnagy> the syntax is valid, if it's not working then something else is wrong
binaryplease has joined #ruby
<jlundy> yeah on me probably
barratt has joined #ruby
<jlundy> thanks
Ox6abe_ has quit [Remote host closed the connection]
burlyscudd has quit [Ping timeout: 248 seconds]
<bnagy> np ( but test in irb next time ;)
Ox6abe has joined #ruby
notjohn has quit [Ping timeout: 268 seconds]
binarypl1 has quit [Ping timeout: 245 seconds]
snovak has quit [Ping timeout: 264 seconds]
theRoUS has joined #ruby
riceandbeans has joined #ruby
<riceandbeans> I can't remember who I was talking to earlier but someone told me how to make a variable with a variable name
notjohn has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
<volty> you are so good, notionful in ruby, i like you when you assist the people in this way :)
<riceandbeans> ie, array contains names of the variables, which in turn are object references to names of objects, defined by attr_accessors within themselves for unique values
interactionjaxsn has joined #ruby
simoz has joined #ruby
jkline has quit [Quit: jkline]
Ox6abe has quit [Ping timeout: 248 seconds]
__eka__ has joined #ruby
ehaliewicz has quit [Read error: No route to host]
s2013 has quit [Read error: Connection reset by peer]
s2013 has joined #ruby
jlundy has left #ruby [#ruby]
jkline has joined #ruby
mlpinit has joined #ruby
eka has quit [Ping timeout: 246 seconds]
cads has quit [Quit: Leaving]
<volty> riceandbeans: iterate and eval
interactionjaxsn has quit [Ping timeout: 248 seconds]
tjbarber has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ldnunes has joined #ruby
digitalcake has quit [Quit: Leaving.]
sergicles has joined #ruby
maroloccio has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
atSetKey has joined #ruby
ssvo has quit [Ping timeout: 248 seconds]
axsuul has joined #ruby