3 ms·
>I’m constantly amazed there isn’t a more standardized “transliteration” of APL into a slightly more verbose form that can be written easily on a conventional Q
by coldtea 9y ago
>I’m constantly amazed there isn’t a more standardized “transliteration” of APL into a slightly more verbose form that can be written easily on a conventional QWERTY keyboard
You can't be "constantly amazed" unless you have checked for those things -- because J (and other dialects) have been a thing for decades!
- dTal 9y agoI am more amazed that there is almost no version that supports English words properly. I get that APL fans are married to the terseness, but 1) it's trivial to do, all the symbols are named anyway, 2) if you're going to abandon the "custom symbols as a tool for thought" you might as well use words instead of line noise, since you have sacrificed the symbol-concept mappping, and 3) it'd be a great way to smooth the learning curve! You already have to remember what a concept is called and what it does - why impose remembering the symbol immediately? J supposedly supports English verbs as an alternate syntax - there's a library that purports to do this - but I have never managed to make it work in the interpreter at all. It's certainly a second class citizen, if not entirely broken. The only APL dialect that uses English words I've ever found is QNial. It's a lot of fun to program in as a result (its syntax is also cleverly compatible with s-expressions), but it's hampered primarily by the ancient interpreter and lack of bignum support.
- pvg 9y agoif you're going to abandon the "custom symbols as a tool for thought" you might as well use words instead of line noise, since you have sacrificed the symbol-concept mappping You've just replaced symbols, in that case, so to advocates it's a concession to typing, not expression or thinking.
- hoosieree 9y agoI think Q/KDB+ is probably the closest to what you're asking for - mostly English words with a direct mapping to the underlying array primitives. Regarding J specificaly: Some words (sort, inverse, each, every) are in the standard library and loaded by default. What have you tried? You can define your own cover words for the built-ins (here I've added a cap ([:) to signal a domain error if the word is used with 2 arguments when it expects 1, and vice versa): times =: [: : * signum =: * : [: sum =: +/ : [: count =: # : [: J programmers don't do this for the same reason JavaScript programmers don't do this: var ArithmeticOperationsLibraryWhichIsIncludedByDefault = Math; var TheLibraryRegardingTheBrowserWindow = window;
- yodon 9y agoJ technically meets the description I listed above (APL that can be written on a QWERTY keyboard) but as another commenter here it looks like line noise rather than a modern programming language. I get that people like it, I was hoping for something that was more approachable to conventional “curly brace languages” developers. If J is the best today then I think I’m still waiting for the language I’m hoping for.
- JdeBP 9y agoPeople have complained over the years that the "curly brace languages" themselves look like line noise, rather than the "modern programming languages" that have words for things like BEGIN and END. They've also complained about their "wacky keyboard" requirements. Not everyone uses a U.S. keyboard layout, and the "curly brace languages" use characters that are harder to type in other layouts. I strongly suspect that the number of people who have modified their keyboards, fiddled with their keyboard layouts, or bought "programming keyboards" of one sort or another for working in the "curly brace languages" is an order of magnitude greater than the number of people who ever wanted an APL keyboard. Yet this is not seen as a problem with these languages, or a reason to abandon them. With the benefit of these additional decades of experience with languages, programmers, and keyboards the 1980s notion that the keyboard was the problem should be perhaps finally laid to rest; given the evidence of the intervening decades that programmers can and do adapt their keyboards to their languages.
- yodon 9y agoBEGIN and END? Curly braces being an issue comparable those faced by a language like APL? We clearly have very different opinions on what drives or impedes language adoption
- JdeBP 9y agoHave a look around. You'll find several decades' worth of people complaining about the "curly brace languages" in the very same way that you just talked about APL and "wacky keyboard requirements". You'll find far more programmers adapting their keyboards to their languages, for those sorts of languages, from people employing "programmer" keyboard layouts to people buying whole add-on or replacement keyboards (sometimes from other continents), than you'll find people complaining about keyboards and APL. The idea that APL wasn't adopted because programmers were stuck with keyboards that did not match it is 1980s received wisdom, recirculated in part because people look back at history such as this very item at hand. We have, however, over three decades' worth of experience of a world where programmers very much do change keyboards to suit their needs. The evidence of subsequent and even contemporary history shows that the received wisdom is wrong. A case in point that is even contemporary to Dijkstra's letter: In the 1980s, the ZX80 and ZX81 came out, famously with keyboards that could directly enter tokenized BASIC, token by token. Yet the fact that one could not do this with (say) a PC/XT keyboard (or even a QL keyboard, for that matter) was not seen as a problem with BASIC, or a reason to abandon it.