<erikh>
thanks again for all the assistance, folks. I haven't had time to shit lately much less pay attention to irc for more than 10 minutes, so sorry for the latency
justinseiter has joined #ruby-lang
bousquet has quit [Remote host closed the connection]
bousquet has joined #ruby-lang
itsmeduncan has quit [Quit: itsmeduncan]
gix has quit [Ping timeout: 244 seconds]
savage- has quit [Remote host closed the connection]
gix has joined #ruby-lang
sgonyea has quit [Ping timeout: 246 seconds]
Brutus- has quit [Quit: Sto andando via]
sgonyea has joined #ruby-lang
sailias has quit [Ping timeout: 245 seconds]
bousquet has quit [Remote host closed the connection]
hahuang65 has quit [Quit: Computer has gone to sleep.]
brdude has quit [Quit: brdude]
hahuang65 has joined #ruby-lang
hynkle has quit [Quit: Computer has gone to sleep.]
hynkle has joined #ruby-lang
sailias has joined #ruby-lang
hynkle has quit [Client Quit]
w0lverine has quit [Quit: w0lverine]
coryf has joined #ruby-lang
ericmathison has quit [Ping timeout: 245 seconds]
sepp2k1 has quit [Remote host closed the connection]
sgonyea has quit [Quit: sgonyea]
slux has joined #ruby-lang
Z33K|Lux has joined #ruby-lang
WillMarshall has quit [Quit: Computer has gone to sleep.]
slux has quit [Remote host closed the connection]
slux has joined #ruby-lang
andrewhl has quit [Remote host closed the connection]
andrewhl has joined #ruby-lang
tenderlove has quit [Ping timeout: 255 seconds]
<zzak>
get back to work
brianpWins has quit [Quit: brianpWins]
<erikh>
zzak: irony. I just signed in at $contract
justinseiter has quit [Remote host closed the connection]
<zzak>
im taking the night off for personal reasons, but ill be back soon
<zzak>
having a rough week
lsegal` has joined #ruby-lang
nagato has quit [Ping timeout: 246 seconds]
<erikh>
zzak: be well
brdude has joined #ruby-lang
andrewhl has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
imajes has quit [Excess Flood]
nagato has joined #ruby-lang
towski has quit [Remote host closed the connection]
imajes has joined #ruby-lang
lsegal` has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
WillMarshall has joined #ruby-lang
WillMarshall has quit [Client Quit]
zastern has joined #ruby-lang
lsegal has joined #ruby-lang
andrewhl has joined #ruby-lang
VegetableSpoon has joined #ruby-lang
Wardrop has joined #ruby-lang
djinni` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
zastern has quit [Client Quit]
diegoviola has quit [Ping timeout: 245 seconds]
snorkdude has joined #ruby-lang
djinni` has joined #ruby-lang
cored has quit [Quit: leaving]
erpuds has quit [Quit: erpuds]
snorkdude has quit [Remote host closed the connection]
joast has quit [Ping timeout: 244 seconds]
krzkrzkrz has joined #ruby-lang
hahuang65 has quit [Quit: Computer has gone to sleep.]
krz has quit [Ping timeout: 255 seconds]
krzkrzkrz is now known as krz
sailias has quit [Ping timeout: 246 seconds]
bryancp has joined #ruby-lang
VegetableSpoon has quit [Quit: Leaving]
sgonyea has joined #ruby-lang
havenn has joined #ruby-lang
cczona has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
sailias has joined #ruby-lang
cczona has left #ruby-lang [#ruby-lang]
bougyman has joined #ruby-lang
itsmeduncan has joined #ruby-lang
sailias has quit [Ping timeout: 252 seconds]
dfr|mac has joined #ruby-lang
erpuds has joined #ruby-lang
savage- has joined #ruby-lang
erichmenge has joined #ruby-lang
sgonyea has quit [Quit: sgonyea]
mrsolo has quit [Quit: Leaving]
banisterfiend is now known as kirill
brushbox has quit [Quit: Leaving.]
leriksenau has joined #ruby-lang
brushbox has joined #ruby-lang
havenn has quit [Remote host closed the connection]
lcdhoffman has quit [Quit: lcdhoffman]
igotnolegs has joined #ruby-lang
ryanf has joined #ruby-lang
sailias has joined #ruby-lang
havenn has joined #ruby-lang
chimkan has joined #ruby-lang
itsmeduncan has quit [Quit: itsmeduncan]
deryl has quit [Quit: deryl]
havenn has quit [Remote host closed the connection]
gregmoreno has quit [Remote host closed the connection]
gsav has quit [Ping timeout: 276 seconds]
deryl has joined #ruby-lang
slux has quit [Ping timeout: 265 seconds]
slux has joined #ruby-lang
brushbox has quit [Quit: Leaving.]
brushbox has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
savage- has quit [Remote host closed the connection]
leriksenau_ has joined #ruby-lang
chimkan has quit [Quit: chimkan]
leriksenau has quit [Ping timeout: 244 seconds]
leriksenau_ has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
itsmeduncan has joined #ruby-lang
havenn has joined #ruby-lang
lcdhoffman has joined #ruby-lang
itsmeduncan has quit [Quit: itsmeduncan]
sailias has quit [Ping timeout: 245 seconds]
itsmeduncan has joined #ruby-lang
zastern has joined #ruby-lang
brushbox has quit [Quit: Leaving.]
Weems has joined #ruby-lang
Weems has quit [Changing host]
Weems has joined #ruby-lang
diegoviola has joined #ruby-lang
sailias has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
erpuds has quit [Quit: erpuds]
joast has joined #ruby-lang
snorkdude has joined #ruby-lang
slux has quit [Remote host closed the connection]
countdigi has quit [Quit: Lost terminal]
itsmeduncan has quit [Quit: itsmeduncan]
joast has quit [Ping timeout: 244 seconds]
havenn_ has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
brdude has quit [Quit: brdude]
burgestrand has joined #ruby-lang
slaytani1 has joined #ruby-lang
havenn has quit [Remote host closed the connection]
slaytanic has quit [Ping timeout: 264 seconds]
snorkdude has quit [Remote host closed the connection]
mtkd_ has quit [Read error: Operation timed out]
mtkd has joined #ruby-lang
havenn_ has quit [Remote host closed the connection]
erichmenge has quit [Quit: Be back later]
erichmenge has joined #ruby-lang
erichmenge has quit [Client Quit]
yxhuvud has joined #ruby-lang
erichmenge has joined #ruby-lang
erichmenge has quit [Client Quit]
<Wardrop>
How does one check if super exists so one can prevent a NoMethodError when calling super without that method being defined in a superclass.
coryf has quit [Remote host closed the connection]
<Wardrop>
Does my question make sense?
<burgestrand>
Wardrop: defined?(super)
<burgestrand>
I think that’d work.
burgestrand has quit [Quit: Leaving.]
kain has joined #ruby-lang
<Wardrop>
burgerstand: defined?(super) returns "super" when super exists, or nil when it doesn't, so that should work.
outoftime has quit [Quit: Leaving]
<Wardrop>
What is super anyway. It's a keyword isn't it. It's not a method or anything is it.
<kirill>
keyw0rd
havenn has joined #ruby-lang
slaytani1 has left #ruby-lang [#ruby-lang]
zastern has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 245 seconds]
ryanf has quit [Ping timeout: 244 seconds]
d3vic3 has quit [Ping timeout: 244 seconds]
chimkan has joined #ruby-lang
d3vic3 has joined #ruby-lang
richardjortega has quit [Read error: Connection reset by peer]
richardjortega has joined #ruby-lang
s1n4 has joined #ruby-lang
yxhuvud has quit [Ping timeout: 256 seconds]
cokanut has joined #ruby-lang
cha1tanya has joined #ruby-lang
richardjortega has quit [Read error: Connection reset by peer]
richardjortega has joined #ruby-lang
alvaro_o has quit [Quit: Ex-Chat]
chimkan has quit [Quit: chimkan]
derrida has quit [Ping timeout: 264 seconds]
burgestrand has joined #ruby-lang
robbyoconnor has joined #ruby-lang
derrida has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
ryanf has joined #ruby-lang
ryanf has quit [Client Quit]
robbyoconnor has quit [Remote host closed the connection]
robbyoconnor has joined #ruby-lang
krzkrzkrz has joined #ruby-lang
cokanut has quit [Ping timeout: 276 seconds]
woollyams has joined #ruby-lang
krz has quit [Ping timeout: 246 seconds]
krzkrzkrz is now known as krz
andrewhl has quit [Remote host closed the connection]
ChadStud2uffin has quit [Ping timeout: 240 seconds]
<Wardrop>
Anyone know of a ruby library that can convert a glob pattern to regex?
dfr|mac has quit [Remote host closed the connection]
<Wardrop>
…with captures. So "*/**.rb" would compile to: %r{([^/]+)/(.+)\.rb)/}
<Wardrop>
Would save me rolling my own
robbyoconnor has quit [Read error: Connection reset by peer]
<waseem_>
Hi, is there a way I can know when was the last time GC garbage collected or time elapsed since last garbage collection? Maybe something like GC.las_ran_at.
<yorickpeterse>
No, I don't think so
<yorickpeterse>
At least the GC module doesn't expose such information, you also shouldn't need it to begin with
cdt has joined #ruby-lang
qwerxy has joined #ruby-lang
qwerxy has quit [Client Quit]
ryanf has quit [Quit: leaving]
gnufied has joined #ruby-lang
<waseem_>
yorickpeterse: Okay thanks.
Stereokitsune has quit [Ping timeout: 252 seconds]
fgomez has quit [Quit: Lost terminal]
workmad3 has joined #ruby-lang
<waseem_>
yorickpeterse: You were right, I think I can utilize GC.collections for time being.
achiu has quit [Ping timeout: 240 seconds]
<yorickpeterse>
What exactly are you trying to achieve? Fucking around with the GC is in general not a very wise idea
dhruvasagar has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby-lang
<waseem_>
yorickpeterse: Hehe. I have a stupid method that takes up a huge amount of memory. I'm trying to profile that method -- part of a Rails application -- for memory consumption and other GC related statistics.
<yorickpeterse>
Memory profiling is something you can't really do with the GC module
<yorickpeterse>
So far I've found the best way is to simple run this: memory = `ps -o rss= #{Process.pid`, it's a shame I haven't found anything better yet
<yorickpeterse>
* #{Process.pid}
<gnufied>
waseem_: 1.8.7 or 1.9.3 ?
<waseem_>
I already have that information. I suspect that after the method call, some of the leftover is not cleared by GC. I just need to see if it really is the case.
<gnufied>
try this, it should work with 1.8.7. be careful to have a clean install of Ruby though. RVM sometimes messes with native gems
<yorickpeterse>
ugh, memprof
<yorickpeterse>
perftools.rb might be useful but it doesn't benchmark raw memory usage
<gnufied>
perftools.rb is a cpu profiler.
<yorickpeterse>
it does give you an overview of what particular calls take the longest
<waseem_>
gnufied: Will do thanks.
<gnufied>
yorickpeterse: so whats wrong with memprof. I even ported it to 1.9.2 until they changed everything in 1.9.3
<yorickpeterse>
If I'm not mistaken it required a patched VM
<yorickpeterse>
might've been another profiler though
<gnufied>
it doesn't. it uses trampolines to hook into
<gnufied>
it is not terribly portable though
apeiros_ has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
dhruvasagar has quit [Ping timeout: 246 seconds]
sandbags has quit [Remote host closed the connection]
sandbags has joined #ruby-lang
sandbags has joined #ruby-lang
krz has quit [Quit: krz]
dhruvasagar has joined #ruby-lang
zz_chrismcg is now known as chrismcg
runeb has joined #ruby-lang
toretore has joined #ruby-lang
rolfb has quit [Quit: Leaving...]
chrismcg is now known as zz_chrismcg
Stereokitsune has joined #ruby-lang
cyndis has quit [Ping timeout: 250 seconds]
cyndis has joined #ruby-lang
Stereokitsune has quit [Ping timeout: 248 seconds]
dhruvasagar has quit [Ping timeout: 255 seconds]
dhruvasagar has joined #ruby-lang
qwerxy has joined #ruby-lang
s1n4 has quit [Quit: peace out]
Stereokitsune has joined #ruby-lang
cha1tanya has quit [Quit: cha1tanya]
heftig has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 240 seconds]
zmack has joined #ruby-lang
dhruvasagar has joined #ruby-lang
woollyams has joined #ruby-lang
mytrile has joined #ruby-lang
jrafanie has quit [Read error: Connection reset by peer]
jrafanie_ has joined #ruby-lang
w0lverine has quit [Ping timeout: 245 seconds]
RegEchse has joined #ruby-lang
heftig has joined #ruby-lang
w0lverine has joined #ruby-lang
rutkla has quit [Ping timeout: 246 seconds]
jordan`` has quit [Ping timeout: 248 seconds]
slux has joined #ruby-lang
rolfb has joined #ruby-lang
rutkla has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby-lang
jordan` has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
<Harzilein>
i can't get something analogous to the grape example working in grape, can someone point me out to have a route that accepts strings with slashes?
<Harzilein>
to the url example*
<Harzilein>
+how
dhruvasagar has quit [Ping timeout: 255 seconds]
w0lverine has quit [Quit: w0lverine]
dhruvasagar has joined #ruby-lang
jordan` has quit [Quit: Coyote finally caught me]
jordan` has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby-lang
chendo__ has joined #ruby-lang
srbartlett has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
chendo__ has quit [Ping timeout: 240 seconds]
Hakon has joined #ruby-lang
hramrach has joined #ruby-lang
chendo__ has joined #ruby-lang
chendo__ has quit [Client Quit]
<andrewvos>
rue: I've been in France for a few days. You're really popular here man! Your name is written like everywhere!
dhruvasagar has quit [Ping timeout: 268 seconds]
dhruvasagar has joined #ruby-lang
dmwuw_ has quit [Ping timeout: 244 seconds]
<rue>
They’ve named many streets after me, I understand
dhruvasagar has quit [Ping timeout: 246 seconds]
mwjcomputing has joined #ruby-lang
dhruvasagar has joined #ruby-lang
voker57 has quit [Ping timeout: 244 seconds]
cha1tanya has joined #ruby-lang
voker57 has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby-lang
scottj has left #ruby-lang [#ruby-lang]
waseem_ has left #ruby-lang ["WeeChat 0.3.8"]
rolfb has quit [Quit: Leaving...]
kirill has quit [Read error: Connection reset by peer]
u_u has quit [Ping timeout: 252 seconds]
cha1tanya has quit [Quit: cha1tanya]
kirill has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby-lang
u_u has joined #ruby-lang
sepp2k has joined #ruby-lang
lcdhoffman has joined #ruby-lang
postmodern has quit [Quit: Leaving]
dhruvasagar has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby-lang
<gnufied>
rue: your real name or IRC nick?
<gnufied>
I bet they rue the day, they named those streets after you
tekin_ has quit [Quit: Computer has gone to sleep.]
bryancp has quit [Remote host closed the connection]
savage- has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
workmad3_ has joined #ruby-lang
wallerdev has joined #ruby-lang
workmad3 has quit [Ping timeout: 245 seconds]
<Harzilein>
is there any way i can make bundle build native extensions with debugging enabled?
<Harzilein>
per-project would be best
carloslopes has joined #ruby-lang
setmeaway has quit [Ping timeout: 276 seconds]
dfr|mac has joined #ruby-lang
dfr|mac has quit [Remote host closed the connection]
r0bby has joined #ruby-lang
dfr|mac has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 244 seconds]
havenn has joined #ruby-lang
bglusman has quit [Remote host closed the connection]
bfreeman has joined #ruby-lang
enroxorz has quit [Quit: Leaving]
butchanton has joined #ruby-lang
havenn has quit [Ping timeout: 246 seconds]
rutkla has joined #ruby-lang
vbatts1 has joined #ruby-lang
enroxorz has joined #ruby-lang
yxhvuud has joined #ruby-lang
enroxorz has quit [Changing host]
enroxorz has joined #ruby-lang
yxhuvud has quit [*.net *.split]
andrewhl has quit [*.net *.split]
jxie has quit [*.net *.split]
mtkd has quit [*.net *.split]
spuk has quit [*.net *.split]
flebel has quit [*.net *.split]
certainty has quit [*.net *.split]
erikh has quit [*.net *.split]
knu has quit [*.net *.split]
vbatts has quit [*.net *.split]
mksm has quit [*.net *.split]
lake has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
any-key has quit [*.net *.split]
jmcphers has quit [*.net *.split]
floyd2 has quit [*.net *.split]
Kero has quit [*.net *.split]
musl has quit [*.net *.split]
znz_v has quit [*.net *.split]
kaz_ has quit [*.net *.split]
_ko1 has quit [*.net *.split]
pabs has quit [*.net *.split]
deryl has quit [Quit: Back when the move is done and I got internet again]
jmcphers has joined #ruby-lang
dhruvasagar has joined #ruby-lang
kaz_ has joined #ruby-lang
yxhuvud has joined #ruby-lang
mtkd has joined #ruby-lang
andrewhl has joined #ruby-lang
spuk has joined #ruby-lang
jxie has joined #ruby-lang
flebel has joined #ruby-lang
knu has joined #ruby-lang
erikh has joined #ruby-lang
certainty has joined #ruby-lang
mksm has joined #ruby-lang
lake has joined #ruby-lang
TheMoonMaster has joined #ruby-lang
any-key has joined #ruby-lang
floyd2 has joined #ruby-lang
Kero has joined #ruby-lang
musl has joined #ruby-lang
znz_v has joined #ruby-lang
_ko1 has joined #ruby-lang
pabs has joined #ruby-lang
yxhuvud has quit [Ping timeout: 255 seconds]
flebel has quit [Ping timeout: 255 seconds]
flebel has joined #ruby-lang
cirenyc has quit [Quit: Leaving...]
alexkane has quit [Quit: alexkane]
t4nkd has quit [Quit: Leaving...]
s1n4 has quit [Quit: peace fuckin out]
cdt has quit [Quit: Ex-Chat]
<Defusal>
-> /usr/local/lib/ruby/1.9.1/forwardable.rb:204: stack level too deep (SystemStackError)
<Defusal>
no backtrace... fun stuff
<ddfreyne>
you are calling a function that is calling itself that is calling itself that is calling itself that is calling itself that is calling itself that is calling itself
erpuds has quit [Quit: erpuds]
<Defusal>
ddfreyne, you 100% sure that means direct recursion? could it not just be too many levels of method calls?
<ddfreyne>
Defusal: 99.9% sure it is recursion. If you have that many non-recursive method calls, something is wrong with your app design :)
mrsolo has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
any-key_ has joined #ruby-lang
<Defusal>
ddfreyne, i think its neither in this case, i just noticed the method being called doesnt exist, heh
<Defusal>
strange error never the less
<ddfreyne>
forwarded to something that doesn’t exist either, maybe?
lake2 has joined #ruby-lang
flebel has quit [*.net *.split]
kaz_ has quit [*.net *.split]
andrewhl has quit [*.net *.split]
jxie has quit [*.net *.split]
mtkd has quit [*.net *.split]
spuk has quit [*.net *.split]
certainty has quit [*.net *.split]
erikh has quit [*.net *.split]
knu has quit [*.net *.split]
mksm has quit [*.net *.split]
lake has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
any-key has quit [*.net *.split]
floyd2 has quit [*.net *.split]
Kero has quit [*.net *.split]
musl has quit [*.net *.split]
znz_v has quit [*.net *.split]
_ko1 has quit [*.net *.split]
pabs has quit [*.net *.split]
flebel has joined #ruby-lang
kaz_ has joined #ruby-lang
andrewhl has joined #ruby-lang
spuk has joined #ruby-lang
certainty has joined #ruby-lang
jxie has joined #ruby-lang
knu has joined #ruby-lang
erikh has joined #ruby-lang
mksm has joined #ruby-lang
TheMoonMaster has joined #ruby-lang
floyd2 has joined #ruby-lang
Kero has joined #ruby-lang
znz_v has joined #ruby-lang
_ko1 has joined #ruby-lang
pabs has joined #ruby-lang
musl has joined #ruby-lang
flebel has quit [Max SendQ exceeded]
musl has quit [Max SendQ exceeded]
andrewhl has quit [Max SendQ exceeded]
mtkd_ has joined #ruby-lang
<Defusal>
ddfreyne, i doubt it, but i guess it's possible since that wouldn't happen otherwise... that method name was just changed earlier
andrewhl has joined #ruby-lang
butchanton has quit [Remote host closed the connection]
erikh has quit [Ping timeout: 255 seconds]
flebel has joined #ruby-lang
certainty has quit [Read error: Operation timed out]
alexkane has joined #ruby-lang
lun_ has joined #ruby-lang
certainty has joined #ruby-lang
erikh has joined #ruby-lang
butchanton has joined #ruby-lang
musl has joined #ruby-lang
dfr|mac has quit [Remote host closed the connection]
slux has quit [Read error: Connection reset by peer]
slux has joined #ruby-lang
erichmeng has joined #ruby-lang
erichmenge has quit [Disconnected by services]
coryf has quit [Remote host closed the connection]
erichmeng has left #ruby-lang [#ruby-lang]
kain has quit [Ping timeout: 245 seconds]
erichmenge has joined #ruby-lang
Nisstyre has quit [Ping timeout: 246 seconds]
kain has joined #ruby-lang
mtkd_ has quit [*.net *.split]
qwerxy has quit [*.net *.split]
paxwad has quit [*.net *.split]
hynkle has quit [*.net *.split]
tjadc has quit [*.net *.split]
lcdhoffman has quit [*.net *.split]
toretore has quit [*.net *.split]
ezkl has quit [*.net *.split]
naz has quit [*.net *.split]
gentz has quit [*.net *.split]
Bwild has quit [*.net *.split]
tallship has quit [*.net *.split]
MrWGW has quit [*.net *.split]
Caius has quit [*.net *.split]
nibbo has quit [*.net *.split]
sj26 has quit [*.net *.split]
kke has quit [*.net *.split]
jmeeuwen has quit [*.net *.split]
pcboy_ has quit [*.net *.split]
ammar has quit [*.net *.split]
blowmage has quit [*.net *.split]
jamo has quit [*.net *.split]
yeltzooo7 has quit [*.net *.split]
imajes has quit [Excess Flood]
t4nkd has joined #ruby-lang
imajes has joined #ruby-lang
mtkd_ has joined #ruby-lang
paxwad has joined #ruby-lang
hynkle has joined #ruby-lang
lcdhoffman has joined #ruby-lang
toretore has joined #ruby-lang
ezkl has joined #ruby-lang
tjadc has joined #ruby-lang
Bwild has joined #ruby-lang
gentz has joined #ruby-lang
tallship has joined #ruby-lang
MrWGW has joined #ruby-lang
Caius has joined #ruby-lang
nibbo has joined #ruby-lang
sj26 has joined #ruby-lang
kke has joined #ruby-lang
jmeeuwen has joined #ruby-lang
pcboy_ has joined #ruby-lang
ammar has joined #ruby-lang
blowmage has joined #ruby-lang
jamo has joined #ruby-lang
yeltzooo7 has joined #ruby-lang
gentz has quit [Max SendQ exceeded]
gentz has joined #ruby-lang
mrsolo has quit [Quit: This computer has gone to sleep]
havenn has joined #ruby-lang
jtoy has joined #ruby-lang
Dreamer3 has quit [Ping timeout: 276 seconds]
Guest85567 has quit [Quit: Leaving.]
lun_ has quit [Read error: Connection reset by peer]
grin has joined #ruby-lang
lun_ has joined #ruby-lang
<jtoy>
how would you guys select 1k random lines from a file in ruby?
grin is now known as Guest7975
sailias has joined #ruby-lang
Carnage\ has quit [Ping timeout: 272 seconds]
mrsolo has joined #ruby-lang
Dreamer3 has joined #ruby-lang
<drbrain>
jtoy: sounds like an interview question
<jtoy>
no, i want to do it in a 1 liner instead of long code
<apeiros_>
then show the long code :)
<apeiros_>
jtoy: but see Array#sample
<apeiros_>
(and File#readlines)
<jtoy>
k,thx
<ged>
Or IO.readlines will save you 2 characters. :P
* apeiros_
assumes "in 1 line" precludes a focus on efficient solutions
<apeiros_>
oh, File::readlines of course :)
Nisstyre has joined #ruby-lang
<ged>
Hehe.
* apeiros_
prefers File over IO, just reads better…
corsican has quit [Quit: Changing server]
<ged>
Me too, but if you're golfing...
<apeiros_>
true
kain has quit [Ping timeout: 272 seconds]
krz has joined #ruby-lang
Erlkoenig has joined #ruby-lang
kain has joined #ruby-lang
chendo_ has quit [Ping timeout: 246 seconds]
rutkla has quit [Ping timeout: 276 seconds]
chendo_ has joined #ruby-lang
solars has joined #ruby-lang
<Erlkoenig>
Hi, i made a program that starts multiple processes using spawn(), and redirects their stdout/err to a pipe created by IO.pipe(). Now i need a function that waits(blocks) until any of the processes
<Erlkoenig>
exited or data is available to read on one of the pipes. I want to collect the stdout/err data into seperate strings and output it later. Is there something like that in ruby that works cross-platform?
<apeiros_>
Erlkoenig: no idea about cross-platform, but: Process.wait and .wait2
<apeiros_>
also Kernel#select
akira989 has quit [Remote host closed the connection]
<Erlkoenig>
yes, but wait only waits for processes, and select only for the pipes
<Erlkoenig>
i need a function that does both
rutkla has joined #ruby-lang
<apeiros_>
I don't think there's any
<apeiros_>
but normally a process exiting will send an eof
<apeiros_>
which would be caught by Kernel#select
<Erlkoenig>
wah... in C i could use select and the SIGCHLD signal on linux, and some weird WaitForMultipleObjectsEx on windows, but thats ugly
<Erlkoenig>
"normally"? if it works always that could be an idea, hmm
snorkdude has quit [Remote host closed the connection]
akira989 has joined #ruby-lang
snorkdude has joined #ruby-lang
mrsolo has quit [Quit: This computer has gone to sleep]
mrsolo has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
bryancp has joined #ruby-lang
virunga_ has joined #ruby-lang
virunga has joined #ruby-lang
virunga__ has joined #ruby-lang
virunga_ has quit [Read error: Connection reset by peer]
havenn has joined #ruby-lang
qwerxy has joined #ruby-lang
qwerxy has quit [Client Quit]
jtoy has quit [Quit: jtoy]
anildigital has quit [Ping timeout: 246 seconds]
sevvie has joined #ruby-lang
<Erlkoenig>
apeiros_: using select() and testing for eof seems to work, i'll have to test it on windows later... thanks :)
poga has quit [Remote host closed the connection]
snorkdude has quit [Remote host closed the connection]
kirill has joined #ruby-lang
poga has joined #ruby-lang
poga has quit [Remote host closed the connection]
anildigital has joined #ruby-lang
itsmeduncan_ has joined #ruby-lang
poga has joined #ruby-lang
<apeiros_>
Erlkoenig: great :)
<apeiros_>
hope windows isn't the one-off again
<Erlkoenig>
hopefully select() is available on windows at all ;)
itsmeduncan has quit [Ping timeout: 246 seconds]
itsmeduncan_ is now known as itsmeduncan
tekin_ has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
erpuds has joined #ruby-lang
Criztian has joined #ruby-lang
tommyvyo has quit [Quit: Computer has gone to sleep.]
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
snorkdude has joined #ruby-lang
TheDracle has quit [Quit: Leaving]
jackhammer2022 has joined #ruby-lang
tommyvyo has joined #ruby-lang
diegoviola has joined #ruby-lang
jtoy has joined #ruby-lang
erpuds has quit [Quit: erpuds]
erpuds has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
dhruvasagar has quit [Quit: Changing server]
naz has joined #ruby-lang
snorkdude has quit []
snorkdude has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
<apeiros_>
any nicer way than `Hash[array.group_by(&:property).map { |key, values| [key, CollectionClass.new(values)] }]` to get an array grouped and the values mapped?
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo has joined #ruby-lang
<apeiros_>
hurray for 'stack level too deep' with only one level of stack being shown in the error…
chopmo has quit [Quit: chopmo]
snorkdude has quit [Remote host closed the connection]
<Mon_Ouie>
Not sure how reliable that is, but usually you can each { |k, v| h[k] = Wrapper.new(v) } — since that won't require adding/removing a key
<Mon_Ouie>
I saw someone suggest merge too, like merge(hash) { |k, v| … } — although I don't really find it nicer
dfr|mac has joined #ruby-lang
<apeiros_>
Mon_Ouie: with each I only get one per key
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
<apeiros_>
ah, you mean replace the map part only?
<Mon_Ouie>
Yes (and remove the Hash[…])
erpuds has quit [Quit: erpuds]
erpuds has joined #ruby-lang
chimkan_ has quit [Quit: chimkan_]
benanne has joined #ruby-lang
havenn has quit [Remote host closed the connection]
coryf has joined #ruby-lang
Erlkoenig has quit [Quit: Leaving.]
<rue>
Bizarre. Adding a single test into a file causes the whole thing to hang…
<rue>
It doesn’t even matter what the test is >.<
snorkdude has joined #ruby-lang
<rue>
This is seriously the weirdest thing ever
<rue>
6 tests => works…7 tests => fails
<rue>
Literally, if I add it "is yay" do 1.must_equal 1 end it causes things to hang…
<Mon_Ouie>
Perhaps there are race conditions?
<rue>
It’s likely, the hang is in synchro code somewhere
snorkdude has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
lun__ has joined #ruby-lang
mwjcomputing has quit [Quit: Leaving]
lun_ has quit [Ping timeout: 246 seconds]
sevvie has quit [Quit: sevvie]
workmad3 has quit [Ping timeout: 252 seconds]
burgestrand has joined #ruby-lang
bfreeman_ has joined #ruby-lang
bfreeman has quit [Read error: Connection reset by peer]
voker57 has quit [Remote host closed the connection]
brdude has quit [Quit: brdude]
yxhvuud has quit [Ping timeout: 246 seconds]
dfr|mac has quit [Remote host closed the connection]
bytephilia has joined #ruby-lang
s0ber has quit [Read error: Connection reset by peer]
rcassidy has quit [Quit: leaving]
s0ber has joined #ruby-lang
workmad3 has joined #ruby-lang
jtoy has quit [Quit: jtoy]
snorkdude has joined #ruby-lang
bytephilia has quit [Quit: Computer has gone to sleep.]
jtoy has joined #ruby-lang
Erlkoenig has joined #ruby-lang
seoaqua has joined #ruby-lang
<seoaqua>
i've just
<seoaqua>
i've just bought a mac, installed ruby with brew.but it's still ruby 1.8.7 instead of 1.9.3, how to fix this,pls?
<kirill>
seoaqua: rbenv/rvm
<seoaqua>
i don't like rvm, i just need the latest version
<injekt>
then download it and compile it yourself
<seoaqua>
brew did compile the source
<injekt>
right, but ruby points to your existing install
<seoaqua>
and the official website suggested 'brew install ruby'
<seoaqua>
i can't paste it here,but it surely doesn't contain the correct path
<seoaqua>
oh i see...
<seoaqua>
sorry guys, i don't know i copied the \n
<seoaqua>
injekt, do i need to put your line into ~/.bashrc?
snorkdude has quit [Remote host closed the connection]
<injekt>
seoaqua: yes
<seoaqua>
injekt, thanks
<Erlkoenig>
http://pastie.org/4414024 i have a hierarchy of classes that inherit from eachother, in this mini-example A,B,C. As you see, the initialize methods pass a paremeter via 'super' upward to the base class. this works fine, but when I add a mixin 'M',
Fullmoon has quit [Quit: Fullmoon]
<Erlkoenig>
its initialize method interferes with the other methods, and i get the error posted there. I don't want to pass my 'name' parameter through the mixin as it doesn't know anything about A,B,C. How to correctly initialize the instance variable @m of my mixin?
<drbrain>
def initialize *
<drbrain>
Erlkoenig: don't forget to super, too
<injekt>
tehe
sandbags has quit [Remote host closed the connection]
<drbrain>
Erlkoenig: option 2) don't set @m in M#initialize, lazily set it in M#foo
<Erlkoenig>
def initialize * causes syntax errors, or what did you mean?
<Erlkoenig>
doesn't sound good to not have a constructor there
ezkl has quit [Ping timeout: 252 seconds]
<drbrain>
not for me: ruby -e 'def initialize(*) end'; echo $? # => 0
workmad3 has quit [Ping timeout: 240 seconds]
<drbrain>
that works on 1.9.3-p125, 1.9.2-p290, 1.8.7-p358 and trunk ruby
<Erlkoenig>
ah, you meant varargs
<Erlkoenig>
(*) works, * not ;)
<Erlkoenig>
sounds like a rather evil hack, but okay
<Erlkoenig>
scala does this cleanly iirc :S
<drbrain>
ruby -e 'def initialize *; end' works too
<Erlkoenig>
def initialize * generates a test.rb:5: syntax error, unexpected tIVAR, expecting ';' or '\n' on my 1.9.3p194
<drbrain>
ah, for no () you need a dummy argument
<drbrain>
I forgot, sorry
chimkan has joined #ruby-lang
<Erlkoenig>
okay, that works, thanks... although unintuitively :S
<Erlkoenig>
aber wenn schon newNumber oder neueZahl :D
<holy>
ich will die eingabe um 1 erweitern
<injekt>
english mebe
<holy>
und zählen kann ich ja schlecht mit string
bryancp has quit [Remote host closed the connection]
burgestrand has quit [Quit: Leaving.]
<Erlkoenig>
ja, to_i müsste doch tun
<holy>
cant't convert fixum into string
<holy>
bringt er mir
<Erlkoenig>
ja, in zeile 6
<Erlkoenig>
du musst newZahl.to_s schreiben
<Erlkoenig>
um aus dem integer wieder einen string zu machen
dhruvasagar has joined #ruby-lang
<holy>
ahhh, grml!
<holy>
du hast recht
<holy>
vielen dank
<Erlkoenig>
ha :D
<Erlkoenig>
jo büddö
<holy>
hab oben an das umwandeln gedacht
dhruvasagar has quit [Client Quit]
<holy>
aber als ich die var unten in den string eingefügt hab, kam es gar nicht mehr
<holy>
dass ich das natürlich auch umwandeln muss
<injekt>
:-/
dhruvasagar has joined #ruby-lang
bytephilia has quit [Remote host closed the connection]
<apeiros_>
holy: bitte #ruby-de oder englisch. danke.
<holy>
ok
<injekt>
!
<Erlkoenig>
well, he got his answer :D
<apeiros_>
yes, it's for future reference
dhruvasagar has quit [Client Quit]
<apeiros_>
I'd have said it earlier if I hadn't been busy :)
dhruvasagar has joined #ruby-lang
havenn has joined #ruby-lang
snorkdude has joined #ruby-lang
snorkdude has quit [Remote host closed the connection]
<Erlkoenig>
why does spawn() return a "pid", and not a Process object or something, which would then have a wait() method and stuff? that would much more fit into the OOP approach of ruby
<drbrain>
Erlkoenig: for one, Process is a module, not a class
<Erlkoenig>
yes, but it could have been a class for that ;)
<drbrain>
it's probably a good proposal for ruby 3, I doubt it would make it into ruby 2
<injekt>
not sure we'll be alive to see ruby 3
<drbrain>
likely, 75% of the reason is "nobody has bothered to write the patch"
<Erlkoenig>
hmokay, the behaviour of spawn and waitpid resembles more to C...
snorkdude has joined #ruby-lang
srbartlett has joined #ruby-lang
erpuds has quit [Quit: erpuds]
srbartlett has quit [Remote host closed the connection]
<drbrain>
Erlkoenig: yes
<drbrain>
injekt: ruby 2 is about 6 months away…
<injekt>
eh
Carnage\ has joined #ruby-lang
<Erlkoenig>
why isn't there the perfect language :D
<injekt>
then that changed quickly
<injekt>
last time I checked the ruby 2 timeline it was at about 23 year mark.
<injekt>
:D
MrPunkin has joined #ruby-lang
<MrPunkin>
just to be sure, within an iteration an local variable should be released from memory after the loop is finished, right?
<drbrain>
MrPunkin: no, when the GC collects it
<apeiros_>
Erlkoenig: shameless plug - take a look at my fork gem, maybe build something similar for processes and spawn?
<apeiros_>
Spawn as a suggested classname…
<Erlkoenig>
doesn't ruby have fork()
<apeiros_>
it does
<apeiros_>
but fork isn't very OO either, just like spawn.
<rue>
Fork is super OO
derpemil1 has left #ruby-lang [#ruby-lang]
<apeiros_>
um, yeah, no.
<Erlkoenig>
okay hm
<injekt>
yep, Fixnum or NilClass
<injekt>
yay
<apeiros_>
urgs
<apeiros_>
completely missed that I was still wearing my wizard hat…
<MrPunkin>
drbrain: so if I manually reset it to nil will that help with memory bloat?
toertore has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
<injekt>
MrPunkin: leave it
<apeiros_>
Memory.unbloat!
<apeiros_>
RAM.clear
<drbrain>
MrPunkin: it's possible, but I wouldn't worry about it
<MrPunkin>
injekt: this is a profiled specific issue where my rails app is loading 150-250 megs of ram in this loop.
<MrPunkin>
trying to fix it
<injekt>
I know how
<drbrain>
MrPunkin: the object referenced may be present elsewhere on the C stack so it may not get collected for a while
<injekt>
don't use rails
<MrPunkin>
I have a few areas I have trimmed down the amount of AR objects… but hoping for more help there too
mssola has quit [Quit: Konversation terminated!]
toretore has quit [Ping timeout: 252 seconds]
<apeiros_>
ugh, rubygems can't deal with circular references?
<MrPunkin>
but I'll leave it for now
<drbrain>
apeiros_: ??
<apeiros_>
$ gem install swissmatch --> installs 3 of 4 gems, then on the 4th: ERROR: Error installing swissmatch: swissmatch-rails requires swissmatch (>= 0)
<apeiros_>
maybe it's just a timing issue…
JoelMcCracken has quit [Ping timeout: 244 seconds]
<steveklabnik>
apeiros_: nope, use bundler
<steveklabnik>
:p
<injekt>
:D
* apeiros_
smacks steveklabnik with a large hippy
<steveklabnik>
just sayin
<injekt>
hey put drbrain down
snorkdude has quit [Remote host closed the connection]
<drbrain>
this is probably fixed in master with our new resolver thingy that evan wrote
<steveklabnik>
right
<steveklabnik>
it will be improved in the future
<apeiros_>
drbrain: so only people with yet-unreleased rubygems can install my gem? :(
<apeiros_>
I guess I'll remove the circular dependency for now. Not clean but I rather have not clean than not working.
<rue>
Hooray
<drbrain>
apeiros_: I'd have to look at what's different from your dependency graph and the test that has a basic a -> b -> c -> a graph
sailias has joined #ruby-lang
<drbrain>
there's a test for "don't totally fail" with circular dependencies
<apeiros_>
drbrain: I think all it'd have to do is build the graph, then perform installation of each item in the graph with --without-dependencies
<apeiros_>
anyway, the gem is swissmatch-0.0.1 if you want to test. should I wait with rereleasing?
qwerxy has joined #ruby-lang
sailias1 has joined #ruby-lang
<drbrain>
apeiros_: it may not be checking what it's already installed when it gets to the last gem
<drbrain>
apeiros_: if you leave 0.0.1 up, can you file an issue on github?
<drbrain>
I'm currently elbow-deep in RDoc
<apeiros_>
sure. I hope I remember. it's 0.45 here now so I'll file the bug tomorrow and I'm notoriously bad at remembering things :-S
wallerdev has quit [Quit: wallerdev]
<drbrain>
hehe
wallerdev has joined #ruby-lang
<apeiros_>
(well, specifically at remembering things I should *do*, I have a marvelous memory for everything else, walking encyclopedia…)
poga has quit [Remote host closed the connection]
cantonic has joined #ruby-lang
sailias has quit [Ping timeout: 268 seconds]
jrafanie has quit [Quit: jrafanie]
conorwade has quit [Quit: Computer has gone to sleep.]
snorkdude has joined #ruby-lang
sevvie has joined #ruby-lang
Hakon has joined #ruby-lang
outoftime has joined #ruby-lang
<freedrull>
any recent nice id3 tag manipulation libraries around?
snorkdude has quit [Remote host closed the connection]
<freedrull>
taglib looks alright i 'spose
<rue>
apeiros_: See if you can find a pencil and some paper…
<rue>
I’ll walk you through this
<apeiros_>
it's no use
<drbrain>
freedrull: when I checked 2-3 years ago ruby-mp3info was my favorite
<apeiros_>
but thanks for the offer :)
setmeaway has joined #ruby-lang
kirill has quit [Remote host closed the connection]
JoelMcCracken has joined #ruby-lang
postmodern has joined #ruby-lang
sailias1 has quit [Ping timeout: 246 seconds]
neocoin has joined #ruby-lang
benanne has quit [Quit: kbai]
snorkdude has joined #ruby-lang
snorkdude has quit [Remote host closed the connection]
kain has quit [Ping timeout: 245 seconds]
<rue>
NP
<Erlkoenig>
P
<zenspider>
iirc, circular deps should be fine as long as they don't contradict themselves
viper has joined #ruby-lang
viper is now known as Guest19082
JoelMcCracken has quit [Ping timeout: 244 seconds]
itsmeduncan has quit [Quit: itsmeduncan]
ChadStud2uffin has quit [Ping timeout: 246 seconds]
ChadStudmuffin has joined #ruby-lang
srbartlett has joined #ruby-lang
woollyams has joined #ruby-lang
nofxx has quit [Ping timeout: 240 seconds]
headius has joined #ruby-lang
<zenspider>
headius: thanks for the haiku
<headius>
it came from the heart
<zenspider>
haha
Guest19082 has quit []
headius has quit [Client Quit]
headius has joined #ruby-lang
mistym has quit [Remote host closed the connection]
mwjcomputing has joined #ruby-lang
nagato has joined #ruby-lang
mwjcomputing has quit [Ping timeout: 245 seconds]
havenn has quit [Remote host closed the connection]
nofxx has joined #ruby-lang
<freedrull>
drbrain: thnx
<drbrain>
freedrull: times may have changed since then, but I investigated both taglib and ruby-mp3info
qwerxy has quit [Quit: offski]
snorkdude has joined #ruby-lang
gregmore_ has joined #ruby-lang
gregmoreno has quit [Ping timeout: 240 seconds]
snorkdude has quit [Remote host closed the connection]
kirill has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
paxwad has quit [Read error: Connection reset by peer]