4 ms·
Neat. I also wrote a bunch of Arabic Lisps, most toys that went nowhere :-) My biggest obstacle has so far been language itself: I think I'm too much of an Ara
by mahmud 14y ago
Neat. I also wrote a bunch of Arabic Lisps, most toys that went nowhere :-)
My biggest obstacle has so far been language itself: I think I'm too much of an Arabic snob to settle for simple, dictionary translation of some technical terms. I also hate transliterating, so I got distracted by months long process of compiling a dictionary.
To give you an example, Qlb replies with "letter is unexpected" when it really means "symbol". حرف vs رمز. A Lisp evaluator operates on expressions, of which symbols are a subset.
Even within technical English, words like letter and character do NOT mean the same thing, though they are similar.
Most of computational concepts one wants to expound either exist or have strong counterparts in the classical Arabic linguistic, rhetoric and logical traditions. Though not a strict requirement, the Arabic PL designer would benefit greatly from familiarity with the Classical, very abstract and deductive, byt often non-secular, works.
One of my favorite games is to read a passage out, say, a type-theoretic paper and try to translate it to Arabic :-)
[Edit:
It is an excellent hack this, but Arabic side of things could use more polishing. قول is not a verb, but قُل is. قول or مقولة means "utterance", not the very "say" as you might intend. لقوله، قم الليل الا قليلا
]
- btilly 14y agoI'm reminded of Damian Conway's module to allow people to program in Latin. One Latin expert that he knew had trouble learning because she kept trying to "correct" the grammar. (He'd found a combination of tenses and genders that was never ambiguous - which was a great help to his parser - but was in many cases not what would really be used in Latin.)
- mahmud 14y agoExcept Arabic is a living language and has 300 "expert" speakers :-P
- ramseynasser 14y agoInteresting, where do you get that number?
- z92 14y agolooks like typo. he corrected it.
- entropy_ 14y agoWell, maybe he meant that very few people are actually really good at formal arabic? I know I suck at it even though I'm Lebanese and it's supposed to be my mother tongue. Arabic speakers tend to have a colloquial form of Arabic that they speak which is a much simplified version of the formal Arabic language. I would say the closest analogy is Lebanese is to Arabic what French is to Latin. Clearly derived from it, but very different and much simpler. 300 experts is definitely a very low estimate though. Should definitely be higher. PS: Hi Ramzi, long time no see :)
- mahmud 14y ago300 million speakers, rather.
- eru 14y agoWhat do you mean by 300 experts?
- jinushaun 14y agoExcept that this problem exists in English-based programming languages as well. Attempting to make grammatically correct code that mimics a human language is a futile effort. The next Twitter doesn't care about "is", "was" and "are" in the code.
- fuzzix 14y ago"Attempting to make grammatically correct code that mimics a human language is a futile effort" COBOL attempts this (the syntax is even written out in "sentences") and it suffers for it. Even if it wasn't a futile effort, is it worthwhile? edit This post is not intended to suggest the language in the topic article in not worthwhile..
- edtechdev 14y agoYeah futile like applescript - who ever used that. Or hypertalk, or wolfram alpha or even the google search engine - nobody can figure out how to use those. Visual basic was so unpopular because it tried to use more english keywords and less symbols. The best way for people to learn programming is with pure non-alphanumeric symbols, just like people speak on Twitter.
- mkhattab 14y agoThis sounds awesome. I've contemplated programming in Arabic. I figured that if Arabic as a language is much more expressive and concise than English in normal modes of communication then the advantages would cross over into programming languages. However, as you said, direct syntax translation is ineffective. Perhaps, programming semantics need to change to match the effectiveness of the language or perhaps, and I hate use this term, a new paradigm is needed.
- mahmud 14y agoThis is actually a myth. Arabic is not more or less "expressive" than any other language. It's just language communities evolve richer vocabularies for their subjects of interest/specialization. Arabic saw feverish interest in philosophy and abstract thought around the time of the Islamic Caliphates spanning almost a thousand years. But other languages evolved similar, even richer philosophical traditions -- I think the growth of English is unparalleled in human history! This probably doesn't have a bassis in any established linguistic theory, it's just my own "hunch", but I think this community specialziation (DSL-ization?) of languages is real enough (see the persistent myth that Inuits have tens of words for snow. We expect them to, because snow is their "thing".) We don't need to "adapt" programming languages theory to Arabic, as the foundations are meta-linguistic and presentable in any human language. What we need is a native Arabic programming languages community that puts already codified technical terms into currency.
- ramseynasser 14y agoTrue, but you can stretch out Arabic symbols for perfect symmetry without a lot of stupid whitespace! Check it out http://twitpic.com/bnpjvy http://twitpic.com/bnpjvy
- mahmud 14y agoIsn't that antithetical to the Lisp aesthetic? it breaks code contours. Lisp code is curvy ;-)
- eru 14y ago
- amasad 14y agoI think a lot of people trying to do anything software in arabic get bogged down and indefinitely bike shed over translating technical terms. I think it's just a choice to be made to move along. In your example حرف is just fine.
- why-el 14y agoI always thought a community based, crowd-sourced effort to translate technical terms is a good idea. I will be happy to team up on this if anybody is interested.
- ramseynasser 14y agoThanks for your feedback! I agree that language itself is the real challenge. I had to deal with a lot of RTL/encoding issues, sure, but the real difficulty is how do you map engrained concepts from one culture to the next? I don't have any solid answers, and قلب is very much an experiment. The REPL complains about 'letter unexpected' because the first thing it encounters is the ASCII 'Q', which is invalid outside of a string, and barfs. I completely agree that Arabic linguistics aren't being utilized to their fullest. My Arabic is certainly not as strong as my English, unfortunately. This is a very preliminary release, and I'm excited to collaborate with others stronger in written Arabic for better word choice and semantics.