~/talk

Let's Build a Hygienic Macro Expander

Talkat Strange Loop 2016 · 2016-09-16..09-17· [compilers-and-language-design]
links:none on file
slides:none on file

Explains a concrete hygene mechanism: represent identifiers as syntax objects pairing a symbol with a scope-sets and generate a fresh scope on macro expansion so binding is subset comparison. Walks through a working Pico expander in Racket (~250 lines), implements let-syntax, quote-syntax, apply-transformer using a flip-scope trick to detect introduced names, resolves bindings unambiguously, and compiles macro code to the host evaluator; the implementation runs the examples and generalizes to full Racket hygiene.

AI-written summary · about

  1. 0:00Intro
  2. 2:23Example
  3. 10:05Binding Form
  4. 10:27Scopes
  5. 10:55Macros
  6. 15:15Syntax
  7. 17:05Scope Record
  8. 17:45Add Scope
  9. 19:22Bindings
  10. 21:08Resolve
  11. 22:45Resolve Examples
  12. 24:21Importing Bindings
  13. 24:36Expand
  14. 26:04Expand lambda
  15. 26:39Expand macro
  16. 28:00Environment lookup
  17. 28:32Expansion
  18. 29:44Expand Identifier
  19. 31:07Expand Identifier Application
  20. 32:44Apply Macro Transformer
  21. 34:49Function Calls
  22. 37:10Evaluate
~/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.