Dear Jan,
Many thanks for your reply.
> You started at the wrong end :( Since some months the configuration of
> SWISH has been changed completely because the many things you may want
> to configure required a more modular approach (although the old mostly
> works, you are very close). After unpacking swish, go to the main dir
> and do
>
> % mkdir config-enabled
> % cp config/available/
r_serve.pl config-enabled
>
there is a tiny typo in the above, i think it should be:
cp config-available/
r_serve.pl config-enabled
As an aside, there is a bit of an issue with user_profile.
On the latest swipl-devel/ and swish/ (on a Xubuntu 14.04), I see the following.
With or without config-enabled directory:
άμπελος;src/swish% swipl -f
run.pl
ERROR: /usr/local/users/na11/local/git/src/swish/lib/
chat.pl:62:
source_sink `library(user_profile)' does not exist
Warning: /usr/local/users/na11/local/git/src/swish/lib/
chat.pl:62:
Goal (directive) failed: swish_chat:use_module(library(user_profile))
% Started server at
http://localhost:3050/
Welcome to SWI-Prolog (threaded, 64 bits, version 7.5.5-28-gf895284)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit
http://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
If i do:
% mkdir config-enabled
% cp config-available/
user_profile.pl config-enabled/
% swipl -f
run.pl
ERROR: /usr/local/users/na11/local/git/src/swish/lib/
chat.pl:62:
source_sink `library(user_profile)' does not exist
Warning: /usr/local/users/na11/local/git/src/swish/lib/
chat.pl:62:
Goal (directive) failed: swish_chat:use_module(library(user_profile))
ERROR: /usr/local/users/na11/local/git/src/swish/config-enabled/
user_profile.pl:39:
source_sink `library(user_profile)' does not exist
Warning: /usr/local/users/na11/local/git/src/swish/config-enabled/
user_profile.pl:39:
Goal (directive) failed: config_user_profile:use_module(library(user_profile))
ERROR: /usr/local/users/na11/local/git/src/swish/config-enabled/
user_profile.pl:40:
source_sink `library(profile/backend/profile_prolog)' does not exist
Warning: /usr/local/users/na11/local/git/src/swish/config-enabled/
user_profile.pl:40:
Goal (directive) failed: config_user_profile:use_module(library(profile/backend/profile_prolog),[])
ERROR: /usr/local/users/na11/local/git/src/swish/lib/plugin/
profile.pl:40:
source_sink `library(user_profile)' does not exist
Warning: /usr/local/users/na11/local/git/src/swish/lib/plugin/
profile.pl:40:
Goal (directive) failed: swish_plugin_user_profile:use_module(library(user_profile))
ERROR: /usr/local/users/na11/local/git/src/swish/config-enabled/
user_profile.pl:44:
setting `backend' does not exist
Warning: /usr/local/users/na11/local/git/src/swish/config-enabled/
user_profile.pl:44:
Goal (directive) failed: config_user_profile:set_setting(user_profile:backend,impl_profile_prolog)
ERROR: /usr/local/users/na11/local/git/src/swish/
swish.pl:81:
/usr/local/users/na11/local/git/src/swish/config-enabled/
user_profile.pl:45: Initialization goal raised
exception: '$run_init_goal'/1: Undefined procedure: config_user_profile:profile_open_db/1
% Started server at
http://localhost:3050/
Welcome to SWI-Prolog (threaded, 64 bits, version 7.5.5-28-gf895284)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit
http://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
The standard swish server is working in both cases, I guess it is some "chat" function that is impaired ?.
> See comments in config-enabled/
r_serve.pl for further steps.
The comments there are a bit terse and a tad confusing.
The fact that there are two alternative ways adds to the complexity.
I know that you are trying to keep 1 copy of all that config facts, but
splitting the commentary to method A and method B would be easier for the first time user.
In addition to sandbox or not dilemma there is also having root access or not on the machine.
I rarely install as root when compiling from source. On my work machine I don't have the option anyway.
> There is
> lots of stuff in config-available that you can enable this way. The
> README.md file there provides a brief overview. Details are in the
> configuration files.
>
> Note that swish uses something for which I eventually want a more
> principled approach: connect packs to a single installed application
> rather than to the entire Prolog installation.
This would be a nice feature also for static versions of required packages.
If the library expansion rules are module specific then loading should be easy enough.
You are already doing this, if you are picking local packs in Swish, right ?
For building, in addition to rules for the git case, it would be nice to have rules
for tgz files and specific/minimum versions of published packs (from the SWI pack server)
> It does this by using
> a local `pack` directory and git submodules to control the attached
> packs.
>
> Hope this helps
>
> --- Jan
>
Thanks it does. but not quite there yet; need to config Rserve and connect to it.
Many congrats for the excellent product SWISH has become.
Some other comments:
1. As far as I can see, Swish is not visible on SWI main page. Maybe at a minimum an additional link in the downloads
tab ?
2. Are there any long term plans for supporting other (interpreted) languages? Instead-of/in-addition-to Prolog that
is.
3. Do code comments from standard predicates automatically translate to Swish clickable queries?
4. Is there special markup to incorporate images generated by commented code ?
(Recently I rigged some crude marks with ever cruder code to include images on static html:
http://stoics.org.uk/~nicos/sware/b_real/doc/html/b_real.html#r_hist/2
In theory the doc server also supports images but the location is defined centrally i think)
5. Is there a way to have a visual history mechanism? (If user runs four 8-Queens queries and then closes the boards-
then
the history panel could navigate through the images with a simple fwd/bwd interface.)
6. can the config-enabled directory be placed somewhere outside the main installation ?
it is usually better not to mix the git sources with the site-specific stuff (similarly to Swi moving all site
specific things to $PREFIX/lib/swipl-Mj.Mn.Fx)
7. when a visual output is iconified (say the 8 queens chess board) ideally the "iconify" option in the iconified
window should read "expand" or some such and the graphical symbol be different ?
Regards,
Nicos