Looking at APLX

Dick Bowman

27 October 2002

Contents

Introduction

It was good to see the quiet announcement of APLX a few months ago; the more recent availablity of Version 1.1 with a time-limited demo prompted a download and investigation.

Those with long(ish) memories will fondly recall MicroAPL's APL.68000 which for so long was the lone voice of APL in the Mac world; APLX is available for both Mac and Windows (I looked at the latter), with server versions for NT and Unix also available.

My interest - as always - is in a platform for developing applications with an Office-like look-and-feel.

APLX for Windows is priced at 499; significantly lower than Dyalog or APL2 (I can't recall the price of APL*PLUS).

Return to Contents

Installation

Download and installation were both straightforward, providing Start menu items and substantial manuals in both PDF and HTML form.

There are also a few sample workspaces.

Return to Contents

What's in the Box?

APLX is (of course) a fully-featured second-generation APL with full support for nested arrays based on the APL2 definition - no fooling around here with NARS and emulation levels.  It was good to see an indexing function, slightly disappointing not to see complex numbers (I'm getting used to this, but I'm not giving up).

The session does all of the good stuff we expect these days (colour-coding, line recall, and so forth); there's a workspace explorer with point-and-click editing, debug windows.  Anyone who's used Dyalog is going to find this a fairly similar environment, different in detail but there's no sense of "poor relation".  The only visual cue that I miss is that there don't seem to be any toolbars or toolbuttons in the interface (maybe Macs don't have these things?).

There's a unified keyboard option, and control keywords like :if are available within defined functions and operators.

Error-trapping seems to be a bit "unique", but that's one area where there seems to be no cohesion between vendors.

The only system functions I couldn't find and felt some desire for are quadFI/quadFI.

Native file access is provided via the usual set of quadNTHISANDTHAT, but component files inherit from APL.68000 with a curious methodology all of its own..

Workspaces in APL2's Transfer Form may be imported using the )IN system command (you do have to wrestle with APLX's library number scheme here though - this looks like a bit of ancient technology in need of a rework - nowadays it seems more natural to work with folder names - maybe Macs are different).

There's access to the outside world with COM (hopefully we'll get to that), and scope for building GUI-style user interfaces (we will get to that).

The only thing I really feel I'm missing is any way to partition my active workspace into the logical units of Dyalog's namespaces and J's locales; having got used to these I really don't want to live without and go back to monolithic workspaces containing hundreds of objects (and my style is to use lots of little objects rather than a few big ones).

But - right now - I feel that I could be comfortable with APLX.  Not as comfortable as with Dyalog, but it feels sturdier than APL2C (although that was a year or more ago) and less fiddly that APL2 (where doing anything beyond adding two numbers together always seems to need a wrestle with one AP or another).

Return to Contents

How Fast Can It Go?

Taking the old favourite benchmarks, importing the APL2 .ATF file (straightforward process), and comparing side-by-side with APL2/W

 
APL2/W
APLX
INT ADD
4
3.5
FP ADD 
7.5
7.55
INT MULT 
9.05
6.5
FP MULT
7
8.5
INDEX 
0.8
0.8
CHAR COMPR 
1
1
INT COMPR 
1
1
INT+RED 
0
0
INT(max)RED 
0
0.5
BOOL SCAN 
123.2
1578.3
MAT ROTAT 
1
2
CHAR TRANS 
0
4
INT TRANS 
1
4
VEC OF VECS 
7
5.5
PARTITION 
1.5
2
RHO EACH
0
0
VEC COMPAR 
0
0
INT SRT 
3.5
11.5
BOOL COMPAR 
0
3.05
IOTA 
4.5
4.5

Boolean scan looks a bit off, and so (probably) does boolean comparison - makes me think that boolean operations within the interpreter might need a visit from Mr. Speedycalc; apart from that it all looks to be in the ballpark of usefulness - in so far as these benchmarks are useful (they don't really tell us much about GUI or I/O performance - arguably not the core of the interpreter, but maybe crucial for real-life applications).

One thing I do note in comparison with APL2 - the APLX is far easier to read (but my APL2 is ancient, and this aspect may have changed).

Return to Contents

What Can I Make With It?

Hello World

It's tiresome, but it's got to be done...

LoWorld w
Hello World example
'#' Œwi 'Scale' 5
'frmHowdy' Œwi 'New' 'Form'('Size' 120 200)('Where' 10 10)
'frmHowdy.SezMe' Œwi 'New' 'Label' ('Caption' '')('Where' 30 10 20 180)
'frmHowdy.PressMe' Œwi 'New' 'Button' ('Caption' 'PressMe')('Where' 80 70 20 60)('onClick' 'SayHowdy')
1 Œwe 'frmHowdy'

and its companion

SayHowdy
'frmHowdy.SezMe' Œwi 'Caption' 'Howdy Pardner'

Apologies for the font difficulties, but followers of both APL*PLUS and Dyalog will see much that's familiar; the syntax is closer to APL*PLUS - but you can see how to carry on for more complex examples.

A form designer would be good (that said - familiarity with Dyalog APL means that in that context I never use the supplied one).

The debug facilities pop up pretty much on demand

Saving workspaces with open windows is allowed (I find Dyalog's insistence on edit/trace windows being closed a significant irritant)

The help facilities are pretty comprehensive.

Overall, my sense is that we're sort-of at the level of Dyalog a few years back - there are one or two rough edges that would get smoothed off given a community of driven and demanding users (and applications with a life-history in Dyalog can hold some nasty code unless they've been kept up to scratch).  I could live with APLX for making GUIs.

Interfacing with Other Applications

There's a page in the documentation which shows how to get data from Excel, which seems fine.

But I couldn't extrapolate it to read from Access.  I guess it's probably a syntax thing, or something that needs more documentation.  I queried this with MicroAPL, who got back to me quickly - explaining that indeed there were problems with the APLX/Access interface which they hope to fix next time around.

External Function Calls

quadNA is there, equivalent in functionality if slightly different in syntax from Dyalog.

Return to Contents

Importing Your Existing Code

Well there's quadIN, and if all vendors supported this the nomadic life would be a lot simpler.

Import from APL2/PC was fine, but I couldn't find an easy way to make transfer files in Dyalog.

But I did transfer from APLX to Dyalog with little apparent trouble (aside from what were lower case letters in APLX changing to underlined capitals in Dyalog).

But, of course, that's the mechanical side of things.  As far as APL's diversity of quadWC, quadWI, component files and so forth are concerned you're very much on your own and that's where the difficulties begin...

Return to Contents

Saving Executables

As easy as "Save As...", except that the demonstration version doesn't allow it.

Return to Contents

Conclusions

It's good to see MicroAPL back in the ring; with other recent developments like Dyadic's Pocket APL this begins to feel like a Golden Age of APL interpreters (not forgetting J5, APL2C, Dyalog for Linux and so forth).

APLX feels like a solid and well-populated interpreter, rich in features and rich in usability.  If not as solid, rich or well-populated as Dyalog APL, that seems understandable given how long Dyadic have been out there with APL/W.

I like the idea of portability onto the Mac (I always like to feel there's somewhere to go and escape from Microsoft/Intel).  I'm less enamoured of the way that all of the APL vendors seem so ruggedly independent on syntax for things like GUI creation - the common lingo of APL really hasn't grown much in twenty years (and this doesn't make it easy to persuade the non-believers that APL is a living, growing and sensible alternative to some of the cockeyed nonsense that passes for "modern programming languages").

It's a nice price, but I doubt that it'll dislodge Dyalog as my platform-of-preference (until I chuck Windows out of the window and get a Mac).

The only thing I really feel is critically missing is namespaces; everything else ought to grow into place as the user base enlarges.

Return to Contents

Return to the J\APL Contents page

Copyright Dick Bowman, 2002-2013; last update 8 March 2013 (repaired links)