NULL-NONE NOTHING
Three words for nothing, joined by dashes, are the whole vocabulary.
Xi-816 · Turing complete: unknown · ●●○ moderate · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
Xi-816 made NULL-NONE NOTHING. A command is a comboword of two to four of the words NULL, NONE and NOTHING joined by dashes, and spaces separate the combowords. The machine has a 50 by 50 grid of cells, a pointer with an x and a y, and a stack. It has no input and no output, so a program can only change its own memory.
Read the story
The specification gives a brainfuck version, NULL-NONE-BF. It uses only NULL and NONE, three to a comboword, for the eight brainfuck commands, and that version can print. This implementation runs both. A program made only of those eight combowords is NULL-NONE-BF.
The machine
| Comboword | Does |
|---|---|
NULL-NOTHING NULL-NONE | Add 1 to x, take 1 from x |
NONE-NOTHING NONE-NONE | Add 1 to y, take 1 from y |
NOTHING-NONE-NONE NOTHING-NONE-NULL | Increment, decrement the cell |
NOTHING-NULL-NONE | Push the cell |
NULL-NULL-NOTHING NULL-NULL-NONE NULL-NULL-NULL | Pop, duplicate, swap |
NULL-NULL-NULL-NULL | Set the cell to the top of the stack |
NOTHING-NOTHING | A label |
NOTHING-NOTHING-NOTHING NOTHING-NULL-NULL | If the cell is not 0, go forward or back to the n-th nearest label |
The n of a jump is the top of the stack. The specification only says pop for NULL-NULL-NOTHING, so a jump and NULL-NULL-NULL-NULL read the top without taking it.
NULL-NONE-BF.
| Comboword | brainfuck |
|---|---|
NULL-NULL-NULL NULL-NULL-NONE | + - |
NULL-NONE-NULL NULL-NONE-NONE | < > |
NONE-NULL-NULL NONE-NULL-NONE | . , |
NONE-NONE-NULL NONE-NONE-NONE | [ ] |
Example
Six times seven is 42, the code of a star.
Six times seven is 42, the code of a star. In brainfuck this is ++++++[>+++++++<-]>., twenty combowords.
The cat is ,[.,]. It stops at a null character, and also at the end of the input.
The Hello World! takes 106 combowords. The specification's own NULL-NONE NOTHING example puts 2 in the first cell, pushes it and jumps forward past two labels, which skips a duplication. It prints nothing, as every program in that version does.
Patterns it teaches
- Encoding tricks: brainfuck spelled in two words.
- Stack machines: the stack holds the jump distances.
- Camouflage: a program reads as a list of words for nothing.
See also
NULL-NONE NOTHING builds on Brainfuck.
Brainfuck derivatives
Cell-based
Write your own in Run Convert a program from NULL-NONE NOTHING
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: null-none-nothing.
Command line
shib run null-none-nothing -e 'NONE-NULL-NONE
NONE-NONE-NULL
NONE-NULL-NULL
NONE-NULL-NONE
NONE-NONE-NONE' --input 'cat dog'