Crates.io | rpiet |
lib.rs | rpiet |
version | 0.3.0 |
source | src |
created_at | 2019-10-31 12:40:55.608827 |
updated_at | 2019-11-03 21:48:02.741897 |
description | An interpreter for Piet, the esoteric programming language |
homepage | https://github.com/tessi/rpiet/ |
repository | https://github.com/tessi/rpiet/ |
max_upload_size | |
id | 177144 |
size | 117,577 |
rpiet
, the piet interpreter in Rust 🖼piet
is a esoteric programming language which executes image files.
This is a piet interpreter written in Rust.
Composition with Red, Yellow and Blue. 1921, Piet Mondrian.
Piet is a programming language which aims to treat images similar to those of the artist Piet Mondrian as executables. Read more about how images are executed at the Piet homepage.
Install rpiet
via cargo
(the Rust package manager). This requires an up-to-date Rust being installed.
cargo install rpiet
Then run a GIF or PNG image with
rpiet sample_images/hello_world_globe.png
or explore the command line options it takes with
rpiet --help
It is possible to:
-c
, --codel-size <codel_size>
)-e
, --max-steps <max_steps>
)-v
, --verbose
) which allows the user to see which path the interpreter takes through the imageIt is possible to run Piet programs in it (I verified a couple from the Piet homepage), please report any bugs you find - the specification is somewhat loose :)
Input handling is currently not strictly conform to the spec. We read lines of input -- the spec is not very detailed here, but I think we should read only the necessary bytes (InChar -> one byte, InNum -> however many bytes form a valid number, but no more).
The binary was tested manually, but we don't have automated tests yet. Also, code documentation is sparse.
Bug reports and pull requests are welcome on GitHub at https://github.com/tessi/rpiet. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The crate is available as open source under the terms of the MIT License.
Everyone interacting in the rpiet project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.