How to write a programming language and shell in Go with 92% test coverage and instant CI/CD
summary
Builds a full programming language + shell (Elvish) in Go and claims 92% test coverage. Implements a tree‑walking interpreter with a static analyzer and an op‑tree exec model, uses os.StartProcess/os.Pipe plus channels and goroutines to implement shell pipelines, and finds a parser exponential‑time bug via fuzzing. Testing is automated by recording terminal transcripts into tests and a VS Code extension that inserts outputs; a small Go webhook listener builds binaries on every Git commit.
AI-written summary · about
chapters (8)
- 0:00Intro
- 1:02Agenda
- 1:32What's Elvish?
- 10:37Implementing the Elvish interpreter
- 25:14Testing the Elvish interpreter
- 32:30Testing the terminal app
- 39:01Miscellaneous bits
- 46:44Q&A
related talks
43mHow to write a programming language and shell in Go with 92% test cov. and instant CI/CD
39mIs Go A Good Language to Build Compilers?
59mUnleashing the Go Toolchain
33mBuilding a small Language with Go for fun
43mUnderstanding the Go Compiler
44mGo Testing By Example
32mBuilding a Beginner's Programming Language with Go
43mTest coverage in Go, the whole package
