Piet, a programming language in which programs look like abstract paintings
dangermouse.net
dangermouse.net
2016: https://news.ycombinator.com/item?id=11342442
2014: https://news.ycombinator.com/item?id=7727702
2012, cheekily titled: https://news.ycombinator.com/item?id=4698737
2011: https://news.ycombinator.com/item?id=2430357
2010: https://news.ycombinator.com/item?id=1166462
2008 (not much): https://news.ycombinator.com/item?id=139872
https://github.com/boothby/repiet/blob/master/README.md#but-...
Among the esoteric languages I've learned, Piet is by far, hands down, my favorite. But it's curiously opinionated about reading input. I don't think any interpreter / compiler gets it right, mine included. Painting (one does not write) Piet code to safely handle input, by that spec, is particularly annoying.
I guess the best reference for implementing new interpreters is npiet and testing all example images.
npiet is good, and I use its examples for testing, but FYI it diverges from the spec in how it handles whitespace. According to DMM, if the cursor enters a loop entirely within whitespace, the program should terminate. Currently, npiet doesn't have a cycle-detection algorithm so it hangs.
One of these days I'll get around to making my test infrastructure and polishing up my tests... but I've recently had some weird thoughts about a place&route algorithm to replace my existing Piet backend and that's more interesting. First step, design a router that creates right-hand-rule paths through whitespace? What am I even doing with my life...
I remember a point in development when I implemented whitespace handling and cycles therein. I thought I had implemented the spec but some example programs did not run properly. Maybe that was because of the divergence in the spec vs. npiet you mentioned. Since my main goal was to learn rust I just made the example programs work and did not double check the spec again. Will look into it again when I find some time :)
I believe they are well aware of the limitations that have been shown in these recent benchmarks, and that it doesn't in fact demonstrate superiority in any way.
repiet wc.png -o wc.c --backend c --codel_size 10 -O 2
gcc wc.c -o wc -O3
I hacked it together in response to a "brainfuck is faster than C" HN post and stale jokes don't die on my watch.