proj-plbook-plChIversonArrayLangs

Table of Contents for Programming Languages: a survey

Iverson array languages

Links:

APL

Source code is in non-ASCII symbolic notation.

Links:

A+

"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." -- [1]

Links:

J

"a synthesis of APL (also by Iverson) and the FP and FL function-level languages created by John Backus.[5]" -- https://en.wikipedia.org/wiki/J_%28programming_language%29

relies "mainly on symbols, but these are drawn from the ASCII character set" -- [2]

"after a full career of applying and refining APL in commercial applications (Ken Iverson) 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." -- [3]

"Basically, it is a dialect of APL with the same functionality, but employing the ASCII character set instead of APL's original unique character set. " -- http://cgibin.erols.com/ziring/cgi-bin/cep/cep.pl?_alpha=jk

Successor to APL.

Creators: Ken Iverson, Roger Hui

Influenced: NumPy?

Opinions:

Features

9 control structures [5]:

break/continue are available.

Precedence

Note that J has a nonstandard meaning of the word 'precedence'. When J says that a word has high precedence, that means that that word 'executes first', where execution is understood to be mixed with parsing. The word that 'executes first' can then determine how to group the surrounding words together into arguments. If it chooses to group many words together, that would be equivalent to a situation that would be called "low precedence" with the standard use of the term "precedence". [6]

Verbs have no precedence (so, for example, multiplication does not take group tighter than addition, and must be explicitly grouped) [7].

Parts of speech

Words (tokens) in J are classified as various parts of speech [8]:

Forks

If three verbs are juxtaposed (ie separated by spaces), that is, (V0 V1 V2), then this is interpreted as a 'fork', meaning a function such that if a noun is applied, the noun will be applied to the first and to the third verb (taken as unary operators), and then the results will be applied to the second verb (taken as a binary operator); that is to say [16],

(V0 V1 V2) Ny is the same as (V0(Ny)) V1 (V2(Ny))

For example,

avg=: +/ % #

here, '+/' is a fold of + (ie. the sum function), '%' is division, and '#' takes the length of an array.

Control structures

Links:

Links

Tutorials

Other links

K

"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." -- [17]

however note that there is Kona, an open-source variant of K

Links:

Q

"Q is a thin wrapper around K, providing a more readable, English-like interface." [18] [19]. Developed for the database kdb+.

Links: