FISHQ9+
Deadfish and HQ9+ glued together, with a k at the end to stop.
Erinius, 2016 · Turing complete: no · ●○○ easy · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
FISHQ9+ runs every Deadfish program and every HQ9+ program. It keeps Deadfish's accumulator and its odd rule that the value 256 or -1 falls back to 0. From HQ9+ it takes the commands that print a greeting, the program itself and the whole 99 bottles song. Letters are not case sensitive, and anything else is ignored.
The machine
| Command | Does |
|---|---|
i + | Add 1 |
d | Subtract 1 |
s | Square |
o | Print the accumulator and a newline |
h | Print Hello World. |
q | Print the program read so far |
9 | Print 99 bottles of beer |
k | Stop |
The reference interpreter is 50 lines of C that read the program one character at a time. It needs a final k; in this implementation the end of the program stops it too.
Example
In the first program the third s makes 256, which turns to 0 before o prints it.
In the first program the third s makes 256, which turns to 0 before o prints it. In the second an i comes between, so the square is 17 times 17.
Further
Ideas it shows
See also
Also in Jokes
Write your own in Run Convert a program from FISHQ9+
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: fishq9.
Command line
shib run fishq9 -e 'iissso'shib manual fishq9Source
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/fishq9.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org