Jump to content

Piet (programming language)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr flea (talk | contribs) at 07:04, 26 December 2007 (Revert: copyright violation (most of the removed text appears to have been taken directly from the first external link)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
File:Hw2-11.gif
A "Hello World" program in Piet.

Piet is an esoteric programming language designed by David Morgan-Mar, whose programs are bitmaps that look like abstract art. Piet was named after the Dutch painter Piet Mondrian.

Computational class

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 an universal Turing machine.