APL (programming language): Difference between revisions
Jump to navigation
Jump to search
imported>InternetArchiveBot Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5 |
imported>InternetArchiveBot Rescuing 1 sources and tagging 1 as dead.) #IABot (v2.0.9.5 |
||
| Line 1: | Line 1: | ||
{{Short description|Functional programming language for arrays}} | {{Short description|Functional programming language for arrays}} | ||
{{Distinguish|Address | {{Distinguish|Address programming language}} | ||
{{Infobox programming language | {{Infobox programming language | ||
| name = APL | | name = APL | ||
| Line 6: | Line 6: | ||
| logo size = 130px | | logo size = 130px | ||
| paradigm = [[Array programming|Array]], [[Functional programming|functional]], [[Structured programming|structured]], [[Modular programming|modular]] | | paradigm = [[Array programming|Array]], [[Functional programming|functional]], [[Structured programming|structured]], [[Modular programming|modular]] | ||
| family = APL | |||
| designer = [[Kenneth E. Iverson]] | | designer = [[Kenneth E. Iverson]] | ||
| developer = [[Lawrence M. Breed|Larry Breed]], [[Richard H. Lathwell|Dick Lathwell]], [[Roger Moore (computer scientist)|Roger Moore]], others | | developer = [[Lawrence M. Breed|Larry Breed]], [[Richard H. Lathwell|Dick Lathwell]], [[Roger Moore (computer scientist)|Roger Moore]], others | ||
| Line 14: | Line 15: | ||
| platform = [[Cross-platform software|Cross-platform]] | | platform = [[Cross-platform software|Cross-platform]] | ||
| license = [[Proprietary software|Proprietary]], [[Open-source software|open source]] | | license = [[Proprietary software|Proprietary]], [[Open-source software|open source]] | ||
| website = {{ | | website = {{URL|https://aplwiki.com/}} | ||
| implementations = {{startflatlist}} | | implementations = {{startflatlist}} | ||
* APL\360 | * APL\360 | ||
| Line 47: | Line 48: | ||
{{Contains special characters|APL}} | {{Contains special characters|APL}} | ||
'''APL''' (named after the book ''A Programming Language'')<ref name="aplbook">{{Cite Q| | '''APL''' (named after the book ''A Programming Language'')<ref name="aplbook">{{Cite Q|Q133329895|url=https://softwarepreservation.computerhistory.org/apl/book/APROGRAMMINGLANGUAGE.pdf|access-date=2023-08-06}}</ref> is a [[programming language]] developed in the 1960s by [[Kenneth E. Iverson]]. Its central datatype is the [[Array data type#Multi-dimensional arrays|multidimensional array]]. It uses a large range of [[APL syntax and symbols|special graphic symbols]]<ref>{{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|url-access=subscription }}</ref> to represent most functions and operators, leading to very concise code. It has been an important influence on the development of concept modeling, [[spreadsheet]]s, [[functional programming]],<ref>{{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}}</ref> and computer math packages.<ref name="mworks"/> It has also inspired several other programming languages.<ref name="jinsp"/><ref name="kinsp"/> | ||
== History == | == History == | ||
| Line 57: | Line 58: | ||
This notation was used inside IBM for short research reports on computer systems, such as the [[Burroughs B5000]] and its stack mechanism when [[stack machine]]s versus [[register machine]]s were being evaluated by IBM for upcoming computers. | This notation was used inside IBM for short research reports on computer systems, such as the [[Burroughs B5000]] and its stack mechanism when [[stack machine]]s versus [[register machine]]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]], ''Automatic Data Processing'', which would be published in 1963.<ref>Iverson, Kenneth E., [ | 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.<ref>Iverson, Kenneth E., [https://softwarepreservation.computerhistory.org/apl/book/Iverson-AutomaticDataProcessing-bilevel.pdf "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''.</ref><ref>[[Fred Brooks|Brooks, Fred]]; Iverson, Kenneth, (1963), ''Automatic Data Processing'', John Wiley & Sons Inc.</ref> | ||
In 1979, Iverson received the [[Turing Award]] for his work on APL.<ref>{{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}}</ref> | In 1979, Iverson received the [[Turing Award]] for his work on APL.<ref>{{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}}</ref> | ||
| Line 77: | Line 78: | ||
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). | 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). | ||
The Tektronix 4013 Computer Display Terminal is a [[Tektronix 4010]] with both the APL and ASCII character sets. <ref>{{cite book |author=<!-- not stated --> |date= |title=Tektronix Products 1973 |url=https://bitsavers.org/pdf/tektronix/catalog/Tektronix_Catalog_1973.pdf |location= |publisher= |page=276 |isbn= |access-date=18 March 2026}}</ref> There is a rocker switch above the keys to select the character set. | |||
<ref>{{cite book |author=<!-- not stated --> |date= |title=Tektronix 4013 Computer Display Terminal |url=https://bitsavers.org/pdf/tektronix/401x/070-1476-00_4013_Users_Manual_197302.pdf |location= |publisher= |page=3-5 |isbn= |access-date=18 March 2026}}</ref> | |||
=== Commercial availability === | === Commercial availability === | ||
| Line 89: | Line 93: | ||
In 1973, IBM released ''APL.SV'', which was a continuation of the same product, but which offered [[shared variable]]s 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'' [[Software as a Product|program product]] enjoyed wide use with [[Conversational Monitor System]] (CMS), [[Time Sharing Option]] (TSO), [[VSPC]], [[MUSIC/SP]], and [[CICS]] users. | In 1973, IBM released ''APL.SV'', which was a continuation of the same product, but which offered [[shared variable]]s 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'' [[Software as a Product|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.<ref>{{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}}</ref> | 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.<ref>{{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}}</ref> In 1974, student Alan Stebbens was assigned the task of implementing an internal function.<ref>{{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}}</ref> Xerox APL was available from June 1975 for Xerox 560 and Sigma 6, 7, and 9 mainframes running [[Universal Time-Sharing System#CP-V|CP-V]] and for [[Honeywell CP-6]].<ref>{{cite web |title=Xerox APL Language and Operations Reference Manual |url=https://softwarepreservation.computerhistory.org/apl/book/197506_Xerox%20APL%20Language%20and%20Operations%20Reference%20Manual_90131C.pdf |archive-url=https://ghostarchive.org/archive/20221009id_/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}}</ref> | ||
In the 1960s and 1970s, several timesharing firms arose that sold APL services using modified versions of the IBM APL\360<ref name="apl360"/> 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. | In the 1960s and 1970s, several timesharing firms arose that sold APL services using modified versions of the IBM APL\360<ref name="apl360"/> 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. | ||
| Line 100: | Line 104: | ||
=== Microcomputers === | === Microcomputers === | ||
On microcomputers, which became available from the mid-1970s onwards, [[BASIC]] became the dominant programming language.<ref>{{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 (magazine)|Time]] |access-date=April 29, 2018}}</ref> Nevertheless, some microcomputers provided APL instead – the first being the [[Intel 8008]]-based [[MCM/70]] which was released in 1974<ref>{{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}}</ref><ref>{{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}}</ref> and which was primarily used in education.<ref>{{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}}</ref> Another machine of this time was the [[VideoBrain Family Computer]], released in 1977, which was supplied with its dialect of APL called APL/S.<ref>[https://books.google.com/books?id=OQEAAAAAMBAJ&q=videobrain+family+computer+apl%2Fs&pg=PA133/s "VideoBrain Family Computer"], ''[[Popular Science]]'', November 1978, advertisement.</ref> | On microcomputers, which became available from the mid-1970s onwards, [[BASIC]] became the dominant programming language.<ref>{{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 (magazine)|Time]]|access-date=April 29, 2018|archive-date=June 2, 2023|archive-url=https://web.archive.org/web/20230602191924/https://time.com/69316/basic/|url-status=dead}}</ref> Nevertheless, some microcomputers provided APL instead – the first being the [[Intel 8008]]-based [[MCM/70]] which was released in 1974<ref>{{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}}</ref><ref>{{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}}</ref> and which was primarily used in education.<ref>{{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}}</ref> Another machine of this time was the [[VideoBrain Family Computer]], released in 1977, which was supplied with its dialect of APL called APL/S.<ref>[https://books.google.com/books?id=OQEAAAAAMBAJ&q=videobrain+family+computer+apl%2Fs&pg=PA133/s "VideoBrain Family Computer"], ''[[Popular Science]]'', November 1978, advertisement.</ref> | ||
The [[Commodore SuperPET]], introduced in 1981, included an APL interpreter developed by the [[University of Waterloo]].<ref>{{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}}</ref> | The [[Commodore SuperPET]], introduced in 1981, included an APL interpreter developed by the [[University of Waterloo]].<ref>{{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}}</ref> | ||
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]].<ref>{{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}}</ref> It was never released. | 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]].<ref>{{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 |archive-date=December 22, 2019 |archive-url=https://web.archive.org/web/20191222130716/http://www.digibarn.com/collections/newsletters/homebrew/V2_01/index.html |url-status=dead }}</ref> It was never released. | ||
=== APL2 === | === APL2 === | ||
| Line 238: | Line 242: | ||
==== Simple statistics ==== | ==== Simple statistics ==== | ||
Suppose that {{code|X}} is an array of numbers. Then {{code|(+/X)÷⍴X}} gives its | Suppose that {{code|X}} is an array of numbers. Then {{code|(+/X)÷⍴X}} gives its mean. 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}} | 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}} | ||
| Line 339: | Line 343: | ||
{{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. | {{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. | ||
<p>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.</p>|author=[[Eugene McDonnell]]|source=<ref>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. ([ | <p>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.</p>|author=[[Eugene McDonnell]]|source=<ref>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. ([https://softwarepreservation.computerhistory.org/apl/paper/ASourceBookInAPL.pdf full book scan])</ref>}} | ||
''APL'' is occasionally re-interpreted as ''Array Programming Language'' or ''Array Processing Language'',<ref>Acharya, R; Pereira, (904567457) | ''APL'' is occasionally re-interpreted as ''Array Programming Language'' or ''Array Processing Language'',<ref>Acharya, R; Pereira, (904567457) | ||
| Line 355: | Line 359: | ||
and [[robotics]].<ref>{{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}}</ref> It has been argued that APL is a [[calculation]] tool and not a programming language;<ref>{{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}}</ref> its symbolic nature and array capabilities have made it popular with [[domain expert]]s and [[data scientist]]s<ref name="Hsu">{{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}}</ref> who do not have or require the skills of a [[computer programmer]].{{citation needed|date=May 2022}} | and [[robotics]].<ref>{{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}}</ref> It has been argued that APL is a [[calculation]] tool and not a programming language;<ref>{{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}}</ref> its symbolic nature and array capabilities have made it popular with [[domain expert]]s and [[data scientist]]s<ref name="Hsu">{{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}}</ref> 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 (studio)|Digital Effects]], produced an APL graphics product named ''Visions'', which was used to create television commercials and animation for the 1982 film ''[[Tron]]''.<ref>{{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}}</ref> Latterly, the [https://stormwind.fi/en/ Stormwind] [[Simulation video game|boating simulator]] uses APL to implement its core logic, its interfacing to the rendering pipeline middleware and a major part of its [[physics engine]].<ref>{{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.}}</ref> | 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 (studio)|Digital Effects]], produced an APL graphics product named ''Visions'', which was used to create television commercials and animation for the 1982 film ''[[Tron]]''.<ref>{{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}}</ref> Latterly, the [https://stormwind.fi/en/ Stormwind] [[Simulation video game|boating simulator]] uses APL to implement its core logic, its interfacing to the rendering pipeline middleware and a major part of its [[physics engine]].<ref>{{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. }}{{Dead link|date=May 2026 |bot=InternetArchiveBot }}</ref> | ||
Today, APL remains in use in a wide range of commercial and scientific applications, for example | Today, APL remains in use in a wide range of commercial and scientific applications, for example | ||
| Line 403: | Line 407: | ||
=== York APL === | === York APL === | ||
York APL<ref name="YorkAPL">{{cite web |url=https:// | York APL<ref name="YorkAPL">{{cite web |url=https://softwarepreservation.computerhistory.org/apl/book/YorkAPL.pdf |title=York APL}}</ref> 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 === | ||
| Line 411: | Line 415: | ||
== Interpretation and compilation of APL == | == Interpretation and compilation of APL == | ||
APL is traditionally an [[interpreted language]], having language characteristics such as [[Strong and weak typing|weak variable typing]] not well suited to [[compiler|compilation]].<ref>{{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}}</ref> However, with arrays as its core data structure<ref>{{cite web |title=What is APL? |website=www.sigapl.org |publisher=SIGAPL |url=http://www.sigapl.org/about.php |access-date=January 20, 2015}}</ref> it provides opportunities for performance gains through [[Data parallelism|parallelism]],<ref>{{cite book |last1=Ju |first1=Dz-Ching |last2=Ching |first2=Wai-Mee |title=Proceedings of the third ACM SIGPLAN symposium on Principles and practice of parallel programming |chapter=Exploitation of APL data parallelism on a shared-memory MIMD machine |date=1991 |volume=26 | APL is traditionally an [[interpreted language]], having language characteristics such as [[Strong and weak typing|weak variable typing]] not well suited to [[compiler|compilation]].<ref>{{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}}</ref> However, with arrays as its core data structure<ref>{{cite web |title=What is APL? |website=www.sigapl.org |publisher=SIGAPL |url=http://www.sigapl.org/about.php |access-date=January 20, 2015}}</ref> it provides opportunities for performance gains through [[Data parallelism|parallelism]],<ref>{{cite book |last1=Ju |first1=Dz-Ching |last2=Ching |first2=Wai-Mee |title=Proceedings of the third ACM SIGPLAN symposium on Principles and practice of parallel programming |chapter=Exploitation of APL data parallelism on a shared-memory MIMD machine |date=1991 |volume=26 |pages=61–72 |doi=10.1145/109625.109633 |isbn=0-89791-390-6 |s2cid=8584353}}</ref> [[parallel computing]],<ref>{{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}}</ref><ref>{{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|url-access=subscription }}</ref> [[Massively parallel (computing)|massively parallel]] applications,<ref>{{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}}</ref><ref>{{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}}</ref> and [[very-large-scale integration]] (VLSI),<ref>{{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 |pages=77–79 |doi=10.1145/800058.801079 |isbn=0-89791-137-7 |quote=APL for interactiveness and ease of coding |s2cid=30863491}}<br/>{{*}}{{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}}</ref><ref>{{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}}</ref> and from the outset APL has been regarded as a high-performance language<ref>{{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}}</ref> – 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".<ref>{{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}}</ref> | ||
Nevertheless, APL is rarely purely interpreted and compilation or partial compilation techniques that are, or have been, used include the following: | Nevertheless, APL is rarely purely interpreted and compilation or partial compilation techniques that are, or have been, used include the following: | ||
| Line 445: | Line 449: | ||
* {{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/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}} | * {{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:// | * [https://softwarepreservation.computerhistory.org/apl/book/APROGRAMMINGLANGUAGE.pdf ''A Programming Language''] by [[Kenneth E. Iverson]] | ||
* [https:// | * [https://softwarepreservation.computerhistory.org/apl/paper/197201_APL%20In%20Exposition_320-3010.pdf ''APL in Exposition''] by [[Kenneth E. Iverson]] | ||
* Brooks, Frederick P.; Kenneth Iverson (1965). ''Automatic Data Processing, System/360 Edition''. {{ISBN|0-471-10605-4}}. | * 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 book |last1=Askoolum |first1=Ajay |title=System Building with APL + Win |date= August 2006 |publisher=Wiley |isbn=978-0-470-03020-2}} | ||
| Line 459: | Line 463: | ||
=== Video === | === Video === | ||
* {{YouTube|id=8kUQWuK1L4w|title=The Origins of APL}} – a 1974 talk show style interview with | * {{YouTube|id=8kUQWuK1L4w|title=The Origins of APL}} – a 1974 talk show style interview with APL's original developers | ||
* {{YouTube|id=_DTpQ4Kk2wA|title=APL demonstration}} – a 1975 live demonstration of APL by [[Robert Spence (engineer)|Professor Bob Spence]], [[Imperial College London]] | * {{YouTube|id=_DTpQ4Kk2wA|title=APL demonstration}} – a 1975 live demonstration of APL by [[Robert Spence (engineer)|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. | * {{YouTube|id=a9xAKttWgP4|title=Conway's Game Of Life in APL}} – a 2009 tutorial by John Scholes of Dyalog Ltd., implementing [[Conway's Game of Life]] in one line of APL | ||
* {{YouTube|id=ra_JyBCI4Xg|title=50 Years of APL}} – a 2009 introduction to APL by Graeme Robertson | * {{YouTube|id=ra_JyBCI4Xg|title=50 Years of APL}} – a 2009 introduction to APL by Graeme Robertson | ||
== External links == | == External links == | ||