Brain Freak

A Rust, Wasm, lazy-loading Brain**** compiler
Home

Description

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.

Navigation

  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

Commands

Standard Mode

> 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 [ (})

Extended Mode

! Stop on this command when processing (break command)
? Log the current state (logger)
# Commands between 2 of these characters are skipped (comment)

Current Limitations