Discussion:
[Bug-apl] Workspace and wslib? search path
Frederick Pitts
2017-06-26 04:07:49 UTC
Permalink
Hello Jürgen,

The apl.html doc indicates that if environment variable
APL_LIB_ROOT is not defined, the subject search path will be from the
current directory '.' up to the root directory '/' stopping when a
directory containing two directories ’workspaces’ and ’wslib1’ is
found.

The above does not work on my platform, Fedora 25. For
instance, 'plotsincos.xml' is in ../workspaces relative the current
directory.

)lib plotsincos

yields

IMPROPER LIBRARY REFERENCE 'plotsincos': No such file or directory

and

)lib 0 plotsincos

yields

IMPROPER LIBRARY REFERENCE '0': No such file or directory.

Is this a bug or has the feature been removed and the documentation is
out of date.

A related question is if the feature were to work correctly,
would the )libs command use the feature so its output reflects the
location of the library directory paths that will be used by the )lib
command. Currently, it does not.

Regards,

Fred
Juergen Sauermann
2017-06-26 10:11:00 UTC
Permalink
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Helvetica, Arial, sans-serif">Hi Fred,<br>
<br>
conceptually the <b>)libs</b> command shows the directories that
will be used<br>
for the different library numbers (ranging from 0-9 with 0 being
the default<br>
library number of none is given).<br>
<br>
The other (non-library number) argument of the lib command is a
directory, and<br>
to be distinguished from a library reference number it should
contain a /.<br>
<br>
I suppose the first thing going wrong in your examples below is
that the <b>)lib</b> argument<br>
seems to be a workspace name while the <b>)lib </b>command
expects either a library reference<br>
number like 0..9 <b>or </b>the path to a directory.<br>
<br>
So if <font face="Courier New, Courier, monospace"><b>../workspaces/
</b></font>contains workspace <b><font face="Courier New,
Courier, monospace">plotsincos.xml</font></b> then the command<br>
<br>
<font face="Courier New, Courier, monospace"><b>)lib ../workspaces</b></font><br>
<br>
should display it. For example:<br>
<br>
<font face="Courier New, Courier, monospace"><b>      )host pwd</b><b><br>
</b><b>/home/eedjsa/projects/juergen/apl-1.7/src</b><b><br>
</b><b><br>
</b><b>0 <br>
<br>
</b><b></b><b>      )lib ../</b><b><br>
</b><b>autom4te.cache/     debian/     debian_tmp/    
devel_doc/</b><b><br>
</b><b>doc/                erlang/     ftp-upload/    
gnu-apl.d/</b><b><br>
</b><b>html/               m4/         rpm/            src/</b><b><br>
</b><b>support-files/      tools/      web-home/      
workspaces/</b><b><br>
</b><b>wslib1/             wslib2/     wslib3/         wslib4/</b><b><br>
</b><b>wslib5/</b><b><br>
</b><b>      )lib ../workspaces</b><b><br>
</b><b>APL_CGI             LSQRL       RU1     RU2        
RUBIK   SCRIPT</b><b><br>
</b><b>ScalarBenchmark     XSudoku     sudoku  sudoku_DLX 
test    tt</b></font><br>
<br>
<br>
Now the locations of library directories can be specified in
different ways. The library root mechanism<br>
assumes a single directory that contains (at least) two
subdirectories named <b>workspaces</b> and <b>wslib1</b>.<br>
These names come from the IBM APL2 interpreter which is using a
similar scheme (but without giving<br>
any rules for it).<br>
<br>
GNU APL starts with this library root scheme, but each directory
can be overridden by either the system's<br>
preference file and/or the user's preference file. the )LIBS
command then tells how the library paths for<br>
the different library reference numbers were computed. For
example:<br>
<font face="Courier New, Courier, monospace"><b>---------------------------------------------------------------------------</b><b><br>
</b><b>Ref Conf 
Path                                                State  
Err</b><b><br>
</b><b>---------------------------------------------------------------------------</b><b><br>
</b><b> 0 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/workspaces present</b><b><br>
</b><b> 1 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib1     present</b><b><br>
</b><b> 2 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib2     missing
(2)</b><b><br>
</b><b> 3 PSYS 
/usr/local/lib/apl/wslib3                            present</b><b><br>
</b><b> 4 PSYS 
/usr/local/lib/apl/wslib4                            present</b><b><br>
</b><b> 5 PSYS 
/usr/local/lib/apl/wslib5                            present</b><b><br>
</b><b> 6 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib6     missing
(2)</b><b><br>
</b><b> 7 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib7     missing
(2)</b><b><br>
</b><b> 8 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib8     missing
(2)</b><b><br>
</b><b> 9 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib9     missing
(2)</b><b><br>
</b><b>===========================================================================</b></font><br>
<br>
This tells us that libraries 3, 4, and 5 were specified by PSYS
(system preferences file, e.g.<br>
<b>/usr/local/etc/gnu-apl.d/preferences</b>) while the others are
computed from the current directory (BIN).<br>
The State and Err columns tell if the directory is accessible and
the <b>errno</b> if not.<br>
<br>
If I remember correctly then the )lib command wants either a
library reference number (0-9) or a<br>
path, but not both. If it fails, then )more tells which directory
was tried (I fixed the spelling mistake)<br>
and the <b>strerror(errno)</b> of the failed operation:<br>
<br>
<font face="Courier New, Courier, monospace"><b>      )lib xxx</b><b><br>
</b><b>IMPROPER LIBRARY REFERENCE 'xxx': No such file or
directory</b><b><br>
</b><b>      )more</b><b><br>
</b><b>path 'xxx' could not be openend as directory: No such
file or directory</b><b><br>
</b><br>
</font>Best Regards,<br>
/// Jürgen<br>
<br>
</font><br>
<div class="moz-cite-prefix">On 06/26/2017 06:07 AM, Frederick Pitts
wrote:<br>
</div>
<blockquote cite="mid:***@comcast.net"
type="cite">
<pre wrap="">Hello Jürgen,

The apl.html doc indicates that if environment variable
APL_LIB_ROOT is not defined, the subject search path will be from the
current directory '.' up to the root directory '/' stopping when a
directory containing two directories ’workspaces’ and ’wslib1’ is
found.

The above does not work on my platform, Fedora 25. For
instance, 'plotsincos.xml' is in ../workspaces relative the current
directory.

)lib plotsincos

yields

IMPROPER LIBRARY REFERENCE 'plotsincos': No such file or directory

and

)lib 0 plotsincos

yields

IMPROPER LIBRARY REFERENCE '0': No such file or directory.

Is this a bug or has the feature been removed and the documentation is
out of date.

A related question is if the feature were to work correctly,
would the )libs command use the feature so its output reflects the
location of the library directory paths that will be used by the )lib
command. Currently, it does not.

Regards,

Fred


</pre>
</blockquote>
<br>
</body>
</html>
Frederick Pitts
2017-06-26 15:27:16 UTC
Permalink
Hello JÃŒrgen,
My bad.  In my original post, I should have typed `)load' where
I typed ')lib'.  Thanks for the detailed reply.  I can)save and )load
workspaces now.
But I'm still confused about the following three sentences from
`apl.html':
If an environment variable APL_LIB_ROOT is defined, then its value is
used as library-root. Otherwise the path from the current directory
(".") up to the root directory ("/") is searched until a directory
containing two files ’workspaces’ and ’wslib1’ is found. Normally
’workspaces’ and ’wslib1’are directories, but for the computation of
library-root files suffice.

This passage plus your explanation implies to me that if APL_LIB_ROOT
is unset and there are no overrides in the preferencefiles, an attempt
is made to determine the library-root by searching from the current
directory '.' up to the root directory '/', stopping when the two
directories or files `workspaces' and `wslib1' are found in the same
directory.  If this mechanism were to work the way I interpret the
passage,  as long as one works in subdirectories below one's library-
root directory, the 0 .. 9 library numbers are meaningful without
having to set APL_LIB_ROOT or preference override entries.  And one
would not have to use paths on the )lib and )load commands.
Regards,
Fred
    Hi Fred,
      
      conceptually the )libs command shows the directories that
      will be used
      for the different library numbers (ranging from 0-9 with 0
being
      the default
      library number of none is given).
      
      The other (non-library number) argument of the lib command is a
      directory, and
      to be distinguished from a library reference number it should
      contain a /.
      
      I suppose the first thing going wrong in your examples below is
      that the )lib argument
      seems to be a workspace name while the )lib command
      expects either a library reference
      number like 0..9 or the path to a directory.
      
      So if ../workspaces/
        contains workspace plotsincos.xml then the command
      
      )lib ../workspaces
      
      
            )host pwd
        /home/eedjsa/projects/juergen/apl-1.7/src
        
        0 
          
              )lib ../
        autom4te.cache/     debian/     debian_tmp/    
          devel_doc/
        doc/                erlang/     ftp-upload/    
          gnu-apl.d/
        html/               m4/         rpm/            src/
        support-files/      tools/      web-home/      
          workspaces/
        wslib1/             wslib2/     wslib3/         wslib4/
        wslib5/
              )lib ../workspaces
        APL_CGI             LSQRL       RU1     RU2        
          RUBIK   SCRIPT
        ScalarBenchmark     XSudoku     sudoku  sudoku_DLX 
          test    tt
      
      
      Now the locations of library directories can be specified in
      different ways. The library root mechanism
      assumes a single directory that contains (at least) two
      subdirectories named workspaces and wslib1.
      These names come from the IBM APL2 interpreter which is using a
      similar scheme (but without giving
      any rules for it).
      
      GNU APL starts with this library root scheme, but each
directory
      can be overridden by either the system's
      preference file and/or the user's preference file. the )LIBS
      command then tells how the library paths for
      the different library reference numbers were computed. For
      ---------------------------------------------------------------
------------
        Ref Conf 
          Path                                                State  
          Err
        -------------------------------------------------------------
--------------
         0 BIN  
          /home/eedjsa/projects/juergen/apl-1.7/src/workspaces
present
         1 BIN  
          /home/eedjsa/projects/juergen/apl-1.7/src/wslib1    
present
         2 BIN  
          /home/eedjsa/projects/juergen/apl-1.7/src/wslib2    
missing
          (2)
         3 PSYS 
          /usr/local/lib/apl/wslib3                           
present
         4 PSYS 
          /usr/local/lib/apl/wslib4                           
present
         5 PSYS 
          /usr/local/lib/apl/wslib5                           
present
         6 BIN  
          /home/eedjsa/projects/juergen/apl-1.7/src/wslib6    
missing
          (2)
         7 BIN  
          /home/eedjsa/projects/juergen/apl-1.7/src/wslib7    
missing
          (2)
         8 BIN  
          /home/eedjsa/projects/juergen/apl-1.7/src/wslib8    
missing
          (2)
         9 BIN  
          /home/eedjsa/projects/juergen/apl-1.7/src/wslib9    
missing
          (2)
        =============================================================
==============
      
      This tells us that libraries 3, 4, and 5 were specified by PSYS
      (system preferences file, e.g.
      /usr/local/etc/gnu-apl.d/preferences) while the others are
      computed from the current directory (BIN).
      The State and Err columns tell if the directory is accessible
and
      the errno if not.
      
      If I remember correctly then the )lib command wants either a
      library reference number (0-9) or a
      path, but not both. If it fails, then )more tells which
directory
      was tried (I fixed the spelling mistake)
      
            )lib xxx
        IMPROPER LIBRARY REFERENCE 'xxx': No such file or
          directory
              )more
        path 'xxx' could not be openend as directory: No such
          file or directory
        
      Best Regards,
      /// JÌrgen
      
    
    On 06/26/2017 06:07 AM, Frederick Pitts
    
    
      Hello JÌrgen,
The apl.html doc indicates that if environment variable
APL_LIB_ROOT is not defined, the subject search path will be from the
current directory '.' up to the root directory '/' stopping when a
directory containing two directories ’workspaces’ and ’wslib1’ is
found.
The above does not work on my platform, Fedora 25. For
instance, 'plotsincos.xml' is in ../workspaces relative the current
directory.
)lib plotsincos
yields
IMPROPER LIBRARY REFERENCE 'plotsincos': No such file or directory
and
)lib 0 plotsincos
yields
IMPROPER LIBRARY REFERENCE '0': No such file or directory.
Is this a bug or has the feature been removed and the documentation is
out of date.
A related question is if the feature were to work correctly,
would the )libs command use the feature so its output reflects the
location of the library directory paths that will be used by the )lib
command.  Currently, it does not.
Regards,
Fred
    
    
  
Juergen Sauermann
2017-06-26 16:05:11 UTC
Permalink
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Helvetica, Arial, sans-serif">Hi Fred,<br>
<br>
correct. In <b>APL_LIB_ROOT</b> is not set and no preferences
override any library paths, then<br>
the first library above ./ that contains two files or sub-dirs
named workspaces and wslib1 is<br>
chosen as the library root.<br>
<br>
The code is in file <b>LibPaths.cc</b> function <b>LibPaths::search_APL_lib_root()</b><br>
<br>
</font>Hope it works,<br>
/// Jürgen<br>
<br>
<br>
<div class="moz-cite-prefix">On 06/26/2017 05:27 PM, Frederick Pitts
wrote:<br>
</div>
<blockquote cite="mid:***@comcast.net"
type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<div>Hello <span style="font-family: Helvetica, Arial,
sans-serif;">Jürgen,</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"><br>
</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"> My
bad. In my original post, I should have typed `)load' where I
typed ')lib'. Thanks for the detailed reply. I can</span></div>
<div>)save and )load workspaces now.</div>
<div><br>
</div>
<div> But I'm still confused about the following three sentences
from `apl.html':</div>
<div><br>
</div>
<div>If an environment variable APL_LIB_ROOT is defined, then its
value is used as library-root. Otherwise the path from the
current directory (".") up to the root directory ("/") is
searched until a directory containing two files ’workspaces’ and
’wslib1’ is found. Normally ’workspaces’ and ’wslib1’are
directories, but for the computation of library-root files
suffice.
<br>
</div>
<div>This passage plus your explanation implies to me that if
APL_LIB_ROOT is unset and there are no overrides in the
preference</div>
<div>files, an attempt is made to determine the library-root by
searching from the current directory '.' up to the root
directory '/', stopping when the two directories or files
`workspaces' and `wslib1' are found in the same directory. If
this mechanism were to work the way I interpret the passage, as
long as one works in subdirectories below one's library-root
directory, the 0 .. 9 library numbers are meaningful without
having to set APL_LIB_ROOT or preference override entries. And
one would not have to use paths on the )lib and )load commands.</div>
<div><br>
</div>
<div>Regards,</div>
<div><br>
</div>
<div>Fred</div>
<div><br>
</div>
<div>On Mon, 2017-06-26 at 12:11 +0200, Juergen Sauermann wrote:</div>
<blockquote type="cite"> <font face="Helvetica, Arial,
sans-serif">Hi Fred,<br>
<br>
conceptually the <b>)libs</b> command shows the directories
that will be used<br>
for the different library numbers (ranging from 0-9 with 0
being the default<br>
library number of none is given).<br>
<br>
The other (non-library number) argument of the lib command is
a directory, and<br>
to be distinguished from a library reference number it should
contain a /.<br>
<br>
I suppose the first thing going wrong in your examples below
is that the <b>)lib</b> argument<br>
seems to be a workspace name while the <b>)lib </b>command
expects either a library reference<br>
number like 0..9 <b>or </b>the path to a directory.<br>
<br>
So if <font face="Courier New, Courier, monospace"><b>../workspaces/
</b></font>contains workspace <b><font face="Courier New,
Courier, monospace">plotsincos.xml</font></b> then the
command<br>
<br>
<font face="Courier New, Courier, monospace"><b>)lib
../workspaces</b></font><br>
<br>
should display it. For example:<br>
<br>
<font face="Courier New, Courier, monospace"><b>      )host
pwd</b><b><br>
</b><b>/home/eedjsa/projects/juergen/apl-1.7/src</b><b><br>
</b><b><br>
</b><b>0 <br>
<br>
</b><b>      )lib ../</b><b><br>
</b><b>autom4te.cache/     debian/     debian_tmp/    
devel_doc/</b><b><br>
</b><b>doc/                erlang/     ftp-upload/    
gnu-apl.d/</b><b><br>
</b><b>html/               m4/         rpm/            src/</b><b><br>
</b><b>support-files/      tools/      web-home/      
workspaces/</b><b><br>
</b><b>wslib1/             wslib2/     wslib3/        
wslib4/</b><b><br>
</b><b>wslib5/</b><b><br>
</b><b>      )lib ../workspaces</b><b><br>
</b><b>APL_CGI             LSQRL       RU1     RU2        
RUBIK   SCRIPT</b><b><br>
</b><b>ScalarBenchmark     XSudoku     sudoku  sudoku_DLX 
test    tt</b></font><br>
<br>
<br>
Now the locations of library directories can be specified in
different ways. The library root mechanism<br>
assumes a single directory that contains (at least) two
subdirectories named <b>workspaces</b> and <b>wslib1</b>.<br>
These names come from the IBM APL2 interpreter which is using
a similar scheme (but without giving<br>
any rules for it).<br>
<br>
GNU APL starts with this library root scheme, but each
directory can be overridden by either the system's<br>
preference file and/or the user's preference file. the )LIBS
command then tells how the library paths for<br>
the different library reference numbers were computed. For
example:<br>
<font face="Courier New, Courier, monospace"><b>---------------------------------------------------------------------------</b><b><br>
</b><b>Ref Conf 
Path                                               
State   Err</b><b><br>
</b><b>---------------------------------------------------------------------------</b><b><br>
</b><b> 0 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/workspaces
present</b><b><br>
</b><b> 1 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib1    
present</b><b><br>
</b><b> 2 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib2    
missing (2)</b><b><br>
</b><b> 3 PSYS 
/usr/local/lib/apl/wslib3                           
present</b><b><br>
</b><b> 4 PSYS 
/usr/local/lib/apl/wslib4                           
present</b><b><br>
</b><b> 5 PSYS 
/usr/local/lib/apl/wslib5                           
present</b><b><br>
</b><b> 6 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib6    
missing (2)</b><b><br>
</b><b> 7 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib7    
missing (2)</b><b><br>
</b><b> 8 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib8    
missing (2)</b><b><br>
</b><b> 9 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib9    
missing (2)</b><b><br>
</b><b>===========================================================================</b></font><br>
<br>
This tells us that libraries 3, 4, and 5 were specified by
PSYS (system preferences file, e.g.<br>
<b>/usr/local/etc/gnu-apl.d/preferences</b>) while the others
are computed from the current directory (BIN).<br>
The State and Err columns tell if the directory is accessible
and the <b>errno</b> if not.<br>
<br>
If I remember correctly then the )lib command wants either a
library reference number (0-9) or a<br>
path, but not both. If it fails, then )more tells which
directory was tried (I fixed the spelling mistake)<br>
and the <b>strerror(errno)</b> of the failed operation:<br>
<br>
<font face="Courier New, Courier, monospace"><b>      )lib xxx</b><b><br>
</b><b>IMPROPER LIBRARY REFERENCE 'xxx': No such file or
directory</b><b><br>
</b><b>      )more</b><b><br>
</b><b>path 'xxx' could not be openend as directory: No such
file or directory</b><b><br>
</b><br>
</font>Best Regards,<br>
/// Jürgen<br>
<br>
</font><br>
<div class="moz-cite-prefix">On 06/26/2017 06:07 AM, Frederick
Pitts wrote:<br>
</div>
<blockquote cite="mid:***@comcast.net"
type="cite">
<pre wrap="">Hello Jürgen,

The apl.html doc indicates that if environment variable
APL_LIB_ROOT is not defined, the subject search path will be from the
current directory '.' up to the root directory '/' stopping when a
directory containing two directories ’workspaces’ and ’wslib1’ is
found.

The above does not work on my platform, Fedora 25. For
instance, 'plotsincos.xml' is in ../workspaces relative the current
directory.

)lib plotsincos

yields

IMPROPER LIBRARY REFERENCE 'plotsincos': No such file or directory

and

)lib 0 plotsincos

yields

IMPROPER LIBRARY REFERENCE '0': No such file or directory.

Is this a bug or has the feature been removed and the documentation is
out of date.

A related question is if the feature were to work correctly,
would the )libs command use the feature so its output reflects the
location of the library directory paths that will be used by the )lib
command. Currently, it does not.

Regards,

Fred


</pre>
</blockquote>
<br>
</blockquote>
</blockquote>
<br>
</body>
</html>
Frederick Pitts
2017-06-26 16:28:54 UTC
Permalink
Hello JÌrgen,


It doesn't on Fedora 25 as evidenced by following transcript:


      )host pwd/home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode
0      )host ls -d ../../{workspaces,wslib?}
../../workspaces../../wslib1../../wslib2../../wslib6../../wslib7../../w
slib8../../wslib9
0
      )host ls -l ../../workspaces/plotsincos.xml
-rw-r--r-- 1 fred fred 21284 Jun 21 11:47
../../workspaces/plotsincos.xml
0
      )load 0 plotsincos
)LOAD plotsincos (file
/home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/workspaces/plotsi
ncos) failed: No such file or directory
     )libs
Library root: /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode
Library reference number mapping:
---------------------------------------------------------------------
------
Ref
Conf  Path                                                State   Err
---------------------------------------------------------------------
------
 0
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/workspaces
missing (2)
 1 BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib1
missing (2)
 2 BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib2
missing (2)
 3 PSYS  /usr/local/lib/apl/wslib3                            present
 4 PSYS  /usr/local/lib/apl/wslib4                            present
 5 PSYS  /usr/local/lib/apl/wslib5                            present
 6 BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib6
missing (2)
 7 BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib7
missing (2)
 8 BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib8
missing (2)
 9 BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib9
missing (2)
=======================================================================
====
APL_LIB_ROOT is not set and there are no override entries in the
preference files other than for library 3, 4 and 5 in thesystem
preference file.
Regards,
Fred
    Hi Fred,
      
      correct. In APL_LIB_ROOT is not set and no preferences
      override any library paths, then
      the first library above ./ that contains two files or sub-dirs
      named workspaces and wslib1 is
      chosen as the library root.
      
      The code is in file LibPaths.cc function
LibPaths::search_APL_lib_root()
      
    Hope it works,
    /// JÌrgen
    
    
    On 06/26/2017 05:27 PM, Frederick Pitts
    
    
      
      Hello JÌrgen,
      
        
       My
          bad. In my original post, I should have typed `)load'
where I
          typed ')lib'. Thanks for the detailed reply. I can
      )save and )load workspaces now.
      
      
       But I'm still confused about the following three sentences
      
      
      If an environment variable APL_LIB_ROOT is defined, then its
        value is used as library-root. Otherwise the path from the
        current directory (".") up to the root directory ("/") is
        searched until a directory containing two files
’workspaces’ and
        ’wslib1’ is found. Normally ’workspaces’ and ’wslib1’are
        directories, but for the computation of library-root files
        suffice.
        
      
      This passage plus your explanation implies to me that if
        APL_LIB_ROOT is unset and there are no overrides in the
        preference
      files, an attempt is made to determine the library-root by
        searching from the current directory '.' up to the root
        directory '/', stopping when the two directories or files
        `workspaces' and `wslib1' are found in the same directory.
If
        this mechanism were to work the way I interpret the
passage, as
        long as one works in subdirectories below one's library-
root
        directory, the 0 .. 9 library numbers are meaningful
without
        having to set APL_LIB_ROOT or preference override entries.
And
        one would not have to use paths on the )lib and )load
commands.
      
      
      Regards,
      
      
      Fred
      
      
      
 Hi Fred,
          
          conceptually the )libs command shows the directories
          that will be used
          for the different library numbers (ranging from 0-9
with 0
          being the default
          library number of none is given).
          
          The other (non-library number) argument of the lib
command is
          a directory, and
          to be distinguished from a library reference number it
should
          contain a /.
          
          I suppose the first thing going wrong in your examples
below
          is that the )lib argument
          seems to be a workspace name while the )lib command
          expects either a library reference
          number like 0..9 or the path to a directory.
          
          So if ../workspaces/
            contains workspace plotsincos.xml then the
          command
          
          )lib
              ../workspaces
          
          
                )host
              pwd
            /home/eedjsa/projects/juergen/apl-1.7/src
            
            0 
              
                  )lib ../
            autom4te.cache/     debian/     debian_tmp/    
              devel_doc/
            doc/                erlang/     ftp-upload/    
              gnu-apl.d/
            html/               m4/         rpm/            src/
            support-files/      tools/      web-home/      
              workspaces/
            wslib1/             wslib2/     wslib3/        
              wslib4/
            wslib5/
                  )lib ../workspaces
            APL_CGI             LSQRL       RU1     RU2        
              RUBIK   SCRIPT
            ScalarBenchmark     XSudoku     sudoku  sudoku_DLX 
              test    tt
          
          
          Now the locations of library directories can be
specified in
          different ways. The library root mechanism
          assumes a single directory that contains (at least) two
          subdirectories named workspaces and wslib1.
          These names come from the IBM APL2 interpreter which is
using
          a similar scheme (but without giving
          any rules for it).
          
          GNU APL starts with this library root scheme, but each
          directory can be overridden by either the system's
          preference file and/or the user's preference file. the
)LIBS
          command then tells how the library paths for
          the different library reference numbers were computed.
For
          -------------------------------------------------------
--------------------
            Ref Conf 
              Path                                               
              State   Err
            -----------------------------------------------------
----------------------
             0 BIN  
              /home/eedjsa/projects/juergen/apl-
1.7/src/workspaces
              present
             1 BIN  
              /home/eedjsa/projects/juergen/apl-
1.7/src/wslib1    
              present
             2 BIN  
              /home/eedjsa/projects/juergen/apl-
1.7/src/wslib2    
              missing (2)
             3 PSYS 
              /usr/local/lib/apl/wslib3                          
 
              present
             4 PSYS 
              /usr/local/lib/apl/wslib4                          
 
              present
             5 PSYS 
              /usr/local/lib/apl/wslib5                          
 
              present
             6 BIN  
              /home/eedjsa/projects/juergen/apl-
1.7/src/wslib6    
              missing (2)
             7 BIN  
              /home/eedjsa/projects/juergen/apl-
1.7/src/wslib7    
              missing (2)
             8 BIN  
              /home/eedjsa/projects/juergen/apl-
1.7/src/wslib8    
              missing (2)
             9 BIN  
              /home/eedjsa/projects/juergen/apl-
1.7/src/wslib9    
              missing (2)
            =====================================================
======================
          
          This tells us that libraries 3, 4, and 5 were specified
by
          PSYS (system preferences file, e.g.
          /usr/local/etc/gnu-apl.d/preferences) while the others
          are computed from the current directory (BIN).
          The State and Err columns tell if the directory is
accessible
          and the errno if not.
          
          If I remember correctly then the )lib command wants
either a
          library reference number (0-9) or a
          path, but not both. If it fails, then )more tells which
          directory was tried (I fixed the spelling mistake)
          
                )lib xxx
            IMPROPER LIBRARY REFERENCE 'xxx': No such file or
              directory
                  )more
            path 'xxx' could not be openend as directory: No such
              file or directory
            
          Best Regards,
          /// JÌrgen
          
        
        On 06/26/2017 06:07 AM, Frederick
        
        
          Hello JÌrgen,
The apl.html doc indicates that if environment variable
APL_LIB_ROOT is not defined, the subject search path will be from the
current directory '.' up to the root directory '/' stopping when a
directory containing two directories ’workspaces’ and ’wslib1’
is
found.
The above does not work on my platform, Fedora 25. For
instance, 'plotsincos.xml' is in ../workspaces relative the current
directory.
)lib plotsincos
yields
IMPROPER LIBRARY REFERENCE 'plotsincos': No such file or
directory
and
)lib 0 plotsincos
yields
IMPROPER LIBRARY REFERENCE '0': No such file or directory.
Is this a bug or has the feature been removed and the
documentation is
out of date.
A related question is if the feature were to work
correctly,
would the )libs command use the feature so its output reflects the
location of the library directory paths that will be used by the )lib
command.  Currently, it does not.
Regards,
Fred
        
        
      
    
    
  
Juergen Sauermann
2017-06-26 19:03:15 UTC
Permalink
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Helvetica, Arial, sans-serif">Hi Fred,<br>
<br>
thanks, fixed in <b>SVN 973</b>.<br>
<br>
I appears as if <b>realpath(</b>) does not like it if the input
buffer is the same as the<br>
output buffer.<br>
<br>
/// Jürgen<br>
<br>
<br>
</font><br>
<div class="moz-cite-prefix">On 06/26/2017 06:28 PM, Frederick Pitts
wrote:<br>
</div>
<blockquote cite="mid:***@comcast.net"
type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<div>Hello <span style="font-family: Helvetica, Arial,
sans-serif;">Jürgen,</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"><br>
</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"> It
doesn't on Fedora 25 as evidenced by following transcript:</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"><br>
</span></div>
<span style="font-family: Helvetica, Arial, sans-serif;">      )host
pwd</span>
<div><span style="font-family: Helvetica, Arial, sans-serif;">/home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode</span><span
style="font-family: Helvetica, Arial, sans-serif;"><br>
</span><span style="font-family: Helvetica, Arial, sans-serif;">0</span>
<div><span style="font-family: Helvetica, Arial, sans-serif;"> </span><span
style="font-family: Helvetica, Arial, sans-serif;">   
 )host ls -d ../../{workspaces,wslib?}</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;">../../workspaces</span><span
style="font-family: Helvetica, Arial, sans-serif;">../../wslib1</span><span
style="font-family: Helvetica, Arial, sans-serif;">../../wslib2</span><span
style="font-family: Helvetica, Arial, sans-serif;">../../wslib6</span><span
style="font-family: Helvetica, Arial, sans-serif;">../../wslib7</span><span
style="font-family: Helvetica, Arial, sans-serif;">../../wslib8</span><span
style="font-family: Helvetica, Arial, sans-serif;">../../wslib9</span><span
style="font-family: Helvetica, Arial, sans-serif;"><br>
</span><span style="font-family: Helvetica, Arial,
sans-serif;">0</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"> 
    )host ls -l ../../workspaces/plotsincos.xml</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;">-rw-r--r--
1 fred fred 21284 Jun 21 11:47
../../workspaces/plotsincos.xml</span><span
style="font-family: Helvetica, Arial, sans-serif;"><br>
</span><span style="font-family: Helvetica, Arial,
sans-serif;">0</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"> 
    )load 0 plotsincos</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;">)LOAD
plotsincos (file
/home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/workspaces/plotsincos)
failed: No such file or directory</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"> 
   )libs</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;">Library
root: /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode</span><span
style="font-family: Helvetica, Arial, sans-serif;"><br>
</span><span style="font-family: Helvetica, Arial,
sans-serif;">Library reference number mapping:</span><span
style="font-family: Helvetica, Arial, sans-serif;"><br>
</span><span style="font-family: Helvetica, Arial,
sans-serif;">---------------------------------------------------------------------------</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;">Ref
Conf  Path                                                State   Err</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;">---------------------------------------------------------------------------</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"> 0
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/workspaces
missing (2)</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"> 1
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib1
missing (2)</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"> 2
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib2
missing (2)</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"> 3
PSYS  /usr/local/lib/apl/wslib3                            present</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"> 4
PSYS  /usr/local/lib/apl/wslib4                            present</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"> 5
PSYS  /usr/local/lib/apl/wslib5                            present</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"> 6
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib6
missing (2)</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"> 7
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib7
missing (2)</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"> 8
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib8
missing (2)</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"> 9
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib9
missing (2)</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;">===========================================================================</span>
<div><span style="font-family: Helvetica, Arial, sans-serif;"><br>
</span></div>
<div>APL_LIB_ROOT is not set and there are no override entries
in the preference files other than for library 3, 4 and 5 in
the</div>
<div>system preference file.</div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"><br>
</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;">Regards,</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"><br>
</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;">Fred</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"><br>
</span></div>
<div>On Mon, 2017-06-26 at 18:05 +0200, Juergen Sauermann
wrote:</div>
<blockquote type="cite"> <font face="Helvetica, Arial,
sans-serif">Hi Fred,<br>
<br>
correct. In <b>APL_LIB_ROOT</b> is not set and no
preferences override any library paths, then<br>
the first library above ./ that contains two files or
sub-dirs named workspaces and wslib1 is<br>
chosen as the library root.<br>
<br>
The code is in file <b>LibPaths.cc</b> function <b>LibPaths::search_APL_lib_root()</b><br>
<br>
</font>Hope it works,<br>
/// Jürgen<br>
<br>
<br>
<div class="moz-cite-prefix">On 06/26/2017 05:27 PM,
Frederick Pitts wrote:<br>
</div>
<blockquote cite="mid:***@comcast.net"
type="cite">
<div>Hello <span style="font-family: Helvetica, Arial,
sans-serif;">Jürgen,</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"><br>
</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"> My bad. In my original post, I should
have typed `)load' where I typed ')lib'. Thanks for
the detailed reply. I can</span></div>
<div>)save and )load workspaces now.</div>
<div><br>
</div>
<div> But I'm still confused about the following three
sentences from `apl.html':</div>
<div><br>
</div>
<div>If an environment variable APL_LIB_ROOT is defined,
then its value is used as library-root. Otherwise the
path from the current directory (".") up to the root
directory ("/") is searched until a directory containing
two files ’workspaces’ and ’wslib1’ is found. Normally
’workspaces’ and ’wslib1’are directories, but for the
computation of library-root files suffice. <br>
</div>
<div>This passage plus your explanation implies to me that
if APL_LIB_ROOT is unset and there are no overrides in
the preference</div>
<div>files, an attempt is made to determine the
library-root by searching from the current directory '.'
up to the root directory '/', stopping when the two
directories or files `workspaces' and `wslib1' are found
in the same directory. If this mechanism were to work
the way I interpret the passage, as long as one works in
subdirectories below one's library-root directory, the 0
.. 9 library numbers are meaningful without having to
set APL_LIB_ROOT or preference override entries. And one
would not have to use paths on the )lib and )load
commands.</div>
<div><br>
</div>
<div>Regards,</div>
<div><br>
</div>
<div>Fred</div>
<div><br>
</div>
<div>On Mon, 2017-06-26 at 12:11 +0200, Juergen Sauermann
wrote:</div>
<blockquote type="cite"> <font face="Helvetica, Arial,
sans-serif">Hi Fred,<br>
<br>
conceptually the <b>)libs</b> command shows the
directories that will be used<br>
for the different library numbers (ranging from 0-9
with 0 being the default<br>
library number of none is given).<br>
<br>
The other (non-library number) argument of the lib
command is a directory, and<br>
to be distinguished from a library reference number it
should contain a /.<br>
<br>
I suppose the first thing going wrong in your examples
below is that the <b>)lib</b> argument<br>
seems to be a workspace name while the <b>)lib </b>command
expects either a library reference<br>
number like 0..9 <b>or </b>the path to a directory.<br>
<br>
So if <font face="Courier New, Courier, monospace"><b>../workspaces/
</b></font>contains workspace <b><font
face="Courier New, Courier, monospace">plotsincos.xml</font></b>
then the command<br>
<br>
<font face="Courier New, Courier, monospace"><b>)lib
../workspaces</b></font><br>
<br>
should display it. For example:<br>
<br>
<font face="Courier New, Courier, monospace"><b>     
)host pwd</b><b><br>
</b><b>/home/eedjsa/projects/juergen/apl-1.7/src</b><b><br>
</b><b><br>
</b><b>0 <br>
<br>
</b><b>      )lib ../</b><b><br>
</b><b>autom4te.cache/     debian/    
debian_tmp/     devel_doc/</b><b><br>
</b><b>doc/                erlang/    
ftp-upload/     gnu-apl.d/</b><b><br>
</b><b>html/               m4/        
rpm/            src/</b><b><br>
</b><b>support-files/      tools/     
web-home/       workspaces/</b><b><br>
</b><b>wslib1/             wslib2/    
wslib3/         wslib4/</b><b><br>
</b><b>wslib5/</b><b><br>
</b><b>      )lib ../workspaces</b><b><br>
</b><b>APL_CGI             LSQRL       RU1    
RU2         RUBIK   SCRIPT</b><b><br>
</b><b>ScalarBenchmark     XSudoku     sudoku 
sudoku_DLX  test    tt</b></font><br>
<br>
<br>
Now the locations of library directories can be
specified in different ways. The library root
mechanism<br>
assumes a single directory that contains (at least)
two subdirectories named <b>workspaces</b> and <b>wslib1</b>.<br>
These names come from the IBM APL2 interpreter which
is using a similar scheme (but without giving<br>
any rules for it).<br>
<br>
GNU APL starts with this library root scheme, but each
directory can be overridden by either the system's<br>
preference file and/or the user's preference file. the
)LIBS command then tells how the library paths for<br>
the different library reference numbers were computed.
For example:<br>
<font face="Courier New, Courier, monospace"><b>---------------------------------------------------------------------------</b><b><br>
</b><b>Ref Conf 
Path                                               
State   Err</b><b><br>
</b><b>---------------------------------------------------------------------------</b><b><br>
</b><b> 0 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/workspaces
present</b><b><br>
</b><b> 1 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib1    
present</b><b><br>
</b><b> 2 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib2    
missing (2)</b><b><br>
</b><b> 3 PSYS 
/usr/local/lib/apl/wslib3                           
present</b><b><br>
</b><b> 4 PSYS 
/usr/local/lib/apl/wslib4                           
present</b><b><br>
</b><b> 5 PSYS 
/usr/local/lib/apl/wslib5                           
present</b><b><br>
</b><b> 6 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib6    
missing (2)</b><b><br>
</b><b> 7 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib7    
missing (2)</b><b><br>
</b><b> 8 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib8    
missing (2)</b><b><br>
</b><b> 9 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib9    
missing (2)</b><b><br>
</b><b>===========================================================================</b></font><br>
<br>
This tells us that libraries 3, 4, and 5 were
specified by PSYS (system preferences file, e.g.<br>
<b>/usr/local/etc/gnu-apl.d/preferences</b>) while the
others are computed from the current directory (BIN).<br>
The State and Err columns tell if the directory is
accessible and the <b>errno</b> if not.<br>
<br>
If I remember correctly then the )lib command wants
either a library reference number (0-9) or a<br>
path, but not both. If it fails, then )more tells
which directory was tried (I fixed the spelling
mistake)<br>
and the <b>strerror(errno)</b> of the failed
operation:<br>
<br>
<font face="Courier New, Courier, monospace"><b>     
)lib xxx</b><b><br>
</b><b>IMPROPER LIBRARY REFERENCE 'xxx': No such
file or directory</b><b><br>
</b><b>      )more</b><b><br>
</b><b>path 'xxx' could not be openend as directory:
No such file or directory</b><b><br>
</b><br>
</font>Best Regards,<br>
/// Jürgen<br>
<br>
</font><br>
<div class="moz-cite-prefix">On 06/26/2017 06:07 AM,
Frederick Pitts wrote:<br>
</div>
<blockquote
cite="mid:***@comcast.net"
type="cite">
<pre wrap="">Hello Jürgen,

The apl.html doc indicates that if environment variable
APL_LIB_ROOT is not defined, the subject search path will be from the
current directory '.' up to the root directory '/' stopping when a
directory containing two directories ’workspaces’ and ’wslib1’ is
found.

The above does not work on my platform, Fedora 25. For
instance, 'plotsincos.xml' is in ../workspaces relative the current
directory.

)lib plotsincos

yields

IMPROPER LIBRARY REFERENCE 'plotsincos': No such file or directory

and

)lib 0 plotsincos

yields

IMPROPER LIBRARY REFERENCE '0': No such file or directory.

Is this a bug or has the feature been removed and the documentation is
out of date.

A related question is if the feature were to work correctly,
would the )libs command use the feature so its output reflects the
location of the library directory paths that will be used by the )lib
command. Currently, it does not.

Regards,

Fred


</pre>
</blockquote>
<br>
</blockquote>
</blockquote>
<br>
</blockquote>
</div>
</div>
</blockquote>
<br>
</body>
</html>
Frederick Pitts
2017-06-26 20:02:08 UTC
Permalink
Hello JÃŒrgen,
Thank you.  It works great.  But did you intend to leave output
statements in the code that on start up produces outputlike
APL_lib_root:        '/home/fred/Sandbox/APL/MathUtils' at
LibPaths.cc:184APL_lib_root:        '/home/fred/Sandbox/APL/MathUtils'
at LibPaths.cc:187is_lib_root(APL_lib_root): '0' at
LibPaths.cc:188APL_lib_root:        '/home/fred/Sandbox/APL' at
LibPaths.cc:187is_lib_root(APL_lib_root): '1' at LibPaths.cc:188
Regards,
Fred
    Hi Fred,
      
      thanks, fixed in SVN 973.
      
      I appears as if realpath() does not like it if the input
      buffer is the same as the
      output buffer.
      
      /// JÌrgen
      
      
    
    On 06/26/2017 06:28 PM, Frederick Pitts
    
    
      
      Hello JÌrgen,
      
        
       It
          doesn't on Fedora 25 as evidenced by following
      
        
            )host
        pwd
      /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode
        0
            
             )host ls -d ../../{workspaces,wslib?}
        ../../workspaces../../wslib1../../wslib2../../wslib6../../w
slib7../../wslib8../../wslib9
          0
         
                )host ls -l ../../workspaces/plotsincos.xml
        -rw-r--r--
            1 fred fred 21284 Jun 21 11:47
            ../../workspaces/plotsincos.xml
          0
         
                )load 0 plotsincos
        )LOAD
            plotsincos (file
/home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/workspaces/pl
otsincos)
            failed: No such file or directory
         
               )libs
        Library
/home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode
          ---------------------------------------------------------
------------------
        Ref
Conf  Path                                                State   E
rr
        -----------------------------------------------------------
----------------
         0
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/workspa
ces
            missing (2)
         1
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib1
            missing (2)
         2
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib2
            missing (2)
         3
PSYS  /usr/local/lib/apl/wslib3                            present
         4
PSYS  /usr/local/lib/apl/wslib4                            present
         5
PSYS  /usr/local/lib/apl/wslib5                            present
         6
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib6
            missing (2)
         7
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib7
            missing (2)
         8
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib8
            missing (2)
         9
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib9
            missing (2)
        ===========================================================
================
          
            
          APL_LIB_ROOT is not set and there are no override entries
            in the preference files other than for library 3, 4 and
5 in
            the
          system preference file.
          
            
          Regards,
          
            
          Fred
          
            
          On Mon, 2017-06-26 at 18:05 +0200, Juergen Sauermann
          
 Hi Fred,
              
              correct. In APL_LIB_ROOT is not set and no
              preferences override any library paths, then
              the first library above ./ that contains two files
or
              sub-dirs named workspaces and wslib1 is
              chosen as the library root.
              
              The code is in file LibPaths.cc function
LibPaths::search_APL_lib_root()
              
            Hope it works,
            /// JÌrgen
            
            
            On 06/26/2017 05:27 PM,
            
            
              Hello JÌrgen,
              
                
               My bad. In my original post, I should
                  have typed `)load' where I typed ')lib'.
Thanks for
                  the detailed reply. I can
              )save and )load workspaces now.
              
              
               But I'm still confused about the following three
              
              
              If an environment variable APL_LIB_ROOT is
defined,
                then its value is used as library-root.
Otherwise the
                path from the current directory (".") up to the
root
                directory ("/") is searched until a directory
containing
                two files ’workspaces’ and ’wslib1’ is found.
Normally
                ’workspaces’ and ’wslib1’are directories, but
for the
                computation of library-root files suffice. 
              
              This passage plus your explanation implies to me
that
                if APL_LIB_ROOT is unset and there are no
overrides in
                the preference
              files, an attempt is made to determine the
                library-root by searching from the current
directory '.'
                up to the root directory '/', stopping when the
two
                directories or files `workspaces' and `wslib1'
are found
                in the same directory. If this mechanism were
to work
                the way I interpret the passage, as long as one
works in
                subdirectories below one's library-root
directory, the 0
                .. 9 library numbers are meaningful without
having to
                set APL_LIB_ROOT or preference override
entries. And one
                would not have to use paths on the )lib and
)load
                commands.
              
              
              Regards,
              
              
              Fred
              
              
              On Mon, 2017-06-26 at 12:11 +0200, Juergen
Sauermann
              
 Hi Fred,
                  
                  conceptually the )libs command shows the
                  directories that will be used
                  for the different library numbers (ranging
from 0-9
                  with 0 being the default
                  library number of none is given).
                  
                  The other (non-library number) argument of
the lib
                  command is a directory, and
                  to be distinguished from a library
reference number it
                  should contain a /.
                  
                  I suppose the first thing going wrong in
your examples
                  below is that the )lib argument
                  seems to be a workspace name while the )lib
command
                  expects either a library reference
                  number like 0..9 or the path to a
directory.
                  
                  So if ../workspaces/
                    contains workspace plotsincos.xml
                  then the command
                  
                  )lib
                      ../workspaces
                  
                  
                       
                      )host pwd
                    /home/eedjsa/projects/juergen/apl-1.7/src
                    
                    0 
                      
                          )lib ../
                    autom4te.cache/     debian/    
                      debian_tmp/     devel_doc/
                    doc/                erlang/    
                      ftp-upload/     gnu-apl.d/
                    html/               m4/        
                      rpm/            src/
                    support-files/      tools/     
                      web-home/       workspaces/
                    wslib1/             wslib2/    
                      wslib3/         wslib4/
                    wslib5/
                          )lib ../workspaces
                    APL_CGI             LSQRL       RU1    
                      RU2         RUBIK   SCRIPT
                    ScalarBenchmark     XSudoku     sudoku 
                      sudoku_DLX  test    tt
                  
                  
                  Now the locations of library directories
can be
                  specified in different ways. The library
root
                  mechanism
                  assumes a single directory that contains
(at least)
                  two subdirectories named workspaces and
wslib1.
                  These names come from the IBM APL2
interpreter which
                  is using a similar scheme (but without
giving
                  any rules for it).
                  
                  GNU APL starts with this library root
scheme, but each
                  directory can be overridden by either the
system's
                  preference file and/or the user's
preference file. the
                  )LIBS command then tells how the library
paths for
                  the different library reference numbers
were computed.
                  -------------------------------------------
--------------------------------
                    Ref Conf 
                      Path                                   
            
                      State   Err
                    -----------------------------------------
----------------------------------
                     0 BIN  
                      /home/eedjsa/projects/juergen/apl-
1.7/src/workspaces
                      present
                     1 BIN  
                      /home/eedjsa/projects/juergen/apl-
1.7/src/wslib1    
                      present
                     2 BIN  
                      /home/eedjsa/projects/juergen/apl-
1.7/src/wslib2    
                      missing (2)
                     3 PSYS 
                      /usr/local/lib/apl/wslib3              
             
                      present
                     4 PSYS 
                      /usr/local/lib/apl/wslib4              
             
                      present
                     5 PSYS 
                      /usr/local/lib/apl/wslib5              
             
                      present
                     6 BIN  
                      /home/eedjsa/projects/juergen/apl-
1.7/src/wslib6    
                      missing (2)
                     7 BIN  
                      /home/eedjsa/projects/juergen/apl-
1.7/src/wslib7    
                      missing (2)
                     8 BIN  
                      /home/eedjsa/projects/juergen/apl-
1.7/src/wslib8    
                      missing (2)
                     9 BIN  
                      /home/eedjsa/projects/juergen/apl-
1.7/src/wslib9    
                      missing (2)
                    =========================================
==================================
                  
                  This tells us that libraries 3, 4, and 5
were
                  specified by PSYS (system preferences file,
e.g.
                  /usr/local/etc/gnu-apl.d/preferences) while
the
                  others are computed from the current
directory (BIN).
                  The State and Err columns tell if the
directory is
                  accessible and the errno if not.
                  
                  If I remember correctly then the )lib
command wants
                  either a library reference number (0-9) or
a
                  path, but not both. If it fails, then )more
tells
                  which directory was tried (I fixed the
spelling
                  mistake)
                  and the strerror(errno) of the failed
                  
                       
                      )lib xxx
                    IMPROPER LIBRARY REFERENCE 'xxx': No such
                      file or directory
                          )more
                    path 'xxx' could not be openend as
                      No such file or directory
                    
                  Best Regards,
                  /// JÌrgen
                  
                
                On 06/26/2017 06:07 AM,
                
                
                  Hello JÌrgen,
The apl.html doc indicates that if environment variable
APL_LIB_ROOT is not defined, the subject search path will be from the
current directory '.' up to the root directory '/' stopping when a
directory containing two directories ’workspaces’ and
’wslib1’ is
found.
The above does not work on my platform, Fedora 25. For
instance, 'plotsincos.xml' is in ../workspaces relative the current
directory.
)lib plotsincos
yields
IMPROPER LIBRARY REFERENCE 'plotsincos': No such file or directory
and
)lib 0 plotsincos
yields
IMPROPER LIBRARY REFERENCE '0': No such file or directory.
Is this a bug or has the feature been removed and the documentation is
out of date.
A related question is if the feature were to work
correctly,
would the )libs command use the feature so its output reflects the
location of the library directory paths that will be used by the )lib
command.  Currently, it does not.
Regards,
Fred
                
                
              
            
            
          
        
      
    
    
  
Juergen Sauermann
2017-06-26 21:05:39 UTC
Permalink
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Helvetica, Arial, sans-serif">Hi Fred,<br>
<br>
not really. <b>SVN 974</b>.<br>
<br>
/// Jürgen<br>
</font><br>
<br>
<div class="moz-cite-prefix">On 06/26/2017 10:02 PM, Frederick Pitts
wrote:<br>
</div>
<blockquote cite="mid:***@comcast.net"
type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<div>Hello J<span style="font-family: Helvetica, Arial,
sans-serif;">ü</span>rgen,</div>
<div><br>
</div>
<div> Thank you. It works great. But did you intend to leave
output statements in the code that on start up produces output</div>
<div>like</div>
<div><br>
</div>
<div>APL_lib_root:        '/home/fred/Sandbox/APL/MathUtils' at
LibPaths.cc:184</div>
<div>APL_lib_root:        '/home/fred/Sandbox/APL/MathUtils' at
LibPaths.cc:187</div>
<div>is_lib_root(APL_lib_root): '0' at LibPaths.cc:188</div>
<div>APL_lib_root:        '/home/fred/Sandbox/APL' at
LibPaths.cc:187</div>
<div>is_lib_root(APL_lib_root): '1' at LibPaths.cc:188</div>
<div><br>
</div>
<div>Regards,</div>
<div><br>
</div>
<div>Fred</div>
<div><br>
</div>
<div>On Mon, 2017-06-26 at 21:03 +0200, Juergen Sauermann wrote:</div>
<blockquote type="cite"> <font face="Helvetica, Arial,
sans-serif">Hi Fred,<br>
<br>
thanks, fixed in <b>SVN 973</b>.<br>
<br>
I appears as if <b>realpath(</b>) does not like it if the
input buffer is the same as the<br>
output buffer.<br>
<br>
/// Jürgen<br>
<br>
<br>
</font><br>
<div class="moz-cite-prefix">On 06/26/2017 06:28 PM, Frederick
Pitts wrote:<br>
</div>
<blockquote cite="mid:***@comcast.net"
type="cite">
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
<div>Hello <span style="font-family: Helvetica, Arial,
sans-serif;">Jürgen,</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"><br>
</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;">
It doesn't on Fedora 25 as evidenced by following
transcript:</span></div>
<div><span style="font-family: Helvetica, Arial, sans-serif;"><br>
</span></div>
<span style="font-family: Helvetica, Arial, sans-serif;">      )host
pwd</span>
<div><span style="font-family: Helvetica, Arial, sans-serif;">/home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode</span><span
style="font-family: Helvetica, Arial, sans-serif;"><br>
</span><span style="font-family: Helvetica, Arial,
sans-serif;">0</span>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"> </span><span style="font-family:
Helvetica, Arial, sans-serif;">     )host ls -d
../../{workspaces,wslib?}</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;">../../workspaces</span><span
style="font-family: Helvetica, Arial, sans-serif;">../../wslib1</span><span
style="font-family: Helvetica, Arial, sans-serif;">../../wslib2</span><span
style="font-family: Helvetica, Arial, sans-serif;">../../wslib6</span><span
style="font-family: Helvetica, Arial, sans-serif;">../../wslib7</span><span
style="font-family: Helvetica, Arial, sans-serif;">../../wslib8</span><span
style="font-family: Helvetica, Arial, sans-serif;">../../wslib9</span><span
style="font-family: Helvetica, Arial, sans-serif;"><br>
</span><span style="font-family: Helvetica, Arial,
sans-serif;">0</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;">      )host ls -l
../../workspaces/plotsincos.xml</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;">-rw-r--r-- 1 fred fred 21284 Jun 21 11:47
../../workspaces/plotsincos.xml</span><span
style="font-family: Helvetica, Arial, sans-serif;"><br>
</span><span style="font-family: Helvetica, Arial,
sans-serif;">0</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;">      )load 0 plotsincos</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;">)LOAD plotsincos (file
/home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/workspaces/plotsincos)
failed: No such file or directory</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;">     )libs</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;">Library root:
/home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode</span><span
style="font-family: Helvetica, Arial, sans-serif;"><br>
</span><span style="font-family: Helvetica, Arial,
sans-serif;">Library reference number mapping:</span><span
style="font-family: Helvetica, Arial, sans-serif;"><br>
</span><span style="font-family: Helvetica, Arial,
sans-serif;">---------------------------------------------------------------------------</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;">Ref
Conf  Path                                                State   Err</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;">---------------------------------------------------------------------------</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"> 0
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/workspaces
missing (2)</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"> 1
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib1
missing (2)</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"> 2
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib2
missing (2)</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"> 3
PSYS  /usr/local/lib/apl/wslib3                            present</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"> 4
PSYS  /usr/local/lib/apl/wslib4                            present</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"> 5
PSYS  /usr/local/lib/apl/wslib5                            present</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"> 6
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib6
missing (2)</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"> 7
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib7
missing (2)</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"> 8
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib8
missing (2)</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"> 9
BIN   /home/fred/Sandbox/APL/GaussianIntegers/McDonnellCode/wslib9
missing (2)</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;">===========================================================================</span>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"><br>
</span></div>
<div>APL_LIB_ROOT is not set and there are no override
entries in the preference files other than for library
3, 4 and 5 in the</div>
<div>system preference file.</div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"><br>
</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;">Regards,</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"><br>
</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;">Fred</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"><br>
</span></div>
<div>On Mon, 2017-06-26 at 18:05 +0200, Juergen Sauermann
wrote:</div>
<blockquote type="cite"> <font face="Helvetica, Arial,
sans-serif">Hi Fred,<br>
<br>
correct. In <b>APL_LIB_ROOT</b> is not set and no
preferences override any library paths, then<br>
the first library above ./ that contains two files or
sub-dirs named workspaces and wslib1 is<br>
chosen as the library root.<br>
<br>
The code is in file <b>LibPaths.cc</b> function <b>LibPaths::search_APL_lib_root()</b><br>
<br>
</font>Hope it works,<br>
/// Jürgen<br>
<br>
<br>
<div class="moz-cite-prefix">On 06/26/2017 05:27 PM,
Frederick Pitts wrote:<br>
</div>
<blockquote
cite="mid:***@comcast.net"
type="cite">
<div>Hello <span style="font-family: Helvetica,
Arial, sans-serif;">Jürgen,</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"><br>
</span></div>
<div><span style="font-family: Helvetica, Arial,
sans-serif;"> My bad. In my original post, I
should have typed `)load' where I typed ')lib'.
Thanks for the detailed reply. I can</span></div>
<div>)save and )load workspaces now.</div>
<div><br>
</div>
<div> But I'm still confused about the following three
sentences from `apl.html':</div>
<div><br>
</div>
<div>If an environment variable APL_LIB_ROOT is
defined, then its value is used as library-root.
Otherwise the path from the current directory (".")
up to the root directory ("/") is searched until a
directory containing two files ’workspaces’ and
’wslib1’ is found. Normally ’workspaces’ and
’wslib1’are directories, but for the computation of
library-root files suffice. <br>
</div>
<div>This passage plus your explanation implies to me
that if APL_LIB_ROOT is unset and there are no
overrides in the preference</div>
<div>files, an attempt is made to determine the
library-root by searching from the current directory
'.' up to the root directory '/', stopping when the
two directories or files `workspaces' and `wslib1'
are found in the same directory. If this mechanism
were to work the way I interpret the passage, as
long as one works in subdirectories below one's
library-root directory, the 0 .. 9 library numbers
are meaningful without having to set APL_LIB_ROOT or
preference override entries. And one would not have
to use paths on the )lib and )load commands.</div>
<div><br>
</div>
<div>Regards,</div>
<div><br>
</div>
<div>Fred</div>
<div><br>
</div>
<div>On Mon, 2017-06-26 at 12:11 +0200, Juergen
Sauermann wrote:</div>
<blockquote type="cite"> <font face="Helvetica,
Arial, sans-serif">Hi Fred,<br>
<br>
conceptually the <b>)libs</b> command shows the
directories that will be used<br>
for the different library numbers (ranging from
0-9 with 0 being the default<br>
library number of none is given).<br>
<br>
The other (non-library number) argument of the lib
command is a directory, and<br>
to be distinguished from a library reference
number it should contain a /.<br>
<br>
I suppose the first thing going wrong in your
examples below is that the <b>)lib</b> argument<br>
seems to be a workspace name while the <b>)lib </b>command
expects either a library reference<br>
number like 0..9 <b>or </b>the path to a
directory.<br>
<br>
So if <font face="Courier New, Courier,
monospace"><b>../workspaces/ </b></font>contains
workspace <b><font face="Courier New, Courier,
monospace">plotsincos.xml</font></b> then the
command<br>
<br>
<font face="Courier New, Courier, monospace"><b>)lib
../workspaces</b></font><br>
<br>
should display it. For example:<br>
<br>
<font face="Courier New, Courier, monospace"><b>     
)host pwd</b><b><br>
</b><b>/home/eedjsa/projects/juergen/apl-1.7/src</b><b><br>
</b><b><br>
</b><b>0 <br>
<br>
</b><b>      )lib ../</b><b><br>
</b><b>autom4te.cache/     debian/    
debian_tmp/     devel_doc/</b><b><br>
</b><b>doc/                erlang/    
ftp-upload/     gnu-apl.d/</b><b><br>
</b><b>html/               m4/        
rpm/            src/</b><b><br>
</b><b>support-files/      tools/     
web-home/       workspaces/</b><b><br>
</b><b>wslib1/             wslib2/    
wslib3/         wslib4/</b><b><br>
</b><b>wslib5/</b><b><br>
</b><b>      )lib ../workspaces</b><b><br>
</b><b>APL_CGI             LSQRL       RU1    
RU2         RUBIK   SCRIPT</b><b><br>
</b><b>ScalarBenchmark     XSudoku     sudoku 
sudoku_DLX  test    tt</b></font><br>
<br>
<br>
Now the locations of library directories can be
specified in different ways. The library root
mechanism<br>
assumes a single directory that contains (at
least) two subdirectories named <b>workspaces</b>
and <b>wslib1</b>.<br>
These names come from the IBM APL2 interpreter
which is using a similar scheme (but without
giving<br>
any rules for it).<br>
<br>
GNU APL starts with this library root scheme, but
each directory can be overridden by either the
system's<br>
preference file and/or the user's preference file.
the )LIBS command then tells how the library paths
for<br>
the different library reference numbers were
computed. For example:<br>
<font face="Courier New, Courier, monospace"><b>---------------------------------------------------------------------------</b><b><br>
</b><b>Ref Conf 
Path                                               
State   Err</b><b><br>
</b><b>---------------------------------------------------------------------------</b><b><br>
</b><b> 0 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/workspaces
present</b><b><br>
</b><b> 1 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib1    
present</b><b><br>
</b><b> 2 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib2    
missing (2)</b><b><br>
</b><b> 3 PSYS 
/usr/local/lib/apl/wslib3                           
present</b><b><br>
</b><b> 4 PSYS 
/usr/local/lib/apl/wslib4                           
present</b><b><br>
</b><b> 5 PSYS 
/usr/local/lib/apl/wslib5                           
present</b><b><br>
</b><b> 6 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib6    
missing (2)</b><b><br>
</b><b> 7 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib7    
missing (2)</b><b><br>
</b><b> 8 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib8    
missing (2)</b><b><br>
</b><b> 9 BIN  
/home/eedjsa/projects/juergen/apl-1.7/src/wslib9    
missing (2)</b><b><br>
</b><b>===========================================================================</b></font><br>
<br>
This tells us that libraries 3, 4, and 5 were
specified by PSYS (system preferences file, e.g.<br>
<b>/usr/local/etc/gnu-apl.d/preferences</b>) while
the others are computed from the current directory
(BIN).<br>
The State and Err columns tell if the directory is
accessible and the <b>errno</b> if not.<br>
<br>
If I remember correctly then the )lib command
wants either a library reference number (0-9) or a<br>
path, but not both. If it fails, then )more tells
which directory was tried (I fixed the spelling
mistake)<br>
and the <b>strerror(errno)</b> of the failed
operation:<br>
<br>
<font face="Courier New, Courier, monospace"><b>     
)lib xxx</b><b><br>
</b><b>IMPROPER LIBRARY REFERENCE 'xxx': No such
file or directory</b><b><br>
</b><b>      )more</b><b><br>
</b><b>path 'xxx' could not be openend as
directory: No such file or directory</b><b><br>
</b><br>
</font>Best Regards,<br>
/// Jürgen<br>
<br>
</font><br>
<div class="moz-cite-prefix">On 06/26/2017 06:07 AM,
Frederick Pitts wrote:<br>
</div>
<blockquote
cite="mid:***@comcast.net"
type="cite">
<pre wrap="">Hello Jürgen,

The apl.html doc indicates that if environment variable
APL_LIB_ROOT is not defined, the subject search path will be from the
current directory '.' up to the root directory '/' stopping when a
directory containing two directories ’workspaces’ and ’wslib1’ is
found.

The above does not work on my platform, Fedora 25. For
instance, 'plotsincos.xml' is in ../workspaces relative the current
directory.

)lib plotsincos

yields

IMPROPER LIBRARY REFERENCE 'plotsincos': No such file or directory

and

)lib 0 plotsincos

yields

IMPROPER LIBRARY REFERENCE '0': No such file or directory.

Is this a bug or has the feature been removed and the documentation is
out of date.

A related question is if the feature were to work correctly,
would the )libs command use the feature so its output reflects the
location of the library directory paths that will be used by the )lib
command. Currently, it does not.

Regards,

Fred


</pre>
</blockquote>
<br>
</blockquote>
</blockquote>
<br>
</blockquote>
</div>
</div>
</blockquote>
<br>
</blockquote>
</blockquote>
<br>
</body>
</html>
Leslie S Satenstein
2017-06-27 02:30:38 UTC
Permalink
If you are interested in how I organized my APL environment, see below. For my needs I have one organization that is quite portable. All my own libraries are within the ${HOME}/.gnu-apl

My desire was to have a single directory for my apl workspaces, preferences, keyboard layouts, etc.
I chose to create lib-0 as a directory within the .gnu-apl directory and similarly for the other libraries.My own gnu-apl tarfile is attached. It can be "un-tared" (suggest you backup your own .gnu-apl directory first.
One tar file  gnu-apl.tar backs up all my own workspaces, parameter settings and with some trivial edit of the preferences file, can be moved to any computer. (I actually move it from desktop to laptop) and never worry about a forgotten workspace.
I attached a tar file with a renamed copy of my .gnu-apl directory.  There are no proprietary contents.I include an explanation of it's organization below my signature.
Happy with the way you structured your APL environment, just delete this email and the attachment.
 Regards
 Leslie
Leslie Satenstein
Montréal Québec, Canada


My home directory contents for apl   ls -l .gnu-apl
-rw-rw-r--. 1 leslie leslie    46 Jun 19 04:52 gnu-apl.d.tar                # backup to the  gnu-apl.d
-rw-r--r--. 1 leslie leslie  2216 Jun 19 04:52 keyboard1.txt               #pc104 American keyboard
-rw-rw-r--. 1 leslie leslie  2270 Jun 19 04:52 keyboard2.txt             #pc105 International (American/British) keyboard layout
drwxrwxr-x. 2 leslie leslie  4096 Jun 19 04:52 lib0                            #the home directory within the .gnu-apl
drwxrwxr-x. 2 leslie leslie  4096 Jun 19 04:52 lib1                            #the lib1 directory within the .gnu-apl  
drwxrwxr-x. 2 leslie leslie  4096 Jun 19 04:52 lib2                            #the lib2  directory within the .gnu-apl
lrwxrwxrwx. 1 leslie leslie    25 Jun 19 04:52 lib3 -> /usr/local/lib/apl/wslib3           #distributed lib3 note the symbolic link ->
lrwxrwxrwx. 1 leslie leslie    25 Jun 19 04:52 lib4 -> /usr/local/lib/apl/wslib4           # ditto
lrwxrwxrwx. 1 leslie leslie    25 Jun 19 04:52 lib5 -> /usr/local/lib/apl/wslib5           # ditto
lrwxrwxrwx. 1 leslie leslie    25 Jun 19 04:52 lib6 -> /usr/local/lib/apl/wslib6           #ditto
lrwxrwxrwx. 1 leslie leslie    25 Jun 19 04:52 lib7 -> /usr/local/lib/apl/wslib7           ditto
lrwxrwxrwx. 1 leslie leslie    25 Jun 19 04:52 lib8 -> /usr/local/lib/apl/wslib8            ditto
lrwxrwxrwx. 1 leslie leslie    25 Jun 19 04:52 lib9 -> /usr/local/lib/apl/wslib9            ditto 
-rw-r--r--. 1 leslie leslie  2414 Jun 19 04:52 parallel_thresholds                                 #.gnu-apl values
-rw-rw-r--. 1 leslie leslie  5344 Jun 19 04:52 preferences                                            
-rw-rw-r--. 1 leslie leslie 24195 Jun 19 04:52 README-9-Post_Installation
-rw-rw-r--. 1 leslie leslie    19 Jun 19 04:52 zzLastBkup

Within my own "preference file/ located within the .gnu-apl, it contains in part...#
  LIBREF-0 /home/leslie/.gnu-apl/lib0
  LIBREF-1 /home/leslie/.gnu-apl/lib1
# LIBREF-2 /group/abc/other-libs
########### system created ############
  LIBREF-3 lib3
  LIBREF-4 lib4
  LIBREF-5 lib5
######### end system created #########
# LIBREF-6 lib6
# LIBREF-7 lib7
# LIBREF-8 lib8
# LIBREF-9 lib9
#

READLINE_HISTORY_LEN  500
#READLINE_HISTORY_PATH .apl.history.txt
READLINE_HISTORY_PATH /home/leslie/.gnu-apl/lib0/apl.history.txt
#would have liked to have been able to do#READLINE_HISTORY_PATH ${HOME}/.gnu-apl/lib0/apl.history.txt
############### end of appendix.

Loading...