DeviantArt Community Guest Feature: When Art Meets Code

Display mode

Back to Articles

This post was written for DeviantArt's Community group as a guest feature, in Jun 2024.

When people talk about the history of abstract art, the name of Piet Mondrian is sure to come up. It was Mondrian who, in 1922, was the first to throw out all pretence of realism in the search for deeper connection to the innate nature of things.

A Mondrian piece with black lines on white canvas, some of the outer areas being coloured
Composition with Blue, Yellow, Red, Black and Grey (1922)
Piet Mondrian, Stedelijk Museum Amsterdam, via BBC[1]"Piet Mondrian and the six lines that made a masterpiece", BBC Culture, 2022

Mondrian trained in traditional landscapes, and continued to paint still life flowers even while producing abstract art in the 1920's[2]David Shapiro, "Mondrian: Flowers", 1991; via Wikipedia but as the curator of a Swiss collection of his works told the BBC:

Minimalism is unthinkable without Mondrian; he was one of the first who really did this, this totally non-representational work? If you see modern as something which breaks with all traditions and defines everything new, then Mondrian's paintings of the 20s are very, very modern.

The abstract works of Mondrian focus heavily on horizontal and vertical lines in black, and the filling of delineated areas with primary colours; as Mondrian would later explain in an essay from 1937, these lines "exist everywhere and dominate everything; their reciprocal action constitutes 'life'."

As it turns out, "everywhere" even includes fields of study that were barely known when Mondrian died in 1944, as his abstract style inspires the Piet programming language where images are programs, and different colours define various actions for the program to perform.

We don't usually think of images as computer programs. A computer program, though, can be represented in just about any way: if a given piece of code can be expressed in one "Turing-complete" form, it has been proven mathematically that any other "Turing-complete" form is equivalent.

To take a ridiculous example, a programming language exists based on travel between stations of the London Underground, and it's called Mornington Crescent[3]"Mornington Crescent" on the Esolangs wiki, 2013.

Interactive debugger session for Mornington Crescent Hello World
Interactive debugger for the Mornington Crescent programming language
Language specification by Timwi, debugger by Imran Nazar[4]"mcresc: Mornington Crescent Interactive Debugger", Imran Nazar, 2016

So when David Morgan-Mar saw a painting by Piet Mondrian, and decided it would be good material for a programming language, it was no more ridiculous a concept than many others in the world of coding. Thus, the Piet language[5]"Piet", David Morgan-Mar, last updated 2022 was born.

Hello World in Piet, by Thomas Schoch
"Hello World" in the Piet programming language
Thomas Schoch, 2006[6]"Hello, world! in Piet", Thomas Schoch, 2006

Programs in Piet are colourful. The Piet language uses more colours than Mondrian himself was wont to use, defining six colours in three shades, and giving meaning and context to each shade of colour as well as each direction of travel through the image; execution starts in the top left and moves through depending on the values of the pixels encountered.

There are many examples of programs that people have written in Piet[7]"Piet Program Gallery", David Morgan-Mar, last updated 2023, including pieces intentionally designed to look more like abstract works than computer programs, but Piet probably claims the crown for the first programming language in which a piece of code has been written accidentally.

The work of Barbara Maahs[8]"Bilder, Barbara Maahs", Atelier Kunst 24 is very much in the Mondrian tradition, with solid blocks of primary colour; she breaks away from the use of black dividing lines, often preferring direct contact between blocks. So it was that Piet Jarmatz saw a Maahs piece in a gallery, had a suspicion that it would run if plugged into a computer, and was able to convert it into a working Piet program[9]"Piet Get-Together", Piet Jarmatz, 2023 that takes typed-in letters and prints out their decimal ASCII values.

Piet Get-Together
"Get-Together" by Barbara Maahs
Converted to Piet colour palette by Piet Jarmatz, 2023

And I think that's pretty neat.