Hacker News new | past | comments | ask | show | jobs | submit login

Wow.

I still don't quite understand what it means to run Doom in the type system. I can sort of get how you might trick it into doing some calculations and generating some ASCII art. But how do you get tsc to access the audio system or load files etc?




I don't think it's actually playing audio or loading files. The required game data (.WAD) was presumably pre-transformed into the encoding that the virtual machine uses for data and passed to the program as type-level "input".

Edit: Playing music isn't really relevant here anyway given that it took 17 days to load the level and display the first frame, and that's as far as the author took it. He says that subsequent frames would likely have "only" taken an hour or so each - giving about 0.0003 fps.


no audio - correct. technically, in a certain sense, the first frame will contain only one sample of audio, and I did consider that, but a single impulse is the definition of "juice wasn't worth the squeeze", haha.

re the .WAD - the types-only-wasm-engine doesn't know anything at all about Doom (it only knows about what to do with WebAssembly) so actually the .wad is embedded in the WebAssembly exactly like you see in any regular WebAssembly Doom project (e.g. https://diekmann.github.io/wasm-fizzbuzz/doom). There's more to say about what "the WAD" means in this case, because it's a very minimal WAD - but it's all open source and I'll be explaining that in great depth soon!


At 17TB, trillions of types, and a year of 18h days my guess is he got very creative.


*177TB, according to the video.



A WASM VM is just “some calculations,” really.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: