At this point it's impossible to take antis seriously at all. Every claim is disproven simply by the passage of time. History will remember them just like the dot-com antis (that is, it won't)
Spinel: Ruby AOT Native Compiler
51–60 of 93 posts
Re: Spinel: Ruby AOT Native Compiler
#52If it wasn't built by Matz I'd have severe doubts, but it's clearly defined and I presume he knows all limitations of the Ruby semantics well. My thesis work (back when EcmaScript 5 was new) was an AOT JS compiler, it worked but there was limitations with regards to input data that made me abandon it after that since JS developers overall didn't seem to aware of how to restrict oneself properly (JSON.parse is inheren…
It seems like a compiler from Ruby to Objective C could support all the Ruby features while still being more performant than interpreted Ruby.
Re: Spinel: Ruby AOT Native Compiler
#53For some context, just presented by Matz at RubyKaigi 2026. It’s experimental but he built it with help from Claude in about a month. Successful live demo. It’s named after his new cat, which is named after a cat in Card Captor Sakura, which is the partner to another character named Ruby.
Re: Spinel: Ruby AOT Native Compiler
#54If it wasn't built by Matz I'd have severe doubts, but it's clearly defined and I presume he knows all limitations of the Ruby semantics well. My thesis work (back when EcmaScript 5 was new) was an AOT JS compiler, it worked but there was limitations with regards to input data that made me abandon it after that since JS developers overall didn't seem to aware of how to restrict oneself properly (JSON.parse is inheren…
> eval, send, method_missing, define_method , as a non-rubyist how common are these in real-world code This depends on the individual writing code. Some use it more than others. I can only give my use case. .send() I use a lot. I feel that it is simple to understand - you simply invoke a specific method here. Of course people can just use .method_name() instead (usually without the () in ruby), but sometimes you may…
Won’t work with actual class methods, but if you know ahead of time all the functions it will call are dynamic then it’s not a big deal.
Re: Spinel: Ruby AOT Native Compiler
#55I 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 becaus…
Re: Spinel: Ruby AOT Native Compiler
#56Earlier quoted context omitted.
Crystal is great and I think it nailed statically typing in a Ruby like language, but I've always been wary of day job use of the language because it doesn't have a significant user base.
This subset of Ruby doesn’t either.
Re: Spinel: Ruby AOT Native Compiler
#57While obviously super-impressive, it is clearly not maintanable without AI agent. It has spinel_codegen.rb is 21k lines of code with up to 15 levels of nesting in some methods. Compilers code was never pretty, but even by those standard, I feel like it is a very-very hard to maintain code by humans.
spinel_codegen.rb is an eldritch horror. I always get spaghetti code like this when using Claude, and I've been wondering if I'm doing something wrong. Now I see an application that looks genuinely interesting (not trivial slop) written by someone I consider to be a top notch programmer, and the code quality is still pretty garbage in some places. For example infer_comparison_type() [1]. This is far from the worst of…
Re: Spinel: Ruby AOT Native Compiler
#58Earlier quoted context omitted.
spinel_codegen.rb is an eldritch horror. I always get spaghetti code like this when using Claude, and I've been wondering if I'm doing something wrong. Now I see an application that looks genuinely interesting (not trivial slop) written by someone I consider to be a top notch programmer, and the code quality is still pretty garbage in some places. For example infer_comparison_type() [1]. This is far from the worst of…
It's true that it's shorter, but I suspect that the if-return, if-return pattern compiles down to much faster code. Separately, this code was originally written in C then ported. There are reasonable explanations for why Matz has the code written this way besides the typical AI slop.
It writes a separate call to emit_raw for each line, even though there many successive calls to emit_raw before it runs into any branching or other dynamic logic. What if you change this
emit_raw(ctx, "#include \n");
emit_raw(ctx, "#include \n");
emit_raw(ctx, "#include \n");
emit_raw(ctx, "#include \n");
// And on for dozens more lines
to this emit_raw(ctx,
"#include \n"
"#include \n"
"#include \n"
"#include \n"
// And on for dozens more lines
);
That would leave you with code that is just as readable, but only calls the emit function once, leading to a smaller and faster binary. Again, this is a trivial change to the code, but Claude struggles to get there.[1] https://github.com/matz/spinel/blob/aba17d8266d72fae3555ec91...
Re: Spinel: Ruby AOT Native Compiler
#59Antis: "If AI is so useful, where are the AI shovelwares? Where are the AI open source contributions? It's all hype" 6 months later: Matz used Claude and now Ruby runs 86 times faster after 1 month of work At this point it's impossible to take antis seriously at all. Every claim is disproven simply by the passage of time. History will remember them just like the dot-com antis (that is, it won't)
Re: Spinel: Ruby AOT Native Compiler
#60Earlier quoted context omitted.
It's a similar subset to mruby, and it might well end up influencing mruby, which does have its users. But it's almost a different language in some ways.
> It's a similar subset to mruby... This is what I've been wondering after only a cursory glance ("It...generates optimized C code" from the OP). Interesting that mruby itself got a major version update around the same time (in just the past few days) https://github.com/mruby/mruby/blob/master/doc/mruby4.0.md