DOOM Runs on a Regular-Expression Engine

Translated by a model; the original is in Russian.

· Curiosities
Yet another demonstration that the classic shooter works anywhere: this time the computing environment is a regular-expression engine, where find-and-replace operations play the part of a processor.

cover.svg

The list of platforms on which people have managed to run DOOM has gained one more exotic entry. The project's author got id Software's legendary shooter to work on top of a regular-expression engine — the very mechanism normally used to search for and replace text.

The idea captured in the project's subtitle reads “find & replace as a computer.” Regular expressions were never meant to be a means of computation in themselves, but applying substitutions to a string over and over can model the workings of a perfectly capable computing machine. That is exactly the principle the demonstration is built on: the game's state is stored in a text string, and each step of the computation is another replace operation following a given pattern.

Experiments like this have long since become a genre of computer culture in their own right. “Will it run DOOM?” is a question enthusiasts ask about literally everything: from kitchen appliances and test strips to text editors and spreadsheets. The value here is not practical but exploratory and — why hide it — sporting: to prove that an environment utterly unsuited to games can, with enough ingenuity, still render the familiar corridors of Mars.

The speed, of course, leaves much to be desired — you can hardly expect smooth graphics from an engine grinding through text substitutions. But in projects like these what matters is the fact itself: if something can express computation at all, sooner or later DOOM will run on it. Regular expressions are now officially on that list.


Source: Lobsters

Comments

Sign in, to comment.

  • No comments yet.