esolang

Ruck

Minimized BF with < put back and a tape that never ends. Input and output still happen around the run.

None1, 2023 · Turing complete: yes · ●○○ easy · esolangs.org

Tested with 3 known programs · Test method

Run it

Expected: cat

The idea

None1 made Ruck in 2023. It is Minimized BF with one more command, <, and a tape without end. Minimized BF has 256 cells on a circle, so it can only be in a fixed number of states. The endless tape is what makes Ruck Turing complete.

Read the story

There is still no -, and there are no commands for input or output. The first line of input is written into the tape before the run. After the run the tape is printed from the starting cell up to the first cell that holds 0.

The machine

CommandDoes
+Add 1 to the cell, 255 wraps to 0
< >Move one cell left or right
[ ]Loop while the cell is not 0

Every other character is passed over. The interpreter on the specification has 65,537 cells and says it can be expanded. The tape goes on without end in both directions.

Example

The cat program on the specification is empty.

The cat program on the specification is empty. The input goes into the tape and comes out again.

This one walks right to the 0 after the input, then back to the left, adding 1 to each byte on the way.

Expected: IBM

The Hello World counts each character up in its own cell, 72 + for the H, then >, and so on for 12 cells. Its truth machine adds 208 to the input. A 0 is 48, so the cell becomes 0, the loop never starts and nothing is printed. A 1 becomes 1, and the loop walks right forever, writing 49 into every cell.

Patterns it teaches

  • Turing tarpit: five commands, and without - every subtraction is 255 additions.

Further

Ruck builds on Brainfuck.

Brainfuck derivatives

Write your own in Run Convert a program from Ruck

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: ruck.

Command line

shib run ruck -e '++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[>+++++++++++++++++++++++++++++++++++++++++++++++++]' --input '0'
shib manual ruck

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/ruck.js

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

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