Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!watserv1!blkcat!f70.n109.z1.fidonet.org!David.Michelson@uunet.UU.NET
From: David.Michelson@f70.n109.z1.fidonet.org (David Michelson)
Subject: A modest proposal
Message-ID: <735171646.AA03641@blkcat.UUCP>
Originator: daemon@watserv1.uwaterloo.ca
Sender: blkcat!Uucp@uunet.UU.NET
Organization: University of Waterloo
Date: Sun, 18 Apr 1993 19:04:14 GMT

I have a modest proposal for ASCII transmission of APL code:
It looks as ugly as J, but soon becomes easier to read through 
and is highly amenable to mechanical transliteration. 

In the bad old days of serial access before graphic fonts and 
extended ASCII, EBCDIC mainframes sent APL to ASCII terminals 
using the APL-ASCII overlay standard.  The terminal at the other
end handled representing the transmitted characters as APL.  It
would still work.

Note that capital letters are thus APL primitives (allowing us to
use the old mnemonics like iota over the "i") while lowercase
letters represent the unshifted APL capital letters:
Thus I would be iota, while i would be I.  R is rho while r is R.
Q is query, ? is backslash (shift /).
F would be an APL underscore, _ would be minus, - would be +.

Since we ALSO need a visible Backspace/Overstrike meta-character,
I propose the ASCII underscore (APL minus) as in APL2's trigraph
for overstrikes on terminals that do not support them (but not
transliterated since it is non-syntactic).

Thus O_M is rotate, a_F is underscored-A.  This approach will even
handle system-specific overstrikes like 0_T (zilde) and ,__
(catenate in the Lio-th dimension) or Burroughs' file primitives
with the L (=quad) overstrikes.  Does anyone around still remember the
old o_u_t ?

An example:   an algorithm for converting field widths to column ranges
  @1 0 Y 0 1 O__ O_? 1 0 J.- -? 0,L

 @1 0   Y  0 1 O__    O_?  1 0  J.-        -?           0, L
neg1  drop     flip tranpose  outer add  plus reduction   quad

that is: (negative-1 0) drop of a 0 1 rotate in Lio-th dimension of the
            transpose of 1 0 outer-added to the sum scan of 0,quad input

Ugly as sin, but complete, and each of us can write a tiny translate
function for our own Lav (that is quad-AV, of course).

Only overstrikes come out a little longer (when you're not
spelling it all out in parallel).

One big advantage is that we can enter APL on an ASCII keyboard
as if it were an APL standard keyboard (and APL DID standardize
the keyboard long before the rest of the computer community).  We
just need to use the old overstrike method).

One hitch:  we have to decide to go with the ancient or modern
  arrangement of the assignment and branch arrows.  Much as I like them
  both unshifted, IBM still uses the original and the overlay did too.

(Also, since the typewriter-pairing keyboards have long since
vanquished the old bit-pairing keyboards from the keypunches, we
use the typewriter-paired version of the APL-ASCII overlay,
leaving anyone with an ancient bit-paired terminal to do one
extra step of translation.)

Anyone want to create and post a fn to translate in and out for his/her
