TypeScript types can run DOOM [video]
What Was Achieved
- Doom was executed entirely inside the TypeScript type system (during type-checking), not at JavaScript runtime.
- The project builds a full WebAssembly virtual machine and memory model using only types, then runs a Doom build compiled to WASM on top of it.
- Many commenters call this the “pinnacle” of TypeScript type abuse and an extreme, concrete demonstration of Turing completeness.
Turing Completeness vs Practicality
- Discussion stresses the difference between “theoretically Turing complete” and “actually doing something huge in finite time and resources.”
- Several argue that “any Turing-complete system can run Doom” is only meaningful if you can actually build it in a human lifetime; this project is cited as a rare case where someone pushed through that barrier.
- Others note this is the archetypal “Turing tarpit”: everything is possible, nothing is easy or efficient.
Implementation Details & Limits
- The core is a TS-types-only WASM runtime; Doom is compiled to WASM with its WAD data embedded.
- Rendering a single ~320p ASCII frame reportedly took about 12 days and ~177 TB of generated types; subsequent frames would still be on the order of an hour each. It’s not interactive or playable.
- Keyboard “input” is essentially tool-assisted: prerecorded key sequences encoded as type-level data (like TAS demos).
- No real audio; full real-time 30fps is fantasized as requiring enormous optimization and resources.
Motivation, Effort, and Personal Impact
- The author describes a year-long, near-obsessive effort driven by the desire to disprove that Doom could run in types, only to keep finding workarounds.
- Commenters highlight the persistence, self-directed learning, and deep knowledge of compilers, WASM, TypeScript internals, and performance gained along the way.
- Some note new tooling (especially type-checker performance benchmarking) as a concrete byproduct that could benefit the TS community.
Usefulness, Value, and Critiques
- Enthusiastic reactions frame the work as art, inspiration, and a demonstration of what obsessive curiosity can achieve.
- Skeptical voices call it a massive waste of time compared to building practical software; supporters counter with arguments about subjective value, learning, and indirect payoff.
TypeScript, Overengineering, and Hiring
- Thread branches into debates about TS as overengineered vs powerful, comparisons to Python’s runtime types, use of
any, and type-heavy libraries. - A major subthread discusses how someone capable of this still failed standard big-tech coding screens, fueling criticism of leetcode-style interviews as poor signals of real-world ability.