Unilot

From Esolang
Jump to navigation Jump to search
Unilot
Paradigm(s) imperative
Designed by User:Lukalot, with help from User:LyricLy, User:Heavpoot and User:Galaxtone
Appeared in 2018
Memory system variable-based
Dimensions one-dimensional
Computational class unknown
Reference implementation Unimplemented
File extension(s) .uni

Unilot is a programming language originally conceived by user:Lukalot and heavily influenced by user:Heavpoot, user:LyricLy, and user:Galaxtone, becoming Lukalot’s first esolang. The concept was that any number more than 1 cannot be added or subtracted from a variable, unless that number is stored within another variable. Variables are 1 character long and are always integers. There is one input and one output.

Overwiew

Unilot operates through variables, each initially set to zero. Variables can be incremented or decremented by 1, or more if the effecting number is stored within a variable. Unless the command is literally [ or ], things surrounded in [] are optional. The commands are:

+<variable>[<variable>] Adds one to the following variable, or adds the second variable to the first variable if there is a second argument.
-<variable>[<variable>] Subtracts one from the following variable, or subtracts the second variable to the first variable if there is a second argument.
<<variable><variable>[<inverse>] Decrease the first variable by one if the first and second variable are equal. Conditions are inversed if <inverse> is equal to “!”.
><variable><variable>[<inverse>] Increase the first variable by one if the first and second variable are equal. Conditions are inversed if <inverse> is equal to “!”.
{<variable><variable>[<inverse>] Same as previous conditionals, but jumps backwards 2 lines when conditions are met.
}<variable><variable>[<inverse>] Same as previous conditionals, but jumps forwards 2 lines when conditions are met.
[<distancevariable> Jumps backwards <distancevariable> lines.
]<distancevariable> Jumps forwards <distancevariable> lines.
@<variable> Outputs <variable> from ASCII code.
. Ends the program loop.

To reference the input, use *.

Examples

+a +a +ia +ji +j +aa +fa +aa +ha +aa +ga +aa +aa +a +bh +ab -a @a +cg +cc -ab +a +ac +af @a +af +aj @a @a +aj @a +bb +bb +dg +db -df @d @b +eh +ae @a -ae @a +ai +a @a -af -ai @a -ae @a +b @b .
No quine written yet.