very shitty esolang where self-modifying code is mandatory
Find a file
2023-12-12 22:25:56 +01:00
src this is literal garbage 2023-12-12 22:25:56 +01:00
.gitignore this is literal garbage 2023-12-12 22:25:56 +01:00
Cargo.lock this is literal garbage 2023-12-12 22:25:56 +01:00
Cargo.toml this is literal garbage 2023-12-12 22:25:56 +01:00
README.md this is literal garbage 2023-12-12 22:25:56 +01:00
rustfmt.toml this is literal garbage 2023-12-12 22:25:56 +01:00

sandworm

program space is an arbitrary sized grid the worm starts where you place the worm head @ as it passes over commands, they get moved to the back of the worm (also depending on the worm length) commands to change direction <>^v values get pushed to stack (eaten) when passed over, worm body length increases autosarkophagy/self-cannibalism is possible, cutting off the back of the worm (the lower part of the stack) and pushing the passed value to the stack (front of worm) conditional: pop then side/forward if top of stack is zero

commands

+- pop 2 values *, push sum/difference (uses the order they are popped, so `0 -` negates the top of the stack)
><^v change direction
0123456789ABCDEF push number to stack
/\ pop stack, reflect to the side if zero
? reads one byte of input
= duplicate top of stack
! pop and write output as ascii char
" pop and write output as number
  • pop when stack is empty yields zero