{"rewrite":{"id":"r_cb503945f7db06ae89d3f136","clusterId":"c_6e0bd379a58437931382f1be","slug":"programmer-runs-doom-with-544-regex-rules-one-frame-takes-minutes","model":"deepseek-v4-flash:free","headline":"Programmer Runs Doom With 544 Regex Rules, One Frame Takes Minutes","summary":"A programmer named Artem Lytkin has created 'doom-regex', a project that runs the classic FPS DOOM using only regular expressions. The entire machine state is encoded in a 96.6 MB string, and 544 replacement rules process it step by step. Each frame takes about three minutes, making real-time play impractical.","whyItMatters":"The project demonstrates that DOOM can run through pure string rewriting, relying on the Turing completeness of regular expressions, which is a notable technical curiosity in the long history of unusual DOOM ports.","webCardHtml":"\u003cp\u003eThe project, announced on Reddit on July 26, encodes the entire virtual machine state, including CPU registers, memory, and frame buffer, into a single 96.6 MB string. A set of 544 regular expression replacement rules, applied in fixed order, simulate each CPU instruction. For example, a MOVI instruction is matched by a rule that reads the destination register and immediate value from the string, then rewrites the register and advances the phase counter.\u003c/p\u003e\u003cp\u003eThere is no interpreter or arithmetic outside the rules; the driver simply applies replacements. The approach works because string rewriting with regular expressions is Turing complete. A playable demo for Windows and the source code are available on GitHub, though the rendering speed of roughly three minutes per frame limits it to a technical demonstration rather than a playable experience.\u003c/p\u003e","blueskyPost":"Doom's regex port encodes the whole machine state in a 96.6 MB string. At three minutes per frame, it is more a proof of computation than a way to play.","twitterPost":"Doom's regex port runs at three minutes per frame. It is a proof of computation, not a way to play.","threadsPost":"Artem Lytkin's doom-regex runs Doom through 544 replacement rules on a 96.6 MB string. At three minutes per frame, it is less a playable port and more a demonstration of how much state a regular expression can carry.","newsletterBlurb":"A programmer has built doom-regex, a project that runs DOOM using only regular expressions. The entire machine state is a 96.6 MB string, processed by 544 replacement rules. Each frame takes about three minutes, so it is more a proof of concept than a playable port.","attributionJson":"[{\"source\":\"Automaton\",\"url\":\"https://automaton-media.com/articles/newsjp/doom-20260731-457668/\",\"title\":\"Someone manages to contain 'DOOM' in a 'single giant string'. Forcibly runs it with 'regular expressions', taking about 3 minutes per frame\"}]","lintFlagsJson":null,"lintHits":0,"costUsd":0,"inputTokens":4781,"outputTokens":616,"status":"published","repairAttempts":0,"nextRepairAt":null,"factsAttemptedAt":1786125002,"createdAt":"2026-08-07T17:35:08.000Z","publishedAt":"2026-08-07T17:36:44.000Z","updatedAt":"2026-08-07T17:35:08.000Z"},"cluster":{"id":"c_6e0bd379a58437931382f1be","canonicalTitle":"『DOOM』を“ひとつの巨大文字列”に封じ込める人あらわる。「正規表現」で無理やり動作、1フレームにつき約3分かかる","representativeArticleId":"a_db10ed3204c73f5680e50856","sourceCount":1,"writtenSourceCount":1,"writeAttempts":0,"isSolo":true,"entitiesJson":"{\"anime_titles\":[],\"manga_titles\":[],\"work_titles\":[\"DOOM\"],\"studios\":[],\"people\":[],\"type\":\"news\",\"domain\":\"games\",\"is_roundup\":false}","contentType":"news","status":"published","firstSeenAt":"2026-07-31T10:19:03.000Z","lastSeenAt":"2026-07-31T10:19:03.000Z","updatedAt":"2026-08-07T17:36:44.000Z"},"attribution":[{"source":"Automaton","url":"https://automaton-media.com/articles/newsjp/doom-20260731-457668/","title":"『DOOM』を“ひとつの巨大文字列”に封じ込める人あらわる。「正規表現」で無理やり動作、1フレームにつき約3分かかる"}],"entities":{"anime_titles":[],"manga_titles":[],"work_titles":["DOOM"],"studios":[],"people":[],"type":"news","domain":"games","is_roundup":false},"keyFacts":null}
