davidliebtag.com

What is APL?

APL is a computer progamming language.

APL can be used interactively, like a calculator. You can type an expression, press enter, and see the result. For example, if you type 3+4 and press enter, you will see 7. Here's what that would look like in an APL environment:

      3+4
7

Unlike most calculators, APL lets you work with arrays of data:

      3+4 8 12
7 11 15

      7 11 15-2 4 6
5 7 9

In addition to addition and subtraction, APL supports many other mathematical functions.

      2×1 2 3 4 5
2 4 6 8 10

      2 4 6 8 10÷2
1 2 3 4 5

Notice that those expressions used the familiar multiplication and divide characters. APL uses many characters that you may be accustomed to writing but not typing. In addition, APL also uses some special characters. For example, here is how you name an array:

      List←3 6 9 12 15 18

To see the value of a name, just enter it:

      List
3 6 9 12 15 18

APL supports higher dimensional arrays. Here is how you arrange the elements of List into a matrix with 2 rows and 3 columns:

      Matrix←2 3⍴List
      Matrix
 3  6  9
12 15 18

APL was designed to make it easy to work with arrays. It automatically handles a lot of the loop processing required by most languages. This makes it very concise. For example, here is how you would add the columns of Matrix:

      Sum←+⌿Matrix
      Sum
15 21 27

That expression would work exactly the same way even if Matrix had millions of rows and columns.

Since APL is so concise, many people use APL to interactively explore data. You can often learn a lot about your data quite quickly if you can analyze it and look for trends without spending days or weeks writing and debugging programs.

On the other hand, APL can be used to write programs too. Indeed, people can often write programs in APL much more quickly than in other languages. They say that because APL is so concise, and handles so many of the mundane and tedious tasks usually associated with programming, they can focus more on their problem and spend less time programming.

This is a very brief introduction to APL. Suffice it to say, APL is used to great advantage in many industries including insurance, finance, and engineering. If you'd like to learn more, I suggest you consult the APL Wiki which contains lots of information about APL and links to many other resources. The wiki can be found at:

http://aplwiki.com

If you'd like to chat with other people who use APL (called APLers), I suggest you introduce yourself on the comp.lang.apl news group. This group is available on Google groups at

http://groups.google.com/group/comp.lang.apl

For your entertainment, here are some characters that have special meanings in APL:

<=>≥≤≠∨^⍱⍲~+-×÷|?!*¯⌈⌊
⎕⍞⌹⌷ →←↓↑ ○⌽⊖⍉⍟ ∆∇⍒⍋⍫⍙
⍴⍳⊂⊃⍝≡∊⍷⍕⍎⊤⊥ /\⌿⍀∘¨ ;:.,'()[]⋄

Note: The site uses the @font-face style rule to specify that the APL385 Unicode font should be used to display APL characters. If your browser is configured to block the @font-face rule, you may not see APL characters.