~jpl8/piet_interpreter

A somewhat functioning piet interpreter
Fix outnum to only emit a single byte.
Add stdout lock instead of just print!'ing.
Add bfs based minimal number generation

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~jpl8/piet_interpreter
read/write
git@git.sr.ht:~jpl8/piet_interpreter

You can also use your local clone with git send-email.

#A somewhat functional Piet interpreter

#Example

#Usage

To interpret a piet program simply pass it as input to the binary

piet <INPUT_FILE>

or use cargo

cargo run -- <INPUT_FILE>

#Debug

To see debug information, pass the debug flag (-d):

piet -d <INPUT_FILE>

#Codel size

If the image is upscaled perfectly, without interpolation, and the smallest group of equal colored pixels is a nxn square then the interpreter will assume that the codel size is n. It is possible to specify the desired codel size directly as a parameter, but beware, funky behaviour may be encountered if the wrong codel size is passed, potentially never terminating. However, there are also some piet programs that can be interpreted in different, intended forms depending on the codel size.

To specify the codel size use the -c or --codel-size option:

piet -c 20 <INPUT_FILE>

Further parameters are available and can be consulted by invoking the help flag (-h):

piet -h