~/talk

Introducing Sorbet into your Ruby codebase

Talkat wroc_love.rb 2024 · 2024-04-12..04-14· [ruby-on-rails, ruby]
links:none on file
slides:none on file

Adds Sorbet to a decade‑old Ruby monolith to make refactors safer and enable LSP jump‑to‑definitions, using RBI files and Shopify’s Tapioca to generate signatures, and enabling the experimental require_ancestor for module dependencies. Tests run with Sorbet on, production partially on; signatures are toggled off in hot loops to limit runtime cost. Found ~6,000 unsafe uses and ~3,000 casts during rollout, saw ~1.5–2% measured overhead but microbenchmarks show some assertions add ~4x slowdowns; works but feels noisy and best for large codebases.

AI-written summary · about

  1. 0:00Introduction and background
  2. 2:16What is Sorbet
  3. 3:41Sorbet syntax basics
  4. 6:55Using Sorbet in practice
  5. 9:45Module dependencies and typing
  6. 12:14Type inference challenges
  7. 14:00Generics and RBI files
  8. 15:24GitHub’s implementation
  9. 17:50Performance impact of Sorbet
  10. 20:21Benefits of Sorbet
  11. 22:30RBI file generation issues
  12. 24:58Verdict on Sorbet adoption
  13. 26:05Q&A: Type validation vs static typing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.