Direction
Jump to navigation
Jump to search
This is a esolang that uses 2d syntax, plus orthogonal directions
The but
every direction command when you step on it it gets deleted
Commands
<>^v: direction commands I: get input and push it to stack ?: pops from stack and if that is 0 turn left >0 turn right, also doesnt disappear O: pops from stack and outputs it D: duplicate top of stack +: add top two -: sub top two in b-a where a is top *: mult top two /: div top two in b/a where a is top 1: add one to stack 0: add zero to stack S: make it so if next command will disappear, make it not N: make it so if next command wont disappear, make it E: stop program
Examples
321 program
This program counts down from inclusive three (3) to inclusive one (1) and continuously outputs the counter state:
111++SvS <
D
v?DO1-Sv S
E S
>S^
Cat Program
This numeric cat program repeats until a zero (0) input is committed:
Sv <
S S
>IDOSv ^
S
E?S^
Truth-Machine
The following furnishes a truth-machine:
IDOSvSOD<
D S
E?S>S^
Interpreter
- Common Lisp implementation of the Direction programming language.