Hi, having installed SWI prolog on MacOS Catalina (10.15.7) a few months ago (using MacPorts), but am only now trying to use it. I am quite impressed with ease of use of the (SWI-prolog) App - at least for someone familiar with MacOS apps, but there do seem to be configuration problems and gaps in the documentation.
Unlike the traditional Unix command-line installations, the MacOS one is installed under /Applications, which is the top-level directory where most Mac apps sit.
Prolog-like versions of the simple command-line operations work with slightly puzzling comment-style results (see ls/1) below, but the goal “manpce” brings up the expected XPCE Manual window.
However I cannot find documentation for app_config(1) in order to fix the strange interaction sequence below.
(The first queries correctly find the swi home directory, - “%YES” added
The answer to the second query may be correct, but is mysterious.
However the third answer is wrong -
/Users/rjc/.config/swi-prolog/ a directory for user- downloaded packs).
The helpful colour is missing from the extract below:
?- file_search_path(swi, Home), ls(Home).
% LICENSE boot/ doc/ swipl-win.rc
% README.md boot.prc include/ swipl.home
% SWI-Prolog.rc customize/ lib/ swipl.rc
% bin/ demo/ library/ xpce/
Home = '/Applications/SWI-Prolog.app/Contents/swipl' . %(YES)
?- file_search_path(library,X).
X = app_config(lib) . %(Maybe)
?- absolute_file_name(app_config(lib),X).
X = '/Users/rjc/.config/swi-prolog/lib'. %(Wrong)
?- ls('/Users/rjc/.config/swi-prolog/lib').
Warning: "/Users/rjc/.config/swi-prolog/lib" does not exist
false.
There may be just an XML app_config file to fix, but where?
Can anyone help please. - rjc