4 ms·
A few errors: • There’s an & that should be either & or &, depending on whether it’s setting HTML or text. • The opening garbage text is mojibaked, so
by chrismorgan 5y ago
A few errors:
• There’s an & that should be either & or &, depending on whether it’s setting HTML or text.
• The opening garbage text is mojibaked, so that it looks like… different, not as æsthetically pleasing garbage.
• The text that’s supposed to be like “7 SYSTEM(S) STILL OFFLINE” is getting mangled badly, missing much of the string and getting a bunch of U+0000s in it—unchecked and incorrect string indexing, by the looks of it. Hmm… “1␀␀␀␀␀␀␀␀␀␀STIL1␀␀␀␀␀␀␀” actually looks like something’s clobbering the string literal stillOffline. Ouch; that actually worries me, though I hope it’s largely just a side-effect of some shortcuts taken to keep the code tiny and not something that would normally be an issue?
• terminal_text_outro has some double quotes that should be single quotes (apostrophes).
Other than that, seems to be working well.
- phoboslab 5y agoFor what it's worth, the original 13kb JS only version[1] does not have these problems. I was confused for a second why this game made its way to HN again (there's a making of for the game itself from 2018[2]). This seems to be a port of the game to D[3] as a demo for a WASM runtime, Spasm, which is also written in D[4]. [1] https://phoboslab.org/underrun/ https://phoboslab.org/underrun/ [2] https://news.ycombinator.com/item?id=18031024 https://news.ycombinator.com/item?id=18031024 [3] https://github.com/skoppe/spasm/tree/master/examples/underrun/source https://github.com/skoppe/spasm/tree/master/examples/underru... [4] https://github.com/skoppe/spasm https://github.com/skoppe/spasm