A Beginner’s Guide to Low Cost APLs
Vector 9:4, page 29
Transcribed from the printed issue; not yet reviewed. Read it in the PDF of the issue, page 29
This article is a beginner’s guide to low-cost APL interpreters, compiled by the APLSIG of the Capital PC User Group (CPCUG). Comparisons emphasize work and business applications — because it’s the workplace that generates demand for technological innovation, and pays for it. I emphasize free or low cost APLs, because these are likely entry points for exactly the kind of people who are most badly needed by the APL community — namely newcomers.
It’s an "apples and oranges" comparison because the various APLs are themselves "apples and oranges". It may contain errors of fact, as well as opinions that are wrongly informed. Corrections are invited. [I will be pleased to receive, pass on and publish any comments/corrections — Ed.]
A central theme of this article is that APLs vary widely in size, speed, performance, and price. An advantage of this heterogeneity is that APL offers "something for everyone". A disadvantage is that there is little compatibility among versions. In any event, at least two free or low cost APLs — with big workspaces, good speed, and many useful features — should now be increasingly attractive to people who have never used APL before.
To begin, here are a few speed and size comparisons, referenced to the free demo of APL*PLUS v10.1, a widely used commercial APL:
Table 1: Size, and Relative Speed: For five simple benchmark tests (B1-B5).
| Interpreter | B1 | B2 | B3 | B4 | B5 | ⎕WA * CLEAR WS |
|---|---|---|---|---|---|---|
| APL*PLUS demo | >1.00 | >1.00 | 1.00 | 1.00 | 1.00 | 0 |
| APLI386 | 1.13 | 2.11 | >0.24 | 0.97 | >0.03 | 1044k |
| APLIPC | 1.11 | 2.36 | 0.50 | 1.25 | 0.12 | 262k |
| APLISW | 1.39 | 2.36 | 0.50 | 1.25 | 0.12 | 312k |
| TryAPL2 | 4.52 | 2.48 | 4.17 | >0.36 | >0.03 | 233k |
| Sharp APL/PC | 1.46 | 2.41 | 0.67 | 1.40 | 0.15 | 195k |
| I-APL | 20.78 | 30.95 | 26.50 | 10.22 | 79.40 | 31k |
All benchmarks times are normalized to APL*PLUS demo = 1.00
Benchmark B1: Q*9; where Q is (2.5+⍳1800): 1800 exponentiations.
Benchmark B2: (⍳3000)÷44.3: 3000 floating point divisions.
Benchmark B3: +/⍳15000: 15000 integer additions.
Benchmark B4: 20!40, looped 1000 times (no, looping doesn't
cost all that much time).
Benchmark B5: length 10,000 boolean vectors, and-ed and or-ed
10 times (100,000 boolean operations).
* Defaults for my machine: ⎕WA for APLI386 is as large as RAM permits, and may be increased further by a user-transparent virtual (on-disk) workspace. ⎕WA for APL*PLUS demo is zero, since the )CLEAR WS is, by design, inaccessible. ⎕WA for others is configuration dependent, except for I-APL, which is limited to 31.6k on DOS machines (less if cover functions are used for graphics, files, help, etc.).
Benchmarks are designed to avoid WS FULL in I-APL, and to run in a few minutes or less on my machine. Times are normalized to APL*PLUS, and are independent of disk speed.
Observations¶
Speed and size vary enormously. APLI386 has a ⎕WA 30 times larger than I-APL (on my machine), and does integer addition 17 times faster than TryAPL2. For exponentiation, TryAPL2 is 3-4 times slower than all except I-APL. All Iverson software is 2-4 times faster than APL*PLUS for +/⍳15000. APLI386 is more than 100 times faster than I-APL for +/⍳15000.
For dyadic shriek (!), TryAPL2 is 3 times faster than both APL*PLUS and APLI386, and 29 times faster than I-APL. Although not commonly used, dyadic ! is purposely chosen to highlight speed variations. Non-integer arguments for ! weren’t tested.
For boolean operations — a putative strong point of APL — APLI386 and TryAPL2 are 30 times faster than APL*PLUS, and more than 2500 times faster than I-APL. Both APLI386 and TryAPL do boolean operations so fast that I had to run them 10E7 times to find out which was faster. TryAPL2 seems to be about half of one percent faster than APLI386.
These speed tests aren’t directly comparable: Iverson APLI386 uses the 32-bit instruction set of the 386 chip — none of the others do. Benchmarks can be notoriously misleading, and your times may be different. Run your own tests.
Blitzing speed and big workspaces are important, but they’re not the only things to consider. Effective use of APL also depends on features like a full-screen editor, vendor support, useful application development tools, good documentation, and smooth upgrade paths.
Hardware is also a factor. Only APLI386 requires a 386 machine. All others work on a 386 and on lesser machines. Among free or low-cost interpreters, only TryAPL2 requires a colour monitor (EGA or better), but Iverson’s APL characters are inaccurate on a monochrome monitor.
Can I do "real work" in any of these low-cost APLs?
| APL*PLUS demo | No | — User-defined functions/system commands inaccessible |
| TryAPL2 | Yes | — But with del editor, no DOS or APL files |
| APLI386 | Yes | — 386 required, also does Windows |
| APLIPC | Yes | — 386 not required |
| Sharp APL/PC | Yes | — Limited: poor documentation, not easily available |
| APLISW | ? | — Limited: no DOS files, no APs |
| I-APL | ? | — 31k WS, slow, no error trapping |
To be fair, the APL*PLUS demo and I-APL aren’t designed to do real work. They’re designed to showcase product features or to teach APL. Within varying limits, real work is feasible with all other APLs.
Table 2 Upgrade Path and Prices ($US)
| Interpreter | Type | Disk Price | Documentation Price *** | $ Full Product | $ 386 Version |
|---|---|---|---|---|---|
| APL*PLUS demo | flat | free* | free/on screen | $695 | $1700 |
| TryAPL2 | nested | free* | free LJ print | $500 | Included |
| APLI386 | boxed | $30 | $30 2 books | Is full product | |
| APLIPC | boxed | $30 | $30 2 books | APLI386 | APLI386 |
| APLISW | boxed | free | some on screen | APLIPC | APLI386 |
| Sharp APL/PC | boxed | free | unavailable? | APLIPC | APLI386 |
| I-APL | flat | free | $25 | Any of the above |
* Free from original source (see "Sources" below), and downloadable free from the BBS\APL. Request to download may be needed. Some suppliers may charge a nominal fee.
** Disks, but not documentation, may be downloaded free from the BBS\APL, and may also be available elsewhere.
*** Documentation for Sharp APL/PC may be hard to get and is hard to use. Iverson documentation is an imperfect hybrid of Sharp APL/PC (orphaned v17) material, mainframe material, and new on-screen Iverson material.
Prices may be discounted: street price, volume, educational, dealers, etc. Ask. See "Sources" below.
IBM (TryAPL2 and APL2/PC), Iverson (and Sharp), and APL*PLUS II (386 version) all provide "nested" or "boxed" arrays — all in incompatible ways. Also, many "flat" features aren’t compatible among various APLs, and APL*PLUS isn’t fully compatible with APL*PLUS II.
Because of numerous and deep incompatibilities, switching from one APL to another can be an obstacle to upgrading.
Keyboard and Other Incompatibilities¶
Keyboards for IBM and APL*PLUS are similar. They’re the traditional APL keyboards. Iverson keyboards are slightly different, but resemble the APL*PLUS "unified" keyboard as used in the APL*PLUS demo. Many Iverson APL keys are in the "traditional" place, differing mainly in the use of lower case, and in the use of <ALT> rather than <SHIFT> to get special APL characters. Most Sharp keys are in the same place as Iverson keys. Users of these APLs can probably switch from one to another without too much difficulty, at least as far as the keyboard is concerned. Non-keyboard incompatibilities — mainly in quad functions and shared variables — are also difficult. TryAPL2, APL*PLUS demo, Iverson Software, and CPCUG APL lessons all have on-screen keyboard diagrams and on-screen help.
Because I-APL attempts to adhere to ASCII, its keyboard is almost completely unrelated to any other APL keyboard. Does this mean that the I-APL keyboard is "bad"? No. It’s simply that switching from I-APL to any other more powerful APL is harder than switching among these other APLs. From a beginner’s perspective, all APL keyboards are "bad". In its 1991 APL classes, the CPCUG found the APL keyboard to be the greatest single obstacle to learning APL. Students who begin with I-APL must learn a new APL keyboard if they want to upgrade to a more powerful APL.
Editors¶
A full-screen editor is essential for modern programming, in APL or in any other language. Among commercial products, APL*PLUS and APL*PLUS II have a superior built-in assembly language editor. Iverson products have a full-screen editor function that may be copied into your WS. IBM’s APL2/PC also has an editor function that may be copied into your WS, or you may also use something like IBM’s "Personal Editor" for APL2/PC. TryAPL2, Sharp APL/PC, APLISW, and I-APL have only the obsolete "del" editor. The del editor is a line editor like DOS’s EDLIN, lacking only most of its convenience.
Full-Screen Management
| APL*PLUS v10 | — Yes, excellent, versatile, strong |
| APL*PLUS demo | — No, screen management is user-inaccessible |
| TryAPL2 | — Yes, uses shared variables |
| IBM APL2/PC | — Yes, uses shared variables |
| APLI386 | — Yes, uses shared variables |
| APLIPC | — Yes, same as APLI386 above |
| Sharp APL/PC | — Yes, difficult |
| I-APL | — Yes, has FSCREEN.IWS with GET and PUT cover functions |
| APLISW | — No |
| Files | DOS Files | APL Component files |
|---|---|---|
| APL*PLUS demo | No | No, quad functions inaccessible |
| APL*PLUS | Yes | Yes |
| IBM APL2/PC | Yes | Yes |
| APLI386 | Yes | Yes |
| APLIPC | Yes | Yes |
| Sharp APL/PC | Yes | Yes |
| I-APL | Yes (cover fns) | No (cover fns available) |
| TryAPL2 | No | No |
| APLISW | No | No |
Documentation
| APL*PLUS demo | — On-screen keyboard tutorial/description of features. |
| TryAPL2 | — On-screen doc. & lessons; LJ printable user manual. |
| APLI386 | — On-screen, plus two inexact books. |
| APLIPC | — Identical to APLI386 above. |
| APLISW | — Some, on-screen. |
| I-APL | — Good on paper, not much on-screen. |
| Sharp APL/PC | — None on-screen, paper not easily available, difficult. |
On-screen Help Supplied
| APL*PLUS demo | — Excellent, also excellent for full products. |
| TryAPL2 | — Good, in WS TRYDOC.TRY. |
| IBM APL2/PC | — I don’t know. |
| APLI386 | — F1: Fairly complete, paper documentation essential. |
| APLIPC | — F1: Identical to APLI386 above. |
| APLISW | — F1: Identical to APLI386 above. |
| Sharp APL/PC | — No. |
| I-APL | — No. |
Function Keys: settable on all except APLISW and I-APL. Varying degrees of pain on all others.
APL Lessons Availability: CPCUG APLSIG’s generic, interactive, on-screen lessons are available for all APLs discussed here, some also in French.
Non-English Language Keyboard/Character Support: This feature is important only if you care about being competitive in today’s global marketplace (not everybody does). Among APLs discussed here, only TryAPL2 includes instructions for the keyboard and National Code Pages. On-screen non-English characters and non-English keyboards can be made in other APLs, with varying degrees of pain.
Calls to Machine Language/C/Fortran etc.
| APL*PLUS | — Yes |
| APL*PLUS demo | — Yes, example provided of calls to C |
| TryAPL2 | — No, requires AP210, not included in demo |
| IBM APL2 | — Yes, FORTRAN WS included in product |
| APLI386 | — ⎕NA type improvements planned |
| APLIPC | — ⎕NA type improvements planned |
| I-APL | — Yes, machine language expertise needed |
| APLISW | — No |
| Commercially Motivated Vendor Support | Kaizen Strategy?* | Market Responsive? | |
|---|---|---|---|
| APL*PLUS | — Hot-line + bbs | Yes, to a fault | Highly so |
| APL*PLUS demo | — Ask salesperson | Apparently | Very Likely |
| TryAPL2 | — Hot-line, free | Yes | Apparently |
| IBM APL2 | — Hot-line, free | Yes, not to a fault | Unknown |
| APLI386 | — Hot-line, toll | Yes | Apparently |
| APLIPC | — Hot-line, toll | Yes | Apparently |
| APLISW | — No | No | No |
| I-APL | — No | No | No |
* Kaizen is the Japanese term for a reliable corporate commitment to unceasing, market-driven, improvement and innovation.
Run-Time Systems: Programming APL for run-time systems, whether for commercial use or just for your work group, requires strong skills in error trapping. All APLs here, with the exception of I-APL, have error trapping features — and all are incompatibly different. TryAPL2’s error trapping is undocumented.
IBM APL2 includes a free run-time .EXE system. APL*PLUS and APL*PLUS II provide run-time systems at varying prices: APL*PLUS 5-pack is $250, unlimited is $995; APL*PLUS II 5-pack is $875, unlimited is $5000.
Pricing strategy for Iverson APLI386 and APLIPC make run-time systems inexpensive for distribution in small numbers. If you develop an application that will sell many copies, APL*PLUS may be cheaper. I-APL may be distributed free, but commercial use is prohibited.
Odds and Ends: Iverson Software products (and Sharp) have built-in complex numbers. However, complex number cover functions are not hard to write, and are available as shareware, or come with some other APLs. Only I-APL uses "direct definition" functions. Only APL*PLUS II and Iverson APLI386 do windows. Only I-APL is available on a very wide range of machines, such as ATARI, BBC, Archimedes, or Mac II.
| Other Info | Graphics | Color | Printer Support |
|---|---|---|---|
| APL*PLUS | Yes | Yes | V. good |
| APL*PLUS demo | Yes | Yes | not accessible |
| IBM TryAPL2 | Yes | Yes | V. good for LJ |
| IBM APL2/PC | Yes | Yes | V. good, via AP80 |
| APLI386 | Yes | Yes | V. good (LJ, PS, DM) |
| APLIPC | Yes | Yes | Identical to APLI386 |
| I-APL | Possible | Possible | Limited |
| APLISW | No | No | No |
Sources¶
APLI386/APLIPC: Iverson Software Inc.
33 Major Street, Suite 466
Toronto, Ontario Canada M5S 2K9
Tel: 416-925-6096, Fax 416-488-7559
TryAPL2: IBM APL Development (specify disk size)
M46/D12-278B Santa Teresa Lab
Box 49023, San Jose CA 95161-9023 USA
APL*PLUS demo: Manugistics Inc.
2115 East Jefferson St. Suite 729
Rockville MD 20852 USA 301-984-5412
I-APL:
| USA | UK inquiries | UK Orders |
|---|---|---|
| [address omitted] | [address omitted] | 59 The Crescent, |
| Milton, Weston-super-mare | ||
| Avon BS22 8DU |
Call for Action¶
This comparison of APLs is a collaborative effort by the APLSIG of the CPCUG. We’ve invited corrections and improvements from APL vendors. I’m not sure that we’ve got everything right. Readers are invited to send corrections and improvements to the editor of Education Vector, who will forward them to the author.