Qalb (programming language)

{{Short description|Programming language with Arabic keywords}}

{{more citations needed|date=February 2013}}

{{Infobox programming language

| name = قلب

| paradigm = Functional

| year = 2012

| designer = Ramsey Nasser

| latest release date = 2013

| influenced by = Scheme

| operating system =

| license =

| website = {{URL|https://nas.sr/%D9%82%D9%84%D8%A8}}

}}

__NOTOC__

قلب ({{IPA|apc|ʔalb|lang}}), transliterated Qalb, Qlb and Alb, is a functional programming language allowing a programmer to write programs completely in Arabic.{{cite web | url = https://www.theregister.co.uk/2013/01/25/arabic_programming_language | title = Meet قلب, the programming language that uses Arabic script | website = The Register | date = 2013-01-25 | access-date = 2013-02-06}} Its name means "heart" in Arabic and is a recursive acronym for Qlb: a programming language ({{lang|ar|قلب: لغة برمجة}}, {{Transliteration|ar|Qlb: Lughat Barmajah}}). It was developed in 2012 by Ramsey Nasser, a computer scientist at the Eyebeam Art + Technology Center in New York City, as both an artistic endeavor and as a response to the Anglophone bias in the vast majority of programming languages, which express their fundamental concepts using English words.

The syntax is like that of Lisp or Scheme, consisting of parenthesized lists. Keywords are in Arabic (specifically, Lebanese Arabic){{cite web |title=an Arabic typo · Issue #8 · nasser/--- · GitHub |url=https://github.com/nasser/---/issues/8#issuecomment-12755608 |quote="The current version is in Lebanese Arabic by design, future versions will be in Standard and قول will be changed to قل." |last=Nasser |first=Ramsey|website=GitHub }} and program text is laid out right-to-left, like all Arabic text. The language provides a minimal set of primitives for defining functions, conditionals, looping, list manipulation, and basic arithmetic expressions. It is Turing-complete, and the Fibonacci sequence and Conway's Game of Life have been implemented.

Because program text is written in Arabic and the connecting strokes between characters in the Arabic script can be extended to any length, it is possible to align the source code in artistic patterns, in the tradition of Arabic calligraphy.

A JavaScript-based interpreter is currently [https://www.xn-----etdcdcu3b3exdwacs.com/ self hosted] and the project can be forked on GitHub.{{github|nasser/---|قلب: لغة برمجة}}

Hello world

(قول "مرحبا يا عالم"{{rlm}})

(قول "Hello, world‎")

References

{{Reflist}}

Further reading

  • {{cite news|last1=Smith IV|first1=Jack|title=This Arabic Programming Language Shows How Computers Revolve Around the Western World|url=http://mic.com/articles/130331/this-arabic-programming-language-shows-how-computers-revolve-around-the-western-world|access-date=15 December 2015|work=Tech.Mic|date=14 December 2015}}