Tuesday, March 18, 2008

Piet: Programming inspired by Mondrian

Programming is almost wholly language-oriented these days. You have syntax and grammar and keywords and so on. So, it seems David Morgan-Mar decided to do something about that. He created a language he named "Piet". This language is cute. It uses colour, position and direction within a bitmap (ie, an image!) to drive an interpreter. The sample programs made me smile...

Here is an example from that page. The program calculates PI quite literally using that big circle. (!) From the page " Naturally, a more accurate value can be obtained by using a bigger program." :D

One wonders what insights might be gained through programming with such an immediately visual representation. (Graphs are often used as a higher-level metaphor in visual programming.)

via reddit


Rachael said...

I love the Piet painting program that prints Piet. :)

Daniel said...

This is the craziest thing I've seen in ages. Wow. It reminds me of the old fibonacci art stuff I was playing around with for a while. It also reminds me that I want to start playing with Max/MSP, another visual (though hardly comparable) programming language.