From Esolang
Jump to: navigation, search
“Hello World” in Piet.

Piet is an esoteric programming language in which programs look like abstract paintings. It uses 20 colors, of which 18 are related cyclically through a lightness cycle and a hue cycle. A single stack is used for data storage, together with some unusual operations.

Piet was invented by David Morgan-Mar and is named after geometric abstract art pioneer Piet Mondrian.

Computational class[edit]

If the stack is allowed to hold any arbitrarily long number then it's very likely Turing-complete. There's no formal proof though.

Sketch of a proof for TC: The rotate operation makes every stack position directly accessible, thus making the stack usable as a register bank. It's enough for TC to have two unlimited-size registers and be able to do certain simple operations with them, as stated in the Minsky machine article. Writing Piet programs is straightforward enough as to make it possible to program the finite-state automaton needed to simulate a universal Turing machine.

External resources[edit]