Robinfish

From Esolang
Jump to navigation Jump to search
Not to be confused with Deadfish.

Robinfish is a superset of the Deadfish language.

The current version of the interpreter is written in Odin and hosted on git.gay.

Commands

Opcode Explanation
i Increment the accumulator.
d Decrement the accumulator.
s Square the accumulator.
o Output the accumulator as a number.
h Halt execution.
r Square root the accumulator.
c Output the accumulator as an ASCII character. **NOTE:** Numbers outside 0-255 do nothing.
w Print "Hello, World!"
; Reset the accumulator to zero.
R Disable/Enable standard Deadfish accumulator restrictions (Toggles "Robinmath").
^ Push the accumulator onto the end of the stack. The accumulator is not reset.
# Pop the last value from the stack and set the accumulator to it.
@ Set the accumulator to the value of its index in the stack.
+ Add the second value to the first in the stack. The second value is removed.
- Subtract the second value from the first in the stack. The second value is removed.
* Multiply the first value by the second value in the stack. The second value is removed.
/ Divide the first value by the second value in the stack. The second value is removed.
$ Set the accumulator to the length of the stack.
{ Start of a comment.
} End of a comment.

Example Programs

XKCD Random Number:

ii^{comments exist in curly brackets!}^+o