🐒

From Esolang
Jump to navigation Jump to search

🐒 is an esolang by VilgotanL created for an esojam in Truttle1's discord server, it uses an accumulator and a cell tape that can both hold unbounded integers.

Instructions

🐒 n Increment the accumulator by n
🐒🐒 n Decrement the accumulator by n
🐒🐒🐒 Output the accumulator as an ascii character
🐒🐒🐒 🐒 Output the accumulator as a number in base 10
🐒🐒🐒🐒 Input one character and place it's ascii value in the accumulator
🐒🐒🐒🐒🐒 n Define the label n at this line
🐒🐒🐒🐒🐒🐒 n Goto the label n if the accumulator is non-zero
🐒🐒🐒🐒🐒🐒🐒 🐒 n Move the tape pointer left n times
🐒🐒🐒🐒🐒🐒🐒 🐒🐒 n Move the tape pointer right n times
🐒🐒🐒🐒🐒🐒🐒🐒 🐒 Set the current cell in the tape to the value of the accumulator
🐒🐒🐒🐒🐒🐒🐒🐒 🐒🐒 Set the accumulator to the value of the current cell in the tape

n is the amount of repeated 🐒 characters in place of n, instructions can have 0, 1, or 2 instruction arguments, comments start with #.

Important note when programming interpreters for 🐒: the 🐒 character is a unicode character, and in UTF-16 it is two code units. In JavaScript this is two "characters": "\ud83d\udc22"

Examples

Truth-machine

With comments.

🐒🐒🐒🐒 #input ascii to accumulator
🐒🐒🐒 #output accumulator as ascii char
🐒🐒🐒🐒🐒🐒🐒🐒 🐒 #set current cell to accumulator
#decrement accumulator by 49 '1':
🐒🐒 🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒
🐒🐒🐒🐒🐒🐒 🐒 #if not zero (if input not '1'), go to label 1 (exit)
🐒🐒🐒🐒🐒 🐒🐒 #label 2
🐒🐒🐒🐒🐒🐒🐒🐒 🐒🐒 #set accumulator to current cell
🐒🐒🐒 #output accumulator as ascii char
🐒🐒🐒🐒🐒🐒 🐒🐒 #go to label 2 if not zero (loop infinitely)
🐒🐒🐒🐒🐒 🐒 #label 1

Hello World

🐒 🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒
🐒🐒🐒
🐒 🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒
🐒🐒🐒
🐒 🐒🐒🐒🐒🐒🐒🐒
🐒🐒🐒
🐒🐒🐒
🐒 🐒🐒🐒
🐒🐒🐒
🐒🐒 🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒
🐒🐒🐒
🐒🐒 🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒
🐒🐒🐒
🐒 🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒
🐒🐒🐒
🐒🐒 🐒🐒🐒🐒🐒🐒🐒🐒
🐒🐒🐒
🐒 🐒🐒🐒
🐒🐒🐒
🐒🐒 🐒🐒🐒🐒🐒🐒
🐒🐒🐒
🐒🐒 🐒🐒🐒🐒🐒🐒🐒🐒
🐒🐒🐒
🐒🐒 🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒
🐒🐒🐒
🐒🐒 🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒
🐒🐒🐒

Computational class

🐒 is Turing-complete since brainfuck can be translated to it.

Another way to show it's turing-completeness is to show that any given Minsky machine with any number of registers can be translated to 🐒.

Implementations

Online interpreter by the creator (Doesn't work in Firefox and I'm too lazy to fix it)