Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Esoteric programming language
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Piet === [[File:Piet Program.gif|thumb|Piet program that prints 'Piet']] [[File:Piet Program Hello World.gif|thumb|A "Hello World" program in Piet]] '''Piet''' is a language designed by [[David Morgan-Mar]], whose programs are [[bitmap]]s that look like [[abstract art]].<ref name=":0"> {{cite web | title = Piet | url = https://dangermouse.net/esoteric/piet.html | last = Morgan-Mar | first = David | date = 25 January 2008 | access-date = 1 May 2023}} </ref> The execution is guided by a "pointer" that moves around the image, from one continuous coloured region to the next. Procedures are carried out 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.<ref name=":0" />{{Primary source inline|date=April 2022}} Variables are stored in memory as signed integers in a single [[Stack (abstract data type)|stack]]. Most specified procedures deal with operations on that stack, while others deal with input/output and with the rules by which the compilation pointer moves.<ref>{{cite book |last1=Kneusel |first1=Ronald |title=Strange Code: Esoteric Languages That Make Programming Fun Again |date=2022 |publisher=No Starch Press |isbn=978-1718502406 |pages=246β247 |ref=kneusel-strange-code-piet}}</ref> Piet was named after the Dutch painter [[Piet Mondrian]].<ref name="Cox2013">{{harvnb|Cox|2013|p=6}}</ref> The original intended name, ''Mondrian'', was already taken by [[Mondrian (software)|an open-source statistical data-visualization system]].<ref name=":0" />
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)