A Programming Language: Difference between revisions
Miraheze>Adám Brudzewsky m (Text replacement  "{{APL programming language}}" to "{{APL dialects}}") 
m (9 revisions imported: Migrate from miraheze) 
(No difference)

Revision as of 14:49, 20 November 2019
A Programming Language is a book published in 1962 by Kenneth E. Iverson to describe one iteration of his Iverson notation. The book's title later was used to form the acronym APL. At the time of writing Iverson notation was used for mathematics and description of IBM's hardware, and its purely human purposes are reflected in the loose conventions (relative to APL) and twodimensional structure of the notation presented in A Programming Language.
Notation
A Programming Language does not feature a full multidimensional array model. Rather, operations are defined on scalars, vectors, and matrices and higherrank arrays are not discussed. Nonetheless, it features many of the array conveniences that became characteristics of APL:
 Scalar functions are present with the name "basic operations".
 While scalar extension is not defined in general, a scalar can be multiplied by an array as a "scalar multiple".
 Vector functions are usually extended to work on the rows of matrices (the opposite of the leading axis model). When doubled typographically, they work on columns instead.
In addition to scalars, vectors, and matrices, tree and file types are defined.
A Programming Language features precursors of many APL primitive functions. These include:
 The shape vector is not used, but dimension functions are present: Failed to parse (syntax error): {\displaystyle ν} gives the length of a vector, and Failed to parse (syntax error): {\displaystyle ν} and Failed to parse (syntax error): {\displaystyle μ} give the row length and column length of a matrix.
 Comparison functions are defined using the symbols , , and and the rules that a vertical bar negates a relation and that an underline combines it with (relations are combined by oring them together).
 The arithmetic scalar functions Sum (), Difference (), Product (Failed to parse (syntax error): {\displaystyle ×} ), and Quotient (Failed to parse (syntax error): {\displaystyle ÷} ) are defined as in mathematics.
 The logical functions And (Failed to parse (syntax error): {\displaystyle ∧} ) and Or (Failed to parse (syntax error): {\displaystyle ∨} ) also match mathematical usage. Logical negation is denoted with an overbar.
 The functions Absolute Value, Ceiling, and Floor use paired symbols (, Failed to parse (syntax error): {\displaystyle ⌈a⌉} , and Failed to parse (syntax error): {\displaystyle ⌊a⌋} ). The paired symbols for ceiling and floor were adopted by mathematicians (absolute value was already in use), but APL implementations dropped the closing symbol for consistency with monadic function syntax.
 Residue uses as in APL, but allows a subscript to indicate the smallest value allowed—mirroring index origin.
 Iota is called "Interval" and uses the letter with an optional index origin subscript.
 IndexOf is also written with and an index origin subscript. It is defined on vector left arguments and vector or scalar right arguments.
 Membership is as in APL.
 Reduction (, or instead of
⌿
) starts from the left rather than the right. For reductions of empty arrays, the identity element is returned.  Rotate is written with arrows: Failed to parse (syntax error): {\displaystyle ↑} for left rotation and Failed to parse (syntax error): {\displaystyle ↓} for right rotation.
 Reverse is written with an arrow in some direction above the argument.
 Transpose is written with a tilde () above a matrix, e.g. .
 Compression and Expansion use and as in APL.
 Catenate uses a circled comma.
 Indexing is written with a subscript, or Failed to parse (syntax error): {\displaystyle ∫_j} to allow index origin specification.
 Grade is called "ordering", and the Grade of with index origin is written
 Base (Failed to parse (syntax error): {\displaystyle ⊥} ) on vectors works like in APL. On matrices, rows are paired up, or columns with a doubled base symbol.
 The Intersection and Union are written with Failed to parse (syntax error): {\displaystyle ∩} and Failed to parse (syntax error): {\displaystyle ∪} , and the Set Difference with .
 The Inner Product is written by placing one scalar function above another, e.g. Failed to parse (syntax error): {\displaystyle u\,^+_×v} , and the Outer Product by using Failed to parse (syntax error): {\displaystyle ∘} in place of the top function with two vector arguments.
APL dialects [edit]  

Maintained  APL+Win ∙ APL2 ∙ APL64 ∙ APL\iv ∙ Aplette ∙ April ∙ Codfns ∙ Dyalog APL ∙ dzaima/APL ∙ Extended Dyalog APL ∙ GNU APL ∙ KAP ∙ NARS2000 ∙ Pometo 
Historical  A Programming Language ∙ A+ (A) ∙ APL# ∙ APL\360 ∙ APL/700 ∙ APL\1130 ∙ APL\3000 ∙ APL.68000 ∙ APL*PLUS ∙ APL.jl ∙ APL.SV ∙ APLX ∙ Iverson notation ∙ IVSYS/7090 ∙ NARS ∙ ngn/apl ∙ openAPL ∙ Operators and Functions ∙ PAT ∙ Rowan ∙ SAX ∙ SHARP APL ∙ Rationalized APL ∙ VisualAPL (APLNext) ∙ VS APL ∙ York APL 
Derivatives  AHPL ∙ BQN ∙ CoSy ∙ ELI ∙ Glee ∙ I ∙ Ivy ∙ J ∙ Jelly ∙ Jellyfish ∙ K (Q, KDB+) ∙ Lang5 ∙ Nial ∙ RAD 
Overviews  Timeline of array languages ∙ Timeline of influential array languages ∙ Family tree of array languages 