ONOV
Only Names Of Variables. Any text is a program, and its length decides what it does.
Boyss, 2016 · Turing complete: no · ●●○ moderate · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
Boyss made ONOV in 2016. A program is nothing but names of variables, and any text is a program. The names are torches, after the block in Minecraft's redstone circuits that is on only when what feeds it is off. A torch fed by one name is a NOT gate, one fed by several is a NAND gate, and a program is a circuit of them.
Read the story
The text is cut into names by halving. While its length is a multiple of 4 it is halved again, and an even length is cut once more. A text of odd length is a single name. In each pair of names the first feeds the second.
The machine
The specification gives its rules and a Python 2 interpreter, and this implementation follows the interpreter. The two differ on which seven bits read input and which end the program, and only the interpreter's way makes the cat a cat.
Each tick turns every torch off and sets the first one to the next input bit. Then torch by torch it lights each one that has a feeder that is off. The last torch gives one bit of output. After seven bits the output is read as a number.
| Seven bits | Does |
|---|---|
0000000 | Read a line of input, seven bits a character |
1111111 | End the program |
| anything else | Print that character |
Every tick starts from all torches off, so nothing is remembered from one bit to the next. The last torch can only copy the input bit, invert it, or ignore it. A program can be a cat, can stop at once, or can read and print nothing. The end of the input ends the run, where the interpreter stops with an error.
Example
The specification says any program of odd length is a cat.
The specification says any program of odd length is a cat. A is one torch that follows the input.
AB is two torches, and B is the NOT of A. Before there is input A is off, so B gives seven 1s and the program ends without reading. ABBC adds a third torch that inverts B back, and it is a cat again.
Patterns it teaches
- Every text runs: there is no syntax at all, only length and repetition.
Further
See also
Also in Jokes
Write your own in Run Convert a program from ONOV
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: onov.
Command line
shib run onov -e 'A' --input 'Hello'shib manual onovSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/onov.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org