#533 — December 29, 2020

Read on the Web

🙂  I hope you enjoyed your Christmas break! I'm still on mine, but because Ruby has such an interesting release schedule, I felt I had to come back for this special issue all about Ruby 3.0 which came out on Christmas Day :-)
__
Peter Cooper, your editor

Ruby Weekly

Ruby 3.0 Released

The Official Ruby 3.0 Release Post — This is the place to start if you want a quick roundup direct from the core team. We’re going to dig in more throughout the rest of this issue, but the core points are:

  • Ruby 3.0 meets the 3x3 goal by being 3x faster than Ruby 2.0 on some benchmarks.
  • MJIT is more mature though still not considered one size fits all. Some workloads it'll speed up significantly, others (such as Rails apps) it could even slow down.
  • Actor-like Ractors have been (experimentally) introduced as a new concurrency abstraction.
  • Fiber#scheduler brings in some neat 'behind the scenes' improvements for existing concurrency approaches.
  • The RBS language is a new, official way to describe types used in Ruby programs and TypeProf can infer types from existing Ruby code.
  • From my own experience so far, this is the most stable and easy major version upgrade Ruby has ever had. Think more like going from Ruby 2.6→2.7 than the 1.8→1.9-style sprint across a live battlefield!

Yui Naruse and the Ruby Core Team

The Epic Ruby 3.0 Changelog — A deeper, code-driven look over the key syntax and feature changes in Ruby 3.0. This is the one resource to skim if you’re short of time because many of these things might catch you out when you upgrade. We were huge fans of the Ruby 2.7 version too.

Ruby References

A List of Ruby 3 Features — A more quickly digested, high level version of the main announcement, perhaps. Beginners might prefer this.

Datt Dongare beginner

Ruby 3.0.0 Now Available on Heroku — Good news if you’re a user of the popular PaaS, though it is considered a ‘preview’ version for now.

Heroku

Ruby 3.0 JIT and Beyond“Ruby 3.0 JIT is the fastest JIT ever for MRI. However, despite Ruby 3.0’s big improvement in reducing i-cache misses, it’s still not ready for optimizing Rails applications. Stay tuned for Ruby 3.1.”

k0kubun

Ruby 3.0 in Action

Climbing Steep Hills, or Adopting Ruby 3 Types with RBS — You’ve heard Ruby 3.0 has some initial support for types by way of RBS, but what does it really mean? This is a deep dive into adding Ruby type signatures to existing projects and then using the Steep tool to do the type checking. This is the one post to read if RBS and type checking in Ruby intrigues you.

Vladimir Dementyev

Using Ruby 3.0 to Solve Advent of Code ProblemsAdvent of Code is a fantastic annual set of challenges designed to let developers experiment with new techniques, approaches, and languages. Brandon used this year’s challenges as a way to explore Ruby 2.7 and 3.0 features and has the first five days wrapped up so far.

Brandon Weaver

Writing a Ractor-Based Web Server: Part II — A follow up to an article we posted a few months ago where Kir created a scalable Web server in a reasonably small amount of Ruby thanks to ractors. Here he looks at the constraints of ractors and how he helped improve the ractor implementation too.

Kir Shatrov

Ruby 3.0 and the New FiberScheduler Interface — While the Ractor system has got most of the headlines so far, the work on Fiber will arguably have the biggest short term impact on Ruby’s concurrency story. Developing Fiber Scheduler for Ruby 3 goes into even more depth.

Wander Hillen

Benchmarking Ruby 2.4 to 3.0 with 3 Real World Libraries — Namely: HexaPDF (PDF generator), Kramdown (a Markdown converter), and geom2d (2D geometry library).

Thomas Leitner

Ruby 3.0 in Tools

Sord: Convert YARD Docs to Sorbet RBI and Ruby 3/Steep RBS Files — Automatically generate RBI and RBS type signature files from the types specified in YARD documentation comments.

Aaron Christiansen

Ruby Next: Transpile Modern Ruby Code to Run on Ruby 2.5 or mruby — Designed to let us code using cutting edge/experimental Ruby features and then transpile that code to run on Ruby 2.5 or mruby, say. This week’s 0.11.0 release adds support for some Ruby 3.0 features including find patterns, endless methods and leading arguments support when doing argument forwarding.

Vladimir Dementyev

rubyapi.org: Another Way to Search and Explore Core Ruby Docs — It’s already serving up Ruby 3.0 documentation.

Colby Swandale

RuboCop 1.7: The Ruby Static Code Analyzer and Formatter — This latest release improves Ruby 3.0 support.

RuboCop Headquarters

In other festive news..

The 2020 Ruby Advent Calendar — An article per day about a Ruby gem. We first linked it when it only had a few items but it's now complete and there's lots to look through if you want to discover some new gems to try out.

Best of Ruby Gems Series

We'll be back on January 7 with our first normal issue of 2021 – see you then, and we hope you have a happy new year's period :-)