BrainFuck interpreter, implemented in Python.
Command | Description |
---|---|
> |
Move the pointer to the right |
< |
Move the pointer to the left |
+ |
Increment the memory cell at the pointer |
- |
Decrement the memory cell at the pointer |
. |
Output the character signified by the cell at the pointer |
, |
Input a character and store it in the cell at the pointer |
[ |
Jump past the matching ] if the cell at the pointer is 0 |
] |
Jump back to the matching [ if the cell at the pointer is nonzero |
$ |
Print debug |
I use
$
for debug instead of the usual#
because I more frequently use "#" in comments when referring to cell number, but don't want to see the debug output
Run files ending in .bf
python .\pyfucc\main.py --src .\examples\helloworld.bf
The same set of cells are used for a single session
Some convenience methods built into the REPL
:help Help
:exit Exit REPL
:about More information about BrainFuck
:reset Reset program state
:undo Undo the last operation
Table of Contents
python -m pip install pyfucc
pyfucc
is distributed under the terms of the MIT license.
Python 3.11 and Pytest 7 on Windows 11
This project manages environments and dependencies using Hatch. Install with python -m pip install hatch
or using pipx
To work on this project:
# Clone rep
git clone https://github.com/ImAKappa/pyfucc.git
# Change directories
cd pyfucc
# Create environment
hatch env create
# Spawn shell within virtual env
hatch shell
# Test the project
python '.\pyfucc\main.py'