Etre is a minimalistic Turing-complete esolanguage, designed by Keymaker in 2013.

The language uses three characters, which form two instructions: '-' and '()'. The memory is a finite binary array (or a string, it does not matter how it is thought of) with no limit to its growth. Initially it has the length of 1, and the only cell has value 0. Memory pointer is initially pointing to this first (and only) cell.

() form loops which may be nested up to any level. Parentheses cannot be mismatching. Whenever a loop is encountered, it first flips the current memory cell (0 to 1, 1 to 0). Then, the loop is repeated as long as the current cell is 1. The code inside the loop may thus be never be executed, if the current cell happens to be 1 and the flipping makes it 0.

- moves the memory pointer one right. If the pointer goes out of array bounds, it is moved back to the very first cell on left, and a new cell (with value of 0) is added to the right end of the array.

Execution halts if the instruction pointer goes past the last instruction.

An example program:


would begin to expand memory with 1s, never terminating. "----" first expands the memory to length of three and moves memory pointer to second cell. The outernmost loop "(.........)" is infinite, initially flipping 0 to 1, always starting and ending at the second cell. "()(-)" moves pointer to the zero cell at the right end of memory (in it "()" first flips the cell that is known to be 1 into 0, then "(-)" flips that cell back to 1 and loops the contents of the loop, "-", as long as possible). Then, "(-)" makes the last cell (that is 0) into 1 and starts looping the "-" -- which is executed only once: as the memory pointer is currently at the last cell, it is wrapped back to the first cell and a new 0-cell is added to the very end of memory. Since the first cell is 0, loop ends there. The last "-" of the program moves the memory pointer to the second cell, where the main loop starts again.

The Turing-completeness of the language can be shown with Minsky Machine translation. The translator can be found here. An example MM here, its Etre equivalent here (17 MM instructions became 5877 characters of Etre, so this might not be the most efficient translation possible!). Note that the translator expects a MM program to have its instruction lines sequentially, with no gaps in between the line numbers. So use line numbers 1, 2, 3, 4, and so on in the order 1, 2, 3, 4, and so on.

An interpreter written in C can be found here. It recognizes two debug commands (interpreter specific, not part of the language) that may be helpful (since the language has no I/O): 'C' prints the current memory state, 'Q' halts execution and prints the current memory state. If the MM-to-Etre translator is run with extra arguments (can be anything), it adds one 'C' debug character to the resulting Etre program. This debug character will be executed at the end of every cycle, enabling easy inspection of program memory.

-- Keymaker, 20.11.2013