Piet (programming language): Difference between revisions

Content deleted Content added
sp "brightness"
 
(30 intermediate revisions by 24 users not shown)
Line 1:
#REDIRECT [[Esoteric programming language#Piet]]
[[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]]
 
{{Redirect category shell|1=
'''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.
{{R from merge}}
 
{{R to section}}
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.
}}
 
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 Mondriaan]]. The originally intended name, ''Mondrian'', was already taken.
 
==External links ==
* [http://www.dangermouse.net/esoteric/piet.html Piet programming language]
* [http://esolangs.org/wiki/Piet Piet on the esolangs wiki]
* [http://www.retas.de/thomas/computer/programs/useless/piet/explain.html A Piet program with detailed explanation]
* [http://www.retas.de/thomas/computer/programs/useless/piet/Piet/index.html A Piet program that looks like a painting by Piet Mondrian]
* [http://www.majcher.com/code/piet/Piet-Interpreter.html Piet::Interpreter - An interpreter for Piet written in Perl]
* [http://www.bertnase.de/npiet npiet - An interpreter and editor for Piet]
* [http://www.rapapaing.com/piet PietDev - An online Piet editor and debugger]
* [http://99-bottles-of-beer.net/language-piet-1269.html 99 bottles of beer on the wall]
 
[[Category:Esoteric programming languages]]
[[Category:Visual programming languages]]
[[Category:Stack-oriented programming languages]]
 
{{compu-lang-stub}}
 
[[de:Piet]]
[[fr:Piet]]
[[nl:Piet (programmeertaal)]]
[[ja:Piet]]
[[ru:Piet]]
[[th:ภาษาพีต]]