META

From Esolang
Jump to navigation Jump to search

META is a stack-based esoteric programming language made by User:Fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff. It is also self-referential, and uses a wide variety of characters, like emojis.

Commands

Here index refers to the current line number the processor is on. Due to the fact that this index can be changed with code, forever programs are possible. The amount of lines (speed) the program moves forward is also able to change. Setting speed to 0 softlocks the program, since it does not move forward.

Commands
Command Description
push index to stack
𝙽𝙾𝙱𝙾𝙳𝚈 𝙰𝚂𝙺𝙴𝙳 𝚈𝙾𝚄 ask the user for an input and push it
amount of ✨s can vary push the amount of ✨s into the stack
ᴿᴱᴬᴰ read a .txt file with the path pulled from the stack
никогда тебя не брошу pop off the top element of stack
I'M ON A PLANET 2763 LIGHTYEARS AWAY👍 pop off the top element of the stack, and set index to that, unless previous command was 📍YOUR MOMS HOUSE📍, then push the value 2763
根據所有 21 條已知航空法,總共 0 人詢問 push 0 to the stack
Division by 0 / 根據所有 21 條已知航空法,總共 0 人詢問 push infinity to stack, unless top is 0, then push 1
Squirtle replace top element with its square root
convert top element to an integer
t increment top element by 1
?numberdeLeap pop top 2 elements. if the first is number, set index to second
¿strdeLeap pop top 2 elements. if the first is str, set index to second
📍YOUR MOMS HOUSE📍 NOP
ᵦₑ₄ᵤₙⱼₑ pop the top element and set speed to that
yap convert top element to string
ʀ push "\r" to stack
ɴ push "\n" to stack
ғ push "ꜰ" to stack
pop two elements of stack, multiply them, and then push that
push all the code
𐞜 push "𐞜"
𐞣 push "Hello World!"
add a minus to the top element of stack
$⅟₂₀ push "YOU'RE ADOPTED"
beer print the lyrics to 99 bottles of beer, but start by popping the top element of stack and use that as starting number
ᴎⱻᴍ generalized beer (kinda hard to explain; look at the compiler for a demonstration)
x = x±1 increment or decrement top element of stack
ⱼBⱼEⱼFⱼUⱼNⱼGⱼEⱼ pop of the top 2 elements, replace line #1st popped element with 2nd popped element
rͬeͤaͣdͩ pop of the top element from stack, read that line number, and push that in
aͣdͩdͩ pop two elements and push their sum.
ᴪ ᴘᴏᴡᴇʀ ᴏᴜᴛʟᴇᴛ ᴪ end the program
number push the factorial of number
set top element to its reciprocal

The console.log(); statement

The console.log(); statement turns the line it's on into an output line. When this line is updated, its new contents are printed out. The ;()ϱol.ɘloƨnoɔ statement will remove the output-ness of the line numbered at the top of the stack.

Programs

Hello World

𐞣
console.log();
✨
ⱼBⱼEⱼFⱼUⱼNⱼGⱼEⱼ

Quine

л
console.log();
✨
ⱼBⱼEⱼFⱼUⱼNⱼGⱼEⱼ

Cat Program

𝙽𝙾𝙱𝙾𝙳𝚈 𝙰𝚂𝙺𝙴𝙳 𝚈𝙾𝚄
console.log();
✨
ⱼBⱼEⱼFⱼUⱼNⱼGⱼEⱼ

Compiler

Python

#esolang wiki
import random
import math
def tryint(text):
    try:
        return int(text)
    except ValueError:
        return 0

def maxFloat():
    c = 1023
    d = 0
    while c > -1:
        d = 2.0**c + d
        c = c - 1
    return d

def genBeer(c=99,beerer=[" bottles of beer on the wall,"," bottles of beer.
 Take one down, pass it around,"," bottles of beer on the wall."]):
    d = ""
    while c > -1:
        d = d + str(c) + beerer[0] + "\n"
        d = d + str(c) + beerer[1] + "\n"
        d = d + str(c-1) + beerer[2] + "\n"
        d = d + "\n"
        c = c - 1
    return d

def compute(code):
    l = code.splitlines()
    c = 0
    outputs = []
    stack = []
    speed = 1
    v = None
    while c < len(l):
        if l[c] == "﷽":
            stack.append(c)
        if l[c] == "":
            pass
        elif l[c][0:8] == "WHAT THE ":
            stack.append(l[c][9:-11])
        elif l[c] == "𝙽𝙾𝙱𝙾𝙳𝚈 𝙰𝚂𝙺𝙴𝙳 𝚈𝙾𝚄":
            stack.append(input())
        elif l[c][0] == "✨":
            stack.append(len(l[c]))
        elif l[c] == "ᴿᴱᴬᴰ":
            path = open(stack.pop())
            stack.append(path.read())
        elif l[c] == "никогда тебя не брошу":
            del stack[-1]
        elif l[c] == "I'M ON A PLANET 2763 LIGHTYEARS AWAY👍":
            if l[c-1] != "📍YOUR MOMS HOUSE📍":
                c = stack.pop()
            else:
                stack.append(2763)
        elif l[c] == "根據所有 21 條已知航空法,總共 0 人詢問":
            stack.append(0)
        elif l[c] == "Division by 0 / 根據所有 21 條已知航空法,總共 0 人詢問":
            if stack[-1] == 0:
                stack.append(1)
            else:
                stack.append(maxFloat())
        elif l[c] == "Squirtle":
            stack.append(math.sqrt(stack.pop()))
        elif l[c] == "∫":
            stack[-1] = tryint(stack[-1])
        elif l[c] == "t":
            stack[-1] += 1
        elif l[c] == "console.log();":
            if not(c in outputs):
                outputs = outputs + [c]
        elif (l[c][0] == "?") and (l[c][-6:len(l[c])]):
            if tryint(l[c][1:-7]) == stack.pop():
                c = stack.pop()
            else:
                del stack[-1]
        elif (l[c][0] == "¿") and (l[c][-6:len(l[c])]):
            if tryint(l[c][1:-7]) == stack.pop():
                c = stack.pop()
            else:
               del stack[-1]
        elif l[c] == "ᵦₑ₄ᵤₙⱼₑ":
            speed = stack.pop()
        elif l[c] == "yap":
            stack[-1] = str(stack[-1])
        elif l[c] == "ʀ":
            stack.append("\r")
        elif l[c] == "ɴ":
            stack.append("\n")
        elif l[c] == "ғ":
            stack.append("ꜰ")
        elif l[c] == "ᴫ":
            stack.append(stack.pop()*stack.pop())
        elif l[c] == "л":
            stack.append(code)
        elif l[c] == "𐞜":
            stack.append("𐞣")
        elif l[c] == "𐞣":
            stack.append("Hello, World!")
        elif l[c] == "⍰":
            stack.append("-"+str(stack.pop()))
        elif l[c] == "$⅟₂₀":
            stack.append("YOU'RE ADOPTED")
        elif l[c] == "beer":
            genBeer(stack.pop())
        elif l[c] == "ᴎⱻᴍ":
            genBeer(stack.pop(),stack)
        elif l[c] == "x = x±1":
            stack[-1] = stack[-1] + math.floor(random.random()*2)*2-1
        elif l[c] == "ⱼBⱼEⱼFⱼUⱼNⱼGⱼEⱼ":
            v = stack.pop()
            l[v] = stack.pop()
            if v in outputs:
                print(l[v])
        elif l[c] == "rͬeͤaͣdͩ":
            stack.append(l[stack.pop()])
        elif l[c] == "aͣdͩdͩ":
            stack.append(stack.pop()+stack.pop())
        elif l[c] == "ᴪ ᴘᴏᴡᴇʀ ᴏᴜᴛʟᴇᴛ ᴪ":
            quit()
        elif l[c] == ";()ϱol.ɘloƨnoɔ":
            outputs.remove(stack.pop)
        elif (l[c][0] == "⌠") and (l[c][-1] == "⌡"):
            math.factorial(tryint(l[c][1:-1]))
        elif l[c] == "⅟":
            stack[-1] = 1/stack.pop()
        c += speed

def start():
    Import = input("Import a file?")
    if Import == "yes":
        Import = input("Please input file path:\n")
        Import = open(Import,encoding='utf-8')
        Import = Import.read()
    else:
        c = " "
        Import = ""
        while c != "":
            c = input()
            Import = Import + c + "\n"
    compute(Import)

start()
while True:
	pass

#YOYLECAKE