Waffles
Waffles is an Esoteric programming language created by User:Buckets in 2024. (Use (Waffles) To determine The starting Command, After the command.)
Commands | Instructions |
---|---|
Waffles | + 10 on the current cell. |
waffles | Turn 45 Degrees Anti-Clockwise. |
Waffles, | Move the pointer right If the next Command is waffles, Else move The pointer towards the Left. |
waffles, | - 1 on the current cell. |
Waffles! | Set the current Cell to The input Number and then turn 90 Degrees Anti-Clockwise. |
waffles! | Take the number from the cell then Print it in ASCII. |
Waffles? | If the current cell is not Equal to 0, then go to Waffles,th waffles? (As many times Waffles, was used before Waffles?.) |
waffles? | Noop. |
Waffles. Or waffles. | Ends the program. |
Cat program:
waffles? waffles waffles waffles waffles? waffles? waffles waffles waffles? waffles? Waffles!(Waffles) waffles? waffles waffles! waffles.
Truth-machine Program:
waffles? waffles? waffles? waffles waffles Waffles waffles Waffles waffles Waffles waffles Waffles waffles Waffles waffles waffles, waffles waffles? waffles? waffles! waffles? Waffles, waffles? waffles, waffles? Waffles, waffles? Waffles? waffles? waffles waffles waffles waffles? waffles? waffles Waffles, waffles? waffles? Waffles!(Waffles) waffles, Waffles, Waffles? Waffles Waffles Waffles Waffles Waffles waffles, waffles, waffles! Waffles.
Computational class
Waffles is Turing complete. Any Brainfuck program can be reduced to Waffles.
Decrement is native, using waffles,
. Increment can be achieved with Waffles
followed by 9 decrements.
Going left/right along one line can be done using Waffles,
followed by an increment and decrement for a left. The increment followed by decrement being part of the metaoperation ensures that the move command does not move right, regardless of the command after it. For a rightward move Waffles,
followed by waffles,
(to trigger the rightwards move) followed by an increment can be used.
Finally, conditional looping uses the noop waffles?
and conditional jump Waffles?
. Noops are placed at the start of loops, acting as labels. Then, to conditionally jump backwards to the nth label, n many Waffles,
(pointer move) are used. This can cause a conditional state change to the pointer position. Since the pointer moves for this will never occur before a decrement, it will always move leftwards. To solve the leftward movement before each attempted jump, n many rightward moves should be put at the start of every loop (immediately after the noop) and after the jump.
With these constructions, there is a direct 1 to 1 conversion from any IO-less Brainfuck program to Waffles. If we assume Waffles has an infinite grid, or a finite number of unbounded cells, Waffles is Turing complete.