Piet (programming language): Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
m Dating maintenance tags: {{Afd-mergeto}}
Line 1:
{{afd-mergeto|#REDIRECT [[Esoteric programming language#Piet|Piet]] (programming{{R language)|18from Maymerge}} 2013|date=May{{R 2013to Piet}}
 
{{multiple issues|
{{notability|date=April 2012}}
{{no footnotes|date=August 2012}}
{{expert-subject|1=Computing|date=December 2012}}
{{ref improve|date=December 2012}}
{{tone|date=December 2012}}
}}
 
[[Image:Piet Program.gif|thumb|168px|Piet program that prints 'Piet']]
[[Image:Piet_Program_Hello_World(1).gif|thumb|A "Hello World" program in Piet]]
 
'''Piet''' is an [[esoteric programming language]] designed by [[David Morgan-Mar]], whose programs are [[bitmap]]s that look like [[abstract art]]. The compilation is guided by a "pointer" that moves around the image, from one continuous coloured region to the next. Procedures are carried through when the pointer exits a region.
 
There are 20 colours for which behaviour is specified: 18 "colourful" colours, which are ordered by a 6-step hue cycle and a 3-step brightness cycle; and black and white which are not ordered. When exiting a "colourful" colour and entering another one, the performed procedure is determined by the number of steps of change in hue and brightness. Black cannot be entered; when the pointer tries to enter a black region, the rules of choosing the next block are changed instead. If all possible rules are tried, the program terminates. Regions outside the borders of the image are also treated as black. White does not perform operations, but allows the pointer to "pass through". The behaviour of colours other than the 20 specified is left to the compiler or interpreter.
 
Variables are stored in memory as signed integers in a single stack. Most specified procedures deal with operations on that stack, others with input/output and with the rules by which the compilation pointer moves.
 
Piet was named after the Dutch painter [[Piet Mondrian]]. The originally intended name, ''Mondrian'', was already taken.
 
==External links==
{{Commons category|Piet (programming language)}}
* [http://www.dangermouse.net/esoteric/piet.html Piet programming language]
* [http://esolangs.org/wiki/Piet Piet on the esolangs wiki]
 
[[Category:Esoteric programming languages]]
[[Category:Visual programming languages]]
[[Category:Stack-oriented programming languages]]
 
{{compu-lang-stub}}