Resources
Also check out the /r/ProgrammingLanguages Reading List.
Unsorted
- Live Functional Programming with Typed Holes
- A tour of metaprogramming models for generics
- Lambda Calculus: Then & Now
- Co-designing a Type system and a Runtime
- Visual Programming Codex
- Programming and Programming Languages
- Programming in the twenty-first century
- Simple Made Easy
- Fun treasure trove of interesting ideas on OO, Type Theory, Databases, etc. on Luca Cardelli’s site:
- Newton vs the machine: solving the chaotic three-bodyproblem using deep neural networks
- Writing a Concatenative Programming Language: Introduction, Comma is a Product: the Algebra of Concatenative Programming, Cancellation Based Pattern Matching
- Compiler Errors for Humans: Rethinking the terminal UX in Elm 0.15.1, The Syntax Cliff: Teaching syntax with Elm 0.19.1
- Coinductive Definition: A Counterpoint to Inductive Definition: Ron Garcia’s (PL prof at UBC) notes for introducing conduction.
- Debugging Dynamically Generated Code (Reflection.Emit): You target MSIL and you are writing your compiler in a .NET langauge you pretty much get debugging for free.
- A neat talk about some of the implementation tricks in Chez Scheme
- Parse, don’t validate
Compilers & Interpreters & Stuff
Unsorted
- Can Logic Programming Execute as Fast as Imperative Programming? The thesis on Aquarius Prolog. It’s a paper fantastically useful to try and understand the dirty parts of logic languages.
- Portable Executable (PE) and Common Object File Format (COFF)
- Generating C code that people actually want to use
- Hardware Exceptions
- Structures in jemalloc, and in more detail, https://media.blackhat.com/bh-us-12/Briefings/Argyoudis/BH_US_12_Argyroudis_Exploiting_the_%20jemalloc_Memory_%20Allocator_WP.pdf
- Beam bytecode compilation for examples
- Checking Beliefs in Dynamic Networks: May be useful for verifying compiler correctness.
- Latency and throughput of x86 ISA
- Simple, direct, AST to ASM translation
- What’s new in CPUs since the 80s?
- What is Zig’s Comptime
- “Optimization” based on undefined behavior hurts performance
- Software optimization resources
More resources (collections)
- The Bootstrapping Wiki: Building up compilers and interpreters from nothing.
- Awesome Compilers: A curated list of resources on compilers, interpreters, and runtimes.
- GRIN: a compiler back-end for lazy and strict functional languages, related articles thread
Tutorials
- Crafting Interpreters
- How to implement a programming language in JavaScript small little tutorial
- Building a Compiler with MLIR
- Let’s Build A Simple Interpreter. Part 1.
- Writing a Compiler in Rust
- University of Salzburg - Introduction to Compiler Construction: A great resource to learn parsing and code generation.
- Compiling a Functional Language Using C++
- Stanford CS 143 Compilers
LLVM
- LLVM tutorial
- LLVM backend development by example (RISC-V)
- Creating an LLVM Backend
- Dart on LLVM: Some slight actual usage of llvm’s gc.statepoint and gc.reloate thats not documentation.
- Mapping high level construct to LLVM IR
- LLVM Stackmap example usage:
Scheduling & Concurrency
JIT Compilers
- Adventures in JIT compilation: Part 1 - an interpreter
- JIT vs. AOT: Unity And Conflict of Dynamic and Static Compilers for Java
Compilers
- 8cc - A Small C Compiler, 9cc - A Small C Compiler (new version)
- I wrote a self-hosting C compiler in 40 days (2015)
- Go: Overview of the Compiler (Go 1.13)
- Tour of the DMD D Programming Language Compiler
- Spelunking D Compiler Internals
- Turbo Pascal 3.0 Compiler / Code Generation Internals
Virtual Machines
- Virtual Machine Showdown: Stack Versus Registers
- Comparison of Erlang Runtime System and Java Virtual Machine
- A No-Frills Introduction to Lua 5.1 VM Instructions
- Virtual Machine DIspatch Experiments in Rust
- Write your Own Virtual Machine
Parsing
Parsing with derivatives
Top Down operator Precedence Parsing (aka Pratt Parsing)
- Top Down Operator Precedence (by Vaughan Pratt): PDF, HTML
- Top Down Operator Precedence (by Douglas Crockford): Blog Post, GitHub
- Simple Top-Down Parsing in Python: Blog Post, SVN
- Pratt Parsers: Expression Parsing Made Easy: Blog Post, GitHub
- Crafting Interpreters - Compiling Expressions: A Pratt Parser
- Pratt Parsing and Precedence Climbing Are the Same Algorithm
- Parsing expressions by precedence climbing
- Pratt Parser combinator for Parsec: Hackage, GitHub
- L Language:
Design
- Aphorisms on programming language design
- Growing a Language, by Guy Steele: There’s also a PDF, but watch the video first to avoid spoilers!
- Rob Pike - Simplicity is Complicated: Interesting food for thought, regardless how people feel about Go.
- On Language Design (Lambda Days)
- Brian Kernighan on successful language design
- An Empirical Analysis of C Preprocesser Use
Fun
Language Lists
- Our community languages on proglangdesign.net
- Languages on codelani.com: A huge list of programming languages
- The Programming Languages Zoo: A collection of miniature programming languages which demonstrates various concepts and techniques used in programming language design and implementation.
Learn existing languages
- Curry: A Tutorial Introduction: A lot can be learned from contrasting Curry and Mercury.
- What I Wish I Knew When Learning Haskell: People writing compilers in Haskell might learn a thing or two from reviewing this.
Memory management
- Polonius and region errors
- Aaron J. Weiss, POPL 2019
- A really early proposal for borrow checking in Rust
- Memory Allocation Strategies: For those interested in the history of Rust.
- Safely Sharing Data - Reference Capabilities in the Pony Programming Language
- Mesh: Compacting Memory Management for C/C++ Applications
Garbage Collection
- Managing Virtual Memory in Win32
- Mapping Multiple Memory Views in User Space
- Tri-Color Garbage Collector
- A First Look Into ZGC
- Shenandoah GC
- An Efficient Non-Moving Garbage Collector for Functional Languages
- Algorithms for Dynamic Memory Management
- Mark-Sweep and Mark-Compact GC
- Orca: GC and Type System Co-Design for Actor Languages (Pony)
- Golang’s Real-time GC in Theory and Practice
- The Memory Subsystem: Stacks, Heaps, and Garbage Collection
- Getting to Go: The Journey of Go’s Garbage Collector
- New Garbage Collector - The LuaJIT Wiki
- Visuaizing Garbage Collection Algorithms
- Understand How Much Memory Your Python Objects Use
- Understanding String heap size in Javascript / V8 - Stack Overflow
- http://hg.openjdk.java.net/zgc/zgc/file/01f601c8d727/src/hotspot/share/gc
- A tour of V8: Garbage Collection
- Erlang Garbage Collector
- Garbage Collection Design - .NET CoreCLR
- GopherCon 2018 - Allocator Wrestling: A whirlwind tour of the Go memory allocator and garbage collector, with tools and tips on how to optimize.
Syntax
- Syntax Across Languages
- The History of Rust: See how the developers of Rust re-framed features, streamlined, and improved upon the language.
- How to Design an IDE-Friendly Language
- Choosing Your Next Programming Language: Worth watching to think about multi-paradigm.
Types
Unsorted
- The Laffer Curve of Types
- Algebraic Effects for the Rest of Us
- A Primer on Type Systems
- Bidirectional Type Checking
- What the heck is polymorphism
Dependent
- A Tutorial Implementation of a Dependently Typed Lambda Calculus, aka LambdaPi or Simply Easy. Written using Haskell.
- Checking Dependent Types with Normalization by Evaluation: A Tutorial
- Programming Language Foundations in Agda
Gradual
Linear/Uniqueness/Substructural
- Linearity in Haskell
- Uniqueness Typing Simplified
- Frank Pfenning (2012) - Linear Logic Lecture 01: in-depth linear logic course, ranging over process calculus, linear functional languages, and logic programming