<Senjai>
tallgirltaadaa: Then at least describe your issue
<tallgirltaadaa>
im looking for the course of a css file
<tallgirltaadaa>
i see it in the dom
<tallgirltaadaa>
application css
<tallgirltaadaa>
and i need to change something
<tallgirltaadaa>
but i cant find it anywhere in my code... or from where its being referenced
<Senjai>
tallgirltaadaa: Is this a rails question?
<tallgirltaadaa>
yes
<ljarvis>
tallgirltaadaa: use grep for the selector
<Senjai>
tallgirltaadaa: try #rubyonrails
<ljarvis>
this isn't a rails question, it's a search question
<ljarvis>
it's not even a ruby question
allomov has joined #ruby-lang
<Senjai>
ljarvis: It's a rails question, odds are if they're looking for css that doesnt exist within the project, its from a gem that adds css to the project
<ljarvis>
tallgirltaadaa: if you want to find something amongst your code, you should search for it, simple as that
<tallgirltaadaa>
have never used grep... im sorry for bieng a super noob, would you mind telling me what it is
<tallgirltaadaa>
its not always that simple
<ljarvis>
tallgirltaadaa: what's the css selector you're searching for?
cnivolle has quit [Remote host closed the connection]
cnivolle has joined #ruby-lang
cnivolle_ has joined #ruby-lang
cnivolle has quit [Ping timeout: 246 seconds]
tomkadwill has quit [Remote host closed the connection]
woollyams has quit [Ping timeout: 252 seconds]
tomkadwill has joined #ruby-lang
charliesome has joined #ruby-lang
ssb123 has joined #ruby-lang
<yorickpeterse>
So last night I concluded I'll *probably* do my XML/HTML parser partially as a C-ext
<yorickpeterse>
So I'll have to change the slogan to "A pretty much pure Ruby XML/HTML parser"
<yorickpeterse>
because fuck me Ragel Ruby is slow
Mon_Ouie has quit [Ping timeout: 252 seconds]
<whitequark>
I wonder if rbx can JIT the hell out of it?
<yorickpeterse>
Perhaps, but both JRuby and Rbx are already several orders of magnitude slower
<yorickpeterse>
e.g. I have a benchmark that chews through 10MB of XML using the lexer
<yorickpeterse>
MRI 2.1.1 does that in around 9,3 seconds
<yorickpeterse>
JRuby and Rbx sit somewhere around 30 seconds
<yorickpeterse>
Racc is not involved here
ssb123 has quit [Ping timeout: 240 seconds]
<whitequark>
whoa, that sounds like bugs
<whitequark>
have you asked on #jruby?
<yorickpeterse>
The slowest factors seem to be *lots* of calls to Array#[] (for the table indices and such)
<yorickpeterse>
not yet
<whitequark>
headius likes to optimize this stuff :p
<yorickpeterse>
Profiling Ragel code is a PITA
<yorickpeterse>
I really want to keep this pure Ruby but a throughput of merely 1MB/sec is not really acceptable for me
<yorickpeterse>
since I actually have to parse 800MB XML files from time to time
<whitequark>
what the fuck are you doing that you need to parse over 1MB of XML per second
<whitequark>
idk 15 minutes is not that much
<yorickpeterse>
It is if you have to parse a few million documents a day
michaeldeol has joined #ruby-lang
<whitequark>
hmmm, I see
<whitequark>
lol, I don't envy you
<whitequark>
wait, did you say "800MB XML files"? not "800MB *of* XML files"?!
hahuang65 has joined #ruby-lang
hahuang61 has joined #ruby-lang
<yorickpeterse>
e.g. in our case we scrape somewhere around 40k profile pages a day, each requiring dozens of HTTP requests + parsing actions
<yorickpeterse>
The former
<whitequark>
fuck
<yorickpeterse>
e.g. we have some XML dumps we need to parse from time to time that are massive
<yorickpeterse>
basically entire DB dumps in XML
<whitequark>
I like how you called them "massive dumps"
michaeldeol has quit [Read error: Connection reset by peer]
<yorickpeterse>
big data
michaeldeol has joined #ruby-lang
ikrima has quit [Ping timeout: 255 seconds]
<yorickpeterse>
But yeah, so MRI 2.1 on its own has a throughput of about 10MB/sec in the most basic example I can make
<yorickpeterse>
basically iterates over every byte and calls String#getbyte
<yorickpeterse>
That in itself is not bad but not really fast either
<yorickpeterse>
Nokogiri can parse that 10MB into a DOM document in ~300 ms
<yorickpeterse>
Rubby not webscale :<
<whitequark>
try to make the C lexer have the same interface as the Ruby lexer
<whitequark>
then you'd have a much easier time debugging it
<whitequark>
or supporting other platforms, in general
<whitequark>
I mean, racc is done like that
<yorickpeterse>
I was going to try and make a very, very minimal C-ext lexer
<yorickpeterse>
That would call back to Ruby as much as possible but have the loop in C
<yorickpeterse>
I however really don't like the idea of having to maintain a Ruby + C + Java codebase
<yorickpeterse>
On my way to the office I was actually considering writing something that would generate said C and Java code for me
<yorickpeterse>
if basically all it does is call some C/Java API functions it's not too hard to do that
<yorickpeterse>
I also tried moving some small bits over to pure C + FFI but that was waaaay slower
michaeldeol has quit [Ping timeout: 265 seconds]
<yorickpeterse>
something something would be easier if JRuby still had a C-ext API
<yxhuvud>
it is strange you get so bad performance - I stream through several hundred megabytes a second when parsing logs (even on systems still using 1.8). The main issue there is avoiding reading the whole file at once as the memory use explosion is so costly.
<yxhuvud>
I manage to avoid reading char by char though
workmad3 has joined #ruby-lang
<yorickpeterse>
I opted for an approach that prevents OOM killing but has the trade-of of being slower CPU time wise
<yorickpeterse>
That is, reading stuff byte by byte
<yorickpeterse>
actually, that was faster too than just operating on strings
<yorickpeterse>
Pretty sure there's also quite some overhead in String#getbyte but I'm not sure how to optimize that
<yorickpeterse>
There's nothing there that states "this is always webscale and never a bottleneck"
<whitequark>
there's no "overhead" in String#getbyte that can be fixed, short of inlining it into your loop
<whitequark>
and inlining it into your loop is something that must be done, but MRI will probably not ever be able to
<yorickpeterse>
Given MRI were to store strings as byte arrays the access would be O(n)
<yorickpeterse>
since it would be a direct Array index without the need of converting crap in C
<yorickpeterse>
but alas
<whitequark>
open your fucking eyes
<whitequark>
it is O(1)
<whitequark>
line 4145.
<whitequark>
all of the other things... checks for range, checks for embedding, conversion to/from Fixnum, are constant-time
<whitequark>
and quite cheap if you bother to take out `perf' and look at how the CPU executes it
<whitequark>
did you read the code at all?
<yorickpeterse>
reading?
<yxhuvud>
yorickpeterse: have you measured different sizes and verified that your lexing is O(n)? If is is greater than that, I'd assume you or ragel are doing something it shouldn't.
<yorickpeterse>
yxhuvud: pretty sure the lexer itself is anything but O(n)
<yorickpeterse>
also, taking out String#getbyte saves about ~1-1,3 seconds in the lexing process, but of course now everything breaks
<yorickpeterse>
So there's some overhead, but not as extreme
Fushi has joined #ruby-lang
GaelanAintAround has quit [Ping timeout: 240 seconds]
<whitequark>
you keep using the word "overhead", I don't think it means what you think it means
<yorickpeterse>
yxhuvud: basically what I did is remove all my custom Ragel machines and what not so that the only rule was a no-op: `any => {}`
<yorickpeterse>
So basically it just iterates over each byte, that's it
<whitequark>
it's not possible to implement String#getbyte faster given the constraints of MRI VM
<yorickpeterse>
That takes ~5 seconds
GaelanAintAround has joined #ruby-lang
<yorickpeterse>
Ragel does a crapton of Array lookups as well, but I don't think those can be made faster
<yorickpeterse>
e.g. using a Hash instead is actually slower
<yorickpeterse>
Set is not possible since the values are not unique
<whitequark>
Set uses a Hash internally.
<whitequark>
Array#[] is as fast as String#getbyte, nothing you can do there
<whitequark>
you can hoist the const/ivar accesses out of the loop to make them lvars, look if that helps
<whitequark>
I did it for parser
<whitequark>
a huge holiday here
<whitequark>
errr, wrong channel
<yorickpeterse>
Not sure if there would be a huge diff between lvars and ivars
matp has quit [Quit: ZZZzzz…]
<whitequark>
ivars are in general hash access, lvars are array access
<yorickpeterse>
I did some moving around with values from/to constants and what not, but it only made things slower
<whitequark>
except if you only have 3/7 ivars, then it's optimized to linear search, but lvars are still faster
<whitequark>
I suggest you check it
ColdBlooder has quit [Read error: Connection reset by peer]
ColdBlooder has joined #ruby-lang
<apeiros>
it's quite a shame ruby does literal ivars as hash access
<apeiros>
s/ access//
<whitequark>
yeah, could at least detect non-iv_set accesses and put them into an array
<apeiros>
highline still state of the art?
* apeiros
feels like reinventing wheels - but it's yet another yak…
rwk1 has quit [Remote host closed the connection]
szarubin has joined #ruby-lang
zarubin has quit [Ping timeout: 252 seconds]
ssb123 has joined #ruby-lang
apeiros has quit []
woollyams has joined #ruby-lang
apeiros has joined #ruby-lang
ssb123 has quit [Ping timeout: 246 seconds]
face has quit [Read error: Connection reset by peer]
zarubin has joined #ruby-lang
face has joined #ruby-lang
psycho_one has joined #ruby-lang
michaeldeol has joined #ruby-lang
relix has quit [Ping timeout: 245 seconds]
mehlah has joined #ruby-lang
nofxx has quit [Ping timeout: 245 seconds]
szarubin has quit [Ping timeout: 256 seconds]
pskosinski_ is now known as pskosinski
psycho_one has quit [Ping timeout: 265 seconds]
michaeldeol has quit [Ping timeout: 240 seconds]
relix has joined #ruby-lang
michd is now known as MichD
arBmind has joined #ruby-lang
<yorickpeterse>
whitequark: going from ivars -> lvars saves about 2 seconds on a 10MB input
<whitequark>
nice, isn't it?
<whitequark>
so, 20% speedup
<yorickpeterse>
The actual data var is still an ivar but I can't really work around that
<whitequark>
why?
psycho_one has joined #ruby-lang
<whitequark>
data = @data
<whitequark>
this will save time when ragel will access it repeatedly
<yorickpeterse>
hmm
<apeiros>
ugh, IO#raw broken? the example from the docs seems to block indefinitely (STDIN.raw(&:gets))
<whitequark>
no flushing perhaps?
<yxhuvud>
whitequark: assuming it never go out of scope in all uses of it.
<whitequark>
^D
<whitequark>
yxhuvud: uh, what?
<apeiros>
whitequark: doesn't help either. neither ^C
<yxhuvud>
wq: nm
<whitequark>
apeiros: odd
<whitequark>
strace it
<apeiros>
:-/
<apeiros>
how do I go about that?
* apeiros
utterly ignorant of strace
<whitequark>
um, strace script.rb ?
nofxxx has quit [Remote host closed the connection]
<apeiros>
ok. got to see how to install strace first then. seems it doesn't come with osx
ironhide_604 has quit [Quit: ironhide_604]
ironhide_604 has joined #ruby-lang
<apeiros>
dtruss seems to be the thing to use
<whitequark>
ohhh, os x. yes. no clue then
<apeiros>
egh
<apeiros>
fuck that. I use readline for the moment.
<apeiros>
that's one yak too many.
matp has joined #ruby-lang
<yorickpeterse>
Hm, using an lvar for the data variable vs an ivar seems to only make a small difference
psycho_o_ has joined #ruby-lang
franzip has joined #ruby-lang
kyb3r_ has quit [Read error: Connection reset by peer]
psycho_one has quit [Ping timeout: 276 seconds]
woollyams has quit [Ping timeout: 252 seconds]
rwk1 has joined #ruby-lang
mindriot101 has joined #ruby-lang
mindriot101 has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
mindriot101 has joined #ruby-lang
zenojis has quit [Read error: Connection reset by peer]
mindriot101 has quit [Client Quit]
mindriot101 has joined #ruby-lang
allomov has quit [Read error: Connection reset by peer]
mindriot101 has left #ruby-lang [#ruby-lang]
tomkadwill has quit [Remote host closed the connection]
rwk1 has quit [Ping timeout: 255 seconds]
cnivolle has joined #ruby-lang
zenojis has joined #ruby-lang
mehlah has quit [Read error: Connection reset by peer]
mehlah_ has joined #ruby-lang
cnivolle_ has quit [Ping timeout: 246 seconds]
allomov has joined #ruby-lang
MartynKeigher has joined #ruby-lang
stamina has joined #ruby-lang
ssb123 has joined #ruby-lang
ecnalyr has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
rwk1 has joined #ruby-lang
ssb123 has quit [Ping timeout: 240 seconds]
michaeldeol has joined #ruby-lang
yfeldblum has joined #ruby-lang
sepp2k has joined #ruby-lang
michaeldeol has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 265 seconds]
cored has joined #ruby-lang
cored has joined #ruby-lang
kitak has quit [Remote host closed the connection]
sarkyniin has joined #ruby-lang
nazty has quit [Quit: WeeChat 0.3.7]
silverfox has joined #ruby-lang
workmad3 is now known as wm3|lunch
symm- has quit [Ping timeout: 246 seconds]
cnivolle has quit [Remote host closed the connection]
cnivolle has joined #ruby-lang
TvL2386 has joined #ruby-lang
kitak has joined #ruby-lang
rwk1 has quit [Remote host closed the connection]
ssb123 has joined #ruby-lang
mindriot101 has joined #ruby-lang
dsp___ has joined #ruby-lang
tomkadwill has joined #ruby-lang
mindriot101 has quit [Ping timeout: 240 seconds]
robmiller has quit [Quit: Leaving.]
ssb123 has quit [Ping timeout: 245 seconds]
silverfox has quit [Remote host closed the connection]
dsp___ has quit [Ping timeout: 240 seconds]
silverfox has joined #ruby-lang
crankharder has quit [Ping timeout: 255 seconds]
thmzlt has joined #ruby-lang
michaeldeol has joined #ruby-lang
c_s_g has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rwk1 has joined #ruby-lang
simono has joined #ruby-lang
michaeldeol has quit [Ping timeout: 246 seconds]
amerine has quit [Ping timeout: 276 seconds]
mindriot101 has joined #ruby-lang
<apeiros>
ljarvis: where is the `:as` option for `on` documented? how can I do a boolean flag?
mindriot_ has joined #ruby-lang
<apeiros>
hm, odd… the docs imply String is the default, but the readme makes it look as it it was boolean by default. I'll try it out.
<whitequark>
yorickpeterse: that's because you so far don't have a full lexer
<whitequark>
when you will have one, there'll be much more accesses
mindriot101 has quit [Ping timeout: 276 seconds]
jsrn has quit [Ping timeout: 252 seconds]
amerine has joined #ruby-lang
TvL2386 has quit [Ping timeout: 245 seconds]
silverfox has quit []
postmodern has quit [Quit: Leaving]
<yorickpeterse>
"a full lexer"?
<yorickpeterse>
The lexer is full in that it's complete, it lexes all of XML minus inline doctypes (because I haven't gotten to that yet)
faces has joined #ruby-lang
robmiller has joined #ruby-lang
face has quit [Ping timeout: 255 seconds]
momomomomo has joined #ruby-lang
<whitequark>
oh, I thought you referred to the {}=>any
TvL2386 has joined #ruby-lang
<yorickpeterse>
Oh no, I didn't bench that with locals
<yorickpeterse>
I benched the actual lexer
woollyams has joined #ruby-lang
<yorickpeterse>
Fucking Travis
<yorickpeterse>
Builds erroring because Gemsets and/or commands are not found
retro|cz has quit [Ping timeout: 240 seconds]
tkuchiki_ has joined #ruby-lang
dorei has joined #ruby-lang
jsrn has joined #ruby-lang
tkuchiki has quit [Ping timeout: 265 seconds]
tkuchiki_ has quit [Ping timeout: 276 seconds]
relix has quit [Read error: Connection reset by peer]
<tototiti>
ERROR: While executing gem ... (NameError)
<workmad3>
tototiti: at a guess, you managed to install your ruby without zlib support (which is required for rubygems to work)
<workmad3>
tototiti: guess you missed that when you got moved to a guest accont
<tototiti>
aw yes thanks
adphillips has quit []
Guest74424 has quit [Ping timeout: 246 seconds]
<tototiti>
I'm not sure of what you are meaning (I'm french) but I have already try to install and reinstall zlib
loincloth has joined #ruby-lang
<workmad3>
tototiti: I mean the zlib ruby standard libarary extension that's built when ruby is installed (and also needs the zlib-dev package in order to be compiled)
elia has joined #ruby-lang
ecnalyr has quit [Ping timeout: 246 seconds]
<imperator>
i'm guessing some linux distro nonsense
<imperator>
tototiti, what platform?
<tototiti>
debian
<tototiti>
last version i don't remember if it's wheezy or squeezy
<workmad3>
tototiti: how did you install ruby?
danguita has quit [Remote host closed the connection]
<tototiti>
after installing zlib, i runned rvm reinstall all --force
d4rkr4i has joined #ruby-lang
<workmad3>
tototiti: ok... so do 'apt-get install zlib-dev' and then redo your reinstall
danguita has joined #ruby-lang
<workmad3>
although I'd have expected rvm to also install dependencies via apt, unless you turned that off??
<tototiti>
no i have zlib on my computer in lib i can find it
sdouglas has quit [Remote host closed the connection]
<workmad3>
tototiti: zlib lib != zlib-dev (which installs the dev headers)
<tototiti>
ah ok
<workmad3>
tototiti: you need zlib-dev because ruby compiles its own extension using the headers
momomomomo has quit [Quit: momomomomo]
<tototiti>
apt-get install zlib-dev said me that it is unable to locate package
<workmad3>
hmm... I might have gotten the package name wrong... but that's basically what you need to do
<workmad3>
it's been a while since I had to do that manually :)
ascarter has joined #ruby-lang
<tototiti>
ok i'll search
djbkd has joined #ruby-lang
<tototiti>
apparently the package name is zlib1g-dev but it is already install
<workmad3>
hmm... maybe ask in #rvm then
pixelhandler has quit [Quit: pixelhandler]
<workmad3>
it seems like an issue on the rvm side, and #rvm contains people better suited to sorting out rvm config issues :)
<tototiti>
okay, thanks a lot :)
<tototiti>
and sorry for my english wich is not very good
robbyoconnor has quit [Excess Flood]
tototiti has left #ruby-lang [#ruby-lang]
robbyoconnor has joined #ruby-lang
<imperator>
it's ok, it's good enough :)
centrx has quit [Quit: All this computer hacking is making me thirsty]
yfeldblum has joined #ruby-lang
sdouglas has joined #ruby-lang
bearlulz has joined #ruby-lang
zastern has quit [Quit: WeeChat 0.4.2]
zastern has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 245 seconds]
miwood has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
cnivolle has quit [Remote host closed the connection]
Speed has joined #ruby-lang
dm78 has quit [Remote host closed the connection]
si1verfox has joined #ruby-lang
sdouglas has quit [Remote host closed the connection]
sdouglas has joined #ruby-lang
bantic has joined #ruby-lang
tomkadwill has quit [Remote host closed the connection]
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
sdouglas has quit [Ping timeout: 245 seconds]
bruno- has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
matp has quit [Remote host closed the connection]
elia has quit [Quit: Computer has gone to sleep.]
JohnHirbour has joined #ruby-lang
mykoweb_ has joined #ruby-lang
mykoweb has quit [Read error: No route to host]
mykoweb_ has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
touzine has quit [Ping timeout: 240 seconds]
dogurness has quit [Ping timeout: 276 seconds]
bruno- has joined #ruby-lang
mykoweb has quit [Ping timeout: 240 seconds]
shinnya has joined #ruby-lang
marcdel has joined #ruby-lang
marcdel has quit [Max SendQ exceeded]
marcdel has joined #ruby-lang
bruno- has quit [Ping timeout: 255 seconds]
momomomomo has joined #ruby-lang
bruno- has joined #ruby-lang
Cakey has joined #ruby-lang
rwk1 has joined #ruby-lang
bruno- has quit [Ping timeout: 265 seconds]
tomkadwill has joined #ruby-lang
Cakey has quit [Ping timeout: 252 seconds]
bruno- has joined #ruby-lang
sepp2k1 has joined #ruby-lang
sepp2k has quit [Ping timeout: 252 seconds]
tomkadwill has quit [Read error: Connection reset by peer]
tomkadwi_ has joined #ruby-lang
bruno- has quit [Ping timeout: 276 seconds]
davispuh has joined #ruby-lang
havenn has quit [Remote host closed the connection]
kith has quit [Quit: kith]
kith has joined #ruby-lang
rwk1 has quit [Ping timeout: 245 seconds]
bruno- has joined #ruby-lang
<apeiros>
hm, not sure slop is a good fit for my needs :-/
<yorickpeterse>
gnuplot gnuplot gnuplot gnuplot
<yorickpeterse>
and some ruby
elia has joined #ruby-lang
Fushi has quit [Quit: Connection closed for inactivity]
bruno- has quit [Ping timeout: 240 seconds]
dm78 has joined #ruby-lang
Squarepy has joined #ruby-lang
alexju has quit [Remote host closed the connection]
cnivolle has joined #ruby-lang
alexju has joined #ruby-lang
bruno- has joined #ruby-lang
matp has joined #ruby-lang
ItSANgo_ has quit [Quit: Leaving...]
bruno- has quit [Ping timeout: 255 seconds]
havenwood has joined #ruby-lang
relix_ has joined #ruby-lang
relix_ has quit [Max SendQ exceeded]
<apeiros>
ljarvis: ping
enkristoffer has quit [Quit: ❤]
relix_ has joined #ruby-lang
adphillips has joined #ruby-lang
relix has quit [Ping timeout: 255 seconds]
relix_ has quit [Read error: Connection reset by peer]
relix has joined #ruby-lang
sarkyniin has quit [Quit: Quitte]
bruno- has joined #ruby-lang
ItSANgo has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
marcdel has quit []
loincloth has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 255 seconds]
loincloth has joined #ruby-lang
ssb123 has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
momomomomo has quit [Quit: momomomomo]
crankharder has joined #ruby-lang
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ddv has quit [Changing host]
ddv has joined #ruby-lang
tentimes has joined #ruby-lang
<tentimes>
Could someone have a look at this gist please and tell me why the method build isn't '@domain.build(@params)' - I thought instance variables needed an @? https://gist.github.com/kevinmccaughey
Thorax` has joined #ruby-lang
bruno- has joined #ruby-lang
Thorax` has quit [Read error: Connection reset by peer]