㎠
Jump to navigation
Jump to search
| Designed by | User:InLuaIKnow |
|---|---|
| Appeared in | 2026 |
| Computational class | Unknown |
| Major implementations | on this page |
㎠ is a esolang made by User:InLuaIKnow.
Syntax
REMEMBER: current value ≠ current storage
| Instructions | Description |
|---|---|
| ㎠ | push the current value onto the stack (will not reset current value) and decrements debt |
| ㎟ | pops the stack and stores it in current storage and decrements debt |
| ㏥ | increments current value by 1 |
| ㏦ | decrements current value by 1 |
| ㎭ | prints the current number in storage as ASCII |
| ㎮ | sets the current value to the ascii byte of the input |
| ㏂ | jump to matching ㏘ if current storage is 0 |
| ㏘ | jump to matching ㏂ if current storage ≠ 0 |
| ㏌ | swap current value and storage, adds debt(if debt > 5, ㏌ would
㏌tentionally not work) |
| ඞ | this instruction is essential for stopping the program |
Interpreters
Feel free to add interpreters here.
Lua (made by User:InLuaIKnow)
local stck={}
local v=0
local store = 0
local pc = 1
local debt = 0
local function pu()stck[#stck+1]=v end
local function po()if #stck<1 then
error("stackunderflow")
else store=stck[#stck] stck[#stck]=nil end end
local inst = {
["㎠"]=pu,
["㎟"]=po;
["㏥"]=function()v=v+1 end;
["㏦"]=function()v=v-1 end;
["㎭"]=function()io.write(string.char(store)) end;
["㎮"]=function()v=io.read(1):byte() end;
["㏂"]=function(bcode)if store==0 then local d=0 repeat pc=pc+1 if bcode[pc]=="㏂" then d=d+1 elseif bcode[pc]=="㏘" then if d==0 then break end d=d-1 end until pc>=#bcode end end;
["㏘"]=function(bcode)if store~=0 then local d=0 repeat pc=pc-1 if bcode[pc]=="㏘" then d=d+1 elseif bcode[pc]=="㏂" then if d==0 then break end d=d-1 end until pc<=1 end end;
["㏌"]=function()if debt > 5 then return end debt=debt+1 local v2=v;v=store;store=v2;end;
["ඞ"]=1
}
function compile(str)
local c = {}
for _,cp in utf8.codes(str) do
local s = utf8.char(cp)
if inst[s] then c[#c+1]=s end
end
return c
end
function interpret(c)
local terminate = false
while not terminate do
local s = c[pc]
if s == "ඞ" then terminate = true else
inst[s](c)
if s == "㎠" or s=="㎟" then
debt=math.max(0, debt-1)
end
pc=pc+1
end
end
end
if arg[1] then
local f = io.open(arg[1],"r")
local c = compile(f:read("*a"))
interpret(c)
f:close()
else
print("㎠, the esoteric programming language")
print()
while true do
pc=1
stck={}
v=0
store=0
io.write(">")
local f = io.stdin
local c = compile(f:read())
interpret(c)
end
end