# Request For Comments

**URL:** https://swi-prolog.discourse.group/c/request-for-comments/11.md

[Latest](https://swi-prolog.discourse.group/latest.md) · [Categories](https://swi-prolog.discourse.group/categories.md) · [Tags](https://swi-prolog.discourse.group/tags.md)

---

## [About the Request For Comments category](https://swi-prolog.discourse.group/t/about-the-request-for-comments-category/667)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 0

</div>

This category is about discussing new features. A new topic should describe a problem and propose a solution. The discussion is used to finalize the solution or decide to reject the proposal.

---

## [Progressing the SWI-Prolog environment](https://swi-prolog.discourse.group/t/progressing-the-swi-prolog-environment/9090)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 168\
**Last updated:** [September 27, 2026, 7:55am UTC](https://swi-prolog.discourse.group/t/progressing-the-swi-prolog-environment/9090 "2026-09-27T07:55:06Z")

</div>

This topic is a follow up for Future of XPCE. The initial plan was to give xpce, the SWI-Prolog GUI library, a boost to keep it alive. As a result, xpce is now being moved to SDL+Cairo+Pango, providing an excellent cro…

---

## [Escape from popup dialogs](https://swi-prolog.discourse.group/t/escape-from-popup-dialogs/9835)

<div class="topic-metadata">

**Author:** [@mike.elston](https://swi-prolog.discourse.group/u/mike.elston)\
**Replies:** 2\
**Last updated:** [September 24, 2026, 7:31pm UTC](https://swi-prolog.discourse.group/t/escape-from-popup-dialogs/9835 "2026-09-24T19:31:21Z")

</div>

This is in the “would be nice” rather than “essential” category but I think it would helpful if pop up dialogs in PceEmacs, specifically the Query replace dialogs, could be dismissed with the Esc key.

---

## [Undecidable order (some cyclic terms)](https://swi-prolog.discourse.group/t/undecidable-order-some-cyclic-terms/9833)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 0\
**Last updated:** [September 23, 2026, 12:56pm UTC](https://swi-prolog.discourse.group/t/undecidable-order-some-cyclic-terms/9833 "2026-09-23T12:56:20Z")

</div>

A reported bug on standard order for cyclic terms (#1529) made it free to detect cyclic terms that have no defined order. As a result, SWI-Prolog now has a flag incomparable that can be set to arbitrary (default, old b…

---

## [Instability of standard order](https://swi-prolog.discourse.group/t/instability-of-standard-order/9830)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 7\
**Last updated:** [September 22, 2026, 8:44am UTC](https://swi-prolog.discourse.group/t/instability-of-standard-order/9830 "2026-09-22T08:44:25Z")

</div>

The discussion has been here before: standard order of terms is complete (except cyclic terms :frowning: ), but unstable, i.e., X @\< a, X = b succeeds, but a @\< b rather than a @\> b. I wonder whether we should have a …

---

## [Should the reference manual document differences between the current version and earlier versions?](https://swi-prolog.discourse.group/t/should-the-reference-manual-document-differences-between-the-current-version-and-earlier-versions/1658)

<div class="topic-metadata">

**Author:** [@cmsmcq](https://swi-prolog.discourse.group/u/cmsmcq)\
**Replies:** 4\
**Last updated:** [June 23, 2026, 3:30pm UTC](https://swi-prolog.discourse.group/t/should-the-reference-manual-document-differences-between-the-current-version-and-earlier-versions/1658 "2026-06-23T15:30:42Z")

</div>

The reference manual at SWI-Prolog -- Status and releases is quite clear, in section 1.2, that This manual describes version 8.1.19 of SWI-Prolog. This has as a consequence that on any point where things have changed…

---

## [Resolving MQI ambiguities](https://swi-prolog.discourse.group/t/resolving-mqi-ambiguities/9685)

<div class="topic-metadata">

**Author:** [@JansthcirlU](https://swi-prolog.discourse.group/u/JansthcirlU)\
**Replies:** 0\
**Last updated:** [June 9, 2026, 9:16am UTC](https://swi-prolog.discourse.group/t/resolving-mqi-ambiguities/9685 "2026-06-09T09:16:45Z")

</div>

Hi all, I’m Jan and I got started with Prolog fairly recently to learn more about logic programming. I’m a .NET developer by profession so I was immediately intrigued by the idea of creating an MQI client for C# so that …

---

## [Dicts, attribute variables and cyclic terms](https://swi-prolog.discourse.group/t/dicts-attribute-variables-and-cyclic-terms/9324)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 20\
**Last updated:** [October 21, 2025, 2:18pm UTC](https://swi-prolog.discourse.group/t/dicts-attribute-variables-and-cyclic-terms/9324 "2025-10-21T14:18:27Z")

</div>

Some discussions are going on in the PIP working group related to synchronize (as a lightweight standardize) some aspects between Prolog systems. I’d like to seek opinions on a few things. Let me start with the relevan…

---

## [Towards an extension of \`library(error)\`](https://swi-prolog.discourse.group/t/towards-an-extension-of-library-error/2485)

<div class="topic-metadata">

**Author:** [@dtonhofer](https://swi-prolog.discourse.group/u/dtonhofer)\
**Replies:** 3\
**Last updated:** [June 9, 2020, 7:18am UTC](https://swi-prolog.discourse.group/t/towards-an-extension-of-library-error/2485 "2020-06-09T07:18:55Z")

</div>

In the context of a little code cleanup of JPL consisting (mainly) in grouping all the calls to throw/1, Jan Wielemaker & myself wanted to kick off a discussion of an extension to library(eror). So I will post first. Na…

---

## [Persistent predicates based on RocksDB](https://swi-prolog.discourse.group/t/persistent-predicates-based-on-rocksdb/5501)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 108\
**Last updated:** [February 8, 2025, 10:55am UTC](https://swi-prolog.discourse.group/t/persistent-predicates-based-on-rocksdb/5501 "2025-02-08T10:55:28Z")

</div>

While library(persistency) allows for tracking and restoring clauses associated to a predicate, it doesn’t scale all that well. After some recent scalability discussions I though to explore the option to store clauses …

---

## [Fold over answers](https://swi-prolog.discourse.group/t/fold-over-answers/8697)

<div class="topic-metadata">

**Author:** [@Boris](https://swi-prolog.discourse.group/u/Boris)\
**Replies:** 8\
**Last updated:** [December 30, 2024, 6:58am UTC](https://swi-prolog.discourse.group/t/fold-over-answers/8697 "2024-12-30T06:58:59Z")

</div>

I think I missed the real question by @emiruz. The foldl at the end of their question: in library(aggregate) there are templates, but you cannot provide your own aggregation operation. I think @j4n\_bur53 showed something…

---

## ["Getting out" using exceptions](https://swi-prolog.discourse.group/t/getting-out-using-exceptions/8512)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 2\
**Last updated:** [October 4, 2024, 2:36pm UTC](https://swi-prolog.discourse.group/t/getting-out-using-exceptions/8512 "2024-10-04T14:36:18Z")

</div>

Prolog has a couple of ways to stop the current computation. halt/1 is the most drastic. Next to that we have thread\_exit/1 to terminate a thread immediately providing some value and abort/0 to stop the current execut…

---

## [Stop non terminating Python/Prolog programs with Ctrl-C](https://swi-prolog.discourse.group/t/stop-non-terminating-python-prolog-programs-with-ctrl-c/8504)

<div class="topic-metadata">

**Author:** [@pampelmuse76](https://swi-prolog.discourse.group/u/pampelmuse76)\
**Replies:** 2\
**Last updated:** [September 30, 2024, 4:04pm UTC](https://swi-prolog.discourse.group/t/stop-non-terminating-python-prolog-programs-with-ctrl-c/8504 "2024-09-30T16:04:59Z")

</div>

I have the following python/prolog program on a Linux(current Fedora) started in a bash: import janus\_swi as janus for result in janus.query("length(\_, X), X = \[\]"): print(f'{result}') Obviously this does not termi…

---

## [Making more than one janus.consult() statements possible](https://swi-prolog.discourse.group/t/making-more-than-one-janus-consult-statements-possible/7799)

<div class="topic-metadata">

**Author:** [@pampelmuse76](https://swi-prolog.discourse.group/u/pampelmuse76)\
**Replies:** 13\
**Last updated:** [September 28, 2024, 2:34pm UTC](https://swi-prolog.discourse.group/t/making-more-than-one-janus-consult-statements-possible/7799 "2024-09-28T14:34:11Z")

</div>

I would like to generate my predicates with python. Example with “pyswip” (AoC 2020 day 1) (“input” is a file with a large number of integers) #!/usr/bin/python from pyswip import Prolog prolog = Prolog() for line i…

---

## [C API, switch to \`bool\`?](https://swi-prolog.discourse.group/t/c-api-switch-to-bool/7756)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 25\
**Last updated:** [September 26, 2024, 5:03pm UTC](https://swi-prolog.discourse.group/t/c-api-switch-to-bool/7756 "2024-09-26T17:03:07Z")

</div>

The next C standard will add true, false and bool as keywords to the language. There is already stdbool.h which provides this type and constant. As is, the internal source uses typedef int bool and uses macros true(…

---

## [Supporting flatpak?](https://swi-prolog.discourse.group/t/supporting-flatpak/7452)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 23\
**Last updated:** [August 19, 2024, 2:20pm UTC](https://swi-prolog.discourse.group/t/supporting-flatpak/7452 "2024-08-19T14:20:32Z")

</div>

Although it proved possible to build a snap image for SWI-Prolog on Fedora, snap is primarily a Canonical product. Flatpak is similar and promoted by most Linux distributions. That made me think to provide a flatpak…

---

## [Future of the space package?](https://swi-prolog.discourse.group/t/future-of-the-space-package/7622)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 6\
**Last updated:** [July 31, 2024, 5:15pm UTC](https://swi-prolog.discourse.group/t/future-of-the-space-package/7622 "2024-07-31T17:15:01Z")

</div>

The space package provides an interface to the spatialindex and geos libraries to create indexes in multi-dimensional spaces and reason about shapes (distance, inside, overlap, …) It was written long ago by Willem van…

---

## [Pack Prolog version dependencies?](https://swi-prolog.discourse.group/t/pack-prolog-version-dependencies/7601)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 3\
**Last updated:** [July 17, 2024, 12:23pm UTC](https://swi-prolog.discourse.group/t/pack-prolog-version-dependencies/7601 "2024-07-17T12:23:23Z")

</div>

Recent versions of the pack system allow putting constraints on the Prolog version, so the pack won’t install on incompatible Prolog versions. It allows for prolog Cmp Version Demand a Prolog version (range). E.g. p…

---

## [Cooking: internal data representation](https://swi-prolog.discourse.group/t/cooking-internal-data-representation/7351)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 8\
**Last updated:** [April 10, 2024, 9:38pm UTC](https://swi-prolog.discourse.group/t/cooking-internal-data-representation/7351 "2024-04-10T21:38:44Z")

</div>

SWI-Prolog’s internal representation of Prolog data is shaped in the days of 32 bit machines. In the early days, 32 bits where plenty to address 8Mb of physical memory and keep various bits for type tagging and garbage…

---

## [Creating more than one Modules in one File for dict methods](https://swi-prolog.discourse.group/t/creating-more-than-one-modules-in-one-file-for-dict-methods/7358)

<div class="topic-metadata">

**Author:** [@Frank\_Schwidom](https://swi-prolog.discourse.group/u/Frank_Schwidom)\
**Replies:** 3\
**Last updated:** [April 9, 2024, 12:11pm UTC](https://swi-prolog.discourse.group/t/creating-more-than-one-modules-in-one-file-for-dict-methods/7358 "2024-04-09T12:11:58Z")

</div>

When I create methods (or in swl speech functions, but I like to call it methods because it looks like methods in OO languages) for dicts I am forced to create another file. Discourse proposed another thread to me in wh…

---

## [Dicts for structured programming and \>:\<](https://swi-prolog.discourse.group/t/dicts-for-structured-programming-and/7357)

<div class="topic-metadata">

**Author:** [@Frank\_Schwidom](https://swi-prolog.discourse.group/u/Frank_Schwidom)\
**Replies:** 1\
**Last updated:** [April 8, 2024, 8:30am UTC](https://swi-prolog.discourse.group/t/dicts-for-structured-programming-and/7357 "2024-04-08T08:30:53Z")

</div>

When I use dicts to get a better readable code structure I have at any point the situation that I need to unify dicts of dicts against each other. But the operator \>:\< works only on the surface of dicts and does not go …

---

## [Time to drop 32-bit Windows?](https://swi-prolog.discourse.group/t/time-to-drop-32-bit-windows/7203)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 3\
**Last updated:** [January 30, 2024, 7:33am UTC](https://swi-prolog.discourse.group/t/time-to-drop-32-bit-windows/7203 "2024-01-30T07:33:28Z")

</div>

Dear Windows users, I wonder whether the time has come to drop the distribution of binaries for 32-bit Windows. It gets slowly harder to support. The Java binding is compiled against the pretty old OpenJDK-14, there…

---

## [Command line scripts](https://swi-prolog.discourse.group/t/command-line-scripts/6924)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 9\
**Last updated:** [November 20, 2023, 3:18pm UTC](https://swi-prolog.discourse.group/t/command-line-scripts/6924 "2023-11-20T15:18:04Z")

</div>

Following How to call a predicate with arguments from command line and output its solution? and Symbolic links and real file names \[mainly Windows Platform\] and considering that in XSB the command line xsb name runs name…

---

## [When should library(apply\_macros) affect code?](https://swi-prolog.discourse.group/t/when-should-library-apply-macros-affect-code/6969)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 2\
**Last updated:** [November 18, 2023, 12:36pm UTC](https://swi-prolog.discourse.group/t/when-should-library-apply-macros-affect-code/6969 "2023-11-18T12:36:28Z")

</div>

The library(apply\_macros) provides goal\_expansion/2 rules that cause various meta predicates to be compiled rather than using relatively costly meta-calling. Typically it doesn’t matter too much whether this transforma…

---

## [A general \`-Dflag=value\` commandline option](https://swi-prolog.discourse.group/t/a-general-dflag-value-commandline-option/6968)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 8\
**Last updated:** [November 16, 2023, 11:49pm UTC](https://swi-prolog.discourse.group/t/a-general-dflag-value-commandline-option/6968 "2023-11-16T23:49:05Z")

</div>

As all new features in the devel tree, although already available in the GIT version, there is room for changes … I’ve pushed a patch that makes swipl handle -Dflag=value (or -D flag=value) as a generic mechanism to set…

---

## [Picat style matching](https://swi-prolog.discourse.group/t/picat-style-matching/3560)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 64\
**Last updated:** [November 4, 2023, 2:38am UTC](https://swi-prolog.discourse.group/t/picat-style-matching/3560 "2023-11-04T02:38:06Z")

</div>

Writing code that does rewrites of terms that may contain variables, I recall the pain doing such. One always has to be careful not to instantiate the input data. Thus, rule(Var, Out) :- var(Var), !, Ou…

---

## [Symbolic links to source files and finding relative files?](https://swi-prolog.discourse.group/t/symbolic-links-to-source-files-and-finding-relative-files/6884)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 6\
**Last updated:** [October 15, 2023, 11:11am UTC](https://swi-prolog.discourse.group/t/symbolic-links-to-source-files-and-finding-relative-files/6884 "2023-10-15T11:11:53Z")

</div>

This topic follows Running a script via a symlink in a different directory fails to load module files · Issue #1201 · SWI-Prolog/swipl-devel · GitHub I think there are two related questions: When using swipl file ... …

---

## [Extracting part of a clause body into a new predicate](https://swi-prolog.discourse.group/t/extracting-part-of-a-clause-body-into-a-new-predicate/6830)

<div class="topic-metadata">

**Author:** [@oskardrums](https://swi-prolog.discourse.group/u/oskardrums)\
**Replies:** 2\
**Last updated:** [September 9, 2023, 2:38pm UTC](https://swi-prolog.discourse.group/t/extracting-part-of-a-clause-body-into-a-new-predicate/6830 "2023-09-09T14:38:31Z")

</div>

Hi all, Following a recent discussion on the emacs-devel mailing list, I’ve added a way in Sweep to extract a goal from the body of a clause into a separate predicate. That can be useful when you want to reuse a comple…

---

## [Microsoft Visual C++ base building](https://swi-prolog.discourse.group/t/microsoft-visual-c-base-building/6805)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 0\
**Last updated:** [August 30, 2023, 2:57pm UTC](https://swi-prolog.discourse.group/t/microsoft-visual-c-base-building/6805 "2023-08-30T14:57:09Z")

</div>

After installing Microsoft Visual C++ on my Windows VM as required by pip to create the Python package for SWI-Prolog, I took some time to see whether I could build SWI-Prolog using MSVC. The current state for building…

---

## [A bundled Python interface](https://swi-prolog.discourse.group/t/a-bundled-python-interface/6735)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 91\
**Last updated:** [August 21, 2023, 6:05am UTC](https://swi-prolog.discourse.group/t/a-bundled-python-interface/6735 "2023-08-21T06:05:49Z")

</div>

Theresa Swift from XSB has convinced me that a bundled Python interface has a lot of value. She presented a paper on Janus, the XSB Python interface. The main goal is to access Python transparently and hassle-free f…

[Next page](https://swi-prolog.discourse.group/c/request-for-comments/11.md?page=1)
