5 ms·
Ragel State Machine Compiler
- drallison 16y agoRuby but no Python. :-(
- thurston 16y agoA few people have stopped by the mailing list wondering how much work it would be to add a python generator. You could send a few motivating words in their direction to increase the chances of it being worked on.
- davidhollander 16y agoThis seems to have a copy of the HTTP1.1 ragel parser C from Mongrel https://github.com/fauna/mongrel/tree/master/ext/http11 https://github.com/fauna/mongrel/tree/master/ext/http11 Would be interesting to see how its performance compares to Ry's HTTP parser from the Node.js library: https://github.com/ry/http-parser https://github.com/ry/http-parser
- sambeau 16y agoIt's super-fast.
- davidhollander 16y agoThat's not a comparison and your pronoun's reference is ambiguous.
- Tangurena 16y agoI'm 50 years old, and I get confused by "its" vs "it's" from time to time. So one of my bookmarked pages is: http://garyes.stormloader.com/its.html http://garyes.stormloader.com/its.html
- mdwrigh2 16y agoI don't think he was commenting on his usage of "its" vs. "it's" (which is actually correct), but rather that it's ambiguous which item "it" is referring to -- Ragel or Ry's.
- thurston 16y agoRy's is faster. Ragel does pretty good and it gets you most of the way there when you need something that runs really fast, but it can't beat what a skilled programmer can do to optimize a parser.
- haberman 16y ago> it can't beat what a skilled programmer can do to optimize a parser. What sorts of clever things does Ry's parser do that Ragel can't figure out?
- thurston 16y agoA sure-fire way to beat a Ragel parser is to look ahead several characters and test the limited possibilities that are present when a language has literal strings like GET and POST. You can essentially fall back to extremely fast string searching algorithms in certain places. Ragel assumes character-by-character parsing and it's difficult to generate fast code that looks ahead without running into buffer block boundaries. It could be done though. You can also use character classes to reduce the number of tests. Ragel doesn't try to figure those out.
- supersillyus 16y agoI think a Go backend was added a while ago, but since there hasn't been a release in 2009, it isn't part of the official release yet.
- thurston 16y agoThat's right. That patch is waiting to go out. Unfortunately I didn't get a release out in 2010. By spring I'm hoping to have one. It got stalled because I was trying to include a revamp of conditions and I got hung up wrestling with the complexity of that problem. I now know what I'm dealing with and my plan is to push out a 6.7 with all the submitted patches, then later on do 7.0 with the new condition stuff. It's gonna be awesome :) I've also been distracted by another project, which is also going to be awesome :)
- supersillyus 16y agoAwesome. Thanks for the update, and nice work.
- burke 16y agoThere seems to be a JavaScript target available too: https://github.com/dominicmarks/ragel-js https://github.com/dominicmarks/ragel-js
- thurston 16y agoThat's not in the trunk yet ... it is queued. There is also C#. It's been in testing for a while and there are a few known bugs. Should get worked out in the next release.