The Language of the Language: Comparing compiler construction in Clojure and F#
summary
Two compilers for Clojure-like lisps end-to-end: MAGIC: Clojure → MSIL, used in Arcadia/Unity, tools.analyzer, nested hash-map ASTs and dynamic compiler maps that create bespoke local compilers and Jn/Gin: F# → MSIL, discriminated-union AST types, Mono.Cecil for emission, a threaded context record for locals and recur. Types in F# give compile-time structure but cannot encode bytecode validity; dynamic maps in Clojure let passes add info locally and simplify many context-dependent codegen tasks.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 0:35The Magic Clojure compiler
- 2:56The Jin F# compiler
- 4:02Comparing compiler approaches
- 6:16Compiler pipeline architecture
- 8:21Data representation strategies
- 12:40Symbolic bytecode generation
- 17:27Validity and verification
- 21:38Context management techniques
- 31:27Conclusion
related talks
40mBuilding My First Lisp Compiler
40mSymbolic Assembly: Using Clojure to Meta-program Bytecode
01h 05mAll the Languages Together
42mClojure Futures
42mFunctional interpreters and you
44mRethinking compilers with live coding
42mDeveloping the Wolfram Language Compiler
48mCross-Domain Compilation: Exploiting Synergies Across the CS Community
