Skip to content

Instantly share code, notes, and snippets.

@luizperes
Created July 10, 2016 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luizperes/d80a6ad5bdbe4555a4a266eff39a5d4b to your computer and use it in GitHub Desktop.
Save luizperes/d80a6ad5bdbe4555a4a266eff39a5d4b to your computer and use it in GitHub Desktop.
this code stops when the user press the space key
the only chars accepted are the brain chars | tabs and spaces
[65][65][32] continue loop
[32][32][32] end program
+ add one to the 0th cell to start the while
[ while (true)
, read input at 1st cell
>[-] clean 2nd cell
+* copy value from 1st to 2nd cell
>+++
{
++++++++++ make number 33 at 3rd cell (3 plus (3 times 10))
}
- subtract one for the space char
% gets 3rd cell mod 2nd cell
?
[-]<< if the value is not zero clean the cell and move to 1st cell
:
!
;
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment