language-icon Old Web
English
Sign In

Malbolge

Malbolge (/mælˈboʊldʒ/) is a public domain esoteric programming language invented by Ben Olmstead in 1998, named after the eighth circle of hell in Dante's Inferno, the Malebolge. Malbolge (/mælˈboʊldʒ/) is a public domain esoteric programming language invented by Ben Olmstead in 1998, named after the eighth circle of hell in Dante's Inferno, the Malebolge. Malbolge was specifically designed to be almost impossible to use, via a counter-intuitive 'crazy operation', base-three arithmetic, and self-altering code. It builds on the difficulty of earlier, challenging esoteric languages (such as Brainfuck and Befunge), but takes this aspect to the extreme, playing on the entangled histories of computer science and encryption. Despite this design, it is possible (though very difficult) to write useful Malbolge programs. Malbolge was so difficult to understand when it arrived that it took two years for the first Malbolge program to appear. Indeed, the author himself has never written a single Malbolge program. The first program was not written by a human being: it was generated by a beam search algorithm designed by Andrew Cooke and implemented in Lisp. Later, Lou Scheffer posted a cryptanalysis of Malbolge and provided a program to copy its input to its output. He also saved the original interpreter and specification after the original site stopped functioning, and offered a general strategy of writing programs in Malbolge as well as some thoughts on its Turing-completeness. Olmstead believed Malbolge to be a linear bounded automaton. There is a discussion about whether one can implement sensible loops in Malbolge — it took many years before the first non-terminating one was introduced. A correct 99 Bottles of Beer program, which deals with non-trivial loops and conditions, was not announced for seven years; the first correct one was by Hisashi Iizawa in 2005. Hisashi Iizawa et al. also proposed a guide for programming in Malbolge for the purpose of obfuscation for software protection. This Malbolge program displays 'Hello World!', with both words capitalized and exclamation mark at the end. This program reads a string from a user and prints that string, similar to Unix cat. Malbolge is machine language for a ternary virtual machine, the Malbolge interpreter. The standard interpreter and the official specification do not match perfectly. One difference is that the compiler stops execution with data outside the 33–126 range. Although this was initially considered a bug in the compiler, Ben Olmstead stated that it was intended and there was in fact 'a bug in the specification'.

[ "Algorithm", "Theoretical computer science", "Operating system", "Programming language" ]
Parent Topic
Child Topic
    No Parent Topic