5 ms·
What's the goal of the project? It's not clear from the Github repo or the site (natalie-lang.org).
by egonschiele 3y ago
What's the goal of the project? It's not clear from the Github repo or the site (natalie-lang.org).
- mk89 3y agoI think: > It provides an ahead-of-time compiler using C++ and gcc/clang as the backend Which is kind of the new "in" lately. EDIT: If you see the the animation in the GitHub repo, you'll see at a certain point a file named "bs" (which is a binary file). I guess the standard Ruby compiler doesn't allow you to spit out binaries out of the box (?).
- ricardobeat 3y ago> I guess the standard Ruby compiler doesn't allow you to spit out binaries Ruby is an interpreted language, programs are not compiled (except for the JIT compiler). I wonder what makes this different from mruby[1] which seems to be very well supported for many years. [1] https://mruby.org/ https://mruby.org/
- runeblaze 3y agomruby is making ruby more lua-like (embeddable, etc.). If this project does AOT compilation well, we might be able to shave lots of interpreter overhead from Ruby for some applications. I say some applications because there are still people using Ruby to write non-web things, and I doubt if this project will ever support Rails in the short term
- timmorgan 3y agoYeah, Rails would be a long ways off, if it ever happens at all. But I could see a use for a compiled Sinatra app, and that seems attainable in my lifetime. :-)
- deaddodo 3y agoIf we're being honest, the only thing that differentiates an interpreted and compiled language is intention (design decisions that make one implementation versus the other easier) and what you choose to run the language through. You can make almost any general purpose language "compiled", depending on how fat you're willing to make the runtime. And you can certainly create an interpreter/JIT VM for C/C++. It's not a question of possibility, but one of "why?".
- deleted 3y ago[deleted]
- egonschiele 3y agoCool, that was my read as well. Just making sure I wasn't missing something!
- e12e 3y agoStill think that crystal might be more interesting in a similar niche? https://crystal-lang.org/ https://crystal-lang.org/
- dragonwriter 3y agoNo, a compiler for Ruby is more interesting than a compiler for a vaguely Ruby-like language with feature alterations specifically for ease of implementing compilation. Even if it only ends up compiling a subset of Ruby, it could be a foundation for a Ruby equivalent of one of the several tools for accelerating Python by compiling a subset and allowing it to interface with regular interpreted code.