Writing Ruby Scripts with TypeProf
summary
TypeProf is a Ruby whole-program type-inference engine with a VS Code extension that shows inferred return types, go-to-definition and rename refactors, and a browser build (TypeProf.wasm in browser) running on RubyWasm. The codebase is about 9,000 lines and has received 100+ pull requests. Recent features add diagnostic severity control and analysis-unit sharding to scale toward 100k+ lines. Two tricky bugs appear: constant lookup/inclusion can trigger infinite re-analysis, so the analyzer stops tracking some include/inline cases to avoid nontermination.
AI-written summary · about
chapters (13)
- 0:00Introduction and self-intro
- 3:01Announcing TypeProf
- 6:17What is TypeProf
- 7:21Demo of TypeProf in VS Code
- 12:03TypeProf evolution and RBS
- 15:21Setting up TypeProf
- 17:32Diagnostic severity settings
- 20:50Analysis unit feature
- 24:40RBS and scalability
- 25:00Ruby constant lookup complexity
- 27:50Infinite loop bug in TypeProf
- 30:18Solving the infinite loop issue
- 31:01Future of TypeProf and closing
related talks
22mEnjoy Ruby Programming in IDE and TypeProf
36mA Static Type Analyzer of Untyped Ruby Code for Ruby 3
28mA Plan towards Ruby 3 Types
37mThe Future of Ruby Performance Tooling
53mAn introduction to typed Ruby programming
37mChecking Your Types: An Overview of Ruby's Type System
56mOpening keynote by Matz: MythBuster
42mDebugging Ruby
