User:Aadenboy/Windle
Windle is a 2D esoteric programming language.
Programs are laid out spatially. as disjoint orthogonal lines. Each line is either single or double struck.
One-path straight (the direction of travel is shown with arrows)
S-- --E S>> >>E S== --E S>> >>E S-- ==E S>> >>E S== ==E S>> >>E
One-path turn
S--- S>>> S=== S>>>
| v | v
E E E E
S--- S>>> S=== S>>>
H v H v
E E E E
T-junction from straight
000 B 100 A 001 A 101 B 010 B 110 A 011 A 111 B
S--- ---E S>>> ---E S=== ---E S>>> >>>E
| v | |
E E E E
S--- ---E S>>> >>>E S=== ---E S>>> ---E
H H H v
E E E E
S--- ===E S>>> ===E S=== ===E S>>> >>>E
| v | |
E E E E
S--- ===E S>>> >>>E S=== ===E S>>> ===E
H H H v
E E E E
T-junction from split
000 AB 100 AB 001 B 101 B 010 A 110 A 011 AB 111 AB
E E E E
| ^ | ^
S--- S>>> S=== S>>>
| v | v
E E E E
E E E E
H ^ H ^
S--- S>>> S=== S>>>
| | | |
E E E E
E E E E
H ^ H ^
S--- S>>> S=== S---
H v H v
E E E E
Four-way junction
0000 B 1000 B 0001 B 1001 C 0010 B 1010 B 0011 A 1011 C 0100 B 1100 A 0101 B 1101 B 0110 C 1110 A 0111 B 1111 B
E E E E
| | | |
S--- ---E S>>> >>>E S=== ---E S>>> >>>E
| | | |
E E E E
E E E E
| | | |
S--- ===E S>>> >>>E S=== ===E S>>> >>>E
| | | |
E E E E
E E E E
H H H ^
S--- ---E S>>> >>>E S=== ---E S>>> ---E
| | | |
E E E E
E E E E
H H H ^
S--- ===E S>>> ===E S=== ===E S>>> ===E
| v | |
E E E E
E E E E
H H H H
S--- ---E S>>> >>>E S=== ---E S>>> >>>E
H H H H
E E E E
E E E E
H H H H
S--- ===E S>>> >>>E S=== ===E S>>> >>>E
H H H H
E E E E
Static example:
S== --- -- ==E S>> >>> -- >>E | | | | v ^ - == < == H | | | v ^ v ^ H --- == v <<< >> H H v ^ ===== >>>>>
When a pointer travels over a line, the line is toggled between single and double struck. The update order for each pointer is chronological. When two or more pointers overlap, only the oldest pointer is kept.
When a pointer lands on a node, the node is executed immediately.
| Node | Description |
|---|---|
* |
Special node which acts as the starting location for any pointers. This is immediately removed. |
S |
Special node which acts as the starting location for any pointers. This is immediately replaced with E. |
E |
Removes the pointer. |
. |
Outputs a single bit, depending on if the line that the pointer came from was single or double struck. |
l |
Turns into L.
|
L |
Turns into l and removes the pointer.
|
t |
Removes itself and allows the node to begin tracing. If the pointer is removed, this is re-added. |
T |
If the node was previously tracing, this turns into a t. Any lines and nodes it went over is duplicated with their new position relative to the position of this node.
|
The left configuration turns into the right configuration after 41 ticks:
S== --- -- ==E E== === -- --E | | | | H H - == = -- H | | | | H H H H --- == | === -- H H | | ===== -----
The left configuration turns into the right configuration after 110 ticks with the following output. Further ticks cause it to infinitely repeat the characters "Ye". (each pointer and their direction is shown with arrows)
*== --- -- ==E ^-- ---^== --E
| | | | | H H |
===. v===. v
H | | | H | H H
H --- == -- H ===<== ==>
H H H H
.====== .======
11010110 01010110 01001001 10010010 01100101 01011001 10010110 _1100101
VIeYe
This configuration will infinitely propagate downwards:
* H t=== | | T
This configuration turns into the next after 1000 ticks:
T- -T | | | | *-*- - - | | | | -t t-
T- -
| H H
-
H H |
= -
| | H | |
- = => -
| | H
= =
H | H | H
- = - =
H H |
- -
| | | H H
- = - -
H | H
= =
H H H | H
=<= = =
| | |
= = T
H H | | | H
= = - - = - =
H | | H |
- - -
| | H H H | | | | |
- = - = - = = - =
H | H H H | H H H
v= => = = -
| H H H H | | H | | H | |
= =^- - - = - = = - - =
H | | | | | | | H H |
= v = - = -> - ^ <- -
| | | | | H | | | | | | H H H
v= =>= - = = <= - = = = = - - =
H H H H H H | | H | | H H |
=> ^- - - - - = -> -
| | H | | H | | H | | | H H | H
= - - = - -> - = - - - - -
| H | | | H | H | H | H |
- -v= = <- = = =
H | | H | H H
- - = =v- = -
| H | H H |
- - -