Regimin

From Esolang
Jump to navigation Jump to search

Regimin is a minimal 2D Turing-complete esolang by User:PythonshellDebugwindow.

Program format

The program is expected to be a perfect square. Whitespace is ignored by the interpreter, and so can be used for formatting.

Registers

The three registers are arbitrary signed integers.

Instruction pointer

The IP gets stuck on the end, so this:

>

would be an infinite loop, the IP moving right and hitting a wall.

Instructions

^>v< : direction change
1 : increment register 1
2 : increment register 2
3 : increment register 3
4 : decrement register 1
5 : decrement register 2
6 : decrement register 3
7 : conditional skip for register 1
8 : conditional skip for register 2
9 : conditional skip for register 3

Conditional skips skip the next instruction in the current direction if register N is 0.

Examples

Set the registers to 0 each:

>7v>8v>9v
  4  5  6
^ <^ <^ <

Computational class

Regimin is Turing-complete through prime factorization, and the conditional skips provide enough flow control.

External resources

  • A graphical interpreter written in Python that displays the IP's path and the registers on every tick