~/talk

Good Enough Types: Heuristic Type Inference for Ruby

Talkat RubyKaigi 2026 · 2026-04-22..04-24· [ruby, typescript]
slides:none on file

A heuristic type-inference gem called Type Guesser infers Ruby types by collecting methods called on variables, applying a duck-typing-like heuristic and light method-local type flow, integrating as a ruby-lsp addon. It caches on-demand gem parsing, special-cases Object methods, aggregates instance-variable usages from outer scope, returns unions up to three candidates, and falls back to Untyped when four or more match. Measured inference coverage is roughly 40% (baseline 10–20%), startup ≈20s, warm <5s.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 3:41Existing type tools in Ruby
  3. 6:14Heuristic type inference idea
  4. 9:50Type Guesser implementation
  5. 16:51Architecture and design choices
  6. 20:29Handling gem dependencies
  7. 22:22DSL support challenges
  8. 24:21Performance and metrics
  9. 26:34Limitations and future work
  10. 27:42AI integration with MCP
  11. 29:58Conclusion and call to action
~/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.