Sign in

Sam Ruby

@intertwingly.net
1.1K followers 49 following 183 posts

Author: Agile Web Development with Rails 8; Retired ; en.wikipedia.org/wiki/Sam_Ruby

PostsRepliesMedia
Sam Ruby @intertwingly.net · 19h
100% written by a human. Porting and on-shotting are anecdotes. Yes, Rust is faster than CRails. Duh. But is that really the interesting question? What happens when your needs change and you are faced with a requirement than you never anticipated before? intertwingly.net/blog/2026/09...
intertwingly.net
Rust is the answer to the wrong question
150
Sam Ruby @intertwingly.net · 30/09/2026
Nokogiri, Loofah and Crass now compile to native code with Spinel, Matz's Ruby-to-C compiler. Same requires, same APIs, no Rails. An HTML sanitizer becomes a 2–3 MB binary that runs in 5–9 ms, byte-identical to the gems on their own test inputs. intertwingly.net/blog/2026/09...
intertwingly.net
Nokogiri, Loofah and Crass, Compiled
021
Reposted by Sam Ruby
Eduard G.Castelló @elpatroned.bsky.social · 29/09/2026
Today I contributed to #roundhouse and #spinel, unthinkable for me a few years ago. Tooling from @matz.bsky.social and @intertwingly.net makes it approachable: compile my Rails API, hit an issue, report it, repeat. Now I see low-level details I couldn't (or wouldn't) before🙃
121
Sam Ruby @intertwingly.net · 29/09/2026
This could be important: github.com/rubys/roundh...
github.com
Make `roundhouse check` fast on large apps by tobi · Pull Request #171 · rubys/roundhouse
roundhouse check on a very large app (Shopify core: 96k .rb files, 140 components) was dominated by two quadratic costs in constant resolution. This PR measures, then removes them. Commits ROUNDHO...
010
Sam Ruby @intertwingly.net · 28/09/2026
"As if", a new post covering Aaron's closing keynote, DHH's new rust port of campfire, performance, and maintainability. Yes, it is "AI slop", but I think the questions this piece poses are worth exploring. intertwingly.net/blog/2026/09...
010
Sam Ruby @intertwingly.net · 27/09/2026
Partly in the Right - intertwingly.net/blog/2026/09...
intertwingly.net
Partly in the Right
010
Sam Ruby @intertwingly.net · 25/09/2026
intertwingly.net/blog/2026/09...
intertwingly.net
Pencils Down, Notation Up
071
Sam Ruby @intertwingly.net · 24/09/2026
Excellent! The goal is that you shouldn't have to make changes. Try the Dockerfile at rubys.github.io/roundhouse/a... and/or rubys.github.io/roundhouse/b... . Let me know (issues, pull requests, discussions, social media, whatever) where the gaps are.
rubys.github.io
110
Reposted by Sam Ruby
Eduard G.Castelló @elpatroned.bsky.social · 18/09/2026
I made a tiny Rails API compile into a native Linux binary using Roundhouse + Spinel. This repo shows the full path: Rails source → compatibility check → generated Spinel target →native binary → Docker deployment. Includes a runnable binary and setup guide. github.com/eddygarcas/s...
112
Sam Ruby @intertwingly.net · 22/09/2026
You were right, and it's 5 of 7 here. Campfire's TruffleRuby lane loads: declared — puma, bcrypt, nio4r, json, openssl not — sqlite3, nokogiri sqlite3 is the hot one (a few hundred rows/request). --cexts-lock=false: 432 → 1,078 req/s at 5 threads
010
Sam Ruby @intertwingly.net · 22/09/2026
Correction published: intertwingly.net/blog/2026/09... ; now updating the test harness so that future runs of the benchmark will show better results.
intertwingly.net
Campfire, Three Rubies
010
Sam Ruby @intertwingly.net · 22/09/2026
@headius.bsky.social @eregon.me intertwingly.net/blog/2026/09... - let me know what conclusions I may have gotten wrong or what areas I should explore next.
intertwingly.net
Campfire, Three Rubies
100
Sam Ruby @intertwingly.net · 21/09/2026
Let's keep the dialog going - "interesting" and "surprising" usually leads to discoveries, ones that undoubtedly will benefit both sets of users, even if the Venn diagram of those users don't meaningfully overlap at the moment.
000
Sam Ruby @intertwingly.net · 20/09/2026
A PR against Campfire, merged by @rosa.codes, and Campfire on Spinel now passes 300 out of 300 model and controller tests: intertwingly.net/blog/2026/09...
intertwingly.net
Campfire, One Short
020
Sam Ruby @intertwingly.net · 19/09/2026
TruffleRuby specializes the interpreter to the program at runtime; Roundhouse specializes Rails to the app ahead of time. I'm now, for the first time, starting to measure the impact of each separately and together: intertwingly.net/blog/2026/09...
intertwingly.net
Two JITs, Opposite Signs
012
Sam Ruby @intertwingly.net · 19/09/2026
intertwingly.net/blog/2026/09... — tell me directly what I got wrong or should have done differently; this is your area of expertise, not mine. I use Claude openly for this work, and I'm enjoying watching it rise to the challenges I give it.
intertwingly.net
Two JITs, Opposite Signs
110
Sam Ruby @intertwingly.net · 19/09/2026
The run is being made now, it takes a few hours total given all of the targets. And I'm working on a blog post with the findings. For this small benchmark, roundhouse+YJIT is competitive with TruffleRuby, and the benefits stack, though not as much as they do with JRuby.
110
Sam Ruby @intertwingly.net · 19/09/2026
rubys.github.io/roundhouse/b... contains CRuby instructions if you want a preview
rubys.github.io
110
Sam Ruby @intertwingly.net · 19/09/2026
Two bonuses: TruffleRuby's parallel threads exposed a GVL-masked race in our runtime (13% 500s until fixed), and JRuby's earlier 20s-warmup JSON numbers were 500s from jruby#9531 — fixed on 10.1.1.0. Linux-box numbers + write-up soon; happy to send the tarball if you want to profile the HTML path.
110
Sam Ruby @intertwingly.net · 19/09/2026
Tried both modes (40.0.0, M4 Mac, same app + db). Stock Rails: CRuby+YJIT 1.4k req/s → TruffleRuby 7.7k, JVM ≈ native (JRuby 10.1.1: 3.1k). Our emitted Ruby: 11.7k → 28.6k native / 24.8k JVM. 512 MB heap: fine for the emit, OOM for Rails (1 GB ok). Warmup: ~60s emit, ~120s Rails on JVM.
110
Sam Ruby @intertwingly.net · 18/09/2026
I'll add it to the list, no guarantees when I'll get to it. My experience with JRuby suggests the benefits should compound. One key difference between TruffleRuby and RoundHouse is how they view their targets. intertwingly.net/blog/2026/07... demonstrates TypeScript - everything runs in your browser
intertwingly.net
There Is No Server
020
Sam Ruby @intertwingly.net · 18/09/2026
Roundhouse Released: intertwingly.net/blog/2026/09...
Matz on stage: 5x the throughput; 366 MB against 4.6 GB, referring to Campfire → Roundhouse → Spinel
042
Sam Ruby @intertwingly.net · 18/09/2026
Here's some benchmarks: rubys.github.io/roundhouse/b... and rubys.github.io/roundhouse/b...; let me know if I should add TruffleRuby to the list (and which one: native or JVM). Or if there are other benchmarks I should consider.
rubys.github.io
Roundhouse bench — bench
110
Reposted by Sam Ruby
Benoit Daloze @eregon.me · 17/09/2026
So Matz is saying you can make Campfire (a Rails app) 5 times faster and use a twelvth of the memory by using github.com/rubys/roundh... + github.com/matz/spinel
1122
Sam Ruby @intertwingly.net · 18/09/2026
intertwingly.net/blog/2026/09... - browser based IDE/playground, LSP, and MCP for Spinel
intertwingly.net
Spinel at Your Fingertips
000
Sam Ruby @intertwingly.net · 14/09/2026
Hyprland as the multiplexer: intertwingly.net/blog/2026/09... #omarchy #herdr
intertwingly.net
Terminals That Outlive the Laptop
010
Sam Ruby @intertwingly.net · 11/09/2026
Spinel demo in a tweet: curl -sL rubys.github.io/roundhouse/c... | tar xz cd campfire-docker docker build -t campfire . docker run --rm -p 3000:3000 -v campfire-data:/app/storage campfire intertwingly.net/blog/2026/09... intertwingly.net/blog/2026/09...
000
Sam Ruby @intertwingly.net · 09/09/2026
Two days ago the compiled Campfire was 55% faster than Rails. Today it's 4x. One process against their eight. The change: a nested view appends into the caller's buffer instead of returning a string — 61% less allocation per request. intertwingly.net/blog/2026/09...
intertwingly.net
Campfire, Buffered
010
Sam Ruby @intertwingly.net · 07/09/2026
One Spinel process now beats Rails' eight: intertwingly.net/blog/2026/09...
intertwingly.net
Campfire, Cached
100
Sam Ruby @intertwingly.net · 05/09/2026
Developing in public, Campfire on Spinel measurements: intertwingly.net/blog/2026/09... TL;DR: some early wins (examples: cold start, memory, sockets), and some known work to be done, then profiling.
intertwingly.net
Campfire, Measured
121
Sam Ruby @intertwingly.net · 03/09/2026
Good catch! Should be fixed now. Thanks!
110
Sam Ruby @intertwingly.net · 03/09/2026
Video of my talk from RubyConf; preview of my talk in Deccan Queen on Rails. www.youtube.com/watch?v=33Sa... intertwingly.net/blog/2026/09... intertwingly.net/blog/2026/09...
youtube.com
RubyConf 2026 - There Is No Server by Sam Ruby
YouTube video by Ruby Central
110
Sam Ruby @intertwingly.net · 01/09/2026
MVP version of Campfire on Spinel is now something you can run yourself: intertwingly.net/blog/2026/09...
intertwingly.net
Campfire Chats
010
Sam Ruby @intertwingly.net · 28/08/2026
As of today, Campfire (unmodified) boots on Spinel. This is both an important milestone and the first step of many. intertwingly.net/blog/2026/08...
intertwingly.net
Campfire Boots
020
Sam Ruby @intertwingly.net · 29/07/2026
@push.cx where is a good place to discuss this?
010
Sam Ruby @intertwingly.net · 29/07/2026
@eightbitraptor.bsky.social is there a good place to discuss this?
000
Sam Ruby @intertwingly.net · 29/07/2026
Next target: Lobste.rs on Spinel: intertwingly.net/blog/2026/07...
200
Sam Ruby @intertwingly.net · 22/07/2026
Rails on Roda: intertwingly.net/blog/2026/07...
010
Sam Ruby @intertwingly.net · 20/07/2026
Roda on Spinel: intertwingly.net/blog/2026/07...
010
Sam Ruby @intertwingly.net · 19/07/2026
@ufuk.dev What we discussed at RubyConf is now implemented and in the test suite: unannotated scopes and class methods infer Relation[T], and scopes resolve on relation receivers — Story.recent.for_user(1) just types. github.com/rubys/roundh... and github.com/rubys/roundh...
110
Sam Ruby @intertwingly.net · 16/07/2026
My RubyConf slides: intertwingly.net/blog/2026/07... Demos, speaker notes, and links to blog posts that contain more depth. All running in your browser.
intertwingly.net
There Is No Server
020
Sam Ruby @intertwingly.net · 11/07/2026
github.com/oripekelman/... might be just what you are looking for
github.com
GitHub - OriPekelman/tep: A Sinatra-flavoured web framework that compiles to a native binary via Spinel
A Sinatra-flavoured web framework that compiles to a native binary via Spinel - OriPekelman/tep
000
Sam Ruby @intertwingly.net · 11/07/2026
Lobste.rs as a benchmark: initial progress report: intertwingly.net/blog/2026/07...
000
Sam Ruby @intertwingly.net · 10/07/2026
> My goal with JRuby has always been to give Rubyists more tools and more opportunities. By combining JRuby with the power and ecosystem of the JVM, we’ve brought Ruby and Rails to places it never could have gone before. Hold my beer. :-)
021
Sam Ruby @intertwingly.net · 07/07/2026
Mastodon's streaming server exists because MRI can't hold ten thousand idle sockets. Rewrote it in a Ruby that compiles: 300 connections, 16MB vs Node's 202MB. It's the first rung of a bigger ladder — Mastodon on Spinel, as a supported configuration. intertwingly.net/blog/2026/07...
030
Sam Ruby @intertwingly.net · 06/07/2026
Status update: ingesting Mastodon. intertwingly.net/blog/2026/07...
000
Sam Ruby @intertwingly.net · 25/06/2026
Live Types for Rails: intertwingly.net/blog/2026/06...
000
Sam Ruby @intertwingly.net · 20/06/2026
Roundhouse demos: intertwingly.net/blog/2026/06...
Type comment.commenter + 1 and a red marker appears under it, live, because adding an integer to a string is an error and the compiler knows it.
000
Sam Ruby @intertwingly.net · 19/06/2026
Spinel on Rails: intertwingly.net/blog/2026/06...
010
Sam Ruby @intertwingly.net · 11/06/2026
The Ruby JRuby Was Built to Run: intertwingly.net/blog/2026/06...
intertwingly.net
The Ruby JRuby Was Built to Run
020