Principia Softwarica is a book series that explains how fundamental system programs work by presenting fully annotated source code from Plan 9 from Bell Labs. Using literate programming, each book covers a core program — kernel, shell, compiler, linker, editor, debugger — with a target ratio of one line of explanation per line of code. Plan 9 was chosen because its entire codebase fits in ~183K lines, making it feasible to explain every line. The series argues that understanding the real full stack (compiler, linker, kernel, system calls) is increasingly critical as AI tools handle routine coding tasks. Several Plan 9 concepts underpin modern software: UTF-8, /proc, Linux namespaces (Docker), Go's goroutines, and WSL2's 9P protocol. OCaml ports of the programs are also available as a companion project called XIX.
Table of contents
What's NewWhy Principia?Introduction to the SeriesThe BooksPlan 9Source CodeOCaml PortsSupporting ToolsRelated WorkAboutSort: