<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]
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.]
<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?
<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!
<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*]
<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]
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
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
<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
<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]
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
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.
<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]
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)
<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
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
<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.
<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
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?
<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)
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.]
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
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>
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 ;)
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"]
<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]
<[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]
<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
<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
<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?
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]
<[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]
<[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]>
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
<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.]
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
<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
<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…]