arabic

Thumbnail
An interactive قلب session showing the Fibonacci algorithm

قلب is a programming language exploring the role of human culture in coding. Code is written entirely in Arabic, highlighting cultural biases of computer science and challenging the assumptions we make about programming. It is implemented as a tree-walking language interpreter in JavsScript.

All modern programming tools are based on the ASCII character set, which encodes Latin Characters and was originally based on the English Language. As a result, programming has become tied to a single written culture. It carries with it a cultural bias that favors those who grew up reading and writing in that cultural. قلب explores and challenges that by presenting a language that deviates almost entirely from ASCII.

The Fibonacci Algorithm

Project Created: 
January 2013
 

Second prototype of قلب’s code calligraphy. This one says مرحبا يا عالم (hello world), which isn’t executable code, but code-related and fun anyway.

 

First prototype of قلب’s code calligraphy, done in square kufic with glass tiles. It says “لكل ن” (for each n) and matches the bottom-right part of the bubble sort calligraphy prototype on the language’s site.

In preparation for Eyebeam’s Open Studios later this week.

 

Mockup of قلب’s new Scheme inspired syntax. I’ve been trying to arrive at a syntax that translates better into calligraphy than the first mockup, and with the parentheses removed, this syntax is nothing but words and numbers.

The parentheses are needed for the code to run correctly, but there is a precedent in leaving off dots, vowel markings, and punctuation in calligraphy, sacrificing readability for elegance.

The Scheme-like syntax is also easier to write an interpreter for.

The code was typed into TextMate, so it is unhighlighted and left-aligned. The English equivalent would be:

 

My father pointed out the spelling mistake in my bubble sort prototype (لائحة instead of لأحة). Stay tuned for a higher level of literacy in the future!

 

Process of designing the bubble sort piece, from Ruby code to Arabic code to Square Kufic prototypes in Photoshop.

Part of my fellowship at Eyebeam exploring Code as Self Expression.

 

A more organized version of the bubble sort algorithm in Square Kufic. I’m not sure which one I like more.

My first attempt at code calligraphy. Part of my fellowship at Eyebeam exploring Code as Self Expression.

 

My first attempt at code calligraphy. This bubble sort rendered in the Square Kufic style. Letters in red are language keywords. It is laid out in a spiral, starting at the lower right and circling clockwise towards the center.

Part of my fellowship at Eyebeam exploring Code as Self Expression.

 

Prototype of the editor I am writing for my Arabic programming language. It is a WebKit WebView with a customized CodeMirror instance. The code listed is an implementation of bubble sort. The equivalent Ruby code would be:

for n in 0..list.length
for m in 0..(list.length - n - 2)
if list[m + 1] > list[m] then
swap list[m], list[m + 1]
end
end
end

Part of my fellowship at Eyebeam exploring Code as Self Expression.

 
Syndicate content