"How to build a Clojure dialect"
summary
A Clojure dialect called Jank on LLVM targets native code with a C++ runtime and C++ interop, developed over seven years and rewritten multiple times. Implementation details: lexer evolved from regex to instaparse to a custom C++ tokenizer; parse tree is actual Clojure data so macros run as functions over that tree; runtime mixes interpretation, JIT and AOT compilation; interop uses native raw inline C++ with interpolation. Expect to reimplement hundreds of clojure.core defs and the Java-like object model as a C++ library.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:08Jank
- 2:47Why build a closure dialect
- 3:56Terms of compilation
- 7:13Lexical analysis
- 9:00Tradeoffs
- 9:30Syntax Analysis
- 10:36Source Code
- 13:01Compiler
- 17:43Macros
- 21:31Interop
- 24:57Closure Core
- 27:35Clojure is a library
related talks
31mAn Exceptionally Janky Tale
35mDesign and Prototype a Language In Clojure
30mHow Clojure Works: Understanding the Clojure Runtime
01h 04mClojure Compilation, Backwards
15mThe Jai Programming Language and What Can We Learn From It
01h 04mJust-in-Time Compilation: The Next Big Thing?
27mClojure and Android
43mPolyglot Native: Java, Scala, Kotlin, and JVM languages
