A Programming Language That Lets You Code With Pixels

A Programming Language That Lets You Code With Pixels

This programming language gives you programs that resemble modern art. It’s fortunately a feature of the language, dubbed Piet after the famed abstract painter Piet Mondrian.


The language uses 20 distinct colors, with the colors cycling from red to yellow to green to cyan to blue to magenta and the lightness cycling from light to normal to dark. The code is formed from graphics made of the recognized colors, with individual pixels holding much of the information. Stacks are used for storing data values, that can exist as integers or as Unicode characters with the proper commands applied.



Numbers in the program are represented by colors, while black blocks indicates edges and white blocks indicate free zones. The interpreter physically slides through blocks in the direction of the Direction Pointer (DP), with hue changes indicating different commands based on the steps of the change.


To execute a program, the Piet language interpreter begins in the upper left codel (or individual code block) of the program, maintaining a DP initially pointed to the right and a Codel Chooser (CC) initially pointed to the left. The DP and CC turn right, left, down, or up depending on the execution.


There is currently a small community of coders developing sample programs, interpreters, IDEs, and compilers for the language. You can check out some of the sample programs here.



Support the originator by clicking the read the rest link below.