Rebuilding Espec: Foundations In Metaprogramming,
summary
Rebuilds a small portion of ESpec by implementing concrete metaprogramming pieces: macros that define describe/context/it style DSL, using quote/unquote AST manipulation to inject code at compile time, and a before_compile hook plus Module.register_attribute(..., accumulate: true) to collect tests. Dynamically generated test functions run via a simple mix task test runner; assertions implement an assert/match/success/error interface and the demo repo proves the approach compiles, runs, and prints per-test success output.
AI-written summary · about
chapters (14)
- 0:00Intro
- 0:26Kimchi
- 2:13Motivations
- 6:36Unquote
- 10:00Rules
- 11:24Macros
- 12:27Making our own framework
- 14:23Avoiding boilerplate
- 15:55Building lean essentials
- 20:08Using macro
- 21:05Compiletime hook
- 21:25Beforecompile hook
- 22:24Register attributes
- 24:49Macros atom








