~/talk

Gomacro: code generation made easy and fun

Talkat GoLab 2018 · 2018-10-22..10-23· [go, compilers-and-language-design]
links:none on file
slides:none on file

Interactive REPL Gomacro REPL produces and manipulates actual ast.Node trees with four lightweight operators so expressions like x + y return an ast.BinaryExpr ready for inspection. It combines quasiquoting with macros to splice evaluated nodes into generated ASTs, feeds expansions back to the compiler, and is used to produce ~100,000 of 120,000 lines (≈80%) of a fast interpreter that replaced a 6,000-line handwritten prototype; it runs and compiles on Linux/macOS.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 1:12What is code generation
  3. 5:51Challenges with AST manipulation
  4. 8:20Introducing Gomacro
  5. 11:56What is Gomacro
  6. 15:48Quoting and quasi-quoting
  7. 21:11Runtime AST manipulation
  8. 23:35Macros in Gomacro
  9. 27:52Practical use cases
  10. 30:24Real-world example
  11. 33:36Conclusion and Q&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.