bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Comments on GNU APL


From: Mr. Brian B. McGuinness
Subject: Comments on GNU APL
Date: Thu, 9 Jan 2020 19:53:17 +0000


1. On startup of GNU APL 1.8 I get the error message:

   The following directories and file names were tried:
       directory /usr/local/lib/apl
       directory /usr/lib/apl
       file ./libemacs.so                       (No such file or directory)
       file ./libemacs.dylib                    (No such file or directory)
       file ./libemacs                          (No such file or directory)
       directory ./native
       directory ./emacs_mode

   The file is /usr/lib64/apl/libemacs.so (the installer apparently placed it there).


2. )DUMP should always store floating point values whose magnitudes are less
   than 1 in scientific notation to preserve precision.

   For example, if I do

         )wsid test
   WAS CLEAR WS
         sec2rad ← 4.8481368110953599359e¯6
         )dump

   and then I look at the test.apl file, I see

   sec2rad←0.00000484813681109536

   so I have lost five digits.

   I am tempted to use )DUMP instead of )SAVE as it stores workspaces in a more
   compact and easily readable form that does not become obsolete as new
   versions of GNU APL are released.


3. I am strongly opposed to the use of the axis parameter for passing arbitrary
   data to a function as a third argument.  This is very confusing to people
   trying to read the code.  When I see brackets, I expect the contents to be
   either a genuine axis specification or an index into an array.  A better
   approach would be to pass arguments in a nested array and then unpack them
   with a statement such as  (A B C) ← ARGUMENTS.  

   Alternatively, APL2 could    be extended to allow the use of data as
   operands for operators, as in J.  Then the operator operands could be used
   as third and fourth arguments.  That would allow #FIO and other such
   functions to be implemented in much the same way as the foreign conjunction
   in J.


4. ]boxing is very helpful.  


5. I would like to see #RE extended to support replacement operations with
   back-substitution as well as searches.  For example, one might enter

   TEXT ← ('"(\w)' '“$1') #RE['g'] TEXT

   to replace double quotes preceding words with "“".

   But I would prefer a syntax like

   TEXT ← '/"(\w)/“$1/g' #RE TEXT

   to avoid abusing the axis selector.

Thanks.

--- Brian

reply via email to

[Prev in Thread] Current Thread [Next in Thread]