<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>