Rouedeux
Two wheels. One holds the alphabet, the other is the tape.
Matthew, 2019 · Turing complete: yes · ●○○ easy · esolangs.org
Tested with 5 known programs · Test method
Run it
The idea
Matthew made Rouedeux in October 2019. The name is French for wheel and two. Every value is a letter of the alphabet wheel, 26 capitals and a space, and the wheel only turns one way. To get from H back to the space it has to go on through Z. There are no numbers, so a program counts by turning the wheel to a letter it has stored.
Read the story
The tape is a wheel as well. It starts with one cell, grows only with E, and steps from its last cell back to its first. The specification shows that a cyclic tag system fits in it, so it is Turing complete.
The machine
| Command | Does |
|---|---|
R | Turn the alphabet wheel one letter on, from Z to the space |
T | Move to the next cell of the tape wheel |
E | Add a cell to the tape |
W | Write the wheel's letter into the cell |
P | Print the cell's letter |
I | Read a letter into the cell |
S | Turn the wheel to the cell's letter |
O ... Q | Loop while the wheel does not show the space |
Any other character but white space is refused. ORQ turns the wheel on until it shows the space, which is how the programs start over from zero.
Example
The alphabet.
The alphabet. The loop prints each letter and stops when the wheel comes round to the space, which it prints too.
The Hello World on a single cell. Eight turns give H, ORQ goes back to the space, and so on.
The if statement. Five turns past V reach the space, so on V the loop is skipped and the program prints A. Any other letter prints a space.
Patterns it teaches
- Turing tarpit, with nine commands and only letters.
- Tag systems, the proof that it is Turing complete.
Further
See also
Also in Turing tarpits
Write your own in Run Convert a program from Rouedeux
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: rouedeux.
Command line
shib run rouedeux -e 'IP' --input 'A'shib manual rouedeuxSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/rouedeux.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org