2iota

From Esolang
Jump to navigation Jump to search

2iota is an esoteric programming language devised by Chris Pressey in 2004. The successor to beta-Juliet and Portia, it is fairly minimal, aiming to be an event-oriented Turing tarpit.

Etymology

The name 2iota, like the names of beta-Juliet and Portia, comes from a "alphabetical" pun on the name of a make of car. It is pronounced like "too-eye-OH-tah" /tu:.aı.oʊ.ta/.

There is no relationship between 2iota and Iota, nor between 2iota and Biota.

Language description

A 2iota program consists of a set of events. Each event is named by a string of one or more symbols and optionally a pattern. Each event also names what events it causes in a chain reaction.

A program can also define one or more finite alphabets. If the symbols in the name of an event are members of an alphabet, they can be 'incremented' and 'decremented'.

Example programs

The following program implements a 1Hz "clock":

event Oscillator goes High, causes Oscillator goes Low after 0.5 s;
event Oscillator goes Low, causes Oscillator goes High after 0.5 s.

Computational class

Unlike beta-Juliet (which lacked patterns) and Portia (which allowed only a finite expansion of patterns), 2iota allows a technique something like Gödel numbering to construct names of events; in this manner concepts such as an (unboundedly) "next" event can be named, as illustrated in the following example.

alphabet DominoNumber,
    One, Two, Three, Four, Five, Six, Seven;

event Begin,
    causes Domino One Falls;
event Domino (N = DominoNumber+) Falls,
    causes Domino (succ N) Falls.

Since this implements a simple (runaway!) unbounded counter, the author suspects 2iota to be Turing-complete through reduction from a Minsky machine. This has not yet been formally proven, however.

External resources