Towards an infrastructure for examples

Thanks for the remarks. I fully agree. I think we are doing fairly well wrt. docs compared to many other Prolog systems. At the same time we compare quite poor compared to many other popular languages.

That is a lot of work with only a handful of people that have sufficient overview to write that. I’d love to see this happen and if at some point SWI-Prolog Solutions raises enough resources to be able to hire someone to make this happen it should be high on the priority list.

Nothing wrong with that. It should also keep working. The examples repo is just a git submodule of the website, so it will also work locally. You can even use the same infrastructure to deal with your own examples. Storing examples separately from (notably) the LaTeX docs has quite a few advantages

  • Uniform machine-readable representation allows for automatic testing, SWISH embedding, etc.
  • A little bit longer examples are often relevant to multiple contexts. Now we have a rather simple matching scheme. Something smarter should not be that hard.
  • I think it is more lightweight to manage and result in better examples.
  • Also somewhat longer tutorial-like examples can be handled this way.