RubyFlow The Ruby and Rails community linklog

Submit a post

You can use basic HTML markup (e.g. <a>) or Markdown.
Note that your post may be edited to suit the format of the site.

As you are not logged in, you will be
directed via GitHub to signup or sign in

Post Preview

Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.

Today

Speed Demon II: a free online race to make plain CRuby fast with YJIT off

Ruby is one of 26 languages in Speed Demon II, a free online optimisation hackathon from 29 January to 1 February 2027. Ruby runs on CRuby (YARV) with YJIT and ZJIT off, and C extensions are banned, so the speed has to come from Ruby code. Four tracks: log ingest, a search index, a hostile-CSV join and shortest paths on a 500,000-edge graph. Each entry is timed against a naive Ruby version, so Ruby only races Ruby. Teams of 1 to 4, $2,000 in prizes, and every push sets the speed of the team’s car in a live 3D race around San Francisco. See a race render.

rspack_rails 2.3: Hotwire, TypeScript and Tailwind presets, and a bundle analyzer

rspack_rails 2.3 is out. It bundles a Rails app’s JavaScript and CSS with Rspack, with hot module replacement in development and fingerprinted files that Rails serves itself in production. This release adds presets (hotwire, typescript, tailwind) so rspack:install[hotwire,typescript,tailwind] or RSPACK_PRESET=... with the template sets them up in one go, rails rspack:analyze for a Rsdoctor bundle report, and a rspack:doctor:fix that also repairs missing packages and the Docker lockfile. Walkthrough: https://dev.to/tungnt1203/rspackrails-23-hotwire-typescript-and-tailwind-presets-plus-a-bundle-analyzer-in-one-command-j1j (source: https://github.com/tungnt1203/rspack_rails)

What an Active Record Connection Pool Actually Controls

A two-thread Active Record 8.1.4.1 reproduction shows a checkout timeout after the holder’s query has finished. Moving the wait outside its connection block lets the other thread proceed. A second experiment compares ordinary model lookups, outer connection blocks, and persistent leases from Base.connection. Read more

Unpacking arr.max_by &arr.tally

A one-liner from Ruby Weekly #828 returns the most frequent element in an array. This post unpacks why it works: & calls to_proc, and a Hash’s to_proc is a key lookup, which also means it quietly returns nil for missing keys. It also benchmarks the “faster” rewrite, arr.tally.max_by(&:last): 2.2x faster with many duplicates, 1.4x slower when most elements are unique, with allocation counts showing why.

oops 0.8.1: four more token formats masked, even when shell quotes split them

oops copies your last shell command and its output as one Markdown block, so you can paste a failure into an issue, Slack or an AI chat. It masks the tokens it recognizes before copying, and 0.8.1 recognizes four more: Discord bot tokens, Supabase secret keys (sb_secret_; publishable keys stay visible), Notion and Linear, all contributed by one person. Read more

Loading older posts