From Esolang
Jump to: navigation, search

For the brainfuck derivative, see Numberwang (brainfuck derivative).

NB: This language's specifications were changed on the 8th of August 2011.

Numberwang is a language created by Nathan van Doorn. It is inspired by Malbolge, Wang's basic machine B, and That Mitchell and Webb Look.

Programs in Numberwang are stored as a sequence of terminating decimals, delimited by "!". Whitespace is ignored.

Memory is stored on a bidirectionally unbounded tape, much like that esoteric programming language with derivatives that everyone loves to hate, brainfuck. Each cell has two possible values: marked, and unmarked.

At each step, the digital root of the sum of the current command, its position in the program, and the step number is calculated. The result modulo four is taken, and the appropriate instruction is ran:

0 Move the tape-head left.
1 Move the tape-head right
2 The goto operation: goes to the command with the place in the program equal to the current command mod the length of the program, if the current cell is marked. Going to a non-integer place in the program interpolates the neighbouring commands linearly, with the next command being at the subsequent integer position.
3 iiiiiit's NUMBERWANG! Flip cell (if it's marked, unmark, and vice versa). Then the Numberwang program "12! 4.4! 92! 10! 49.8! 2! 2! 2!" is executed using the current tape and step count.

The step number and command position all start at zero.

Computational Class

The computational class of Numberwang is unknown, but it is believed to be Turing-Complete.

See also