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. You can watch an introduction to the project on YouTube.

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, and 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. All streams are archived on a dedicated YouTube channel.

This live-coding project is part of the declarative.tv initiative, where you can find other streamers using functional and declarative languages. Join our Discord server to chat about this project!

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


Status

main build status dev build status twitch status

Until 1.0 is reached, all development will happen on the dev branch.


Getting started

This project is written in Haskell and uses Stack. To compile and test it4, 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

Unless otherwise explicitly stated, this project does not accept external code contributions. This policy might change after the 1.0 release, in which case a code of conduct and a contributing guide will be added.


Acknowledgements

Thank you to @rond for fixing my clumsy attempt at JavaScript!


Roadmap

Once the project has made enough progress, a roadmap to 1.0 will be detailed here.



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. The intent is to signal that this project is not to be taken too seriously; it was also intended to be a pun, but it turns out I've been mispronouncing "Piet" for two decades. Whoops.

  4. 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

Contributors 2

  •  
  •