tags:

views:

71

answers:

2

The array-language landscape, while fascinating, is confusing to no end. Is there a reason to to pick and of J or K or APL or A? None of these options seem to be open-sourced -- are there open sourced versions? I would love the expand my mind, but I remain befuddled.

A: 

I also remain befuddled (APL has always confounded me - fortunately it's been 20 or more years since I last attempted anything with it), but a bit of searching has found A+, an open-source version of A:

I have no idea it it will meet your (or anyone's) needs.

Michael Burr
+3  A: 

The differences among these languages are relatively subtle. APL "proper" has the advantages, and disadvantages, of the original symbolic notation. (There are minor changes that have been made to the symbol set over the years, but they're all true enough to the original vision.)

The A+ language is available open source. It departs significantly from the "classic" APLs, but is like them in keeping most of the core character set. My sense is that it has not been kept up to date with technology changes. It was a precursor to K.

Languages in the array-language family that have departed from the distinctive APL character set include J, K, and Nial. Nial uses English words instead of symbols, and has an open source interpreter called Q'Nial. K and J rely mainly on symbols, but these are drawn from the ASCII character set. Words may be used in place of symbols in these languages, however, simply by assigning definitions.

The APL family of programming languages have been primarily proprietary since the initial appearance of APL as an IBM product in 1964. Proprietary array languages seem to have more support and faster evolution of new capabilities than open source alternatives at this time. I'm not sure how all the competitors stack up against one another, but Dyalog APL has certainly been working actively to promote their implementation of the language as current technology. APL2000 offers products for Unix, Linux, and Windows, including VisualAPL for .Net. MicroAPL Ltd offers APLX.

K is a specialized language that is no longer being marketed on its own. Kx Systems is instead marketing the Kdb+ database and its Q (query) language, both of which are written in K. It's a powerful specialized tool, designed for high-speed processing of streaming data. It departs significantly from the original APL approach. Kx Systems products are expensive and their users mostly work in finance.

APL was envisioned and mainly designed by Ken Iverson. After a full career of applying and refining APL in commercial applications he turned to the task of making a "rationalized" revision, one that corrected the aspects of the language he'd found himself dissatisfied with over the years. This fresh take on the theme is called J. The differences between J and APL are sketched in a paper on the J Software wiki. One noticeable change is the elimination of array indexing syntax. The biggest feature, though, is tacit form, in which programs are written by composing functions without reference to their arguments. Tacit J is closely related to "point-free" style found in functional programming languages, but differs in that this form is fundamental to the J language. The ASCII-based symbols used in J may be harder to read than the more distinctive APL characters.

For an individual wanting to learn an array language, my advice is to select among Dyalog APL, APLX, J, and Q'Nial. Dyalog APL (esp. for Windows) or APLX (esp. for Linux) are likely best for someone who wants to use the core symbolism that is so distinctive to APL, and who wants strong connection with the APL community as a whole. J may be best for those who want to build web applications, or focus on math (like Project Euler,) and especially those who are fascinated by the tacit style it emphasizes. Q'Nial is what I'd pick if my priority was on open source, but only if that priority did not also mean expecting the support of an active OS community.

kaleidic