Verbose
A stack machine where every instruction is a sentence in capitals, and every number is a Roman numeral.
Poolala, 2013 · Turing complete: unknown · ●○○ easy · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
Poolala made Verbose in 2013 to be as verbose as possible, after VerboseFuck, INTERCAL and COBOL. Underneath it is a plain stack machine with fourteen instructions on unbounded integers. Each instruction is a fixed English sentence on its own line. The shortest has 8 words; the conditional jump has 45 words and 254 characters. There are no digits anywhere. A number is pushed as a Roman numeral, zero is NULLA, and a negative number has NEGATIVE in front.
Read the story
The Hello, world! takes 25 lines and 2,375 characters.
The machine
| The sentence starts with | Does |
|---|---|
PUT THE NUMBER MMXIII ONTO ... | Push 2013 |
REMOVE THE CURRENT ELEMENT ... | Pop |
GET THE FIRST ELEMENT ... AND DUPLICATE IT ... | Duplicate the top |
MOVE THE FIRST ELEMENT ... | Swap the top two |
ADD, SUBTRACT, MULTIPLY, DIVIDE ... | Arithmetic on the top two, first with second |
DIVIDE ... AND GET THE REMAINDER ... | Remainder |
GET THE FIRST ELEMENT ... AND IF THE SECOND ... | Jump by the top when the second is not zero |
GET A CHARACTER TYPED IN ... | Read a character |
GET A ROMAN NUMERAL TYPED IN ... | Read a numeral |
GET THE TOP ELEMENT ... CONVERT IT TO AN ASCII CHARACTER ... | Print the top as a character |
GET THE TOP ELEMENT ... AND OUTPUT IT ... | Print the top as a Roman numeral |
The first element is the top of the stack. A jump moves that many instructions from the current one. The specification does not say which instructions pop. This implementation pops both elements, while the jump and the two outputs only look, which the Hello, world! needs to print its two l from one push. Reading past the end of the input ends the run.
Example
Numbers print as numerals too.
Numbers print as numerals too. Six times seven.
The cat reads a character, prints it and pops it. Then it pushes I and NEGATIVE V, and the jump goes five instructions back to the start, since the 1 under the top is not zero.
Patterns it teaches
- Stack machines: fourteen stack instructions, each spelled out in full.
Further
See also
Stack-based
Write your own in Run Convert a program from Verbose
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: verbose.
Command line
shib run verbose program.txt --input 'Hi there'The program is long; save it as program.txt first.
shib manual verboseSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/verbose.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org