Skip to content

Technical Editorial

Vector 1:3, page 114

APL community

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

APL on micros is beset by problems of the character set. Some implementations allow the option of using keywords instead of the special APL symbols, but unfortunately each interpreter seems to have tackled the problem in a different way. For example the keywords in DEC APLSF must start with a dot, and are different from those chosen by APL*PLUS/PC which use a hash to distinguish them (although this facility can be turned off). These keywords are different yet again from those offered by MicroAPL’s new implementation for Sinclair’s QL computer; this uses the same keyword for both the monadic and dyadic form of a given primitive. (We hope to bring you a technical review of QL/APL in a future VECTOR.)

As if all this wasn’t enough we are also driven crazy trying to remember where the special characters are on the keyboard, with major differences between the three main implementations on just one machine (APL*PLUS, Sharp-APL and IBM APL on the IBM PC). On the APL*PLUS implementation the ‘composite’ symbols can be generated by using the ALT key, and from version 4.0 by an overstrike sequence too. On IBM’s PC APL the ALT key is also used, but many of the special characters are on different keys. Finally on Sharp’s PC interpreter the composites are generated by an overstrike, non-special APL characters are to be found on the same keys as their ACSII equivalents and the standard alphabet appears on the screen in lower-case! Clearly key-cap stickers don’t help if you need to make regular use of more than one interpreter.

What are the solutions to these problems? Should a standard set of keywords be adopted? Should interpreters allow user-defined symbols? Could micros with bit-mapped screens allow any symbol to be attached to any key? Let’s hear your views and see if we can come up with a concensus that may help future implementations to get it right.

We wanted to make our new column ‘Surely there must be a Better Way’ humorous as well as useful, so we’ve started the ball rolling with some staggeringly bad functions and tried to show the ‘correct’ solutions - unless someone has any better ideas! The intention is not to poke fun at the (anonymous!) originators, but to point the way towards writing code that takes advantage of the tremendous power of APL. If you have any improvements to these, or any other, algorithms do write in and let us know. Alternatively, if you have a solution to a problem which you suspect is not optimal (or even no solution at all) please tell us and let someone else solve it for you. Additional commentary with APL code is always helpful, but if you don’t have the time to write it we are willing to do this for you.

Finally, a reminder to all of you APLers out there - the technical section of VECTOR is YOUR section and should be largely driven by you. We are here to represent your views - don’t let the dreaded white-space disease infect these pages! We’d like to hear from our readers and to find out who (and where) they are. so please keep those technical letters coming in. Or how about some code for ‘Surely there must be a Better Way’? Or even a technical article?? Keep it coming!

Introduction to Contributed Articles

In this issue we are presenting four contributed articles.

‘Generic read and replace programs for the Sharp APL file system’ was written by Robert Pullman of the Rochester Group - a New York based APL consultancy. He outlines the development of a filing system that permits the retrieval and update of planes in a multi-dimensional numeric database. Although written with Sharp APL users in mind it should be easily understood by the VS APL user with a rudimentary knowledge of the Sharp enclose and disclose functions. A useful primer on the Sharp component filing system is also provided.

Following the Sharp theme, ‘An APL Dialogue’ is the work of Graeme Robertson from I. P. Sharp Associates, London. This is a light-hearted, yet also serious, look at hoa Socrates (the wise Greek) and Meno (the knowledgeable slave) might have arrived at Relativity Theory - with a little help from Sharp APL on a PC! Remeniscent of Hofstadter in ‘Godel, Escher, Bach’ Graeme nevertheless instils his own brand of humour into this impressive work. Incidentally the contents were submitted in the form of entirely plotter-produced output, but have been re-typeset for publication.

‘Quotitian Jottings on Matters Temporal’ is a must for those who need to store times and dates as two-byte integers, for example when using APL*PLUS/PC. We are indebted to Michael Carmicael of Occidental Oil, London, who wrote the piece, and consider ourselves extremely fortunate that we can benefit from his chance discovery in an anthropological journal.

Dr A. G. Prys Williams from the Management Science and Statistics Dept of the University College of Swansea is the author of our fourth paper ‘Random Contingency Tables: a use for three-dimensional Matrices’. Non-statisticians should not be put off by the title - there are results here which can be of use to people in many areas. In particular the APL code for generating random figures with constrained row and column totals is presented and used to investigate a real problem