John Hawthorn
jhawthorn.com
John Hawthorn
@jhawthorn.com
Writing code for @Shopify, Rails, and Ruby. Previously @GitHub.
he/him | Victoria, BC | jhawthorn.com
Pinned
You're telling me a duck typed this code?
Reposted by John Hawthorn
Development of Ruby 4.1.0 started
```
ruby 4.1.0dev (2025-12-26T00:31:28Z master 290fa0d8b4) +YJIT +MN +PRISM [arm64-darwin25]
```
December 26, 2025 at 1:06 AM
Reposted by John Hawthorn
ZJIT is available starting in Ruby 4.0! Please try it out on your test suite, maybe in a staging environment, and let us know how it goes!

railsatscale.com/2025-12-24-l...
ZJIT is now available in Ruby 4.0
ZJIT is now available with the release of Ruby 4.0. Here’s an update of our progress.
railsatscale.com
December 24, 2025 at 3:50 PM
Reposted by John Hawthorn
One thing I'm really excited about in Ruby 4.0 is that object allocation is going to get a nice speed boost
December 13, 2025 at 8:09 PM
It happens before the value is assigned (and it seems like "frozen" Atom objects are mutable)
October 30, 2025 at 9:50 PM
That's on self, it needs to be done on the value being swapped
October 30, 2025 at 9:30 PM
Parsing (of whatever) with a short lived is probably currently the most obvious win. Things where the data-in is simple and data-out is complex is a good place to look. ViewComponent is the opposite of that, and it's only slow because of its own implementation, I don't really see the benefit there.
October 30, 2025 at 8:31 PM
I don't think 3.5 changed what was possible but the Ractor::Port API made a bunch of things a lot more ergonomic (also that and everything else is much faster and less buggy)
October 30, 2025 at 5:51 PM
Ratomic is a totally fine experiment, but it totally breaks the ractor guarantees and should not be used. It _can_ crash now and is likely to crash more in the future (see eregon's issue)
October 30, 2025 at 5:51 PM
To the uninitiated, this is what every baseball game is like.
October 28, 2025 at 5:32 AM
No way, the Blues Jay will take it back to Roger Center
October 16, 2025 at 3:53 AM
You're absolutely right...
September 30, 2025 at 12:53 AM
There's totally room for them and if you like them you should use them and make more. It's not a value judgement. There's just something about them that doesn't appeal to me as a matter of taste vs. a traditional command line tool.
September 22, 2025 at 2:15 AM
I think you're right about the forcing function. It also probably enforces a consistent look and feel. But that just suggests to me it's not the optimal version of what it's trying to be. A native GUI could and should be drivable 100% by keyboard
September 21, 2025 at 5:21 AM
I don't mean to single out bat, I think it's just the first tool that crosses the line. Something like `lazygit` is maybe a clearer leap. It's obviously a good tool people like, but as a fan of the command line I don't get why one would prefer that over the same tool as a full graphical GUI.
September 21, 2025 at 2:05 AM
I have a hard time placing exactly what it is, but something about `bat` and other "modern" TUI tools really rubs me the wrong way. They're clearly well made, I think it's more of an aesthetic thing where that is exactly what I was running away from by using command line tools.
September 21, 2025 at 2:01 AM
米国人だから
August 24, 2025 at 6:44 AM
Reposted by John Hawthorn
I took some time to delve into my latest work on reducing Ractor contention. This time: Generic Instance Variables

byroot.github.io/ruby/perform...
Unlocking Ractors: generic instance variables
In two previous posts, I explained that one of the big blockers for Ractors’ viability is that while they’re supposed to run fully in parallel, in many cases, they’d perform worse than a single thread...
byroot.github.io
August 11, 2025 at 10:04 PM
Reposted by John Hawthorn
One of the AI generated security reports attached a bunch of MD files, and this screenshot was taken from the end of one of them. This gives me lots of feelings, and none of them are good
August 5, 2025 at 9:07 PM
August 1, 2025 at 7:43 PM
Reposted by John Hawthorn
Ruby 3.4.5 Released www.ruby-lang.org/en/news/2025...

This is a routine update that includes bug fixes and GCC 15 support. We recommend upgrading your Ruby version at your earliest convenience.
Ruby 3.4.5 Released
www.ruby-lang.org
July 15, 2025 at 5:25 PM
Reposted by John Hawthorn
It's been a while since I've written about the innards of @compiler-explorer.com. xania.org/202506/how-c... has the details, some statistics and some fun war stories.
How Compiler Explorer Works in 2025 — Matt Godbolt’s blog
How we handle 92 million compilations a year without everything catching fire
xania.org
June 3, 2025 at 9:41 PM
Reposted by John Hawthorn
I just published "Implementing Embedded TypedData Objects" about a feature @byroot.bsky.social and I worked on for Ruby 3.3. A bit late, but better than never.

railsatscale.com/2025-06-03-i...
Implementing Embedded TypedData Objects
We implemented a new feature to TypedData objects in Ruby, called embedded TypedData objects. TypedData objects are used across a wide variety of Ruby types, such as Time, Enumerator, and Method. This...
railsatscale.com
June 3, 2025 at 8:17 PM
May 27, 2025 at 1:28 AM
I'm a nervous flier, but fortunately I've downloaded the new season of Nathan Fielder's show "The Rehearsal" to distract me. No spoilers please, I want to go in blind
May 27, 2025 at 1:27 AM