# Discussion

**URL:** https://swi-prolog.discourse.group/c/discussion/27.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 Discussion category](https://swi-prolog.discourse.group/t/about-the-discussion-category/3145)

<div class="topic-metadata">

**Author:** [@system](https://swi-prolog.discourse.group/u/system)\
**Replies:** 0\
**Last updated:** [November 2, 2020, 7:30pm UTC](https://swi-prolog.discourse.group/t/about-the-discussion-category/3145 "2020-11-02T19:30:01Z")

</div>

This category is for use when you want to start a new discussion or to discuss an item in a category that does not allow replies such as Announce or Useful Code

---

## [Representation\_error, domain\_error, type\_error](https://swi-prolog.discourse.group/t/representation-error-domain-error-type-error/9881)

<div class="topic-metadata">

**Author:** [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Replies:** 6\
**Last updated:** [November 7, 2026, 2:49am UTC](https://swi-prolog.discourse.group/t/representation-error-domain-error-type-error/9881 "2026-11-07T02:49:22Z")

</div>

When I called PL\_cvt\_i\_int() with a value 4294967296, I got back the error representation\_error(uint). Shouldn’t this be domain\_error(unit,4294967296)? The definition of representation\_error/1 is: A representation err…

---

## [Is anyone using the protobufs compiler plug-in? (It doesn't do the right thing for "package" and "import")](https://swi-prolog.discourse.group/t/is-anyone-using-the-protobufs-compiler-plug-in-it-doesnt-do-the-right-thing-for-package-and-import/9877)

<div class="topic-metadata">

**Author:** [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Replies:** 1\
**Last updated:** [November 4, 2026, 8:20pm UTC](https://swi-prolog.discourse.group/t/is-anyone-using-the-protobufs-compiler-plug-in-it-doesnt-do-the-right-thing-for-package-and-import/9877 "2026-11-04T20:20:19Z")

</div>

Is anyone using the protobufs compiler (protoc) to create \*\_pb.pl files for the protobufs module? I have discovered that the plugin (protoc-gen-swipl) doesn’t do the right thing for “package” and “import” statements, …

---

## [Jev, Prolog, Pi, and the dream of probabilistic logic programming](https://swi-prolog.discourse.group/t/jev-prolog-pi-and-the-dream-of-probabilistic-logic-programming/9823)

<div class="topic-metadata">

**Author:** [@apfadler](https://swi-prolog.discourse.group/u/apfadler)\
**Replies:** 11\
**Last updated:** [November 3, 2026, 11:44am UTC](https://swi-prolog.discourse.group/t/jev-prolog-pi-and-the-dream-of-probabilistic-logic-programming/9823 "2026-11-03T11:44:10Z")

</div>

Hi all, Jev, a new model (not an LLM, bit rather a modern version of BERT), has been making the rounds on the usual outlets these past few days. As I believe the core concepts of Jev map very neatly onto Prolog predicat…

---

## [Internationalization support](https://swi-prolog.discourse.group/t/internationalization-support/4575)

<div class="topic-metadata">

**Author:** [@mgondan1](https://swi-prolog.discourse.group/u/mgondan1)\
**Replies:** 12\
**Last updated:** [November 8, 2026, 5:06pm UTC](https://swi-prolog.discourse.group/t/internationalization-support/4575 "2026-11-08T17:06:10Z")

</div>

Loosely related since you mention language files. If anyone can share a bit of experience with swipl and internationalization (e.g., interoperability with gettext), that would be very helpful.

---

## [Web Prolog -- the second round](https://swi-prolog.discourse.group/t/web-prolog-the-second-round/9594)

<div class="topic-metadata">

**Author:** [@torbjorn.lager](https://swi-prolog.discourse.group/u/torbjorn.lager)\
**Replies:** 3\
**Last updated:** [September 27, 2026, 5:54pm UTC](https://swi-prolog.discourse.group/t/web-prolog-the-second-round/9594 "2026-09-27T17:54:55Z")

</div>

Hi all, Almost seven years have passed since I first posted here about my ideas around Web Prolog – a profile of Prolog that features Erlang-style concurrent programming, which could potentially allow different Prolog i…

---

## [LLM-generated compiler](https://swi-prolog.discourse.group/t/llm-generated-compiler/9846)

<div class="topic-metadata">

**Author:** [@lug](https://swi-prolog.discourse.group/u/lug)\
**Replies:** 0\
**Last updated:** [September 27, 2026, 1:31am UTC](https://swi-prolog.discourse.group/t/llm-generated-compiler/9846 "2026-09-27T01:31:45Z")

</div>

I had the code for a LP compiler be auto-generated by a LLM. It’s largely Swi-Prolog. I thought that was interesting.

---

## [Correct floating point arithmetic](https://swi-prolog.discourse.group/t/correct-floating-point-arithmetic/5857)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 77\
**Last updated:** [July 19, 2026, 11:25am UTC](https://swi-prolog.discourse.group/t/correct-floating-point-arithmetic/5857 "2026-07-19T11:25:18Z")

</div>

Yes. I found crlibm again, and recall the main issue: it is GPL, not LGPL. That makes it usable only as an optional install for people building from sources as (effectively) changing changing SWI-Prolog to GPL is a n…

---

## [Option preference (first or last)?](https://swi-prolog.discourse.group/t/option-preference-first-or-last/9742)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 8\
**Last updated:** [July 16, 2026, 12:52pm UTC](https://swi-prolog.discourse.group/t/option-preference-first-or-last/9742 "2026-07-16T12:52:19Z")

</div>

This is a followup for Minor: "prolog flag option lists" do not follow option list semantics · Issue #756 · SWI-Prolog/swipl-devel · GitHub It appears ISO talks about duplicate/conflicting options in a few places. Wher…

---

## [Using Claude Code to create skills, commands, plans, ... for SWI-Prolog](https://swi-prolog.discourse.group/t/using-claude-code-to-create-skills-commands-plans-for-swi-prolog/9420)

<div class="topic-metadata">

**Author:** [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Replies:** 25\
**Last updated:** [July 6, 2026, 9:06pm UTC](https://swi-prolog.discourse.group/t/using-claude-code-to-create-skills-commands-plans-for-swi-prolog/9420 "2026-07-06T21:06:38Z")

</div>

For the past few weeks, I’ve been using Claude Code for VS Code to program in SWI-Prolog with more success than failure. Over the years, many developers have had limited success using LLMs from companies such as OpenAI,…

---

## [Recursion optimization and stack overflow from version 10.0.0](https://swi-prolog.discourse.group/t/recursion-optimization-and-stack-overflow-from-version-10-0-0/9643)

<div class="topic-metadata">

**Author:** [@sgodoyc](https://swi-prolog.discourse.group/u/sgodoyc)\
**Replies:** 8\
**Last updated:** [June 15, 2026, 3:05pm UTC](https://swi-prolog.discourse.group/t/recursion-optimization-and-stack-overflow-from-version-10-0-0/9643 "2026-06-15T15:05:59Z")

</div>

Greetings, I was teaching a student how to transform code with stack recursion to tail recursion and then I noticed that version 10.0+ has a somewhat different recursion optimization than version 9.0+ Goals that used t…

---

## [Can a directed-graph-structured knowledge base give negation a geometric witness?](https://swi-prolog.discourse.group/t/can-a-directed-graph-structured-knowledge-base-give-negation-a-geometric-witness/9645)

<div class="topic-metadata">

**Author:** [@EnisOlgac](https://swi-prolog.discourse.group/u/EnisOlgac)\
**Replies:** 0\
**Last updated:** [June 6, 2026, 12:28pm UTC](https://swi-prolog.discourse.group/t/can-a-directed-graph-structured-knowledge-base-give-negation-a-geometric-witness/9645 "2026-06-06T12:28:43Z")

</div>

I have been working on a framework for encoding directed graphs incrementally with O(1) reachability queries, and a question emerged that I would like to think through with people who know Prolog’s foundations well. Pro…

---

## [Neurosymbolic AI](https://swi-prolog.discourse.group/t/neurosymbolic-ai/3600)

<div class="topic-metadata">

**Author:** [@JCR](https://swi-prolog.discourse.group/u/JCR)\
**Replies:** 28\
**Last updated:** [May 13, 2026, 12:49pm UTC](https://swi-prolog.discourse.group/t/neurosymbolic-ai/3600 "2026-05-13T12:49:30Z")

</div>

I found this video about the integration of symbolic AI and neural networks really interesting (David Cox from IBM giving a lecture at MIT) . He discusses the drawbacks of deep learning and the advantages of adding symbo…

---

## [Janus and Python venv](https://swi-prolog.discourse.group/t/janus-and-python-venv/6852)

<div class="topic-metadata">

**Author:** [@swi](https://swi-prolog.discourse.group/u/swi)\
**Replies:** 11\
**Last updated:** [April 30, 2026, 7:44am UTC](https://swi-prolog.discourse.group/t/janus-and-python-venv/6852 "2026-04-30T07:44:37Z")

</div>

Most people in the python world use environments for their apps, something like $ python -m venv venv $ . venv/bin/activate # notice the dot which sources the script (venv) $ pip install mido \[...\] I did a quick try …

---

## [HTTP DDoS protection](https://swi-prolog.discourse.group/t/http-ddos-protection/9509)

<div class="topic-metadata">

**Author:** [@drspro](https://swi-prolog.discourse.group/u/drspro)\
**Replies:** 4\
**Last updated:** [February 6, 2026, 8:05am UTC](https://swi-prolog.discourse.group/t/http-ddos-protection/9509 "2026-02-06T08:05:10Z")

</div>

maybe we can also make some efficient code to protect against DDOS attacks. will it be faster if the ip-adres is asserted as number instead of atom, to measure the time between http-requests of 1 specific ip adres. If…

---

## [Windows vs Linux performance](https://swi-prolog.discourse.group/t/windows-vs-linux-performance/5571)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 14\
**Last updated:** [January 27, 2026, 4:40pm UTC](https://swi-prolog.discourse.group/t/windows-vs-linux-performance/5571 "2026-01-27T16:40:46Z")

</div>

After configuring Windows 11 in a VirtualBox VM I ran some tests, including the benchmarks. It turns out the Windows version runs about 20% slower then the Linux version. I wonder why. Both are compiled with GCC 11…

---

## [Emacs on win11 with prolog-mode and swipl.exe and indic script output in the toplevel buffer](https://swi-prolog.discourse.group/t/emacs-on-win11-with-prolog-mode-and-swipl-exe-and-indic-script-output-in-the-toplevel-buffer/9475)

<div class="topic-metadata">

**Author:** [@vjktm](https://swi-prolog.discourse.group/u/vjktm)\
**Replies:** 10\
**Last updated:** [January 14, 2026, 9:04am UTC](https://swi-prolog.discourse.group/t/emacs-on-win11-with-prolog-mode-and-swipl-exe-and-indic-script-output-in-the-toplevel-buffer/9475 "2026-01-14T09:04:46Z")

</div>

I am using emacs on win11 with prolog-mode and swipl.exe. I am trying to writeln devenagari script with: ?- string\_codes(S, \[0x0915, 0x094D, 0x0937, 0x093F\]), writeln(S). but get: \\u0915\\u094D\\u0937\\u093F S = \\u0…

---

## [Clarification on SWI-Prolog Upgrade Behavior](https://swi-prolog.discourse.group/t/clarification-on-swi-prolog-upgrade-behavior/9429)

<div class="topic-metadata">

**Author:** [@reshma](https://swi-prolog.discourse.group/u/reshma)\
**Replies:** 2\
**Last updated:** [December 12, 2025, 12:35pm UTC](https://swi-prolog.discourse.group/t/clarification-on-swi-prolog-upgrade-behavior/9429 "2025-12-12T12:35:16Z")

</div>

Hi Team, We have observed that the 32-bit version of SWI-Prolog has stopped receiving support. However, when moving to the 64-bit latest version, the software does not appear to auto-upgrade as expected. Could you plea…

---

## [Is there a linter for prolog programs?](https://swi-prolog.discourse.group/t/is-there-a-linter-for-prolog-programs/9351)

<div class="topic-metadata">

**Author:** [@matteoredaelli](https://swi-prolog.discourse.group/u/matteoredaelli)\
**Replies:** 25\
**Last updated:** [October 28, 2025, 4:05pm UTC](https://swi-prolog.discourse.group/t/is-there-a-linter-for-prolog-programs/9351 "2025-10-28T16:05:20Z")

</div>

It would be useful to have a tool that does static checks in the prolog source filee like “ruff check” works for python. For instance “type checking” using the info from comments like %! length(+List:list, -Length…

---

## [Questions about cursor manipulation/keyboard input/FFI](https://swi-prolog.discourse.group/t/questions-about-cursor-manipulation-keyboard-input-ffi/5065)

<div class="topic-metadata">

**Author:** [@Rogue](https://swi-prolog.discourse.group/u/Rogue)\
**Replies:** 8\
**Last updated:** [October 28, 2025, 12:39pm UTC](https://swi-prolog.discourse.group/t/questions-about-cursor-manipulation-keyboard-input-ffi/5065 "2025-10-28T12:39:32Z")

</div>

Hello everyone. This is my first post. I’ve been programming for over 30 years, but I finished my first ever (trivial) Prolog program last night. It took me two nights to make it work, which is a little embarrassing give…

---

## [Swipl-win behaviour](https://swi-prolog.discourse.group/t/swipl-win-behaviour/9354)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 4\
**Last updated:** [October 23, 2025, 9:50am UTC](https://swi-prolog.discourse.group/t/swipl-win-behaviour/9354 "2025-10-23T09:50:09Z")

</div>

Doing a lot of Prolog development work that requires a lot of debugging, I’m trying to improve the swipl-win console. The git version already fixes a couple of memory management issues in xpce’s class terminal and fixe…

---

## [Behavior of once(concurrent\_and( vs. first\_solution(](https://swi-prolog.discourse.group/t/behavior-of-once-concurrent-and-vs-first-solution/9335)

<div class="topic-metadata">

**Author:** [@patham9](https://swi-prolog.discourse.group/u/patham9)\
**Replies:** 4\
**Last updated:** [October 3, 2025, 11:56am UTC](https://swi-prolog.discourse.group/t/behavior-of-once-concurrent-and-vs-first-solution/9335 "2025-10-03T11:56:34Z")

</div>

Hi! I noticed “once(concurrent\_and(” behaves like “first\_solution(”. It probably means that when “concurrent\_and” returns a result and “once” commits to it then concurrent\_and will stop and cleanup the remaining thread…

---

## [Using \`\[\]\` as predicate name](https://swi-prolog.discourse.group/t/using-as-predicate-name/9139)

<div class="topic-metadata">

**Author:** [@ridgeworks](https://swi-prolog.discourse.group/u/ridgeworks)\
**Replies:** 10\
**Last updated:** [July 30, 2025, 1:55pm UTC](https://swi-prolog.discourse.group/t/using-as-predicate-name/9139 "2025-07-30T13:55:04Z")

</div>

It’s allowed to use \[\] as a predicate head which is quite useful for implementations for \[\] as a postfix operator (e.g., array notation). However library(prolog\_code) exports predicate predicate\_label/2 which trips over …

---

## [Enhanced version of text profiler data](https://swi-prolog.discourse.group/t/enhanced-version-of-text-profiler-data/9122)

<div class="topic-metadata">

**Author:** [@ridgeworks](https://swi-prolog.discourse.group/u/ridgeworks)\
**Replies:** 4\
**Last updated:** [July 24, 2025, 7:15pm UTC](https://swi-prolog.discourse.group/t/enhanced-version-of-text-profiler-data/9122 "2025-07-24T19:15:34Z")

</div>

I am unable to run the new GUI version on my old MacOS config. Since I converted to the commandline version some time ago, this is no big deal but I did lose one thing that I valued, namely the ability to display and bro…

---

## [Double\_quotes flag and DCGs](https://swi-prolog.discourse.group/t/double-quotes-flag-and-dcgs/6730)

<div class="topic-metadata">

**Author:** [@mvolkmann](https://swi-prolog.discourse.group/u/mvolkmann)\
**Replies:** 12\
**Last updated:** [June 30, 2025, 2:18pm UTC](https://swi-prolog.discourse.group/t/double-quotes-flag-and-dcgs/6730 "2025-06-30T14:18:45Z")

</div>

Through trial and error I’ve arrived at the opinion that setting the double\_quotes flag to chars is a bad idea when working with DCGs. It seems to break the functionality of the predicates defined in the dcg/basics libra…

---

## [A dark mode for SWI Prolog?](https://swi-prolog.discourse.group/t/a-dark-mode-for-swi-prolog/4533)

<div class="topic-metadata">

**Author:** [@Wisermans](https://swi-prolog.discourse.group/u/Wisermans)\
**Replies:** 4\
**Last updated:** [September 18, 2022, 9:14am UTC](https://swi-prolog.discourse.group/t/a-dark-mode-for-swi-prolog/4533 "2022-09-18T09:14:47Z")

</div>

It has been long discussions on many systems leading to most systems and apps now having default normal / dark / black modes. Maybe it would be also time for SWI-Prolog to have an automatic mode depending on system in sp…

---

## [Playing around with local LLM and having issues handling chunked responses](https://swi-prolog.discourse.group/t/playing-around-with-local-llm-and-having-issues-handling-chunked-responses/8980)

<div class="topic-metadata">

**Author:** [@Ian](https://swi-prolog.discourse.group/u/Ian)\
**Replies:** 3\
**Last updated:** [May 2, 2025, 3:54pm UTC](https://swi-prolog.discourse.group/t/playing-around-with-local-llm-and-having-issues-handling-chunked-responses/8980 "2025-05-02T15:54:17Z")

</div>

I’ve been playing around with talking to a local LLM (in this case via ollama) using some proof-of-concept code pasted further down so I can have an assistant at the REPL. FYI I’m using the latest develop version of SWI…

---

## [Prolog LSP now supports colours (Discussion)](https://swi-prolog.discourse.group/t/prolog-lsp-now-supports-colours-discussion/3153)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 27\
**Last updated:** [April 22, 2025, 4:07pm UTC](https://swi-prolog.discourse.group/t/prolog-lsp-now-supports-colours-discussion/3153 "2025-04-22T16:07:02Z")

</div>

Looking forward. I think this is the most promising way to get proper IDEs for Prolog. Note that PceEmacs uses the colouring library as follows: On any keystroke it parses the clause around the caret and colors it b…

---

## [Documentation systems (PlDoc, LpDoc, etc.)](https://swi-prolog.discourse.group/t/documentation-systems-pldoc-lpdoc-etc/8940)

<div class="topic-metadata">

**Author:** [@herme](https://swi-prolog.discourse.group/u/herme)\
**Replies:** 8\
**Last updated:** [April 19, 2025, 11:04am UTC](https://swi-prolog.discourse.group/t/documentation-systems-pldoc-lpdoc-etc/8940 "2025-04-19T11:04:32Z")

</div>

Just for clarification, the Ciao documenter, LPdoc, supports both directive-based and structured comment-based documentation.

---

## [Building on MacOS in 2024](https://swi-prolog.discourse.group/t/building-on-macos-in-2024/8608)

<div class="topic-metadata">

**Author:** [@Boris](https://swi-prolog.discourse.group/u/Boris)\
**Replies:** 3\
**Last updated:** [March 4, 2025, 9:15am UTC](https://swi-prolog.discourse.group/t/building-on-macos-in-2024/8608 "2025-03-04T09:15:07Z")

</div>

I went through the exercise of building from source on a new machine once again. “Building SWI-Prolog on MacOSX” is a bit outdated. Not even sure if it should say “X” at the end. I used Homebrew. This is on the website…

[Next page](https://swi-prolog.discourse.group/c/discussion/27.md?page=1)
