~/talk

Kingdom of the Machine: The Tale of Operators and Commands

Talkat RubyKaigi 2026 · 2026-04-22..04-24· [software-architecture]
links:none on file
slides:none on file

Compares hand‑written Pratt/recursive‑descent parsing used in Prism with generator approaches and shows three concrete pain points: TokenBeginsExpressionP that must enumerate ~100 tokens to decide endless range and return behavior, parseExpressionTerminator that inspects node kinds to reject invalid command positions, and operator binding power that breaks when precedence changes by context. Runs GPT‑5.4 to propose grammar and action rewrites and accepts its patch‑style LALR changes as "reasonably working" while noting the AI misses some corner cases.

AI-written summary · about

  1. 0:00Introduction to the kingdom
  2. 1:38Pratt parser basics and issues
  3. 6:17TokenBeginsExpressionP function
  4. 12:07Parse expression terminator
  5. 13:57Postfix rescue and binding power
  6. 16:14Three layers of parser knowledge
  7. 19:09Grammar ambiguity in Go
  8. 23:11Ambiguity in Ruby patterns
  9. 24:17AI and grammar fixes
  10. 28:46Conclusion and future
~/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.