# Library, packages and packs?

**URL:** <https://swi-prolog.discourse.group/t/library-packages-and-packs/1889>\
**Category:** Split Topic\
**Created:** [February 20, 2020, 1:17pm UTC](https://swi-prolog.discourse.group/t/library-packages-and-packs/1889 "2020-02-20T13:17:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boris](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/boris/32/7486_2.png) [@Boris](https://swi-prolog.discourse.group/u/Boris)\
**Post date:** [February 20, 2020, 1:17pm UTC](https://swi-prolog.discourse.group/t/library-packages-and-packs/1889/1 "2020-02-20T13:17:21Z")

</div>

> [@Why source\_sink 'library(tipc/tipc)' does not exist?](https://swi-prolog.discourse.group/t/why-source-sink-library-tipc-tipc-does-not-exist/1887/2):
>
> Side note
> 
> Missing from the list of packages in the documentation: [Packs](https://www.swi-prolog.org/pack/list) (add-ons) for SWI-Prolog

It is not a “pack”/“add-on”, it is a “package”. It is one of the submodules that you get when you `git submodule update --init` I think.

You can find a link to it in the “packages”, [here](https://www.swi-prolog.org/pldoc/doc_for?object=packages).

---

<div class="post-metadata">

**Author:** ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Post date:** [February 20, 2020, 1:31pm UTC](https://swi-prolog.discourse.group/t/library-packages-and-packs/1889/2 "2020-02-20T13:31:06Z")

</div>

> [@Boris](#):
>
> It is not a “pack”/“add-on”, it is a “package”.

Now I am confused.

I always thought that were just libraries, which are built-in, and packages, which must be installed manually. With your statement are there 3 different entities: library, package, and packs?

---

<div class="post-metadata">

**Author:** ![Boris](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/boris/32/7486_2.png) [@Boris](https://swi-prolog.discourse.group/u/Boris)\
**Post date:** [February 20, 2020, 1:53pm UTC](https://swi-prolog.discourse.group/t/library-packages-and-packs/1889/3 "2020-02-20T13:53:28Z")

</div>

Again we managed to get off topic, but if you look at [the link I shared above](https://www.swi-prolog.org/pldoc/doc_for?object=packages):

> Packages are relatively independent add-on libraries that may not be available in all installations. Packages are part of the source code releases of SWI-Prolog and may be enabled or disabled during the build.
> 
> See also [Add-ons](https://www.swi-prolog.org/pack/list) for extensions provided by the community that must be installed seperately using [pack\_install/1](https://www.swi-prolog.org/pldoc/doc_for?object=pack_install/1).

I also find the overloading of pack/package/add-on/library a bit confusing but watchagonnado…

Outside of packages and packs/add-ons, [the docs, in the manual](https://www.swi-prolog.org/pldoc/doc_for?object=manual), distinguish between [built-in predicates](https://www.swi-prolog.org/pldoc/man?section=builtin) on the one hand and [The SWI-Prolog Library](https://www.swi-prolog.org/pldoc/man?section=libpl) on the other hand. For example, length/2 is a built-in while phrase\_from\_file/2 is in library(pio). _I think_ that stuff in the “library” is autoloaded so you won’t really know the difference – you don’t need to `:- use_module(library(pio))`. in order to have phrase\_from\_file/2 available.

In the source, the “library” files are in under `library/` and packages are under `packages/`. The built-ins seem to be mostly implemented in C and you can find the code under `src/`.

---

<div class="post-metadata">

**Author:** ![Boris](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/boris/32/7486_2.png) [@Boris](https://swi-prolog.discourse.group/u/Boris)\
**Post date:** [February 20, 2020, 1:58pm UTC](https://swi-prolog.discourse.group/t/library-packages-and-packs/1889/5 "2020-02-20T13:58:19Z")

</div>

This cursed sourcery prevents me from satisfying my deep desire to subvert topics.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [February 20, 2020, 2:30pm UTC](https://swi-prolog.discourse.group/t/library-packages-and-packs/1889/6 "2020-02-20T14:30:44Z")

</div>

Packs and packages are indeed confusing, although people typically have little to do with packages unless they want to build from source in some non-standard stripped-down way.

That said, TIPC requires kernel support and AFAIK MacOS doesn’t have that. So, no matter what else you install except for Linux on your Mac, it won’t work …
