Hacker News new | past | comments | ask | show | jobs | submit login

My Ruby compiler project has unfortunately been languishing for years due to lack of time. I keep hoping to do some more on it as I got it to the point where it was self-compiling, but it's not very high on my list at the moment (my list is long)

That said, lrama is "just" the parser generator, is it not? As far as I understand, the Prism parser built using Lrama still produces a C library, and requires Ruby's parse.y as input, and parse.y alone is twice the size of my entire compiler...

Both Lrama and Prism are great projects, and I might've be tempted if that was a "missing piece" to turn the compiler into something production-ready, but frankly updating the parser to handle more modern syntax is the easiest bit of what remains. The really big pieces are supporting Regex's and floats (Ruby's regexp implementation is roughly the size of my entire current compiler...), and a bunch of bug fixing. Whether I'll ever find time to get it there or not, we'll see.




Interesting. I see! MRuby (Compilable Ruby for embedded systems etc) and Webasm Ruby might be fun areas for further projects :)


Yeah, I've toyed with Mruby, and it's great. Same w/webasm support for Ruby. I think overall the huge improvements in the Ruby ecosystem kinda drove my own down the priority list - it was mostly educational to start with, but the better the various other Ruby implementations got the less of an incentive I got to try to turn it into anything more than that (and doing so would be a massive undertaking). Hitting the "self-compiling" milestone felt like it was a decent place to pause it, but I'd still love to find time to take it a few steps further. At least fixing the most egregious bugs (the compiler itself has various temporary workarounds for bugs to allow it to compile itself without triggering them, and I'm not happy about leaving it in a state where I can't at least strip those workarounds out).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: