I believe with version 3.3 Ruby is back in a big way! The language focused on developer happiness and derided for its slowness is slow no more.<p>YJIT is an amazing technology, and together with other innovations like object shapes and various GC optimizations, Ruby is becoming seriously fast! Big Ruby shops such as Shopify [1] have been running 3.3 pre-release with YJIT and reporting double digit percentage performance improvements.<p>Personally I'm really excited about Ruby and its future. I can't wait to start working with Ruby 3.3 and using it on my client's production sites...<p>[1] <a href="https://railsatscale.com/2023-09-18-ruby-3-3-s-yjit-runs-shopify-s-production-code-15-faster/" rel="nofollow noreferrer">https://railsatscale.com/2023-09-18-ruby-3-3-s-yjit-runs-sho...</a><p>Edit: add percentage to performance improvements.
I think Ruby 3.3 is perhaps one of the most important and feature rich Ruby release in the past 10 years. I never thought Ruby would have a shipping and production ready JIT before Python. And Prism, Lrama, IRB. A lot of these were discussed in previous HN submissions.<p>But one thing that is not mentioned or discussed enough, is Ractor, M:N thread scheduler, Fibre and Async. Especially in the context of Rails. I am wondering if any one are using these features in productions and if you could share any thoughts on the subject.
Available on Heroku <a href="https://devcenter.heroku.com/changelog-items/2772" rel="nofollow noreferrer">https://devcenter.heroku.com/changelog-items/2772</a>
Looks good. There's a new IRB, the interactive Ruby interpreter, with better autocompletion and debugging. Most of the Ruby 3.3 changes will lead to improved developer tooling. The language API is largely unchanged and consistent with previous releases. I wrote a guide [1] for the update to Ruby 3.3, with notes for each of the various version managers.<p>[1] <a href="https://mac.install.guide/ruby/update.html" rel="nofollow noreferrer">https://mac.install.guide/ruby/update.html</a><p>Just curious, which version manager would you recommend? Previously I recommended asdf, frum, or chruby.
> Name resolution such as `Socket.getaddrinfo` can now be interrupted. Whenever it needs name resolution, it creates a worker pthread, and executes `getaddrinfo(3)` in it.<p>Do other language runtimes do similar things? Creating a thread sounds too heavy, though it might not matter in practice. As per their own benchmark, the overhead is minimal but still not zero.<p><pre><code> 10000.times {
Addrinfo.getaddrinfo("www.ruby-
lang.org", 80) }
# Before patch: 2.3 sec.
# After ptach: 3.0 sec.
100.times {
URI.open("https://www.ruby-lang.org").read }
# Before patch: 3.36 sec.
# After ptach: 3.40 sec.</code></pre>
> RUBY_MAX_CPU=n environment variable sets maximum number of N (maximum number of native threads). The default value is 8.<p>Shouldn't the default be the number of logical cores? Like Rust's Tokio and countless other M:N runtimes
Anyone have a link to some good examples of using Prism? I was disappointed to not really see anything other than the “Notable API” from this release page.
It's nice to see improvements to Ruby, but the hype around a ~13% performance boost feels... weird.<p>It looks like a big leap, but when you compare the actual speed to _any_ other language you realize Ruby still has many, many percent to go to even be in the same game.