Brain Freak is a brain**** compiler written in Rust, and compiled to Web Assembly. Commands process in a lazy-loaded fashion where the javascript requests the wasm code to process a command when the user performs an action.
Shows the next command to be executed
➡️
Right Arrow key lazy-loads the next command
⬅️
Left Arrow key reverses the previous command
⬇️
Down Arrow key seeks to the next break command or the end of program
⬆️
Up Arrow key seeks to the previous break command or the start of program
>
Increment the pointer (++p;)
<
Decrement the pointer (--p;)
+
Increment the byte at the pointer (++*p;)
-
Decrement the byte at the pointer (--*p)
.
Output the byte at the pointer (putchar(*p);)
,
Input a byte and store it in the byte at the pointer (*p = getchar();)
[
Jump forward past the matching ] if the byte at the pointer is zero (while (*p) {)
]
Jump backward to the matching [ (})
!
Stop on this command when processing (break command)
?
Log the current state (logger)
#
Commands between 2 of these characters are skipped (comment)