An open API service indexing awesome lists of open source software.

https://github.com/nicuveo/pietre

Compiler for a small stack-based imperative language, targeting the Piet language.
https://github.com/nicuveo/pietre

compiler haskell piet

Last synced: 11 months ago
JSON representation

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

Awesome Lists containing this project

README

          


the project logo, which is itself a Piet program

[Documentation](/docs) | [Twitch]


Piètre is a small stack-based imperative language that compiles to [Piet](https://www.dangermouse.net/esoteric/piet.html), an esoteric language in which the source code is an image[^1]. Its syntax is similar to Rust's[^2].

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][Twitch]. Streams are announced ahead of time on the [channel's schedule][Twitch schedule].

_Piètre_ means "shoddy" or "second-rate" in french.


## Status

[![main build status][ShieldM]][Actionm] [![dev build status][ShieldD]][ActionD]

[![twitch status][TwitchStatus]][Twitch]


## Getting started

This project is written in [Haskell] and uses [Stack]. To compile and test it[^3], you can run:

```bash
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:
- [x] 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




[ActionM]: https://github.com/nicuveo/pietre/actions/workflows/validate.yml?query=branch%3Amain
[ActionD]: https://github.com/nicuveo/pietre/actions/workflows/validate.yml?query=branch%3Adev
[ShieldM]: https://img.shields.io/github/actions/workflow/status/nicuveo/pietre/validate.yml?logo=github&event=push&style=flat&branch=main&label=main%20build
[ShieldD]: https://img.shields.io/github/actions/workflow/status/nicuveo/pietre/validate.yml?logo=github&event=push&style=flat&branch=dev&label=dev%20build
[TwitchStatus]: https://img.shields.io/twitch/status/nicuveo?logo=twitch&logoColor=white&style=flat&cacheSeconds=300
[Twitch]: https://twitch.tv/nicuveo
[Youtube]: https://www.youtube.com/@nicuveo
[Twitch schedule]: https://www.twitch.tv/nicuveo/schedule
[Haskell]: https://www.haskell.org/
[Stack]: https://docs.haskellstack.org/en/stable/

[^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.