<apeiros>
whitequark: do you provide the code so one can use that test as a rake-task in your own gem?
<whitequark>
apeiros: it's not a rake task, it's a "gem gauntlet"
<whitequark>
and yeah I'll push that
<andrewvos>
whitequark: I'm giving you a compliment.
<andrewvos>
sheesh
<whitequark>
why did someone feel a need to push a gem with 3.8MB ruby "tests"
Mon_Ouie has joined #ruby-lang
<whitequark>
hm, the parser doesn't seem to eat any memory. hung?
<whitequark>
no, just a really big file. d'oh
<whitequark>
also seems to hit some kind of bottleneck
adambeynon has joined #ruby-lang
Oak_ has quit [Remote host closed the connection]
<yorickpeterse>
whitequark: ruby-prof yo
<yorickpeterse>
http://youtu.be/FstLUoQK-K0 and here's some pretty decent music before I ninja myself back into this codebase
judofyr has joined #ruby-lang
<whitequark>
wow, so I spend 74% of time in String#[]
_jpb_ has quit [Ping timeout: 248 seconds]
<whitequark>
and the rest in the lexer
<yorickpeterse>
if you're using ruby-prof, make sure you install the right patches for MRI
<yorickpeterse>
(for mem/GC analysis that is)
<whitequark>
don't give a fuck about memory or GC
<whitequark>
my workload is very very very cpu-bound
_jpb_ has joined #ruby-lang
judofyr has quit [Read error: Connection reset by peer]
judofyr has joined #ruby-lang
<whitequark>
oh. waaaait
<whitequark>
utf-8
<apeiros>
:-/
<apeiros>
yeah, utf-8 means String#[] isn't O(1)
<whitequark>
UTF-32?..
<whitequark>
need to benchmark it
<apeiros>
so convert to utf-32 and hope ruby implements String#[] as O(1) there? (because technically it shouldn't)
<whitequark>
_shouldn't_?
<whitequark>
why the fuck shouldn't it
<apeiros>
afaik there are codepoints beyond 2^32
<yorickpeterse>
whitequark: implement parser in C for roflscale
<whitequark>
no, there are no codepoints beyond even U+10FFFF
<whitequark>
because surrogate pairs
<whitequark>
and there will never be
<apeiros>
ah, right, FFFF is 2^16, not 2^32
laura__ has left #ruby-lang [#ruby-lang]
<whitequark>
lol
<apeiros>
so yeah, utf32 and hope for the best :)
<whitequark>
or I can explode it as an array
<apeiros>
.chars?
<apeiros>
(or .chars.to_a in 1.9)
<whitequark>
that's an enumerator I think
<whitequark>
gonna be slow
<apeiros>
in 2.0 it returns an array afaik
<apeiros>
(or is that only as of 2.1?)
<apeiros>
well, utf32 will probably require less memory and be faster
<judofyr>
hah, gzipped and compacted the dependency data only takes 2.3MB
<whitequark>
less memory? utf-32? wat
<judofyr>
maybe I've done something wrong…
<apeiros>
a) because it's only 4byte per char vs. 8byte with an array
<whitequark>
oh, compared with an array
<apeiros>
correction: vs *at least* 8 byte
<whitequark>
hm
<whitequark>
of course I'll explode it as an array of Fixnums
<apeiros>
b) because you don't have to do additional operations like join all the time
<whitequark>
so it'll be 4 bytes in either case
<apeiros>
no
<whitequark>
why?
<apeiros>
fixnum is 4byte only on 32bit machines
<whitequark>
oh, right
<whitequark>
but not at least 8 bytes, then
<whitequark>
at worst 8 bytes
<apeiros>
yes
<whitequark>
also ruby doesn't optimize lookup in utf-32.
<whitequark>
so, fuck. :/
<apeiros>
for that you could use .unpack("U*")
<whitequark>
oh, yes, thanks!
<apeiros>
:-/
<apeiros>
fuck indeed
<apeiros>
lunch time!
<apeiros>
have fun :)
skmp has joined #ruby-lang
<whitequark>
oh wait, it does, I typoed
ioga_wrk has quit [Quit: Leaving]
<whitequark>
it's marginally slower than exploded array but I'd start small
<whitequark>
though. I do #ord on it anyway. hmm...
apeiros has quit [Remote host closed the connection]
holgerno has joined #ruby-lang
holgerno has quit [Client Quit]
bzalasky has quit [Remote host closed the connection]
runeb has joined #ruby-lang
judofyr has quit [Ping timeout: 276 seconds]
runeb has quit [Remote host closed the connection]
<whitequark>
ahem. nothing changed
<whitequark>
wat?
MaddinXx_ has joined #ruby-lang
<whitequark>
oh. no. changed. I went from 60.682 kchars/s to 100.176 kchars/s, almost twofold
<whitequark>
it is STILL too slow?Q
<whitequark>
wow.
minivan has joined #ruby-lang
<yorickpeterse>
You need to use JSON to make it scalable
<yorickpeterse>
Big Data
cd has joined #ruby-lang
cd is now known as Guest69894
joeroot has joined #ruby-lang
Domon has quit [Remote host closed the connection]
<whitequark>
soooo yeah, the fastest thing is to feed Ragel codepoints from an array
<whitequark>
and UTF-32 is not worth it because I'd have to convert everything back to UTF-8
<whitequark>
which almost cancels out all the improvement.
rshetty has quit [Quit: Sleeping]
<whitequark>
oh awesome!
<whitequark>
now it's 22% GC, 27% Kernel#loop (WTF), and 30% Lexer#advance.
<whitequark>
and the whole 3% is Racc.
runeb has joined #ruby-lang
apeiros has joined #ruby-lang
<yorickpeterse>
could probably use tracepoint to figure out where Kernel#loop is used
<whitequark>
oh, so Kernel#loop is used by Ragel internally to follow transitions. so it's the expected behavior: 57% is lexer, 3% is parser, 22% is GC and the remaining 18% is random shit
<yorickpeterse>
(given you can't just regexp for it)
<yorickpeterse>
whitequark: if you can give me some kind of benchmark I can do some benching at home later tonight, if you'd like at least
<whitequark>
I can benchmark it myself
<whitequark>
it is just SLOW AS FUCK
<whitequark>
I mean, I don't have enough patience to wait through it even once
<yorickpeterse>
I mean I'm pretty sure you can optimize it GC wise, but I already have a working setup for that on my home laptop
<whitequark>
ohhh
<whitequark>
that'd be cool indeed
<whitequark>
so just ./bin/ruby-parse -B global_2050_model-0.0.2/test/test_global_2050_model.rb
<whitequark>
that's it.
symm-_ has quit [Ping timeout: 264 seconds]
<yorickpeterse>
can you pastie the contents of that file?
<yorickpeterse>
Because I have no idea what Gem that is
<whitequark>
no, it's 3.8 megabytes
<whitequark>
er, global_2050_model
<whitequark>
:D
<yorickpeterse>
ta
<whitequark>
hm wait, I screwed up
<whitequark>
for that file, String#[] still dominates the CPU
<whitequark>
interesting.
<whitequark>
right, so creating tokens is SLOW AS HELL
<whitequark>
understandably so.
<yorickpeterse>
I do recall Racc using Module#something_eval quite heavily
<yorickpeterse>
which might also add to the total time
<whitequark>
no it doesn't.
<whitequark>
it uses class_eval once, at the load time, to initialize parser actions
<whitequark>
well, once for each action. 300 or so times together
<whitequark>
I'm dealing with runtimes of 10 seconds upwards
<whitequark>
aha, excellent, so if I do convert tokens from UTF-32, the distribution becomes much much better
<whitequark>
heuristic time! if the file is bigger than 100K, store it in UTF-32 and convert, otherwise don't
<yorickpeterse>
whitequark: I recall it being quite heavily, but my memory might be mixed up, I'll have to check again when I'm back home
<yorickpeterse>
I recall there was some method on Array that let you insert a value between two given indexes, does anybody remember the name?
<yorickpeterse>
(that is, by shifting everything one index to the right)
<yorickpeterse>
Ah, Array#insert
<whitequark>
who'd think of that
<yorickpeterse>
clearly Dutchies don't
<whitequark>
so yeah. this wastes 15% of time in String#encode on smaller files
<whitequark>
or more specifically, files with smaller token/character ratio
duphus has quit [Quit: Leaving.]
Domon has joined #ruby-lang
<whitequark>
sigh. did what I could, I guess
<whitequark>
I *think* that it may be possible to collect statistics on the token/character ratio, and if it exceeds some threshold, convert source to UTF-32 on the fly
<whitequark>
but that's too complicated for now
marr has quit [Read error: Connection reset by peer]
joonty_ has joined #ruby-lang
<whitequark>
lol, rbml-0.0.5.9.4.2, what kind of version is that
joonty has quit [Ping timeout: 276 seconds]
<whitequark>
cool, found five bugs in parser
Domon has quit [Remote host closed the connection]
ledestin has joined #ruby-lang
joeroot has quit [Ping timeout: 245 seconds]
<whitequark>
wow, why would you release a set of icons with an entire vendored rails bundle
<whitequark>
great, now it hangs on faker-japanese. it's just an 1M file.
<whitequark>
oh no, ate it. I have a really inefficient string parsing code.
runeb has quit [Ping timeout: 264 seconds]
realDAB has joined #ruby-lang
mbj_ has joined #ruby-lang
joeroot has quit [Remote host closed the connection]
joeroot has joined #ruby-lang
sush24_ has quit [Ping timeout: 246 seconds]
ffio has joined #ruby-lang
_ffio_ has quit [Ping timeout: 268 seconds]
mbj has quit [Ping timeout: 264 seconds]
ledestin has quit [Quit: ledestin]
mbj has joined #ruby-lang
cd has joined #ruby-lang
cd is now known as Guest41585
judofyr has joined #ruby-lang
mbj_ has quit [Ping timeout: 276 seconds]
zomgbie_ has quit [Read error: Connection reset by peer]
zomgbie has joined #ruby-lang
heftig has joined #ruby-lang
postmodern has quit [Quit: Leaving]
mbj has quit [Read error: Connection reset by peer]
stamina has quit [Ping timeout: 264 seconds]
<yorickpeterse>
of course now nobody complains about #whitequark-lang
wallerdev has joined #ruby-lang
<yorickpeterse>
judofyr: http://www.tail-f.org/2013-07-22 re this, I'd say it would be much better to simply not load Gem::Specification when doing require() calls
<whitequark>
yorickpeterse: because parser has quite direct relevance to ruby ;)
rickruby has quit [Remote host closed the connection]
Nisstyre has quit [Quit: Leaving]
flip_digits has joined #ruby-lang
<whitequark>
lol, parser parsing parser.
_jpb_ has quit [Ping timeout: 268 seconds]
JohnBat26 has joined #ruby-lang
_jpb_ has joined #ruby-lang
dLog has joined #ruby-lang
dagobah_ has joined #ruby-lang
joeroot_ has joined #ruby-lang
jxweng has joined #ruby-lang
<judofyr>
yorickpeterse: well, it might be possible. one issue is that the require-directory is configurable. it can be something else than lib/
dagobah has quit [Read error: Connection reset by peer]
joeroot has quit [Read error: Connection reset by peer]
flip_digits has quit [Remote host closed the connection]
<yorickpeterse>
judofyr: you could prebuild all that upon Gem installation
dLog_ has quit [Ping timeout: 264 seconds]
<yorickpeterse>
e.g. just a plain text file with the load paths on each line
enebo has joined #ruby-lang
_jpb_ has quit [Ping timeout: 246 seconds]
_jpb_ has joined #ruby-lang
flip_digits has joined #ruby-lang
minivan has joined #ruby-lang
mdedetrich has joined #ruby-lang
<whitequark>
>Parser bug: unknown encoding name - feynman-diagram
<whitequark>
wait what
kstuart has joined #ruby-lang
jvrmaia has joined #ruby-lang
benanne has joined #ruby-lang
hhatch has quit [Read error: Operation timed out]
<judofyr>
yorickpeterse: that is true
matti has quit [Read error: Connection reset by peer]
yalue has joined #ruby-lang
fosky has quit [Ping timeout: 264 seconds]
mbj has joined #ruby-lang
<yorickpeterse>
http://eurolovemap.herokuapp.com/ so some people we work with (on a project that powers this tech) made this (partially Ruby). Apparently NL really likes NL
<yorickpeterse>
which is not surprising at all
marr has joined #ruby-lang
mdedetrich has quit [Quit: Computer has gone to sleep.]
<judofyr>
whitequark: see here for my notes on the dependency graph: http://www.tail-f.org/2013-07-22#post-6 I got it down to 2.3MB. that should speed up resolving quite a bit
mdedetrich has joined #ruby-lang
mdedetrich has quit [Client Quit]
enebo has quit [Quit: enebo]
<whitequark>
judofyr: yeah, makes sense
Asher has quit [Read error: Connection reset by peer]
<judofyr>
whitequark: if you run `bundle -V` you'll see all the HTTP connections that it makes
<gnufied>
judofyr: so bundler has its own API via rubygems
<gnufied>
that bundler uses to fetch dependencies tuples
<gnufied>
lets there is nothing installed and you are running bundler first time, it recursively starts from direct gems and download the tuple and then determines dependencies and then downloads their depenendecies
<gnufied>
if you do export DEBUG=1 and run bundler
<judofyr>
right
<gnufied>
I do not believe downloading dependencies is the problem that needs solving though
<gnufied>
:-)
<judofyr>
gnufied: I'm using it in my script here: http://www.tail-f.org/2013-07-22#post-6. what do you think about my suggestion? we can pack the whole dependency graph into 2.3MB
<judofyr>
gnufied: depend, if you have the dependency graph locally you don't need such a smart algorithm
<judofyr>
gnufied: whitequark has a project where `bundle install` takes 3-6 MINUTES when changing a single gem (so, mainly resolving is happening, it's not downloading tons of stuff)
<judofyr>
gnufied: I do believe that the network is the bottleneck in that case
<gnufied>
I would like to have a look at whitequark's project
<yorickpeterse>
clearly whitequark is hacking bundler
<yorickpeterse>
maybe he even torrents RubyGems
<gnufied>
whether it is remote downloading that is taking time or local resolving that is taking time
<gnufied>
judofyr: the smart algorithm kicks in only after it has complete gem dependency graph available locally
<judofyr>
gnufied: I don't think it's open-source. whitequark, where did oyu go?
<gnufied>
and that is known to be a NP-Complete problem
<gnufied>
and once you have a Gemfile.lock, then most of remote fetching is eliminated
<whitequark>
judofyr: huh?
<gnufied>
until of course you issue an update command
<whitequark>
I've no idea about bundler or rubygems
<judofyr>
whitequark: gnufied is wondering why your `bundle` takes 6 minutes to finish
<gnufied>
whitequark: which of your project is taking 3-6 minutes to install when changing a single gem?
<judofyr>
gnufied: I do want to play with "full dependency graph in 2.3MB though". is it difficult to add another way of fetching dependencies in Bundler?
breakingthings has joined #ruby-lang
jxweng has quit [Ping timeout: 245 seconds]
<gnufied>
judofyr: sounds like a good idea.
<gnufied>
bundler doesn't need "full dependency graph" mostly though
<gnufied>
it just needs dependency graph of gems in Gemfile
<judofyr>
gnufied: that is true, but just finding all the dependencies is part of the problem. you could preload all the dependencies of the gems in the Gemfile.lock though.
<gnufied>
which we do, once we have a Gemfile.lock
<judofyr>
oh
<gnufied>
or let me rephrase, if we have a Gemfile.lock I am pretty sure we don't fetch depenencies from network anymore. until a full update is issued or if you are updating few gems then just depenedencies of those gems
<gnufied>
or did you mean something else by "preload all the dependencies of the gems " ?
<judofyr>
gnufied: if you have a Gemfile.lock and changes something. do you then fetch all the dependencies from the Gemfile.lock?
<judofyr>
gnufied: I am aware that having a Gemfile.lock + no changes in the Gemfile causes no network activity at all. I only care about actual resolving here though (thus: either without a lockfile or with changes in Gemfile)
yxhuvud has joined #ruby-lang
<gnufied>
I am not 100% sure about this. But we try use existing Gemfile.lock as base index and update index for gems that have been requested to be updated
<judofyr>
gnufied: okay, I'm redownloading the dependency graph with the platform data as well.
benanne has quit [Quit: kbai]
dhruvasagar has joined #ruby-lang
wallerdev has joined #ruby-lang
rwilcox has joined #ruby-lang
vlad_starkov has joined #ruby-lang
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby-lang
nathanstitt has joined #ruby-lang
eugenejen has joined #ruby-lang
tomzx_mac has joined #ruby-lang
Cakey has quit [Ping timeout: 246 seconds]
_whitelogger has joined #ruby-lang
<whitequark>
.
<judofyr>
let's see
<judofyr>
gnufied: hah, it's still 2.3MB
jxweng has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
io_syl has joined #ruby-lang
<yorickpeterse>
<insert joke about using JSON so you can optimize it>
vlad_starkov has quit [Remote host closed the connection]
maxmanders has joined #ruby-lang
<gnufied>
this isn't reddit.
dhruvasagar has quit [Ping timeout: 240 seconds]
<gnufied>
judofyr: seriously worth opening a ticket in bundler-api, I haven't had a chance to look into bundler-api yet, but the guy who maintains surely will be intetested
Voker57|2 has joined #ruby-lang
<yorickpeterse>
gnufied: I wish people would only be serious about that on Reddit
<gnufied>
redacted.
Voker57 has quit [Ping timeout: 240 seconds]
io_syl has quit [Quit: io_syl]
<yorickpeterse>
?
spacesuit has joined #ruby-lang
Uranio has joined #ruby-lang
andrewvos has quit [Quit: WeeChat 0.3.7]
io_syl has joined #ruby-lang
<gnufied>
I take back my objection about "insert here joke"
io_syl has quit [Client Quit]
<yorickpeterse>
You've lost me
_jpb_ has quit [Ping timeout: 248 seconds]
_jpb_ has joined #ruby-lang
andrewvos has joined #ruby-lang
pipework has joined #ruby-lang
ngw has joined #ruby-lang
andrewvos has quit [Quit: WeeChat 0.3.7]
wmoxam has joined #ruby-lang
andrewvos has joined #ruby-lang
anonymuse has joined #ruby-lang
andrewvos has quit [Quit: WeeChat 0.3.7]
andrewvos has joined #ruby-lang
andrewvos has quit [Client Quit]
andrewvos has joined #ruby-lang
<injekt>
wat
andrewvos has quit [Client Quit]
vlad_starkov has joined #ruby-lang
andrewvos has joined #ruby-lang
hhatch has joined #ruby-lang
<judofyr>
confuse ALL THE PEOPLE
andrewvos has quit [Client Quit]
andrewvos has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
<judofyr>
gnufied: I guess bundler-api can't store stuff in S3?
<gnufied>
no idea.
enebo has joined #ruby-lang
<judofyr>
because this is really a cronjob
_jpb_ has quit [Remote host closed the connection]
_jpb_ has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 264 seconds]
mistym has joined #ruby-lang
stamina has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
<andrewvos>
Hey anyone know of a gem that can receive push notifications?
Johz has joined #ruby-lang
runeb has quit [Ping timeout: 256 seconds]
<andrewvos>
Or a realy simple way to do it?
<andrewvos>
Suppose I could have a sinatra server that stores messages by ID
<andrewvos>
And then I could connect to the server and wait for a response
<andrewvos>
But sinatra isn't multithreaded is it?
<whitequark>
andrewvos: you can use EM
<gnufied>
judofyr: I actually know resolver algortithm pretty well now.
<andrewvos>
whitequark: I suppose
<gnufied>
I am slowly adding YARD docs to these files
<judofyr>
gnufied: cool
<ericwood>
are there any cool ruby tools for drawing pixels on stuff?
<whitequark>
andrewvos: with sinatra that is
<whitequark>
actually what I meant is: you can use thin
<whitequark>
what you want is provided automatically then
<andrewvos>
whitequark: What is provided?
<gnufied>
andrewvos: receive push notifications over what?
<andrewvos>
gnufied: I have weechat running on a server, I want to get push notifications on OSX
<yorickpeterse>
andrewvos: bro, that requires co-operative multitasking
spacecaps has joined #ruby-lang
<andrewvos>
Co-operative? You mean like Whole Foods or something?
<injekt>
LOL
ldnunes has joined #ruby-lang
<injekt>
andrewvos: it's a bank too now omg
<andrewvos>
oh come one
dhruvasagar has quit [Ping timeout: 264 seconds]
<andrewvos>
All I want to do is some threading and now I'm learning about new hippy banks.
<ericwood>
oh man I love Whole Foods
<andrewvos>
ericwood: How is SF?
<ericwood>
I live in Austin
<injekt>
lol
<ericwood>
we have like 3 of them and they're all awesome :D
gregmore_ has joined #ruby-lang
<injekt>
awkward first date
<ericwood>
we have their world headquarters, actually, it's the flagship store and it's AWESOME
<ericwood>
seriously
<ericwood>
it'd actually make a decent place for a first date >.>
<andrewvos>
Classy
<ericwood>
I'm not even kidding
gregmoreno has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby-lang
<ericwood>
I actually have a date tonight, I'll take her there and prove you all wrong
<ericwood>
gtg
havenwood has joined #ruby-lang
<yorickpeterse>
take pictures
anildigital_work is now known as anildigital__
kstuart has quit [Read error: Connection reset by peer]
MaddinXx_ has quit [Remote host closed the connection]
anildigital__ has quit []
henrikhodne has joined #ruby-lang
hahuang65 has quit [Ping timeout: 248 seconds]
dernise has quit [Remote host closed the connection]
Johz has quit [Quit: Leaving]
elia has quit [Read error: Operation timed out]
ngw has quit [Quit: Bye!]
Austin__ has joined #ruby-lang
Austin__ has left #ruby-lang [#ruby-lang]
benanne has quit [Quit: kbai]
saarinen has quit [Quit: saarinen]
Cakey has quit [Quit: Lost terminal]
intellitech has quit [Quit: SMOKE BOMB!]
iliketurtles has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
iliketurtles has quit [Max SendQ exceeded]
iliketurtles has joined #ruby-lang
joast has quit [Quit: Leaving.]
sstrickl has quit [Quit: sstrickl]
sstrickl has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
towski has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
rshetty has quit [Quit: Sleeping]
joast has joined #ruby-lang
minivan has quit [Ping timeout: 246 seconds]
symm- has joined #ruby-lang
symm- has quit [Ping timeout: 248 seconds]
mrsolo has joined #ruby-lang
symm- has joined #ruby-lang
kstuart has joined #ruby-lang
corecode has joined #ruby-lang
<corecode>
would i be right here to ask about bundler?
<erikh>
#bundler is frequently higher signal
symm- has quit [Ping timeout: 256 seconds]
<erikh>
but there are bundler people in here
<corecode>
thanks
<corecode>
in essence i want to use pygments.rb 0.5.2, but jekyll does a ~> 0.3.2
<corecode>
i wonder whether there is any way to force 0.5.2
jonahR_ has joined #ruby-lang
ffio has quit [Read error: Connection reset by peer]
jonahR has quit [Ping timeout: 248 seconds]
jonahR_ is now known as jonahR
blowmage` has left #ruby-lang [#ruby-lang]
blowmage has joined #ruby-lang
jaimef_ has quit [Excess Flood]
_carloslopes has joined #ruby-lang
ffio has joined #ruby-lang
torrieri has joined #ruby-lang
torrieri has quit [Changing host]
torrieri has joined #ruby-lang
skmp has quit [Quit: Leaving.]
carloslopes has quit [Ping timeout: 246 seconds]
s1n4 has joined #ruby-lang
s1n4 is now known as Guest17414
gregmore_ has quit [Remote host closed the connection]
maxmanders has joined #ruby-lang
jaimef has joined #ruby-lang
gregmoreno has joined #ruby-lang
saarinen has joined #ruby-lang
symm- has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
saarinen has quit [Client Quit]
hahuang65 has joined #ruby-lang
Guest17414 has quit [Quit: leaving]
ffio has quit [Quit: WeeChat 0.4.1]
hahuang65 has quit [Quit: Reconnecting]
hahuang65 has joined #ruby-lang
joeroot has quit [Quit: Leaving...]
adwhit has quit [Ping timeout: 256 seconds]
JohnBat26 has joined #ruby-lang
symm- has quit [Ping timeout: 264 seconds]
adwhit has joined #ruby-lang
workmad3 has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
tkuchiki has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 246 seconds]
kstuart has quit [Ping timeout: 248 seconds]
corecode has left #ruby-lang ["ERC Version 5.3 (IRC client for Emacs)"]
havenwood has quit [Remote host closed the connection]
maxmanders has joined #ruby-lang
amerine has joined #ruby-lang
dvk has joined #ruby-lang
sia_solati has joined #ruby-lang
__butch__ has joined #ruby-lang
saarinen has joined #ruby-lang
<yorickpeterse>
whitequark: right so I'm home, benchmark tiem
vbatts has quit [Ping timeout: 246 seconds]
<eam>
how do I force the gc to collect in 1.8.7?
athaeryn has joined #ruby-lang
<mistym>
Is there a reasonable way to simulate Enumerator's functionality on pre-1.8.7?
<yorickpeterse>
whitequark: lol this global model thing ships a fucking .so file that's 88MB
<yorickpeterse>
mistym: why are you using a dead version of Ruby?
<mistym>
yorickpeterse: It's what comes with a dead version of OS X, etc.
<yorickpeterse>
what version?
<yorickpeterse>
Mountain cougar w/e ran 1.8.7
<mistym>
Leopard ran 1.8.6, Tiger ran 1.8.2
<yorickpeterse>
either way, you'd have to backport the code
<yorickpeterse>
but honestly it's better to upgrade to a supported Ruby
sia_solati has left #ruby-lang [#ruby-lang]
<mistym>
Believe me, I'm very familiar with backporting code at this point :D
<yorickpeterse>
even 1.8.7 is end of life
<mistym>
Yes, I know.
<whitequark>
yorickpeterse: wow 88MB so file
<mistym>
I can't upgrade the Ruby that comes with the OS.
<yorickpeterse>
whitequark: lib/global_2050_model/libglobal_2050_model.so to be exact
<whitequark>
no wonder they have 4MB of tests
sia_solati has joined #ruby-lang
<yorickpeterse>
haha, it's 64bit only too
<yorickpeterse>
and not even stripped
<eam>
a lot of people have to work with the ruby used by a particular system, the ruby EOL aspirations aren't very reasonable
<yorickpeterse>
which saves 6MB
<yorickpeterse>
eam: I'd say they are more than reasonable, this isn't Windows XP that remains supported for close to 14 years
workmad3 has joined #ruby-lang
<whitequark>
it's EOL already*
<yorickpeterse>
whitequark: what was the file again you were benching?
<whitequark>
* not for corporate users yet.
<whitequark>
yorickpeterse: look at the biggest damn one
<whitequark>
there's a 1.8MB one and a 3.9MB one. both need
<yorickpeterse>
found it
<eam>
yorickpeterse: EOL'ing the most commonly deployed version in available systems isn't reasonable
<eam>
working to find out why those platforms can't upgrade is reasonable
<whitequark>
eam: I think you have a weird idea of "available systems"
<yorickpeterse>
eam: we seem to have different opinions so lets keep it to that, no point in fighting about it :)
<eam>
whitequark: RHEL, OSX :)
<whitequark>
proper systems allow you to upgrade system ruby, etc
<yorickpeterse>
whitequark:
<yorickpeterse>
fak
<breakingthings>
osx uses ruby for a very specific and not-very-needing-of-updates reason.
<yorickpeterse>
I was going to say "OS X isn't an operating system"
<breakingthings>
iirc.
<eam>
whitequark: everyone deployes with a newer version -- but it's not generally the case that a system version can update
<eam>
especially not with abi/api breaking changes like ruby updates introduce
<whitequark>
eam: well, folks pay for RHEL, so it's Red Hat's job to fix it
<eam>
whitequark: that's the asinine part :)
<mistym>
whitequark: That would be nice, but as is I'm dealing with the Ruby version that comes with the OS. I was mostly asking for the sake of my question, not to prompt an argument ;)
<eam>
and it's why I'm not doing any serious for-pay work in ruby, to be honest
<whitequark>
sure sure
<eam>
the platform is not well supported
<eam>
(compared to alternatives)
<whitequark>
eam: you could make money supporting the platform!
<mistym>
(FWIW I use modern Ruby versions everywhere I can, for example *not* when I need to stick with the system version on ancient OS Xs)
<yorickpeterse>
based on that argument neither Python and Perl are well supported either
<eam>
whitequark: I can make a lot more money doing what I already do
<eam>
yorickpeterse: no way
<eam>
yorickpeterse: Perl I wrote in the 90s still runs today
<yorickpeterse>
eam: version wise whatever RHEL (used to) ship is fucking ancient
<yorickpeterse>
same goes with Python
<eam>
ruby I wrote 5 years ago needs close examination
<yorickpeterse>
though Python 2.6 is still developed I think
postmodern has joined #ruby-lang
<whitequark>
yorickpeterse: freezed and I think not developed
<eam>
feature freeze != unsupported
gregmoreno has quit [Remote host closed the connection]
<whitequark>
thus the second part
<whitequark>
besides, python 2.x is even worse than ruby 1.8 in terms of backports/etc
<yorickpeterse>
jesus this file takes forever to parse
<eam>
note, I'm not defending python, it's not great either in terms of community support
<whitequark>
it's possible to write ruby code which runs on both 1.8/1.9, and in a big amount of cases it's not even that hard
<yorickpeterse>
and gobbles up an entire core
<mistym>
drbrain: I have an old rubygems (1.0.1) which won't upgrade itself since it 302s while trying to fetch http://gems.rubyforge.org/yaml - what's the best way to upgrade?
<whitequark>
e.g. parser runs on both
<whitequark>
not possible for py.
<whitequark>
yorickpeterse: yes that is the point
<yorickpeterse>
mistym: download manually from the website
<whitequark>
it's going to parse for 50 seconds or so
<yorickpeterse>
dayum
towski has quit [Remote host closed the connection]
<eam>
whitequark: if python is the bar for platform support it's about the lowest bar you could pick :)
gregmoreno has joined #ruby-lang
<yorickpeterse>
we should all just write C, that shit runs forever
<whitequark>
eam: not sure what you want to say
<eam>
it does :(
<whitequark>
yorickpeterse: it doesn't
<whitequark>
build some invalid C with a better compiler and it'll break.
<yorickpeterse>
IT WAS A JOKE
<eam>
but perl runs forever too
<whitequark>
or worse, silently introduce a security hole
<yorickpeterse>
postmodern: ping
<mistym>
yorickpeterse: Thanks
brianpWins has joined #ruby-lang
<mistym>
drbrain: What's the newest rubygems that works on 1.8.6?
<erikh>
perl has a really, really, really strong backwards compat culutre
sia_solati has quit [Ping timeout: 240 seconds]
<erikh>
sometimes frustratingly so
<postmodern>
yorickpeterse, ponf
<postmodern>
yorickpeterse, pong
<yorickpeterse>
postmodern: is there a way using chruby to rename a ruby (e.g. ~/.rubies/foo => ~/.rubies/bar) as well as all the corresponding shebangs?
<yorickpeterse>
or does that require me to rebuild Ruby and re-install everything?
<erikh>
mv
GaelanAintAround is now known as Gaelan
<postmodern>
yorickpeterse, `gem pristine` should re-gen all shebangs
<yorickpeterse>
hmm
<postmodern>
gem pristine --all
<yorickpeterse>
but renaming the actual ruby directory shoud "Just Work (tm)"?
<postmodern>
newer versions of rubygems generate bin scripts with absolute shebangs
<postmodern>
i think you can compile ruby with an option to force it to use relative paths for everything?
<yorickpeterse>
hmm
<yorickpeterse>
thanks, I'll investigate
<postmodern>
--enable-load-relative
Mon_Ouie has quit [Ping timeout: 264 seconds]
<postmodern>
also you can add --env-shebang to your ~/.gemrc
<postmodern>
i think that is probably the best approach let me try that
<postmodern>
oh hey, i already added it a while ago
anonymus_ has quit [Remote host closed the connection]