Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
freqn has joined #ruby-lang
<ypz>
yes, Process.kill works in other situations, killing a single process with various signals, tried INT, HUP, USR1 and TERM, I only see this error when trying to kill a process group by giving it a negative pid number
arBmind has quit [Quit: Leaving.]
<ypz>
also tried Process.kill("-TERM", pid), gave seem error
nathanstitt has quit [Read error: Connection reset by peer]
nathanstitt has joined #ruby-lang
khaase_ has quit [Remote host closed the connection]
<centrx>
ypz, Does it work if you use the kill command in the shell in OS X?
<centrx>
ypz, With those parameters?
khaase has joined #ruby-lang
<centrx>
ypz, And it sounds like it works with this exact same code if the pid is not negative?
<centrx>
ypz, How can you kill a process with TERM when you are trapping the TERM signal?
<centrx>
ypz, That's probably the cause. kill->trap->kill->trap->kill->trap
<centrx>
ypz, It's a wonder it works in Red Hat
khaase has quit [Ping timeout: 240 seconds]
<ypz>
centrx, i was sending term sig from another shell window,
<centrx>
So?
<centrx>
that's trapped too
|jemc| has joined #ruby-lang
<ypz>
centrx, it works on red hat, killing child as well as parent,
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx>
ypz, Maybe, but it shouldn't work anywhere
<centrx>
ypz, Bad logic
<ypz>
centrx, on mac OSX, it gave me error; my coworker just tried with OSX 10.7.5 and ruby 1.9.3, also got the same error
atmosx has quit [Quit: Lost in trance]
<centrx>
What are you really trying to do with this code?
<ypz>
centrx, killing a process along all its children,
cored has quit [Ping timeout: 241 seconds]
vlad_starkov has joined #ruby-lang
<ypz>
centrx, in my actual code, there are threads spawning more children which I can't get their pid's directly
<centrx>
ypz, Have each spawned process keep track of and kill its own children?
<centrx>
Like a tree
cored has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
sdouglas has quit [Remote host closed the connection]
sdouglas has joined #ruby-lang
sdouglas has quit [Read error: Connection reset by peer]
<ypz>
centrx, no, there are third party libs involved here, so trying to see if this approach can cleanly kill all children
Hobogrammer has quit [Ping timeout: 246 seconds]
bin8me has joined #ruby-lang
sdouglas has joined #ruby-lang
dgaffney has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 240 seconds]
bin7me has quit [Ping timeout: 240 seconds]
alexju has quit [Remote host closed the connection]
<centrx>
ypz, So just do the group kill on the children from the process you control?
vlad_starkov has quit [Remote host closed the connection]
mikecmpbll has joined #ruby-lang
tectonic has quit []
robmiller has joined #ruby-lang
bahar has quit [Ping timeout: 240 seconds]
Mon_Ouie has joined #ruby-lang
bahar has joined #ruby-lang
workmad3 has joined #ruby-lang
whitecrow1 has joined #ruby-lang
whitecrow1 has quit [Changing host]
whitecrow1 has joined #ruby-lang
robmiller has quit [Quit: Leaving.]
Fushi has joined #ruby-lang
bahar has quit [Ping timeout: 240 seconds]
bahar has joined #ruby-lang
yfeldblu_ has quit [Ping timeout: 245 seconds]
devgiant has joined #ruby-lang
nathanstitt has joined #ruby-lang
robmiller has joined #ruby-lang
whitecrow1 has quit [Quit: Leaving]
benlovell has quit [Ping timeout: 240 seconds]
yubrew has joined #ruby-lang
bahar has quit [Ping timeout: 240 seconds]
bahar has joined #ruby-lang
freqn has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
caral has quit [Quit: caral]
yubrew has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby-lang
mistym has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 246 seconds]
nathanstitt has quit [Ping timeout: 246 seconds]
sepp2k has joined #ruby-lang
zenojis has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 265 seconds]
rindolf has joined #ruby-lang
<rindolf>
Hi all.
charliesome has joined #ruby-lang
<rindolf>
Ruby 2.x does not like this line: « puts @src.gsub(/[\x00-\x09\x0b-\x1f\x7f-\xff]/){'\\x%x'%$&.ord} » - it gives me «invalid multibyte escape: /[\x00-\x09\x0b-\x1f\x7f-\xff]/ (SyntaxError) » - why?
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arBmind has joined #ruby-lang
nathanstitt has quit [Ping timeout: 265 seconds]
relix has joined #ruby-lang
<Voker57>
rindolf: # encoding: utf-8
<Voker57>
nvm
alex-quiterio has joined #ruby-lang
Speed has joined #ruby-lang
alex-quiterio has left #ruby-lang [#ruby-lang]
rindolf was kicked from #ruby-lang by apeiros [if you cross-post, you're required to inform all channels that you are cross posting. this is only a warning-kick. you can rejoin.]
skade has quit [Quit: Computer has gone to sleep.]
d4rkr4i has quit [Ping timeout: 240 seconds]
d4rkr4i has joined #ruby-lang
eval-in has quit [Remote host closed the connection]
rindolf has joined #ruby-lang
eval-in has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
bahar has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby-lang
alexju has joined #ruby-lang
bahar has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
<rindolf>
Regarding my issue - the regex was missing a //n flag to make it binary. (Thanks to apeiros on #ruby).
shinnya has quit [Ping timeout: 252 seconds]
fijimunkii has joined #ruby-lang
yfeldblum has quit [Ping timeout: 240 seconds]
<yorickpeterse>
dayum, Ragel's Ruby code generation is from 2007
<yorickpeterse>
dat legacy cruft
<yorickpeterse>
better refactor it using ActiveSupport
bahar has quit [Ping timeout: 240 seconds]
bahar has joined #ruby-lang
mehlah has joined #ruby-lang
shinnya has joined #ruby-lang
anannie has quit [Remote host closed the connection]
Speed has quit [Ping timeout: 265 seconds]
anannie has joined #ruby-lang
anannie has quit [Changing host]
anannie has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 265 seconds]
alexju has quit [Remote host closed the connection]
robbyoconnor has joined #ruby-lang
vsorlov has quit [Read error: Operation timed out]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<whitequark>
note that #chars will rapidly become less efficient if you need random access
<whitequark>
do you need it?
<yorickpeterse>
No, I don't need any form of lookaheads/lookbehinds
<whitequark>
ok
<whitequark>
another thing you can't do with #chars is suspending execution
<whitequark>
or rather, you can, but it creates overhead
<yorickpeterse>
true, not sure if I'll use String#chars though
<yorickpeterse>
first have to handroll a basic lexer to see what I need
<whitequark>
how much depends on implementation... I don't know. try to use it as an iterator.
<whitequark>
consider matching character classes with oniguruma
<whitequark>
that's not necessarily very fast, but definitely faster than doing it in pure ruby
nathanstitt has quit [Ping timeout: 240 seconds]
<whitequark>
unless maybe if you generate huge lookup tables
<yorickpeterse>
What I was thinking of was basically: consume input char by char into a buffer, if a buffer matches a pattern execute the corresponding action (shocking!)
sepp2k has quit [Quit: Leaving.]
<yorickpeterse>
I think I can get away with not having a proper state machine like Ragel
<yorickpeterse>
basically the moment I add any rule besides `any` it becomes *super* slow
<whitequark>
...
<whitequark>
compare it with your handwritten lexer, and do write some code in the loop body
<whitequark>
then we'll see
Karql has joined #ruby-lang
<yorickpeterse>
e.g. main := |* any; '<' => {}; *|; # => shit takes 10 seconds on this HTML file I'm testing
inkblots has quit [Ping timeout: 240 seconds]
<whitequark>
I mean, ragel beats zenspider's handwritten lexer by 4x or so
<yorickpeterse>
just iterating over the characters takes less than 500 ms
<yorickpeterse>
The biggest overhead seems to be in String#[] and Array#[] but I can't get rid of that without refactoring the Ruby output of Ragel
<whitequark>
this actually is a good use case for writing the tight loop in C and using it via FFI
<whitequark>
all you need to return is the kind of next token and its start/end indexes
<yorickpeterse>
I don't want any C to be involved
skade has joined #ruby-lang
<whitequark>
then you will be stuck within order of magnitude of ragel's perf
<whitequark>
do note that ragel would not significantly slow down with number of rules (or at least it should not), but a huge 'case' statement absolutely will
ItSANgo has quit [Quit: Leaving...]
<whitequark>
yorickpeterse: btw, have you tried str.chars.to_a ?
<yorickpeterse>
No not yet
<yorickpeterse>
lets see
<whitequark>
I tried that in Parser and it was slower for several reasons, but you have a different environment
sepp2k has joined #ruby-lang
ledestin has joined #ruby-lang
<yorickpeterse>
hm, seems about equal
havenwood has joined #ruby-lang
<whitequark>
now try random access
<whitequark>
this means you'll get convenience of ragel with speed of chars.each
<whitequark>
and memory use of UTF-32.
<yorickpeterse>
hm, not sure how I'd bench that easily
<whitequark>
10.times { |i| arr[i] }
jtperreault has quit [*.net *.split]
vadviktor has quit [*.net *.split]
Asher has quit [*.net *.split]
tdy has quit [*.net *.split]
gianlucadv has quit [*.net *.split]
Rubennn has quit [*.net *.split]
chancancode has quit [*.net *.split]
Willox_ has quit [*.net *.split]
konr_ has quit [*.net *.split]
aef has quit [*.net *.split]
FiXato has quit [*.net *.split]
zenspider has quit [*.net *.split]
Veejay has quit [*.net *.split]
flori has quit [*.net *.split]
go|dfish has quit [*.net *.split]
mihar has quit [*.net *.split]
nibbo__ has quit [*.net *.split]
drbrain has quit [*.net *.split]
`micro has quit [*.net *.split]
matti has quit [*.net *.split]
justinmcp has quit [*.net *.split]
Kero has quit [*.net *.split]
tap11 has quit [*.net *.split]
brixen has quit [*.net *.split]
rue__ has quit [*.net *.split]
wmoxam has quit [*.net *.split]
mahlon has quit [*.net *.split]
djinni` has quit [*.net *.split]
csaunders has quit [*.net *.split]
sindork has quit [*.net *.split]
wnd has quit [*.net *.split]
hagabaka has quit [*.net *.split]
paul_k has quit [*.net *.split]
error404 has quit [*.net *.split]
yugui_zzz has quit [*.net *.split]
xybre has quit [*.net *.split]
Kuukunen has quit [*.net *.split]
headius has quit [*.net *.split]
coffeejunk has quit [*.net *.split]
kro_ has quit [*.net *.split]
rnea has quit [*.net *.split]
neurodamage has quit [*.net *.split]
igalic has quit [*.net *.split]
drasch has quit [*.net *.split]
jtoy has quit [*.net *.split]
Kabaka_ has quit [*.net *.split]
ged has quit [*.net *.split]
ericwood has quit [*.net *.split]
Silex has quit [*.net *.split]
bnagy has quit [*.net *.split]
yeltzooo has quit [*.net *.split]
rtl has quit [*.net *.split]
jarib has quit [*.net *.split]
cout has quit [*.net *.split]
tommylommykins has quit [*.net *.split]
nibbo_ has joined #ruby-lang
flori has joined #ruby-lang
igalic has joined #ruby-lang
igalic has joined #ruby-lang
tommylommykins has joined #ruby-lang
neurodamage has joined #ruby-lang
cout_ has joined #ruby-lang
bnagy has joined #ruby-lang
kro_ has joined #ruby-lang
matti has joined #ruby-lang
matti has joined #ruby-lang
matti has quit [Changing host]
Kero has joined #ruby-lang
drasch has joined #ruby-lang
ericwood has joined #ruby-lang
wnd has joined #ruby-lang
rtl has joined #ruby-lang
wmoxam has joined #ruby-lang
headius has joined #ruby-lang
xybre has joined #ruby-lang
Rubennn has joined #ruby-lang
jarib has joined #ruby-lang
jarib has quit [Changing host]
jarib has joined #ruby-lang
coffeejunk has joined #ruby-lang
zenspider has joined #ruby-lang
FiXato has joined #ruby-lang
rnea has joined #ruby-lang
chancancode has joined #ruby-lang
jtoy has joined #ruby-lang
tdy has joined #ruby-lang
jtperreault has joined #ruby-lang
gianlucadv has joined #ruby-lang
paul_k has joined #ruby-lang
drbrain has joined #ruby-lang
chancancode has joined #ruby-lang
chancancode has quit [Changing host]
yeltzooo has joined #ruby-lang
Willox_ has joined #ruby-lang
go|dfish has joined #ruby-lang
ged has joined #ruby-lang
djinni` has joined #ruby-lang
`micro has joined #ruby-lang
mihar has joined #ruby-lang
csaunders has joined #ruby-lang
konr_ has joined #ruby-lang
havenwood has quit [Ping timeout: 246 seconds]
justinmcp has joined #ruby-lang
`micro is now known as Guest59115
hagabaka has joined #ruby-lang
vadviktor has joined #ruby-lang
Veejay has joined #ruby-lang
Silex^^ has joined #ruby-lang
aef has joined #ruby-lang
sindork has joined #ruby-lang
mahlon has joined #ruby-lang
ItSANgo has joined #ruby-lang
ItSANgo_ has joined #ruby-lang
brixen has joined #ruby-lang
Kabaka_ has joined #ruby-lang
ItSANgo_ has quit [Client Quit]
yugui_zzz has joined #ruby-lang
<yorickpeterse>
I'll spend some time handrolling one, see how it performs
<yorickpeterse>
Perhaps if I absolutely have to I'll some the lexer loop in C but I'd rather not have to resort to that
eam_ has joined #ruby-lang
Kuukunen has joined #ruby-lang
snk_ has joined #ruby-lang
rue|w has quit [Disconnected by services]
rue|w_ has joined #ruby-lang
jxpx777 has quit [Quit: Leaving...]
rue|w has joined #ruby-lang
yfeldblum has joined #ruby-lang
kirin` has quit [Disconnected by services]
kirin` has joined #ruby-lang
yfeldblum has quit [Ping timeout: 265 seconds]
Squarepy has quit [Excess Flood]
eam has quit [Remote host closed the connection]
snk has quit [Remote host closed the connection]
dc5ala has quit [Excess Flood]
Squarepy has joined #ruby-lang
dc5ala has joined #ruby-lang
* whitequark
sighs
<whitequark>
clearly you have too much time on your hands
<yorickpeterse>
says the one who wrote a Ruby parser
khaase_ has quit [Remote host closed the connection]
<yorickpeterse>
tell me, how long did you spend digging around parse.y, translating documents, etc? :>
dc5ala has quit [Client Quit]
inkblots has joined #ruby-lang
khaase has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
<whitequark>
I didn't spent time translating documents, I hired a translator
<whitequark>
and I was referring to "handrolled lexer"
<yorickpeterse>
ah
<whitequark>
that is an exercise in futility
error404 has joined #ruby-lang
<whitequark>
btw, take a look at zenspider's work, he had something in that area
havenwood has joined #ruby-lang
<whitequark>
zenspider: got a link to your lexer generator? can't find it on your github
bzalasky has quit [Read error: Connection reset by peer]
elia has joined #ruby-lang
bzalasky has joined #ruby-lang
Barrin6 has joined #ruby-lang
rofel has quit [Quit: Leaving...]
elia has quit [Client Quit]
havenwood has joined #ruby-lang
specialblend has quit [Quit: specialblend]
havenwood has quit [Read error: Connection reset by peer]
havenwood has joined #ruby-lang
sdouglas has joined #ruby-lang
vsorlov has quit [Ping timeout: 240 seconds]
dynamism has joined #ruby-lang
sepp2k has quit [Read error: Operation timed out]
tbuehlmann has joined #ruby-lang
lsegal has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
d4rkr4i1 has quit [Ping timeout: 265 seconds]
havenn has joined #ruby-lang
havenwood has quit [Ping timeout: 240 seconds]
alexju has joined #ruby-lang
alexju has quit [Remote host closed the connection]
sepp2k has joined #ruby-lang
yfeldblum has joined #ruby-lang
nisstyre_ has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
yfeldblum has quit [Ping timeout: 240 seconds]
rippa has joined #ruby-lang
wallerdev has joined #ruby-lang
centrx has joined #ruby-lang
arBmind has joined #ruby-lang
havenn has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
alexju has joined #ruby-lang
alexju has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 246 seconds]
dik_dak has joined #ruby-lang
ruby-lang014 has joined #ruby-lang
achal has joined #ruby-lang
mehlah has joined #ruby-lang
<achal>
Hello everyone. I am just starting learning ruby and want to do a project on it. I don't have any ideas write now, so if anyone can point me to some incubating ruby projects to which I contribute and learn it side by side.
ruby-lang014 has quit [Ping timeout: 245 seconds]
<rindolf>
achal: hi.
<achal>
rindolf: hi
<centrx>
achal, You can look on Github, but in general you should do some learning yourself first.
bantic has quit [Quit: bantic]
<rindolf>
achal: there are some exercises here - http://perl-begin.org/exercises/ - the site is about Perl (and it's by me) but most of them are not Perl-specific.
tbuehlmann has quit [Read error: Connection reset by peer]
<achal>
centrx: I went through basic ruby tut. Now I just want to be practical and make good stuff.
<achal>
rindolf: I can do exercises, but if you can point me to a beg, intermediate project, I would really appreciate
<achal>
rindolf: checking out those projects.
prc has joined #ruby-lang
<achal>
I am familiar with github and idea of open source projects & contributions, https://github.com/Achal-Aggarwal , lately doing some php, c and java stuff
fezziwig has joined #ruby-lang
yubrew has joined #ruby-lang
<yorickpeterse>
whitequark: so Ragel 7 is going to be pretty different apparently
<yorickpeterse>
it will have an intermediate language (based on Colm) instead of the target language being directly embedded in the lexer
Scriptwriter has joined #ruby-lang
skade has joined #ruby-lang
Scriptwriter is now known as creede_
vlad_starkov has joined #ruby-lang
creede_ has quit [Client Quit]
yubrew has quit [Ping timeout: 265 seconds]
mistym has joined #ruby-lang
yann_ck has joined #ruby-lang
DEac- has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
DEac- has joined #ruby-lang
<yorickpeterse>
and fuck it, I'll do the bulk of Ragel in pure C
<yorickpeterse>
and see how fast it is when using FFI
<yorickpeterse>
headius: ping
eugmill has joined #ruby-lang
Jeticus has joined #ruby-lang
benlovell has joined #ruby-lang
CaptainJet has quit [Ping timeout: 265 seconds]
fezziwig_ has joined #ruby-lang
fezziwig_ has quit [Read error: Connection reset by peer]
fezziwig has quit [Ping timeout: 265 seconds]
yann_ck has quit [Ping timeout: 265 seconds]
fezziwig has joined #ruby-lang
bahar has quit [Ping timeout: 240 seconds]
bahar has joined #ruby-lang
benlovell has quit [Ping timeout: 240 seconds]
jsutt has joined #ruby-lang
benlovell has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
hanikazmi has joined #ruby-lang
hanikazmi_ has quit [Ping timeout: 265 seconds]
vlad_starkov has quit [Remote host closed the connection]
<yorickpeterse>
I might just write a pure Ruby lexer, depends on how painful doing it in C is
rindolf has quit [Quit: Leaving]
yubrew has joined #ruby-lang
yubrew has quit [Ping timeout: 240 seconds]
mehlah_ is now known as mehlah
fezziwig has quit [Remote host closed the connection]
fezziwig has joined #ruby-lang
tylersmith has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
relix has joined #ruby-lang
fezziwig has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby-lang
sdouglas has quit [Remote host closed the connection]
sdouglas has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 240 seconds]
sdouglas has quit [Ping timeout: 265 seconds]
mykoweb has quit [Remote host closed the connection]
enebo has quit [Quit: enebo]
benlovell has quit [Quit: leaving]
bantic has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby-lang
saarinen has joined #ruby-lang
wallerdev has quit [Client Quit]
wallerdev has joined #ruby-lang
saarinen has quit [Client Quit]
caral has joined #ruby-lang
jackhammer2022 has joined #ruby-lang
zenojis has quit [Ping timeout: 265 seconds]
fezziwig has joined #ruby-lang
anannie has joined #ruby-lang
bantic has quit [Quit: bantic]
_ht has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yubrew has joined #ruby-lang
yubrew has quit [Ping timeout: 240 seconds]
perry has quit [Read error: Connection reset by peer]
mbj has joined #ruby-lang
saarinen has joined #ruby-lang
jsutt has quit [Ping timeout: 252 seconds]
tectonic has joined #ruby-lang
caral has quit [Quit: caral]
bahar has quit [Ping timeout: 265 seconds]
saarinen has quit [Quit: saarinen]
bahar has joined #ruby-lang
phansch has quit [Quit: WeeChat 0.4.2]
dynamism has quit [Ping timeout: 252 seconds]
creede has quit [Ping timeout: 245 seconds]
creede has joined #ruby-lang
sdouglas has joined #ruby-lang
bahar has quit [Ping timeout: 252 seconds]
sdouglas has quit [Ping timeout: 265 seconds]
bahar has joined #ruby-lang
achal has quit [Quit: Connection closed for inactivity]
wallerdev has quit [Quit: wallerdev]
dc5ala has quit [Quit: Ex-Chat]
<zenspider>
I don't hate C, but I hate writing lexers in C.
<zenspider>
yorickpeterse: what language are you trying to lex?
anannie has quit [Ping timeout: 246 seconds]
amerine has quit [Quit: Computer has gone to sleep.]
wallerdev has joined #ruby-lang
sdouglas has joined #ruby-lang
jaimef has quit [Ping timeout: 246 seconds]
yubrew has joined #ruby-lang
jaimef has joined #ruby-lang
mistym has quit [Remote host closed the connection]
vpretzel has joined #ruby-lang
bahar has quit [Ping timeout: 240 seconds]
<yorickpeterse>
zenspider: XML/HTML
<yorickpeterse>
basically cooking up a pure Ruby alternative to Nokogiri.
<yorickpeterse>
Where "pure Ruby" will probably mean "Everything except the lexer is in Ruby"
bahar has joined #ruby-lang
yubrew has quit [Ping timeout: 240 seconds]
sdouglas has quit [Remote host closed the connection]
<yxhuvvd>
why not lexer? performance?
<yorickpeterse>
Ruby is slow as shit for indexing strings/arrays a lot
<yorickpeterse>
That is, 24K of HTML apparently takes 10 seconds to lex (6 with some patch for Ragel)
<yorickpeterse>
regardless of whether it actually does something, simply iterating takes forever when using Ragel
<yorickpeterse>
Currently looking to see if C would be worth the effort (with FFI bindings), otherwise I'll handroll it in Ruby
<zenspider>
yorickpeterse: those numbers don't sound right. have you profiled it?
<yorickpeterse>
yes
<yorickpeterse>
basically it shows String#[] and Array#[] being called *a lot* of times, though each call itself doesn't take very long. It's the sheer amount that makes it slow by the looks of it
<yorickpeterse>
also MRI's profiler lies to me
<yxhuvvd>
do you have the code somewhere? it sounds amazingly bad.
<yorickpeterse>
it tells me a non existing method is super slow
<zenspider>
I gotta pack up and leave, but those numbers feel really suspect to me. I'm certainly doing MUCH better than that w/ ruby_parser using pure ruby lexing
<yorickpeterse>
The Ragel Ruby output is atrocious though
shinnya has joined #ruby-lang
<zenspider>
maybe take the time to port the lexer to oedipus_lex? could be an interesting experiment at the leaste
<zenspider>
least
<yorickpeterse>
basically in that above lexer, if the main machine (bottom) only has the rules `any; '<' => {};` (for example), it takes forever
<zenspider>
actually sped up ruby_parser by ~50-60%
<zenspider>
ok. going
<yorickpeterse>
I'll take a look, ta
mykoweb has joined #ruby-lang
<yxhuvvd>
yorick: not that it should matter 10 seconds much, but shouldn't HTML_VOID_ELEMENTS be a set?
vlad_starkov has joined #ruby-lang
<yorickpeterse>
On such a size Set vs Array isn't going to be very noticable
<yorickpeterse>
I also played around with changing the generated lexer to use Hash instead of Array all over the place, didn't make much of a difference either
Johz has joined #ruby-lang
Fushi has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 240 seconds]
<yxhuvvd>
another issue may be #text creating a range for each lookup. changing it to pure indexes may noticeable if it is called a lot which it may be.
<yorickpeterse>
The problem is that it's slow even when nothing is executed
<yorickpeterse>
That is, if it has two no-op actions it's super slow already
<yxhuvvd>
Are you doing fh.getc 24k times or something silly like that?
<yorickpeterse>
No, Ragel basically does loop { input_string[current_index] } a lot
<yorickpeterse>
something I can't work around without refactoring all of Ragel
<yorickpeterse>
(the Ruby output that is)
|jemc| has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
priodev has quit [Ping timeout: 265 seconds]
VTLob has quit [Quit: VTLob]
yubrew has joined #ruby-lang
robbyoconnor has joined #ruby-lang
priodev has joined #ruby-lang
workmad3 has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
yubrew has quit [Ping timeout: 268 seconds]
|jemc| has quit [Ping timeout: 246 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
Oloryn_lt2 has joined #ruby-lang
Oloryn_lt2 has quit [Client Quit]
prc has quit [Ping timeout: 265 seconds]
robbyoconnor has quit [Ping timeout: 240 seconds]
wallerdev has quit [Quit: wallerdev]
Hobogrammer has quit [Quit: WeeChat 0.4.3]
dorei has quit []
Talorc has joined #ruby-lang
robbyoconnor has joined #ruby-lang
arubin has joined #ruby-lang
<zenspider>
yorickpeterse: you're wrong on set vs array
<zenspider>
it was roughly 30~ of ... damnit... what was that html parser from _why?