Imagerlang

From Esolang
Jump to navigation Jump to search

Imagerlang is a programming language that uses images to make data

V1

Commands

+ increment the X var
* increment the Y var
- decrement the X var
/ decrement the Y var
# place a cell at X var Y var where the value is X var
$ place a cell at X var Y var where the value is Y var
~ place a cell at X var Y var where the value is a input which is X var or Y var, like the question is "X or Y"
! check the cell at X var Y var and if it is the value of its X position, set the its value to its Y position
& if the cell at X var Y var is its X position, Set Y var to its X position, and set X var to its Y position
% if the cell at X var Y var is its Y position, Set X var to its Y position, and set Y var to its X position
@ if the X var and Y var is 0, continue, else return X

Examples

+~-*~/+&&-@ a thing that detects if both of them is X X or Y Y, then Y, else X
+~-*~/+&/@*&-@ a thing that detects if both of them is X X, then Y, else X

V2 - modular Imagerlang

New Commands

^ increment the Z var
| increment the W var
v decrement the Z var
\ decrement the W var
` add Z var W var to input list
= clear input list
[ start a function with the letter after it being the name, and the input list is its inputs
] end a function, note if the function reaches this when ran, Y is returned
L run a function where L is the function name, with the inputs based on the input list, if results in X, set the cell at X var Y var before the function was to X, else set it to Y

Examples

=^`v|`\[N+&/@]=+#N%/@ run not on X which results in Y