We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

User:InLuaIKnow/luaCm2gen

From Esolang
Jump to navigation Jump to search
print("Please input what you want to output:")
inp = io.read()
local bytes = {inp:byte(1,inp:len())}
print("Save to file:")
local fname = io.read()
local f = io.open(fname,"w")
local c=""
for i,b in ipairs(bytes) do
    if i==1 then c=c..(string.rep("㏥",b).."㎠㎟㎭") else
        if bytes[i-1]>b then
            c=c..(string.rep("㏦",bytes[i-1]-b).."㎠㎟㎭")
        elseif bytes[i-1]<b then
            c=c..(string.rep("㏥",b-bytes[i-1]).."㎠㎟㎭")
        else
            c=c.."㎠㎟㎭"
        end
    end
end
f:write(c.."ඞ")