Skip to content

APLX, the Awakening of the Sleeping Beauty

Vector 19:1, page 49

reviews implementations

Transcribed from the printed issue; not yet reviewed. Read it in the PDF of the issue, page 49

Abstract

MicroAPL used to distribute APL68000, an APL system for the Macintosh. This year they have introduced APLX. This is a new APL that is available for Macintosh and for Windows. The workspaces from one platform can be read on another and (with a few exceptions) will also execute on the other machine.

This paper reports my experiences with both APLX versions.

History

In the beginning of the personal computer, screens had the same number of columns as a punch card and 640Kb memory was a ridiculously large amount of memory. It was a time when APL systems struggled with ROM chips to display the character set and a window was something that you looked through rather than at.

At that time the Atari and the Macintosh already had a very sophisticated APL: APL68000 distributed by MicroAPL. You could make nice dialog-boxes and windows with menus when users of DOS APL could only dream of such a user interface. Furthermore a programmer in APL68000 could use 1, 2 or even ridiculous amounts of 4 or 8 Mb memory whereas DOS users had to struggle with expanded or extended memory just to rise above the 640Mb barrier.

And although there were more than three APL vendors for the PC at that time and only one for Macintosh APL, I never felt the need for other vendors for Macintosh APL because this APL was a very good product.

In the following years the Windows operating system came to the PC and the Windows APL user interfacing grew more sophisticated year by year, using the possibilities that the development of the Windows O.S. offered. At the same time APL68000 did not develop very much which was OK because it was already far ahead of the other APL systems. In the last eight years however, development of APL68000 has come to a complete standstill, while in the meantime the Mac operating system moved from system 6, to 7, to 8 and to 9. The old APL68000 has kept on working, but now definitely lags behind in its functionality as it did not keep up with the developments in the Windows O.S. and the Mac O.S..

Recently Macintosh moved from O.S.9 to OS-X with a Unix kernel underneath which would probably make APL68000 eventually obsolete. So it was a pleasant surprise when I learned that MicroAPL suddenly surfaced with a completely reworked APL which they call APLX and which will work on the new Mac O.S.-X. It is my pleasure to report here how the first version of this new APL works.

Basic facts

APLX is developed by MicroAPL. You can find detailed information on their website //www.microapl.co.uk/apl.

There is a Macintosh version and a Windows version. Each one costs US$699 (£499+VAT). Previous APL68000 users get a discount for the Mac version (to US$575). Educational institutions get a 20% discount and for US$1400 they are allowed to distribute it among their students for free.

The Macintosh version runs under Mac O.S. 8.6 and upwards (9.2, OSX). The Windows version runs under W95, W98, ME, NT, 2000, 2000 Pro and XP.

A runtime version is currently missing, but will be available by the time you read this.

First Acquaintance

When you start APLX you see 6 menu items. There are no icons on the menu bar. These menu items are:

File. Here are [New], [Open], [Save], [SaveAs] and [COPY] to do the familiar system commands )CLEAR, )LOAD, )SAVE and )COPY interactively using the file entry dialog. Personally I would prefer to have the PCOPY rather than the COPY (or even better, both) but, of course, I can also type this command myself. This menu item also has the items [Import] and [Export] for the )IN and )OUT command, a [sessionwindow] item where you can save or retrieve the text and thus the history of the session window, a [PageSetup] and [Print] where you can choose between a print of the session window (or selected parts thereof) or a listing of all functions in the whole workspace. The latter item I found great to have available only a mouse click away.

Edit. The next menu is the Edit menu which contains the not so exciting, but useful options [Undo], [Cut], [Copy], [Paste], [Delete] and [Select All]. Here is also [Find/Change], [Find Again], a very helpful [Find Selected Text] and [Replace+FindNext]. Finally here is [Edit Recent] with recently edited items and [Edit Function/Operator/Variable] that will pop up a window where you can point and click the items that you want to edit.

Debug. The Debug menu has the options [Interrupt], [Resume Execution], [Clear Execution Stack] similar to [Ctrl+Break], →⎕LC and )SIC. There are also options [Show Debug Window], [Breakpoints] and [Watch] which I will talk about later.

Tool. The Tools menu has the options [Workspace Explorer], [Font Size], [Switch to non-APL Keyboard] to choose between classic or unified keyboard, [APL Keyboard Layout] which sets the keyboard layout to the classical or unified keyboard and [Preferences] which allows you to set defaults for many things from font size, colours, libraries, keyboard and so on.

Window. The Window menu has the options [Close Window] which in the session window is another way to exit APL, [Close Debug/Edit] to close other windows, [Tile], [Cascade], [Next Window], and a list of open windows.

Help. The Help menu has options [Contents], [Search for Help On], [Help On Selected Item], [Keyboard Layout] which gives a window with the keyboard layout (unfortunately one cannot click on a key to add it to the text in the session window) and a [Homepage]-activation and an [About] option.

The [Preferences] you find under the [APLX] menu (Mac) or [Tools] menu (Windows); the [About] is under the [APLX] menu (Mac) or [Help] menu (Windows) and the [Quit] (where would we be without this extremely important option) is on the Mac also under the [APLX] menu and in Windows (as Exit) at the bottom of the [File] menu.

Most options are self-evident, some of which I will elaborate on later.

Basics

Now first of all the basics: APL. There is not much to say about this because everything works just fine. APLX has the whole APL set of primitive functions with nested arrays. This includes the index (squeezed quad) and the find (underscored epsilon), first, n-wise reduction and scalar functions with axis.

Complex numbers are not implemented, nor are namespaces.

You can make your own user-defined operators.

For administrative applications there is available a very powerful formatting function "⍺", the standard format "⍕" can have a "picture"-type left argument and to top it off there is an extremely powerful function ⎕FMT. As I am not specialized in this area I have no personal experience with these functions, but the features in the description look impressive.

Another very powerful feature that APL68000 used to have is that with execute you could execute anything. Not only APL expressions, but also administrative commands. For example you could change the name of the workspace under program control by the expression:

⍎')WSID 1 ANOTHER'

I was happy to discover that APLX has retained this feature. The result is written to screen though, you can not say:

RES←⍎')WSID'

All familiar quad variables and quad functions are available. There is not such a plethora as in APL2000 but most of those that are in IBM APL2 are available and more. A rough count taught me that APLX has about 90 quad variables/functions whereas APL2000 has 160 and 31 for IBM APL2 and 53 for APL2C. My count can be slightly off because my manuals are not all up to date and I was lazy and just counted everything (for example in APL2000 I chose the easy way and counted the silly duplication of quad ⎕N-functions and ⎕XN-functions as different functions), but the picture is clear. This is not to say that "the more quad-functions the better" (as I said, some quad-functions such as the ⎕XN-functions are plainly stupid) but it shows that APLX tries to give the user a good toolbox.

For error trapping there is no "⎕ELX", but there is a "⎕EA" and even more powerful alternatives such as error control "⎕EC" which executes the right argument and returns a nested vector with the result (which can be an error message) together with 1 or 0 (execution was fine or yielded error). There are other error trappings as well such as "→⎕ERX #" which sends control to line # in case of error.

All familiar system commands are available.

You can import and export workspaces using )IN and )OUT. I occasionally found it frustrating that in APL2000 I could not import one particular item. In APLX you can import the whole workspace, but you can also specify one or more objects that you are interested in.

For workspace I/O there are the familiar )SAVE, )LOAD, )COPY, but there are also the silent variants (starting with an extra S) that do not display a message and a )XLOAD that does not execute the latent expression.

Unfortunately there is no )DISPLAY nor ⎕DISPLAY nor ]DISPLAY. There is a function DISPLAY in a supplied workspace but I am not very happy with it. I often forget whether it is present in my active workspace or not. This results in a VALUE ERROR and subsequently in a frustrated feverish typing of the copy-command to get the DISPLAY available which interrupted my line of thought unfavorably. I hope that APLX will implement the )DISPLAY command soon.

In good old tradition, the path to a workspace is indicated by a library number. Associations between each number and its path can be set in the [Preferences] option. Another way is to specify the path using the monadic system function ⎕MOUNT. You give it a character matrix where the first row refers to library 0, the second one to library 1 and so on. Unfortunately one cannot type the full path directly in the system command. This is a feature that I use very often in APL2000 for quick use to a not so common path, so I miss it dearly in APLX. Fortunately it will be available by the time you read this.

One of my long-standing wishes for APL2000 and APL2C is grouping. APLX has it all. For one, it has the classical grouping that uses the commands )GROUP, )GRP and )GRPS. It also has the modern grouping as available in IBM APL2 which is called indirect copying where you put parenthesis around a variable in the )COPY command to indicate that not the variable, but the names that the variable specifies should be copied. I often asked APL2000 to add this indirect copy to their system (or even the classical one), but up to now to no avail. So I am happy to find both in APLX.

Another grouping feature available is ⎕OV which let you assemble a number of items (functions, operators, variables) in one named object. You can copy, save and retrieve this object and activate the items again.

You can make user functions and user operators in APLX.

There are many ways to invoke the editor.

One is to type [Apple+E] ([Ctrl+E] in Windows). This raises a window with a list of functions and variables. You can click on the particular function and it will open in the editor.

Another way is to activate the Workspace Explorer in the [Tools] menu. This opens a window with all your functions and variables at the left and its content showing on the right. Now you can immediately edit one or more functions. Unfortunately you cannot edit variables; the Workspace Explorer only shows you the "property" of a variable. For editing you need to leave the explorer.

The third way is the one that I use most often. Click on the name of the object (function or variable) in the session window and a popup menu opens that has Edit as its default action. Just release your mouse and you are in business for editing. Very smooth.

In APLX for Windows you have to right-click on the name. In APL2C and in APL2000 (after setting in the preferences) I can simply double click on a name to invoke the editor. I found the right click of APLX in the beginning only a small nuisance, but after some time it was very tiresome and I grew homesick to the Macintosh way or to the double click in APL2C and APL2000.

You can edit functions, operators and flat character arrays. You cannot edit numerical variables (alas), nested arrays or rank>2 arrays.

The GUI in APLX is different from its predecessor APL68000. Although a limited version of ⎕WI was already in APL68000, now all GUI is done by an extensive set of ⎕WI features. Most object names and properties in APLX are identical to those in APL2000 which makes conversion easy. The current collection of objects and properties is a solid base and good for most of the things a programmer might want to do. However many of the more luxurious things that a programmer might wish for are not available.

The graphics I consider the weakest part currently. The current number of objects and their properties that are now available is simply inadequate for serious work. For example one cannot place text at an angle along a vertical axis of a graph, nor can one draw (and fill) polylines. The new release 1.1 promises to remedy this weakness.

Experience

About APL itself I can be short. It runs fine. The APL system is stable and during all my testing it only crashed in two well defined cases (this is fixed in version 1.1). I also found problems with error trapping: ⎕EA does not always executes the alternative in case of error and ⎕EC does end prematurely in case of error. Apart from these few problems I found the system very reliable, a thing that I value highly.

Another thing is the GUI features. As I mentioned before, the most important objects are available, like radio-buttons, checkboxes, progress bars, exit buttons, trees and so on. A good thing is that APLX intends to be compatible with APL2000. For that reason there are radio-buttons and options, the same thing but with different names. My experience was that here are still some growing pains; things that work well normally but give trouble in edge conditions or in seldom used options. The good thing is however, that most of the problems that I found will be a thing of the past in version 1.1 which will be available at the time that you read this.

Out of curiosity I compared some APL functions in APLX with other APL systems. As I have no other APL systems on the Macintosh I did my benchmarking on a PC. I used APLX/Win on one and the same machine as the other APL alternatives to make the results comparable. You can see the result:

APLX/W APL2000/W APL2C IBMAPL2
⍞←7 0 6.60 10 3.3
⎕←70⍴'⌹⍫⍒⍋⌽⍉⊖' 2.2 8.20 10 10.5
Q←+/VI 0.5 0.60 0 0.5
Q←+/VR 0.5 0.50 0 0
Q←∨/VL 1.1 0.00 0 2.2
Q←⌈/VI 0.6 0.60 10 0
Q←⌈/VR 0.5 0.50 0 1.1
Q←VI⍳MI 17.1 6.10 490 8.2
Q←VR⍳VR 6555.3 18.10 1510 3197.8
Q←VR=⌽VR 7.7 1.60 0 3.3
Q←?10000⍴1000 44 9.40 20 13.7
Q←10000?10000 45 6.60 20 13.8
Q←VI*0.5 4.9 9.30 10 7.7
Q←7|VR 114.3 11.50 0 6.5
Q←VR[IVR] 3.3 1.10 0 11.6
Q←⍒VI 17.6 7.70 0 2.8
Q←⍋VR 19.2 2.20 10 9.9
Q←¯20 0↑MR 0.5 0.00 0 0
Q←VI∊VI 9.9 3.90 220 4.9
Q←(10000⍴1)∊1000⍴0 8.8 2.70 270 0.6
Q←MC∊MC 7.1 1.70 10 2.7
Q←2 1⍉MC 9.9 1.60 0 0.5
Q←VC∘.=VC 11 2.20 80 2.2
Q←(⍳300)∘.+⍳300 14.3 20.90 80 11.5
Q←VR⌊.+VR 23.6 2.20 10 3.9
Q←MR⌹100↑VR 84.6 3.30 0 10.4
Q←tCPUBENCH_FIBON 80.2 3.80 30 11.5
-LowerQ. 0.85 0.85 0 0.85
-Median 9.35 2.45 10 3.6
-UpperQ. 21.4 7.15 25 10.45
-Mean 262.36 4.92 103.33 123.74
-GeometricMean 9.29 3.19 39.4 5.47

If you look at these figures or at the summarising median (or geometric mean, as the normal mean is not very helpful with skewed distributions or with outliers) you see that in general APLX is reasonable in its speed. Some functions are a bit slow, some are not. One very distinctive feature is that output is extremely fast in APLX. The other APLs are roughly similar in speed, but APLX beats them hands down. This agrees with the impression that APLX gives, it seems to react very fast, probably due to its fast output.

Another remarkable thing is dyadic iota. You see that APL2000 is lightningly fast (the number 18 is really no mistake) and on the other hand APLX is extremely slow. I am really surprised how APL2000 managed to be so extremely fast and APLX so very slow. These figures are comparable as the benchmarks are on one and the same machine within a few minutes of each other.

One other observation is that APLX seems very dependent on machine power. On a small first generation Pentium machine of 133MHz with only 32Mb memory under Windows98 various development tasks (such as showing the edit-window or debugging window) and file I/O took a very long time to accomplish whereas APL2C and APL2000 still performed well. On more powerful machines this difference evaporated.

MicroAPL is working on this and expects various speed-ups in version 1.1 and subsequent releases.

Documentation

For problems you have the following help.

First of all, there is the previously mentioned [Help] menu.

The [Help] is very useful. In APL2000 I always have to determine beforehand if the item I want help for is a function, a windows type of thing, or a session-type of thing. Here I can just activate [SearchOn] and type the item that I need help for. Unfortunately the [SearchOnSelected] is rather restricted. If you type ⍴ followed by [F1] nothing happens; you need (as the menu option prescribes) to actually highlight the character to activate the [SearchOnSelected]. Also words like "style" or "Form" or ")SAVE" will not rouse the [SearchOnSelected] from its sleep. For this you have to activate the [SearchOnHelpFor] and type in the topic that interests you. So, although the principle of [SearchOnSelect] has promise, it needs more work to make it really useful.

The [SearchOn]-Help works well on the PC, but not on the Mac. On the Mac you cannot type APL characters which makes it worthless for APL help. Moreover the help does not react well to GUI-related keywords; for example asking help for "scale" gives me help from QuickTime but not for APL, asking help for "Form" gives you AppleScript help and typing )SAVE warns you that the search phrase is invalid. Here some work is needed in the Mac version whereas the PC version works well.

Your second help is documentation. There are two manuals provided in PDF format. The first one is the "APL language manual" [1]. This is very thorough and useful. Although it is not written as a tutor but rather as a reference, I think that a beginner can learn APL quite well, in particular because of the wealth of small examples. But the experienced programmer will also find many paragraphs that are useful to study such as details on how to do error trapping, or on working with component files.

The other manual is the "APL GUI programming manual" [2]. This describes all objects, methods, properties and callbacks. This is essential if you want to build a GUI interface. Many paragraphs are fine, with a good description and useful examples, but some paragraphs are slightly too condensed to my taste (for example the page with "style" description is nearly empty and refers the reader to the objects, but on one occasion I found a style value that worked but was not described in the object paragraph). I trust that the next version will be a bit more extensive.

One very useful help that I consulted often are two supplied demonstration workspaces. The first one is HELPQWI which gives small examples of each widget (⎕WI class) that is defined. The second one is SAMPLESQWI that gives a few more extensive examples. Most of these examples were pieces of APL code from the manuals, but I found the functions in these workspaces very enlightening and useful to modify.

Compatibility

Compatibility with older version

First of all I was interested whether my old workspaces would still run in Mac O.S.-X or not. It appeared that I could load my old workspaces without any problems. In all APL programs the pure APL expressions worked flawlessly.

A very tricky thing was the user interface. APL68000 had many (machine-coded?) functions for nice GUI interfacing and these were used in many of my old programs. Would they still work? No, not immediately, but APLX provides workspaces with the replacement functions.

I replaced the old utilities with their new O.S.X counterparts and…… magic: everything worked fine.

Compatibility with other APL systems

Another action I took was to port some of my APL2000 workspaces to APLX/Mac. I used the ]OUT in APL2000 and )IN in APLX/Mac. Most functions ported fine, some did not. I found that functions with ⎕ELX in the header were not imported and (more seriously) were not reported as being problematic. After I found out about this problem I removed the culprit in the headers before exporting and converting then went well. I hope APLX will address this problem and store "unfixable" programs as ∆∆∆-variables in the workspace together with an appropriate message.

Of course, when I say that everything went well I meant that the pure APL code worked fine. I noticed to my surprise how often I used the double quote character in a string instead of two quote characters, which is not defined in APLX. Such incompatibilities have to be rectified before you can run your APL2000 code in APLX, of course. Or not, as MicroAPL promises to have this also implemented in their next release 1.1

Another point is the ⎕WI code. I was happy to discover that APLX introduced ⎕WI for all the GUI interfacing. In many ways this is compatible with APL2000. In some ways they are not similar because the implementers of APLX chose a better implementation. For example to communicate with the clipboard, APL2000 has several lines of ugly non-⎕WI code; whereas APLX applies a very nice:

'⎕'⎕WI'text' 'TO CLIPBOARD' ⍝ write to clipboard
'⎕'⎕WI'text' ⍝ read from clipboard

On the other hand, APL2000 has developed over the years quite a collection of ⎕WI features; not all of them have made their way into APLX yet, but I suspect in the coming months APLX will quickly come up to par.

Compatibility with APLX /Win

One claim that I was rather skeptical of is that APLX can read/write their workspaces irrespective of Mac or PC. I saved a PC workspace, and (after removing the dot in the name) loaded it from floppy into the MAC and surprisingly it worked!! This is very neat. Later on I learned that it works only for workspaces that are saved with clear status indicator so you should be aware of this when you save a workspace for use on the other platform.

There are a few exceptions. For example there is no Rich Edit object, no Choose Color dialog nor popup menus for the Macintosh.

Development tools

One of the things that I became very fond of in APL2000 is the debugging window. I was very happy to see that APLX also has this tool added to its APL. One thing that I like very much in APLX is that you can edit the code in the debug window. This is still (apparently I am a slow learner) a trap for me in APL2000: when my program crashes and the debugging window shows the problem code, my immediate response is to click in the offensive line in the debugging window to make corrections. Then I realize that this does not work because I have to activate the edit-window instead. In APLX however, my gut reaction works just fine (another reason why I will probably never learn that it does not work that way in APL2000).

This debugging window works much more pleasantly on the Mac than on the PC. On the PC, setting and removing stops requires a double click (contrary to the Mac where one click is enough). I fail to see why you need a double click in APLX/Win, whereas in APLX/Mac and APL2000/Win a single click works just fine. Similar to the right-click that APL/X requires for editing instead of a double click, this seems a small thing (and initially it is a small thing) but as you do this often during development it becomes tiresome in the long run.

Also there is something not quite right in the windowing system that APLX/Win uses on the PC. If you have a debugging window, or an edit window, or a help window, you cannot easily go back to the session window (something that you frequently need to do) by clicking on its reference on the Start-bar underneath. This reference in the Start-bar is insensitive to clicking. So in order to switch back to the session window you have to use [Alt+Tab] or activate the [Window] menu. The reverse is no problem, going from the session window to another (edit- or debug-) window by clicking on its reference in the Start-bar works well, but you cannot go back in the same way. In the new release one has a quick way to switch windows using [Ctrl+#] where # is the window number (0 for session window), but this does not work when being active in the help-window or in another application.

There is also a Watch facility, which is basic, but useful. You specify the variable that you are interested in and the watch window continues to show its latest value (which can be a VALUE ERROR as long as the variable is not yet used). There are no fancy extras here (like conditional expressions or specifying the scope) as there are in APL2000 but for me this worked fine.

Unique Assets

One of the things that I already admired in APL68000 is the component file system. It is still available in APLX. The beauty is that it is very APL-like with only four symbols that do all you need: quad-write for writing, quad-read for reading (data or file information), quad-drop for deleting (components of) a file and quad-hold for setting quota and for setting sharing rights.

Another thing that looks great, although I do not have any experience in it yet, is the possibility to activate external functions. In APL2000 I had several tries to communicate with DLLs with ⎕NA, but I always had to give up because of spurious unexplainable data-transfer hiccoughs (sometimes perfect data transfer, the next day only half the array transferred). I certainly will try and see if APLX will do better.

A good thing is that APLX does not gratuitously copy other GUI solutions. I mentioned the clipboard solution. They also have an easy Choose Color object, an object to choose fonts and an object to activate the file-dialog box. They also have a nice feature called "anchors". Normally the "where"-property fixes the distance of an object to the left- and upper side of its form regardless of any resizing of the form. With anchors you can alternatively fix the distance to other sides, for example to keep the exit buttons on a fixed distance from the lower edge of the form. Also they are considering a relative anchoring which would make most of the "on Resize" code obsolete.

I expect more of their future extensions to be implemented with the same well-thought approach.

Wishes

Do I have any wishes? You bet. Although such a rarity as a happy user might exist, I do not think that a satisfied user exists.

My most modest wish that APL2000 never wanted to grant me (but which is to my satisfaction in APL2C) is lev ⊣ and dex ⊢. Though extremely trivial at first sight I use them a lot in APL2C to suppress unneeded output and to perform several expressions in one line. The reason is that I like

subexpression2 ⊣ subexpression1

much more than

subexpression1 ⋄ subsexpression2

because the first expression reads from right to left whereas the latter reads from halfway right to left and subsequent from right to halfway left.

I also hope for the duplicate, the commute and the rank operator, and the LCM and GCM functions which are all in APL2C, but are missing in APL2000 and in APLX and for the unique.

All these functions are part of the extended ISO standard [3] so in my opinion APLX as well as APL2000 should implement them.

Another thing that I missed are user commands (APL2000 terminology) or external functions (APL2C terminology). I like the implementation of the latter most. I like it because of its simplicity; you just ask APL to write the vector representations of the functions to file, for example:

(⎕VR'MAIN')(⎕VR'F2')(⎕VR'F3')(⎕VR'F4')⎕IIO'C:\PATH\DoMe.EFN'

and now hencewith you can type:

]DoMe xxx

This command will read the functions from the file DoMe, fix them and activate the first function (in our example MAIN) with argument xxx and delete them afterwards (in the workspace, not in the file, of course).

If I should be granted three wishes, my last one would be to add proper control structures. I hope that APLX will implement true APL-like control as it is implemented in APL2C rather then the horrible BASIC-like elaborate wording that is implemented in APL2000. In APL2C you can formulate:

Iteration

∇4+5
   ⎕←'HELLO'
   ⎕←'WORLD'
∇

This is a block that is executed 9 times:

Condition

Similarly for conditions, the right control argument is either one or zero. For example, to do something only if A is equal to zero:

∇0=A
   ⎕←'HELLO'
   ⎕←'WORLD'
∇

While

The while-construction is implemented in a similar way. After all, a while-construct is an iteration, but an iteration that is executed as long as the controlling expression is true. Therefore the implementation is identical to the fixed iteration however, to tell APL to recheck the controlling expression a minus one is used:

∇-0<S
   ⎕←'HELLO'
   ⎕←'WORLD'
∇

The inner block will be repeated as long as variable S is positive.

Alternatives

For alternatives like IF-ELSE and SELECT, control takes a vector for its right argument. This vector prescribes what to do for each alternative, which is marked by a label-less colon ":". An example illustrates this:

∇2 3=⎕NC'XXX'
:⎕←'XXX IS VARIABLE'
 ...(other code in case of variabe)...
:⎕←'XXX IS FUNCTION'
 ...(other code in case of function)...
∇

My experience with these control structures in APL2C has shown me that such code is read much more quickly than the BASIC-like wordings that are used in APL2000. Even more so for the single-line alternative which will be in APL2C shortly:

⎕←'VAR' : ⎕←'FUNC' ∇ 2 3=⎕NC'NAME'

rather than the elaborate:

:IF 2=⎕NC'NAME'
:THEN
  ⎕←'VAR'
:ELSE
  ⎕←'FUNC' ∇
:ENDIF

Why move to APLX?

If you are happy with your current APL then there is no need for you to move.

However if you wish to develop your application for two platforms (Mac and PC/Win) this is your opportunity. You can just restrict yourself to development on one platform until it is finished and then move the workspace to the other platform. Switching back and forth between the two platforms is a breeze. You can easily load any workspace from the other platform and if you programmed your graphical user interface with the ⎕WI there is no need for you to do any conversion.

If you want to have your APL2000/Win application running on the Mac, APLX/Mac is also a good choice. It is likely that you will need to reprogram some code for the graphical user interface, the control structures and some new code for a few of the manifold quad-functions that are in APL2000. A good thing is that many of the ⎕WI functions of APL2000 are there and many quad-functions of APL2000 are also in APLX, but not all. So to do this you need to invest some effort. However all ISO programmed code will run well without any problem.

If you are working with an old-fashioned APL system (DOS, APL-II) and are considering moving to a professional APL this is a good choice. Although not inexpensive for private users, its price is affordable compared to the other APLs. If you can export your old APL code to a transfer file, you can port your code into APLX using )IN. As you will not have used GUI-code nor control structures in your DOS APL, chances are high that you will not need to do much conversion. I also expect that IBMs APL2 will run with little or no changes, except for the auxiliary processors of course.

One of the things that I liked very much about the J team is that they are very responsive to user comments. That does not mean that they gratuitously accept any suggestion that users make. Of course they don’t, but they are interested in listening to opinions and eager to improve and enhance their product. During the few months that I worked with APLX and reported my experiences, I found the same attitude with the microAPL team. This was already the case, long ago when they developed APL68000, so this gives me great confidence in the future of this product.

Conclusion

I have worked for a few months with both APLX/Mac and APLX/Win. There were no problems in porting my older Macintosh workspaces to APLX/Mac. And after copying the updated GUI-functions the resulting workspaces run fine.

To have my APL2000/Win code running on APLX/Win (and subsequently on Mac) took a bit more effort. Many of the GUI-coded lines did run immediately, but there were also quite a few differences, often missing features but sometimes better alternative implementations though.

Apart from this, and apart from a few well defined problems with error trapping and crashes when using progress bars, my experience with APLX was very good. It is stable, which I value highly. The APL functions, operators and variables are all present and work as they should. The available GUI features are powerful although not extensive and I hope that the coming year will bring them up to a higher level. In particular the graphics felt inadequate for me.

New development in APLX was pleasant. The development tools (debugging window and watch window) are very useful. Some rough edges have to be smoothed out in the coming months. The available documentation is good: the PDF documents are well written, the [Help] in Windows is good (the Mac version needs work) and the supplied DEMO workspaces were also very useful to look at and to modify or to copy some code from.

My biggest joy was that I could simply load a Windows workspace on the Mac and see it running without any reprogramming on my part. This was pure magic.

Literature

[1] MicroAPL (jan. 2002) APLX language manual (v.1.0). MicroAPL Ltd.

[2] MicroAPL (jan. 2002) APLX GUI programming manual (v.1.0). MicroAPL Ltd.

[3] ISO (1997): Programming languages, their environments and system software interfaces – Programming language APL, extended. ISO13751.

Further comments from Anthony Camacho

[I was working on a review of the PC version of APLX when Eke’s comprehensive review of both PC and Mac versions arrived. I’ve been asked to add, from my notes, anything that Eke doesn’t say.]

  1. Setup ran through without a hitch in less than five minutes. I chose a different directory from standard and did a custom install and chose every option.
  2. I’m one of those strange people that reads manuals (perhaps because I used to write them) so I began with the documentation (which is on .PDF files). After reading the introductory bit telling me how nice APLX is (it offers syntax colouring, pop-up objects ie function or variable editing, a "watch window" to show when a variable changes and a debug window and I also learned that its workspaces are the same whichever the platform you run it on) I began on the manual before even loading the interpreter.
  3. I was delighted to discover I would have the permanently available instant choice of unified, traditional or standard text keyboard.
  4. The first three chapters in the APL Fundamentals section of the APL Language Reference are Array type and prototype, Axis operator and Binding strengths. I was amazed because so many previous attempts to introduce advanced APLs to me had done their best to avoid raising these awkward subjects as long as possible. I’ve never before read such a good introduction to an advanced APL. I was able to read it like a novel, the same way I read Gilman and Rose when I first heard about APL and was advised to learn it. I guess that revelation was sometime in 1979; on that occasion I put out the light after 3 am! I am reminded of Einstein’s dictum "Everything should be made as simple as possible, but no simpler" (for which I cannot now find the reference). I have encountered many explanations of complex subjects which fail, for me, because they begin by over-simplifying, which makes them untrue, and so reading them again, when one knows better, shows them up. This one, spectacularly, neither over-simplifies nor skips or fudges the difficulty, yet remains readable. In short I think this introduction succeeds brilliantly. It is worthy to stand alongside Paul Berry’s Sharp manual and, if anything, is better than Gilman and Rose.
  5. I had not previously come across the nomadic function which I had always previously called ambivalent. I think nomadic is a poor name. Such a function does not wander.
  6. Even a really devoted manual reader like me eventually has to try something, so I did start APLX, by clicking on APLX.EXE. Then the session window opened with the notice:

    APLX for Windows
    Copyright (C) 2001 MicroAPL Ltd
    WS Size = 20.0MB, Version = 1.01
    CLEAR WS
    

    The first thing I wanted to do was to see if the APL was there and so I produced some tables and looked at quad-AV and so on. I wanted to look at the supplied workspaces and couldn’t find them. Then I discovered quad-MOUNT. This provides the facility to assign a path to a library number for up to ten libraries. Then )LIB <n> will return the workspaces in that subdirectory. In the [Tools, Preferences] window one has the option to set the start-up (quad-MOUNT) paths of up to ten libraries. Very conveniently, if one uses the Preferences, the paths entered are immediately available and are set every time APLX is started.

    My experience with the interpreter matches Eke’s: there is simply nothing to say because everything I tried works perfectly. I’m a very old APLer and have never made significant use of anything more advanced than Sharp version 20, so I’ve not yet looked at defined operators nor have I done anything like an adequate test of nested arrays. 7. There are occasional lapses in the manual. For example I found, in the description of operators, some examples using A and B for right and left arguments just after a sentence saying L and R would be used. At the end of APL Fundamentals, when the "next" link isn’t there, one has to choose between "previous" and "contents"; "contents", instead of taking one back to the contents of the APLX Language Reference or "Help on APL Language" as the screen is headed, takes one back to the APLX Help where the language reference is one of the choices:

    Using APLX for Windows
    The APLX keyboard
    APLX language reference
    APLX Objects
    Interfacing to other languages

    Strangely, after doing this for Fundamentals and Primitives when it comes to Errors, File System, Native File Functions, and System Commands there is a "next" option which steps on to the beginning of the following section painlessly.

    The MicroAPL team were very helpful and I believe none of the problems I found above will still occur in version 1.1. For that reason I will not bore you with any more of the minor things I found. 8. The heading of the help window while going through the APL primitives cannot display some of the APL characters. The first to fail is floor, but there are many. Iota is displayed as ¼ and the file functions as a capital O with various accents. I suspected that this is one of the limitations of Windows - that you cannot choose just any font for the windows header line and MicroAPL confirmed it. This cannot be corrected because it is a limitation of Windows.

In short this is an APL interpreter out of the top drawer. When it has the free run-time and other enhancements promised for version 1.1 it should go on anyone’s short list (provided complex numbers are not essential): in "Which?" terminology it is a best buy.