thanks. See my comments inline below.
Best Regards,
Jürgen
Hi Jürgen and colleagues,Apparently the APserver (a binary that is being built together with the APL intertpreter)I've done a bit more digging, including running the apl-1.8 Docker container and, where applicable, APLX V5.1 and Dyalog APL V18.0.
My conclusion is the Mac OS X 10.15.* build is broken and it may be easier to abandon OS X than to fix it.... :(
I've appended a screen log of a build and demonstrated the following three of the bugs.
1) Warning )loading )saved workspaces. Sorry not to be clear. The tarball build cannot load the workspaces it has shaved--same version, same build. This is clearly demonstrated at the end of the screen log. Here's the salient bit:
jlh@MacBook-XNOR apl-1.8 % apl
::connect() to supposedly existing APserver failed: Invalid argument
could not be found.
In a "normal" build:
* the APserver is located in directory src/APs, and
* should be installed in the same directory as the apl interpreter itself.
If you start apl with command line option -l 37 then it prints more information about APserver, e.g.:
eedjsa@server68:~/projects/AVR_workspace/Jalousie_3$ apl -l 37
initial RLIMIT_AS (aka. virtual memory) is: 'unlimited'
...
initializing paths from $PATH = /home/eedjsa/.nvm/versions/node/v12.15.0/bin:/home/eedjsa/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
APL_bin_path is: /usr/local/bin
...
Using TCP socket towards APserver...
connecting to 127.0.0.1 TCP port 16366 failed.
(the first ::connect() to APserver is expected to fail, unless
APserver was started manually)
Starting a new APserver listening on 127.0.0.1 TCP port 16366
Found /usr/local/bin/APserver
Starting /usr/local/bin/APserver --port 16366 --auto...
connected to APserver, socket is 4
using Svar_DB on APserver!
If I remember correctly then you could also suppress this warning either with
command line option --noSV or with the following line in one of your preferences files:
SharedVars Disabled
but the proper way is to fix the installation,
Above is the root cause of the problem: ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑______ _ __ __ __ ___ ____ __
/ ____// | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / ____// /___
\____//_/ |_/ \____/ /_/ |_|/_/ /_____/
Welcome to GNU APL version 1.8 / Unversioned directory
First of all, )save produces an old file format.These days )dump is preferred over )save
Copyright (C) 2008-2019 Dr. Jürgen Sauermann
Banner by FIGlet: www.figlet.org
This program comes with ABSOLUTELY NO WARRANTY;
for details run: apl --gpl.
This program is free software, and you are welcome to redistribute it
according to the GNU Public License (GPL) version 3 or later.
Svar_DB not connected in Svar_DB::is_registered_id()
∇hello
[1] 'hello'
[2] ∇
)wsid hello
WAS CLEAR WS
)save hello
2021-02-23 14:00:46 (GMT-5)
)clear
CLEAR WS
)load hello
WARNING: this workspace was )SAVEd with a VERY old SVN version of GNU APL.
Expect problems, in particular when the )SI was not clear.
In case of problems, please try )COPY instead of )LOAD.
SAVED 2021-02-23 14:00:46 (GMT-5)
)off
since it makes it much easier to recover most of a broken workspace files, and the )dump
format is pretty much directly executable APL code rather than xml. That makes )dump more
independent of the interpreter version than )save.
The only disadvantage of )dump is that it does not save the )SI stack likw )save does.
So when you )dump a workspace the you loose the )SI stach and with it all local variables.
Now to the problem itself. Your tar file contains, among others, a file named buildtag.hh.
This files is overridden when ./configure is run (see file configure.ac lines 695 ff. or more
precisely by script src/buildtag). If that script finds program svnversion, then it assumes that
you have SVN installed and use it (as opposed to unpacking a tar file). At least that was the plan.
In your case it seems like SVN was installed but ./configure was run in a directory that was
not fetched with SVN (the "Unversioned directory" above is te output of svnversion but was not
properly matched. Or the buildtag.hh in the tarfile was already broken.
You can fix this in 2 ways:
* fix the last line of buildtag.hh to read, for example:
#define ARCHIVE_SVN " 17771"
* recover file buildtag.hh from the tar file, e.g.
tar xvf apl-1.8.tar.gz apl-1.8/src/buildtag.hh
This is needed after every ./configure; after it recompile (make) and reinstall (make install)
the interpreter.
First of all, the + after SYNTAX ERROR indicates that running command )MORE will provide more information.Goodbye.
Session duration: 264.45 seconds
jlh@MacBook-XNOR apl-1.8 %
2) Sqlite3 connectivity. The above error messages in magenta report that apl cannot connect to Sqlite3 APserver. I get this error message every other time I start apl, this is documented in the my original (endless) email. This behavior is not observed when running APL in the docker container.
3) ⎕plot broken - this should not be a syntax error and isn't observed when running APL in the docker container (this is also demonstrated in the screen log).
⎕plot ''
SYNTAX ERROR+
It will probably say that this syntax error was caused by some missing libraries that ⎕PLOT needs for performing
its task. This is a typical Apple problem and will disappear if the missing libs are found
(and ./configure; make; make install is run again).
The libraries missing here are either:
* libxcb and friends or
* libgtk and friends.
libxcb (or myself) had some problems with the rendering of Unicode characters, I would therefore recommend
libbgtk instead.
The design was motivated by the fact that IBM APL2 creates (and displays) an )SI entry for every failed input⎕PLOT ''
^
4) The state indicator. I compared your implementation of the the state indicator to Dyalog's and APLX's and it's clear you have chosen to do it differently than other interpreters I have used. Both Dyalog and APLX (and if memory services APL 2, APL*PLUS and APL20) all omitted interactive mode errors from the SI stack.
I'm not sure what motivated your design, but clearly this appears to be what you intended. Thanks.
line in immediate execution. I find it more plausible if ⎕SI has a 1:1 relation to )SI instead of removing
the immediate execution entries. Since ⎕SI is not in any way standardized it took the freedom to implement
it this way, I hardly know Dyalog and the last APLX version that I worked with was APL68000 (and if I remember
correctly then they had no ⎕SI).
As of today I haven't heard of anybody using the Docker container. In the meantime I have received anThe devolution of the Mac is sad, but all is flux. Thanks for your Docker container; I'll take advantage of that for further use of gnu-apl.
announcement from the Docker hub people that they plan to remove containers with low download
rates (like the GNU APL one). That makes me believe that maintaining the GNU APL Docker container
does not make much sense.
You're welcome.Indeed, thanks for your great contribution.
/John
------ Original Message ------
Received: Tue, 23 Feb 2021 04:18:42 AM PST
From: Dr. Jürgen Sauermann <m...@xn--jrgen-sauermann-zvb.de>
To: edxmail-jo...@usa.net, bug-apl@gnu.org,Elias Mårtenson <loke...@gmail.com>
Subject: Re: New to GNU APL, curiosities or possible bugs?
Hi John,
see below.
Best Regards,
Jürgen
On 2/22/21 11:18 PM, edxmail-jo...@usa.net wrote:
Welcome to GNU APL.Hi,
I've just spent a couple of days working to get gnu-apl up and running under OS X Catalina. Good progress has been made, but I'm unsure if I have a stable and fully functioning copy of the interpreter.
This can only happens if the interpreter (-binary) that )SAVEd the WSDuring this exercise, I encountered four experiences that may indicate bugs. They are:
- Build Issue?: Newly saved workspaces rejected as ancient by interpreter
is different from the interpreter thast )LOADs it. Note that ./configure
may change the reference numbers (= SVN versions) that were used
to compare the workspace versions.
That would be a question for Elias, I believe
- Quirk?: Sqlite3 connection error message comes and goes
see info apl (chapter 2.30) or online here:
- Mystery?: Quad-Plot usage
https://www.gnu.org/software/apl/apl.html#Section-2_002e30
Not sure what you mean:
- Bug?: ⎕SI for non function execution errors?
)SIC
÷0
DOMAIN ERROR
÷0
^
4 ⎕CR ⎕SI 4
┏→━━━━━━━━━━━━━━━━━━━━━━━┓
┃┏→━━━━━━━┓ ┏→━━━━━━━━━━┓┃
┃┃ ÷0┃ ┃4 ⎕CR ⎕SI 4┃┃
┃┗━━━━━━━━┛ ┗━━━━━━━━━━━┛┃
┗∊━━━━━━━━━━━━━━━━━━━━━━━┛
I'm unfamiliar with the gnu packaging tools and completely overwhelmed by this enormous code base. Thus, I apologize in advance for any limitations or mistakes in this report.
Regards,
John Helm
1) Build Issue: Newly saved workspaces warned as ancient by interpreter
The "standard" compile and install sequence using the apl-1.8.tar.gz tarball does not compile correctly on OS X Catalina.
The problem is configure runs svn commands to write a file ./src/buildtag.hh and these commands fail because the tarball is not an SVN repo. The resulting binary compiles without a build number. The net result is workspaces are saved with a null build number, and )LOADing these files fails with the following message:
WARNING: this workspace was )SAVEd with a VERY old SVN version of GNU APL.
Expect problems, in particular when the )SI was not clear.
In case of problems, please try )COPY instead of )LOAD.
DOMAIN ERROR+
immediate_execution() caught APL error 0x50004 (DOMAIN ERROR)
Here are some details from the compilations:
A) SVN errors emitted when running configure on the standard tarball
================================================================
configure: creating ./src//buildtag.hh
svn: E155007: '/Users/jlh/.local/etc/repos/apl-1.8/src/Archive.cc' is not a working copy
configure: creating ./src/makefile.h
configure: creating ./src/configure_args.cc
# Note SVN number missing in --version report
jlh@MacBook-XNOR apl-1.8 % apl --version
BUILDTAG:
---------
Project: GNU APL
Version / SVN: 1.8 / Unversioned directory
Build Date: 2021-02-22 17:48:39 UTC
Build OS: Darwin 19.6.0 x86_64
config.status: '--includedir=/opt/local/' '--with-sqlite3=/opt/local/' '--with-postgresql=no'
Archive SVN:
jlh@MacBook-XNOR apl-1.8 %
----------------------------------------------------------------
⍝ Create a workspace, save, and reload it to surface error
)wsid
IS CLEAR WS
∇hello
[1] 'hello world!'
[2] ∇
)wsid hello
WAS CLEAR WS
)save
2021-02-22 12:58:15 (GMT-5) hello
)clear
CLEAR WS
)load hello
WARNING: this workspace was )SAVEd with a VERY old SVN version of GNU APL.
Expect problems, in particular when the )SI was not clear.
In case of problems, please try )COPY instead of )LOAD.
SAVED 2021-02-22 12:58:15 (GMT-5)
================================================================
B) Pull down svn trunk and configure, make, etc...
# note the SVN number is now included
jlh@MacBook-XNOR trunk % apl --version
BUILDTAG:
---------
Project: GNU APL
Version / SVN: 1.8 / 1439M
Build Date: 2021-02-22 18:01:34 UTC
Build OS: Darwin 19.6.0 x86_64
config.status: '--includedir=/opt/local/' '--with-sqlite3=/opt/local/' '--with-postgresql=no'
Archive SVN: 1433
jlh@MacBook-XNOR trunk %
----
⍝ Load the workspace made by the version with a null SVN archive number
)load hello
WARNING: this workspace was )SAVEd with a VERY old SVN version of GNU APL.
Expect problems, in particular when the )SI was not clear.
In case of problems, please try )COPY instead of )LOAD.
DOMAIN ERROR+
⍝ overwrite with a new one, the problem is gone.
immediate_execution() caught APL error 0x50004 (DOMAIN ERROR)
∇hello
[1] 'Hello World!'
[2] ∇
)wsid
IS CLEAR WS
)wsid hello
WAS CLEAR WS
)save
2021-02-22 13:05:49 (GMT-5) hello
)clear
CLEAR WS
)load hello
SAVED 2021-02-22 13:05:49 (GMT-5)
hello
Hello World!
================================================================
2) Quirk: Sqlite3 error message comes and goes
To follow is a screen log in which apl was loaded four times. Every other load emits an error messages as follows:
1st load: No connection error message
2st load: ::connect() to supposedly existing APserver failed: Invalid argument
Svar_DB not connected in Svar_DB::is_registered_id()
3rd load: No connection error message
4st load: ::connect() to supposedly existing APserver failed: Invalid argument
Svar_DB not connected in Svar_DB::is_registered_id(
================================================================
jlh@MacBook-XNOR trunk % apl
______ _ __ __ __ ___ ____ __
/ ____// | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / ____// /___
\____//_/ |_/ \____/ /_/ |_|/_/ /_____/
Welcome to GNU APL version 1.8 / 1439M
Copyright (C) 2008-2020 Dr. Jürgen Sauermann
Banner by FIGlet: www.figlet.org
This program comes with ABSOLUTELY NO WARRANTY;
for details run: apl --gpl.
This program is free software, and you are welcome to redistribute it
according to the GNU Public License (GPL) version 3 or later.
)off
Goodbye.
Session duration: 5.44214 seconds
jlh@MacBook-XNOR trunk % apl
::connect() to supposedly existing APserver failed: Invalid argument
______ _ __ __ __ ___ ____ __
/ ____// | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / ____// /___
\____//_/ |_/ \____/ /_/ |_|/_/ /_____/
Welcome to GNU APL version 1.8 / 1439M
Copyright (C) 2008-2020 Dr. Jürgen Sauermann
Banner by FIGlet: www.figlet.org
This program comes with ABSOLUTELY NO WARRANTY;
for details run: apl --gpl.
This program is free software, and you are welcome to redistribute it
according to the GNU Public License (GPL) version 3 or later.
Svar_DB not connected in Svar_DB::is_registered_id()
)off
Goodbye.
Session duration: 7.12709 seconds
jlh@MacBook-XNOR trunk % apl
______ _ __ __ __ ___ ____ __
/ ____// | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / ____// /___
\____//_/ |_/ \____/ /_/ |_|/_/ /_____/
Welcome to GNU APL version 1.8 / 1439M
Copyright (C) 2008-2020 Dr. Jürgen Sauermann
Banner by FIGlet: www.figlet.org
This program comes with ABSOLUTELY NO WARRANTY;
for details run: apl --gpl.
This program is free software, and you are welcome to redistribute it
according to the GNU Public License (GPL) version 3 or later.
)off
Goodbye.
Session duration: 9.30464 seconds
jlh@MacBook-XNOR trunk % apl
::connect() to supposedly existing APserver failed: Invalid argument
______ _ __ __ __ ___ ____ __
/ ____// | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / ____// /___
\____//_/ |_/ \____/ /_/ |_|/_/ /_____/
Welcome to GNU APL version 1.8 / 1439M
Copyright (C) 2008-2020 Dr. Jürgen Sauermann
Banner by FIGlet: www.figlet.org
This program comes with ABSOLUTELY NO WARRANTY;
for details run: apl --gpl.
This program is free software, and you are welcome to redistribute it
according to the GNU Public License (GPL) version 3 or later.
Svar_DB not connected in Svar_DB::is_registered_id()
================================================================
3) Mystery Quad-Plot usage
All attempts to invoke ⎕PLOT result in a SYNTAX ERROR.
⎕plot ''
SYNTAX ERROR
⎕PLOT
^
⎕XYZ
VALUE ERROR
⎕X YZ
^
I note that this behavior is expected for ⎕RE if libpcre2 is absent when gnu-apl is compiled...
SYNTAX ERROR
⎕RE
^
'abc' ⎕RE 'aaaaabcccc'
SYNTAX ERROR+
'abc' ⎕RE 'aaaaabcccc'
Does this behavior indicate some prerequisites are missing for ⎕PLOT to work?
================================================================
4) Bug?: ⎕SI for non function execution errors?
4.1) It appears many (all?) errors cause push a event State Indicator. Other apl interpreters I've used do not push events such as value errors or domain errors on the State Indicator. Is this intended behavior?
4.2) The GNU APL info page indicates ⎕si's arguments include 5 and 6, but these return errors on my version. Is this a documentation error?
⍝ clear workspace
)si
⎕si 1
◊
⎕si 2
0
⎕si 3
◊[0]
⎕si 4
⎕si 4
⎕si 5
DOMAIN ERROR
⎕SI 5
^
⍝ ?? ⎕SI 5 is supposed to be valid
)si
⋆
⍝ ?? now the state indicator is non-null
⎕si 6
DOMAIN ERROR
⎕SI 6
^
)si
⋆
⋆
⍝ ?? now the state indicator has to elements?
xyzzy
VALUE ERROR
xyzzy
^
)si
⋆
⋆
⋆
⎕si 1
◊ ◊ ◊ ◊
⎕si 2
0 0 0 0
⎕si 3
◊[0] ◊[0] ◊[0] ◊[0]
⎕si 4
⎕SI 5 ⎕SI 6 xyzzy ⎕si 4
⎕si 5
DOMAIN ERROR
⎕SI 5
^
⎕si 6
DOMAIN ERROR
⎕SI 6
^