BzFs

From Esolang
Jump to navigation Jump to search

BzFs is a version of BuzzFish, made to increase its computational power. Its only memory is the program. It uses a mix of imperative, in the form of listing commands in order, but also has a sort of "expression style".

Command notation

There is a specific notation for commands:

p: !s1 -> s2
o: s3 -> s4
i: s5 -> s6

p is the program, with ! representing the instruction pointer. Meanwhile, o is the output, and i is the input track.

Commands

Every program ends with ].

*:
p: !* --> *!
o: ... --> ...*

n:
p: !n --> n!
o: ... --> ...\n

`:
p: !`x) --> `!xs1)
i: s1s2s3s4... --> s2s3s4...

%:
p: !% --> !

|:
p: !| --> |!

}:
p: |x!} --> !|x}

+:
p: !|x+ --> !x|x*

*:
p: !|x* --> |x+!

=:
p: !|x=z) --> !xz^)

^:
p: !|x^ --> |x=!

here, ) is a symbol for any of the }]+*=^. Note that only one bracket can match to a |, and the one matched is the one closest to a given |.

Computational class

The computational class of BzFs is currently unknown, but it must be at least as powerful as BuzzFish:

|x} --> |x}
|x}= --> |x+
|x}=% --> |x*
* --> *
n --> n