APL\360: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
(Merge the two Computer History Museum links under "source code")
m (Text replacement - "<source" to "<syntaxhighlight")
Line 2: Line 2:
| title                    = ''APL''\360
| title                    = ''APL''\360
| array model              = [[flat array model|flat]] without [[box|boxes]]
| array model              = [[flat array model|flat]] without [[box|boxes]]
| index origin            = <source lang=apl inline>)ORIGIN</source> 0 or 1 (later <source lang=apl inline>⎕IO</source>)
| index origin            = <syntaxhighlight lang=apl inline>)ORIGIN</source> 0 or 1 (later <syntaxhighlight lang=apl inline>⎕IO</source>)
| function styles          = [[defined function]]
| function styles          = [[defined function]]
| numeric types            = floats (64-bit [[wikipedia:IBM_hexadecimal_floating_point|HFP]])
| numeric types            = floats (64-bit [[wikipedia:IBM_hexadecimal_floating_point|HFP]])
Line 52: Line 52:
! Glyph                              !! Monadic              !! Dyadic
! Glyph                              !! Monadic              !! Dyadic
|-
|-
| <source lang=apl inline>+</source> || [[Conjugate]]        || [[Plus]]
| <syntaxhighlight lang=apl inline>+</source> || [[Conjugate]]        || [[Plus]]
|-
|-
| <source lang=apl inline>-</source> || [[Negate|Negative]]  || [[Subtract|Minus]]
| <syntaxhighlight lang=apl inline>-</source> || [[Negate|Negative]]  || [[Subtract|Minus]]
|-
|-
| <source lang=apl inline>×</source> || [[Signum]]            || [[Times]]
| <syntaxhighlight lang=apl inline>×</source> || [[Signum]]            || [[Times]]
|-
|-
| <source lang=apl inline>÷</source> || [[Reciprocal]]        || [[Divide]]
| <syntaxhighlight lang=apl inline>÷</source> || [[Reciprocal]]        || [[Divide]]
|-
|-
| <source lang=apl inline>⌈</source> || [[Ceiling]]          || [[Maximum]]
| <syntaxhighlight lang=apl inline>⌈</source> || [[Ceiling]]          || [[Maximum]]
|-
|-
| <source lang=apl inline>⌊</source> || [[Floor]]            || [[Minimum]]
| <syntaxhighlight lang=apl inline>⌊</source> || [[Floor]]            || [[Minimum]]
|-
|-
| <source lang=apl inline>*</source> || [[Exponential]]      || [[Power]]
| <syntaxhighlight lang=apl inline>*</source> || [[Exponential]]      || [[Power]]
|-
|-
| <source lang=apl inline>⍟</source> || [[Natural logarithm]] || [[Logarithm]]
| <syntaxhighlight lang=apl inline>⍟</source> || [[Natural logarithm]] || [[Logarithm]]
|-
|-
| <source lang=apl inline>|</source> || [[Magnitude]]        || [[Residue]]
| <syntaxhighlight lang=apl inline>|</source> || [[Magnitude]]        || [[Residue]]
|-
|-
| <source lang=apl inline>?</source> || [[Roll]]              || [[Deal]]
| <syntaxhighlight lang=apl inline>?</source> || [[Roll]]              || [[Deal]]
|-
|-
| <source lang=apl inline>○</source> || [[Pi times]]          || [[Circle function|Circular]]
| <syntaxhighlight lang=apl inline>○</source> || [[Pi times]]          || [[Circle function|Circular]]
|-
|-
| <source lang=apl inline>!</source> || [[Factorial]]        || [[Binomial coefficient]]
| <syntaxhighlight lang=apl inline>!</source> || [[Factorial]]        || [[Binomial coefficient]]
|-
|-
| <source lang=apl inline>~</source> || [[Not]]              ||
| <syntaxhighlight lang=apl inline>~</source> || [[Not]]              ||
|-
|-
| <source lang=apl inline>∧</source> ||                      || [[And]]
| <syntaxhighlight lang=apl inline>∧</source> ||                      || [[And]]
|-
|-
| <source lang=apl inline>∨</source> ||                      || [[Or]]
| <syntaxhighlight lang=apl inline>∨</source> ||                      || [[Or]]
|-
|-
| <source lang=apl inline>⍲</source> ||                      || [[Nand]]
| <syntaxhighlight lang=apl inline>⍲</source> ||                      || [[Nand]]
|-
|-
| <source lang=apl inline>⍱</source> ||                      || [[Nor]]
| <syntaxhighlight lang=apl inline>⍱</source> ||                      || [[Nor]]
|-
|-
| <source lang=apl inline><</source> ||                      || [[Less]]
| <syntaxhighlight lang=apl inline><</source> ||                      || [[Less]]
|-
|-
| <source lang=apl inline>≤</source> ||                      || [[Not greater]]
| <syntaxhighlight lang=apl inline>≤</source> ||                      || [[Not greater]]
|-
|-
| <source lang=apl inline>=</source> ||                      || [[Equal]]
| <syntaxhighlight lang=apl inline>=</source> ||                      || [[Equal]]
|-
|-
| <source lang=apl inline>≥</source> ||                      || [[Not less]]
| <syntaxhighlight lang=apl inline>≥</source> ||                      || [[Not less]]
|-
|-
| <source lang=apl inline>></source> ||                      || [[Greater]]
| <syntaxhighlight lang=apl inline>></source> ||                      || [[Greater]]
|-
|-
| <source lang=apl inline>≠</source> ||                      || [[Not equal]]
| <syntaxhighlight lang=apl inline>≠</source> ||                      || [[Not equal]]
|-
|-
| <source lang=apl inline>⍴</source> || [[Shape|Size]]        || [[Reshape]]
| <syntaxhighlight lang=apl inline>⍴</source> || [[Shape|Size]]        || [[Reshape]]
|-
|-
| <source lang=apl inline>,</source> || [[Ravel]]            || [[Catenate]]
| <syntaxhighlight lang=apl inline>,</source> || [[Ravel]]            || [[Catenate]]
|-
|-
| <source lang=apl inline>[]</source>||                      || [[Bracket indexing|Indexing]]
| <syntaxhighlight lang=apl inline>[]</source>||                      || [[Bracket indexing|Indexing]]
|-
|-
| <source lang=apl inline>⍳</source> || [[Index generator]]  || [[Index of]]
| <syntaxhighlight lang=apl inline>⍳</source> || [[Index generator]]  || [[Index of]]
|-
|-
| <source lang=apl inline>↑</source> ||                      || [[Take]]
| <syntaxhighlight lang=apl inline>↑</source> ||                      || [[Take]]
|-
|-
| <source lang=apl inline>↓</source> ||                      || [[Drop]]
| <syntaxhighlight lang=apl inline>↓</source> ||                      || [[Drop]]
|-
|-
| <source lang=apl inline>⍋</source> || [[Grade up]]  (allows axis) ||
| <syntaxhighlight lang=apl inline>⍋</source> || [[Grade up]]  (allows axis) ||
|-
|-
| <source lang=apl inline>⍒</source> || [[Grade down]] (allows axis) ||
| <syntaxhighlight lang=apl inline>⍒</source> || [[Grade down]] (allows axis) ||
|-
|-
| <source lang=apl inline>/</source> ||                      ||rowspan=2| [[Compress]]<br>(allows axis)
| <syntaxhighlight lang=apl inline>/</source> ||                      ||rowspan=2| [[Compress]]<br>(allows axis)
|-
|-
| <source lang=apl inline>⌿</source> ||
| <syntaxhighlight lang=apl inline>⌿</source> ||
|-
|-
| <source lang=apl inline>\</source> ||                      ||rowspan=2| [[Expand]]<br>(allows axis)
| <syntaxhighlight lang=apl inline>\</source> ||                      ||rowspan=2| [[Expand]]<br>(allows axis)
|-
|-
| <source lang=apl inline>⍀</source> ||
| <syntaxhighlight lang=apl inline>⍀</source> ||
|-
|-
| <source lang=apl inline>⌽</source> ||rowspan=2| [[Reverse]]<br>(allows axis) ||rowspan=2| [[Rotate]]<br>(allows axis)
| <syntaxhighlight lang=apl inline>⌽</source> ||rowspan=2| [[Reverse]]<br>(allows axis) ||rowspan=2| [[Rotate]]<br>(allows axis)
|-
|-
| <source lang=apl inline>⊖</source>
| <syntaxhighlight lang=apl inline>⊖</source>
|-
|-
| <source lang=apl inline>⍉</source> ||colspan=2| [[Transpose]]
| <syntaxhighlight lang=apl inline>⍉</source> ||colspan=2| [[Transpose]]
|-
|-
| <source lang=apl inline>∊</source> ||                      || [[Membership]]
| <syntaxhighlight lang=apl inline>∊</source> ||                      || [[Membership]]
|-
|-
| <source lang=apl inline>⊥</source> ||                      || [[Decode]]
| <syntaxhighlight lang=apl inline>⊥</source> ||                      || [[Decode]]
|-
|-
| <source lang=apl inline>⊤</source> ||                      || [[Encode]]
| <syntaxhighlight lang=apl inline>⊤</source> ||                      || [[Encode]]
|}
|}


Line 142: Line 142:
! Glyph                              !! Valence !! Monadic call            !! Dyadic call
! Glyph                              !! Valence !! Monadic call            !! Dyadic call
|-
|-
| <source lang=apl inline>/</source>  || Monadic ||rowspan=2| [[Reduction]]<br>(allows axis) ||
| <syntaxhighlight lang=apl inline>/</source>  || Monadic ||rowspan=2| [[Reduction]]<br>(allows axis) ||
|-
|-
| <source lang=apl inline>⌿</source>  || Monadic ||
| <syntaxhighlight lang=apl inline>⌿</source>  || Monadic ||
|-
|-
| <source lang=apl inline>.</source>  || Dyadic  ||                        || [[Inner product]]
| <syntaxhighlight lang=apl inline>.</source>  || Dyadic  ||                        || [[Inner product]]
|-
|-
| <source lang=apl inline>∘.</source> || Monadic ||                        || [[Outer product]]
| <syntaxhighlight lang=apl inline>∘.</source> || Monadic ||                        || [[Outer product]]
|-
|-
| <source lang=apl inline>[]</source> || Monadic ||colspan=2| [[Function axis|Axis]]
| <syntaxhighlight lang=apl inline>[]</source> || Monadic ||colspan=2| [[Function axis|Axis]]
|}
|}



Revision as of 20:55, 10 September 2022


APL\360 (stylised as APL\360) was the first implementation of APL using recognizable APL symbols. It ran on the IBM System/360, and was completed in November 1966 though at that time remained in use only within IBM. In 1973 its implementers, Larry Breed, Dick Lathwell and Roger Moore, were awarded the Grace Murray Hopper Award from the Association for Computing Machinery (ACM). It was given "for their work in the design and implementation of APL\360, setting new standards in simplicity, efficiency, reliability and response time for interactive systems."

Beginning in 1975, the IBM 5100 line of microcomputers offered APL\360 as one of two built-in ROM-based interpreted languages for the computer, complete with a keyboard and display that supported all the special symbols used in the language.

Significant developments to APL\360 included CMS/APL, which made use of the virtual storage capabilities of CMS, and APL.SV, which introduced shared variables, system variables and system functions. It was subsequently ported to the IBM System/370 and VSPC platforms until its final release in 1983, after which it was replaced by APL2.

IBM 5110

Availability

APL\360's implementation was completed in 1966, and it was made available within IBM from the Watson Research Center lab in Yorktown Heights starting in November. From the beginning it was an interactive rather than a batch system, with programmers working directly from a terminal rather than submitting jobs to be run. It was generally available only for IBM projects, with IBM's emphasis on PL/I blocking its release as a standalone product, but was used in a few external projects including a 20-person class at NASA's Goddard Space Flight Center, and at the University of Alberta.[1] Syracuse University also connected a terminal to Yorktown Heights starting in late 1967.[2] In this period SUNY Binghamton became the first facility outside IBM to have APL installed, due to its connection with IBM-Endicott.[3]

IBM released APL\360 in August 1968 (APL\1130 had been released that spring)[4] as a Type-III or unsupported library. In 1969 it was offered as one of IBM's first program products, initially for DOS/360, and next with support for MVT.[5] These products were primarily used by universities, but also rapidly produced interest in time-sharing APL, with at least eight companies offering time-sharing in 1968. Business use of APL\360 was limited by its lack of support for reading and writing files, a problem that would only be addressed in IBM products with APL.SV in 1973. Many companies instead used a derivative system such as APL*PLUS modified to support files.[6]

Implementation

Internal types

APL\360 uses four element types for arrays, three numeric and one character:

  • 1-bit packed Boolean
  • 4-byte integer
  • 8-byte floating point
  • 1-byte character

Primitives

APL\360 evolved rapidly during its early development within IBM and more slowly as it became available to outside users. Here we show the primitives described in its documentation in 1968 when it was first released as a stand-alone product (a Type-III Library). Later additions include Matrix Inverse and Matrix Divide; Execute, Format, and Scan introduced by APL.SV; and an axis and Laminate form for the Catenate function.

Functions

Glyph Monadic Dyadic
<syntaxhighlight lang=apl inline>+</source> Conjugate Plus
<syntaxhighlight lang=apl inline>-</source> Negative Minus
<syntaxhighlight lang=apl inline>×</source> Signum Times
<syntaxhighlight lang=apl inline>÷</source> Reciprocal Divide
<syntaxhighlight lang=apl inline>⌈</source> Ceiling Maximum
<syntaxhighlight lang=apl inline>⌊</source> Floor Minimum
<syntaxhighlight lang=apl inline>*</source> Exponential Power
<syntaxhighlight lang=apl inline>⍟</source> Natural logarithm Logarithm
</source> Magnitude Residue
<syntaxhighlight lang=apl inline>?</source> Roll Deal
<syntaxhighlight lang=apl inline>○</source> Pi times Circular
<syntaxhighlight lang=apl inline>!</source> Factorial Binomial coefficient
<syntaxhighlight lang=apl inline>~</source> Not
<syntaxhighlight lang=apl inline>∧</source> And
<syntaxhighlight lang=apl inline>∨</source> Or
<syntaxhighlight lang=apl inline>⍲</source> Nand
<syntaxhighlight lang=apl inline>⍱</source> Nor
<syntaxhighlight lang=apl inline><</source> Less
<syntaxhighlight lang=apl inline>≤</source> Not greater
<syntaxhighlight lang=apl inline>=</source> Equal
<syntaxhighlight lang=apl inline>≥</source> Not less
<syntaxhighlight lang=apl inline>></source> Greater
<syntaxhighlight lang=apl inline>≠</source> Not equal
<syntaxhighlight lang=apl inline>⍴</source> Size Reshape
<syntaxhighlight lang=apl inline>,</source> Ravel Catenate
<syntaxhighlight lang=apl inline>[]</source> Indexing
<syntaxhighlight lang=apl inline>⍳</source> Index generator Index of
<syntaxhighlight lang=apl inline>↑</source> Take
<syntaxhighlight lang=apl inline>↓</source> Drop
<syntaxhighlight lang=apl inline>⍋</source> Grade up (allows axis)
<syntaxhighlight lang=apl inline>⍒</source> Grade down (allows axis)
<syntaxhighlight lang=apl inline>/</source> Compress
(allows axis)
<syntaxhighlight lang=apl inline>⌿</source>
<syntaxhighlight lang=apl inline>\</source> Expand
(allows axis)
<syntaxhighlight lang=apl inline>⍀</source>
<syntaxhighlight lang=apl inline>⌽</source> Reverse
(allows axis)
Rotate
(allows axis)
<syntaxhighlight lang=apl inline>⊖</source>
<syntaxhighlight lang=apl inline>⍉</source> Transpose
<syntaxhighlight lang=apl inline>∊</source> Membership
<syntaxhighlight lang=apl inline>⊥</source> Decode
<syntaxhighlight lang=apl inline>⊤</source> Encode

Operators

"The OPR is my shepherd; I shall not want.
He maketh me to lie down in green computer centers; he leadeth me beside the still HARDWARE
He restoreth my PROCEED LIGHT; he leadeth me in the paths of correct syntax for IBM's name's sake
Yea, through I walk through the valley of the shadow of the endless loop, I will fear no evil; for thou art with me; thy )OPRN and thy BOUNCE they comfort me.
Thou preparest a terminal before me in the presence of mine enemies; though anointest my PRINTOUT with PA!:'S; my workspace runneth over.
Surely VALUE ERRORS and SYNTAX ERRORS shall follow me thru all the steps of my programs, and I will dwell in the library of the 360 forever!"

IBM/360. Psalm, 1969.

Glyph Valence Monadic call Dyadic call
<syntaxhighlight lang=apl inline>/</source> Monadic Reduction
(allows axis)
<syntaxhighlight lang=apl inline>⌿</source> Monadic
<syntaxhighlight lang=apl inline>.</source> Dyadic Inner product
<syntaxhighlight lang=apl inline>∘.</source> Monadic Outer product
<syntaxhighlight lang=apl inline>[]</source> Monadic Axis

References

  1. Harold A. Driscoll. "An APL Historical Note". APL Quote Quad Volume 8 Issue 1. 1977-09.
  2. Dana E. Cartwright and Phyllis A. Kent. "SHARP APL Syracuse" at IPSA '80.
  3. Ray Polivka and Jon McGrew. "A Quote Quad Interview: Garth Foster". Quote Quad Volume 26 Number 1. 1995-09.
  4. Adin Falkoff. "APL\360 History" (web) at APL69.
  5. Adin Falkoff. "The IBM family of APL systems". IBM Systems Journal Vol. 30 No. 4. 1991.
  6. Eric Iverson. "The Integration of APL into the Larger World of Data Processing" at IPSA '80.

External links

APL dialects [edit]
Maintained APL+WinAPL2APL64APL\ivApletteAprilCo-dfnsDyalog APLDyalog APL Visiondzaima/APLGNU APLKapNARS2000PometoTinyAPL
Historical A Programming LanguageA+ (A) ∙ APL#APL2CAPL\360APL/700APL\1130APL\3000APL.68000APL*PLUSAPL.jlAPL.SVAPLXExtended Dyalog APLIverson notationIVSYS/7090NARSngn/aplopenAPLOperators and FunctionsPATRowanSAXSHARP APLRationalized APLVisualAPL (APLNext) ∙ VS APLYork APL
Derivatives AHPLBQNCoSyELIGleeIIvyJJellyK (Goal, Klong, Q) ∙ KamilaLispLang5LilNialRADUiua
Overviews Comparison of APL dialectsTimeline of array languagesTimeline of influential array languagesFamily tree of array languages