2 ms·
> a very good subset of Ruby could be implemented with a similar-sized code base than Lua That would have to be quite the subset. The Ruby parser alone is alm
by ModernMech 8y ago
> a very good subset of Ruby could be implemented with a similar-sized code base than Lua
That would have to be quite the subset. The Ruby parser alone is almost 12kLOC. I've implemented entire languages in 1/10th that.
https://github.com/ruby/ruby/blob/trunk/parse.y https://github.com/ruby/ruby/blob/trunk/parse.y
- roi 8y agomruby (http://mruby.org/ http://mruby.org/, https://github.com/mruby/mruby https://github.com/mruby/mruby) is the official attempt to do just that. Depending on what you count it's around 30-60kLOC. It has a standalone bytecode compiler, so the parser (which is "only" 6kLOC) doesn't have to be a part of the runtime.