Skip to content

Comment on Spinel: Ruby AOT Native Compiler

Comments

I will eat the downvotes to say what I actually think.

Unless this gets back eval, metaprogramming and threads this isn't all that interesting as an actual language. There are plenty of compiled languages out there. Metaprogramming is what makes Ruby interesting and expressive.

I know that this is just an experiment, but I've seen plenty of cases where stuff exactly like this gets forced into use in production because someone established in the company thinks some new experimental tool is "cool" and "the future".

---

Also, I would like to direct people to take a look at Factor programming language that both compiles into fairly efficient binaries and has amazing metaprogramming features inspired by Lisp and Smalltalk. It doesn't have real threads either, though, which is extremely unfortunate.

https://factorcode.org/

Spinel would be more interesting if this compiled subset could run side by side with interpreted Ruby, like Pallene does for (slightly modified) Lua.

One of cool things about Factor (and part of why I brought it up) is that it basically does something similar out of the box. There is a full-featured optimizing compiler and a simpler, faster non-optimizing compiler for eval-like functionality. They work seamlessly together in the interactive Factor environment:

https://docs.factorcode.org/content/article-compiler.html

Right now the cost of c interop in ruby is too high. It's actually more perfomant in the general case to rewrite any c lib wrappers in pure ruby these days and let jit do the work

I've never even heard of Factor. thanks for sharing.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.