thisthat
- Not to be confused with This=That.
thisthat is a 2D, ideographic esolang created by User:Aadenboy. It is inspired by other 2D esolangs like Befunge, Funciton, and the likes of languages like APL.
Bistack
The memory system of thisthat operates on a bistack, which is an infinite set of perpendicular stacks.
Pushing to any stack will shift everything on that row/column to the next stack over, then placing the value at the beginning. Conversely, popping removes the beginning element and shifts everything back. An empty value, when popped, has no value.
The pointer itself exists on the upwards, diagonal, pointing to the stacks left and down of it. The *
represents its position here, pointing to stacks D
and 4
.
Structure
A program in thisthat is a set of several nodes connected by wires. Wires are either execution wires, or data transfer wires. Execution is signified by a single line, and handles regular execution. Data transfer is signified by a double line, and handles data transfer, carrying a bit (0 or 1), or nothing. Nodes can have different behavior depending on how you enter it. Traversal out from one node depends on its outgoing connections—any nodes which are connected to the current node are able to be traversed to, excluding the path that it just came from. Paths are bidirectional. Multiple program pointers can exist at the same node.
Nodes
More commands may be added in the future.
Node | Execution | Data transfer |
---|---|---|
▣
|
The start of the program. There may be multiple of these at once. | |
◉
|
The end of the program. Immediately halts all execution forcefully. | |
◘
|
If multiple program pointers are on this node, it picks one at random and removes all the others. | If multiple program pointers are on this node, it picks one at random and assigns its data to be NAND all the transferred bits. |
▲▶▼◀△▷▽◁
|
Forces the direction of flow where it's pointing. If it is white, it ignores flow perpendicular to that of it. | |
◔
|
Pauses advancing for one cycle. | |
◈
|
Traps a program pointer from advancing until another one appears on the same node. | |
◇
|
Takes one bit of input, and sends it down any data transfer wires. If there is no more input, it sends nothing. | Outputs what was transferred. If what was transferred is empty, it acts as a "flag" or a "signal" for the system sending the stream of input, allowing it to perform some function like switching to the next set of input. |
◧⬓
|
Pops one bit from the current stack. ◧ leftwards, ⬓ downwards. | Pushes one bit to the current stack. ◧ leftwards, ⬓ downwards. |
◨⬒
|
Similar to their inverted counterpart, but after the last non-empty bit on the corresponding stack. | |
◹◺
|
Shifts the stack pointer up/down along the diagonal. Transfers a 1 if the move was successful, and a 0 otherwise. | Does execution behavior if the transferred value was 1. |
◐◑◒◓
|
If entered along the dividing line, the direction of flow is rotated clockwise. If it is entered from the white side, it is forced forward without splitting. If it is entered from the black side, it is forced outward. | If the transferred bit was 0, it will force the direction of flow down the white side. If the transferred bit was 1, it will force the direction of flow down the black side. If there was nothing transferred, it will force the direction of flow forwards. |
□■▦
|
Sends a 0, 1, or nothing down any data transfer wires. | Acts similar to ◘, but with NOR (□), OR (■), and XOR (▦) instead. |