π’
π’ 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)