|Computational class||Turing complete|
|Major implementations||Lua Program made to interpret Braingrate|
Braingrate is a parody of brainfuck created by User:Aadenboy which adds seven new commands to supposedly make programs easier to work with. It is entirely written in Lua, and the interpreter is exactly 3,000 bytes big (including comments). The interpreter only accepts any
.txt files named "braingratescript".
Braingrate uses commands like brainfuck's, but there is also a set of extra commands with their own functions too. All cells may only be 0-255 in value, and there is only 256 cells to be worked with. The pointer always starts off at the first cell (cell 0).
||Move the pointer to the right|
||Move the pointer to the left|
||Increment the chosen cell's value up by one|
||Decrement the chosen cell's value down by one|
||Output the ASCII character corresponding to the chosen cell's value|
||Output the chosen cell's value|
||Gets input from the user as a number and stores it into the chosen cell|
||Gets input from the user as any valid ASCII character and stores the ASCII code into the chosen cell|
||Create a loop starting at this command's position in the script|
||Go back to the previous |
||Copy the chosen cell's value to the cell to the left of it|
||Set the chosen cell's value to a random value from 0-255|
||Ignore the rest of the commands if the current cell is equal to the previous one until another |
||Skip the next command|
||End the program|
Any other characters will be treated as comments.
This program below is an example of a Truth Machine.
While the program is a valid truth machine, it doesn't seem like one when dealing with other values such as 176, or 255. The program below accounts for that, and will print a 0 if it is not 1, otherwise it will indefinitely print 1s.
The cat machine program has exactly two variations. This first program will output whatever number was inputted.
This second program will output whatever ASCII character was inputted.