Skip to content

An Interpreter for the esoteric programming language Piet in Rust

License

Notifications You must be signed in to change notification settings

PhilippRados/pint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pint 🍺

A (P)iet (Int)erpreter with a builtin png-decoder.

Piet is a programming language in which programs look like abstract paintings. The language is named after Piet Mondrian, who pioneered the field of geometric abstract art.

👈 This is a piet program that prints "Hello World!"

Installation

cargo install pint

or you can clone this repo and build it from source

Usage

pint some_test.png

The codel-size is inferred automatically. You can also pass it manually:

pint some_test.png -c <codel_size>

Since the png-decoder is built from scratch it only implements the most common Png color-types TruecolorRGB and Indexed. There is currently no support for gifs.

Tests

Typing make shows you the options for this crate.

unit-tests

$ make unit_test
or
$ cargo t

There also integration tests that check the result of the test-images located in tests/fixtures

$ make integration_tests
or
$ bash tests/integration_tests

Contribution

I would appreciate any kind of contribution (as long as the tests pass :)) or feedback since this is my first time writing rust. Maybe there is somebody willing to finish the png decoder to support all kinds of pngs

About

An Interpreter for the esoteric programming language Piet in Rust

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published