# Request For Comments

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

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

**Page:** 2

---

## [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…

---

## [Building out A Rest Client in Prolog - ChatGPT](https://swi-prolog.discourse.group/t/building-out-a-rest-client-in-prolog-chatgpt/6491)

<div class="topic-metadata">

**Author:** [@Hierophantos](https://swi-prolog.discourse.group/u/Hierophantos)\
**Replies:** 6\
**Last updated:** [April 26, 2023, 9:19am UTC](https://swi-prolog.discourse.group/t/building-out-a-rest-client-in-prolog-chatgpt/6491 "2023-04-26T09:19:51Z")

</div>

So my immediate block right now in building out the rest api is having no clue where to put a json body into post request. Their is zero documentation that I can find anywhere in the standard library, and the source code…

---

## [Reifying results](https://swi-prolog.discourse.group/t/reifying-results/5989)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 17\
**Last updated:** [April 20, 2023, 6:49pm UTC](https://swi-prolog.discourse.group/t/reifying-results/5989 "2023-04-20T18:49:08Z")

</div>

Not entirely sure this is the right term. Summary is that there are several occasions where want to capture the truth value of a goal without failing. Examples are execution in a thread or on a remote server. If t…

---

## [Load, and Unload SWIPL Code from a DataBase like MySQL to clean/renew or hold the requierements of the Memory so small as possible, on a Deskop-Computer-System](https://swi-prolog.discourse.group/t/load-and-unload-swipl-code-from-a-database-like-mysql-to-clean-renew-or-hold-the-requierements-of-the-memory-so-small-as-possible-on-a-deskop-computer-system/6223)

<div class="topic-metadata">

**Author:** [@paule32](https://swi-prolog.discourse.group/u/paule32)\
**Replies:** 8\
**Last updated:** [February 14, 2023, 8:44am UTC](https://swi-prolog.discourse.group/t/load-and-unload-swipl-code-from-a-database-like-mysql-to-clean-renew-or-hold-the-requierements-of-the-memory-so-small-as-possible-on-a-deskop-computer-system/6223 "2023-02-14T08:44:43Z")

</div>

Hello, On bigger Projects, the resulting output executable can be very big for small Solutions. As this reason, I have look to an alternative, and found one of them: that I can load external Files, and execute them w…

---

## [Improving unit tests](https://swi-prolog.discourse.group/t/improving-unit-tests/6091)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 36\
**Last updated:** [February 2, 2023, 9:03am UTC](https://swi-prolog.discourse.group/t/improving-unit-tests/6091 "2023-02-02T09:03:46Z")

</div>

I’m looking into improving the unit test system, notably Add concurrency. Actually, there is some start, but it is broken. Improve the output. Add timeouts. The current feedback prints the unit and a single character…

---

## [Adding mathematically correct comparison of numbers (reals)](https://swi-prolog.discourse.group/t/adding-mathematically-correct-comparison-of-numbers-reals/6100)

<div class="topic-metadata">

**Author:** [@ridgeworks](https://swi-prolog.discourse.group/u/ridgeworks)\
**Replies:** 36\
**Last updated:** [January 25, 2023, 9:38pm UTC](https://swi-prolog.discourse.group/t/adding-mathematically-correct-comparison-of-numbers-reals/6100 "2023-01-25T21:38:39Z")

</div>

As discussed at length in a previous thread (Arithmetic functions rational/1 and rationalize/1), the arithmetic comparisons in most Prologs tested are mathematically incorrect, largely due, I suspect, to the ISO standard…

---

## [Sweep: SWI-Prolog Embedded in Emacs](https://swi-prolog.discourse.group/t/sweep-swi-prolog-embedded-in-emacs/5713)

<div class="topic-metadata">

**Author:** [@oskardrums](https://swi-prolog.discourse.group/u/oskardrums)\
**Replies:** 52\
**Last updated:** [October 3, 2022, 6:34am UTC](https://swi-prolog.discourse.group/t/sweep-swi-prolog-embedded-in-emacs/5713 "2022-10-03T06:34:00Z")

</div>

Hi all, I’ve been working for the past couple of weeks on a little project for improving the integration of SWI-Prolog with GNU Emacs. The idea was to create a setup where Emacs can call Prolog predicates and examine th…

---

## [Solving Boolean Equations using ZDD](https://swi-prolog.discourse.group/t/solving-boolean-equations-using-zdd/5784)

<div class="topic-metadata">

**Author:** [@kuniaki.mukai](https://swi-prolog.discourse.group/u/kuniaki.mukai)\
**Replies:** 0\
**Last updated:** [September 19, 2022, 4:47pm UTC](https://swi-prolog.discourse.group/t/solving-boolean-equations-using-zdd/5784 "2022-09-19T16:47:42Z")

</div>

EDIT: 2022/Sep/22 I have added a few lines of codes to verify that the output equations are really a solution to the given boolean equation. It needs to check that the variables eliminated DNF is a tautology. To do so,…

---

## [Unified key-value interface](https://swi-prolog.discourse.group/t/unified-key-value-interface/4718)

<div class="topic-metadata">

**Author:** [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Replies:** 9\
**Last updated:** [December 15, 2021, 11:10am UTC](https://swi-prolog.discourse.group/t/unified-key-value-interface/4718 "2021-12-15T11:10:06Z")

</div>

Currently there are 5 (or more?) ways of handling key-value pairs in SWI-Prolog: library(pairs), with either unordered or ordered elements (cf library(ordsets)). library(assoc) library(rbtrees) dicts They all provide…

---

## [Inline subterm naming syntax (was: Syntax for unify-and-remember in head?)](https://swi-prolog.discourse.group/t/inline-subterm-naming-syntax-was-syntax-for-unify-and-remember-in-head/4360)

<div class="topic-metadata">

**Author:** [@dmchurch](https://swi-prolog.discourse.group/u/dmchurch)\
**Replies:** 40\
**Last updated:** [October 14, 2021, 8:25am UTC](https://swi-prolog.discourse.group/t/inline-subterm-naming-syntax-was-syntax-for-unify-and-remember-in-head/4360 "2021-10-14T08:25:50Z")

</div>

Problem I often find when I’m writing Prolog that I both want to unify an argument against a template and use that argument in full in the body. As it stands, my options are to (a) postpone the unification until the body…

---

## [Enhanced thread signal interface](https://swi-prolog.discourse.group/t/enhanced-thread-signal-interface/4545)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 12\
**Last updated:** [October 13, 2021, 8:16am UTC](https://swi-prolog.discourse.group/t/enhanced-thread-signal-interface/4545 "2021-10-13T08:16:14Z")

</div>

During a proprietary project we had the need for an enriched interface for thread\_signal/2 and documented the behavior of this interface more precisely. The issue that triggered this was that signals got lost if they …

---

## [Debug Adapter Protocol (DAP)](https://swi-prolog.discourse.group/t/debug-adapter-protocol-dap/4473)

<div class="topic-metadata">

**Author:** [@oskardrums](https://swi-prolog.discourse.group/u/oskardrums)\
**Replies:** 27\
**Last updated:** [October 5, 2021, 2:29pm UTC](https://swi-prolog.discourse.group/t/debug-adapter-protocol-dap/4473 "2021-10-05T14:29:19Z")

</div>

Hey all, Taking inspiration from some of the discussions in this Discourse group about the built-in IDE of SWI-Prolog in comparison to GNU Emacs and other editors, I’ve decided to take a shot at implementing a Debug Ada…

---

## [Extendable array for formal power series as array of virtually infinite size](https://swi-prolog.discourse.group/t/extendable-array-for-formal-power-series-as-array-of-virtually-infinite-size/4396)

<div class="topic-metadata">

**Author:** [@kuniaki.mukai](https://swi-prolog.discourse.group/u/kuniaki.mukai)\
**Replies:** 0\
**Last updated:** [September 6, 2021, 2:32pm UTC](https://swi-prolog.discourse.group/t/extendable-array-for-formal-power-series-as-array-of-virtually-infinite-size/4396 "2021-09-06T14:32:54Z")

</div>

I wrote codes for extendable array with two interface predicates poly\_new/1 and index0/3, which are just simple wrappers of existing predicates in zdd library library(pac(prolog/zdd)). All sample queries in this pos…

---

## [Toplevel name variables](https://swi-prolog.discourse.group/t/toplevel-name-variables/4333)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 8\
**Last updated:** [August 27, 2021, 3:58pm UTC](https://swi-prolog.discourse.group/t/toplevel-name-variables/4333 "2021-08-27T15:58:07Z")

</div>

I’ve pushed a patch that causes the toplevel to give names to variables other than the variables that appear in the query. These variables are, copying SICStus, names \_A, \_B, … Unlike SICStus though, variables that ap…

---

## [Errors considered harmful](https://swi-prolog.discourse.group/t/errors-considered-harmful/3574)

<div class="topic-metadata">

**Author:** [@ridgeworks](https://swi-prolog.discourse.group/u/ridgeworks)\
**Replies:** 106\
**Last updated:** [August 8, 2021, 2:13pm UTC](https://swi-prolog.discourse.group/t/errors-considered-harmful/3574 "2021-08-08T14:13:07Z")

</div>

Interesting discussion on Picat extensions and cuts and I’d like to add my own personal pet peeve with “standard” Prolog. I don’t think there would be much opposition to the topic title. After all (unhandled) errors rip…

---

## [Backtracking global variables](https://swi-prolog.discourse.group/t/backtracking-global-variables/4234)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 0\
**Last updated:** [August 1, 2021, 3:21pm UTC](https://swi-prolog.discourse.group/t/backtracking-global-variables/4234 "2021-08-01T15:21:13Z")

</div>

Dealing with Calling nb\_current with undefined global invokes user:exception hook · Issue #868 · SWI-Prolog/swipl-devel · GitHub, I decided to have a special no value in global variables. This would also allow us that …

---

## [Prolog Language Server: Enabling swipl integration with Python and other languages](https://swi-prolog.discourse.group/t/prolog-language-server-enabling-swipl-integration-with-python-and-other-languages/4126)

<div class="topic-metadata">

**Author:** [@ericzinda](https://swi-prolog.discourse.group/u/ericzinda)\
**Replies:** 30\
**Last updated:** [August 1, 2021, 2:02am UTC](https://swi-prolog.discourse.group/t/prolog-language-server-enabling-swipl-integration-with-python-and-other-languages/4126 "2021-08-01T02:02:46Z")

</div>

I’ve been using SWI Prolog with Python for a couple of years now. When I first started, I had trouble finding a Python library that worked well for me and wanted to find a simple approach I could use for integrating Pyth…

---

## [Library PCE : send/2 get/3 ... or more?](https://swi-prolog.discourse.group/t/library-pce-send-2-get-3-or-more/4226)

<div class="topic-metadata">

**Author:** [@Wisermans](https://swi-prolog.discourse.group/u/Wisermans)\
**Replies:** 3\
**Last updated:** [July 31, 2021, 3:12pm UTC](https://swi-prolog.discourse.group/t/library-pce-send-2-get-3-or-more/4226 "2021-07-31T15:12:09Z")

</div>

Looking at the PCE library and its evolution, I reach what looks like inconsistencies in examples and the documentation, even mentionned in the manual. For example: send(W, return, Typed) and on the next predicate send(…

---

## [Syntax/semantics for partial dicts](https://swi-prolog.discourse.group/t/syntax-semantics-for-partial-dicts/4161)

<div class="topic-metadata">

**Author:** [@dmchurch](https://swi-prolog.discourse.group/u/dmchurch)\
**Replies:** 28\
**Last updated:** [July 20, 2021, 2:12pm UTC](https://swi-prolog.discourse.group/t/syntax-semantics-for-partial-dicts/4161 "2021-07-20T14:12:59Z")

</div>

So, I’ve been thinking about dicts a bunch, and I’ve got an idea that addresses some of the headaches I (and, I gather, others) have been having with them, especially around unification and clause heads and whatnot. What…

---

## [Optional dependencies for packs?](https://swi-prolog.discourse.group/t/optional-dependencies-for-packs/4160)

<div class="topic-metadata">

**Author:** [@jamesnvc](https://swi-prolog.discourse.group/u/jamesnvc)\
**Replies:** 5\
**Last updated:** [July 17, 2021, 11:28pm UTC](https://swi-prolog.discourse.group/t/optional-dependencies-for-packs/4160 "2021-07-17T23:28:51Z")

</div>

Would it be possible to have the ability to mark the dependency a pack requires as optional? My use-case is wanting to use inotify if available, but still have the rest of the library be usable even if running on a platf…

---

## [Weighted graphs](https://swi-prolog.discourse.group/t/weighted-graphs/4165)

<div class="topic-metadata">

**Author:** [@kilian](https://swi-prolog.discourse.group/u/kilian)\
**Replies:** 2\
**Last updated:** [July 15, 2021, 1:49pm UTC](https://swi-prolog.discourse.group/t/weighted-graphs/4165 "2021-07-15T13:49:41Z")

</div>

Hi, I would address the question to Jan, or to any older easy rider! To my best remembrance, some 10-20-(30?) years ago there was another library module, beyond ugraphs, we’ve also had weighted graphs (wgraph, wgraphs, …

---

## [Indicating choice point during debug](https://swi-prolog.discourse.group/t/indicating-choice-point-during-debug/3916)

<div class="topic-metadata">

**Author:** [@grossdan](https://swi-prolog.discourse.group/u/grossdan)\
**Replies:** 7\
**Last updated:** [May 6, 2021, 9:27am UTC](https://swi-prolog.discourse.group/t/indicating-choice-point-during-debug/3916 "2021-05-06T09:27:30Z")

</div>

Hello, While stepping through code with the visual debugger I noticed that upon calls of goals, I can’t tell whether upon return from a call, a choice point has been created or not. Given the importance of designing th…

---

## [A feature upgrade that would be useful for csv\_read\_file/3](https://swi-prolog.discourse.group/t/a-feature-upgrade-that-would-be-useful-for-csv-read-file-3/4071)

<div class="topic-metadata">

**Author:** [@Wisermans](https://swi-prolog.discourse.group/u/Wisermans)\
**Replies:** 23\
**Last updated:** [June 29, 2021, 4:34pm UTC](https://swi-prolog.discourse.group/t/a-feature-upgrade-that-would-be-useful-for-csv-read-file-3/4071 "2021-06-29T16:34:03Z")

</div>

Playing with standard libraries and csv\_read\_file/3 while comparing it to other programming languages … i feel that a feature that would be useful (as it valorizes the “intelligence” of Prolog) would be to add a filter i…

---

## [A page for beginners to add to SWI-Prolog internet site](https://swi-prolog.discourse.group/t/a-page-for-beginners-to-add-to-swi-prolog-internet-site/4076)

<div class="topic-metadata">

**Author:** [@Wisermans](https://swi-prolog.discourse.group/u/Wisermans)\
**Replies:** 34\
**Last updated:** [June 19, 2021, 4:48am UTC](https://swi-prolog.discourse.group/t/a-page-for-beginners-to-add-to-swi-prolog-internet-site/4076 "2021-06-19T04:48:23Z")

</div>

What do you think about it ??? … and a question to Jan … To help new users, i would find useful to add a dedicated page to the SWI prolog website with examples that could fit adding a menu Tutorials/Beginners/Examples D…

---

## [VM code refactor - thoughts?](https://swi-prolog.discourse.group/t/vm-code-refactor-thoughts/3845)

<div class="topic-metadata">

**Author:** [@dmchurch](https://swi-prolog.discourse.group/u/dmchurch)\
**Replies:** 113\
**Last updated:** [May 30, 2021, 11:36pm UTC](https://swi-prolog.discourse.group/t/vm-code-refactor-thoughts/3845 "2021-05-30T23:36:19Z")

</div>

Hello! As I mentioned in What is the status of SWI-Prolog ported to WebAssembly, I’m working on enhancing swipl’s WebAssembly port. It’s going along fairly well, with the one unfortunate exception that pl-wam.c takes app…

---

## [C stack as environment stack?](https://swi-prolog.discourse.group/t/c-stack-as-environment-stack/3953)

<div class="topic-metadata">

**Author:** [@dmchurch](https://swi-prolog.discourse.group/u/dmchurch)\
**Replies:** 13\
**Last updated:** [May 18, 2021, 6:31pm UTC](https://swi-prolog.discourse.group/t/c-stack-as-environment-stack/3953 "2021-05-18T18:31:11Z")

</div>

I’ve been tossing around a number of thoughts as regards the prolog VM, and there’s one thing that keeps popping up in my head: what if we used the C call stack as the Prolog environment stack? Obviously there are some c…

---

## [Specification and Guide of swi-prolog's Virtual Machine Instructions (VMIs)](https://swi-prolog.discourse.group/t/specification-and-guide-of-swi-prologs-virtual-machine-instructions-vmis/3884)

<div class="topic-metadata">

**Author:** [@grossdan](https://swi-prolog.discourse.group/u/grossdan)\
**Replies:** 11\
**Last updated:** [May 9, 2021, 9:38am UTC](https://swi-prolog.discourse.group/t/specification-and-guide-of-swi-prologs-virtual-machine-instructions-vmis/3884 "2021-05-09T09:38:41Z")

</div>

Hi all, To become an advanced SWI Prolog programmer its crucial to understand the SWI Prolog virtual instructions set. I think its time that this is documented systematically from the minds of the few who have that kno…

---

## [STOMP support](https://swi-prolog.discourse.group/t/stomp-support/3853)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 4\
**Last updated:** [April 22, 2021, 11:02am UTC](https://swi-prolog.discourse.group/t/stomp-support/3853 "2021-04-22T11:02:54Z")

</div>

With a customer we are looking how to connect Prolog to RabbitMQ for relatively low-traffic communication. We stumbled on STOMPL by @honnix. That didn’t really work anymore. I forked it and did some serious rewrite…

---

## [Optimzing context argument in the VM](https://swi-prolog.discourse.group/t/optimzing-context-argument-in-the-vm/3791)

<div class="topic-metadata">

**Author:** [@grossdan](https://swi-prolog.discourse.group/u/grossdan)\
**Replies:** 13\
**Last updated:** [April 9, 2021, 2:02am UTC](https://swi-prolog.discourse.group/t/optimzing-context-argument-in-the-vm/3791 "2021-04-09T02:02:13Z")

</div>

Hello, I am rereading the Crafts book again. Section 1.4 discusses the context argument that is used in lieu of a local variable in imperative languages. The example given is below, where Multiplier is a “local” variab…

---

## [Update arg in the dynamic fact base](https://swi-prolog.discourse.group/t/update-arg-in-the-dynamic-fact-base/3794)

<div class="topic-metadata">

**Author:** [@grossdan](https://swi-prolog.discourse.group/u/grossdan)\
**Replies:** 15\
**Last updated:** [April 6, 2021, 12:24pm UTC](https://swi-prolog.discourse.group/t/update-arg-in-the-dynamic-fact-base/3794 "2021-04-06T12:24:06Z")

</div>

Hello, Since today i am full of great new ideas, here is another one i have been contemplating :slight\_smile: Suppose we have a dynamic fact such as so, and we want to update the list to include another element, e: :-…

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

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