esolang

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

Expected: 0

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

CommandDoes
.Put a 0 at the back
+ -Add 1 to or take 1 from the front
rMove the front to the back
pDrop the front
i icRead a line as a number, or as one character
o ocPrint the front as a number, or as a character
sNJump 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.

Expected: Q
Expected: 5 4 3 2 1

The factorial. Joined to the first line, its second line starts at character 62.

Expected: 120

Patterns it teaches

Further

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 qadi

Source

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