chore: update readme

This commit is contained in:
2021-06-26 04:13:54 +00:00
parent 214bd8eb42
commit 3e733ac45b
2 changed files with 11 additions and 7 deletions

View File

@@ -3,7 +3,7 @@
The dopey brainf\*\*k interpreter was created as a side project to become familiar with Python 3. The goal was to fully implement all the features of brainf\*\*k as defined in this [wiki page](https://en.wikipedia.org/wiki/Brainfuck#Language_design) into dopey. The dopey brainf\*\*k interpreter was created as a side project to become familiar with Python 3. The goal was to fully implement all the features of brainf\*\*k as defined in this [wiki page](https://en.wikipedia.org/wiki/Brainfuck#Language_design) into dopey.
## Demo ## Demo
![gif](https://i.imgur.com/mqjNGzV.gif) ![gif](https://i.imgur.com/9HbBB1k.gif)
## Implemetation Limitations ## Implemetation Limitations
@@ -25,16 +25,20 @@ python3 --version
## Running dopey ## Running dopey
Clone the Github repository. From your terminal move to the root of the project and run the following line: Clone the Github repository and from your terminal move to the root of the project and run the following lines:
```bash ```bash
python dopey.py my-bf-file.bf chmod +x dopey.py
./dopey.py my_file.bf
``` ```
or in some systems You can also import an interpreter class included with dopey and use it in your own python scripts.
```bash ```python
python3 dopey.py my-bf-file.bf from dopey import Interpreter
interpreter = Interpreter()
interpreter.execute("[brainf*ck code]++-->><<++--")
``` ```
## Contributing ## Contributing

View File

@@ -74,7 +74,7 @@ class _Operation:
@classmethod @classmethod
def output(cls, _) -> None: def output(cls, _) -> None:
sys.stdout.write(chr(_Memory.buffer[_Memory.get_pointer()])) # TODO rollover if too big in ASCII sys.stdout.write(chr(_Memory.buffer[_Memory.get_pointer()]))
sys.stdout.flush() # TODO possible performance issue sys.stdout.flush() # TODO possible performance issue
@classmethod @classmethod