Qadi
A queue of numbers, eight letters and signs, and jumps that count characters.
Biscat111, 2026 · Turing complete: yes · ●●○ moderate · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
Biscat111 made Qadi in 2026, because there were too few languages built on a queue. All the work happens at the front of one queue of whole numbers. A command can add 1 to the front, take 1 from it, or move it to the back, so turning the queue is how a program reaches its other values.
Read the story
The only jump is s followed by a number, and the number is a position in the program text, counted in characters from 0. The specification shows Qadi is Turing complete by turning a two-register Minsky machine into it, with the two registers as the two values in the queue.
The machine
| Command | Does |
|---|---|
. | Put a 0 at the back |
+ - | Add 1 to or take 1 from the front |
r | Move the front to the back |
p | Drop the front |
i ic | Read a line as a number, or as one character |
o oc | Print the front as a number, or as a character |
sN | Jump to character N when the front is not 0 |
This implementation follows the Python interpreter in the specification. It has p, which the specification's table leaves out. It prints a number with a line feed before and after it. It joins the lines of a program with nothing between them, so a jump counts across lines.
Example
The truth machine, ios1.
The truth machine, ios1. It reads a number, prints it and jumps back to the o while it is not 0.
The factorial. Joined to the first line, its second line starts at character 62.
Patterns it teaches
- Counter machines: two values in a queue are enough for a Minsky machine.
- Turing tarpit: eight commands, one of them a jump.
Further
See also
Queue-based
Write your own in Run Convert a program from Qadi
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: qadi.
Command line
shib run qadi -e 'ios1' --input '0'shib manual qadiSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/qadi.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org