by ksec · 4y ago · 0 comments
Unfortunately it is still way too early for Zig.
I also wonder what is happening to TruffleRuby inside Shopify. And where is TenderJIT :)
My C complaints are well known, yet I don't see the need to make the build system even more complex, dropping platform support, for the benefit of yet another language, regardless of Rust or Zig winning in the end.
Then they shouldn't have merged the JIT to start with and just do their own Ruby implementation instead.
> Then they shouldn't have merged the JIT to start with and just do their own Ruby implementation instead.
See the thing is, building a new Ruby implementation from scratch would actually have been easier because we could have more of a clean room design. The problem is the compatibility. Making your new Ruby implementation 100% compatible with CRuby and the many Ruby gems found in the wild is extremely hard.
Well, it was great for the money we got out of it, even though it set back the client for all the issues that came out of the process until they could proceed with the same velocity as before the rewrite took place.
Hence why I usually don't see the value in rewrites of any sort, and advocate for new language adoption to always go the clean room path.
So any tier 2+ platform for Ruby now needs to wait for Rust/Zig support before considering joining the YJIT effort, maybe a compromise the Ruby team is happy with given their replies, but it does have an impact nonetheless.
"just"...
Several other Ruby JIT projects (Rubinius, JRuby, TruffleRuby, etc) have poured tons of resources, and while they perform very well, the adoption is still very low because keeping up with the main implementation takes tons of effort.
On the other hand YJIT managed to speedup real world codebases with pretty much 100% compatibility in under a year of development by a fairly small team.
Shopify already invest quite a lot in TruffleRuby, that's the new implementation moonshot you call for, YJIT is the more grounded, shorter term hedge.
I think you overestimate the size of the YJIT codebase. It's a very dense codebase in term on developer hours, translating it is far cheaper than it was to develop it from scratch.
It also doesn't come from out of nowhere, Alan already spent time experimenting on this idea with good results.
> is supposed to get back that money (developer hours x $ per hour) exactly how?
It's explained in the ticket, the goal is to have a better velocity once it's done.
You say you're fully aware of it but just the comment above you were advocating for something that took years to other VMs. Maybe have a little more faith in the YJIT team?