esolang

Ruckfish

Brainfuck with no minus, no print and no read. The tape is the input and the output.

TheCanon2, 2024 · Turing complete: yes · ●○○ easy · esolangs.org

Tested with 3 known programs · Test method

Run it

Expected: Hello, cat

The idea

TheCanon2 made Ruckfish in 2024 as a variant of Ruck, itself a variant of brainfuck, and spelled it in letters that look like Deadfish. Five commands are left. There is no way to subtract, so a cell gets back to 0 only by counting up past 255. There is no command to read or to print either. The input is written on the tape before the program starts, and whatever stands on the tape from that cell on is printed when it ends. So the cat is the empty program.

The machine

CommandBrainfuckDoes
i+Add 1 to the cell
d>Move right
h<Move left
s[Jump past the matching o if the cell is 0
o]Jump back to the matching s if the cell is not 0

Cells are bytes, and 255 plus 1 is 0. The first line of the input goes on the tape, one byte per cell. At the end the tape is printed from the first of those cells up to the first 0. Every other character is passed over.

Example

The cat, and a program that adds 1 to each of three cells.

The cat, and a program that adds 1 to each of three cells.

Expected: IBM

A loop. sdo moves right until the cell is 0, which is just past the input. 33 more i write a ! there.

Expected: Hello!

The Hello World counts each letter up from 0 in its own cell, 72 i for the H and 101 for the e, 1,097 commands in all. It prints Hello World!. The truth machine adds 208 to the input. On 0 that makes 48 plus 208, which wraps to 0, so the loop is skipped and nothing is printed. On 1 it writes 1 to the tape forever and never gets to print.

Patterns it teaches

  • Turing tarpit, with five commands and input and output left to the tape itself.

Further

Ruckfish builds on Brainfuck.

Brainfuck derivatives

Cell-based

Write your own in Run Convert a program from Ruckfish

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run ruckfish -e 'iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
iiiiiiiiiiiiiiiiiiiiiiiiiiiisdiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiio' --input '0'
shib manual ruckfish

Source

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

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

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