e01.org

APL (programming language)

APL (named after the book A Programming Language) is a programming language developed in the 1960s by Kenneth E. Iverson. Its central datatype is the multidimensional array. It uses a large range of special graphic symbols to represent most functions and operators, leading to very concise code. It has been an important influence on the development of concept modeling, spreadsheets, functional programming, and computer math packages. It has also inspired several other programming languages.

APL (named after the book A Programming Language) is a programming language developed in the 1960s by Kenneth E. Iverson. Its central datatype is the multidimensional array. It uses a large range of special graphic symbols to represent most functions and operators, leading to very concise code. It has been an important influence on the development of concept modeling, spreadsheets, functional programming, and computer math packages. It has also inspired several other programming languages. === Mathematical notation=== A mathematical notation for manipulating arrays was developed by Kenneth E. Iverson, starting in 1957 at Harvard University. In 1960, he began work for IBM where he developed this notation with Adin Falkoff and published it in his book A Programming Language in 1962. The preface states its premise: This notation was used inside IBM for short research reports on computer systems, such as the Burroughs B5000 and its stack mechanism when stack machines versus register machines were being evaluated by IBM for upcoming computers. Iverson also used his notation in a draft of the chapter A Programming Language, written for a book he was writing with Fred Brooks, Automatic Data Processing, which would be published in 1963. In 1979, Iverson received the Turing Award for his work on APL. 'Hello, world' A design theme in APL is to define default actions in some cases that would produce syntax errors in most other programming languages. The 'Hello, world' string constant above displays, because display is the default action on any expression for which no action is specified explicitly (e.g. assignment, function parameter). x[⍋x←6?40] The above does a lot, concisely, although it may seem complex to a new APLer. It combines the following APL functions (also called primitives and glyphs ): The first to be executed (APL executes from rightmost to leftmost) is dyadic function ? (named deal when dyadic) that returns a vector consisting of a select number (left argument: 6 in this case) of random integers ranging from 1 to a specified maximum (right argument: 40 in this case), which, if said maximum ≥ vector length, is guaranteed to be non-repeating; thus, generate/create 6 random integers ranging from 1 to 40. This vector is then assigned ( ← ) to the variable x , because it is needed later. This vector is then sorted in ascending order by a monadic ⍋ function, which has as its right argument everything to the right of it up to the next unbalanced close-bracket or close-parenthesis. The result of ⍋ is the indices that will put its argument into ascending order. Then the output of ⍋ is used to index the variable x , which we saved earlier for this purpose, thereby selecting its items in ascending sequence. Since there is no function to the left of the left-most x to tell APL what to do with the result, it simply outputs it to the display (on a single line, separated by spaces) without needing any explicit instruction to do that. ? also has a monadic equivalent called roll , which simply returns one random integer between 1 and its sole operand [to the right of it], inclusive. Thus, a role-playing game program might use the expression ?20 to roll a twenty-sided die. (~R∊R∘.×R)/R←1↓⍳R Executed from right to left, this means: Iota ⍳ creates a vector containing integers from 1 to R (if R= 6 at the start of the program, ⍳R is 1 2 3 4 5 6 ) Drop first element of this vector ( ↓ function), i.e., 1 . So 1↓⍳R is 2 3 4 5 6 Set R to the new vector ( ← , assignment primitive), i.e., 2 3 4 5 6 The / replicate operator is dyadic (binary) and the interpreter first evaluates its left argument (fully in parentheses): Generate outer product of R multiplied by R , i.e., a matrix that is the multiplication table of R by R ( °.× operator), i.e., Build a vector the same length as R with 1 in each place where the corresponding number in R is in the outer product matrix ( ∈ , set inclusion or element of or Epsilon operator), i.e., 0 0 1 0 1 Logically negate (not) values in the vector (change zeros to ones and ones to zeros) ( ∼ , logical not or Tilde operator), i.e., 1 1 0 1 0 Select the items in R for which the corresponding element is 1 ( / replicate operator), i.e., 2 3 5 (This assumes the APL origin is 1, i.e., indices start with 1. APL can be set to use 0 as the origin, so that ι6 is 0 1 2 3 4 5 , which is convenient for some calculations.) X[⍋X+.≠' ';] life ← {⊃1 ⍵ ∨.∧ 3 4 = +/ +⌿ ¯1 0 1 ∘.⊖ ¯1 0 1 ⌽¨ ⊂⍵} txt←' This is emphasized text. ' {⍵ /⍨ ~{⍵∨≠\⍵}⍵∊'<>'} txt This is emphasized text. ===APL2=== APL2 was a significant re-implementation of APL by IBM which was developed from 1971 and first released in 1984. It provides many additions to the language, of which the most notable is nested (non-rectangular) array support. The entire APL2 Products and Services Team was awarded the Iverson Award in 2007. In 2021, IBM sold APL2 to Log-On Software, who develop and sell the product as Log-On APL2. An APL Machine (1970 Stanford doctoral dissertation by Philip Abrams) A Personal History Of APL (1982 article by Michael S. Montalbano) A Programming Language by Kenneth E. Iverson APL in Exposition by Kenneth E. Iverson Brooks, Frederick P.; Kenneth Iverson (1965). Automatic Data Processing, System/360 Edition. . [https://books.google.com/books?id=g3uzAAAAIAAJ]

References

  1. ^ Brooks, Fred ; Iverson, Kenneth, (1963), Automatic Data Processing , John Wiley & Sons Inc. Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  2. ^ "Chronology of APL and its Influences on Computer Language Development" . www.sigapl.org . ACM . Retrieved April 29, 2018 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  3. ^ Roger Moore (2005). "History of I. P. Sharp Associates Timesharing and Network" . Rogerdmoore.ca . Roger Moore. Archived from the original on April 4, 2019 . Retrieved March 7, 2018 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  4. ^ Blumenthal, Marcia (May 18, 1981). "VAX-11s Acquire APL Processor" . Computerworld . Retrieved April 22, 2018 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  5. ^ Mark Schora (2021-01-26). "Log-On Software announces Log-On APL2" . Log-On Software . Archived from the original on 2021-11-17 . Retrieved 2021-11-17 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1637103600.0
  6. ^ Kelley, R.A. (1973). "APLGOL, an Experimental Structured Programming Language" . IBM Journal of Research and Development . 17 : 69– 73. doi : 10.1147/rd.171.0069 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  7. ^ Johnston, Ronald L. (July 1977). "APLGOL: Structured Programming Facilities for APL" . Hewlett-Packard Journal. Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  8. ^ "Dyalog Ltd website" . Retrieved 6 June 2018 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  9. ^ "Dyalog at 25" (PDF) . Vector Magazine . British APL Association. September 2008 . Retrieved April 14, 2018 . [ permanent dead link ] Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  10. ^ "Turing Award Citation 1979" . Awards.acm.org. Archived from the original on 2009-12-23 . Retrieved February 3, 2010 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  11. ^ Kromberg, Morten (22 October 2007). "Arrays of objects" (PDF) . Proceedings of the 2007 symposium on Dynamic languages . p. 20. doi : 10.1145/1297081.1297087 . ISBN 978-1-59593-868-8 . S2CID 18484472 . Archived (PDF) from the original on 2022-10-09 . Retrieved 27 August 2018 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  12. ^ Scholes, John. "D: A functional subset of Dyalog APL" . British APL Association. Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  13. ^ Scholes, John. "Translation of D-functions into tacit form" . Dyalog Ltd. Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  14. ^ "Dyalog – Prices and Licences" . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  15. ^ "2016 Iverson Award Recognises Dyalog's CEO and CXO" . Retrieved 6 June 2018 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  16. ^ "APLX has been withdrawn from commercial sale but can be downloaded free of charge" . Microapl.com . Retrieved April 14, 2018 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  17. ^ Hellerman, H. (July 1964). "Experimental Personalized Array Translator System" . Communications of the ACM . 7 (7): 433– 438. doi : 10.1145/364520.364573 . S2CID 2181070 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  18. ^ Budd, Timothy (1988). An APL Compiler . Springer-Verlag. ISBN 978-0-387-96643-4 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  19. ^ "What is APL?" . www.sigapl.org . SIGAPL . Retrieved January 20, 2015 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  20. ^ Ju, Dz-Ching; Ching, Wai-Mee (1991). "Exploitation of APL data parallelism on a shared-memory MIMD machine". Proceedings of the third ACM SIGPLAN symposium on Principles and practice of parallel programming . Vol. 26. pp. 61– 72. doi : 10.1145/109625.109633 . ISBN 0-89791-390-6 . S2CID 8584353 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  21. ^ Hsu, Aaron W.; Bowman, William J. "Revisiting APL in the Modern Era" (PDF) . www.cs.princeton.edu . Archived (PDF) from the original on 2022-10-09 . Retrieved January 20, 2015 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  22. ^ Ching, W.-M.; Ju, D. (1991). "Execution of automatically parallelized APL programs on RP3" . IBM Journal of Research & Development . 35 (5/6): 767– 777. doi : 10.1147/rd.355.0767 . Archived from the original on March 3, 2016 . Retrieved January 20, 2015 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  23. ^ Blelloch, Guy E.; Sabot, Gary W. (1990). "Compiling Collection-Oriented Languages onto Massively Parallel Computers". Journal of Parallel and Distributed Computing . 8 (2): 119– 134. doi : 10.1016/0743-7315(90)90087-6 . Collection oriented languages include APL, APL2 Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  24. ^ Jendrsczok, Johannes; Hoffmann, Rolf; Ediger, Patrick; Keller, Jörg. "Implementing APL-like data parallel functions on a GCA machine" (PDF) . www.fernuni-hagen.de . pp. 1– 6. Archived from the original (PDF) on January 22, 2015 . Retrieved January 22, 2015 . GCA – Global Cellular Automation. Inherently massively parallel. 'APL has been chosen because of the ability to express matrix and vector' structures. Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  25. ^ Brenner, Norman (1984). "VLSI circuit design using APL with fortran subroutines". Proceedings of the international conference on APL - APL '84 . Vol. 14. pp. 77– 79. doi : 10.1145/800058.801079 . ISBN 0-89791-137-7 . S2CID 30863491 . APL for interactiveness and ease of coding • Brenner, Norman (1984). "VLSI circuit design using APL with fortran subroutines". Proceedings of the international conference on APL – APL '84 . ACM SIGAPL. ISBN 978-0-89791-137-5 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  26. ^ Gamble, D.J.; Hobson, R.F. (1989). "Towards a graphics/Procedural environment for constructing VLSI module generators". Conference Proceeding IEEE Pacific Rim Conference on Communications, Computers and Signal Processing . pp. 606– 611. doi : 10.1109/PACRIM.1989.48437 . S2CID 7921438 . VLSI module generators are described. APL and C, as examples of interpreted and compiled languages, can be interfaced to an advanced graphics display. Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  27. ^ Lee, Robert S. (1983). "Two Implementations of APL" . PC Magazine . 2 (5): 379 . Retrieved January 20, 2015 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  28. ^ Falkoff, Adin D. ; Iverson, Kenneth E. (August 1978). "The Evolution of APL" . ACM SIGPLAN Notices . 13 (8): 47– 57. doi : 10.1145/960118.808372 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  29. ^ "The APL Computer Language" . MARTHA and LLAMA . Archived from the original on February 13, 2015 . Retrieved January 20, 2015 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  30. ^ Metzger, Robert; Wen, Zhaofang (2000). Automatic Algorithm Recognition and Replacement: A New Approach to Program Optimization . The MIT press. ISBN 978-0-262-13368-5 . Retrieved May 6, 2018 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  31. ^ Snyder, Lawrence (1982). "Recognition and Selection of Idioms for Code Optimization". Acta Informatica . 17 (3). doi : 10.1007/BF00264357 . S2CID 8369972 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  32. ^ Cheng, Feng Sheng (1981). Idiom matching: an optimization technique for an APL compiler (Thesis). Iowa State University . Retrieved May 6, 2018 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  33. ^ "Idiom Recognition" . dyalog.com . Retrieved May 6, 2018 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  34. ^ Strawn, George O. (March 1977). "Does APL really need run-time parsing?". Software: Practice and Experience . 7 (2): 193– 200. doi : 10.1002/spe.4380070207 . S2CID 1463012 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  35. ^ "Chronology of APL" . www.sigapl.org . ACM . Retrieved May 7, 2018 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  36. ^ Wai-Mee, Ching (November 1986). "Program Analysis and Code Generation in an APL/370 Compiler". IBM Journal of Research and Development . 30 (6): 594– 602. doi : 10.1147/rd.306.0594 . S2CID 17306407 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  37. ^ Abrams, Philip S., An interpreter for "Iverson notation" , Technical Report: CS-TR-66-47, Department of Computer Science, Stanford University, August 1966; Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  38. ^ "The APEX Project" . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  39. ^ "APL Compiler (message from Jim Weigang to the comp.lang.apl Newsgroup)" . Apr 5, 1994. Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  40. ^ Haigh, Thomas (2005). "Biographies: Kenneth E. Iverson". IEEE Annals of the History of Computing . doi : 10.1109/MAHC.2005.4 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  41. ^ 19, 2009 Adin Falkoff – Computer History Museum. "Iverson credited him for choosing the name APL and the introduction of the IBM golf-ball typewriter with the replacement typehead, which provided the famous character set to represent programs." Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  42. ^ Tektronix Products 1973 (PDF) . p. 276 . Retrieved 18 March 2026 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  43. ^ Tektronix 4013 Computer Display Terminal (PDF) . p. 3-5 . Retrieved 18 March 2026 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  44. ^ "std::iota" . cppreference.com . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  45. ^ APL\1130 Manual Archived 2011-02-21 at the Wayback Machine , May 1969 Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  46. ^ "Remembering APL" . Quadibloc.com . Retrieved June 17, 2013 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  47. ^ "APL\360 Terminal System" Archived 2010-07-11 at the Wayback Machine , IBM Research, Thomas J. Watson Research Center, March 1967. Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  48. ^ Falkoff, Adin D.; Iverson, Kenneth E., The Design of APL , IBM Journal of Research and Development , Volume 17, Number 4, July 1973. "These environmental defined functions were based on the use of still another class of functions—called "I-beams" because of the shape of the symbol used for them—which provide a more general facility for communication between APL programs and the less abstract parts of the system. The I-beam functions were first introduced by the system programmers to allow them to execute System/360 instructions from within APL programs, and thus use APL as a direct aid in their programming activity. The obvious convenience of functions of this kind, which appeared to be part of the language, led to the introduction of the monadic I-beam function for direct use by anyone. Various arguments to this function yielded information about the environment such as available space and time of day." Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  49. ^ Minker, Jack (January 2004). "2.3.4 Computer Software Developments in the CSC, 1962–1973". Beginning of Computing and Computer Sciences at the University of Maryland (PDF) (Report). University of Maryland. p. 38. Archived from the original (PDF) on June 10, 2011 . Retrieved May 23, 2011 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  50. ^ Stebbens, Alan. "How it all began" . Archived from the original on 2016-03-04 . Retrieved 2011-05-22 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1306018800.0
  51. ^ "Xerox APL Language and Operations Reference Manual" (PDF) . Archived from the original on 2026-04-12 . Retrieved 2026-03-17 . {{ cite web }} : CS1 maint: bot: original URL status unknown ( link ) Wikipedia revision 1374410077, retrieved 2026-11-20 · 1773702000.0
  52. ^ "SIGAPL" . Sigapl.org . Retrieved June 17, 2013 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  53. ^ "Fifty Years of BASIC, the Programming Language That Made Computers Personal" . Time . April 29, 2014. Archived from the original on June 2, 2023 . Retrieved April 29, 2018 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  54. ^ "MCM Computers M70/M700" . old-computers.com . Archived from the original on April 3, 2018 . Retrieved April 8, 2018 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  55. ^ Stachniak, Stachniak (2011). Inventing the PC: The MCM/70 Story . McGill Queens's University Press. ISBN 978-0-7735-3852-8 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  56. ^ Miller, Michael (December 17, 2014). "PCs That Paved the Way for the Altair" . PC Magazine . Ziff Davis . Retrieved April 29, 2018 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  57. ^ "VideoBrain Family Computer" , Popular Science , November 1978, advertisement. Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  58. ^ "A Look at SuperPet" . Compute! . Small System Services Inc. December 1981 . Retrieved April 29, 2018 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  59. ^ Gates, Bill (January 31, 1976). "An Open Letter to Hobbyists" . Homebrew Computer Club Newsletter . Archived from the original on December 22, 2019 . Retrieved April 29, 2018 . Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
  60. ^ Hui, Roger. "Remembering Ken Iverson". keiapl.org . KEIAPL. {{ cite web }} : |access-date= requires |url= ( help ) ; |url= suppressed ( help ) CS1 maint: deprecated archival service ( link ) Wikipedia revision 1374410077, retrieved 2026-11-20 · 1795129200.0
source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"APL (programming language)". 1789158649. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1374410077

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·