Unlike

From Esolang
Jump to navigation Jump to search

Unlike is an esolang invented by User:None1, inspired by Brainfuck, Befunge-93 and Deadfish. It is named Unlike because it has something similar to the three esolangs.

Commands

Unlike uses these commands, its programs are on 2D grids, at the start of program, the IP's direction is right and is at the top-left.

Command Meaning
+       Like BF
-       Like BF
>       Like BF
<       Like BF
,       Input current cell as integer
.       Print current cell as integer
[       Jump to the matching ] at that line and change the IP's direction to right if the cell at the pointer is 0, otherwise IP's direction doesn't change.
]       Jump back to the matching [ at that line if the cell at the pointer is nonzero
^       Jump to the matching v at that column and change the IP's direction to down if the cell at the pointer is 0, otherwise IP's direction doesn't change.
v       Jump back to the matching ^ at that column if the cell at the pointer is nonzero
s       Squares current cell

In Unlike, every line must have [ and ] matched, and every column must have ^ and v matched. When the program goes out of bounds, it halts.

Like Brainfuck, Unlike uses an unbounded tape with wrapping bytes for memory. Unlike Brainfuck, Unlike is two-dimensional, and doesn't support character I/O.

Like Befunge-93, Unlike has its programs on 2D grids. Unlike Befunge-93, Unlike doesn't have any self-modifying commands, and uses bounded integers.

Like Deadfish, Unlike has a square command, and only supports integer output. Unlike Deadfish, Unlike has input and control flow.

Examples

XKCD Random Number

++++.

Truth Machine

Horizontal version:

,.[.]

Vertical version:

,^
 .
 v
 [].

Computational class

Any brainfuck program without redundant characters or I/O work the same, so it is Turing-complete.