APL programming language
   HOME

TheInfoList



OR:

APL (named after the book ''A Programming Language'') is a
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
developed in the 1960s by
Kenneth E. Iverson Kenneth Eugene Iverson (17 December 1920 – 19 October 2004) was a Canadian computer scientist noted for the development of the programming language APL. He was honored with the Turing Award in 1979 "for his pioneering effort in programming l ...
. Its central datatype is the
multidimensional array In computer science, array is a data type that represents a collection of ''elements'' (values or variables), each selected by one or more indices (identifying keys) that can be computed at run time during program execution. Such a collection ...
. 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,
spreadsheet A spreadsheet is a computer application for computation, organization, analysis and storage of data in tabular form. Spreadsheets were developed as computerized analogs of paper accounting worksheets. The program operates on data entered in ...
s,
functional programming In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions tha ...
, and computer math packages. It has also inspired several other programming languages.


History


Mathematical notation

A
mathematical notation Mathematical notation consists of using symbols for representing operations, unspecified numbers, relations and any other mathematical objects, and assembling them into expressions and formulas. Mathematical notation is widely used in mathem ...
for manipulating arrays was developed by
Kenneth E. Iverson Kenneth Eugene Iverson (17 December 1920 – 19 October 2004) was a Canadian computer scientist noted for the development of the programming language APL. He was honored with the Turing Award in 1979 "for his pioneering effort in programming l ...
, starting in 1957 at
Harvard University Harvard University is a private Ivy League research university in Cambridge, Massachusetts. Founded in 1636 as Harvard College and named for its first benefactor, the Puritan clergyman John Harvard, it is the oldest institution of highe ...
. 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 The Burroughs Large Systems Group produced a family of large 48-bit mainframes using stack machine instruction sets with dense syllables.E.g., 12-bit syllables for B5000, 8-bit syllables for B6500 The first machine in the family was the B5000 i ...
and its stack mechanism when
stack machine In computer science, computer engineering and programming language implementations, a stack machine is a computer processor or a virtual machine in which the primary interaction is moving short-lived temporary values to and from a push down ...
s versus
register machine In mathematical logic and theoretical computer science a register machine is a generic class of abstract machines used in a manner similar to a Turing machine. All the models are Turing equivalent. Overview The register machine gets its name fro ...
s 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 Frederick Phillips Brooks Jr. (April 19, 1931 – November 17, 2022) was an American computer architect, software engineer, and computer scientist, best known for managing the development of IBM's System/360 family of computers and the O ...
, ''Automatic Data Processing'', which would be published in 1963. In 1979, Iverson received the
Turing Award The ACM A. M. Turing Award is an annual prize given by the Association for Computing Machinery (ACM) for contributions of lasting and major technical importance to computer science. It is generally recognized as the highest distinction in compu ...
for his work on APL.


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 The IBM System/360 (S/360) is a family of mainframe computer systems that was announced by IBM on April 7, 1964, and delivered between 1965 and 1978. It was the first family of computers designed to cover both commercial and scientific applic ...
family. In 1963, Herbert Hellerman, working at the IBM Systems Research Institute, implemented a part of the notation on an
IBM 1620 The IBM 1620 was announced by IBM on October 21, 1959, and marketed as an inexpensive scientific computer. After a total production of about two thousand machines, it was withdrawn on November 19, 1970. Modified versions of the 1620 were used as ...
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). 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 The IBM System/360 (S/360) is a family of mainframe computer systems that was announced by IBM on April 7, 1964, and delivered between 1965 and 1978. It was the first family of computers designed to cover both commercial and scientific applic ...
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. After
Lawrence M. Breed Lawrence Moser "Larry" Breed (July 17, 1940 - May 16, 2021) was a computer scientist, artist and inventor, best known for his involvement in the programming language APL. Career As an undergraduate at Stanford University in 1961, he created t ...
and
Philip S. Abrams Philip S. Abrams is a computer science researcher who co-authored the first implementation of the programming language APL. APL In 1962, Kenneth E. Iverson published his book ''A Programming Language,'' describing a mathematical notation for ...
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 The IBM 7090 is a second-generation transistorized version of the earlier IBM 709 vacuum tube mainframe computer that was designed for "large-scale scientific and technological applications". The 7090 is the fourth member of the IBM 700/7000 se ...
computer running on the
IBSYS IBSYS is the discontinued tape-based operating system that IBM supplied with its IBM 709, IBM 7090 and IBM 7094 computers. A similar operating system (but with several significant differences), also called IBSYS, was provided with IBM 7040 a ...
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 Niklaus Emil Wirth (born 15 February 1934) is a Swiss computer scientist. He has designed several programming languages, including Pascal, and pioneered several classic topics in software engineering. In 1984, he won the Turing Award, generally ...
. Like Hellerman's PAT system earlier, this implementation did not include the APL character set but used special English reserved words for functions and operators. The system was later adapted for a
time-sharing In computing, time-sharing is the sharing of a computing resource among many users at the same time by means of multiprogramming and multi-tasking.DEC Timesharing (1965), by Peter Clark, The DEC Professional, Volume 1, Number 1 Its emergence ...
system and, by November 1966, it had been reprogrammed for the
IBM System/360 Model 50 The IBM System/360 Model 50 is a member of the IBM System/360 family of computers. The Model 50 was announced in April 1964 with the other initial models of the family, and first shipped in August 1965 to the Bank of America. Models There are f ...
computer running in a time-sharing mode and was used internally at IBM.


Hardware

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 The IBM Selectric typewriter was a highly successful line of electric typewriters introduced by IBM on 31 July 1961. Instead of the "basket" of individual typebars that swung up to strike the ribbon and page in a typical typewriter of the peri ...
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 IBM 1050 Data Communications System is a computer terminal subsystem to send data to and receive data from another 1050 subsystem or IBM computer in the IBM 1400, IBM 7000 or System/360 series. It first became available in 1963 and was used wi ...
and
IBM 2741 The IBM 2741 is a printing computer terminal that was introduced in 1965. Compared to the teletypewriter machines that were commonly used as printing terminals at the time, the 2741 offers 50% higher speed, much higher quality printing, quieter op ...
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
"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. 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 In Boolean functions and propositional calculus, the Sheffer stroke denotes a logical operation that is equivalent to the negation of the conjunction operation, expressed in ordinary language as "not both". It is also called nand ("not and") ...
'' (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 Thomas J. Watson Research Center is the headquarters for IBM Research. The center comprises three sites, with its main laboratory in Yorktown Heights, New York, U.S., 38 miles (61 km) north of New York City, Albany, New York and wit ...
, the home of APL, in
Yorktown Heights Yorktown Heights is a census-designated place (CDP) in the town of Yorktown in Westchester County, New York, United States. The population was 1,781 at the 2010 census. History Yorktown Heights is in the town of Yorktown, New York, in northern ...
, 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 The IBM 1130 Computing System, introduced in 1965, was IBM's least expensive computer at that time. A binary 16-bit machine, it was marketed to price-sensitive, computing-intensive technical markets, like education and engineering, succeeding th ...
. IBM provided ''APL\1130'' for free but without liability or support. 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. Additional improvements in performance for selected
IBM System/370 The IBM System/370 (S/370) is a model range of IBM mainframe computers announced on June 30, 1970, as the successors to the System/360 family. The series mostly maintains backward compatibility with the S/360, allowing an easy migration path ...
mainframe systems included the ''APL Assist Microcode'' in which some support for APL execution was included in the processor's
firmware In computing, firmware is a specific class of computer software that provides the low-level control for a device's specific hardware. Firmware, such as the BIOS of a personal computer, may contain basic functions of a device, and may provide h ...
, 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\360''Falkoff, Adin; Iverson, Kenneth E.
"APL\360 Users Guide"
, IBM Research, Thomas J. Watson Research Center, Yorktown Heights, NY, August 1968.
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. 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 The IBM 5100 Portable Computer is a portable computer (one of the first) introduced in September 1975, six years before the IBM Personal Computer, and eight before the first successful IBM compatible portable computer, the Compaq Portable. It ...
desktop computer, which had a small CRT and an APL keyboard, when most other small computers of the time only offered
BASIC BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College ...
. In the 1980s, the ''VSAPL'' program product enjoyed wide use with
Conversational Monitor System The Conversational Monitor System (CMS – originally: "Cambridge Monitor System") is a simple interactive computing, interactive single-user operating system. CMS was originally developed as part of IBM's CP/CMS operating system, which went ...
(CMS),
Time Sharing Option Time Sharing Option (TSO) is an interactive time-sharing environment for IBM mainframe operating systems, including OS/360 MVT, OS/VS2 (SVS), MVS, OS/390, and z/OS. Use In computing, time-sharing is a design technique that allows many peop ...
(TSO), VSPC,
MUSIC/SP ''MUSIC/SP (Multi-User System for Interactive Computing/System Product''; originally "McGill University System for Interactive Computing") was developed at McGill University in the 1970s from an early IBM time-sharing system called RAX ( Re ...
, and
CICS IBM CICS (Customer Information Control System) is a family of mixed-language application servers that provide online transaction management and connectivity for applications on IBM mainframe systems under z/OS and z/VSE. CICS family products ...
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 The UNIVAC 1100/2200 series is a series of compatible 36-bit computer systems, beginning with the UNIVAC 1107 in 1962, initially made by Sperry Rand. The series continues to be supported today by Unisys Corporation as the ClearPath Dorado Ser ...
mainframe computers. At the time, Sperry had nothing. In 1974, student Alan Stebbens was assigned the task of implementing an internal function. 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. 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 Scientific Time Sharing Corporation (STSC) was a pioneering timesharing and consulting service company which offered APL from its datacenter in Bethesda, MD to users in the United States and Europe. History 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 The IBM 4300 series are mid-range systems compatible with System/370 that were sold from 1979 through 1992. They featured modest electrical and cooling requirements, and thus did not require a data center environment. They had a disruptive effect ...
, 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), file system, nested arrays, and shared variables. APL interpreters were available from other mainframe and mini-computer manufacturers also, notably Burroughs,
Control Data Corporation Control Data Corporation (CDC) was a mainframe and supercomputer firm. CDC was one of the nine major United States computer companies through most of the 1960s; the others were IBM, Burroughs Corporation, DEC, NCR, General Electric, Honeywe ...
(CDC),
Data General Data General Corporation was one of the first minicomputer firms of the late 1960s. Three of the four founders were former employees of Digital Equipment Corporation (DEC). Their first product, 1969's Data General Nova, was a 16-bit minicompute ...
,
Digital Equipment Corporation Digital Equipment Corporation (DEC ), using the trademark Digital, was a major American company in the computer industry from the 1960s to the 1990s. The company was co-founded by Ken Olsen and Harlan Anderson in 1957. Olsen was president un ...
(DEC),
Harris Harris may refer to: Places Canada * Harris, Ontario * Northland Pyrite Mine (also known as Harris Mine) * Harris, Saskatchewan * Rural Municipality of Harris No. 316, Saskatchewan Scotland * Harris, Outer Hebrides (sometimes called the Isle of ...
,
Hewlett-Packard The Hewlett-Packard Company, commonly shortened to Hewlett-Packard ( ) or HP, was an American multinational information technology company headquartered in Palo Alto, California. HP developed and provided a wide variety of hardware components ...
(HP),
Siemens Siemens AG ( ) is a German multinational conglomerate corporation and the largest industrial manufacturing company in Europe headquartered in Munich with branch offices abroad. The principal divisions of the corporation are ''Industry'', ''E ...
,
Xerox Xerox Holdings Corporation (; also known simply as Xerox) is an American corporation that sells print and digital document products and services in more than 160 countries. Xerox is headquartered in Norwalk, Connecticut (having moved from St ...
and others. Garth Foster of
Syracuse University Syracuse University (informally 'Cuse or SU) is a Private university, private research university in Syracuse, New York. Established in 1870 with roots in the Methodist Episcopal Church, the university has been nonsectarian since 1920. Locate ...
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 Asilomar Conference Grounds is a conference center built for the Young Women's Christian Association (YWCA). It is located east of what was known as Moss Beach on the western tip of the Monterey Peninsula in Pacific Grove, California. Between 1913 ...
near
Monterey Monterey (; es, Monterrey; Ohlone: ) is a city located in Monterey County on the southern edge of Monterey Bay on the U.S. state of California's Central Coast. Founded on June 3, 1770, it functioned as the capital of Alta California under bot ...
,
California California is a state in the Western United States, located along the Pacific Coast. With nearly 39.2million residents across a total area of approximately , it is the most populous U.S. state and the 3rd largest by area. It is also the m ...
, and at Pajaro Dunes near
Watsonville Watsonville is a city in Santa Cruz County, California, located in the Monterey Bay Area of the Central Coast of California. The population was 52,590 according to the 2020 census. Predominantly Latino and Democratic, Watsonville is a self- ...
, California. The SIGAPL special interest group of the
Association for Computing Machinery The Association for Computing Machinery (ACM) is a US-based international learned society for computing. It was founded in 1947 and is the world's largest scientific and educational computing society. The ACM is a non-profit professional member ...
continues to support the APL community.


Microcomputers

On microcomputers, which became available from the mid-1970s onwards,
BASIC BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College ...
became the dominant programming language. Nevertheless, some microcomputers provided APL instead – the first being the
Intel 8008 The Intel 8008 ("''eight-thousand-eight''" or "''eighty-oh-eight''") is an early byte-oriented microprocessor designed by Computer Terminal Corporation (CTC), implemented and manufactured by Intel, and introduced in April 1972. It is an 8-bit CP ...
-based MCM/70 which was released in 1974 and which was primarily used in education. Another machine of this time was the
VideoBrain Family Computer The VideoBrain Family Computer (model 101) is an 8-bit home computer manufactured by Umtech Incorporated, starting in 1977. It is based on the Fairchild Semiconductor F8 CPU. It was not a large commercial success and was discontinued from th ...
, released in 1977, which was supplied with its dialect of APL called APL/S. The Commodore SuperPET, introduced in 1981, included an APL interpreter developed by the
University of Waterloo The University of Waterloo (UWaterloo, UW, or Waterloo) is a public research university with a main campus in Waterloo, Ontario, Canada. The main campus is on of land adjacent to "Uptown" Waterloo and Waterloo Park. The university also operates ...
. In 1976, Bill Gates claimed in his Open Letter to Hobbyists that
Microsoft Corporation Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washingt ...
was implementing APL for the
Intel 8080 The Intel 8080 (''"eighty-eighty"'') is the second 8-bit microprocessor designed and manufactured by Intel. It first appeared in April 1974 and is an extended and enhanced variant of the earlier 8008 design, although without binary compatibil ...
and
Motorola 6800 The 6800 ("''sixty-eight hundred''") is an 8-bit microprocessor designed and first manufactured by Motorola in 1974. The MC6800 microprocessor was part of the M6800 Microcomputer System (latter dubbed ''68xx'') that also included serial and para ...
but had "very little incentive to make tavailable to hobbyists" because of
software piracy Copyright infringement (at times referred to as piracy) is the use of works protected by copyright without permission for a usage where such permission is required, thereby infringing certain exclusive rights granted to the copyright holder, s ...
. It was never released.


APL2

Starting in the early 1980s, IBM APL development, under the leadership of
Jim Brown James Nathaniel Brown (born February 17, 1936) is a former American football player, sports analyst and actor. He played as a fullback for the Cleveland Browns of the National Football League (NFL) from 1957 through 1965. Considered to be one ...
, 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 I. P. Sharp Associates (IPSA) was a major Canadian computer time-sharing, consulting and services firm of the 1970s and 1980s. IPSA is well known for its work on the programming language APL, an early packet switching computer network named IPS ...
, where one of his major contributions was directing the evolution of Sharp APL to be more in accord with his vision. APL2 was first released for
CMS CMS may refer to: Computing * Call management system * CMS-2 (programming language), used by the United States Navy * Code Morphing Software, a technology used by Transmeta * Collection management system for a museum collection * Color manage ...
and TSO in 1984. The APL2 Workstation edition (Windows,
OS/2 OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 r ...
,
AIX Aix or AIX may refer to: Computing * AIX, a line of IBM computer operating systems *An Alternate Index, for a Virtual Storage Access Method Key Sequenced Data Set * Athens Internet Exchange, a European Internet exchange point Places Belgiu ...
,
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, whi ...
, and Solaris) followed later. As other vendors were busy developing APL interpreters for new hardware, notably
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, ...
-based
microcomputer A microcomputer is a small, relatively inexpensive computer having a central processing unit (CPU) made out of a microprocessor. The computer also includes memory and input/output (I/O) circuitry together mounted on a printed circuit board (PC ...
s, 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. IBM cites its use for problem solving, system design, prototyping, engineering and scientific computations, expert systems, for teaching mathematics and other subjects, visualization and database access.


Modern implementations

Various implementations of APL by APLX, Dyalog, et al., include extensions for
object-oriented programming Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
, support for
.NET Framework The .NET Framework (pronounced as "''dot net"'') is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until bein ...
, XML-array conversion primitives, graphing, operating system interfaces, and
lambda calculus Lambda calculus (also written as ''λ''-calculus) is a formal system in mathematical logic for expressing computation based on function abstraction and application using variable binding and substitution. It is a universal model of computation th ...
expressions. Freeware versions include GNU APL for Linux and NARS2000 for Windows (which 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: * 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 Robert "Rob" Pike (born 1956) is a Canadian programmer and author. He is best known for his work on the Go (programming language), Go programming language and at Bell Labs, where he was a member of the Unix team and was involved in the creation o ...
, and which uses
ASCII ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because ...
as input. * J, which was also designed by Iverson, and which uses
ASCII ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because ...
with digraphs instead of special symbols. * K, a proprietary variant of APL developed by Arthur Whitney. *
MATLAB MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementat ...
, a numerical computation tool. *
Nial Nial (from "Nested Interactive Array Language") is a high-level array programming language developed from about 1981 by Mike Jenkins of Queen's University, Kingston, Ontario, Canada. Jenkins co-created the Jenkins–Traub algorithm. Nial c ...
, 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). *
Speakeasy A speakeasy, also called a blind pig or blind tiger, is an illicit establishment that sells alcoholic beverages, or a retro style bar that replicates aspects of historical speakeasies. Speakeasy bars came into prominence in the United States ...
, a numerical computing interactive environment. *
Wolfram Language The Wolfram Language ( ) is a general multi-paradigm programming language developed by Wolfram Research. It emphasizes symbolic computation, functional programming, and rule-based programming and can employ arbitrary structures and data. It ...
, the programming language of
Mathematica Wolfram Mathematica is a software system with built-in libraries for several areas of technical computing that allow machine learning, statistics, symbolic computation, data manipulation, network analysis, time series analysis, NLP, optimiza ...
.


Language characteristics


Character set

APL has been criticized and praised for its choice of a unique, non-standard character set. Some who learn it become ardent adherents. 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 The IBM Selectric typewriter was a highly successful line of electric typewriters introduced by IBM on 31 July 1961. Instead of the "basket" of individual typebars that swung up to strike the ribbon and page in a typical typewriter of the peri ...
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 () with the full APL character set which featured half and full duplex
telecommunication Telecommunication is the transmission of information by various types of technologies over wire, radio, optical, or other electromagnetic systems. It has its origin in the desire of humans for communication over a distance greater than that ...
s modes, for interacting with an APL
time-sharing In computing, time-sharing is the sharing of a computing resource among many users at the same time by means of multiprogramming and multi-tasking.DEC Timesharing (1965), by Peter Clark, The DEC Professional, Volume 1, Number 1 Its emergence ...
service or remote mainframe to run a remote computer job, called an RJE. Over time, with the universal use of high-quality graphic displays, printing devices and
Unicode Unicode, formally The Unicode Standard,The formal version reference is is an information technology standard for the consistent encoding, representation, and handling of text expressed in most of the world's writing systems. The standard, ...
support, the APL character font problem has largely been eliminated. However, entering APL characters requires the use of
input method editor An input method (or input method editor, commonly abbreviated IME) is an operating system component or program that enables users to generate characters not natively available on their input devices by using sequences of characters (or mouse o ...
s, keyboard mappings, virtual/on-screen APL symbol sets, or easy-reference printed keyboard cards which can frustrate beginners accustomed to other programming languages. 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. 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, and keyboard mappings, not to mention a substantial number of idioms for common tasks.


Design

Unlike traditionally structured programming languages, APL code is typically structured as chains of monadic or dyadic functions, and
operators Operator may refer to: Mathematics * A symbol indicating a mathematical operation * Logical operator or logical connective in mathematical logic * Operator (mathematics), mapping that acts on elements of a space to produce elements of another sp ...
acting on arrays. 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 Precedence may refer to: * Message precedence of military communications traffic * Order of precedence, the ceremonial hierarchy within a nation or state * Order of operations, in mathematics and computer programming * Precedence Entertainment, ...
, and always associate to the right. Thus, APL is ''read'' or best understood from
right-to-left In a script (commonly shortened to right to left or abbreviated RTL, RL-TB or R2L), writing starts from the right of the page and continues to the left, proceeding from top to bottom for new lines. Arabic, Hebrew, Persian, Pashto, Urdu, Kashmir ...
. Early APL implementations ( or so) had no programming loop- flow control structures, such as do or while loops, and if-then-else constructs. Instead, they used array operations, and use of
structured programming Structured programming is a programming paradigm aimed at improving the clarity, quality, and development time of a computer program by making extensive use of the structured control flow constructs of selection ( if/then/else) and repetition ( ...
constructs was often not necessary, since an operation could be performed on a full array in one statement. For example, the iota function (ι) can replace for-loop
iteration Iteration is the repetition of a process in order to generate a (possibly unbounded) sequence of outcomes. Each repetition of the process is a single iteration, and the outcome of each iteration is then the starting point of the next iteration. ...
: ιN when applied to a scalar positive integer yields a one-dimensional array (vector), 1 2 3 ... N. More recent implementations of APL 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. In the examples below, the APL interpreter first types six spaces before awaiting the user's input. Its own output starts in column one. The user can save the workspace with all values, programs, and execution status. APL uses a set of non-
ASCII ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because ...
symbols, which are an extension of traditional arithmetic and algebraic notation. Having single character names for single instruction, multiple data (
SIMD Single instruction, multiple data (SIMD) is a type of parallel processing in Flynn's taxonomy. SIMD can be internal (part of the hardware design) and it can be directly accessible through an instruction set architecture (ISA), but it shoul ...
) vector functions is one way that APL enables compact formulation of algorithms for data transformation such as computing
Conway's Game of Life The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970. It is a zero-player game, meaning that its evolution is determined by its initial state, requiring no furthe ...
in one line of code. 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. Because of the unusual
character set Character encoding is the process of assigning numbers to graphical characters, especially the written characters of human language, allowing them to be stored, transmitted, and transformed using digital computers. The numerical values tha ...
, many programmers use special keyboards with APL keytops to write APL code. Although there are various ways to write APL code using only ASCII characters, in practice it is almost never done. (This may be thought to support Iverson's thesis about notation as a tool of thought.) Most if not all modern implementations use standard keyboard layouts, with special mappings or
input method editor An input method (or input method editor, commonly abbreviated IME) is an operating system component or program that enables users to generate characters not natively available on their input devices by using sequences of characters (or mouse o ...
s 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 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. 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 COBOL (; an acronym for "common business-oriented language") is a compiled English-like computer programming language designed for business use. It is an imperative, procedural and, since 2002, object-oriented language. COBOL is primarily u ...
and
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
as being comparatively tedious. APL is often found where time-to-market is important, such as with trading systems.


Terminology

APL makes a clear distinction between ''functions'' and ''operators''. Functions take arrays (variables or constants or expressions) as arguments, and return arrays as results. Operators (similar to
higher-order function In mathematics and computer science, a higher-order function (HOF) is a function that does at least one of the following: * takes one or more functions as arguments (i.e. a procedural parameter, which is a parameter of a procedure that is itse ...
s) 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.


Syntax

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.


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 , which indicates raising 2 to the power 3 (this would be written as in some other languages and in FORTRAN and Python). Many languages use to signify multiplication, as in , but APL chooses to use . However, if no base is specified (as with the statement in APL, or 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 as .


Simple statistics

Suppose that is an array of numbers. Then gives its average. Reading ''right-to-left'', gives the number of elements in X, and since 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 —each element of X divided by the number of elements in X), and gives the sum of the elements of X. Building on this, the following expression computes
standard deviation In statistics, the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, whil ...
: 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:


''Pick 6'' lottery numbers

This following immediate-mode expression generates a typical set of ''Pick 6''
lottery A lottery is a form of gambling that involves the drawing of numbers at random for a prize. Some governments outlaw lotteries, while others endorse it to the extent of organizing a national or state lottery. It is common to find some degree of ...
numbers: six
pseudo-random A pseudorandom sequence of numbers is one that appears to be statistically random, despite having been produced by a completely deterministic and repeatable process. Background The generation of random numbers has many uses, such as for rando ...
integer An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign ( −1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the languag ...
s 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'' and ''glyphs''): * The first to be executed (APL executes from rightmost to leftmost) is dyadic function ? (named deal when dyadic) that returns a
vector Vector most often refers to: *Euclidean vector, a quantity with a magnitude and a direction *Vector (epidemiology), an agent that carries and transmits an infectious pathogen into another living organism Vector may also refer to: Mathematic ...
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 o the right of it inclusive. Thus, a
role-playing game A role-playing game (sometimes spelled roleplaying game, RPG) is a game in which players assume the roles of characters in a fictional setting. Players take responsibility for acting out these roles within a narrative, either through literal ac ...
program might use the expression ?20 to roll a twenty-sided die.


Prime numbers

The following expression finds all
prime number A prime number (or a prime) is a natural number greater than 1 that is not a Product (mathematics), product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime ...
s from 1 to R. In both time and space, the calculation complexity is O(R^2)\,\! (in
Big O notation Big ''O'' notation is a mathematical notation that describes the limiting behavior of a function when the argument tends towards a particular value or infinity. Big O is a member of a family of notations invented by Paul Bachmann, Edmund L ...
). (~R∊R∘.×R)/R←1↓⍳R Executed from right to left, this means: * ''
Iota Iota (; uppercase: Ι, lowercase: ι; ) is the ninth letter of the Greek alphabet. It was derived from the Phoenician letter Yodh. Letters that arose from this letter include the Latin I and J, the Cyrillic І (І, і), Yi (Ї, ї), and ...
'' creates a vector containing
integer An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign ( −1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the languag ...
s 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 In linear algebra, the outer product of two coordinate vectors is a matrix. If the two vectors have dimensions ''n'' and ''m'', then their outer product is an ''n'' × ''m'' matrix. More generally, given two tensors (multidimensional arrays of nu ...
'' of R multiplied by R, i.e., a matrix that is the ''
multiplication table In mathematics, a multiplication table (sometimes, less formally, a times table) is a mathematical table used to define a multiplication operation for an algebraic system. The decimal multiplication table was traditionally taught as an essenti ...
'' 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 Epsilon (, ; uppercase , lowercase or lunate ; el, έψιλον) is the fifth letter of the Greek alphabet, corresponding phonetically to a mid front unrounded vowel or . In the system of Greek numerals it also has the value five. It was d ...
'' 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 The tilde () or , is a grapheme with several uses. The name of the character came into English from Spanish, which in turn came from the Latin '' titulus'', meaning "title" or "superscription". Its primary use is as a diacritic (accent) i ...
'' 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 (Note, 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, takes a boolean matrix and calculates the new generation according to
Conway's Game of Life The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970. It is a zero-player game, meaning that its evolution is determined by its initial state, requiring no furthe ...
. 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 ←


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
explanation
: 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 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 mo ...
. Adin Falkoff coined the name in 1966 during the implementation of APL\360 at IBM: ''APL'' is occasionally re-interpreted as ''Array Programming Language'' or ''Array Processing Language'', thereby making ''APL'' into a
backronym A backronym is an acronym formed from an already existing word by expanding its letters into the words of a phrase. Backronyms may be invented with either serious or humorous intent, or they may be a type of false etymology or folk etymology. The ...
.


Logo

There has always been cooperation between APL vendors, and joint conferences were held on a regular basis from 1969 until 2010. At such conferences, APL
merchandise Merchandising is any practice which contributes to the sale of products to a retail consumer. At a retail in-store level, merchandising refers to displaying products that are for sale in a creative way that entices customers to purchase more ...
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 which are the symbols produced by the classic APL keyboard layout when holding the APL
modifier key In computing, a modifier key is a special key (or combination) on a computer keyboard that temporarily modifies the normal action of another key when pressed together. By themselves, modifier keys usually do nothing; that is, pressing any of the , ...
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, 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.


Use

APL is used for many purposes including
financial Finance is the study and discipline of money, currency and capital assets. It is related to, but not synonymous with economics, the study of production, distribution, and consumption of money, assets, goods and services (the discipline of f ...
and
insurance Insurance is a means of protection from financial loss in which, in exchange for a fee, a party agrees to compensate another party in the event of a certain loss, damage, or injury. It is a form of risk management, primarily used to hedge ...
applications,
artificial intelligence Artificial intelligence (AI) is intelligence—perceiving, synthesizing, and inferring information—demonstrated by machines, as opposed to intelligence displayed by animals and humans. Example tasks in which this is done include speech ...
,
neural networks A neural network is a network or circuit of biological neurons, or, in a modern sense, an artificial neural network, composed of artificial neurons or nodes. Thus, a neural network is either a biological neural network, made up of biological ...
and
robotics Robotics is an interdisciplinary branch of computer science and engineering. Robotics involves design, construction, operation, and use of robots. The goal of robotics is to design machines that can help and assist humans. Robotics integrat ...
. It has been argued that APL is a
calculation A calculation is a deliberate mathematical process that transforms one or more inputs into one or more outputs or ''results''. The term is used in a variety of senses, from the very definite arithmetical calculation of using an algorithm, to t ...
tool and not a programming language; its symbolic nature and array capabilities have made it popular with domain experts and
data scientist Data science is an interdisciplinary field that uses scientific methods, processes, algorithms and systems to extract or extrapolate knowledge and insights from noisy, structured and unstructured data, and apply knowledge from data across a bro ...
s who do not have or require the skills of a
computer programmer A computer programmer, sometimes referred to as a software developer, a software engineer, a programmer or a coder, is a person who creates computer programs — often for larger computer software. A programmer is someone who writes/creates ...
. APL is well suited to
image manipulation Image editing encompasses the processes of altering images, whether they are digital photographs, traditional photo-chemical photographs, or illustrations. Traditional analog image editing is known as photo retouching, using tools such as ...
and
computer animation Computer animation is the process used for digitally generating animations. The more general term computer-generated imagery (CGI) encompasses both static scenes ( still images) and dynamic images ( moving images), while computer animation re ...
, where graphic transformations can be encoded as matrix multiplications. One of the first commercial computer graphics houses,
Digital Effects Digital Effects Inc. was an early and innovative computer animation studio at 321 West 44th street in New York City. It was the first computer graphics house in New York City when it opened in 1978, and operated until 1986. It was founded by Ju ...
, produced an APL graphics product named ''Visions'', which was used to create television commercials and animation for the 1982 film ''
Tron ''Tron'' (stylized as ''TRON'') is a 1982 American science fiction action- adventure film written and directed by Steven Lisberger from a story by Lisberger and Bonnie MacBird. The film stars Jeff Bridges as Kevin Flynn, a computer programmer ...
''. Latterly, th
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 A physics engine is computer software that provides an approximate simulation of certain physical systems, such as rigid body dynamics (including collision detection), soft body dynamics, and fluid dynamics, of use in the domains of computer gr ...
. Today, APL remains in use in a wide range of commercial and scientific applications, for example
investment management Investment management is the professional asset management of various securities, including shareholdings, bonds, and other assets, such as real estate, to meet specified investment goals for the benefit of investors. Investors may be instit ...
,
asset management Asset management is a systematic approach to the governance and realization of value from the things that a group or entity is responsible for, over their whole life cycles. It may apply both to tangible assets (physical objects such as buildings ...
,
health care Health care or healthcare is the improvement of health via the prevention, diagnosis, treatment, amelioration or cure of disease, illness, injury, and other physical and mental impairments in people. Health care is delivered by health pr ...
, and
DNA profiling DNA profiling (also called DNA fingerprinting) is the process of determining an individual's DNA characteristics. DNA analysis intended to identify a species, rather than an individual, is called DNA barcoding. DNA profiling is a forensic t ...
, and by hobbyists.


Notable implementations


APL\360

The first implementation of APL using recognizable APL symbols was APL\360 which ran on the
IBM System/360 The IBM System/360 (S/360) is a family of mainframe computer systems that was announced by IBM on April 7, 1964, and delivered between 1965 and 1978. It was the first family of computers designed to cover both commercial and scientific applic ...
, and was completed in November 1966 though at that time remained in use only within IBM. In 1973 its implementors, Larry Breed, Dick Lathwell and
Roger Moore Sir Roger George Moore (14 October 192723 May 2017) was an English actor. He was the third actor to portray fictional British secret agent James Bond in the Eon Productions film series, playing the character in seven feature films between 1 ...
, were awarded the
Grace Murray Hopper Award The Grace Murray Hopper Award (named for computer pioneer RADM Grace Hopper) has been awarded by the Association for Computing Machinery (ACM) since 1971. The award goes to a computer professional who makes a single, significant technical or ser ...
from the
Association for Computing Machinery The Association for Computing Machinery (ACM) is a US-based international learned society for computing. It was founded in 1947 and is the world's largest scientific and educational computing society. The ACM is a non-profit professional member ...
(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." In 1975, the
IBM 5100 The IBM 5100 Portable Computer is a portable computer (one of the first) introduced in September 1975, six years before the IBM Personal Computer, and eight before the first successful IBM compatible portable computer, the Compaq Portable. It ...
microcomputer offered APL\360 as one of two built-in ROM-based interpreted languages for the computer, complete with a keyboard and display that supported all the special symbols used in the language. Significant developments to APL\360 included CMS/APL, which made use of the virtual storage capabilities of
CMS CMS may refer to: Computing * Call management system * CMS-2 (programming language), used by the United States Navy * Code Morphing Software, a technology used by Transmeta * Collection management system for a museum collection * Color manage ...
and APLSV, which introduced shared variables, system variables and system functions. It was subsequently ported to the
IBM System/370 The IBM System/370 (S/370) is a model range of IBM mainframe computers announced on June 30, 1970, as the successors to the System/360 family. The series mostly maintains backward compatibility with the S/360, allowing an easy migration path ...
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 The IBM 1130 Computing System, introduced in 1965, was IBM's least expensive computer at that time. A binary 16-bit machine, it was marketed to price-sensitive, computing-intensive technical markets, like education and engineering, succeeding th ...
. It became the most popular
IBM Type-III Library The IBM Type-III Library (also: Type-III software, Type-III product) was software provided by IBM to its customers, available without charge, liability, or support, and typically (perhaps always) in source-code format. The best known examples are ...
software that IBM released.


APL*Plus and Sharp APL

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. The two companies were
I. P. Sharp Associates I. P. Sharp Associates (IPSA) was a major Canadian computer time-sharing, consulting and services firm of the 1970s and 1980s. IPSA is well known for its work on the programming language APL, an early packet switching computer network named IPS ...
(IPSA), an APL\360 services company formed in 1964 by Ian Sharp, Roger Moore and others, and
STSC Scientific Time Sharing Corporation (STSC) was a pioneering timesharing and consulting service company which offered APL from its datacenter in Bethesda, MD to users in the United States and Europe. History Scientific Time Sharing Corporation ( ...
, 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, PC and UNIX, whereas IPSA took a different approach to the arrival of the
personal computer A personal computer (PC) is a multi-purpose microcomputer whose size, capabilities, and price make it feasible for individual use. Personal computers are intended to be operated directly by an end user, rather than by a computer expert or te ...
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). , 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''.


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. It was implemented for Hewlett-Packard in 1977.


Dyalog APL

Dyalog APL was first released by
British British may refer to: Peoples, culture, and language * British people, nationals or natives of the United Kingdom, British Overseas Territories, and Crown Dependencies. ** Britishness, the British identity and common culture * British English, ...
company Dyalog Ltd. in 1983 and, , is available for
AIX Aix or AIX may refer to: Computing * AIX, a line of IBM computer operating systems *An Alternate Index, for a Virtual Storage Access Method Key Sequenced Data Set * Athens Internet Exchange, a European Internet exchange point Places Belgiu ...
,
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, whi ...
(including on the
Raspberry Pi Raspberry Pi () is a series of small single-board computers (SBCs) developed in the United Kingdom by the Raspberry Pi Foundation in association with Broadcom. The Raspberry Pi project originally leaned towards the promotion of teaching basic ...
),
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and la ...
and
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
platforms. It is based on APL2, with extensions to support
object-oriented programming Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
,
functional programming In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions tha ...
, and
tacit programming Tacit programming, also called point-free style, is a programming paradigm in which function definitions do not identify the arguments (or "points") on which they operate. Instead the definitions merely compose other functions, among which are c ...
. Licences are free for personal/non-commercial use. In 1995, two of the development team – John Scholes and Peter Donnelly – were awarded the Iverson Award for their work on the interpreter. Gitte Christensen and Morten Kromberg were joint recipients of the Iverson Award in 2016.


NARS2000

NARS2000 is an open-source APL interpreter written by Bob Smith, a prominent APL developer and implementor from
STSC Scientific Time Sharing Corporation (STSC) was a pioneering timesharing and consulting service company which offered APL from its datacenter in Bethesda, MD to users in the United States and Europe. History Scientific Time Sharing Corporation ( ...
in the 1970s and 1980s. NARS2000 contains advanced features and new datatypes and runs natively on
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
, and other platforms under
Wine Wine is an alcoholic drink typically made from Fermentation in winemaking, fermented grapes. Yeast in winemaking, Yeast consumes the sugar in the grapes and converts it to ethanol and carbon dioxide, releasing heat in the process. Different ...
. It is named after a development tool from the 1980s, NARS (Nested Arrays Research System).


APLX

APLX is a
cross-platform In computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several computing platforms. Some cross-platform software ...
dialect The term dialect (from Latin , , from the Ancient Greek word , 'discourse', from , 'through' and , 'I speak') can refer to either of two distinctly different types of linguistic phenomena: One usage refers to a variety of a language that is ...
of APL, based on APL2 and with several extensions, which was first released by
British British may refer to: Peoples, culture, and language * British people, nationals or natives of the United Kingdom, British Overseas Territories, and Crown Dependencies. ** Britishness, the British identity and common culture * British English, ...
company MicroAPL in 2002. Although no longer in development or on commercial sale it is now available free of charge from Dyalog.


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 Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, whi ...
(including on the Raspberry Pi), macOS, several BSD dialects, and on Windows (either using
Cygwin Cygwin ( ) is a POSIX-compatible programming and runtime environment that runs natively on Microsoft Windows. Under Cygwin, source code designed for Unix-like operating systems may be compiled with minimal modification and executed. The Cygwin in ...
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 Unicode, formally The Unicode Standard,The formal version reference is is an information technology standard for the consistent encoding, representation, and handling of text expressed in most of the world's writing systems. The standard, ...
internally and can be scripted. It was written by Jürgen Sauermann.
Richard Stallman Richard Matthew Stallman (; born March 16, 1953), also known by his initials, rms, is an American free software movement activist and programmer. He campaigns for software to be distributed in such a manner that its users have the freedom to ...
, founder of the
GNU Project The GNU Project () is a free software, mass collaboration project announced by Richard Stallman on September 27, 1983. Its goal is to give computer users freedom and control in their use of their computers and computing devices by collabor ...
, was an early adopter of APL, using it to write a text editor as a high school student in the summer of 1969.


Interpretation and compilation of APL

APL is traditionally an
interpreted language In computer science, an interpreter is a computer program that directly executes instructions written in a programming or scripting language, without requiring them previously to have been compiled into a machine language program. An interprete ...
, having language characteristics such as weak variable typing not well suited to compilation. However, with arrays as its core data structure it provides opportunities for performance gains through parallelism,
parallel computing Parallel computing is a type of computation in which many calculations or processes are carried out simultaneously. Large problems can often be divided into smaller ones, which can then be solved at the same time. There are several different f ...
,
massively parallel Massively parallel is the term for using a large number of computer processors (or separate computers) to simultaneously perform a set of coordinated computations in parallel. GPUs are massively parallel architecture with tens of thousands of th ...
applications, and
very-large-scale integration Very large-scale integration (VLSI) is the process of creating an integrated circuit (IC) by combining millions or billions of MOS transistors onto a single chip. VLSI began in the 1970s when MOS integrated circuit (Metal Oxide Semiconductor) ...
(VLSI), and from the outset APL has been regarded as a high-performance language – 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". 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 An idiom is a phrase or expression that typically presents a figurative, non-literal meaning attached to the phrase; but some phrases become figurative idioms while retaining the literal meaning of the phrase. Categorized as formulaic language ...
recognition and evaluate common idioms as single operations. 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.


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. However, in certain circumstances, it is possible to deduce in advance what type a name is expected to reference and then generate
bytecode Bytecode (also called portable code or p-code) is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references (norma ...
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 In compiler theory, common subexpression elimination (CSE) is a compiler optimization that searches for instances of identical expressions (i.e., they all evaluate to the same value), and analyzes whether it is worthwhile replacing them with a sin ...
. 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 which was released around 1971. In order to be able to compile APL, language limitations have to be imposed. APEX is a research APL compiler which was written by Robert Bernecky and is available under the GNU Public License. The
STSC Scientific Time Sharing Corporation (STSC) was a pioneering timesharing and consulting service company which offered APL from its datacenter in Bethesda, MD to users in the United States and Europe. History Scientific Time Sharing Corporation ( ...
APL Compiler is a hybrid of a bytecode optimiser and a compiler – it enables compilation of functions to
machine code In computer programming, machine code is any low-level programming language, consisting of machine language instructions, which are used to control a computer's central processing unit (CPU). Each instruction causes the CPU to perform a ve ...
provided that its sub-functions and globals are declared, but the interpreter is still used as a
runtime library In computer programming, a runtime library is a set of low-level routines used by a compiler to invoke some of the behaviors of a runtime environment, by inserting calls to the runtime library into compiled executable binary. The runtime enviro ...
and to execute functions which do not meet the compilation requirements.


Standards

APL has been standardized by the
American National Standards Institute The American National Standards Institute (ANSI ) is a private non-profit organization that oversees the development of voluntary consensus standards for products, services, processes, systems, and personnel in the United States. The orga ...
(ANSI)
working group A working group, or working party, is a group of experts working together to achieve specified goals. The groups are domain-specific and focus on discussion or activity around a specific subject area. The term can sometimes refer to an interdis ...
X3J10 and
International Organization for Standardization The International Organization for Standardization (ISO ) is an international standard development organization composed of representatives from the national standards organizations of member countries. Membership requirements are given in A ...
(ISO) and
International Electrotechnical Commission The International Electrotechnical Commission (IEC; in French: ''Commission électrotechnique internationale'') is an international standards organization that prepares and publishes international standards for all electrical, electronic and ...
(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


Further reading


''An APL Machine''
(1970 Stanford doctoral dissertation by Philip Abrams)
''A Personal History Of APL''
(1982 article by
Michael S. Montalbano Michael S. Montalbano (28 April 1918 – 13 April 1989) was a computer scientist most noted for authoring "APL Blossom Time", a poem about the early days of the APL programming language APL (named after the book ''A Programming Language'') is ...
) * *
''A Programming Language''
by
Kenneth E. Iverson Kenneth Eugene Iverson (17 December 1920 – 19 October 2004) was a Canadian computer scientist noted for the development of the programming language APL. He was honored with the Turing Award in 1979 "for his pioneering effort in programming l ...

''APL in Exposition''
by
Kenneth E. Iverson Kenneth Eugene Iverson (17 December 1920 – 19 October 2004) was a Canadian computer scientist noted for the development of the programming language APL. He was honored with the Turing Award in 1979 "for his pioneering effort in programming l ...
* Brooks, Frederick P.; Kenneth Iverson (1965). ''Automatic Data Processing, System/360 Edition''. . * * * * * * * * *


Video

* – a 1974 talk show style interview with the original developers of APL. * – a 1975 live demonstration of APL by Robert Spence (engineer), Professor Bob Spence,
Imperial College London Imperial College London (legally Imperial College of Science, Technology and Medicine) is a public research university in London, United Kingdom. Its history began with Prince Albert, consort of Queen Victoria, who developed his vision for a cu ...
. * – a 2009 tutorial by John Scholes of Dyalog Ltd. which implements
Conway's Game of Life The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970. It is a zero-player game, meaning that its evolution is determined by its initial state, requiring no furthe ...
in a single line of APL. * – a 2009 introduction to APL by Graeme Robertson.


External links


Online resources


TryAPL.org
an online APL primer *

a source of links to APL compilers {{List of International Electrotechnical Commission standards .NET programming languages APL programming language family Array programming languages Command shells Dynamic programming languages Dynamically typed programming languages Functional languages IBM software Programming languages created in 1964 Programming languages with an ISO standard Programming languages Homoiconic programming languages