# Help!

**URL:** https://swi-prolog.discourse.group/c/help/6.md?page=2

[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:** 3

---

## [I have a nice and complicated crash](https://swi-prolog.discourse.group/t/i-have-a-nice-and-complicated-crash/9350)

<div class="topic-metadata">

**Author:** [@Frank\_Schwidom](https://swi-prolog.discourse.group/u/Frank_Schwidom)\
**Replies:** 4\
**Last updated:** [October 17, 2025, 11:10am UTC](https://swi-prolog.discourse.group/t/i-have-a-nice-and-complicated-crash/9350 "2025-10-17T11:10:22Z")

</div>

I’m using: SWI-Prolog version threaded, 64 bits, version 9.3.20-DIRTY I put the following code in the console and first an errormessage comes up which is expected but then I use the cursor up to regain the same input …

---

## [Suspicious warning "The predicates below are not defined ','/6"](https://swi-prolog.discourse.group/t/suspicious-warning-the-predicates-below-are-not-defined-6/9346)

<div class="topic-metadata">

**Author:** [@Frank\_Schwidom](https://swi-prolog.discourse.group/u/Frank_Schwidom)\
**Replies:** 17\
**Last updated:** [October 12, 2025, 7:29pm UTC](https://swi-prolog.discourse.group/t/suspicious-warning-the-predicates-below-are-not-defined-6/9346 "2025-10-12T19:29:22Z")

</div>

This is a reduced code of a project: mi\_term( MI\_TERM, TERM, DICT\_IN, DICT\_OUT) :- MI\_TERM \\\\== (\*,\*), call( MI\_TERM, MI\_TERM, TERM, DICT\_IN, DICT\_OUT). main\_001 :- true , MI\_TERM= ( current\_input/1, read\_string/5) , m…

---

## [Random colorized code looks nice but isn't helpful](https://swi-prolog.discourse.group/t/random-colorized-code-looks-nice-but-isnt-helpful/9347)

<div class="topic-metadata">

**Author:** [@siegfried](https://swi-prolog.discourse.group/u/siegfried)\
**Replies:** 7\
**Last updated:** [October 10, 2025, 11:41am UTC](https://swi-prolog.discourse.group/t/random-colorized-code-looks-nice-but-isnt-helpful/9347 "2025-10-10T11:41:44Z")

</div>

Hi, I’m using: SWI-Prolog version 9.30 on a windows11 machine. I’m using mostly XPCE version 7.0.0 because the colored syntax helps me a bit during programming. But when my code gets longer it becomes more and more rand…

---

## [Listing regular files with directory\_member/2](https://swi-prolog.discourse.group/t/listing-regular-files-with-directory-member-2/9343)

<div class="topic-metadata">

**Author:** [@Boris](https://swi-prolog.discourse.group/u/Boris)\
**Replies:** 1\
**Last updated:** [October 5, 2025, 8:06am UTC](https://swi-prolog.discourse.group/t/listing-regular-files-with-directory-member-2/9343 "2025-10-05T08:06:56Z")

</div>

Currently, using the option file\_type(regular) causes directory\_member/2 to fail without any solutions, no matter what is in that directory. $ mkdir foo $ cd foo $ touch a b c $ swipl Welcome to SWI-Prolog (threaded, 64…

---

## [Table of contents in SWISH notebook](https://swi-prolog.discourse.group/t/table-of-contents-in-swish-notebook/9330)

<div class="topic-metadata">

**Author:** [@Rscho314](https://swi-prolog.discourse.group/u/Rscho314)\
**Replies:** 7\
**Last updated:** [October 4, 2025, 2:49pm UTC](https://swi-prolog.discourse.group/t/table-of-contents-in-swish-notebook/9330 "2025-10-04T14:49:31Z")

</div>

Hi, I’d like to make a table of contents in a SWISH notebook. My problem is that I wasn’t able to make an internal link with either markdown or HTML (did not try javascript hacks). All my attempts open the link in a new…

---

## [How to make it write all of a list](https://swi-prolog.discourse.group/t/how-to-make-it-write-all-of-a-list/9322)

<div class="topic-metadata">

**Author:** [@martin](https://swi-prolog.discourse.group/u/martin)\
**Replies:** 3\
**Last updated:** [September 26, 2025, 11:21am UTC](https://swi-prolog.discourse.group/t/how-to-make-it-write-all-of-a-list/9322 "2025-09-26T11:21:21Z")

</div>

I’m using: SWI-Prolog version 9.3.31. I want the code to: make the interpreter write lists without “…”. E.g. it should write “\[did, she\]” instead of “\[did|…\]”. Is there a way to do this with version 9.3.31 ? In older…

---

## [Random number generation, seeds, and GMP](https://swi-prolog.discourse.group/t/random-number-generation-seeds-and-gmp/9317)

<div class="topic-metadata">

**Author:** [@Boris](https://swi-prolog.discourse.group/u/Boris)\
**Replies:** 3\
**Last updated:** [September 25, 2025, 10:49am UTC](https://swi-prolog.discourse.group/t/random-number-generation-seeds-and-gmp/9317 "2025-09-25T10:49:22Z")

</div>

Is the claim in the documentation to getrand/1 and setrand/1 still correct? It says, Errors - existence\_error(random\_state, \_) is raised if the underlying infrastructure cannot fetch the random state. This is currentl…

---

## [Why is there a limit in the $VAR translation?](https://swi-prolog.discourse.group/t/why-is-there-a-limit-in-the-var-translation/9318)

<div class="topic-metadata">

**Author:** [@Frank\_Schwidom](https://swi-prolog.discourse.group/u/Frank_Schwidom)\
**Replies:** 3\
**Last updated:** [September 25, 2025, 8:06am UTC](https://swi-prolog.discourse.group/t/why-is-there-a-limit-in-the-var-translation/9318 "2025-09-25T08:06:41Z")

</div>

?- L=‘$VAR’(10000000000000000). L = Q384615384615384. ?- L=‘$VAR’(100000000000000000). L = ‘$VAR’(100000000000000000). Why is there a limit in the $VAR translation?

---

## [Drop-down Menues of PceEmacs on the wrong screen](https://swi-prolog.discourse.group/t/drop-down-menues-of-pceemacs-on-the-wrong-screen/9295)

<div class="topic-metadata">

**Author:** [@siegfried](https://swi-prolog.discourse.group/u/siegfried)\
**Replies:** 6\
**Last updated:** [September 22, 2025, 1:52pm UTC](https://swi-prolog.discourse.group/t/drop-down-menues-of-pceemacs-on-the-wrong-screen/9295 "2025-09-22T13:52:13Z")

</div>

I’m using: SWI-Prolog version 9.2.9 (64 bits) on a Windows 11 machine with an separate monitor on my laptop. The SWI-Prolog is working fine (so far) on the sep. monitor. If I try to use the PceEmacs by clicking on File …

---

## [Can I anyhow create my own types in the type\_check package?](https://swi-prolog.discourse.group/t/can-i-anyhow-create-my-own-types-in-the-type-check-package/9312)

<div class="topic-metadata">

**Author:** [@Frank\_Schwidom](https://swi-prolog.discourse.group/u/Frank_Schwidom)\
**Replies:** 0\
**Last updated:** [September 22, 2025, 10:57am UTC](https://swi-prolog.discourse.group/t/can-i-anyhow-create-my-own-types-in-the-type-check-package/9312 "2025-09-22T10:57:08Z")

</div>

With “my own types” I don’t mean the type notation of the type\_check package. There are some swi prolog types which are not covered by this package for instance: strings and dicts. Atoms are covered by the ‘strings’ typ…

---

## [Crash when initializing GMP](https://swi-prolog.discourse.group/t/crash-when-initializing-gmp/9249)

<div class="topic-metadata">

**Author:** [@nvetrini](https://swi-prolog.discourse.group/u/nvetrini)\
**Replies:** 5\
**Last updated:** [September 22, 2025, 6:21am UTC](https://swi-prolog.discourse.group/t/crash-when-initializing-gmp/9249 "2025-09-22T06:21:15Z")

</div>

Hi, after upgrading to 2380532402c1ccf86bf8992fe6ed52a16234172f (thanks Jan for the patch) on Linux/x86\_64 I was running some regression tests on my application, and I noticed a crash tied to GMP. Naturally swipl is buil…

---

## [Getting parentheses to indicate precedence when interpreting clause bodies](https://swi-prolog.discourse.group/t/getting-parentheses-to-indicate-precedence-when-interpreting-clause-bodies/3838)

<div class="topic-metadata">

**Author:** [@JCR](https://swi-prolog.discourse.group/u/JCR)\
**Replies:** 1\
**Last updated:** [April 19, 2021, 11:24am UTC](https://swi-prolog.discourse.group/t/getting-parentheses-to-indicate-precedence-when-interpreting-clause-bodies/3838 "2021-04-19T11:24:57Z")

</div>

Hi, I don’t understand how to preserve parentheses that indicate precedence when interpreting clause bodies. The query test below yields \[a, ∧ ,b, ∨ ,c\] but i was expecting something like \[a, ∧ , '(', b, ∨ ,c, ')'\]; i.e…

---

## [How to send the console text to a file?](https://swi-prolog.discourse.group/t/how-to-send-the-console-text-to-a-file/9298)

<div class="topic-metadata">

**Author:** [@martin](https://swi-prolog.discourse.group/u/martin)\
**Replies:** 7\
**Last updated:** [September 20, 2025, 11:58am UTC](https://swi-prolog.discourse.group/t/how-to-send-the-console-text-to-a-file/9298 "2025-09-20T11:58:46Z")

</div>

I’m using: SWI-Prolog version 9.3.30. Is there a way to send the text from the SWI Prolog console to a file? Or from the Linux Terminal to a file? This is so that I can keep a record of what I entered at the “?-” prom…

---

## [Swi Prolog seems to start up an old version, after an update](https://swi-prolog.discourse.group/t/swi-prolog-seems-to-start-up-an-old-version-after-an-update/9273)

<div class="topic-metadata">

**Author:** [@martin](https://swi-prolog.discourse.group/u/martin)\
**Replies:** 4\
**Last updated:** [September 15, 2025, 4:49pm UTC](https://swi-prolog.discourse.group/t/swi-prolog-seems-to-start-up-an-old-version-after-an-update/9273 "2025-09-15T16:49:47Z")

</div>

I am using Linux Mint Cinnamon. I’m have recently updated SWI Prolog to SWI-Prolog version 9.3.30, using the update manager, mintUpdate. Its a Flatpack. I want the code to: start up Swipl version 9.3.30 when I enter …

---

## [MacOS pack install without Xcode](https://swi-prolog.discourse.group/t/macos-pack-install-without-xcode/9255)

<div class="topic-metadata">

**Author:** [@ridgeworks](https://swi-prolog.discourse.group/u/ridgeworks)\
**Replies:** 19\
**Last updated:** [September 14, 2025, 7:02am UTC](https://swi-prolog.discourse.group/t/macos-pack-install-without-xcode/9255 "2025-09-14T07:02:04Z")

</div>

Trying to do a pack\_install on a new Mac laptop with no Apple developer tools installed, e.g., ?- pack\_install(clpBNR). % Contacting server at https://www.swi-prolog.org/pack/query ... ok Installation plan: Install cl…

---

## [How to select the venv when using Janus?](https://swi-prolog.discourse.group/t/how-to-select-the-venv-when-using-janus/9260)

<div class="topic-metadata">

**Author:** [@Sang\_Shijie](https://swi-prolog.discourse.group/u/Sang_Shijie)\
**Replies:** 11\
**Last updated:** [September 10, 2025, 7:42am UTC](https://swi-prolog.discourse.group/t/how-to-select-the-venv-when-using-janus/9260 "2025-09-10T07:42:35Z")

</div>

Hi all, When I was using Janus to embed python into prolog, it always select the python in /use/bin/. Its version is 3.12.3. But I need python in the version 3.8.20. So I create a virtual environment with python3.8.20. …

---

## [Is the documentation of library(heaps) confusing?](https://swi-prolog.discourse.group/t/is-the-documentation-of-library-heaps-confusing/9259)

<div class="topic-metadata">

**Author:** [@Boris](https://swi-prolog.discourse.group/u/Boris)\
**Replies:** 5\
**Last updated:** [September 9, 2025, 3:55pm UTC](https://swi-prolog.discourse.group/t/is-the-documentation-of-library-heaps-confusing/9259 "2025-09-09T15:55:08Z")

</div>

Maybe it is just me. I think the underlying reason is the generous use of the forward slash in the text. For example, we find the following pairs (with a bit of context, because I am not even sure how should this parse, …

---

## [Possible bug in library persistency?](https://swi-prolog.discourse.group/t/possible-bug-in-library-persistency/9256)

<div class="topic-metadata">

**Author:** [@Frank\_Schwidom](https://swi-prolog.discourse.group/u/Frank_Schwidom)\
**Replies:** 1\
**Last updated:** [September 9, 2025, 11:34am UTC](https://swi-prolog.discourse.group/t/possible-bug-in-library-persistency/9256 "2025-09-09T11:34:18Z")

</div>

I have this code in a file 001.pl: #!/usr/local/bin/swipl -s :- use\_module(library(persistency)). :- persistent m:p(x:any). part1 :- m:( db\_attach( ‘db.txt’,), assert\_p(1)). part2 :- m:( db\_detach, assert\_p(2)). A…

---

## [Logical negation in Prolog ~ a = (a =\> f)](https://swi-prolog.discourse.group/t/logical-negation-in-prolog-a-a-f/9253)

<div class="topic-metadata">

**Author:** [@joseph-vidal-rosset](https://swi-prolog.discourse.group/u/joseph-vidal-rosset)\
**Replies:** 1\
**Last updated:** [September 7, 2025, 4:06pm UTC](https://swi-prolog.discourse.group/t/logical-negation-in-prolog-a-a-f/9253 "2025-09-07T16:06:25Z")

</div>

% ========================================================================= % TPTP Operators % ========================================================================= :- op( 500, fy, ~). % negation :- op(…

---

## [Proper Error handling http\_open](https://swi-prolog.discourse.group/t/proper-error-handling-http-open/9252)

<div class="topic-metadata">

**Author:** [@Zandrenel](https://swi-prolog.discourse.group/u/Zandrenel)\
**Replies:** 5\
**Last updated:** [September 7, 2025, 3:45am UTC](https://swi-prolog.discourse.group/t/proper-error-handling-http-open/9252 "2025-09-07T03:45:20Z")

</div>

I’m using: SWI-Prolog version 9.2.4 Hello, I’ve been trying to have a webpage call another api and display the formatted results on a page. It works but when the other server is down, or throws an error my page returns…

---

## [How to set font size on graphical debugger?](https://swi-prolog.discourse.group/t/how-to-set-font-size-on-graphical-debugger/1723)

<div class="topic-metadata">

**Author:** [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Replies:** 3\
**Last updated:** [September 5, 2025, 7:47am UTC](https://swi-prolog.discourse.group/t/how-to-set-font-size-on-graphical-debugger/1723 "2025-09-05T07:47:14Z")

</div>

I can I increase the sizes of everything in the graphical debugger? I need a magnifying glass to read it. Background: I’m trying to debug a server, and the only way seems to be tspy/1, which brings up the graphical debu…

---

## [Struggling with repeated floor division and clause matching in CLPFD](https://swi-prolog.discourse.group/t/struggling-with-repeated-floor-division-and-clause-matching-in-clpfd/9235)

<div class="topic-metadata">

**Author:** [@Nekkowe](https://swi-prolog.discourse.group/u/Nekkowe)\
**Replies:** 3\
**Last updated:** [August 28, 2025, 1:35am UTC](https://swi-prolog.discourse.group/t/struggling-with-repeated-floor-division-and-clause-matching-in-clpfd/9235 "2025-08-28T01:35:16Z")

</div>

I’m using: SWI-Prolog version 9.0.4 (Linux Mint Cinnamon) I want the code to: Find out if a number can be reduced to a multiple of another number by repeatedly applying floor division by 2, and how often that floor divi…

---

## [Help with http\_get/3](https://swi-prolog.discourse.group/t/help-with-http-get-3/9225)

<div class="topic-metadata">

**Author:** [@remy.s](https://swi-prolog.discourse.group/u/remy.s)\
**Replies:** 4\
**Last updated:** [August 26, 2025, 5:17pm UTC](https://swi-prolog.discourse.group/t/help-with-http-get-3/9225 "2025-08-26T17:17:51Z")

</div>

I am using http\_get/3 to connect to a foreign server with the following code: % SWI-Prolog (threaded, 64 bits, version 9.3.28) :- use\_module(library(http/http\_header)). :- use\_module(library(http/http\_client)). :- use\_…

---

## [Would it be possible to implement a second SSU Operator "\*=\>" which allows for backtracking in the left hand side?](https://swi-prolog.discourse.group/t/would-it-be-possible-to-implement-a-second-ssu-operator-which-allows-for-backtracking-in-the-left-hand-side/9223)

<div class="topic-metadata">

**Author:** [@Frank\_Schwidom](https://swi-prolog.discourse.group/u/Frank_Schwidom)\
**Replies:** 16\
**Last updated:** [August 24, 2025, 9:59pm UTC](https://swi-prolog.discourse.group/t/would-it-be-possible-to-implement-a-second-ssu-operator-which-allows-for-backtracking-in-the-left-hand-side/9223 "2025-08-24T21:59:45Z")

</div>

Currently I have to write p008(X), (var(X) ; between( 0, 5, X)) =\> between( 0, 5, X) . but I would like to write: p008(X), between( 0, 5, X) \*=\> true. I find the SSU operator ‘=\>’ very useful. Is this actually a …

---

## [Unclear use of timeout in unit tests](https://swi-prolog.discourse.group/t/unclear-use-of-timeout-in-unit-tests/6681)

<div class="topic-metadata">

**Author:** [@marcoxa](https://swi-prolog.discourse.group/u/marcoxa)\
**Replies:** 10\
**Last updated:** [August 18, 2025, 10:31am UTC](https://swi-prolog.discourse.group/t/unclear-use-of-timeout-in-unit-tests/6681 "2025-08-18T10:31:12Z")

</div>

Hi first of all, thank you for adding timeouts to the PLUnit test library. I’m using: SWI-Prolog version 9.1.xxx It is unclear to me how to use the set\_test\_options/1 predicate in conjunctions with timeouts. My code …

---

## [Foreign C mylib.so not found at runtime](https://swi-prolog.discourse.group/t/foreign-c-mylib-so-not-found-at-runtime/9160)

<div class="topic-metadata">

**Author:** [@mala](https://swi-prolog.discourse.group/u/mala)\
**Replies:** 4\
**Last updated:** [August 8, 2025, 7:54am UTC](https://swi-prolog.discourse.group/t/foreign-c-mylib-so-not-found-at-runtime/9160 "2025-08-08T07:54:10Z")

</div>

I’m using: SWI-Prolog version linux gentoo 9.39.9-r1 I want the code to: While running as standalone elf executable, lookup and load a C library which is installed in a “~/lib/prolog” directory in my home. But what I’…

---

## [SWI-Prolog 9.3.26. on Macos, annoying permissions](https://swi-prolog.discourse.group/t/swi-prolog-9-3-26-on-macos-annoying-permissions/9149)

<div class="topic-metadata">

**Author:** [@remy.s](https://swi-prolog.discourse.group/u/remy.s)\
**Replies:** 1\
**Last updated:** [August 3, 2025, 9:51am UTC](https://swi-prolog.discourse.group/t/swi-prolog-9-3-26-on-macos-annoying-permissions/9149 "2025-08-03T09:51:52Z")

</div>

I am running SWI-Prolog 9.3.26. on Macos. In my mac’s security settings (Privacy&Security/Full Disk Access), I have granted full disk access to application “SWI-Prolog“. Despite this, when launching SWI-Prolog and usin…

---

## [SWI-Prolog 9.3.26. on Macos, cannot type some characters in SWI-Console](https://swi-prolog.discourse.group/t/swi-prolog-9-3-26-on-macos-cannot-type-some-characters-in-swi-console/9148)

<div class="topic-metadata">

**Author:** [@remy.s](https://swi-prolog.discourse.group/u/remy.s)\
**Replies:** 1\
**Last updated:** [August 3, 2025, 9:37am UTC](https://swi-prolog.discourse.group/t/swi-prolog-9-3-26-on-macos-cannot-type-some-characters-in-swi-console/9148 "2025-08-03T09:37:14Z")

</div>

I am using SWI-Prolog 9.3.26. on a Mac M2, running macos 14.6.1 with a keyboard layout “Swiss French”. In “SWI-Prolog console”, it is not possible to type the characters \[ and \] (bound to option 5, and 6 respectively. H…

---

## [Assertz/1 with attributed variables](https://swi-prolog.discourse.group/t/assertz-1-with-attributed-variables/9128)

<div class="topic-metadata">

**Author:** [@morxa](https://swi-prolog.discourse.group/u/morxa)\
**Replies:** 5\
**Last updated:** [August 2, 2025, 11:36am UTC](https://swi-prolog.discourse.group/t/assertz-1-with-attributed-variables/9128 "2025-08-02T11:36:28Z")

</div>

I’m using: SWI-Prolog version 9.2.9 I want to assert a fact containing an attributed variable. But what I’m getting is: The attribute is lost. My code looks like this: ?- put\_attr(V, typing, t1), assertz(tv(V)), tv(A…

---

## [How to get mode directed tabling from a predicate, programmatically](https://swi-prolog.discourse.group/t/how-to-get-mode-directed-tabling-from-a-predicate-programmatically/9142)

<div class="topic-metadata">

**Author:** [@meditans](https://swi-prolog.discourse.group/u/meditans)\
**Replies:** 1\
**Last updated:** [July 30, 2025, 6:40pm UTC](https://swi-prolog.discourse.group/t/how-to-get-mode-directed-tabling-from-a-predicate-programmatically/9142 "2025-07-30T18:40:23Z")

</div>

I can use predicate\_property/2 to read the tabling mode of a predicate: predicate\_property(foo(\_,\_), tabled(Flag)). But from the documentation: tabled(?Flag) True of the predicate is tabled and Flag applies. Any tab…

[Previous page](https://swi-prolog.discourse.group/c/help/6.md?page=1)

[Next page](https://swi-prolog.discourse.group/c/help/6.md?page=3)
