2 ms·
As a card carrying condescending know it all, I am obligated to point out that Lisp allows extending the programming language with new vocabulary easily and wit
by brudgers 12y ago
As a card carrying condescending know it all, I am obligated to point out that Lisp allows extending the programming language with new vocabulary easily and with new syntax relatively easily. Whew...now that that's out of the way, I can get on with what I really wanted to say.
From a natural language standpoint, I have found J [1] particularly interesting. Kenneth "not Alan" Iverson [2] extended and refined the the ideas he developed for APL [3] and mapped it onto the ASCII character set. Like APL, J is built on a grammar of nouns, verbs, adverbs, etc. with the idea that the labels for the language's parts map reasonably to their counterparts in natural language (for some definition of "reasonably").
One of the great things about J is it's documentation. Originally a commercial product, J's documentation includes great tutorials and primers that someone was paid to write (as opposed to produced instead of doing the coding they love).
[1]: http://www.jsoftware.com/ http://www.jsoftware.com/
[2]: https://en.wikipedia.org/wiki/Kenneth_E._Iverson https://en.wikipedia.org/wiki/Kenneth_E._Iverson
[3]: https://en.wikipedia.org/wiki/APL_%28programming_language%29 https://en.wikipedia.org/wiki/APL_%28programming_language%29
- vorg 12y agoWhen I tried out both J and APL a while back, I found the J symbols to be unintuitive compared to APL's, mainly because APL had balanced parens, brackets, and curlies, whereas J didn't but instead used them unpaired as part of multi-symbol operators. APL operators were always single-symbol which also helped readability compared to J, but of course entering APL symbols was far more difficult than J's ASCII ones. One of my favorite possibilities for a syntax that's terse but still readable as well as easily enterable is one using Chinese/Japanese Kanji. IME's like Cangjie or Wubizixing mean they can be entered easily without using unintuitive operators like (= or /] or {%
- brudgers 12y agoI think learning J is a project that will take more than 24 hours, not something that where naive intuition is going to produce significant progress...the documentation implies as much. It's Emacs not gedit. Then again, I don't think any powerful programming language is going to be easy to learn. Turing machines or lambda calculus, take your pick, are hard concepts when it comes to navigating all their implications. That's what allows them to capture all of computation. Python or Ruby or whatever may push the point where the power to complexity curve goes asymptoticly vertical a bit to the right, but it's still there and steep as a wall. J doesn't pretend to be English. It tries however to have a logical grammar that reflects the grammar of natural language rather than a vocabulary that does.
- srpeck 12y agoMany functions in k (see http://kparc.com/k.txt http://kparc.com/k.txt, also in the APL family), are shorter than the 'readable' name that would be attached to it in another language. Rather than deciphering a long name and then reading the code, why not just read the code and find out what is really happening? Also interesting to note is that k's grammar is defined in terms of nouns, verbs, and adverbs.
- hzhou321 12y agoI am not familiar with APL or J (only viewed some presentations). >> Like APL, J is built on a grammar of nouns, verbs, adverbs, etc. I think this is counter the true nature of natural language. In English at least, the word is in the root and it is not really being bounded by the grammar usage. Noun or verbs, adverbs are a description of the usage, just like dictionary definition, is an aftermath organization, but should not be a prescription. I guess I am arguing on a linguistic aspect, but I think natural language is not built on a grammar, rather they are built on meanings (with patterns automatically emerge).