Numberwang (brainfuck derivative)

From Esolang
Jump to navigation Jump to search

Numberwang is a language based on Brainfuck. All commands consist of single numbers and is meant to produce code that appears extremely random and impossible to understand.

Commands

Numberwang's command set consists of the commands in Brainfuck, although as numbers, plus two additional commands to increase the apparent randomness of the finished code.

  • 0 - increment the pointer (to point to the next cell to the right)
  • 1 - decrement the pointer (to point to the next cell to the left)
  • 9 - increment (increase by one) the byte at the pointer
  • 2 - decrement (decrease by one) the byte at the pointer
  • 3 - output the value of the byte at the pointer
  • 8 - accept one byte of input, storing its value in the byte at the pointer.
  • 4 - start of loop, needs corresponding 7. Skips loop if active pointer equals 0
  • 7 - end of loop, needs corresponding 4. Exits when active pointer equals 0
  • 6 - directly increments the current pointer with the following number
  • 5 - directly decrements the current pointer with the following number

All other characters are considered comments.

Proof of Turing Completeness

Numberwang has a trivial mapping to Brainfuck:

Brainfuck command Numberwang equivalent
> 1
< 0
+ 9
- 2
. 3
, 8
[ 4
] 7

Hello world example

068416902713063416902719936733633069415902719930694169027166358363356358306841590271653

Alternative style: Hello, World!

69696969696969693696969623673363316969696968359533059595636969663633563583193

External resources