User:Alidonis/sandbox/instructions

From Esolang
Jump to navigation Jump to search

Instruction is a BrainFuck-Inspired language that has to be separated by newlines, altough it has a vast ammount of variations away from BrainFuck. it has various quality of life features such as not having to increment cells to do anything, or having a stack to use as a variable storage. These features come at the cost of being absolutely incomplete. comments can be set by adding a "/" at the start of the line. keep in mind i was too lazy to add the ability to comment. after an instruction..

Caption text
instruction explanation
> teletype - print the characters next to it. the prompt, stack read deletion and stack read instruction can be inserted aswell.
< prompt - ask for input from a user for whatever reason. can be used in the teletype and stack add instructions
j conditionnal jump, although you might think it jumps when the condition is tru, it actually jumps when the condition is false. and unless you're reading this, i'tll make you want to regret choosing my esolang in a flash.
: the next characters will be treated as an instruction, save for the fact that stack read deletion, stack deletion and prompt will actually do their respective actions immidiately. this means that if a stack value that is read has a prompt instruction, it'll actually work, whereas it will not for a normal instruction. good if you want users to fuck up your code.
_+ stack add instruction - adds the value next to it to the stack. the prompt, stack read and stack read deletion instructions will work as normal.
_- stack read deletion - returns the first value of the stack and then deletes it.
stack read - returns the first value of the stack.
__ stack deletion - deletes the first value of the stack.
_x stack clear - clears the stack
_l stack list - lists the content of the stack

As you can see, this language is very powerfull, if i actually made it powerfull. It only prints stuff and uses a stack for all of it's variable storage. You can't even loop through it!

You can find an interpreter here (runs on python 3.8.12) : https://github.com/Alidonis/AlidonisesInstructions