esolang

FISH WALKING ๐Ÿšถ

A fish with legs walks along 255 cells of food, shouting every step in capitals.

MathR ยท Turing complete: yes ยท โ—โ—‹โ—‹ easy ยท esolangs.org

Tested with 4 known programs ยท Test method

Run it

Expected: 0

The idea

MathR made FISH WALKING ๐Ÿšถ, based on a drawing by Iamn00b. Every command is a whole line of capitals with an emoji at the end, and the Python interpreter compares each line with the exact text. Nothing runs until the line OMG FISH WITH LEGS ๐Ÿ‘ฃ. One command, FISH DIE ๐Ÿ’€, gives up on the language and runs Deadfish for the rest of the session.

The machine

The fish walks a ring of 255 cells, each holding a count of food that can grow without bound or go below 0.

LineDoes
FISH WALKING ๐ŸšถMove right
FISH SWIMMING NOOOOO ๐ŸŠMove left
FISH GET FOOD ๐Ÿ˜‹Add one
FISH UNGET FOOD ๐Ÿ˜”Take one
WHO WILL IT EAT DOE ๐Ÿค”Read a line as a number
FISH SHOW HIS FOOD COLLECTION ๐Ÿ‘€Print the number and a line feed
FISH HUNGRY WHEN n FOOD ๐ŸดSet the hunger, 5 at the start
FISH TOO HUNGRY TO DO NEXT LINE LOL ๐ŸคฃSkip the next line if the cell is below the hunger
FISH FLY TO n ๐Ÿ›ซGo to line n
FISH DIE ๐Ÿ’€Run Deadfish on the input

With a hunger of 1 the skip tests a cell for 0, and with the jump the cells work as the counters of a Minsky machine.

Example

The truth machine.

The truth machine. On 0 the fish is too hungry, skips the jump and stops.

The Deadfish interpreter. Python's input(">> ") writes its prompt to the output before each line it reads, and the session ends with the input. In this implementation 0 goes up to 2, is squared twice to 16 and printed.

Expected: >> 16 >>

Patterns it teaches

Further

Also in Jokes

Write your own in Run Convert a program from FISH WALKING ๐Ÿšถ

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: fish-walking.

Command line

shib run fish-walking -e 'OMG FISH WITH LEGS ๐Ÿ‘ฃ
FISH DIE ๐Ÿ’€' --input 'iisso'
shib manual fish-walking

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/fish-walking.js

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

Source esolangs.org (CC0) ยท Edit on esolangs.org