~/talk

Y: Recursion The Hard Way

slides:none on file

Shows how to get recursion without named functions by building a typed Y combinator in Go that actually recurses, and adds closure-backed maps for memoized typed recursor storage so factorials cache across calls. Demonstrates stack limits (about 16,700,000 recursive calls on an Intel MacBook Pro), factorial overflow past 20 with 64-bit ints, lack of tail-call elimination, and a reusable panic/recover local exception handler pattern. Code compiles and runs but is explicitly unsafe for production.

AI-written summary · about

  1. 0:00Introduction
  2. 2:08Function vs math
  3. 3:31Pure functions
  4. 5:41Local persistent state
  5. 8:07Introduction to recursion and stack exhaustion
  6. 9:31Factorials and errors
  7. 13:13Panic and recover
  8. 16:47Higher-order functions
  9. 21:44DSLs and anonymous funcs
  10. 22:05Stack-based anecdote
  11. 23:49Tail recursion limits
  12. 24:30Memoization
  13. 25:54Y combinator
  14. 31:55Typed Y in Go
  15. 34:08Y with local state
  16. 35:14Multiple stores with Y
  17. 36:16Resources
  18. 37:21Q&A
~/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.