CCWPL
Programming === Instructions: 0: Rotate the wheel counter-clockwise. 1: Execute the currently selected command. Wheel: 1: No op. 2: Set the referenced boolean to true. 3: Add the referenced boolean to the cache. 4: Perform a logical NOR on the two booleans in the cache and store it to the location of the referenced boolean. 5: If the referenced boolean is true, skip the next instruction. Otherwise, move to the previous instruction. 6: Request input in the form of a boolean and store to the location of the referenced boolean. 7: Output the referenced boolean. 8: Increment the memory pointer. 9: Decrement the memory pointer. 10: Halt the program. When the wheel is rotated CCW, the command index is decremented. It also wraps (if 0, set self to 10). Cache: Up to two booleans can be stored in the cache. If more are added, then the oldest one is removed to make place. === Memory === Memory in CCWPL is unbounded, like many other esoteric programming languages. That means it starts at just one boolean, but you more can be added as the program calls for it. === Compiling === There is a reporter named 'CCWPL: i (x) to i (y)'. It is essentially an auxiliary programmer, reporting the amount of '0's required to turn from command 'x' on the wheel to command 'y'. This allows much faster programming. Use the 'join' block and the custom reporter to program faster. Refer to the instructions on the wheel (I recommend keeping a small sheet with them on it so you can follow along). === Input === Input is accepted as a '1' (true) or '0' (false). Any other value and the program will not do anything. === Output === Running a CCWPL program is all local. The output takes the form of a list with the program itself as the first item, the memory as the second, the cache as the third, and the actual output as the fourth. Press space to input another program after running. === Example Programs (If you come up with any, tell me and I'll add them (and credit you, of course)) === NOR: 00000100010000010010001000000000100000001 Quine: 0000010000000001 ````
Created May 9, 2019
Last updated May 16, 2019
Published May 11, 2019