Fish Code

From Esolang
Jump to navigation Jump to search

Fish Code is an esolang invented by User:None1. It is named Fish Code because its programs are shaped like fish.


Every line in Fish code must be like this.


When executed, a program starts from the first line, if a jump command isn't executed in one line, the program terminates.


Fish code uses 2 byte stacks and a byte register.

The byte register is initially 0, the stacks are initially empty.

It doesn't matter which stack is the current stack initially, since that wouldn't affect the behavior of the program.

Overflow and underflow wraps around.

Command Meaning
+ Increment register
- Decrement register
, Read a character and store it in the register
. Print register as ASCII
: Read register as decimal
; Print register as decimal
? Pushes the value of register into the current stack
! Pops from the current stack and store it into register
~ Switch current stack
(A) If the register is zero, jump to line A
[A] If the register isn't zero, jump to line A
{A} Jump to line A no matter what
((x)) Set the register to the value of x (a number)
(((x))) Subtract the value of register by x

Programming in Fish Code is easy because it has more commands, but complicated because you have to manipulate the loops yourself.

Example Programs

Hello World


Cat Program


Note: The first line is line 0.

Truth Machine


Reverse Cat Program


Nope. Interpreter


Infinite loop


Turing completeness

The language is Turing complete since we can use two stacks to simulate a brainfuck tape, and use the jump commands to simulate brainfuck loops.

External Resources