Home >> Computers >> Programming >> Languages >> APL


  Books
Conferences
Consultants
  Interest
Personal Pages
Publications
  Resellers
User Groups
Vendors


APL (for The Programing language, or even sometimes Array Processing Language) is an array programming language based on the notation invented inside 1957 by Kenneth E. Iverson while at Harvard University. It originated within an attempt to provide uniform notation for the teaching & analysis of topics related to the application of computers. A notation was late wont to describe a IBM System/360 machine architecture, a description tremendously supplementary concise & accurate than a existent documentation & telltale many antecedently unnoticed problems. So, the Selectric typeball was made to write the linear representation of this notation. Within 1964 the subset of the notation was implemented as a programing language.

Dr. Iverson published his notation around 1962 in a book titled The Programing language & APL had its title from either a title of this book. Iverson received a Turing Award in 1979 for his work. When by owning completely programing language that will have many decades of family medicine have, APL has changed significantly from either a notation described by Iverson within his book. A single tool that has remained constant is that APL is interpretive and interactive, features much appreciated by its users. On the other hand, its initial deficiency of trend lines for two structured and modular programming has been solved by all the modern APL incarnations. 1 very much criticized aspect however remains, though: the utilize of a favorite character placed (look at Character set below.) These characters have entirely been incorporated into Unicode, which is currently a base character placed of many APL products. There exists as well the pure ASCII reworking of APL known as J, with greatly increased expressive power.

Overview
Assibilate the super wide placed of condition domains (mathematics, science, engineering, computer project, robotics, information visual image, actuarial science, traditional DP, etc.) APL is an extremely mighty, expressive & concise programing language, generally placed inside an interactional environment. It was originally created as a way to describe computers, by expressing mathematical notation in the rigorous way that can be interpreted by a computer. These are real life to see however APL software online could choose a bit of period to realize. Unlike traditional integrated programing language, code inside APL is occasionally structured when chains of monadic or dyadic functions and operators acting on arrays. Because APL has therefore numerous nonstandard primitives (functions, operators, or even even even features built into the language & indicated by one symbol or a combination of two or three symbols), APL doesn't own work or operator precedence. A original APL did non own control structures (loops, if-so-else), however a array operations it involved may simulate structured programming constructs. For instance, a iota work (which yields aNorth array from either Ace to N) might simulate for-loop iteration. Additional recent implementations of APL usually include expressed control structures, & so that information structure and control-flow structure may be further clearly separated.

the APL environment is known as a workspace. Within a workspace the user might define software & information, i personally.e. the information values survive besides outside a software download, & a user might manipulate a information forswearing a necessity to define a program, e.g.:

Assign a vector values 4 Five 6 7 to North.

Add Four to tons values (generating 8 9 10 11) & Print the two (absence of the assignment arrow means "show")

Print a total of North, we.e. 22

A user may save a workspace by having a lot values, software online & execution status. In any pack, a computer softwcome are commonly non compiled but interpreted. The commercial compiler was bring around market by STSC (okay, Manugistics).

APL is easily-known for its utilise of the placed of non-ASCII symbols that are an extension of traditional arithmetic & algebraical notation. These cryptic symbols, a few use joked, produce it conceivable to construct an entire air traffic control system in both lines of code. Indeed, withwitharound occasionally versions of APL, these are theoretically conceivable to express any estimable work in of these expression, that is in 1 line of code. That you might utilise the more line for even I/O, or constructing a GUI. Because of its condensed nature and non-standard characters, APL has occasionally been termed the "write-only language", and reading an APL program potty ab initio sense rather decoding an alien tongue. Because of the unusual character set, many software engineer utilized favorite APL keyboards in the production of APL code. Today there are various ways to write APL code applying exclusively ASCII characters. Indeed virtually altogether whenever does'nt all modern implementations utilise the standard keyboard, displaying APL symbols by have of a particular font.

Advocates of APL claim that a examples of "write-only" code come just about invariably examples of unfortunate programming practice or even novice mistakes, which might occur in any language. APL has peradventure got an outstandingly high percentage of users world health organization come subject-matter experts world health organization understand the few APL, like than broker software engineer world health organization understand something all about a subject.

Iverson designed the successor to APL known as J which utilizes ASCII "natively". And then far there exists just one source of J implementations: http://www.jsoftware.com/ More programing language offer functionality similar to APL. [http://www.aplusdev.org/ A+] is an open source programming language with numbers of commands monovular to APL.

Examples
On this button's how else professional people would write the program that would sort a word list stored inside matrix X based on data from word length:

X[�X+.≠' ';]

On this text's the program that finds totally prime numbers from Unity to R:

On this text's training understand it, from either correct to left:

  • \iota\,\! creates the vector containing integers from Ace to R (whenever R = Sextet at a beginning of the program, \iota R\,\! is One Two Three Four Five 6)
  • Drop number 1 element of this vector (\downarrow work), we.e. One. Thus I \downarrow \iota R is Two Three Four Five 6
  • Set R to the vector (\leftarrow, assignment primitive)
  • Generate outer product of R multiplied by R, i personally.e. the matrix which is the multiplication table of R by R (\circ . \timeswork)
  • Build a vector a equivalent length when R by having Ace around every place inside which the corresponding total in R is in the outer product matrix (\in, placed inclusion work), i personally.e. 0 0 One 0 1
  • Logically negate a values in the vector (vary zeros to ones & ones to zeros) (\sim, negation work), we.e. One One 0 One 0
  • Select a things around R for which a corresponding element is Single (/\,\! work), we.e. Two Three 5

    Calculation
    APL was unique in the apparent speed using which it can perform complex matrix operations. E.g., the super big matrix multiplicatiin would come out to choose sole two or three seconds on the machine which was good deal less mighty than people in todays world. There were occasionally technical indicator & more economic reasons for this benefit: Commercial interpreters delivered extremely-tuned linear algebra library routines. Suby the on line interpretative overhead was found per-array—non by the-element. APL response period equated favourably to the runtimes of early optimizing compilers.

    A widely cited paper "The APL Machine" perpetuated a myth that APL mass produced permeant utilize of lazy evaluation where calculations would not actually exist as performed until a effects were needful and so single people calculations strictly called upon. Although this system was utilized by simply two or three implementations, it is a language's better survival mechanism: non specifying a choose of scalar operations. Just when in time standardized by X3J10, APL is therefore extremely information-parallel, it gives language implementers huge freedom to schedule operations when expeditiously as conceivable. When computer innovations like cache memory, and SIMD execution became commercially available, APL programs ported by using little additional effort spent re-optimizing sale level details.

    Terminology
    APL makes the clear distinction between functions & operators. Functions require values (variables or even even constants or expressions) when arguments, & go to values when resolutions. Operators choose functions when arguments, & go to related, derived, functions when effects. E.g. a "sum" work is derived by using a "reduction" operator to the "addition" work. Using a equivalent reduction operator to the "ceiling" work (which comes back the larger of 2 values) creates a derived "maximum" work, which comes back the largest of a class action (vector) of values. In a J language, Iverson substituted the terms 'verb' & 'adverb' for 'work' & 'operator'.

    APL too identifies victims features built into the language, & represented by the symbol, or even a fixed combination of symbols, when primitives. Virtually all primitives come either functions or even operators. Coding APL is largely the run of writing non-primitive functions & (around a bit of accent of APL) operators. Yet two or three primitives come considered to exist as neither functions nor operators, virtually all observably assignment.

    Character set
    APL has universally been criticized for its guide of the unique, non-standard character placed. A fact that victims world health organization study it normally turn into ardent disciple shows that there exists a few weight behind Iverson's idethe that a notation utilized does produce a difference. In a beginning, there were couple terminal gear which may reproduce a APL character placed — a virtually all popular ones using the IBM Selectric print mechanism along with the custom-made nature and severity element. By owning a popularization of the Unicode standard, which contains an APL character set, a eternal condition of obtaining a needed particular fonts seems poised to last away.

    APL symbols and keyboard layout

    APL keyboard with special characters

    Note the mnemonics associating an APL character by having a letter: wonder mark on Q, power in P, rho in R, base value in B, eNcode in North, modulus in 1000 so in. This makes it gentler for an English-language speaker to nature and severity APL in the non-APL keyboard providing of these has ocular feedback on your screen.

    Whole APL symbols come present inside Unicode:
    It can be compulsory to significantly reconfigure the web browser sequentially to display Unicode fonts.

    Look at as well IBM 3270 Keyboard layout for APL[http://publib.boulder.ibm.com/infocenter/pcomhelp/topic/com.ibm.pcomm.doc/kbd_reference05.htm#FIGTYPE1]

    Usage
    APL has yearn got the microscopic however fervent user base. It has been particularly popular around fiscal & insurance applications, around simulations, & inside a few mathematical applications. However APL has been utilized around the wide kind of contexts & for several & varied purposes.

    Standardization
    APL has been standardized per ANSI working group X3J10 and ISO/IEC Joint Technical Committee Single Subcommittee Twenty-two Working Class action Three. A Core APL language is specified witharound ISO 8485:1989, & a Extended APL language is specified in ISO/IEC 13751:2001. Quotes
    "APL, in which you can write a program to simulate shuffling a deck of cards and then dealing them out to several players in four characters, none of which appear on a standard keyboard." David Given "APL is a mistake, carried through to perfection. It is the language of the future for the programming techniques of the past: it creates a new generation of coding bums." Edsger Dijkstra, 1968 "By the time the practical people found out what had happened; APL was so important a part of how IBM ran its business that it could not possibly be uprooted." Micheal S. Montalbano 1982 (see [http://ed-thelen.org/comp-hist/APL-hist.html A Personal History of APL])

    Awards
    There exists an annual award for contributions to APL, a Iverson Award named after a language's developer.

  • Hello, World Program
    Several variants written in APL.

    TechEncyclopedia
    Many computing related definitions here

    Why APL?
    Anonymous essay from 1983 published by ACM SIGAPL, which explains the strengths of the APL approach to algorithm design.


    Computers: Parallel Computing: Programming: Languages
    Computers: Programming: Languages: Functional
    Computers: Programming: Languages: Garbage Collected: Procedural
    Computers: Programming: Languages: Interpreted: Procedural
    Computers: Programming: Languages: Multiparadigm
    Computers: Programming: Languages: Procedural




    © 2005 GeneralAnswers.org