Show HN: A JavaScript interpreter written in Ruby
github.com
github.com
I believe this is only the case on Linux, but I've found that it gives my coworkers who are trying out rails for the first time quite a bit of confusion. (For that matter, it would help if execjs appended #readme in its error message instead of just to the github page, since the same coworkers were also unfamiliar with github, and didn't realize they had to look below the fold for the list of runtimes.)
https://github.com/charliesome/twostroke/blob/master/lib/two...
That is, a parser which is essentially coded by hand, with all token checking, saving and restoring parser's state, functions corresponding to non-terminating symbols of grammar etc.
Are there no good parsing libraries in Ruby (similar to Python's pyparsing or Haskell's Parsec), and could this have forced the author to code his parser from scratch?
It's also a fun project that has taught me a lot about parsers, language implementations and JavaScript's object model.
Should be pretty interesting to see Twostroke running on HotRuby running on Twostroke running on HotRuby running...