The RubyKaigi conference was in Matsumoto this year, surrounded by beautiful mountains in Nagano Prefecture. It’s an annual conference in Japan that brings Rubyists from around the world to celebrate Ruby and the community.
I ate a lot of local soba.
Shout out to sanzokuyaki— a local fried chicken cuisine.
Okay. Let’s talk about RubyKaigi and some of themes of the conference.
Note: At the time of writing, videos from the conference are not available yet.
Ruby is 30 years old
Matz opened the conference with a keynote that reminded us of how we got here. This year is the 30th anniversary Ruby. 🍾 おめでとうございます。 お疲れ様でした。
YJIT is here (but also it’s still coming)
YJIT is a the just-in-time compiler written in Rust that Shopify has been spearheading for a number of years now. Maxime Chevalier-Boisvert delivered a key note summarizing the history of the project and shared some surprising benchmarks. Shopify, which runs the self-proclaimed biggest Rails production app (and I don’t doubt it) is already seeing the benefits. They’ve seen performance gains that have well exceeded the original goal of 10-15% speed up. Sometimes up to x3 performance.
I strongly suggest watching Maxime’s keynote when it’s made available.
👋 If you’re interested in seeing some of the current YJIT benchmarks, head over to https://speed.yjit.org/
You can add YJIT to your Rails project when creating a docker file.
# from the root directory of a Rails project fly launch bin/rails generate dockerfile --yjit fly deploy
Ractor works, but isn’t popular yet
Ractor is Ruby’s lastest answer to concurrency, but more importantly parallelism. It was introduced in Ruby 3.0.
- It works! But there’s a lot of room for improvement. This includes an effort to make use M:N threading model to have more control over scheduling than the current implementation that relies on native threads. Checkout Koichi’s talk from 2022 called “Making **MaNy threads on Ruby”
- It’s not popular, yet. There are plans to improve the Ractor API to make it more friendly for developers. Combined with the potential performance benefits it will hopefully attract a wave of new development
Universal Parser is coming, maybe
There’s a lot of effort happening around Ruby parsers:
- The future vision of Ruby Parser by Yuichiro Kaneko
- Implementing “++” operator, stepping into parse.y by Masaki Shioi
- Yet Another Ruby Parser by Kevin Newton
In Ruby Commiters and The World, the opening talk on day 3, there were some hints from Matz that maybe Ruby would one day have one de facto universal parser, but it’s not something he’s considering in the short term. Maybe in Ruby 3.4, but don’t get your hopes up.
Types: Everyone’s favorite Ruby feature?
Okay, Types aren’t exactly the first thing I think about when it comes to Ruby, but I guess they are now:
- Generating RBI’s for Dynamic mixins with Sorbet and Tapioca by Emily Samp
- Power up your REPL life with types by Tomoya Ishida
- Gradual typing for Ruby: comparing RBS and RBI/Sorbet by Alexandre Terrasa
- Let’s write RBS! by Masataka Kuwabara
- Parsing RBS by Soutaro Matsumoto
Shopify uses Sorbet and various type tools/libraries in production. Alexandre Terrasa’s presentation contained some interesting polling data from Shopify developers that showed an increased adoption/satisfaction with types in Ruby/Rails.
Ruby is not dead
This was a theme of last year’s conference, but just to drive the point home checkout the long list of sponsors this year: https://rubykaigi.org/2023/sponsors/
Ruby 3.3 has a lot of promise
Ruby 3.3.0‑preview1 was released during the conference. The new version looks to hold a lot of promise due to the effort of the core team/community, the YJIT project, efforts around a universal parser, and efforts to improve Ractor. Ruby is projected to be faster and more maintainable.
This post was about themes of the conference more generally, but there were a lot of other talks that aren’t mentioned in this post (I know I certainly have a list of personal favorites). I highly suggest checking them out when the videos are made public.
- Multiverse Ruby by Chris Salzberg brought up some interesting issues with global namespaces. His talk was in Japanese this year, which was really impressive
- Unleashing the Power of Asynchronous HTTP with Ruby by Samuel Williams was really easy to follow and was great history lesson about the evolution of HTTP
- Ruby vs Kickboxer - the state of MRuby, JRuby and CRuby by Michael Milewski and Selena Small. Sometimes all you need is a kickboxing robot
- Understanding the Ruby Global VM Lock by observing it by Ivo Anjo pairs really well with “Ractor” reconsidered by Koichi Sasada if you’re intersted in threading
- Special thanks to the organizers and volunteers of the conference!
See you next year RubyKaigi 2024! 🌴
RubyKaigi 2024 is in Okinawa, the southern tropical islands of Japan. It’s going to be a blast. See you all there!