History
The earliest, and still the canonical example of an esoteric programming language, is INTERCAL, designed in 1972 by Don Woods and James M. Lyon, who said that their intention was to create a programming language unlike any with which they were familiar. ItCommon features
While esoteric programming languages differ in many ways, there are some common traits that characterize many languages, such as parody, minimalism, and the goal of making programming difficult.Unique data representations
Conventional imperative programming languages typically allow data to be stored in variables, but esoteric languages may utilize different methods of storing and accessing data. Languages like Brainfuck and Malbolge only permit data to be read through a singleUnique instruction representations
Esoteric languages also showcase unique ways of representing program instructions. Some languages, such as Befunge and Piet, represent programs in two or more dimensions, with program control moving around in multiple possible directions through the program. This differs from conventional languages in which a program is a set of instructions usually encountered in sequence. Other languages modify instructions to appear in an unusual form, often one that can be read by humans with an alternate meaning to the underlying instructions. Shakespeare achieves this by making all programs resemble Shakespearian plays.Difficulty to read and write
Many esoteric programming languages are designed to produce code that is deeply obfuscated, making it difficult to read and to write.Mateas, M. and Montfort, N. A Box, Darkly: Obfuscation, Weird Languages, and Code Aesthetics. In ''Digital Arts and Culture: Digital Experience: Design, Aesthetics, Practice'' ''(DAC 2005)'', Copenhagen, Denmark, 2005. The purpose of this may be to provide an interesting puzzle or challenge for program writers: Malbolge for instance was explicitly designed to be challenging, and so it has features like self-modifying code and highly counterintuitive operations. On the other hand, some esoteric languages become difficult to write due to their other design choices. Brainfuck is committed to the idea of a minimalist instruction set, so even though its instructions are straightforward in principle, the code that arises is difficult for a human to read. INTERCAL's difficulty arises as a result of the choice to avoid operations used in any other programming language, which stems from its origin as a parody of other languages.Parody and spoof
One of the aims of esoteric programming languages is to parody or spoof existing languages and trends in the field of programming. For instance, the first esoteric language INTERCAL began as a spoof of languages used in the 1960's, such as APL, Fortran, andExamples
Befunge
Befunge allows the instruction pointer to roam in multiple dimensions through the code. For example, the following program displays "Hello World" by pushing the characters in reverse order onto the stack, then printing the characters in a loop which circulates clockwise through the instructions>
, :
, v
, _
, ,
, and ^
.
Binary lambda calculus
Brainfuck
Brainfuck is designed for extreme minimalism and leads to obfuscated code, with programs containing only eight distinct characters. The following program outputs "Hello, world!":Chicken
Chicken has just three tokens, the word "chicken", " ", and "\n". The compiler interprets the amount of "chickens" on a line as an opcode instruction which it uses to manipulate data on a stack. A simple chicken program can contain dozens of lines with nothing but the word "chicken" repeated countless times. Chicken was invented by Torbjörn Söderstedt who drew his inspiration for the language from a parody of a scientific dissertation.Chef
Chef is aFRACTRAN
A FRACTRAN program is an ordered list of positive fractions together with an initial positive integer input . The program is run by multiplying the integer by the first fraction in the list for which is an integer. The integer is then replaced by and the rule is repeated. If no fraction in the list produces an integer when multiplied by , the program halts. FRACTRAN was invented by mathematician John Conway.GolfScript
Programs in GolfScript, a language created for code golf, consist of lists of items, each of which is pushed onto theINTERCAL
INTERCAL, short for "Compiler Language With No Pronounceable Acronym", was created in 1972 as a parody to satirize aspects of the various programming languages at the time.JSFuck
JSFuck is an esoteric programming style of JavaScript, where code is written using only six characters: , ">/code>,
/code>, (
, )
, !
, and +
.
Unlike Brainfuck, which requires its own compiler or interpreter, JSFuck is valid JavaScript code, meaning JSFuck programs can be run in any web browser or engine that interprets JavaScript.
LOLCODE
LOLCODE
LOLCODE is an esoteric programming language inspired by lolspeak, the language expressed in examples of the lolcat Internet meme. The language was created in 2007 by Adam Lindsay, a researcher at the Computing Department of Lancaster Universi ...
is designed to resemble the speech of lolcat
A lolcat (pronounced ), or LOLcat, is an image macro of one or more cats. Lolcat images' idiosyncratic and intentionally grammatically incorrect text is known as lolspeak.
Lolcat is a compound word of the acronymic abbreviation LOL (laugh out ...
s. The following is the "Hello World" example:
HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE
While the semantics of LOLCODE is not unusual, its syntax has been described as a linguistic phenomenon, representing an unusual example of informal speech
Colloquialism (), also called colloquial language, everyday language or general parlance, is the linguistic style used for casual (informal) communication. It is the most common functional style of speech, the idiom normally employed in conversa ...
and internet slang
Internet slang (also called Internet shorthand, cyber-slang, netspeak, digispeak or chatspeak) is a non-standard or unofficial form of language used by people on the Internet to communicate to one another. An example of Internet slang is "LOL" m ...
in programming.
Malbolge
Malbolge (named after the 8th circle of Hell) was designed to be the most difficult and esoteric programming language. Among other features, code is self-modifying by design and the effect of an instruction depends on its address in memory.
Piet
Piet is a language designed by David Morgan-Mar, whose programs are bitmaps that look like abstract art
Abstract art uses visual language of shape, form, color and line to create a composition which may exist with a degree of independence from visual references in the world.
Western art had been, from the Renaissance up to the middle of the 19th ...
.
The execution is guided by a "pointer" that moves around the image, from one continuous coloured region to the next. Procedures are carried out when the pointer exits a region.
There are 20 colours for which behaviour is specified: 18 "colourful" colours, which are ordered by a 6-step hue cycle and a 3-step brightness cycle; and black and white, which are not ordered. When exiting a "colourful" colour and entering another one, the performed procedure is determined by the number of steps of change in hue and brightness. Black cannot be entered; when the pointer tries to enter a black region, the rules of choosing the next block are changed instead. If all possible rules are tried, the program terminates. Regions outside the borders of the image are also treated as black. White does not perform operations, but allows the pointer to "pass through". The behaviour of colours other than the 20 specified is left to the compiler or interpreter.
Variables are stored in memory as signed integers in a single stack
Stack may refer to:
Places
* Stack Island, an island game reserve in Bass Strait, south-eastern Australia, in Tasmania’s Hunter Island Group
* Blue Stack Mountains, in Co. Donegal, Ireland
People
* Stack (surname) (including a list of people ...
. Most specified procedures deal with operations on that stack, while others deal with input/output and with the rules by which the compilation pointer moves.
Piet was named after the Dutch painter Piet Mondrian
Pieter Cornelis Mondriaan (), after 1906 known as Piet Mondrian (, also , ; 7 March 1872 – 1 February 1944), was a Dutch painter and art theoretician who is regarded as one of the greatest artists of the 20th century. He is known for being ...
. The original intended name, ''Mondrian'', was already taken by an open-source statistical data-visualization system.
Rockstar
Rockstar is a computer programming language designed for creating programs that are also hair metal power ballads created by Dylan Beattie.
Shakespeare
Shakespeare is designed to make programs look like Shakespearean plays. For example, the following statement declares a point in the program which can be reached via a GOTO-type statement:
Act I: Hamlet's insults and flattery.
Unlambda
Unlambda is a minimalist functional programming language based on SKI calculus
The SKI combinator calculus is a combinatory logic system and a computational system. It can be thought of as a computer programming language, though it is not convenient for writing software. Instead, it is important in the mathematical theory o ...
, but combined with first-class continuations and imperative I/O (with input usually requiring the use of continuations).
Whitespace
Whitespace
White space or whitespace may refer to:
Technology
* Whitespace characters, characters in computing that represent horizontal or vertical space
* White spaces (radio), allocated but locally unused radio frequencies
* TV White Space Database, a mec ...
uses only whitespace characters (space, tab, and return), ignoring all other characters, which can therefore be used for comments. This is the reverse of many traditional languages, which do not distinguish between different whitespace characters, treating tab and space the same. It also allows Whitespace programs to be hidden in the source code of programs in languages like C.
Cultural context
The cultural context of esolangs has been studied by Geoff Cox, who writes that esolangs "shift attention from command and control toward cultural expression and refusal", seeing esolangs as similar to code art and code poetry, such as Mez Breeze's mezangelle
mezangelle is a poetic-artistic language developed in the 1990s by Australian-based Internet artist Mez Breeze (Mary-Anne Breeze). It is recognized as a central contribution to Codework, Electronic literature, Internet Art and digital writing in ...
. Daniel Temkin describes Brainfuck as "refusing to ease the boundary between human expression and assembly code and thereby taking us on a ludicrous journey of logic," exposing the inherent conflict between human thinking and computer logic. He connects programming within an esolang to performing an event score such as those of the Fluxus movement, where playing out the rules of the logic in code makes the point of view of the language clear.
References
Bibliography
*
*
*
External links
Esolang, the esoteric programming languages wiki
*
{{DEFAULTSORT:Esoteric Programming Language
Programming language classification
Computer humor