esolang

Ring-around-the-Rosie

One register in the middle, a ring of nodes around it, and no jumps. The register itself says which node runs next.

Salpynx, 2026 · Turing complete: yes · ●●● hard · esolangs.org

Tested with 4 known programs · Test method

Run it

Expected: Hello, World!

The idea

Salpynx designed Ring-around-the-Rosie in 2026. A program is drawn as a wheel, a ring of nodes around one central register, with no wire crossing another. The pointer only ever goes round the ring in order.

Read the story

The register does the rest. It holds a product of prime powers, like a Minsky machine with a single register. The power of 3 can be one counter, the power of 5 another, and the power of 2 is the number of the node that runs. A node runs when the register divided by 2 to its number is odd, so multiplying by 4 jumps two nodes ahead and dividing by 2 steps one back.

The machine

The first three columns of the source draw the ring. R is the register, in the second column, and each * is a node. The node on the line of R is node 1, and the others count clockwise. The rest of a line holds the commands of the nodes on it.

CommandDoes
3A test; the scripts after it apply only when the register is not a multiple of 3
<sup>5<sup>2</sup></sup>Multiply the register by 5 squared
<sub>2</sub>Divide the register by 2
iMultiply it by 2 to the power of an input byte
0Set it to 0, which halts
.text :textPrint the rest of the line, with a line feed after :

The register starts at 2, so node 1 runs first. The specification sets multipliers as superscripts and divisors as subscripts, and they are written with the tags that make them.

Example

The ring has three nodes.

The ring has three nodes. Node 1 runs at once, sets the register to 0 and still prints its line.

Count to ten jumps forward and back. Nothing ever multiplies by 3, so every test on 3 passes, and each line moves the power of 2 to the node that prints the next word.

Expected: One Two Three Four Five Six Seven Eight Nine Ten

The truth machine is a ring of 51 nodes. Node 1 reads a byte, so the register becomes 2 to the 49 on the input 0 and 2 to the 50 on 1. Node 49 halts and prints 0. Node 50 prints 1 and leaves the register as it is, so it runs again on every lap.

The 99 bottles of beer keeps the units in the power of 3 and the tens in the power of 5. It prints a digit by jumping into a table of twenty nodes, a test and a print for each digit, and finds its way back through the power of 13. It prints all 99 verses in 357,213 steps of the pointer. The specification also describes a form where the pointer wanders at random and one without branches; this implementation runs the sequential one.

Further

Ideas it shows

Two-dimensional languages

Write your own in Run Convert a program from Ring-around-the-Rosie

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: ring-around-the-rosie.

Command line

shib run ring-around-the-rosie -e '*

 R* 0:Hello, World!

 * '
shib manual ring-around-the-rosie

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/ring-around-the-rosie.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org