APL (programming language)#APL\360

{{Short description|Functional programming language for arrays}}

{{Distinguish|Address (programming language)}}

{{Infobox programming language

| name = APL

| logo = APL (programming language) logo.svg

| logo size = 130px

| paradigm = Array, functional, structured, modular

| designer = Kenneth E. Iverson

| developer = Larry Breed, Dick Lathwell, Roger Moore, others

| year = {{Start date and age|1966|11|27}}

| latest release version = ISO/IEC 13751:2001

| latest release date = {{Start date and age|2001|02|01}}

| typing = Dynamic

| platform = Cross-platform

| license = Proprietary, open source

| website = {{url|https://aplwiki.com/}}

| implementations = {{startflatlist}}

  • APL\360
  • APL\1130
  • APL*Plus
  • Sharp APL
  • APL2
  • Dyalog APL
  • NARS2000
  • APLX
  • GNU APL

{{endflatlist}}

| influenced by = Mathematical notation

| influenced =

{{startflatlist}}

{{endflatlist}}

}}

{{Contains special characters|APL}}

APL (named after the book A Programming Language){{Cite Q|Q105954505|url=https://www.softwarepreservation.org/projects/apl/Books/APROGRAMMING%20LANGUAGE|access-date=2023-08-06}} 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{{cite journal |last1=McIntyre |first1=Donald B. |title=Language as an Intellectual Tool: From Hieroglyphics to APL |journal=IBM Systems Journal |date=1991 |volume=30 |issue=4 |pages=554–581 |doi=10.1147/sj.304.0554 |url=http://domino.research.ibm.com/tchjr/journalindex.nsf/e90fc5d047e64ebf85256bc80066919c/9c834f5a16efa82085256bfa00685c72!OpenDocument |access-date=January 9, 2015|archive-url=https://web.archive.org/web/20160304051735/http://domino.research.ibm.com/tchjr/journalindex.nsf/e90fc5d047e64ebf85256bc80066919c/9c834f5a16efa82085256bfa00685c72!OpenDocument|archive-date=March 4, 2016|url-status=dead}} 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,{{cite web |url=http://awards.acm.org/citation.cfm?id=0703524&srt=all&aw=140&ao=AMTURING |archive-url=https://web.archive.org/web/20080212043802/https://awards.acm.org/citation.cfm?id=0703524&srt=all&aw=140&ao=AMTURING |archive-date=February 12, 2008 |title=ACM Award Citation – John Backus |publisher=Awards.acm.org |date= 1977 |access-date=February 3, 2010}} and computer math packages. It has also inspired several other programming languages.

History

= 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:

{{blockquote|Applied mathematics is largely concerned with the design and analysis of explicit procedures for calculating the exact or approximate values of various functions. Such explicit procedures are called algorithms or programs. Because an effective notation for the description of programs exhibits considerable syntactic structure, it is called a programming language.

}}

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.Iverson, Kenneth E., [http://www.softwarepreservation.org/projects/apl/Books/Iverson-AutomaticDataProcessing-bilevel.pdf/view "Automatic Data Processing: Chapter 6: A programming language"] {{webarchive|url=https://web.archive.org/web/20090604091847/http://www.softwarepreservation.org/projects/apl/Books/Iverson-AutomaticDataProcessing-bilevel.pdf/view |date=June 4, 2009}}, 1960, Draft copy for Brooks and Iverson 1963 book, Automatic Data Processing.Brooks, Fred; Iverson, Kenneth, (1963), Automatic Data Processing, John Wiley & Sons Inc.

In 1979, Iverson received the Turing Award for his work on APL.{{cite web |url=http://awards.acm.org/citation.cfm?id=9147499&srt=all&aw=140&ao=AMTURING |title=Turing Award Citation 1979 |publisher=Awards.acm.org |access-date=February 3, 2010 |archive-url=https://web.archive.org/web/20091223064709/http://awards.acm.org/citation.cfm?id=9147499&srt=all&aw=140&ao=AMTURING |archive-date=2009-12-23 |url-status=dead}}

= Development into a computer programming language =

As early as 1962, the first attempt to use the notation to describe a complete computer system happened after Falkoff discussed with William C. Carter his work to standardize the instruction set for the machines that later became the IBM System/360 family.

In 1963, Herbert Hellerman, working at the IBM Systems Research Institute, implemented a part of the notation on an IBM 1620 computer, and it was used by students in a special high school course on calculating transcendental functions by series summation. Students tested their code in Hellerman's lab. This implementation of a part of the notation was called Personalized Array Translator (PAT).{{cite journal |last1=Hellerman |first1=H. |title=Experimental Personalized Array Translator System |journal=Communications of the ACM |volume=7 |issue=7 |pages=433–438 |date=July 1964 |doi=10.1145/364520.364573 |s2cid=2181070 |doi-access=free}}

In 1963, Falkoff, Iverson, and Edward H. Sussenguth Jr., all working at IBM, used the notation for a formal description of the IBM System/360 series machine architecture and functionality, which resulted in a paper published in IBM Systems Journal in 1964. After this was published, the team turned their attention to an implementation of the notation on a computer system. One of the motivations for this focus of implementation was the interest of John L. Lawrence who had new duties with Science Research Associates, an educational company bought by IBM in 1964. Lawrence asked Iverson and his group to help use the language as a tool to develop and use computers in education.{{cite journal |last1=Falkoff |first1=Adin D. |author1-link=Adin Falkoff |last2=Iverson |first2=Kenneth E. |author2-link=Kenneth E Iverson |date=August 1978 |url=http://www.jsoftware.com/papers/APLEvol.htm |title=The Evolution of APL |journal=ACM SIGPLAN Notices |volume=13|issue=8 |pages=47–57 |doi=10.1145/960118.808372 }}

After Lawrence M. Breed and Philip S. Abrams of Stanford University joined the team at IBM Research, they continued their prior work on an implementation programmed in FORTRAN IV for a part of the notation which had been done for the IBM 7090 computer running on the IBSYS operating system. This work was finished in late 1965 and later named IVSYS (for Iverson system). The basis of this implementation was described in detail by Abrams in a Stanford University Technical Report, "An Interpreter for Iverson Notation" in 1966. The academic aspect of this was formally supervised by Niklaus Wirth.Abrams, Philip S., [http://infolab.stanford.edu/TR/CS-TR-66-47.html An interpreter for "Iverson notation"], Technical Report: CS-TR-66-47, Department of Computer Science, Stanford University, August 1966; Like Hellerman's PAT system earlier, this implementation omitted the APL character set, but used special English reserved words for functions and operators. The system was later adapted for a time-sharing system and, by November 1966, it had been reprogrammed for the IBM System/360 Model 50 computer running in a time-sharing mode and was used internally at IBM.{{cite journal |last1=Haigh |first1=Thomas |year=2005 |title=Biographies: Kenneth E. Iverson |journal=IEEE Annals of the History of Computing |doi=10.1109/MAHC.2005.4}}

= Hardware =

File:APL Greek characters.jpg

File:APL-keybd2.svg

A key development in the ability to use APL effectively, before the wide use of cathode-ray tube (CRT) terminals, was the development of a special IBM Selectric typewriter interchangeable typing element with all the special APL characters on it. This was used on paper printing terminal workstations using the Selectric typewriter and typing element mechanism, such as the IBM 1050 and IBM 2741 terminal. Keycaps could be placed over the normal keys to show which APL characters would be entered and typed when that key was struck. For the first time, a programmer could type in and see proper APL characters as used in Iverson's notation and not be forced to use awkward English keyword representations of them. Falkoff and Iverson had the special APL Selectric typing elements, 987 and 988, designed in late 1964, although no APL computer system was available to use them.Breed, Larry, [http://portal.acm.org/citation.cfm?id=138094.140933 "The First APL Terminal Session"], APL Quote Quad, Association for Computing Machinery, Volume 22, Number 1, September 1991, p. 2–4. Iverson cited Falkoff as the inspiration for the idea of using an IBM Selectric typing element for the APL character set.[http://www.computerhistory.org/tdih/?setdate=December 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."

Many APL symbols, even with the APL characters on the Selectric typing element, still had to be typed in by over-striking two extant element characters. An example is the grade up character, which had to be made from a delta (shift-H) and a Sheffer stroke (shift-M). This was necessary because the APL character set was much larger than the 88 characters allowed on the typing element, even when letters were restricted to upper-case (capitals).

= Commercial availability =

The first APL interactive login and creation of an APL workspace was in 1966 by Larry Breed using an IBM 1050 terminal at the IBM Mohansic Labs near Thomas J. Watson Research Center, the home of APL, in Yorktown Heights, New York.

IBM was chiefly responsible for introducing APL to the marketplace. The first publicly available version of APL was released in 1968 for the IBM 1130. IBM provided APL\1130 for free but without liability or support.{{cite journal |url=http://www.vector.org.uk/archive/v223/APL_1130.htm |title=How We Got to APL\1130 |last1=Breed |first1=Larry |author-link=Larry Breed |journal=Vector (British APL Association) |volume=22 |issue=3 |date=August 2006 |issn=0955-1433 |access-date=2007-04-02 |archive-url=https://web.archive.org/web/20080512031437/http://www.vector.org.uk/archive/v223/APL_1130.htm |archive-date=2008-05-12 |url-status=dead}}[http://bitsavers.org/pdf/ibm/1130/lang/1130-03.3.001_APL_1130_May69.pdf APL\1130 Manual] {{Webarchive|url=https://web.archive.org/web/20110221034650/http://www.bitsavers.org/pdf/ibm/1130/lang/1130-03.3.001_APL_1130_May69.pdf |archive-url=https://ghostarchive.org/archive/20221009/http://www.bitsavers.org/pdf/ibm/1130/lang/1130-03.3.001_APL_1130_May69.pdf |archive-date=2022-10-09 |url-status=live |date=2011-02-21}}, May 1969 It would run in as little as 8k 16-bit words of memory, and used a dedicated 1 megabyte hard disk.

APL gained its foothold on mainframe timesharing systems from the late 1960s through the early 1980s, in part because it would support multiple users on lower-specification systems that had no dynamic address translation hardware.{{cite web|url=http://www.quadibloc.com/comp/aplint.htm |title=Remembering APL |publisher=Quadibloc.com |access-date=June 17, 2013}} Additional improvements in performance for selected IBM System/370 mainframe systems included the APL Assist Microcode in which some support for APL execution was included in the processor's firmware, as distinct from being implemented entirely by higher-level software. Somewhat later, as suitably performing hardware was finally growing available in the mid- to late-1980s, many users migrated their applications to the personal computer environment.

Early IBM APL interpreters for IBM 360 and IBM 370 hardware implemented their own multi-user management instead of relying on the host services, thus they were their own timesharing systems. First introduced for use at IBM in 1966, the APL\360Falkoff, Adin; Iverson, Kenneth E., [http://bitsavers.org/pdf/ibm/apl/APL_360_Users_Manual_Aug68.pdf "APL\360 Users Guide"] {{Webarchive|url=https://web.archive.org/web/20120229200744/http://bitsavers.org/pdf/ibm/apl/APL_360_Users_Manual_Aug68.pdf |date=2012-02-29}}, IBM Research, Thomas J. Watson Research Center, Yorktown Heights, NY, August 1968.[http://bitsavers.org/pdf/ibm/apl/APL_360_Terminal_System_Mar67.pdf "APL\360 Terminal System"] {{Webarchive|url=https://web.archive.org/web/20100711092528/http://bitsavers.org/pdf/ibm/apl/APL_360_Terminal_System_Mar67.pdf |date=2010-07-11}}, IBM Research, Thomas J. Watson Research Center, March 1967.{{cite book |last1=Pakin |first1=Sandra |title=APL\360 Reference Manual |publisher=Science Research Associates, Inc. |year=1968 |isbn=978-0-574-16135-2}} system was a multi-user interpreter. The ability to programmatically communicate with the operating system for information and setting interpreter system variables was done through special privileged "I-beam" functions, using both monadic and dyadic operations.Falkoff, Adin D.; Iverson, Kenneth E.,[http://www.research.ibm.com/journal/rd/174/ibmrd1704F.pdf 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."

In 1973, IBM released APL.SV, which was a continuation of the same product, but which offered shared variables as a means to access facilities outside of the APL system, such as operating system files. In the mid-1970s, the IBM mainframe interpreter was even adapted for use on the IBM 5100 desktop computer, which had a small CRT and an APL keyboard, when most other small computers of the time only offered BASIC. In the 1980s, the VSAPL program product enjoyed wide use with Conversational Monitor System (CMS), Time Sharing Option (TSO), VSPC, MUSIC/SP, and CICS users.

In 1973–1974, Patrick E. Hagerty directed the implementation of the University of Maryland APL interpreter for the 1100 line of the Sperry UNIVAC 1100/2200 series mainframe computers.{{cite report |last1=Minker |first1=Jack |title=Beginning of Computing and Computer Sciences at the University of Maryland |url=http://www.cs.umd.edu/department/dept-history/minker-report.pdf |publisher=University of Maryland |access-date=May 23, 2011 |section=2.3.4 Computer Software Developments in the CSC, 1962–1973 |page=38 |date=January 2004 |archive-url= https://web.archive.org/web/20110610064807/http://www.cs.umd.edu/department/dept-history/minker-report.pdf |archive-date= June 10, 2011}} In 1974, student Alan Stebbens was assigned the task of implementing an internal function.{{cite web |last1=Stebbens |first1=Alan |title=How it all began |url=http://lathwellproductions.ca/wordpress/film |access-date=2011-05-22 |archive-url=https://web.archive.org/web/20160304000314/http://lathwellproductions.ca/wordpress/film |archive-date=2016-03-04 |url-status=dead}} Xerox APL was available from June 1975 for Xerox 560 and Sigma 6, 7, and 9 mainframes running CP-V and for Honeywell CP-6.{{cite web |title=Xerox APL Language and Operations Reference Manual |url=http://www.softwarepreservation.org/projects/apl/Books/197506_Xerox%20APL%20Language%20and%20Operations%20Reference%20Manual_90131C.pdf |archive-url=https://ghostarchive.org/archive/20221009/http://www.softwarepreservation.org/projects/apl/Books/197506_Xerox%20APL%20Language%20and%20Operations%20Reference%20Manual_90131C.pdf |archive-date=2022-10-09 |url-status=live}}

In the 1960s and 1970s, several timesharing firms arose that sold APL services using modified versions of the IBM APL\360 interpreter. In North America, the better-known ones were IP Sharp Associates, Scientific Time Sharing Corporation (STSC), Time Sharing Resources (TSR), and The Computer Company (TCC). CompuServe also entered the market in 1978 with an APL Interpreter based on a modified version of Digital Equipment Corp and Carnegie Mellon's, which ran on DEC's KI and KL 36-bit machines. CompuServe's APL was available both to its commercial market and the consumer information service. With the advent first of less expensive mainframes such as the IBM 4300, and later the personal computer, by the mid-1980s, the timesharing industry was all but gone.

Sharp APL was available from IP Sharp Associates, first as a timesharing service in the 1960s, and later as a program product starting around 1979. Sharp APL was an advanced APL implementation with many language extensions, such as packages (the ability to put one or more objects into a single variable), a file system, nested arrays, and shared variables.

APL interpreters were available from other mainframe and mini-computer manufacturers also, notably Burroughs, Control Data Corporation (CDC), Data General, Digital Equipment Corporation (DEC), Harris, Hewlett-Packard (HP), Siemens, Xerox and others.

Garth Foster of Syracuse University sponsored regular meetings of the APL implementers' community at Syracuse's Minnowbrook Conference Center in Blue Mountain Lake, New York. In later years, Eugene McDonnell organized similar meetings at the Asilomar Conference Grounds near Monterey, California, and at Pajaro Dunes near Watsonville, California. The SIGAPL special interest group of the Association for Computing Machinery continues to support the APL community.{{cite web |url=http://www.sigapl.org/ |title=SIGAPL |publisher=Sigapl.org |access-date=June 17, 2013}}

= Microcomputers =

On microcomputers, which became available from the mid-1970s onwards, BASIC became the dominant programming language.{{cite magazine|url=https://time.com/69316/basic/|title=Fifty Years of BASIC, the Programming Language That Made Computers Personal|date=April 29, 2014|magazine=Time |access-date=April 29, 2018}} Nevertheless, some microcomputers provided APL instead – the first being the Intel 8008-based MCM/70 which was released in 1974{{cite web|url=http://www.old-computers.com/museum/computer.asp?c=346 |title=MCM Computers M70/M700|website=old-computers.com|access-date=April 8, 2018 |archive-url=https://web.archive.org/web/20180403063223/http://www.old-computers.com/museum/computer.asp?c=346|archive-date=April 3, 2018|url-status=dead}}{{cite book|last1=Stachniak|first1=Stachniak |date=2011|title=Inventing the PC: The MCM/70 Story|publisher=McGill Queens's University Press |isbn=978-0-7735-3852-8|url=https://books.google.com/books?id=cyWOA2FED7EC}} and which was primarily used in education.{{cite magazine |last1=Miller |first1=Michael |date=December 17, 2014 |title=PCs That Paved the Way for the Altair |url=http://uk.pcmag.com/opinion/38348/opinion/pcs-that-paved-the-way-for-the-altair |magazine=PC Magazine|publisher=Ziff Davis |access-date=April 29, 2018}} Another machine of this time was the VideoBrain Family Computer, released in 1977, which was supplied with its dialect of APL called APL/S.[https://books.google.com/books?id=OQEAAAAAMBAJ&q=videobrain+family+computer+apl%2Fs&pg=PA133/s "VideoBrain Family Computer"], Popular Science, November 1978, advertisement.

The Commodore SuperPET, introduced in 1981, included an APL interpreter developed by the University of Waterloo.{{cite magazine |date=December 1981 |title=A Look at SuperPet |url=https://archive.org/stream/1981-12-compute-magazine/Compute_Issue_019_1981_Dec#page/n131/mode/2up |magazine=Compute! |publisher=Small System Services Inc |access-date=April 29, 2018}}

In 1976, Bill Gates claimed in his Open Letter to Hobbyists that Microsoft Corporation was implementing APL for the Intel 8080 and Motorola 6800 but had "very little incentive to make [it] available to hobbyists" because of software piracy.{{cite magazine |last1=Gates |first1=Bill |date=January 31, 1976 |title=An Open Letter to Hobbyists |magazine=Homebrew Computer Club Newsletter |url=http://www.digibarn.com/collections/newsletters/homebrew/V2_01/index.html |access-date=April 29, 2018}} It was never released.

= APL2 =

Starting in the early 1980s, IBM APL development, under the leadership of Jim Brown, implemented a new version of the APL language that contained as its primary enhancement the concept of nested arrays, where an array can contain other arrays, and new language features which facilitated integrating nested arrays into program workflow. Ken Iverson, no longer in control of the development of the APL language, left IBM and joined I. P. Sharp Associates, where one of his major contributions was directing the evolution of Sharp APL to be more in accord with his vision.{{cite web |last1=Hui |first1=Roger |title=Remembering Ken Iverson |url=http://keiapl.org/rhui/remember.htm|archive-url=https://archive.today/20130415054224/http://keiapl.org/rhui/remember.htm|url-status=usurped|archive-date=April 15, 2013|website=keiapl.org|publisher=KEIAPL |access-date=January 10, 2015}}{{cite web |website=ACM A.M. Turing Award |title=Kenneth E. Iverson |url=http://amturing.acm.org/award_winners/iverson_9147499.cfm |publisher=ACM |access-date=January 10, 2015}}{{cite web |title=APL2: The Early Years: Can you and should you compromise on technical issues? |website=SIGPLAN Chapter on Array-Programming Languages |url=http://www.sigapl.org/Articles/JimBrown-TechCompromise.php |publisher=ACM |access-date=January 10, 2015}} APL2 was first released for CMS and TSO in 1984.{{cite journal |title=The IBM family of APL systems |first1=Adin D. |last1=Falkoff |s2cid=19030940 |year=1991 |journal=IBM Systems Journal |volume=30 |issue=4 |pages=416–432 |doi=10.1147/sj.304.0416}} The APL2 Workstation edition (Windows, OS/2, AIX, Linux, and Solaris) followed later.{{cite web |url=http://www.edm2.com/index.php/IBM_APL2 |title=IBM APL2 |website=EDM2 |date=2019-10-09 |access-date=2021-11-17 |archive-date=2021-11-17 |archive-url=https://web.archive.org/web/20211117121942/http://www.edm2.com/index.php/IBM_APL2 |url-status=dead}}{{cite web |title=APL2: What's New |url=http://www-01.ibm.com/support/docview.wss?uid=swg22012321 |website=ibm.com |publisher=IBM |access-date=April 22, 2018}}

As other vendors were busy developing APL interpreters for new hardware, notably Unix-based microcomputers, APL2 was almost always the standard chosen for new APL interpreter developments. Even today, most APL vendors or their users cite APL2 compatibility as a selling point for those products.{{cite web|last1=Micro APL|title=Overview of the APL System |url=https://microapl.com/apl/apl_concepts_chapter1.html |website=microapl.com|publisher=Micro APL|access-date=January 10, 2015}}{{cite web |last1=Robertson |first1=Graeme |title=A Personal View of APL2010 |url=http://archive.vector.org.uk/art10500450|website=archive.vector.org.uk |publisher=Vector – Journal of the British APL Association |access-date=January 10, 2015 |archive-url=https://web.archive.org/web/20150402093211/http://archive.vector.org.uk/art10500450 |archive-date=April 2, 2015 |url-status=dead}} IBM cites its use for problem solving, system design, prototyping, engineering and scientific computations, expert systems,{{cite journal |last1=Rodriguez |first1=P. |last2=Rojas |first2=J. |last3=Alfonseca |first3=M. |last4=Burgos |first4=J. I. |title=An Expert System in Chemical Synthesis written in APL2/PC |journal=ACM SIGAPL APL Quote Quad |date=1989 |volume=19 |issue=4 |pages=299–303 |doi=10.1145/75144.75185 |s2cid=16876053}} for teaching mathematics and other subjects, visualization and database access.{{cite web |title=APL2: A Programming Language for Problem Solving, Visualization and Database Access|url=http://www-03.ibm.com/software/products/en/apl2|archive-url=https://web.archive.org/web/20131122133145/http://www-03.ibm.com/software/products/en/apl2|url-status=dead|archive-date=November 22, 2013|website=www-03.ibm.com|publisher=IBM|access-date=January 10, 2015}}

= Modern implementations =

Various implementations of APL by APLX, Dyalog, et al., include extensions for object-oriented programming, support for .NET, XML-array conversion primitives, graphing, operating system interfaces, and lambda calculus expressions. Freeware versions include GNU APL for Linux and NARS2000 for Windows (which also runs on Linux under Wine). Both of these are fairly complete versions of APL2 with various language extensions.

= Derivative languages =

APL has formed the basis of, or influenced, the following languages:{{citation needed|reason=Not contesting these statements at all; some of them are nearly self-evident (J and K, for example), but still, WP quality standards require sources|date=February 2020}}

  • A and A+, an alternative APL, the latter with graphical extensions.
  • FP, a functional programming language.
  • Ivy, an interpreter for an APL-like language developed by Rob Pike, and which uses ASCII as input.{{Cite web |url=https://godoc.org/robpike.io/ivy |title=Ivy |last1=Pike |first1=Rob |date=2018-03-25 |website=GoDoc |archive-url=https://web.archive.org/web/20190813210651/https://godoc.org/robpike.io/ivy|archive-date=2019-08-13}}
  • J, which was also designed by Iverson, and which uses ASCII with digraphs instead of special symbols.{{cite web |last1=Hui |first1=Roger |url=http://www.jsoftware.com/jwiki/Essays/Bibliography |title=A Bibliography of APL and J |website=jsoftware.com/jwiki |access-date=March 2, 2010}}
  • K, a proprietary variant of APL developed by Arthur Whitney.{{cite web |url=http://kx.com/Company/press-releases/arthur-interview.php |title=An Interview with Arthur Whitney |publisher=Kx Systems |date=January 4, 2004 |access-date=March 2, 2010 |url-status=dead |archive-url=https://web.archive.org/web/20090404064737/http://kx.com/Company/press-releases/arthur-interview.php |archive-date=April 4, 2009}}
  • MATLAB, a numerical computation tool.{{cite web |url=http://www.mathworks.com/company/newsletters/news_notes/clevescorner/jan06.pdf |title=The Growth of MATLAB |last1=Moler |first1=Cleve |access-date=February 3, 2010 |url-status=dead |archive-url=https://web.archive.org/web/20090411120119/http://www.mathworks.com/company/newsletters/news_notes/clevescorner/jan06.pdf |archive-date=April 11, 2009}}
  • Nial, a high-level array programming language with a functional programming notation.
  • Polymorphic Programming Language, an interactive, extensible language with a similar base language.
  • S, a statistical programming language (usually now seen in the open-source version known as R).
  • Snap!, a low-code block-based programming language, born as an extended reimplementation of Scratch
  • Speakeasy, a numerical computing interactive environment.
  • Wolfram Language, the programming language of Mathematica.{{Cite web|url=https://www.wolfram.com/language/faq/|title=Wolfram Language FAQ|quote=LISP and APL were two early influences|publisher=Wolfram|access-date=February 20, 2020}}

Language characteristics

= Character set =

{{Main|APL (codepage)|APL syntax and symbols#Monadic functions|l2=syntax and symbols}}

APL has been criticized and praised for its choice of a unique character set. In the 1960s and 1970s, few terminal devices or even displays could reproduce the APL character set. The most popular ones employed the IBM Selectric print mechanism used with a special APL type element. One of the early APL line terminals (line-mode operation only, not full screen) was the Texas Instruments TI Model 745 ({{circa|1977}}) with the full APL character set{{cite journal |author1=Texas Instruments |title=TI 745 full page ad: Introducing a New Set of Characters |journal=Computerworld |date=1977 |volume=11 |issue=27 |page=32 |url=https://books.google.com/books?id=wMe6erbb5V4C&q=apl%20terminal%20%22texas%20instruments%22&pg=PA32 |access-date=January 20, 2015}} which featured half and full duplex telecommunications modes, for interacting with an APL time-sharing service or remote mainframe to run a remote computer job, remote job entry (RJE).

Over time, with the universal use of high-quality graphic displays, printing devices and Unicode support, the APL character font problem has largely been eliminated. However, entering APL characters requires the use of input method editors, keyboard mappings, virtual/on-screen APL symbol sets,{{cite web |author1= |date=2004–2024 |title=APL Fonts and Keyboards |url=https://www.dyalog.com/apl-font-keyboard.htm |website=Dyalog, Ltd. |access-date=November 1, 2024}}{{cite web |last1=Smith |first1=Bob |url=http://www.sudleyplace.com/APL/Keyboard.ahtml |title=NARS2000 Keyboard |website=www.sudleyplace.com |publisher=Bob Smith; NARS2000 |access-date=January 19, 2015}} or easy-reference printed keyboard cards which can frustrate beginners accustomed to other programming languages.{{cite web |title=Introduction to APL – APL Symbols |website=www.microapl.co.uk |publisher=MicroAPL Ltd |url=http://www.microapl.co.uk/apl/introduction_chapter1.html |access-date=January 8, 2015}}{{cite journal |last1=Brown |first1=James A. |last2=Hawks |first2=Brent |last3=Trimble |first3=Ray |date=1993 |title=Extending the APL character set |journal=ACM SIGAPL APL Quote Quad |volume=24 |issue=1 |pages=41–46 |doi=10.1145/166198.166203}}{{cite web |last1=Kromberg |first1=Morten |title=Unicode Support for APL |url=http://archive.vector.org.uk/art10500090 |website=archive.vector.org.uk |publisher=Vector, Journal of the British APL Association |access-date=January 8, 2015 |archive-url=https://web.archive.org/web/20150120194338/http://archive.vector.org.uk/art10500090|archive-date=January 20, 2015 |url-status=dead}} With beginners who have no prior experience with other programming languages, a study involving high school students found that typing and using APL characters did not hinder the students in any measurable way.{{cite web |last1=Hsu |first1=Aaron |title=Computer Science Outreach and Education with APL |url=http://video.dyalog.com/Dyalog13/?v=kIItfQJEVdM |publisher=Dyalog, Ltd. |access-date=July 15, 2016 |archive-date=August 17, 2016 |archive-url=https://web.archive.org/web/20160817061145/http://video.dyalog.com/Dyalog13/?v=kIItfQJEVdM |url-status=dead}}

In defense of APL, it requires fewer characters to type, and keyboard mappings become memorized over time. Special APL keyboards are also made and in use today, as are freely downloadable fonts for operating systems such as Microsoft Windows. The reported productivity gains assume that one spends enough time working in the language to make it worthwhile to memorize the symbols, their semantics, keyboard mappings, and many idioms for common tasks.{{citation needed|date=July 2015}}

= Design =

Unlike traditionally structured programming languages, APL code is typically structured as chains of monadic or dyadic functions, and operators{{cite web|last1=MicroAPL|title=Operators|url=http://www.microapl.co.uk/apl/apl_concepts_chapter5.html|website=www.microapl.co.uk|publisher=MicroAPL|access-date=January 12, 2015}} acting on arrays.{{cite web|last1=Primitive Functions|title=Primitive Functions|url=http://www.microapl.co.uk/apl_help/ch_020_010_140.htm|website=www.microapl.co.uk/|access-date=January 1, 2015}} APL has many nonstandard primitives (functions and operators) that are indicated by a single symbol or a combination of a few symbols. All primitives are defined to have the same precedence, and always associate to the right. Thus, APL is read or best understood from right-to-left.

Early APL implementations ({{circa|1970}} or so) had no programming loop control flow structures, such as do or while loops, and if-then-else constructs. Instead, they used array operations, and use of structured programming constructs was often unneeded, since an operation could be performed on a full array in one statement. For example, the iota function (ι) can replace for-loop iteration: ιN when applied to a scalar positive integer yields a one-dimensional array (vector), 1 2 3 ... N. Later APL implementations generally include comprehensive control structures, so that data structure and program control flow can be clearly and cleanly separated.

The APL environment is called a workspace. In a workspace the user can define programs and data, i.e., the data values exist also outside the programs, and the user can also manipulate the data without having to define a program.{{cite web|last1=Workspace|title=The Workspace|url=http://www.microapl.co.uk/apl/apl_concepts_chapter2.html|website=www.microapl.co.uk|access-date=January 1, 2015}} In the examples below, the APL interpreter first types six spaces before awaiting the user's input. Its own output starts in column one.

class="wikitable"
width="240pt" | n ← 4 5 6 7

| Assigns vector of values, {4 5 6 7}, to variable n, an array create operation. An equivalent yet more concise APL expression would be n ← 3 + ⍳4. Multiple values are stored in array n, the operation performed without formal loops or control flow language.

n

4 5 6 7

| Display the contents of n, currently an array or vector.

n+4

8 9 10 11

| 4 is now added to all elements of vector n, creating a 4-element vector {8 9 10 11}.
As above, APL's interpreter displays the result because the expression's value was not assigned to a variable (with a ).

+/n

22

| APL displays the sum of components of the vector n, i.e., 22 (= 4 + 5 + 6 + 7) using a very compact notation: read +/ as "plus, over..." and a slight change would be "multiply, over..."

m ← +/3+⍳4

m

22

| These operations can be combined into one statement, remembering that APL evaluates expressions right to left: first ⍳4 creates an array, [1,2,3,4], then 3 is added to each component, which are summed together and the result stored in variable m, finally displayed. In normal mathematical notation, it is equivalent to: \displaystyle m= \sum\limits_{i=1}^4 (i+3). Recall that mathematical expressions are not read or evaluated from right-to-left.

The user can save the workspace with all values, programs, and execution status.

APL uses a set of non-ASCII symbols, which are an extension of traditional arithmetic and algebraic notation. Having single character names for single instruction, multiple data (SIMD) vector functions is one way that APL enables compact formulation of algorithms for data transformation such as computing Conway's Game of Life in one line of code.{{cite web |url=http://catpad.net/michael/apl |title=example |publisher=Catpad.net |access-date=June 17, 2013 |url-status=dead |archive-url=https://web.archive.org/web/20130708114840/http://catpad.net/michael/apl/ |archive-date=July 8, 2013}} In nearly all versions of APL, it is theoretically possible to express any computable function in one expression, that is, in one line of code.{{citation needed|date=May 2021}}

Due to the unusual character set, many programmers use special keyboards with APL keytops to write APL code.{{cite web|title=Entering APL Symbols |url=http://www.microapl.co.uk/apl/introduction_chapter2.html |website=www.microapl.co.uk|access-date=January 1, 2015}} Although there are various ways to write APL code using only ASCII characters,{{cite web |last1=Dickey |first1=Lee |url= http://www.math.uwaterloo.ca/apl_archives/apl/translit.schemes |title=A list of APL Transliteration Schemes |archive-url=https://web.archive.org/web/20060929174125/http://www.math.uwaterloo.ca/apl_archives/apl/translit.schemes |archive-date=2006-09-29 |date=1993}} in practice it is almost never done. (This may be thought to support Iverson's thesis about notation as a tool of thought.{{cite journal |url=http://www.jsoftware.com/papers/tot.htm |last1=Iverson |first1=K.E. |title=Notation as a Tool of Thought |archive-url=https://web.archive.org/web/20130920071911/http://www.jsoftware.com/papers/tot.htm |archive-date=2013-09-20 |journal=Communications of the ACM |volume=23 |pages=444–465 |date=August 1980|issue=8 |doi=10.1145/358896.358899}}) Most if not all modern implementations use standard keyboard layouts, with special mappings or input method editors to access non-ASCII characters. Historically, the APL font has been distinctive, with uppercase italic alphabetic characters and upright numerals and symbols. Most vendors continue to display the APL character set in a custom font.

Advocates of APL{{Who|date=March 2015}} claim that the examples of so-called write-only code (badly written and almost incomprehensible code) are almost invariably examples of poor programming practice or novice mistakes, which can occur in any language. Advocates also claim that they are far more productive with APL than with more conventional computer languages, and that working software can be implemented in far less time and with far fewer programmers than using other technology.{{citation needed|date=December 2019}}

They also may claim that because it is compact and terse, APL lends itself well to larger-scale software development and complexity, because the number of lines of code can be reduced greatly. Many APL advocates and practitioners also view standard programming languages such as COBOL and Java as being comparatively tedious. APL is often found where time-to-market is important, such as with trading systems.{{cite web |last1=Batenburg |title=APL Efficiency |url=http://www.ekevanbatenburg.nl/PRVAPL.HTML |website=www.ekevanbatenburg.nl |access-date=January 1, 2015}}{{cite web |last1=Vaxman |title=APL Great Programming |url=http://www.vaxman.de/publications/apl_slides.pdf |archive-url=https://ghostarchive.org/archive/20221009/http://www.vaxman.de/publications/apl_slides.pdf |archive-date=2022-10-09 |url-status=live |website=www.vaxman.de |access-date=January 1, 2015}}{{cite journal |last1=Janko |first1=Wolfgang |title=Investigation into the efficiency of using APL for the programming of an inference machine |journal= ACM SIGAPL APL Quote Quad|date=May 1987 |volume=17 |issue=4 |pages=450–456 |doi=10.1145/384282.28372}}{{cite web |last1=Borealis |title=Why APL? |url=http://www.aplborealis.com/whyapl.html |website=www.aplborealis.com |access-date=January 1, 2015}}

= Terminology =

APL makes a clear distinction between functions and operators.{{cite web |last1=Iverson |first1=Kenneth E. |author-link=Kenneth E. Iverson |year=1987 |title=A Dictionary of APL |url=http://www.jsoftware.com/papers/APLDictionary.htm |website=www.jsoftware.com |access-date=January 20, 2015}} Functions take arrays (variables or constants or expressions) as arguments, and return arrays as results. Operators (similar to higher-order functions) take functions or arrays as arguments, and derive related functions. For example, the sum function is derived by applying the reduction operator to the addition function. Applying the same reduction operator to the maximum function (which returns the larger of two numbers) derives a function which returns the largest of a group (vector) of numbers. In the J language, Iverson substituted the terms verb for function and adverb or conjunction for operator.

APL also identifies those features built into the language, and represented by a symbol, or a fixed combination of symbols, as primitives. Most primitives are either functions or operators. Coding APL is largely a process of writing non-primitive functions and (in some versions of APL) operators. However a few primitives are considered to be neither functions nor operators, most noticeably assignment.

Some words used in APL literature have meanings that differ from those in both mathematics and the generality of computer science.

class="wikitable"

|+Terminology of APL operators

scope="col"| Term

!scope="col"| Description

scope="row"| function

| operation or mapping that takes zero, one (right) or two (left & right) arguments which may be scalars, arrays, or more complicated structures, and may return a similarly complex result. A function may be:

  • Primitive: built-in and represented by a single glyph;{{cite web |url=http://www.microapl.co.uk/APL/apl_concepts_chapter6.html |title=APL concepts |publisher=Microapl.co.uk |access-date=February 3, 2010}}
  • Defined: as a named and ordered collection of program statements;
  • Derived: as a combination of an operator with its arguments.
scope="row"| array

| data valued object of zero or more orthogonal dimensions in row-major order in which each item is a primitive scalar datum or another array.{{cite web |url=http://www.nial.com/ArrayTheory.html |title=Nested array theory |publisher=Nial.com |access-date=February 3, 2010 |archive-url=https://web.archive.org/web/20110709072354/http://www.nial.com/ArrayTheory.html |archive-date=2011-07-09 |url-status=dead}}

scope="row"| niladic

| not taking or requiring any arguments, nullary"Programmera i APL", Bohman, Fröberg, Studentlitteratur, {{ISBN|91-44-13162-3}}

scope="row"| monadic

| requiring only one argument; on the right for a function, on the left for an operator, unary

scope="row"| dyadic

| requiring both a left and a right argument, binary

scope="row"| ambivalent
or monadic

| capable of use in a monadic or dyadic context, permitting its left argument to be elided{{Definition needed|date=February 2024}}

scope="row"| operator

| operation or mapping that takes one (left) or two (left & right) function or array valued arguments (operands) and derives a function. An operator may be:

  • Primitive: built-in and represented by a single glyph;
  • Defined: as a named and ordered collection of program statements.

= Syntax =

{{Main|APL syntax and symbols}}

APL has explicit representations of functions, operators, and syntax, thus providing a basis for the clear and explicit statement of extended facilities in the language, and tools to experiment on them.{{cite web |last1=Iverson |first1=Kenneth E. |author-link=Kenneth E. Iverson |title=APL Syntax and Semantics |url=http://www.jsoftware.com/papers/APLSyntaxSemantics.htm |website=www.jsoftware.com |date=1983 |publisher=I. P. Sharp Associates |access-date=January 11, 2015}}

= Examples =

== Hello, world ==

This displays "Hello, world":

'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).

== Exponentiation ==

Another example of this theme is that exponentiation in APL is written as {{code|2*3}}, which indicates raising 2 to the power 3 (this would be written as {{code|2^3}} or {{code|2**3}} in some languages, or relegated to a function call such as {{code|pow(2, 3);}} in others). Many languages use {{code|*}} to signify multiplication, as in {{code|2*3}}, but APL chooses to use {{code|2×3}}. However, if no base is specified (as with the statement {{code|*3}} in APL, or {{code|^3}} in other languages), most programming languages one would see this as a syntax error. APL, however, assumes the missing base to be the natural logarithm constant e, and interprets {{code|*3}} as {{code|2.71828*3}}.

== Simple statistics ==

Suppose that {{code|X}} is an array of numbers. Then {{code|(+/X)÷⍴X}} gives its average. Reading right-to-left, {{code|⍴X}} gives the number of elements in X, and since {{code|÷}} is a dyadic operator, the term to its left is required as well. It is surrounded by parentheses since otherwise X would be taken (so that the summation would be of {{code|X÷⍴X}}—each element of X divided by the number of elements in X), and {{code|+/X}} gives the sum of the elements of X. Building on this, the following expression computes standard deviation: {{sxhl|2=apl|((+/((X - (+/X)÷⍴X)*2))÷⍴X)*0.5}}

Naturally, one would define this expression as a function for repeated use rather than rewriting it each time. Further, since assignment is an operator, it can appear within an expression, so the following would place suitable values into T, AV and SD: {{sxhl|2=apl|SD←((+/((X - AV←(T←+/X)÷⍴X)*2))÷⍴X)*0.5}}

== ''Pick 6'' lottery numbers ==

This following immediate-mode expression generates a typical set of Pick 6 lottery numbers: six pseudo-random integers ranging from 1 to 40, guaranteed non-repeating, and displays them sorted in ascending order:

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{{cite web|last1=MicroAPL|title=APL Primitives |url=http://www.microapl.co.uk/apl_help/ch_020_020.htm |website=www.microapl.co.uk |publisher=MicroAPL |access-date=January 11, 2015}} and glyphs{{cite web |title=APL Font – Extra APL Glyphs |website=wiki.nars2000.org |url=http://wiki.nars2000.org/index.php/APL_Font |publisher=NARS2000 |access-date=January 11, 2015}}):

  • 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.{{cite web |last1=Fox |first1=Ralph L. |title=Systematically Random Numbers |publisher=SIGAPL |url=http://www.sigapl.org/article1.php |website=www.sigapl.org |access-date=January 11, 2015}}
  • 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.

== Prime numbers ==

The following expression finds all prime numbers from 1 to R. In both time and space, the calculation complexity is O(R^2)\,\! (in Big O notation).

(~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.,

class="wikitable" style="text-align:right;"
4

| 6

| 8

| 10

| 12

6

| 9

| 12

| 15

| 18

8

| 12

| 16

| 20

| 24

10

| 15

| 20

| 25

| 30

12

| 18

| 24

| 30

| 36

  • 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.)

== Sorting ==

The following expression sorts a word list stored in matrix X according to word length:

X[⍋X+.≠' ';]

== Game of Life ==

The following function "life", written in Dyalog APL,{{cite AV media |authorlink=John M. Scholes |last1=Scholes |first1=John |date=January 26, 2009 |title=Conway's Game of Life in APL |medium=video |url=http://www.youtube.com/watch?v=a9xAKttWgP4 |location= |publisher=YouTube|access-date=November 20, 2021}}Further technical details in [https://aplwiki.com/wiki/Conway%27s_Game_of_Life APL Wiki's article "Conway's Game of Life"]. Retrieved November 20, 2021. takes a Boolean matrix and calculates the new generation according to Conway's Game of Life. It demonstrates the power of APL to implement a complex algorithm in very little code, but understanding it requires some advanced knowledge of APL (as the same program would in many languages).

life ← {⊃1 ⍵ ∨.∧ 3 4 = +/ +⌿ ¯1 0 1 ∘.⊖ ¯1 0 1 ⌽¨ ⊂⍵}

== HTML tags removal ==

In the following example, also Dyalog, the first line assigns some HTML code to a variable txt and then uses an APL expression to remove all the HTML tags:

txt←'

This is emphasized text.

'

{⍵ /⍨ ~{⍵∨≠\⍵}⍵∊'<>'} txt

This is emphasized text.

Naming

APL derives its name from the initials of Iverson's book A Programming Language, even though the book describes Iverson's mathematical notation, rather than the implemented programming language described in this article. The name is used only for actual implementations, starting with APL\360.

Adin Falkoff coined the name in 1966 during the implementation of APL\360 at IBM:

{{Blockquote|text=As I walked by the office the three students shared, I could hear sounds of an argument going on. I poked my head in the door, and Eric asked me, "Isn't it true that everyone knows the notation we're using is called APL?" I was sorry to have to disappoint him by confessing that I had never heard it called that. Where had he got the idea it was well known? And who had decided to call it that? In fact, why did it have to be called anything? Quite a while later I heard how it was named. When the implementation effort started in June of 1966, the documentation effort started, too. I suppose when they had to write about "it", Falkoff and Iverson realized that they would have to give "it" a name. There were probably many suggestions made at the time, but I have heard of only two. A group in SRA in Chicago which was developing instructional materials using the notation was in favor of the name "Mathlab". This did not catch on. Another suggestion was to call it "Iverson's Better Math" and then let people coin the appropriate acronym. This was deemed facetious.

Then one day Adin Falkoff walked into Ken's office and wrote "A Programming Language" on the board, and underneath it the acronym "APL". Thus it was born. It was just a week or so after this that Eric Iverson asked me his question, at a time when the name hadn't yet found its way the thirteen miles up the Taconic Parkway from IBM Research to IBM Mohansic.

|author=Eugene McDonnell|source=McDonnell, E.E. The [https://code.jsoftware.com/wiki/Doc/A_Source_Book_in_APL#origins introduction to A Source Book in APL], APL Press, 1981. ([http://www.softwarepreservation.org/projects/apl/Papers/ASourceBookInAPL/view full book scan])}}

APL is occasionally re-interpreted as Array Programming Language or Array Processing Language,Acharya, R; Pereira, (904567457)

N.E. [https://courses.cs.vt.edu/~cs5314/Lang-Paper-Presentation/Papers/HoldPapers/APL.pdf#page=3 APL Programming Language] {{Webarchive|url=https://web.archive.org/web/20211103210435/https://courses.cs.vt.edu/~cs5314/Lang-Paper-Presentation/Papers/HoldPapers/APL.pdf#page=3 |date=2021-11-03}}. Paper for CS5314 (Concepts of Programming Languages) at Virginia Tech. thereby making APL into a backronym.

Logo

File:BAPLA 2009 laptop bag.jpg

There has always been cooperation between APL vendors, and joint conferences were held on a regular basis from 1969 until 2010.APL Wiki. [https://aplwiki.com/wiki/APL_conference APL Conference]. Retrieved 13 Oct 2021. At such conferences, APL merchandise was often handed out, featuring APL motifs or collection of vendor logos. Common were apples (as a pun on the similarity in pronunciation of apple and APL) and the code snippet {{code|2=apl|⍺*⎕}} which are the symbols produced by the classic APL keyboard layout when holding the APL modifier key and typing "APL".

Despite all these community efforts, no universal vendor-agnostic logo for the programming language emerged. As popular programming languages increasingly have established recognisable logos, Fortran getting one in 2020,Jacob Williams. Degenerate Conic: [http://degenerateconic.com/new-blood/ New Blood]. Retrieved 13 Oct 2021. British APL Association launched a campaign in the second half of 2021, to establish such a logo for APL, and after a community election and multiple rounds of feedback, a logo was chosen in May 2022.APL Wiki. [https://aplwiki.com/wiki/APL_logo APL logo]. Retrieved 20 May 2022.

Use

APL is used for many purposes including financial and insurance applications, artificial intelligence,{{cite journal |last1=Lee |first1=Georges |last2=Lelouche |first2=Ruddy |last3=Meissonnier |first3=Vincent |last4=Zarri |first4=Gian Piero |title=Using APL in an Artificial Intelligence environment |journal=ACM SIGAPL APL Quote Quad |date=September 1, 1982 |volume=13 |issue=1 |pages=183–191 |doi=10.1145/390006.802242 |url=https://www.researchgate.net/publication/234789115 |access-date=April 3, 2018}}{{cite journal |last1=Fordyce |first1=K. |last2=Sullivan |first2=G. |title=Artificial Intelligence Development Aids |journal=APL Quote Quad |date=1985 |series=APL 85 Conf. Proc. |issue=15 |doi=10.1145/255315.255347 |pages=106–113 |doi-access=free}}

neural networks{{cite journal |last1=Alfonseca |first1=Manuel |title=Neural networks in APL |journal=ACM SIGAPL APL Quote Quad |date=July 1990 |volume=20 |issue=4 |pages=2–6 |doi=10.1145/97811.97816 |url=https://www.researchgate.net/publication/220731305 |access-date=April 3, 2018 |doi-access=free}}

and robotics.{{cite web |last1=Kromberg |first1=Morten |title=Robot Programming in APL |website=www.dyalog.com/ |url=http://begriffs.com/posts/2014-11-26-robots-in-apl.html |access-date=January 6, 2015}} It has been argued that APL is a calculation tool and not a programming language;{{cite journal |last1=Holmes| first1=W.N. |date=May 1978| title=Is APL a Programming Language? |journal=The Computer Journal| volume=21 |issue=2 |pages=128–131 |doi=10.1093/comjnl/21.2.128 |doi-access=free}} its symbolic nature and array capabilities have made it popular with domain experts and data scientists{{cite web |last1=Hsu |first1=Aaron |url=https://confengine.com/functional-conf-2017/proposal/4620/design-patterns-vs-anti-pattern-in-apl |archive-url=https://web.archive.org/web/20180323152845/https://confengine.com/functional-conf-2017/proposal/4620/design-patterns-vs-anti-pattern-in-apl |url-status=dead |archive-date=March 23, 2018 |title=Design Patterns vs. Anti-pattern in APL |date=November 18, 2017 |website=functionalconf.com |access-date=2018-04-07}} who do not have or require the skills of a computer programmer.{{citation needed|date=May 2022}}

APL is well suited to image manipulation and computer animation, where graphic transformations can be encoded as matrix multiplications. One of the first commercial computer graphics houses, Digital Effects, produced an APL graphics product named Visions, which was used to create television commercials and animation for the 1982 film Tron.{{cite book |last1=Magnenat-Thalmann |first1=Nadia |last2=Thalmann |first2=Daniel |date=1985 |title=Computer Animation Theory and Practice |url=https://books.google.com/books?id=neGoCAAAQBAJ&pg=PA38 |publisher=Springer-Verlag |page=38 |isbn=9784431684336 |quote=Digital Effects is another production house that worked on Tron. They used a laser-scanning system to digitize, store and reproduce images. Judson Rosebush, president of Digital Effects, is the primary designer of APL VISION and FORTRAN VISION, two computer animation packages that are currently used. |access-date=April 3, 2018}} Latterly, the [https://stormwind.fi/en/ Stormwind] boating simulator uses APL to implement its core logic, its interfacing to the rendering pipeline middleware and a major part of its physics engine.{{cite web |url=https://www.optima-systems.co.uk/stormwind-simulator-dyalog-16 |title=Stormwind Simulator at Dyalog '16 |last1=Gutsell |first1=Sam |date=October 17, 2017 |website=www.optima-systems.co.uk |publisher=Optima Systems |access-date=April 3, 2018 |quote=Stormwind is a [3D boating simulator] that has gained a huge amount of interest in the APL community.}}

Today, APL remains in use in a wide range of commercial and scientific applications, for example

investment management,{{cite web|url=https://www.simcorp.com/-/media/files/investor/annual-reports/simcorp-annual-report-2017.pdf |archive-url=https://ghostarchive.org/archive/20221009/https://www.simcorp.com/-/media/files/investor/annual-reports/simcorp-annual-report-2017.pdf |archive-date=2022-10-09 |url-status=live|title=2017 Annual Report|date=February 1, 2018|publisher=SimCorp|access-date=April 3, 2018|quote=Sofia is a front-to-back investment management platform like SimCorp Dimension. ... Sofia is based on the APL coding language just like some parts of SimCorp Dimension.}}

asset management,{{cite web|title=OP-Pohjola ja Tieto hoitivat sovelluksen muutostyöt sujuvalla yhteistyöllä |url=https://www.tieto.com/sites/default/files/migrated/documents/Case_OP-Pohjola_fi2806.pdf |access-date=April 3, 2018 |archive-url=https://ghostarchive.org/archive/20221009/https://www.tieto.com/sites/default/files/migrated/documents/Case_OP-Pohjola_fi2806.pdf |archive-date=2022-10-09 |url-status=dead |website=www.tieto.com |publisher=Tieto |language=fi |trans-title=Smooth cooperation between OP-Pohjola and Tieto enabled app modification}}{{Dead link|date=August 2019 |bot=InternetArchiveBot |fix-attempted=yes}}{{Citation needed|date=February 2024|reason=Prior source is deadlink.}}

health care,{{cite web|url=http://profdoccare.se/var-ide/om-oss/vi-idag/|archive-url=https://web.archive.org/web/20180407183212/http://profdoccare.se/var-ide/om-oss/vi-idag/|url-status=dead|archive-date=April 7, 2018|title=Vi idag|website=profdoccare.se|access-date=April 3, 2018|language=sv|trans-title=We today|quote=Through the choice of APL as a technical platform, it is relatively easy to quickly build a solution that can be called a executable prototype (translated from the original)}}

and DNA profiling.{{cite web |last1=Brenner |first1=Charles |title=DNA Identification Technology and APL |url=http://dna-view.com/DNAtechID.htm |website=dna-view.com |publisher=Presentation at the 2005 APL User Conference |access-date=January 9, 2015}}{{cite web |last1=Brenner |first1=Charles |title=There's DNA Everywhere – an Opportunity for APL |url=https://www.youtube.com/watch?v=oXlP3r6PzeE |archive-url=https://ghostarchive.org/varchive/youtube/20211114/oXlP3r6PzeE| archive-date=2021-11-14 |url-status=live |website=www.youtube.com |date=17 October 2014 |publisher=YouTube|access-date=January 9, 2015}}{{cbignore}}

Notable implementations

= APL\360 =

The first implementation of APL using recognizable APL symbols was APL\360 which ran on the IBM System/360, and was completed in November 1966{{cite web |url=http://www.jsoftware.com/papers/APLQA.htm#APL_birthday |title=APL Quotations and Anecdotes |website=jsoftware.com |access-date=April 14, 2018}} though at that time remained in use only within IBM. In 1973 its implementors, 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."{{cite web |title=Awards – 1973 – Lawrence Breed |publisher=Association for Computing Machinery |url=http://awards.acm.org/citation.cfm?id=0694605&srt=all&aw=145&ao=GMHOPPER&yr=1973 |url-status=dead |archive-url=https://web.archive.org/web/20120402212031/http://awards.acm.org/citation.cfm?id=0694605&srt=all&aw=145&ao=GMHOPPER&yr=1973 |archive-date=April 2, 2012}}{{cite web |title=Awards – 1973 – Richard Lathwell|publisher=Association for Computing Machinery |url=http://awards.acm.org/citation.cfm?id=3412588&srt=all&aw=145&ao=GMHOPPER&yr=1973 |url-status=dead |archive-url=https://web.archive.org/web/20120402212035/http://awards.acm.org/citation.cfm?id=3412588&srt=all&aw=145&ao=GMHOPPER&yr=1973 |archive-date=April 2, 2012}}{{cite web |title=Awards – 1973 – Roger Moore|publisher=Association for Computing Machinery |url=http://awards.acm.org/citation.cfm?id=4987585&srt=all&aw=145&ao=GMHOPPER&yr=1973 |url-status=dead |archive-url=https://web.archive.org/web/20120402212037/http://awards.acm.org/citation.cfm?id=4987585&srt=all&aw=145&ao=GMHOPPER&yr=1973 |archive-date=April 2, 2012}}

In 1975, the IBM 5100 microcomputer offered APL\360{{cite web|url=http://www.old-computers.com/museum/computer.asp?c=795 |title=IBM 5100 |website=old-computers.com|access-date=April 8, 2018 |archive-url=https://web.archive.org/web/20180430050157/http://www.old-computers.com/museum/computer.asp?c=795|archive-date=April 30, 2018|url-status=dead}} 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.{{cite magazine| url=https://archive.org/stream/byte-magazine-1975-12/1975_12_BYTE_00-04_Assembling_an_Altair#page/n91/mode/2up |title=Welcome, IBM, to personal computing |magazine=Byte |date=December 1975 |access-date=April 29, 2018 |pages=90}}

Significant developments to APL\360 included CMS/APL, which made use of the virtual storage capabilities of CMS and APLSV, 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.

= APL\1130 =

In 1968, APL\1130 became the first publicly available APL system, created by IBM for the IBM 1130.{{cite web |url=http://www.sigapl.org/APLChronology.php |title=Chronology of APL and its Influences on Computer Language Development |website=www.sigapl.org |publisher=ACM |access-date=April 29, 2018}} It became the most popular IBM Type-III Library software that IBM released.{{cite journal |url=http://www.vector.org.uk/archive/v223/APL_1130.htm |title=How We Got To APL\1130 |author=Larry Breed |author-link=Lawrence M. Breed |journal=Vector (British APL Association) |volume=22 |issue=3 |date=August 2006 |issn=0955-1433 |access-date=April 29, 2018 |url-status=dead |archive-url=https://web.archive.org/web/20080512031437/http://www.vector.org.uk/archive/v223/APL_1130.htm |archive-date=May 12, 2008}}

= APL*Plus and Sharp APL =

{{Main|I. P. Sharp Associates|Scientific Time Sharing Corporation}}

APL*Plus and Sharp APL are versions of APL\360 with added business-oriented extensions such as data formatting and facilities to store APL arrays in external files. They were jointly developed by two companies, employing various members of the original IBM APL\360 development team.{{cite web |url=http://rogerdmoore.ca/INF/ERInstallationHistory.htm |title=History of I. P. Sharp Associates Timesharing and Network |author=Roger Moore |author-link=Roger Moore (computer scientist) |date=2005 |website=Rogerdmoore.ca |publisher=Roger Moore |access-date=March 7, 2018 |archive-date=April 4, 2019 |archive-url=https://web.archive.org/web/20190404053142/http://www.rogerdmoore.ca/INF/ERInstallationHistory.htm |url-status=dead}}

The two companies were I. P. Sharp Associates (IPSA), an APL\360 services company formed in 1964 by Ian Sharp, Roger Moore and others, and STSC, a time-sharing and consulting service company formed in 1969 by Lawrence Breed and others. Together the two developed APL*Plus and thereafter continued to work together but develop APL separately as APL*Plus and Sharp APL. STSC ported APL*Plus to many platforms with versions being made for the VAX 11,{{cite magazine |last1=Blumenthal |first1=Marcia |date=May 18, 1981 |title=VAX-11s Acquire APL Processor|url=https://books.google.com/books?id=MCFtKT_NaYIC&q=vax%20apl&pg=PA2|magazine=Computerworld|access-date= April 22, 2018}} PC and UNIX, whereas IPSA took a different approach to the arrival of the personal computer and made Sharp APL available on this platform using additional PC-XT/360 hardware. In 1993, Soliton Incorporated was formed to support Sharp APL and it developed Sharp APL into SAX (Sharp APL for Unix). {{as of|2018}}, APL*Plus continues as APL2000 APL+Win.

In 1985, Ian Sharp, and Dan Dyer of STSC, jointly received the Kenneth E. Iverson Award for Outstanding Contribution to APL.

=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.{{cite web|url=https://log-on.com/2021/01/26/log-on-software-announces-log-on-apl2/|title=Log-On Software announces Log-On APL2|date=2021-01-26|author=Mark Schora |website=Log-On Software|access-date=2021-11-17}}

= APLGOL =

In 1972, APLGOL was released as an experimental version of APL that added structured programming language constructs to the language framework. New statements were added for interstatement control, conditional statement execution, and statement structuring, as well as statements to clarify the intent of the algorithm.{{cite journal | author=Kelley, R.A.|title=APLGOL, an Experimental Structured Programming Language|year=1973 |journal=IBM Journal of Research and Development|volume=17 |pages=69–73 |doi=10.1147/rd.171.0069 |url=https://ieeexplore.ieee.org/document/5391426/authors#authors}} It was implemented for Hewlett-Packard in 1977.{{cite web | author=Johnston, Ronald L.|title=APLGOL: Structured Programming Facilities for APL|date=July 1977 |publisher=Hewlett-Packard Journal|url=https://archive.org/details/Hewlett-Packard_Journal_Vol._28_No._11_1977-07_Hewlett-Packard/page/n9/mode/2up}}

= Dyalog APL =

Dyalog APL was first released by British company Dyalog Ltd.{{cite web |title=Dyalog Ltd website |url=https://www.dyalog.com/ |access-date=6 June 2018}} in 1983{{Cite journal|title = Dyalog at 25|journal = Vector Magazine|publisher = British APL Association|date = September 2008|url = http://www.vector.org.uk/archive/v234b/d25.pdf|access-date = April 14, 2018}}{{Dead link|date=April 2019 |bot=InternetArchiveBot |fix-attempted=yes}} and, {{as of|2018|lc=y}}, is available for AIX, Linux (including on the Raspberry Pi), macOS and Microsoft Windows platforms. It is based on APL2, with extensions to support object-oriented programming,{{cite book |author=Kromberg, Morten|title=Proceedings of the 2007 symposium on Dynamic languages |chapter=Arrays of objects |date=22 October 2007|page=20|doi=10.1145/1297081.1297087|s2cid=18484472|chapter-url=https://www.dyalog.com/uploads/documents/Papers/Arrays%20of%20Objects.pdf |isbn=9781595938688 |archive-url=https://ghostarchive.org/archive/20221009/https://www.dyalog.com/uploads/documents/Papers/Arrays%20of%20Objects.pdf |archive-date=2022-10-09 |url-status=live|access-date=27 August 2018}} functional programming,{{cite web |url=http://archive.vector.org.uk/art10007770 |title=D: A functional subset of Dyalog APL |last1=Scholes |first1=John |publisher=British APL Association}} and tacit programming.{{cite web |title=Translation of D-functions into tacit form |last1=Scholes |first1=John |publisher=Dyalog Ltd. |url=https://dfns.dyalog.com/n_tacit.htm}} Licences are free for personal/non-commercial use.{{Cite web |url=https://www.dyalog.com/prices-and-licences.htm#basiclic |title=Dyalog – Prices and Licences}}

In 1995, two of the development team – John Scholes and Peter Donnelly – were awarded the Iverson Award for their work on the interpreter.{{cite web |title=Kenneth E. Iverson Award for Outstanding Contribution to APL|publisher=SIGPLAN Chapter on Array Programming Languages (SIGAPL) |url=http://www.sigapl.org/award.htm|url-status=dead|archive-url=https://web.archive.org/web/20120226063703/http://www.sigapl.org/award.htm|archive-date=February 26, 2012}} Gitte Christensen and Morten Kromberg were joint recipients of the Iverson Award in 2016.{{cite web |title=2016 Iverson Award Recognises Dyalog's CEO and CXO |url=http://www.dyalog.com/dyalogue-newsletters.htm?nl=27&a=158 |access-date=6 June 2018}}

= NARS2000 =

NARS2000 is an open-source APL interpreter written by Bob Smith, a prominent APL developer and implementor from STSC in the 1970s and 1980s. NARS2000 contains advanced features and new datatypes and runs natively on Microsoft Windows, and other platforms under Wine. It is named after a development tool from the 1980s, NARS (Nested Arrays Research System).{{cite web |title=Nested Arrays Research System – NARS2000: An Experimental APL Interpreter |url=http://www.nars2000.org/ |website=NARS2000 |publisher=Sudley Place Software |access-date=July 10, 2015}}

= APLX =

APLX is a cross-platform dialect of APL, based on APL2 and with several extensions, which was first released by British company MicroAPL in 2002. Although no longer in development or on commercial sale it is now available free of charge from Dyalog.{{cite web |title=APLX has been withdrawn from commercial sale but can be downloaded free of charge|url=http://microapl.com/apl/|publisher=Microapl.com|access-date=April 14, 2018}}

= York APL =

York APL{{cite web |url=https://www.softwarepreservation.org/projects/apl/Books/YorkAPL |title=York APL}} was developed at the York University, Ontario around 1968, running on IBM 360 mainframes. One notable difference between it and APL\360 was that it defined the "shape" (ρ) of a scalar as 1 whereas APL\360 defined it as the more mathematically correct 0 — this made it easier to write functions that acted the same with scalars and vectors.

= GNU APL =

GNU APL is a free implementation of Extended APL as specified in ISO/IEC 13751:2001 and is thus an implementation of APL2. It runs on Linux, macOS, several BSD dialects, and on Windows (either using Cygwin for full support of all its system functions or as a native 64-bit Windows binary with some of its system functions missing). GNU APL uses Unicode internally and can be scripted. It was written by Jürgen Sauermann.{{cite web |url=http://directory.fsf.org/wiki/GNU_APL |title=GNU APL|website=directory.fsf.org |publisher=Free Software Directory |access-date=September 28, 2013}}

Richard Stallman, founder of the GNU Project, was an early adopter of APL, using it to write a text editor as a high school student in the summer of 1969.{{cite web|last1=Stallman|first1=Richard M. |url=http://www.lysator.liu.se/history/garb/txt/87-2-rms.txt |title=RMS Berättar|access-date=April 22, 2018|archive-url=https://web.archive.org/web/20181126072301/http://www.lysator.liu.se/history/garb/txt/87-2-rms.txt|archive-date=November 26, 2018|url-status=dead}}

Interpretation and compilation of APL

APL is traditionally an interpreted language, having language characteristics such as weak variable typing not well suited to compilation.{{cite book |last1=Budd |first1=Timothy |title=An APL Compiler |publisher=Springer-Verlag |year=1988 |isbn=978-0-387-96643-4 |url=https://books.google.com/books?id=rTb2BwAAQBAJ&pg=PA1}} However, with arrays as its core data structure{{cite web |title=What is APL? |website=www.sigapl.org |publisher=SIGAPL |url=http://www.sigapl.org/about.php |access-date=January 20, 2015}} it provides opportunities for performance gains through parallelism,{{cite journal |last1=Ju |first1=Dz-Ching |last2=Ching |first2=Wai-Mee |title=Exploitation of APL data parallelism on a shared-memory MIMD machine |journal=Newsletter ACM SIGPLAN Notices |date=1991 |volume=26 |issue=7 |pages=61–72 |doi=10.1145/109625.109633 |s2cid=8584353}} parallel computing,{{cite web |last1=Hsu |first1=Aaron W. |last2=Bowman |first2=William J. |title=Revisiting APL in the Modern Era |url=http://www.cs.princeton.edu/~dpw/obt/abstracts/obt12_submission_11.pdf |access-date=January 20, 2015 |archive-url=https://ghostarchive.org/archive/20221009/http://www.cs.princeton.edu/~dpw/obt/abstracts/obt12_submission_11.pdf |archive-date=2022-10-09 |url-status=live |website=www.cs.princeton.edu}}{{cite journal |last1=Ching |first1=W.-M. |last2=Ju |first2=D. |title=Execution of automatically parallelized APL programs on RP3 |journal=IBM Journal of Research & Development |date=1991 |volume=35 |issue=5/6 |pages=767–777 |url=http://domino.research.ibm.com/tchjr/journalindex.nsf/c469af92ea9eceac85256bd50048567c/f892e104dfc4d0fd85256bfa0067fb42!OpenDocument |access-date=January 20, 2015 |doi=10.1147/rd.355.0767 |archive-date=March 3, 2016 |archive-url=https://web.archive.org/web/20160303231727/http://domino.research.ibm.com/tchjr/journalindex.nsf/c469af92ea9eceac85256bd50048567c/f892e104dfc4d0fd85256bfa0067fb42!OpenDocument |url-status=dead}} massively parallel applications,{{cite journal |last1=Blelloch |first1=Guy E. |last2=Sabot |first2=Gary W. |title=Compiling Collection-Oriented Languages onto Massively Parallel Computers |journal=Journal of Parallel and Distributed Computing |volume=8 |issue=2 |citeseerx=10.1.1.51.5088 |pages=119–134 |quote=Collection oriented languages include APL, APL2 |year=1990 |doi=10.1016/0743-7315(90)90087-6}}{{cite web |last1=Jendrsczok |first1=Johannes |last2=Hoffmann |first2=Rolf |last3=Ediger |first3=Patrick |last4=Keller |first4=Jörg |title=Implementing APL-like data parallel functions on a GCA machine |pages=1–6 |url=https://www.fernuni-hagen.de/imperia/md/content/fakultaetfuermathematikundinformatik/pv/97-08/papergca_09_1_.pdf |website=www.fernuni-hagen.de |access-date=January 22, 2015 |quote=GCA – Global Cellular Automation. Inherently massively parallel. 'APL has been chosen because of the ability to express matrix and vector' structures. |archive-url=https://web.archive.org/web/20150122211834/https://www.fernuni-hagen.de/imperia/md/content/fakultaetfuermathematikundinformatik/pv/97-08/papergca_09_1_.pdf |archive-date=January 22, 2015 |url-status=dead}} and very-large-scale integration (VLSI),{{cite book |last1=Brenner |first1=Norman |chapter=VLSI circuit design using APL with fortran subroutines |title=Proceedings of the international conference on APL - APL '84 |date=1984 |volume=14 |issue=4 |pages=77–79 |doi=10.1145/800058.801079 |isbn=0-89791-137-7 |quote=APL for interactiveness and ease of coding |s2cid=30863491}}
{{*}}{{cite book |last1=Brenner |first1=Norman |date=1984 |title=Proceedings of the international conference on APL – APL '84 |chapter=VLSI circuit design using APL with fortran subroutines |publisher=ACM SIGAPL |isbn=978-0897911375}}
{{cite book |doi=10.1109/PACRIM.1989.48437 |quote=VLSI module generators are described. APL and C, as examples of interpreted and compiled languages, can be interfaced to an advanced graphics display. |chapter=Towards a graphics/Procedural environment for constructing VLSI module generators |title=Conference Proceeding IEEE Pacific Rim Conference on Communications, Computers and Signal Processing |pages=606–611 |year=1989 |last1=Gamble |first1=D.J. |last2=Hobson |first2=R.F. |s2cid=7921438}} and from the outset APL has been regarded as a high-performance language{{cite journal |last1=Lee |first1=Robert S. |title=Two Implementations of APL |journal=PC Magazine |date=1983 |volume=2 |issue=5 |page=379 |url=https://books.google.com/books?id=qURs4j9vKn4C&q=%22IBM%20APL%27s%20fast%20execution%22&pg=PA379 |access-date=January 20, 2015}} – for example, it was noted for the speed with which it could perform complicated matrix operations "because it operates on arrays and performs operations like matrix inversion internally".{{cite web |website=MARTHA and LLAMA |title=The APL Computer Language |url=http://marthallama.org/apl/ |access-date=January 20, 2015 |archive-date=February 13, 2015 |archive-url=https://web.archive.org/web/20150213004709/http://marthallama.org/apl/ |url-status=dead}}

Nevertheless, APL is rarely purely interpreted and compilation or partial compilation techniques that are, or have been, used include the following:

= Idiom recognition =

Most APL interpreters support idiom recognition{{cite book |last1=Metzger |first1=Robert |last2=Wen |first2=Zhaofang |title=Automatic Algorithm Recognition and Replacement: A New Approach to Program Optimization |publisher=The MIT press |year=2000 |isbn=9780262133685 |url=https://books.google.com/books?id=u38h_fV3UqgC&pg=PA12 |access-date=May 6, 2018}} and evaluate common idioms as single operations.{{cite journal |last1=Snyder |first1=Lawrence |date=1982 |title=Recognition and Selection of Idioms for Code Optimization |journal=Acta Informatica |volume=17 |issue=3 |doi=10.1007/BF00264357 |s2cid=8369972}}{{cite thesis |last1=Cheng |first1=Feng Sheng |date=1981 |title=Idiom matching: an optimization technique for an APL compiler |url=https://lib.dr.iastate.edu/cgi/viewcontent.cgi?article=7896&context=rtd |publisher=Iowa State University |access-date=May 6, 2018}} For example, by evaluating the idiom BV/⍳⍴A as a single operation (where BV is a Boolean vector and A is an array), the creation of two intermediate arrays is avoided.{{cite web |url=http://help.dyalog.com/16.0/Content/Language/Defined%20Functions%20and%20Operators/Idiom%20Recognition/Idiom%20Recognition.htm |title=Idiom Recognition |publisher=dyalog.com |access-date=May 6, 2018}}

= Optimised bytecode =

Weak typing in APL means that a name may reference an array (of any datatype), a function or an operator. In general, the interpreter cannot know in advance which form it will be and must therefore perform analysis, syntax checking etc. at run-time.{{cite journal |last1=Strawn |first1=George O. |date=March 1977 |title=Does APL really need run-time parsing? |journal=Software: Practice and Experience |volume=7 |issue=2 |pages=193–200 |doi=10.1002/spe.4380070207 |s2cid=1463012}} However, in certain circumstances, it is possible to deduce in advance what type a name is expected to reference and then generate bytecode which can be executed with reduced run-time overhead. This bytecode can also be optimised using compilation techniques such as constant folding or common subexpression elimination.{{cite web|title=Compiler User Guide|url=http://docs.dyalog.com/16.0/Compiler%20User%20Guide.pdf |archive-url=https://ghostarchive.org/archive/20221009/http://docs.dyalog.com/16.0/Compiler%20User%20Guide.pdf |archive-date=2022-10-09 |url-status=live |website=www.dyalog.com|publisher=Dyalog Ltd.|access-date=May 7, 2018}} The interpreter will execute the bytecode when present and when any assumptions which have been made are met. Dyalog APL includes support for optimised bytecode.

= Compilation =

Compilation of APL has been the subject of research and experiment since the language first became available; the first compiler is considered to be the Burroughs APL-700

{{cite journal |last1=Driscoll |first1=Graham C. Jr. |last2=Orth |first2=Donald L. |s2cid=2299699 |date=November 1986 |title=Compiling APL: The Yorktown APL Translator |journal=IBM Journal of Research and Development |volume=30 |issue=6 |pages=583–593 |doi=10.1147/rd.306.0583}} which was released around 1971.{{cite web |url=http://www.sigapl.org/APLChronology.php |title=Chronology of APL |website=www.sigapl.org| publisher=ACM |access-date=May 7, 2018}} In order to be able to compile APL, language limitations have to be imposed.

{{cite journal |last1=Wai-Mee |first1=Ching |s2cid=17306407 |date=November 1986 |title=Program Analysis and Code Generation in an APL/370 Compiler|journal=IBM Journal of Research and Development |volume=30 |issue=6 |pages=594–602 |doi=10.1147/rd.306.0594}} APEX is a research APL compiler which was written by Robert Bernecky and is available under the GNU General Public License.{{cite web |title= The APEX Project |url= http://www.snakeisland.com/apexup.htm}}

The STSC APL Compiler is a hybrid of a bytecode optimiser and a compiler – it enables compilation of functions to machine code provided that its sub-functions and globals are declared, but the interpreter is still used as a runtime library and to execute functions which do not meet the compilation requirements.{{cite web |title= APL Compiler (message from Jim Weigang to the comp.lang.apl Newsgroup) |url= http://www.chilton.com/~jimw/aplcomp.html |date= Apr 5, 1994}}

Standards

APL has been standardized by the American National Standards Institute (ANSI) working group X3J10 and International Organization for Standardization (ISO) and International Electrotechnical Commission (IEC), ISO/IEC Joint Technical Committee 1 Subcommittee 22 Working Group 3. The Core APL language is specified in ISO 8485:1989, and the Extended APL language is specified in ISO/IEC 13751:2001.

References

{{reflist|30em}}

Further reading

  • [https://www-public.slac.stanford.edu/sciDoc/docMeta.aspx?slacPubNumber=slac-r-114 An APL Machine] {{Webarchive|url=https://web.archive.org/web/20240127023607/https://www-public.slac.stanford.edu/sciDoc/docMeta.aspx?slacPubNumber=slac-r-114 |date=2024-01-27}} (1970 Stanford doctoral dissertation by Philip Abrams)
  • [https://sigapl.org/Articles/MichaelMontalbanoPersonalViewOfAPL.php A Personal History Of APL] {{Webarchive|url=https://web.archive.org/web/20231107115811/http://sigapl.org/Articles/MichaelMontalbanoPersonalViewOfAPL.php |date=2023-11-07}} (1982 article by Michael S. Montalbano)
  • {{cite journal |url=https://www.research.ibm.com/journal/sj/304/ibmsj3004N.pdf |title=Language as an intellectual tool: From hieroglyphics to APL |year=1991 |first1=Donald B. |last1=McIntyre |journal=IBM Systems Journal |volume=30 |issue=4 |archive-url=https://web.archive.org/web/20060504050437/http://www.research.ibm.com/journal/sj/304/ibmsj3004N.pdf |archive-date=May 4, 2006 |doi=10.1147/sj.304.0554 |pages=554–581}}
  • {{cite journal |url=https://www.research.ibm.com/journal/sj/304/ibmsj3004O.pdf |title=A Personal view of APL |year=1991 |first1=Kenneth E. |last1=Iverson |author-link=Kenneth E. Iverson |journal=IBM Systems Journal |volume=30 |issue=4 |archive-url=https://web.archive.org/web/20080227012149/http://www.research.ibm.com/journal/sj/304/ibmsj3004O.pdf |archive-date=February 27, 2008 |doi=10.1147/sj.304.0582 |pages=582–593}}
  • [https://web.archive.org/web/20141027152546/http://www.softwarepreservation.org/projects/apl/Books/APROGRAMMING%20LANGUAGE/view A Programming Language] by Kenneth E. Iverson
  • [https://www.softwarepreservation.org/projects/apl/Papers/197201_APL%20In%20Exposition_320-3010.pdf/view APL in Exposition] by Kenneth E. Iverson
  • Brooks, Frederick P.; Kenneth Iverson (1965). Automatic Data Processing, System/360 Edition. {{ISBN|0-471-10605-4}}.
  • {{cite book |last1=Askoolum |first1=Ajay |title=System Building with APL + Win |date= August 2006 |publisher=Wiley |isbn=978-0-470-03020-2}}
  • {{cite journal |url=http://www.research.ibm.com/journal/sj/032/falkoff.pdf |title=A Formal Description of System/360 |first1=Adin D. |last1=Falkoff |first2=Kenneth E. |last2=Iverson |author-link2=Kenneth E. Iverson |first3=Edward H. |last3=Sussenguth |author-link3=Edward H. Sussenguth |journal=IBM Systems Journal |volume=3 |issue=2 |year=1964 |archive-url=https://web.archive.org/web/20080227012111/http://www.research.ibm.com/journal/sj/032/falkoff.pdf |archive-date=February 27, 2008 |doi=10.1147/sj.32.0198 |pages=198–261}}
  • {{cite book |editor-last=Wexelblat |editor-first=Richard L |title=History of Programming Languages: Proceedings of the History of Programming Languages Conference, Los Angeles, Calif., June 1-3, 1978 |chapter=XIV |isbn=978-0127450407 |year=1981|publisher=Academic Press}}
  • {{cite book |last1=Banon |first1=Gerald Jean Francis |title=Bases da Computacao Grafica |publisher=Campus |location=Rio de Janeiro |year=1989 |page=141}}
  • {{cite book |last1=LePage |first1=Wilbur R. |title=Applied A.P.L. Programming |publisher=Prentice Hall |year=1978}}
  • {{cite journal |date=November 2003 |last1=Mougin |first1=Philippe |last2=Ducasse |first2=Stephane |title=OOPAL: Integrating array programming in object-oriented programming |journal=ACM SIGPLAN Notices |volume=38 |issue=11 |pages=65–77 |doi=10.1145/949343.949312 |url-status=dead |archive-url=https://web.archive.org/web/20061114145417/http://www.fscript.org/documentation/OOPAL.pdf |archive-date=November 14, 2006 |url=http://www.fscript.org/documentation/OOPAL.pdf}}
  • {{cite book |url=http://www.dyalog.dk/whatsnew/OO4APLERS.pdf |archive-url=https://web.archive.org/web/20071004214341/http://www.dyalog.dk/whatsnew/OO4APLERS.pdf |url-status=dead |archive-date=October 4, 2007 |title=An Introduction to Object Oriented Programming For APL Programmers |publisher=Dyalog Limited |date=September 2006}}
  • {{cite web |title=The APL Programming Language Source Code |first1=Len |last1=Shustek |date=October 10, 2012 |publisher=Computer History Museum (CHM) |url=http://www.computerhistory.org/atchm/the-apl-programming-language-source-code/#A-Taste-of-APL |access-date=September 6, 2017 |url-status=live |archive-url=https://web.archive.org/web/20170906205616/http://www.computerhistory.org/atchm/the-apl-programming-language-source-code/ |archive-date=September 6, 2017}}
  • {{cite book |title=Advanced Logical Circuit Design Techniques |first1=Antonín |last1=Svoboda |author-link1=Antonín Svoboda (computer scientist) |first2=Donnamaie E. |last2=White |date=2016 |orig-year=2012, 1985, 1979-08-01 |edition=retyped electronic reissue |publisher=Garland STPM Press (original issue) / WhitePubs Enterprises, Inc. (reissue) |lccn=78-31384 |isbn=978-0-8240-7014-4 |url=http://www.donnamaie.com/Advanced_logic_ckt/Advanced_Logical_Circuit_Design_Techniques%20sm.pdf |access-date=2017-04-15 |url-status=live |archive-url=https://web.archive.org/web/20170414163013/http://www.donnamaie.com/Advanced_logic_ckt/Advanced_Logical_Circuit_Design_Techniques%20sm.pdf |archive-date=2017-04-14}} [http://www.donnamaie.com/] [https://books.google.com/books?id=g3uzAAAAIAAJ]

= Video =

  • {{YouTube|id=8kUQWuK1L4w|title=The Origins of APL}} – a 1974 talk show style interview with the original developers of APL.
  • {{YouTube|id=_DTpQ4Kk2wA|title=APL demonstration}} – a 1975 live demonstration of APL by Professor Bob Spence, Imperial College London.
  • {{YouTube|id=a9xAKttWgP4|title=Conway's Game Of Life in APL}} – a 2009 tutorial by John Scholes of Dyalog Ltd. which implements Conway's Game of Life in a single line of APL.
  • {{YouTube|id=ra_JyBCI4Xg|title=50 Years of APL}} – a 2009 introduction to APL by Graeme Robertson.

= Online resources =