Practical uses
- Translate languages into executable behavior
- Build linters, formatters, and code analyzers
- Create domain-specific languages
- Optimize programs and developer tooling
How source code is turned into a program the computer can run.
A compiler reads your code and produces an equivalent program in another language, usually machine code. This track walks through each stage (lexing, parsing, type checking, optimization and code generation), which also helps you read error messages and understand tools like linters and formatters.
This is a concepts track, so any compiler you already have will do for the experiments. Compiler Explorer (godbolt.org) shows compiler output for 40+ languages in the browser with nothing to install. You do not need this to follow the lessons: the examples run in your browser.
# Zero install: https://godbolt.org
# paste code, see assembly, toggle optimization flags
# Or a local C compiler via WSL:
wsl --install
# then inside WSL:
sudo apt install gcc
gcc -O2 -S hello.c -o hello.s # emit assemblyLearn the basics first, then pick up these tools when a project needs them.