Hi,
SWISH Notebooks are very complicated, I am seeking
a much simpler format. For example if I use the
download function of SWISH,
I get some XML garbel, that I cannot edit and test
run in a normal Prolog IDE. It should be possible to
have Notebooks as normal Prolog texts inside
a Prolog project. I don't want to turn node.js
developer when I am creating Notebooks. I want to
stay Prolog developer that can focus on the
Prolog problem at hand, and note turn web expert.
You can check yourself:
https://github.com/SWI-Prolog/swish/blob/master/examples/tabling.swinb
It has:
a) HTML around Prolog, and not inside Prolog comments,
so the Prolog text itself needs to be escaped,
a legal Prolog text like below would confuse
the Notebook:
p('</div>').
b) Some custom vendor mark-down in it, I would
prefer some portable HTML mark-up inside ISO comments.
To avoid mark-down processor dependency. Mark-down
could be a feature of some editor/tool to suite the
end-user, but as a format?(*) Nay.
If the query cells were just (?-)/1 directives:
You could:
a) Consult these files by any Prolog interpreter,
just see to it that the (?-)/1 operator is defined.
In the worst case you will get a couple of facts
for (?-)/1, and side effects of queries will
not be processed.
b) Be able to use the ISO read_term/write_term to
process such files. Prolog text files have many
use cases besides consulting. In an IDE you want
to beautify, critique, refactor, etc.. them.
c) I want to use Eclipse, IntelliJ, Visual Studio Code
etc.. with the any Prolog plug-in to edit and debug
notebooks. I want to jump into source lines of
a notebook during debugging.
Have a Nice day!
(*)
How difficult is it to make mark-down disappear in the
persisting of a text? You should be able to regenerate
mark-down if needed from HTML.
Also use a varying number of mark-down processors all
generating HTML, could then be supported. You only
need the back path offered by the processor as well.