esolang

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

Expected: ABCDEFGHIJKLMNOPQRSTUVWXYZ

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

CommandDoes
RTurn the alphabet wheel one letter on, from Z to the space
TMove to the next cell of the tape wheel
EAdd a cell to the tape
WWrite the wheel's letter into the cell
PPrint the cell's letter
IRead a letter into the cell
STurn the wheel to the cell's letter
O ... QLoop 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.

Expected: HELLO WORLD

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.

Expected: A

Patterns it teaches

Further

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 rouedeux

Source

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