LargeFish

From Esolang
Jump to navigation Jump to search

LargeFish is an esolang by User:ChuckEsoteric08 based on BigFish, which is itself based on Deadfish

Specification

LargeFish operates on infinite amount of registers which store nonnegative integers. It has the following commands:

i x - increment x
d x - decrement x
s x - square x
o - output x
e x y - set x to y
loop x - loop x times
endloop - end loop

Note that if you put an asterisk before y in e, or before x in loop it would return value of a register. If x has changed while executing, then the amount of times code will be executed is also changed, and if that amount is less or equal to amount of times loop has been executed it would exit the loop when endloop is encountered

Computational class

LargeFish is Turing complete since it can implement PMNN. Increasing and decreasing counters is easy, we can simply use i and d commands. To test if a register x is zero we can use register which we will call test and a loop command like that:

e test *x
loop *test
e test 1
endloop

It would set test to 1 if x is not zero, and to 0 otherwise