From Esolang
Jump to navigation Jump to search

Lossia is a language made by Tetrapyronia. It uses 1 stack. All commands must be prefixed with l. Spaces can be put anywhere, including inside commands. Everything including and after the first invalid command is a end-of-line comment. (ex: l- l- Push 2 -1s to the stack <- all italics are comments)


Command Meaning
. If top stack item is <1, jump 1 past matching _
, If top stack item is >1, jump 1 past matching _
_ Jump back to matching . or ,
l Print top of stack (as a number, keeps value)
i Print top of stack (as a Unicode character, keeps value)
L Push input to stack
s Pop A and B, push A-B
- Push -1 to stack
= If top 2 commands are equal, skip next command
[ Duplicate top of stack
x Swap top 2 stack items

Example program: Truth-machine

l Loss l

 l[  l.
 ll  l_

Online Interpreter

Lyxal made an online interpreter for this esolang. You place the code into the "code" box.