🦜 SWI-Prolog - Users and developers of SWI-Prolog, an implementation of the Prolog programming language
@swi-prolog.discourse.group@rss-parrot.net
I'm an automated parrot! I relay a website's RSS feed to the Fediverse. Every time a new post appears in the feed, I toot about it. Follow me to get all new posts in your Mastodon timeline!
Brought to you by the RSS Parrot.
---
SWI-Prolog forum
Your feed and you don't want it here? Just
e-mail the birb.
Http_date: RFC 9110 HTTP dates as one DCG that both parses and formats
https://swi-prolog.discourse.group/t/http-date-rfc-9110-http-dates-as-one-dcg-that-both-parses-and-formats/9808#post_2
Published: September 5, 2026 18:07
The pack is: http_date
I’m curious as to what benefit the literal predicate brings? Could use simply Cs in e.g. day_name, rather than literal(Cs).
Http_date: RFC 9110 HTTP dates as one DCG that both parses and formats
https://swi-prolog.discourse.group/t/http-date-rfc-9110-http-dates-as-one-dcg-that-both-parses-and-formats/9808#post_1
Published: September 5, 2026 09:34
I ported http-date-rs to SWI-prolog as an exercise and the result was useful enough to be worth packaging.
RFC 9110 allows three date formats: IMF-fixdate, RFC 850 and asctime. The Rust version has a decoder (a Decoder struct with a position,…
A new bug in my old code?
https://swi-prolog.discourse.group/t/a-new-bug-in-my-old-code/9804#post_11
Published: September 2, 2026 18:12
Marc:
One last question: what was the reason that more than a dozen system-like predicates have lost the property “built-in” in between version 8 and version 10?
I don’t know … Built-in predicate detection typically serve a role in meta-interpreters…
A new bug in my old code?
https://swi-prolog.discourse.group/t/a-new-bug-in-my-old-code/9804#post_10
Published: September 2, 2026 06:21
A good, robust solution would be to include the signature of the logical theory in the input data. If only I had understood that 20 years ago … Another solution (which I have chosen for the moment) is a small reduction of the functionality of the code.
I…
Progressing the SWI-Prolog environment
https://swi-prolog.discourse.group/t/progressing-the-swi-prolog-environment/9090?page=7#post_148
Published: September 1, 2026 12:09
ridgeworks:
Nothing urgent. The GUI keeps improving but the console line editor is a bit clunky. …
Thanks for the observations. Most of this is indeed platform independent now. I pushed a number of enhancements:
(MacOS) Use the MacOS central menu at…
Ann: SWI-Prolog 10.1.14
https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-14/9803#post_4
Published: September 1, 2026 09:37
swi:
70 ?- help(broadcast).
ERROR: http_handler_id `manual_file' does not exist
Thanks. The page contains an image and that was not handled correctly. Now images are ignored in the terminal version. The rest of the page shows fine.
A new bug in my old code?
https://swi-prolog.discourse.group/t/a-new-bug-in-my-old-code/9804#post_9
Published: September 1, 2026 09:03
For historic reasons, many hooks live in the user module and are dynamic. Just wiping these seems a bad idea (as you noted). As you will also wipe term/goal expansion, you are likely to kill far too much. You might get closer to what you want by not…
Atom_json_dict/3 options are not as documented
https://swi-prolog.discourse.group/t/atom-json-dict-3-options-are-not-as-documented/9806#post_2
Published: September 1, 2026 06:59
mike.elston:
Options are as for json_read/3.
Should have been Options are as for json_read_dict/3. Those are the same options, but with different defaults. Fixed.
Ann: SWI-Prolog 10.1.14
https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-14/9803#post_3
Published: August 31, 2026 22:25
Great! Some predicates are failing for local text help but work if Pred/N notation is used:
69 ?- help(broadcast/1).
true.
70 ?- help(broadcast).
ERROR: http_handler_id `manual_file' does not exist
ERROR: In:
ERROR: [74]…
A new bug in my old code?
https://swi-prolog.discourse.group/t/a-new-bug-in-my-old-code/9804#post_8
Published: August 31, 2026 13:58
Appreciated the help, and tried it. However, on my platform (LM22.3) the substring /swipl/ should be /swi-prolog/, so I’m afraid it’s very fragile. For the moment I’m just going to exclude `prolog_file_type` from the retract of dynamic predicates.…
Atom_json_dict/3 options are not as documented
https://swi-prolog.discourse.group/t/atom-json-dict-3-options-are-not-as-documented/9806#post_1
Published: August 31, 2026 11:21
atom_json_dict(-Text, +JSONDict, +Options)
Convert between textual representation and a JSON term represented as a dict. Options are as for json_read/3.
json_read(+Stream, -Term, +Options)
The following options are processed:
…
null(+NullTerm)
Term used to…
Progressing the SWI-Prolog environment
https://swi-prolog.discourse.group/t/progressing-the-swi-prolog-environment/9090?page=7#post_147
Published: August 30, 2026 19:58
MacOS 15.6 (Sequoia), SWIP 10.1.14 (GUI version)
Nothing urgent. The GUI keeps improving but the console line editor is a bit clunky. Without going into details, I would expect the micro behaviour (i.e., response to mouse clicks and drags, key commands and…
A new bug in my old code?
https://swi-prolog.discourse.group/t/a-new-bug-in-my-old-code/9804#post_7
Published: August 30, 2026 17:45
maybe you can discriminate based on file of origin:
predicate_property(P,dynamic),
predicate_property(P,file(F)),
\+ sub_atom(F,_,_,_,'/swipl/library/'),
\+ sub_atom(F,_,_,_,'/swipl/boot/').
if it has these in the name probably is not a user defined…
A new bug in my old code?
https://swi-prolog.discourse.group/t/a-new-bug-in-my-old-code/9804#post_6
Published: August 30, 2026 16:56
In conclusion: from version 8 to version 10 the number of system-like predicates that are dynamic (but not built-in) increased substantially.
My problem is now: how to discriminate in a robust way between user-defined dynamic predicates and all other…
A new bug in my old code?
https://swi-prolog.discourse.group/t/a-new-bug-in-my-old-code/9804#post_5
Published: August 30, 2026 16:47
But something must have changed. I seem to remember (but the program is 20y old) that it was necessary to exclude built-in predicates in those days:
´´´Welcome to SWI-Prolog (threaded, 64 bits, version 8.0.3)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY.…
A new bug in my old code?
https://swi-prolog.discourse.group/t/a-new-bug-in-my-old-code/9804#post_4
Published: August 30, 2026 16:32
Good suggestion, see the list below. I would have expected all of these are built-in.
I guess the last one is the culprit.
61 ?- cleanup.
prolog_load_file(_7456,_7458)
portray(_7456)
expand_answer(_7456,_7458)
resource(_7456,_7458)…
A new bug in my old code?
https://swi-prolog.discourse.group/t/a-new-bug-in-my-old-code/9804#post_3
Published: August 30, 2026 16:20
Marc:
predicate_property(X,dynamic),
\+predicate_property(X,built_in)
There is no overlap, so that will not filter as intended:
Welcome to SWI-Prolog (threaded, 64 bits, version 10.0.2)
101 ?- predicate_property(X, dynamic), predicate_property(X,…
A new bug in my old code?
https://swi-prolog.discourse.group/t/a-new-bug-in-my-old-code/9804#post_2
Published: August 30, 2026 15:27
I suspect cleanup now retracts too much,
You can easily check this hypotesis. In cleanup change retractall to writeln, and check whether the result looks reasonable.
Ann: SWI-Prolog 10.1.14
https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-14/9803#post_2
Published: August 30, 2026 15:17
Hi Jan. I reported the atom-GC bug, and I’m happy to report that 10.1.14 runs my code with no issues. (8 cores, as many threads, 100s of long-lived engines accessed from multiple threads, tabling, workloads lasting 15-20 minutes). As always, thank you for…
A new bug in my old code?
https://swi-prolog.discourse.group/t/a-new-bug-in-my-old-code/9804#post_1
Published: August 30, 2026 14:13
I’m using: SWI-Prolog version 10.0.2.
I want the code to: retract all dynamic predicates that are not built-in.
But what I’m getting after cleanup each time I consult a file is: ERROR: Domain error: `file_type’ expected, found `prolog’.
My code looks like…
Ann: SWI-Prolog 10.1.14
https://swi-prolog.discourse.group/t/ann-swi-prolog-10-1-14/9803#post_1
Published: August 30, 2026 12:21
Dear SWI-Prolog user,
SWI-Prolog 10.1.14 is ready for download. There are a large number of
changes. Some bug fixes and notably a lot of work improving the
development tools. Highlights:
Bug in atom-GC for dying threads that unregister atoms…
Emacs - File - Show buffer menu error
https://swi-prolog.discourse.group/t/emacs-file-show-buffer-menu-error/9802#post_2
Published: August 30, 2026 12:20
Thanks. Fixed (as well as some more similar issues found by Claude). In 10.1.14