toastynerd has quit [Remote host closed the connection]
yubrew has quit [Ping timeout: 252 seconds]
nathanstitt has quit [Quit: I growing sleepy]
Coincide_ has joined #ruby-lang
khaase_ has joined #ruby-lang
Coincidental has quit [Ping timeout: 265 seconds]
Avon has left #ruby-lang [#ruby-lang]
khaase__ has joined #ruby-lang
ddv has quit [Ping timeout: 245 seconds]
lcdhoffman has quit [Quit: lcdhoffman]
psycho_one has joined #ruby-lang
khaase_ has quit [Ping timeout: 265 seconds]
verto_ has joined #ruby-lang
khaase__ has quit [Ping timeout: 265 seconds]
verto has quit [Ping timeout: 399 seconds]
havenwood has quit [Remote host closed the connection]
Guest62918 has quit [Ping timeout: 252 seconds]
psycho_one has quit [Ping timeout: 252 seconds]
ddv has joined #ruby-lang
Caius has joined #ruby-lang
dvorak_ has joined #ruby-lang
dvorak has quit [Disconnected by services]
dvorak_ is now known as dvorak
arBmind has quit [Ping timeout: 332 seconds]
lcdhoffman has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has joined #ruby-lang
starbucks has quit [Remote host closed the connection]
pixelhandler has quit [Quit: pixelhandler]
charliesome has joined #ruby-lang
starbucks has joined #ruby-lang
thomasxie has joined #ruby-lang
Johz has quit [Quit: Leaving]
symm- has quit [Ping timeout: 252 seconds]
robbyoconnor has joined #ruby-lang
starbucks has quit [Ping timeout: 264 seconds]
Krishve has joined #ruby-lang
<Krishve>
hi
thomasxie has quit [Ping timeout: 240 seconds]
spuk has joined #ruby-lang
<Krishve>
7.When Ruby does a method look-up and can't find a particular method, it may a.call the method, method_respond b.call the method, method_missing c.throw a NoMethodError d.call the method, respond_to?
<Krishve>
can the Ruby gurus please help with my Q's ?
jsodini has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
yubrew has joined #ruby-lang
<|jemc|>
Krishve: sounds like homework which you'd be better helped by doing yourself
<Krishve>
Thanks I have bunch of Q's which was given as test and I needed some gurus to validate them....
robbyoconnor has quit [Ping timeout: 264 seconds]
<apeiros>
"c.throw a NoMethodError" - exceptions are raised, not thrown. throw exists in ruby too and means something different.
fragamus has joined #ruby-lang
<Krishve>
thanks that was my answer too...
<apeiros>
…
<apeiros>
that wasn't an answer
<Krishve>
means ?
<apeiros>
that you should read past the first 4 words
nathanstitt has joined #ruby-lang
yubrew has quit [Ping timeout: 252 seconds]
marr has quit []
<Krishve>
ok thanks...are there any paid formus or someone who can validate my answers ? I have 12 very basic Q's
tkuchiki_ has quit [Remote host closed the connection]
<jhass>
ah, so that "doesn't work" is a segmentation fault
<jhass>
you should've mentioned that
<anthemas>
i shouldve known that
<anthemas>
before :)
Cakey has joined #ruby-lang
<jhass>
well, in general it helps to post actual error messages
<jhass>
so, that's most likely happening because it links to/loads a different libmysqlclient than it was built against. Don't ask me for the specifics in windows though
tkuchiki has quit [Ping timeout: 255 seconds]
<anthemas>
if i delete libmysql.dll from the ruby bin folder the segmentation error is gone
<jhass>
another possibility is that your mysql2.so was built against a different ruby or system
yubrew has quit [Ping timeout: 255 seconds]
<jhass>
ruby -rmysql2 -e '1+1' has no output then?
<anthemas>
its returns mysql2.so load error
<jhass>
(11:04:07) jhass: well, in general it helps to post actual error messages
<face>
jhass: i know, but if he's printing the output wouldn't it be unescaping it
<jhass>
he's not printing it
<toretore>
first, you need to escape the backslash in the string, then you need to escape it for the regex enging, which interprets it as a capture reference
<Ono-Sendai2>
i have no parentheses tho, presumably it shouldn't be doing capturing
ldnunes has joined #ruby-lang
<toretore>
it doesn't matter
GBrawl has joined #ruby-lang
<toretore>
the parsing of the replacement string is independent of that
<Ono-Sendai2>
this code should ideally run reasonably fast
<toretore>
it'll be fast enough, probably
x0f has joined #ruby-lang
<Ono-Sendai2>
:)
<toretore>
it's not much different from what it would be in c++
<Ono-Sendai2>
yes it is
<Ono-Sendai2>
it looks like it will create O(n) temp strings
<Ono-Sendai2>
where n is original string length
<toretore>
how would c++ avoid that? does it already have the chars inside the string?
relix has quit [Ping timeout: 245 seconds]
<Ono-Sendai2>
with C++ i would alloc space for the resulting string once
relix has joined #ruby-lang
khaase has joined #ruby-lang
khaase has quit [Changing host]
khaase has joined #ruby-lang
jgpawletko has joined #ruby-lang
<jhass>
ruby is not your language if you worry about that level of optimization while writing code. Optimize if it happens to be a bottleneck
<toretore>
i wouldn't worry too much about it, unless you're writing something that actually needs to be very efficient
<Ono-Sendai2>
it does
<toretore>
and then you shouldn't be using ruby in the first place
<Ono-Sendai2>
well, not *very* efficient
<Ono-Sendai2>
wasn't my choice to use ruby
<toretore>
what is this functionality for?
<Ono-Sendai2>
for our exporter for SketchUp, which has a ruby API
<Ono-Sendai2>
i need to do some javascript escaping, hence the replacing of single blackslash with double backslash
<toretore>
i really don't think this is going to be close to becoing a bottleneck in your program
<yorickpeterse>
toretore: re "don't use Ruby for performance" that's a bullshit statement
<Ono-Sendai2>
toretore: you might be right
<Ono-Sendai2>
this is only for GUI display
<toretore>
yorickpeterse: explain?
<Ono-Sendai2>
ruby definitely is a bottleneck elsewhere tho
<toretore>
how so?
<yorickpeterse>
toretore: I hear too many people say "Ruby is slow anyway so who cares about performance". You can write perfectly well performing Ruby code
<toretore>
not as well perfoming as c
<Ono-Sendai2>
it can take > 1 minute to export our scenes
<yorickpeterse>
Yeah no shit
<toretore>
that's just the fact
<yorickpeterse>
And C is not going to perform as well as x86 assembly
<Ono-Sendai2>
the equivalent code in C++ could prob do it in a few seconds
khaase has quit [Ping timeout: 265 seconds]
<yorickpeterse>
So lets write everything in x86 assembly
<Ono-Sendai2>
(i do like ruby btw :) )
<yorickpeterse>
You're comparing apples and donkeys
<toretore>
no, we're not in this case
<toretore>
Ono-Sendai2 gave a reasonable example above
<toretore>
1 min vs few secs
<toretore>
Ono-Sendai2: i wouldn't be surprised if that could be optimized quite a bit though
<Ono-Sendai2>
yeah it probably could be
<yorickpeterse>
if it's about the chars map bit yes, that's going to be shit slow for larger inputs
<Ono-Sendai2>
will still be at least 10x slower than C++ at a guess
<toretore>
ruby makes it easy to write bad-performing code
<yorickpeterse>
Because first you break the input up in to charcters (= extra String allocations for every character), then you map it while creating more Strings
<toretore>
that could perform better
cbreeze has joined #ruby-lang
<toretore>
a lot of the "convenience" stuff, like chains of map.inject.whatever could be more performant written in a more procedural fashion
x0f has quit [Quit: quit]
centrx has joined #ruby-lang
x0f has joined #ruby-lang
ta_ has joined #ruby-lang
moogumbo has quit [Ping timeout: 265 seconds]
Arch4ngel has quit [Ping timeout: 265 seconds]
Arch4ngel has joined #ruby-lang
GarethAdams has quit [Ping timeout: 265 seconds]
<Ono-Sendai2>
gonna compare regexp vs chars map perf
<Ono-Sendai2>
btw, are regexp compilations cached?
ta has quit [Ping timeout: 265 seconds]
moogumbo has joined #ruby-lang
canton7 has quit [Excess Flood]
<ohsix>
how would you already know about the length of the new string ... or the original length at all without going over the string multiple times in c++, doesn't imply you never have to do inefficient stuff
<yorickpeterse>
Regexp is most likely going to be faster and more memory efficient
canton7 has joined #ruby-lang
GarethAdams has joined #ruby-lang
<ohsix>
c strings are fun for hacking!!11;]
<Ono-Sendai2>
ohsix: two ways, first is, do a pass over the input string once, to count the number of \'s
<Ono-Sendai2>
ohsix: second way is just to guess, and allocate a bit of extra space
<ohsix>
i know how you would do it, but it's not implied in what you stated
<ohsix>
guessing or making a buffer 'big enough' is one of the major c hazards ;D
<Ono-Sendai2>
this is C++
<Ono-Sendai2>
i would use push_back
<Ono-Sendai2>
is safe
<Ono-Sendai2>
C string manip does indeed suck
<ohsix>
why would you guess if you were using std::string at all
<ohsix>
it's going to be managing the rope or whatever behind the scenes
iamcalledrob_ has joined #ruby-lang
<ohsix>
invoking the heap at indeterminate times
<ohsix>
with its own distinct behaviour, the default allocator might really suck for the manipulations you are doing
<Ono-Sendai2>
'might'
<Ono-Sendai2>
odds are it will still spank ruby tho
<ohsix>
yes, and .map 'might' suck, to not treat the actual goings on of either case is special pleading
khaase has joined #ruby-lang
khaase has joined #ruby-lang
khaase has quit [Changing host]
arBmind has quit [Quit: Leaving.]
yfeldblum has joined #ruby-lang
sie has quit [Ping timeout: 258 seconds]
iamcalledrob_ has quit [Ping timeout: 252 seconds]
<Ono-Sendai2>
regexp seems faster than chars.map
<Ono-Sendai2>
about twice as fast
toastynerd has joined #ruby-lang
<ohsix>
a specialized state machine that does only what you want to a string can be pretty fast
<Ono-Sendai2>
takes 864ms to go through a 3MB string
<ohsix>
what pattern?
khaase has quit [Ping timeout: 265 seconds]
<ohsix>
that sounds like a lot
toastynerd has quit [Read error: No route to host]
<Ono-Sendai2>
that's with a lot of matches
toastynerd has joined #ruby-lang
<ohsix>
every character?
<Ono-Sendai2>
one sec, i'll post the code somewhere
<Ono-Sendai2>
without any matches, regexp spanks charmap
<Ono-Sendai2>
elapsed charmap: 1619.0929999999998 ms
<Ono-Sendai2>
elapsed regexp: 6.0 ms
yfeldblum has quit [Ping timeout: 264 seconds]
<centrx>
Regexes are faster than making your own state machine
<Ono-Sendai2>
i don't need a state machine in this case though, i just want to replace a single character
Cakey has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
<centrx>
Ono-Sendai2, just use gsub then
<Ono-Sendai2>
centrx: Yeah i will.
toastynerd has quit [Ping timeout: 258 seconds]
<ohsix>
heh, making your own state machine should be equivalent, if the regex library isn't a backtracking type
<centrx>
That's absurd
<ohsix>
huh?
<Ono-Sendai2>
a regexp should be implemented with a FSM, right? :)
<ohsix>
shrug
<ohsix>
depends on what you're doing, but if you have antagonistic patterns a backtracking one can be messed with ;D
x0f has quit [Quit: quit]
cnivolle has joined #ruby-lang
x0f has joined #ruby-lang
<Ono-Sendai2>
btw, the fact that gsub is so much slower when actual matches occur (~80 slower), would imply there are some missed optimisations in gsub
<centrx>
Slower than what?
<centrx>
How are you testing this?
<Ono-Sendai2>
slower than when no matches occur
<ohsix>
it might not literally do what it seems by its name, it might just use regex or something behind the scene
<Ono-Sendai2>
see my pastebin
<ohsix>
does g sound for glob?
<centrx>
Use Benchmark.bmbm
<ohsix>
stand for
<Ono-Sendai2>
i would say gsub could be 10x or more faster
cnivolle has quit [Remote host closed the connection]
<jhass>
ohsix: global, there's sub which only replaces the first match
<ohsix>
k
<ohsix>
i don't know anything about ruby, basically; but if the doc is any indication it might be hitting the same regular expression library as if you were just doing it yourself, indirectly measuring the same thing
<Ono-Sendai2>
not sure what you mean. My point is that gsub seems to be doing something very inefficient in the matching case
<centrx>
Ono-Sendai2, Would you not expect changing the string to be slower than merely scanning it?
<Ono-Sendai2>
such as allocing a new string when each match (and replacement) occurs
<Ono-Sendai2>
centrx: Yes, but not that much slower
<centrx>
Ono-Sendai2, Why not? It's still extremely fast.
<Ono-Sendai2>
no it's not
<Ono-Sendai2>
it's 71x slower when matches occur
<ohsix>
sure, it could do worse, but you basically have the same expressions evaluated by the same thing for the larger part of it
<Ono-Sendai2>
if the code was optimised, should be 2 or 3x slower
<centrx>
Ono-Sendai2, Why do you think that?
<Ono-Sendai2>
when matches occur:
<Ono-Sendai2>
elapsed charmap: 1748.1 ms
<Ono-Sendai2>
elapsed regexp: 356.02099999999996 ms
<Ono-Sendai2>
when no matches occur:
<Ono-Sendai2>
elapsed charmap: 1613.093 ms
<Ono-Sendai2>
elapsed regexp: 5.0 ms
<Ono-Sendai2>
just pointing out a possible place for optimisation.
<Ono-Sendai2>
looks like there is a little bit of padding for the dest string ?
<ohsix>
oh man you're going to make me read it now
<ohsix>
i was just satisfying my curiosity with how things are structured behind the scenes
mehlah has joined #ruby-lang
<Ono-Sendai2>
i would change that to be a multiple of the input string len
<Ono-Sendai2>
blen = RSTRING_LEN(str) * 2
<Ono-Sendai2>
or somesuch
<Ono-Sendai2>
not gonna recompile ruby and test here tho :)
arBmind has joined #ruby-lang
<ohsix>
well in the C++ allocator thing we were sort of talking about earlier, there's a 'speed' to the allocation growth that you can be clever with, doubling may happen sometimes
<Ono-Sendai2>
yes, i know
<ohsix>
but if you make a change that's even 10% larger than the input, double is seriously too much for large strings
<Ono-Sendai2>
well multiply by 1.2 or something then :)
<Ono-Sendai2>
or 1.1
<Ono-Sendai2>
it would also be much faster to do it in 2 passes
<Ono-Sendai2>
1 to get the final length
<Ono-Sendai2>
then another pass to make the actual changes
<Ono-Sendai2>
much faster in the sense that it would speed up the worst case greatly
<Ono-Sendai2>
would slightly slow down intermediate cases (e.g. 1 match)
<Ono-Sendai2>
I would go for the * 1.4 or so
<Ono-Sendai2>
easy change to make
<ohsix>
well no value is right, 30 characters is a pretty good guess for what might be typical
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
<Ono-Sendai2>
the problem with a fixed number is it doesn't scale with input length
<ohsix>
it just avoids a reallocatino for cat/append if it happens to not be larger than 30 in the output
<Ono-Sendai2>
what if you are gsubing e.g. an html page?
<ohsix>
if there's overhead for it being a large string you probably wouldn't
<Ono-Sendai2>
a multiple of the input len is a better way IMO
jg has joined #ruby-lang
<ohsix>
what if you use 1.2 of 3mb and it really is just 30 characters? it's about common usage, you don't need to make gsub bulletproof if people accept that it's slow for larger strings
<Ono-Sendai2>
best is probably 2-pass tho
<ohsix>
you could make sure you're using the fast regex engine instead
sarkyniin has quit [Ping timeout: 240 seconds]
<ohsix>
also there's the backtracking problem, large inputs are a problem in general
arBmind has quit [Ping timeout: 240 seconds]
<Ono-Sendai2>
it's a multiple of the input string len AFAICT
<Ono-Sendai2>
so if it's 30 chars it will be 30 * 1.2
<ohsix>
there's are going to be polynomial time stuff in a regular expression evaluation and not in a memory allocation, you'd invoke it twice to make two passes to avoid allocations
<Ono-Sendai2>
if your original string is 30 chars i mean
<ohsix>
there will be situations where that will win, but they are smaller than the ones where the allocation is far far far less expensive
phansch has quit [Ping timeout: 252 seconds]
<Ono-Sendai2>
anyway, am not gonna argue this all day, have work to do. Just pointing out a change that could prob speed up gsub in some cases by ~40x
<ohsix>
you can get arbitrarily clever with your string representation too, don't need to assume c strings or full copies or anything
<Ono-Sendai2>
thanks for your help all
jg has quit [Client Quit]
<ohsix>
i wonder if you couldn't build some sort of execution list with shift/moves you could evaluate at the end instead of doing reallocations ;] you'd need something you could insert into the original string as a tag ... so there'd be at least one copy, cuz that's not friendly
<Ono-Sendai2>
there's all kinds of clever things you could do, would be a bitch to test tho :)
BucOder has joined #ruby-lang
<ohsix>
well you'd generate things like you'd do for binary differencing, you could keep a running count of inserts to advise your final allocation too
relix has quit [Read error: Connection reset by peer]
relix_ has joined #ruby-lang
<Ono-Sendai2>
that's kinda what i mean by 2-pass
<Ono-Sendai2>
first pass counts the final string size
thisirs has joined #ruby-lang
psycho_o_ has quit []
<Ono-Sendai2>
after that you allocate the correctly sized string
<Ono-Sendai2>
second pass fill in the new string
<ohsix>
you'd still have allocations to manage the instruction list
<ohsix>
and you'd probably guess at a reasonable depth, like 30 ;]
yatish27 has joined #ruby-lang
<ohsix>
maybe your string representation can keep the list with the string, and you never have to normalize it until it's used
<ohsix>
then instead of keeping a rope like you do for std::string you'd have a list of overlays to produce the latest version when it's 'sampled' at that location
miqui has joined #ruby-lang
<ohsix>
getting super silly now, but you could use that to defer character conversions and stuff too
thomasxie has joined #ruby-lang
<ohsix>
there are restartable-computing and transactional memory models that work like that, pack everything to speculate with you
<Ono-Sendai2>
that's why a simple 2 pass alg is better
<Ono-Sendai2>
you just need an int to count the final string size
jxie has quit [Ping timeout: 276 seconds]
<Ono-Sendai2>
actually I'm definitely gonna file a bug, submit a patch or something about his
<ohsix>
you'd change the behaviour for gsub in ways that wouldn't be optimal for what it is now
<Ono-Sendai2>
i disagree
jxie has joined #ruby-lang
<ohsix>
heh this isn't something one disagrees with
<ohsix>
the code is what it is now
<Ono-Sendai2>
i disagree :)
<Ono-Sendai2>
would maybe change to blen = max(RSTRING_LEN(str) + 30, (int)((float)RSTRING_LEN(str) * 1.2))
Atttwww has joined #ruby-lang
<Ono-Sendai2>
so there's a little bit of constant padding, plus a multiplicative factor
<ohsix>
you'd have to make the case for it being suitable for large strings, and that +30 isn't the only thing that implies it isn't
thomasxie has quit [Client Quit]
<Ono-Sendai2>
well the whole point is to make it suitable for large strings
<ohsix>
you want to make gsub work optimally for what you're doing and not just do the optimal thing? use the new regex engine
<ohsix>
or do the 2 pass and literal replacement you keep talking about
<Ono-Sendai2>
2 pass is too tricky
<Ono-Sendai2>
would leave that to actual ruby hackers
<Ono-Sendai2>
(too tricky for me)
koos303 has quit [Quit: leaving]
<ohsix>
for your circumstance you don't even need to use regular expressions
<Ono-Sendai2>
sure, but is there a faster way in ruby?
<ohsix>
i've said already i don't know ruby, but it would be pretty impressive if there weren't
<ohsix>
the syntactic sugar stuff that is nice but slow is usually what's used unless it turns out to be insufficient
yfeldblum has joined #ruby-lang
jxie has quit [Ping timeout: 276 seconds]
<Ono-Sendai2>
gsub is not syntactic sugar
<ohsix>
.map is
<jhass>
.map is not syntactic sugar either
jxie has joined #ruby-lang
<jhass>
a.foo = bar is syntactic sugar for a.foo=(bar)
<ohsix>
04:50 < toretore:#ruby-lang> '\\\\'.chars.map{|c| c == '\\' ? '\\\\' : c }.join
<jhass>
a << b is syntactic sugar for a.<<(b)
<jhass>
.map is a normal method call
iamcalledrob_ has joined #ruby-lang
<ohsix>
i guess if he didn't know aht i was referring to in the first place, referring to it again doesn't help
arBmind has joined #ruby-lang
thoolihan has quit [Ping timeout: 258 seconds]
phansch has joined #ruby-lang
thooliha- has joined #ruby-lang
thooliha- is now known as thoolihan
khaase has joined #ruby-lang
yfeldblum has quit [Ping timeout: 264 seconds]
alexju has joined #ruby-lang
kitak_ has joined #ruby-lang
khaase has quit [Ping timeout: 265 seconds]
iamcalledrob_ has quit [Ping timeout: 252 seconds]
arBmind has quit [Ping timeout: 276 seconds]
toastynerd has joined #ruby-lang
musurgia has joined #ruby-lang
alexju has quit [Ping timeout: 264 seconds]
elia has quit [Quit: Computer has gone to sleep.]
toastynerd has quit [Ping timeout: 258 seconds]
workmad3 has joined #ruby-lang
elia has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 255 seconds]
yubrew has joined #ruby-lang
heftig has joined #ruby-lang
DEac- has joined #ruby-lang
DEac-_ has quit [Read error: Connection reset by peer]
yubrew has quit [Ping timeout: 255 seconds]
anjen has joined #ruby-lang
spastorino has joined #ruby-lang
<anjen>
Hi folks, can anyone share a more efficient method for determining a file download is complete (FTP/SFTP) than using the classic filesize?... sleep N... filesize2? comparison?
lewis has joined #ruby-lang
lewis has quit [Changing host]
lewis has joined #ruby-lang
arBmind has joined #ruby-lang
banister has joined #ruby-lang
ghg has joined #ruby-lang
[spoiler] has quit [Quit: Leaving]
<miqui>
hi folks.... in rake, is there a task that can be run globally before any other tasks? kinda like a pre-run hook ? am trying to setup a taks that reads config data that other tasks will need
ecnalyr has joined #ruby-lang
ghg has quit [Remote host closed the connection]
<miqui>
but i want to avoid having to specify this dependancy for every task via => operator...
ghg has joined #ruby-lang
AncientAmateur has joined #ruby-lang
alexju has joined #ruby-lang
relix_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
robmiller has quit [Quit: Leaving.]
yfeldblum has joined #ruby-lang
ledestin_ has joined #ruby-lang
ledestin has quit [Ping timeout: 255 seconds]
ledestin_ is now known as ledestin
anjen has quit [Quit: anjen]
lewis has quit [Remote host closed the connection]
relix has joined #ruby-lang
nathanstitt has joined #ruby-lang
yfeldblum has quit [Ping timeout: 245 seconds]
iamcalledrob_ has joined #ruby-lang
khaase has joined #ruby-lang
karamazov has joined #ruby-lang
banister_ has joined #ruby-lang
kitak_ has quit [Remote host closed the connection]
JPascal has quit []
baniste__ has joined #ruby-lang
yubrew has joined #ruby-lang
baniste__ has quit [Max SendQ exceeded]
banister has quit [Ping timeout: 240 seconds]
banister has joined #ruby-lang
ascarter has joined #ruby-lang
toastynerd has joined #ruby-lang
banister_ has quit [Ping timeout: 252 seconds]
iamcalledrob_ has quit [Ping timeout: 264 seconds]
khaase has quit [Ping timeout: 276 seconds]
<jhass>
miqui: does it have to be a task? can't you just require some toplevel code in your Rakefile?
BucOder has quit [Quit: Computer has gone to sleep.]
lewis has joined #ruby-lang
dik_dak has joined #ruby-lang
<miqui>
jhass: cool, yeah that should work too.. you have an example?
Macacity has joined #ruby-lang
loincloth has joined #ruby-lang
<miqui>
jhass: it would be cool if the toplevel code runs when automgically when rake runs and before any task...
luiz_lha has joined #ruby-lang
<jhass>
lib/a.rb: puts "run when loading the Rakefile"; Rakefile: require 'a' # note that I never actually tried that
kitak has quit [*.net *.split]
yfeldblum has joined #ruby-lang
kitak has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
<miqui>
k thanks jhass
phansch has quit [Ping timeout: 265 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RobertBirnie has joined #ruby-lang
dik_dak has quit [Ping timeout: 255 seconds]
Nilium has quit [Ping timeout: 240 seconds]
h_h has joined #ruby-lang
closer has quit [*.net *.split]
closer has joined #ruby-lang
momomomomo has joined #ruby-lang
momomomomo has quit [Read error: Connection reset by peer]
closer has quit [*.net *.split]
closer has joined #ruby-lang
Nilium has joined #ruby-lang
momomomomo has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
momomomomo has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby-lang
starbucks has joined #ruby-lang
momomomomo has quit [Read error: Connection reset by peer]
dik_dak has joined #ruby-lang
momomomomo has joined #ruby-lang
momomomomo has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby-lang
BucOder has joined #ruby-lang
momomomomo has quit [Read error: Connection reset by peer]
Miphix has joined #ruby-lang
elia has joined #ruby-lang
momomomomo has joined #ruby-lang
momomomomo has quit [Read error: Connection reset by peer]
BucOder has quit [Client Quit]
phansch has joined #ruby-lang
ecnalyr has quit [Quit: Macbook has gone to sleep. . .]
ghg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
robbyoconnor has joined #ruby-lang
mbj has joined #ruby-lang
enebo has joined #ruby-lang
RobertBirnie has joined #ruby-lang
AKASkip has left #ruby-lang [#ruby-lang]
mistym has joined #ruby-lang
mbj has quit [Client Quit]
mykoweb has joined #ruby-lang
iamcalledrob_ has joined #ruby-lang
GBrawl has quit [Remote host closed the connection]
khaase has joined #ruby-lang
khaase has joined #ruby-lang
khaase has quit [Changing host]
GBrawl has joined #ruby-lang
BucOder has joined #ruby-lang
iamcalledrob_ has quit [Ping timeout: 245 seconds]
rippa has joined #ruby-lang
khaase has quit [Ping timeout: 265 seconds]
toastynerd has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ghg has joined #ruby-lang
ghg has quit [Remote host closed the connection]
ghg has joined #ruby-lang
stamina has quit [Quit: WeeChat 0.4.3]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
Cakey has joined #ruby-lang
Cakey has quit [Ping timeout: 255 seconds]
fragamus has quit [Quit: Computer has gone to sleep.]
Ono-Sendai2 has quit [Quit: ChatZilla 0.9.90.1 [Firefox 29.0/20140421221237]]
momomomomo has joined #ruby-lang
momomomomo has quit [Read error: Connection reset by peer]
chouhoul_ has joined #ruby-lang
toretore has quit [Quit: Leaving]
momomomomo has joined #ruby-lang
chouhoulis has quit [Ping timeout: 255 seconds]
momomomomo has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby-lang
Cakey has joined #ruby-lang
momomomomo has joined #ruby-lang
chouhoul_ has quit [Ping timeout: 276 seconds]
Paradox has quit [Ping timeout: 240 seconds]
elia has quit [Quit: Computer has gone to sleep.]
Cakey has quit [Ping timeout: 245 seconds]
Paradox has joined #ruby-lang
Cakey has joined #ruby-lang
khaase has joined #ruby-lang
AncientAmateur has quit [Remote host closed the connection]
GBrawl has quit [Read error: Connection reset by peer]
GBrawl has joined #ruby-lang
heftig has quit [Quit: Quitting]
toastynerd has joined #ruby-lang
seako has joined #ruby-lang
momomomomo has quit [Ping timeout: 276 seconds]
Johz has joined #ruby-lang
momomomomo has joined #ruby-lang
momomomomo has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby-lang
__butch__ has joined #ruby-lang
relix has quit [Read error: Connection reset by peer]
relix has joined #ruby-lang
RobertBirnie has joined #ruby-lang
momomomomo has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
momomomomo has joined #ruby-lang
arBmind has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
momomomomo has joined #ruby-lang
arBmind has quit [Ping timeout: 255 seconds]
momomomomo has quit [Read error: Connection reset by peer]
siflyn has joined #ruby-lang
momomomomo has joined #ruby-lang
momomomomo has quit [Read error: Connection reset by peer]
Paradox has quit [Quit: off to herp the derps]
charliesome has joined #ruby-lang
yfeldblum has quit [Ping timeout: 252 seconds]
yatish27 has quit []
eval-in__ has quit [Remote host closed the connection]
eval-in has joined #ruby-lang
momomomomo has joined #ruby-lang
momomomomo has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby-lang
momomomomo has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
momomomomo has joined #ruby-lang
momomomomo has quit [Read error: Connection reset by peer]
yatish27 has joined #ruby-lang
momomomomo has joined #ruby-lang
mistym has quit [Remote host closed the connection]
momomomomo has quit [Read error: Connection reset by peer]
AncientAmateur has joined #ruby-lang
benlovell has quit [Ping timeout: 252 seconds]
eval-in has quit [Remote host closed the connection]
eval-in has joined #ruby-lang
mikecmpbll has quit [Ping timeout: 245 seconds]
danijoo has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby-lang
danijoo has joined #ruby-lang
Asher has quit [Ping timeout: 240 seconds]
eval-in has quit [Remote host closed the connection]
Asher has joined #ruby-lang
eval-in has joined #ruby-lang
AncientAmateur has quit [Ping timeout: 240 seconds]
musurgia has left #ruby-lang [#ruby-lang]
Cakey has quit [Ping timeout: 258 seconds]
wallerdev has quit [Quit: wallerdev]
arooni-mobile has joined #ruby-lang
momomomomo_ has joined #ruby-lang
havenwood has joined #ruby-lang
momomomomo has quit [Ping timeout: 276 seconds]
momomomomo_ is now known as momomomomo
arBmind has joined #ruby-lang
AncientAmateur has joined #ruby-lang
hahuang65 has quit [Ping timeout: 240 seconds]
banister has quit [Ping timeout: 255 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister_ has joined #ruby-lang
mistym has joined #ruby-lang
mikecmpbll has joined #ruby-lang
wallerdev has joined #ruby-lang
doitjay has joined #ruby-lang
momomomomo_ has joined #ruby-lang
momomomomo has quit [Ping timeout: 240 seconds]
momomomomo_ is now known as momomomomo
ghg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cakey has joined #ruby-lang
ghg has joined #ruby-lang
DEac- has quit [Ping timeout: 258 seconds]
ghg has quit [Client Quit]
DEac- has joined #ruby-lang
ghg has joined #ruby-lang
yfeldblum has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby-lang
chouhoul_ has joined #ruby-lang
starbucks has quit [Remote host closed the connection]
chouhoul_ has quit [Read error: Connection reset by peer]
chouhou__ has joined #ruby-lang
enebo has quit [Quit: enebo]
starbucks has joined #ruby-lang
saarinen has joined #ruby-lang
starbucks has quit [Read error: Connection reset by peer]
<centrx>
Stop assigning so many addresses to people. Use the buddy system
<toretore>
my fridge also needs an ip
<centrx>
Your IP will be shared with with one friend of your choice and one U.S. Government employee.
<zenspider>
and your fridge's handle. and lightbulb. and water spout. and icemaker
<centrx>
You don't even need a fridge
mykoweb has quit [Ping timeout: 276 seconds]
<whitequark>
zenspider: and that's perfectly fine. addresses need not be an artifically scarce resource.
dwknoxy has quit [Ping timeout: 265 seconds]
<xybre>
I have like 15 internet capable devices myself, 3 of them have external IPs
yubrew has quit [Remote host closed the connection]
jaimef has quit [Excess Flood]
elia has quit [Quit: Computer has gone to sleep.]
jaimef has joined #ruby-lang
<zenspider>
when we realized that we were running out of seconds in a time_t, they didn't re-invent our time system to fix it.
<zenspider>
they made the number bigger
MichD is now known as michd
<xybre>
Maybe that was a bad solution.
yfeldblum has joined #ruby-lang
<zenspider>
right. obviously.
<xybre>
Rather, maybe there was a better solution that was overlooked.
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblu_ has joined #ruby-lang
<xybre>
I suppose would could have jsut doubled the size of an IP4 address. 192.168.0.0.0.0.0.1
saarinen has quit [Quit: saarinen]
crudson has quit [Quit: Leaving.]
<whitequark>
the changes in the IP stack amount to enlarging the number...
robbyoconnor has joined #ruby-lang
<whitequark>
you can't just change the packet structure without bumping the version anyway, so there's no way around redeploying everything
mykoweb has joined #ruby-lang
loincloth has quit [Remote host closed the connection]
enebo has quit [Quit: enebo]
mykoweb has quit [Remote host closed the connection]
<whitequark>
time_t has exactly the same problem. it breaks ABI, it breaks kernel interface, and it interacts badly with file formats.
mykoweb has joined #ruby-lang
<xybre>
It's larger than a lot of platform's word and built in integer sizes, so fun stuff had to happen. But thats sorta the reason time was the size it was before.
<whitequark>
or the largefile interface. it's only recently that wget gained an ability to download stuff over 2GB.
apeiros has quit [Remote host closed the connection]
spuk has quit [Ping timeout: 260 seconds]
apeiros has joined #ruby-lang
mykoweb has quit [Ping timeout: 245 seconds]
mykoweb_ has joined #ruby-lang
spuk has joined #ruby-lang
Coincide_ has joined #ruby-lang
Coincidental has quit [Ping timeout: 276 seconds]
starbucks has quit [Remote host closed the connection]
nathanstitt has joined #ruby-lang
alex-quiterio has quit [Quit: Leaving.]
__butch__ has quit [Quit: Leaving.]
Coincide_ has quit [Remote host closed the connection]
NemesisD has joined #ruby-lang
<NemesisD>
hi guys. i'm having a problem with rmagick where it is built against an old version of imagemagick i no longer have. i am pointing bundler to use the github version and i can't for the life of me uninstall it
<NemesisD>
i've run gem uninstall rmagick, gem list rmagick shows nothing, but bundle show rmagick: /home/michael/.rvm/gems/ruby-1.9.3-p545/bundler/gems/rmagick-79e1708c7f67
<zenspider>
NemesisD: `rm -r` works if you have to
<zenspider>
make sure you clean up the other rmagick stuff sibling to /gems/
<NemesisD>
zenspider: hmm. like things that depend on it?
<zenspider>
no, I mean the spec, docs, cache, etc.
<zenspider>
you're trying to reinstall it, right? so the stuff that depend on it should be OK, assuming they're compatible with the new version
<NemesisD>
good call, there was a gems/extensions/x86_64-linux/1.9.1/rmagick-2.13.2
<NemesisD>
yeah attempting to reinstall it
wallerdev has joined #ruby-lang
<NemesisD>
much to my surprise, emacs actually required a newish version of imagemagick with HDR support (wat) and the currently published rmagick refuses to install with HDR support enabled
<NemesisD>
comedy of errors
<wallerdev>
rmagick is a mess of memory leaks i thought
ghg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kavinder has joined #ruby-lang
yubrew has joined #ruby-lang
<NemesisD>
it is. nothing has given me more trouble than rmagick
<whitequark>
all because ruby's gc is too dumb to account for finalizable memory
<zenspider>
NemesisD: emacs does?? huh. not for me. what version?
<zenspider>
rmagick is the reason why imagescience exists, you know. ;)
woollyams has joined #ruby-lang
alex-quiterio has joined #ruby-lang
yubrew has quit [Ping timeout: 258 seconds]
mykoweb_ has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mykoweb_ has joined #ruby-lang
mykoweb has quit [Ping timeout: 265 seconds]
saarinen has joined #ruby-lang
starbucks has joined #ruby-lang
charliesome has joined #ruby-lang
NemesisD has quit [Ping timeout: 265 seconds]
toastynerd has quit [Remote host closed the connection]
mykoweb_ has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
doitjay has joined #ruby-lang
kitak_ has quit [Remote host closed the connection]
toastynerd has joined #ruby-lang
lewix has joined #ruby-lang
lewix has quit [Changing host]
lewix has joined #ruby-lang
karamazov has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
mykoweb has quit [Ping timeout: 276 seconds]
kazundo has quit [Quit: Leaving.]
ghg has joined #ruby-lang
Jamo___ is now known as Jamo
karamazov has quit [Remote host closed the connection]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
ghg has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
ghg has joined #ruby-lang
chouhoulis has quit [Ping timeout: 245 seconds]
mjw1 has quit [Quit: Leaving.]
<zenspider>
drbrain: Gem::Specification.lib_files is totally broken?
<drbrain>
it seems only default gems have @files filed in with anything
<zenspider>
again, immaterial. lib_files is broken
<zenspider>
[[], [], [], [], ...] == broken
kitak_ has joined #ruby-lang
<drbrain>
most of my gems don't have any files at all
<drbrain>
or only documentation
<drbrain>
sure lib_files is broken, but fixing it won't fix your problem
<drbrain>
because there are no files for gems installed past when #for_cache was introduced
<zenspider>
because fixing it to ACTUALLY RETURN LIB FILES is beyond rubygems?
<zenspider>
how does that even make sense?
kitak_ has quit [Remote host closed the connection]
mjw has quit [Quit: Leaving.]
<drbrain>
let me restate
<drbrain>
#lib_files looking at #files is wrong, #lib_files needs to use the filesystem, not change its prefix
<drbrain>
that the items in #files don't have "lib" on them is irrelevant
<zenspider>
I don't give a fuck what's in @files. see the forest through all those pesky trees. I want the lib_files method to return the files in lib.
mjw has joined #ruby-lang
<drbrain>
then why are you going on about not having "lib" so much?
kitak has quit [Remote host closed the connection]
lewix has joined #ruby-lang
kitak has joined #ruby-lang
<zenspider>
I give up. Keep your broken method. Fuck me.
ari-_-e has joined #ruby-lang
stulzer has joined #ruby-lang
yubrew has joined #ruby-lang
jsullivandigs has joined #ruby-lang
stulzer has quit [Client Quit]
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
yubrew has quit [Ping timeout: 252 seconds]
tdy has quit [Quit: WeeChat 0.4.3]
tdy has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
mykoweb has quit [Ping timeout: 258 seconds]
houhoulis has joined #ruby-lang
kitak has quit [Remote host closed the connection]
kitak has joined #ruby-lang
starbucks has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: ciao.]
Coincidental has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]