esolang

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

Expected: *

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

CombowordDoes
NULL-NOTHING NULL-NONEAdd 1 to x, take 1 from x
NONE-NOTHING NONE-NONEAdd 1 to y, take 1 from y
NOTHING-NONE-NONE NOTHING-NONE-NULLIncrement, decrement the cell
NOTHING-NULL-NONEPush the cell
NULL-NULL-NOTHING NULL-NULL-NONE NULL-NULL-NULLPop, duplicate, swap
NULL-NULL-NULL-NULLSet the cell to the top of the stack
NOTHING-NOTHINGA label
NOTHING-NOTHING-NOTHING NOTHING-NULL-NULLIf 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.

Combowordbrainfuck
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.

Expected: cat

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

Further

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 'catdog'
shib manual null-none-nothing

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/null-none-nothing.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org