What is Piet?
Piet is an esoteric programming language created by David Morgan-Mar in 2001 where programs are written as colorful bitmap images instead of text. Instead of characters or keywords, the code consists of color blocks arranged like abstract art. The instruction pointer moves through these colored regions, and the transitions between colors determine what operations occur. The language is named after the painter Piet Mondrian, known for geometric color-block artwork.
Piet is both a programming language and a visual art medium. A valid program might look like a modern art painting rather than code. Because of this, it often appears in programming challenges and showcases where the goal is to write functional yet visually aesthetic code.
Specs
Language Type: Esoteric / Visual
Released: 2001
Creator: David Morgan-Mar
Execution Model: Instruction pointer moves through colored regions
Syntax: Colors represent operations
Typing: Stack-based behavior
CODE EXAMPLE (Hello World)
This is normally an image, so text cannot represent it.
A small “Hello World” program in Piet looks like a blocky pixel-art painting with gradients representing commands.
How It Works
- Each color block represents an instruction.
- The interpreter moves from one block to another following direction rules.
- Color changes define the operation: stack push, add, subtract, duplicate, print, etc.
- Darker or lighter shades change the function type.
- Black blocks act as walls, preventing movement.
- White blocks enable free movement with no action.
Because of this, designing code feels closer to drawing than typing.
Strengths
- A unique blend of visual art and programming.
- Encourages creative thinking and spatial planning.
- Excellent for coding competitions, showcases, and artistic projects.
- Produces some of the most visually iconic “programs” in esolang history.
Weaknesses
- Nearly impossible to debug without visual tools.
- Hard to write precise logic due to layout complexity.
- Requires image editors instead of text editors.
- Not suitable for any real-world development.
Where To Run
Piet can be executed using online interpreters, including tools found on TIO.run or dedicated Piet editors that track execution paths.
Should You Learn It?
Useful for a job: No
Cool for creativity and showing off: Yes
Easy to learn: Not really
Readable after one week: No chance
Summary
Piet turns programming into visual art. Instead of typing commands, you draw shapes and colors that act as instructions. It is playful, clever, chaotic, and visually expressive—perfect for people who enjoy programming experiments or want to blur the line between art and code. It will not replace normal languages, but it remains one of the most fascinating examples of unconventional programming design ever created.
Top comments (0)