3 ms·
ZJIT is supposed to be an improvement on YJIT. I'm happy to get any free performance improvements! The Ruby Ractor (Actor) interface is now completely changed
by dudeinjapan 11mo ago
ZJIT is supposed to be an improvement on YJIT. I'm happy to get any free performance improvements!
The Ruby Ractor (Actor) interface is now completely changed to use a Ractor::Port class, mirroring IPC (inter-process communication) semantics. Ractors were added in 3.0 as a way to get around the GVL/GIL, but having N number of Ruby interpreters running in a Ruby process which would enable executing on N cores at once. For me, hot take but Ractors don't seem to offer major advantages over plain-ol' copy-on-write (COW) forking.
The one "big" feature was supposed to be namespaces, which apparently have now been renamed to Ruby::Box (https://docs.ruby-lang.org/en/master/box_md.html https://docs.ruby-lang.org/en/master/box_md.html). From what I can glean from the Ruby issue tracker, it appears this feature has been radically descoped, primarily because it had performance impacts, but also, I think probably there are realistic concerns about fit with the existing ecosystem. Unlike Javascript/Python, Ruby has never used "modules" for code isolation--everything is loaded into the global namespace (the "global dumping ground" as I call it.) Now the Box feature is only enabled with an environment variable RUBY_BOX=1
https://bugs.ruby-lang.org/issues/21311 https://bugs.ruby-lang.org/issues/21311
- shevy-java 11mo agoI don't think it has really descoped. They just want the transition to be smooth. So they start slowly. The lead japanese dev will most likely in 2026 go for more extension, and I also think this kind of has to be synced a bit with ractor (I think?). Ractor is also strange. Do many people use ractors? I rarely see them used in actual ruby code out there. Right now it seems to me as if ractors are used by only ... say ... 1% or fewer of the ruby developers out there. A bit more than refinement users ... :P
- dudeinjapan 11mo agoRactors have promise but the implementations up till now haven't had strong concurrency safety. It seems in the latest release some of the heavy-hitter contributors like Jean Boussier (byroot) have taken a detailed look at Ractors and started to clean things up. https://byroot.github.io/ruby/performance/2025/05/24/unlocking-ractors-class-variables.html https://byroot.github.io/ruby/performance/2025/05/24/unlocki...
- frou_dh 11mo agoI'm happy if that feature has been descoped because when I last read up on it, it seemed like it was being ramrodded in by an inner circle who were hardly interested in constructive criticism even from other Ruby core maintainers.
- dudeinjapan 11mo agoI had a talk with Matz 1-on-1 about 6 months back and expressed my doubts about namespaces :) He's a nice guy, he just smiled.
- bradly 11mo agoI had a similar experience when I asked him what he thought about vars being able to end in a question mark. Very nice guy who probably hears a lot of very bad ideas.
- throw-the-towel 11mo agoIsn't everything loaded into the global namespace in Javascript as well? I'm talking about named imports.
- dragonwriter 11mo agoRuby doesn't have named imports; requiring a library dumps it into the global namespace (the library may be nice and define a single Module that has everythig in it, but even then that module is dumped in the global namespace, potentially conflicting with anything of the same name defined there or supplied by another required library.