For example, python has a website called pypi https://pypi.org/ where programmers post their python programs and so other python programmers can use these modules in projects. Do you have a site like pypi for the prolog? Where can I share my programs developed in prolog?
Have you seen this page: SWI-Prolog packages
They are currently called “add-ons”.
There is also SWISH, for slightly different use cases but still very useful for sharing (small) programs.
The next question is how can I add my module to the prolog for all programmers to have access and use?
Packs (add-ons) may be installed globally or per user. When you install the first pack with sufficient rights it nicely asks. We probably need some option to pack_install/2 to install a subsequent package locally or globally. As it is searches directories following the XDG standards. The somewhat unsatisfactory answer is that it can be done, but it requires a little tweaking and this tweaking depends on the operating system. You find the logic in boot/init.pl
of the installed tree with the definition of file_search_path/2
.
Pushed a patch that allows for installing a pack in a shared location (usually /usr/local/share/swi-prolog
on POSIX systems):
?- pack_install(somepack, [global(true)]).
From what I’ve read about it, what python calls modules, you call addons. So, for me to add my addons I have to access this link: Creating and submitting extension packages for SWI-Prolog