Skip to content
/ pietre Public

Compiler for a small stack-based imperative language, targeting the Piet language.

License

Notifications You must be signed in to change notification settings

nicuveo/pietre

Repository files navigation


Piètre is a small stack-based imperative language that compiles to Piet, an esoteric language in which the source code is an image1. Its syntax is similar to Rust's2.

The main goal of this project is to be educational: it aims first at being a good resource to learn about compilers and how to implement them. A secondary objective is to provide a reference for how to organize a medium-size Haskell codebase. Furthermore, until 1.0 is reached, the code of this project will be entirely written live on Twitch. Streams are announced ahead of time on the channel's schedule.

Piètre means "shoddy" or "second-rate" in french.


Status

main build status dev build status
twitch status


Getting started

This project is written in Haskell and uses Stack. To compile and test it3, you can run:

git clone https://github.com/nicuveo/pietre.git
cd pietre
stack build
stack run pc -- path/to/pietre/file.pi

Binary releases will be provided from 1.0 onwards.


Contributing

Until 1.0 is reached, this project will remain a one-person effort and will not accept external contributions. There is no guarantee this policy will change past 1.0: this is a hobby project first and foremost. :)


Roadmap

Once the project has made enough progress, a roadmap to 1.0 will be detailed here. Until the project can start, the remaining tasks are:

  • finish a draft version of the reference and implementation guides
  • record a video announcing the project
  • announce the project on social media
  • schedule a first stream


Footnotes

  1. The logo of the project is itself a valid Piet program, that behaves like cat. You can try it with echo "foo" | npiet -q logo.png.

  2. But with fewer features. See the reference for more information.

  3. Once it works, that is.

About

Compiler for a small stack-based imperative language, targeting the Piet language.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published