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.Difficulty to read and write
Many esoteric programming languages are designed to produce code that is deeplyParody 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
Binary lambda calculus is designed from anBrainfuck
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 a stack-oriented programming language created by David Morgan-Mar, designed to make programs look like cooking recipes. Programs consist of a title, a list of variables and their data values, and a list of stack manipulation instructions. A joking design principle states that "program recipes should not only generate valid output, but be easy to prepare and delicious", and Morgan-Mar notes that an exampleFRACTRAN
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 , ">/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
A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used on ...
or engine that interprets JavaScript.
LOLCODE
LOLCODE 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 ...
s. The following is the "Hello World" example:
HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE
While the semantics
Semantics (from grc, σημαντικός ''sēmantikós'', "significant") is the study of reference, meaning, or truth. The term can be used to refer to subfields of several distinct disciplines, including philosophy, linguistics and compu ...
of LOLCODE is not unusual, its syntax has been described as a linguistic
Linguistics is the scientific study of human language. It is called a scientific study because it entails a comprehensive, systematic, objective, and precise analysis of all aspects of language, particularly its nature and structure. Linguis ...
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" ...
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.
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 o ...
. 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
William Shakespeare ( 26 April 1564 – 23 April 1616) was an English playwright, poet and actor. He is widely regarded as the greatest writer in the English language and the world's pre-eminent dramatist. He is often called England's natio ...
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, but combined with first-class continuation
In computer science, a continuation is an abstract representation of the control state of a computer program. A continuation implements ( reifies) the program control state, i.e. the continuation is a data structure that represents the computat ...
s 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
Mez Breeze is an Australian-based artist and practitioner of net.art, working primarily with code poetry, electronic literature, mezangelle, and digital games. Born Mary-Anne Breeze, she uses a number of avatar nicknames, including Mez and Net ...
'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
Fluxus was an international, interdisciplinary community of artists, composers, designers and poets during the 1960s and 1970s who engaged in experimental art performances which emphasized the artistic process over the finished product. 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