
Piet, a programming language in which programs look like abstract paintings - davedx
https://www.dangermouse.net/esoteric/piet.html
======
dang
Related posts, from 2017:
[https://news.ycombinator.com/item?id=13503841](https://news.ycombinator.com/item?id=13503841)

2016:
[https://news.ycombinator.com/item?id=11342442](https://news.ycombinator.com/item?id=11342442)

2014:
[https://news.ycombinator.com/item?id=7727702](https://news.ycombinator.com/item?id=7727702)

2012, cheekily titled:
[https://news.ycombinator.com/item?id=4698737](https://news.ycombinator.com/item?id=4698737)

2011:
[https://news.ycombinator.com/item?id=2430357](https://news.ycombinator.com/item?id=2430357)

2010:
[https://news.ycombinator.com/item?id=1166462](https://news.ycombinator.com/item?id=1166462)

2008 (not much):
[https://news.ycombinator.com/item?id=139872](https://news.ycombinator.com/item?id=139872)

~~~
jagged-chisel
The 2012 link says "No such item." Is this it?
[https://news.ycombinator.com/item?id=4698737](https://news.ycombinator.com/item?id=4698737)

~~~
dang
Yup! Thanks. Fixed now.

------
boothby
Bears mentioning that Piet is "faster than C" if you use the right compiler.

[https://github.com/boothby/repiet/blob/master/README.md#but-...](https://github.com/boothby/repiet/blob/master/README.md#but-
is-it-faster-than-c)

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.

~~~
downerending
C is also "faster than C" if you use the right compiler.

~~~
boothby
Well yes, the example uses a C backend and everything.

    
    
      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.

~~~
downerending
I, too, was joking. Mostly. :-)

------
zingermc
A while ago, I tried making a Piet compiler in Haskell that emits LLVM IR.
Eventually I found an inconsistency between my interpretation of the spec and
npiet's implementation, so some Hello World examples would print something
like "Hello wowowowowo...".

[https://github.com/dmcardle/piet-llvm-
frontend](https://github.com/dmcardle/piet-llvm-frontend)

------
jboy55
My phone screen coding question, designed to be obvious and quick, was to do
pow(base, exp). I would always tell the interviewee that they could use any
language they are comfortable in. Thinking ahead, I wanted to be prepared for
the eventual, 'well I'll use Whitespace!'. So I sat down during a hack day and
did whitespace, Piet, LolCat and tried to do BF. Piet was the most enjoyably
hard. Figuring how to store variables was a nice brain test, I really felt I
had acomplished things. Whitespace is super easy in comparison and I couldn't
figure out how to do a variable length outer loop in BF.

------
maddyboo
The list of example programs is really fascinating:

[https://www.dangermouse.net/esoteric/piet/samples.html](https://www.dangermouse.net/esoteric/piet/samples.html)

~~~
dmos62
At the bottom there's a text adventure game and a brainfuck (another esoteric
language) interpreter.

------
plopz
For whatever reason, it makes me really happy that esoteric languages like
Befunge, vigil or Half-Broken Car in Heavy Traffic exist.

~~~
bussierem
You should take a look at Rockstar:
[https://github.com/RockstarLang/rockstar](https://github.com/RockstarLang/rockstar)

------
dibujaron
Wow, David Morgan-Marr does neat language projects as well as the awesome
webcomics? That guy is a machine.

