HOME

TheInfoList



OR:

An esoteric programming language (sometimes shortened to esolang) is a
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
designed to test the boundaries of computer programming language design, as a
proof of concept Proof of concept (POC or PoC), also known as proof of principle, is a realization of a certain method or idea in order to demonstrate its feasibility, or a demonstration in principle with the aim of verifying that some concept or theory has prac ...
, as
software art Software art is a work of art where the creation of software, or concepts from software, play an important role; for example software applications which were created by artists and which were intended as artworks. As an artistic discipline software ...
, as a hacking interface to another language (particularly
functional programming In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions tha ...
or
procedural programming Procedural programming is a programming paradigm, derived from imperative programming, based on the concept of the '' procedure call''. Procedures (a type of routine or subroutine) simply contain a series of computational steps to be carrie ...
languages), or as a joke. The use of the word ''
esoteric Western esotericism, also known as esotericism, esoterism, and sometimes the Western mystery tradition, is a term scholars use to categorise a wide range of loosely related ideas and movements that developed within Western society. These ideas ...
'' distinguishes them from languages that working developers use to write software. The creators of most esolangs do not intend them to be used for mainstream programming, although some esoteric features, such as visuospatial
syntax In linguistics, syntax () is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure ( constituenc ...
, have inspired practical applications in the arts. Such languages are often popular among hackers and hobbyists. Usability is rarely a goal for designers of esoteric programming languages; often their design leads to quite the opposite. Their usual aim is to remove or replace conventional language features while still maintaining a language that is
Turing-complete In computability theory, a system of data-manipulation rules (such as a computer's instruction set, a programming language, or a cellular automaton) is said to be Turing-complete or computationally universal if it can be used to simulate any ...
, or even one for which the computational class is unknown.


History

The earliest, and still the canonical example of an esoteric programming language, is INTERCAL, designed in 1972 by
Don Woods Donald Woods (1933–2001) was a South African journalist and activist. Donald or Don Woods may also refer to: * Donald Woods (actor) (1906–1998), Canadian-born American film and television actor * Donald Devereux Woods (1912–1964), British ...
and James M. Lyon, who said that their intention was to create a programming language unlike any with which they were familiar. It
parodied A parody, also known as a spoof, a satire, a send-up, a take-off, a lampoon, a play on (something), or a caricature, is a creative work designed to imitate, comment on, and/or mock its subject by means of satiric or ironic imitation. Often its sub ...
elements of established programming languages of the day such as Fortran,
COBOL COBOL (; an acronym for "common business-oriented language") is a compiled English-like computer programming language designed for business use. It is an imperative, procedural and, since 2002, object-oriented language. COBOL is primarily u ...
and
assembly language In computer programming, assembly language (or assembler language, or symbolic machine code), often referred to simply as Assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence b ...
. For many years, INTERCAL was represented only by paper copies of the INTERCAL manual. Its revival in 1990 as an implementation in C under
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, ...
stimulated a wave of interest in the intentional design of esoteric computer languages. In 1993, Wouter van Oortmerssen created FALSE, a small
stack-oriented programming language Stack-oriented programming, is a programming paradigm which relies on a stack machine model for passing parameters. Stack-oriented languages operate on one or more stacks, each of which may serve a different purpose. Programming constructs i ...
with syntax designed to make the code inherently obfuscated, confusing and unreadable. Its compiler is only 1024 bytes in size. This inspired Urban Müller to create an even smaller language, the now-infamous
Brainfuck Brainfuck is an esoteric programming language created in 1993 by Urban Müller. Notable for its extreme minimalism, the language consists of only eight simple commands, a data pointer and an instruction pointer. While it is fully Turing com ...
, which consists of only eight recognized characters. Along with Chris Pressey's
Befunge Befunge is a two-dimensional stack-based, reflective, esoteric programming language. It differs from conventional languages in that programs are arranged on a two-dimensional grid. "Arrow" instructions direct the control flow to the left, ri ...
(like FALSE, but with a two-dimensional instruction pointer), Brainfuck is now one of the best-supported esoteric programming languages, with canonical examples of minimal
Turing tarpit A Turing tarpit (or Turing tar-pit) is any programming language or computer interface that allows for flexibility in function but is difficult to learn and use because it offers little or no support for common tasks. The phrase was coined in 198 ...
s and needlessly obfuscated language features. Brainfuck is related to the
P′′ P′′ (P double prime) is a primitive computer programming language created by Corrado BöhmBöhm, C.: "On a family of Turing machines and the related programming language", ICC Bull. 3, 185-194, July 1964.Böhm, C. and Jacopini, G.: "Flow dia ...
family of
Turing machine A Turing machine is a mathematical model of computation describing an abstract machine that manipulates symbols on a strip of tape according to a table of rules. Despite the model's simplicity, it is capable of implementing any computer alg ...
s.


Common 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 Brainfuck is an esoteric programming language created in 1993 by Urban Müller. Notable for its extreme minimalism, the language consists of only eight simple commands, a data pointer and an instruction pointer. While it is fully Turing com ...
and
Malbolge Malbolge () 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. It was specifically designed to be almost impossible to use, via a cou ...
only permit data to be read through a single pointer, which must be moved to a location of interest before data is read. Others, like
Befunge Befunge is a two-dimensional stack-based, reflective, esoteric programming language. It differs from conventional languages in that programs are arranged on a two-dimensional grid. "Arrow" instructions direct the control flow to the left, ri ...
and
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 nation ...
, utilize one or more stacks to hold data, leading to a manner of execution akin to
Reverse Polish notation Reverse Polish notation (RPN), also known as reverse Łukasiewicz notation, Polish postfix notation or simply postfix notation, is a mathematical notation in which operators ''follow'' their operands, in contrast to Polish notation (PN), in wh ...
. Finally, there are languages which explore alternative forms of number representation: the Brainfuck variant Boolfuck only permits operations on single bits, while Malbolge and INTERCAL variant TriINTERCAL replace bits altogether with a base 3 ternary system.Morr, Sebastian. "Esoteric Programming Languages." (2015).


Unique instruction representations

Esoteric languages also showcase unique ways of representing program instructions. Some languages, such as
Befunge Befunge is a two-dimensional stack-based, reflective, esoteric programming language. It differs from conventional languages in that programs are arranged on a two-dimensional grid. "Arrow" instructions direct the control flow to the left, ri ...
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 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 nation ...
achieves this by making all programs resemble Shakespearian plays.
Chef A chef is a trained professional cook and tradesman who is proficient in all aspects of food preparation, often focusing on a particular cuisine. The word "chef" is derived from the term ''chef de cuisine'' (), the director or head of a ki ...
achieves the same by having all programs be recipes. Chef is particularly notable in that some have created programs that successfully function both as a program and as a recipe, demonstrating the ability of the language to produce this double meaning.


Difficulty to read and write

Many esoteric programming languages are designed to produce code that is deeply
obfuscated Obfuscation is the obscuring of the intended meaning of communication by making the message difficult to understand, usually with confusing and ambiguous language. The obfuscation might be either unintentional or intentional (although intent us ...
, 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 Malbolge () 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. It was specifically designed to be almost impossible to use, via a cou ...
for instance was explicitly designed to be challenging, and so it has features like
self-modifying code In computer science, self-modifying code (SMC) is code that alters its own instructions while it is executing – usually to reduce the instruction path length and improve performance or simply to reduce otherwise repetitively similar code, ...
and highly counterintuitive operations. On the other hand, some esoteric languages become difficult to write due to their other design choices.
Brainfuck Brainfuck is an esoteric programming language created in 1993 by Urban Müller. Notable for its extreme minimalism, the language consists of only eight simple commands, a data pointer and an instruction pointer. While it is fully Turing com ...
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, and
COBOL COBOL (; an acronym for "common business-oriented language") is a compiled English-like computer programming language designed for business use. It is an imperative, procedural and, since 2002, object-oriented language. COBOL is primarily u ...
. INTERCAL's rules appear to be the inverse of rules in these other languages. However, the subject of parody is not always another established programming language.
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 nation ...
can be viewed as spoofing the structure of Shakespearean plays, for instance. The language Ook! is a parody of
Brainfuck Brainfuck is an esoteric programming language created in 1993 by Urban Müller. Notable for its extreme minimalism, the language consists of only eight simple commands, a data pointer and an instruction pointer. While it is fully Turing com ...
, where Brainfuck's 8 commands are replaced by various orangutang sounds like "Ook. Ook?"


Examples


Befunge

Befunge Befunge is a two-dimensional stack-based, reflective, esoteric programming language. It differs from conventional languages in that programs are arranged on a two-dimensional grid. "Arrow" instructions direct the control flow to the left, ri ...
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 ^. "dlroW olleH">:v ^,_@ There are many versions of Befunge, the most common being Befunge-93.


Binary lambda calculus

Binary lambda calculus is designed from an
algorithmic information theory Algorithmic information theory (AIT) is a branch of theoretical computer science that concerns itself with the relationship between computation and information of computably generated objects (as opposed to stochastically generated), such as str ...
perspective to allow for the densest possible code with the most minimal means, featuring a 29-byte self interpreter, a 21-byte prime number sieve, and a 112-byte Brainfuck interpreter.


Brainfuck

Brainfuck Brainfuck is an esoteric programming language created in 1993 by Urban Müller. Notable for its extreme minimalism, the language consists of only eight simple commands, a data pointer and an instruction pointer. While it is fully Turing com ...
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 Stack-oriented programming, is a programming paradigm which relies on a stack machine model for passing parameters. Stack-oriented languages operate on one or more stacks, each of which may serve a different purpose. Programming constructs i ...
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 example
Hello World program ''Hello'' is a salutation or greeting in the English language. It is first attested in writing from 1826. Early uses ''Hello'', with that spelling, was used in publications in the U.S. as early as the 18 October 1826 edition of the '' Norwich ...
with "101 eggs" and "111 cups oil" would produce "a lot of food for one person."


FRACTRAN

A FRACTRAN program is an ordered list of positive fractions together with an initial positive integer input n. The program is run by multiplying the integer n by the first fraction f in the list for which nf is an integer. The integer n is then replaced by nf and the rule is repeated. If no fraction in the list produces an integer when multiplied by n, the program halts. FRACTRAN was invented by mathematician John Conway.


GolfScript

Programs in GolfScript, a language created for
code golf Code golf is a type of recreational computer programming competition in which participants strive to achieve the shortest possible source code that solves a certain problem.Code Golf Stack ExchangeAbout code-golf Retrieved 2021-12-21. Code golf ch ...
, consist of lists of items, each of which is pushed onto the
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 ...
as it is encountered, with the exception of variables which have code blocks as their value, in which case the code is executed.


INTERCAL

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 JSFuck is an esoteric subset of JavaScript, where code is written using only six characters: ,_.html" ;"title="/code>, ">/code>, /code>, (, ), !, and +. The name is derived from Brainfuck, an esoteric programming language that also uses a minimal ...
is an esoteric programming style of
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of websites use JavaScript on the client side for webpage behavior, of ...
, 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 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 o ...
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 (laug ...
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 comput ...
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 conver ...
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 Malbolge () 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. It was specifically designed to be almost impossible to use, via a cou ...
(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
bitmap In computing, a bitmap is a mapping from some domain (for example, a range of integers) to bits. It is also called a bit array or bitmap index. As a noun, the term "bitmap" is very often used to refer to a particular bitmapping application: t ...
s 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 1 ...
. 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 nation ...
is designed to make programs look like
Shakespearean 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 ...
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
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 computati ...
s and imperative I/O (with input usually requiring the use of continuations).


Whitespace

Whitespace 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 i ...
. 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