Meet قلب, the programming language that uses Arabic script
Programmers often talk about writing "beautiful code," but computer scientist Ramsey Nasser has taken that idea to new lengths by developing the first programming language that uses Arabic script for its source code. The language is called قلب – roughly pronounced "alb," after the Arabic word for "heart" – and as Nasser …
Re: What bollocks
"Oh look I just farted, make it two."
Only another 13 minutes of fame left, then.
I think it's cool.
Went to an Italian Aerospace company to sort out some integration issues and was surprised to find that even the comments in their code were written in English.
It is understandable how code came to use English, but no reason there can't be ports for others who use different alphabets etc
Try France. Until you've tried to sort out somebody else's (they tell you) C++, actually taken a look and discovered VB written in French, you haven't seen real horror.
French coding
I once had to work with a Thomson-developed RTOS for which we had documented source (and we needed it). The comments were written in a mixture of English and French. The English comments were the usual standard of 1980s documentation, i.e. they were formally correct and told you nothing of any use. The French comments were often rather amusing, and frequently referred to a "tas de merde", which was good to know when you were wondering what the hell something actually did.
Round here we use a liberal mix of English, Spanish and Catalan. Choice seems to depend as much on that particular coder's own political beliefs more than anything else.
But let's not talk about the efficiency gains made by having to search through the codebase three different times for something...
First programming language that is a conceptual art piece
Doesn't that honor go to the Brainf*ck programming language? Guess that depends on what you consider to be "art"
Re: First programming language that is a conceptual art piece
Not to forget Piet http://www.dangermouse.net/esoteric/piet.html , Chef http://www.dangermouse.net/esoteric/chef.html or any other esoteric programming language.
Re: First programming language that is a conceptual art piece
Piet looks really cool. It even has a 99 Bottles of Beer program! Cheers man!
Translate?
Couldn't you just have a translation stage before a compiler which maps keywords in different languages to English equivalents to if, for, echo etc? Variables and class names you could just leave in the native script/language. So long as they're consistent throughout the program it shouldn't matter. Needs the programming language to allow multibyte characters in variable/class names, but that could be one solution if this is really causing problems.
Re: Translate?
"a translation stage before a compiler which maps keywords in different languages to English equivalents to if, for, echo etc? "
You mean a bit like a preprocessor? K+R C does part of it, more flexible and less well known macro processors do more.
"Why" is an entirely different question.
Re: Translate?
Good for the languages own keywords. Not good for the many libraries that use english-language function names. A problem that قلب also fails to solve.
Does embedding a right-to-left language word in a left-to-right language sentence like that cause arabic speakers annoyance?
Computer Languages
I recall reading in an article about the early days of computer science there was some discussion of whether english was the best language for code. A team lead by Grace Hopper was tasked with studying the problem and they found that english was the best.
The interesting thing about this will be if it becomes possible to write programs that could not exist in the languages current today.
Re: Computer Languages
RE: "programs that could not exist in the languages current today".
Language creation follows certain well-defined rules, and much like the plethora of algebras created before those rules were understood, many new ones are destined to fall by the wayside.
However, I do wonder if new language creation rules might not flow out of cultural differences, such as cultures with number systems like "one, two, many", or those that do not distinguish between past, present, and future. A language created by such a culture might be particularly useful in a multiprocessing environment. However, developers using that language might need to learn to speak Hopi (a particularly difficult language). A fitting revenge for all of the English-based programming languages we've inflicted on the non-English speaking world.
Re: Computer Languages
Multiprogramming still needs a concept of past and future - or at least "before operation is done" and "after operation is done".
Discarding the idea of the "present" might help avoid race conditions though - a variable has no value "now", only a value before doing X and after doing X.
No idea how you'd express that though, and my head may asplode.
Re: Computer Languages
class MyValue{
public:
MyValue(int initVal){
startVal = initVal;
};
~MyValue();
operator=(int newVal){
endVal = newVal;
};
int get_val(){
if (endVal){
return endVal;
}else{
return initVal;
}
}
int get_initval(){return initVal;);
int get_endVal(){return endVal;};
private:
int startVal;
int endVal;
}
...I got bored. Haven't even tested it. It's up to you to override things to support more than just ints.
"But Nasser had another reason for developing قلب, too – namely, that the Euro-centric nature of most programming languages puts people from other regions at a disadvantage when learning computation and software development."
The difference here is that all regions know Latin script, at least to some degree.
If this idea ever became successful (which I highly doubt, luckily), the only thing that would come from this, is even more of a divide, with each region using their own script, for no good reason.
Babylon should be destroyed?
I am Russian and when I started learning programming I was amazed that people agreed to use the same letters for that.
But now some man comes and says that this is wrong and everybody should use their own language because it is easier...
In my opinion the following is also easier:
- not to learn programming;
- not to learn math;
- not to learn how to write in foreign language;
- or better not to learn your own language writing.
Having said that in my opinion all the above is not right since only smart and hard work makes you even smarter.
Forth
Forth compilers have allowed source input in Unicode for probably 15 years now, so accented variable names or basically any left-to-right script, Latin or otherwise, has been valid for years.
Right-to-left is a relatively minor change on top of that.
And the first programme written is...
...goodbye world which cause the computer to comite suicide?
Re: And the first programme written is...
I think that's the "72 virgins.exe"
Sounds like a great project in that it could make it a bit easier for Arabic-speaking kids to learn the basics of coding (read what he is quoted as saying in the article, about cultural biases). I do wish him luck in this endeavour.
Looks like he wasn't around..
... when I was programming in Arabic BASIC on a yamaha msx ax170 and sx370 back in the 1980s
Talking about making it easier for other cultures is all cool and nice but trying to pause it as art is self wanking did he get this idea from his hair stylist?
Seriously?
Your post makes me want this article to be posted on the daily mail site so that I can spend the afternoon laughing at the comments... And despairing about the mentality of some people...
Yet another Japanese-based programming language...
There's always Puroderu/プロデル (http://rdr.utopiat.net/) - which seems to pack a nice collection of methods/features into its standard library - including a "Guguru"/ググる method for doing Web searches (according to http://rdr.utopiat.net/docs/reference/core/core.htm).
"not only functional, but also visually pleasing."
Sadly the inverse problem of writing non functional and ugly code is remarkably easy to carry out.
As an old teacher put it "You can write FORTRAN" in any language.
art
who says source code can't be artistic with current language constructs?
http://neuroid.co.uk/js/nrd.min.js
I haven't looked through all the comments...
... to see if anyone else has mentioned this, but I take issue with the assertion that this is "the first programming language that is a conceptual art piece".
The curious may wish to have a look at this venerable collection of languages that in many cases are conceptual art pieces: http://esolangs.org/wiki/Main_Page
Furthermore, they tend to go a bit further than just assigning an ungrounded (for most of us) symbol set to well-worn functional programming elements.
Lisp
Christ. Since when has Lisp long-since been a favourite of computer scientists? I find it utterly loathsome!
Re: Lisp
That's probably because you are not a computer scientist. Or you are one, but sadly of Generation Twitter.
Every program has to have a bug, because only Allah is perfect.
Makes perfect sense.
This meets the first rule of code for real programmers:
If it was f***ing hard to write, it should be f***ing hard to read.
"* Our users will know fear and cower before our software!....
Ship it! Ship it and let them flee like the dogs they are!"
An early draft of Ballmers Windows 9 presentation to the faithful?
#incluir<¡coño!.h>
Spanish language version of the old DOS text-based user interface header (Unix equivalent: ncurses.h). In debug mode prepends the string "ya estás jodido" to all error messages.
