NOPQRST
A push-down automaton designed to do nothing. Seven letters, five types, and no way to print a single character.
Turing complete: no · ●○○ easy · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
NOPQRST is named after the only letters it uses, N to T. It has an unbounded stack and five types of value. They are null, the quining constant that stands for the whole source, regular expressions, strings and types. Only a string or a regular expression prints anything, and the only ones a program can make are empty. So every program prints nothing, which is what the language is for.
The machine
| Letter | Does |
|---|---|
N | Push null |
O | Nothing |
P | Print the top value |
Q | Push the quining constant |
R | Push an empty regular expression |
S | Push an empty string |
T | Replace the top value with its type |
A string prints as it is and a regular expression without its slashes. Null, types and the quining constant print nothing. P on an empty stack sees null, since the specification says an underflow gives null. Other characters are ignored.
Example
The two examples print an empty string and push ten nulls.
The two examples print an empty string and push ten nulls.
The specification also gives an interpreter in Python, the single statement pass. It is correct for every program.
Further
Ideas it shows
See also
Also in Jokes
Write your own in Run Convert a program from NOPQRST
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: nopqrst.
Command line
shib run nopqrst -e 'SP'shib manual nopqrstSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/nopqrst.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org