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
Until 1.0 is reached, all development will happen on the dev branch.
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.piBinary releases will be provided from 1.0 onwards.
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.
Thank you to @rond for fixing my clumsy attempt at JavaScript!
Once the project has made enough progress, a roadmap to 1.0 will be detailed here.
Footnotes
-
The logo of the project is itself a valid Piet program, that behaves like
cat. You can try it withecho "foo" | npiet -q logo.png. ↩ -
But with fewer features. See the reference for more information. ↩
-
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. ↩
-
Once it works, that is. ↩
