Befunge–93 (25 Years of)

esoteric-codes:

image

Chris Pressey, esolang pioneer, has posted notes marking the 25 year anniversary of his revolutionary creation, Befunge-93.

The appearance of Befunge, alongside FALSE (by Wouter van Oortmerssen, interviewed here) and brainfuck, all in 1993, proved to be the watershed moment for language experimentalism that would eventually become a movement (joinging INTERCAL which had been recently revived). The term esolang (or even “esoteric programming language”) would appear years later, its first use on the Befunge mailing list, where much of the early discussions of the form took place.

Pressey’s notes offer some lesser-known aspects of the language, but also an occasion to newly consider it apart from its influence and legacy. The impetus for Befunge was to design the language most difficult to write a compiler for, similar to brainfuck’s conceit as the Turing Complete language for which the smallest compiler could be written (Turing Complete is essential – the compiler for, say, Unnecessary or other languages that challenge basic assumptions of what’s required to make a language, would be much smaller). Compiling code is the act of translating from a source language into a target language, usually machine code. Befunge challenges this in two ways. First, its most famous feature, it’s a 2D language, so code is not read linearly (left-to-right, top-to-bottom), but sometimes vertically, sometimes backwards, and sometimes off the page on the right side, to appear on the left, like a Pac Man board (thus giving the program space a toroidal topology). While that makes it challenging to do AOT compilation, probably the second feature is even more challenging: it’s self-altering, meaning it changes its own source code as it runs. Writing an interpreter for Befunge, however is far easier; the interpreter written (by Pressey) in VB.NET is concise. An interpreter executes as it runs, taking away this difficulty, although interpreters are often slower (interpreted languages include Javascript and Python).  There are also Befunge pseudo-compilers.

More…