# \#discussion

**URL:** https://swi-prolog.discourse.group/tag/discussion/12.md?match_all_tags=true&page=1&tags%5B%5D=discussion

[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

---

## [Cmake test program triggers Windows Defender](https://swi-prolog.discourse.group/t/cmake-test-program-triggers-windows-defender/7097)

<div class="topic-metadata">

**Author:** [@mgondan1](https://swi-prolog.discourse.group/u/mgondan1)\
**Replies:** 2\
**Last updated:** [December 22, 2023, 3:14pm UTC](https://swi-prolog.discourse.group/t/cmake-test-program-triggers-windows-defender/7097 "2023-12-22T15:14:03Z")

</div>

MSYS2, RTools etc. I get a (false positive) threat alert from Windows Defender when running cmake from MSYS2. The point at which it fails is very simple stuff from CheckFloatingPointFormat.cmake. The script is basically…

---

## [Can't send mail using smtp](https://swi-prolog.discourse.group/t/cant-send-mail-using-smtp/7035)

<div class="topic-metadata">

**Author:** [@CXNVM](https://swi-prolog.discourse.group/u/CXNVM)\
**Replies:** 2\
**Last updated:** [December 6, 2023, 2:08pm UTC](https://swi-prolog.discourse.group/t/cant-send-mail-using-smtp/7035 "2023-12-06T14:08:56Z")

</div>

:- use\_module(library(smtp)). a :- smtp\_send\_mail( 'semen.shanin@gmail.com', send\_message, \[ security(ssl), port(465), host('smtp.gmail.com'), auth('semen.sha…

---

## [What you do think about this way to model laws?](https://swi-prolog.discourse.group/t/what-you-do-think-about-this-way-to-model-laws/7008)

<div class="topic-metadata">

**Author:** [@dogweather](https://swi-prolog.discourse.group/u/dogweather)\
**Replies:** 8\
**Last updated:** [December 3, 2023, 9:20pm UTC](https://swi-prolog.discourse.group/t/what-you-do-think-about-this-way-to-model-laws/7008 "2023-12-03T21:20:13Z")

</div>

This is a general Prolog question. Any opinions about the direction I’m taking this? My rough idea: I want the code to: Answer questions about which laws have been broken based on facts asserted. List the elements of …

---

## [DCG optimisation and non-optimisation with multiple accumulators](https://swi-prolog.discourse.group/t/dcg-optimisation-and-non-optimisation-with-multiple-accumulators/6878)

<div class="topic-metadata">

**Author:** [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Replies:** 3\
**Last updated:** [October 10, 2023, 2:04am UTC](https://swi-prolog.discourse.group/t/dcg-optimisation-and-non-optimisation-with-multiple-accumulators/6878 "2023-10-10T02:04:04Z")

</div>

I modified @jan 's proposal for DCGs with multiple accumulators (Dealing with state), to use records (see library(record)) instead of dicts. Initially, this didn’t speed things up; but when I added some expansion rules t…

---

## [How to install module in Python online compiler](https://swi-prolog.discourse.group/t/how-to-install-module-in-python-online-compiler/6785)

<div class="topic-metadata">

**Author:** [@Alexmaxwell](https://swi-prolog.discourse.group/u/Alexmaxwell)\
**Replies:** 0\
**Last updated:** [August 21, 2023, 11:07am UTC](https://swi-prolog.discourse.group/t/how-to-install-module-in-python-online-compiler/6785 "2023-08-21T11:07:11Z")

</div>

Here are some possible solutions to the problem: Make sure that the Python online compiler you are using supports installing modules. Some compilers only allow you to run Python code that is already installed on the se…

---

## [Prolog inline predicates](https://swi-prolog.discourse.group/t/prolog-inline-predicates/1321)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 28\
**Last updated:** [February 28, 2023, 10:44am UTC](https://swi-prolog.discourse.group/t/prolog-inline-predicates/1321 "2023-02-28T10:44:01Z")

</div>

---

## [Changes to SWI-cpp.h](https://swi-prolog.discourse.group/t/changes-to-swi-cpp-h/5601)

<div class="topic-metadata">

**Author:** [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Replies:** 62\
**Last updated:** [July 12, 2023, 6:04pm UTC](https://swi-prolog.discourse.group/t/changes-to-swi-cpp-h/5601 "2023-07-12T18:04:11Z")

</div>

In another thread, the topic of SWI-cpp.h (a C++ wrapper around the C interface for foreign predicates) has come up; and it appears that we need to make some changes. So, my first question is: who uses SWI-cpp.h? So far…

---

## [In lieu of a type system](https://swi-prolog.discourse.group/t/in-lieu-of-a-type-system/6666)

<div class="topic-metadata">

**Author:** [@z5h](https://swi-prolog.discourse.group/u/z5h)\
**Replies:** 1\
**Last updated:** [June 28, 2023, 8:58pm UTC](https://swi-prolog.discourse.group/t/in-lieu-of-a-type-system/6666 "2023-06-28T20:58:58Z")

</div>

I’m not suggesting Prolog needs a type system. But in some cases where I have unruly states to track, I’d like some of the peace of mind one gets with type inference, completeness checks, etc. It occurred to me that th…

---

## [My Prolog code runs forever](https://swi-prolog.discourse.group/t/my-prolog-code-runs-forever/6665)

<div class="topic-metadata">

**Author:** [@berataltuntash](https://swi-prolog.discourse.group/u/berataltuntash)\
**Replies:** 6\
**Last updated:** [June 28, 2023, 7:24pm UTC](https://swi-prolog.discourse.group/t/my-prolog-code-runs-forever/6665 "2023-06-28T19:24:38Z")

</div>

I have a code that suppose to solve a crossword puzzle (find all combinations to the crossword puzzle from given txt file. I got a little help from the chatgpt but couldnt solve my problem. It tooks forever to run and ne…

---

## [Facts vs Local knowledge](https://swi-prolog.discourse.group/t/facts-vs-local-knowledge/6636)

<div class="topic-metadata">

**Author:** [@meditans](https://swi-prolog.discourse.group/u/meditans)\
**Replies:** 10\
**Last updated:** [June 27, 2023, 11:43am UTC](https://swi-prolog.discourse.group/t/facts-vs-local-knowledge/6636 "2023-06-27T11:43:43Z")

</div>

I’m currently working on a Prolog project and have run into a conundrum. While using a knowledge base as facts leads to great efficiency (thank to indexing), I’m interested in incorporating ‘local knowledgebases’ stored …

---

## [Best resource to learn prolog](https://swi-prolog.discourse.group/t/best-resource-to-learn-prolog/6579)

<div class="topic-metadata">

**Author:** [@ribosomerocker](https://swi-prolog.discourse.group/u/ribosomerocker)\
**Replies:** 3\
**Last updated:** [June 8, 2023, 12:01pm UTC](https://swi-prolog.discourse.group/t/best-resource-to-learn-prolog/6579 "2023-06-08T12:01:22Z")

</div>

Hey. I’ve been trying to get deeper into prolog and general logic programming, but I find it quite hard to learn everything. I know of The Power of Prolog but the verry first program they show Facets of Prolog doesn’t wo…

---

## [Types with SWI-Prolog](https://swi-prolog.discourse.group/t/types-with-swi-prolog/1341)

<div class="topic-metadata">

**Author:** [@pmoura](https://swi-prolog.discourse.group/u/pmoura)\
**Replies:** 32\
**Last updated:** [May 11, 2023, 4:04pm UTC](https://swi-prolog.discourse.group/t/types-with-swi-prolog/1341 "2023-05-11T16:04:03Z")

</div>

I assume the big picture here is the need for supporting parametric types? In the error module, I find only list(Type). But there are several others that are useful such as pair(KeyType,ValueType), ground(Type), char(Ch…

---

## [Interpreter targeting LLVM](https://swi-prolog.discourse.group/t/interpreter-targeting-llvm/6454)

<div class="topic-metadata">

**Author:** [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Replies:** 6\
**Last updated:** [May 3, 2023, 4:12pm UTC](https://swi-prolog.discourse.group/t/interpreter-targeting-llvm/6454 "2023-05-03T16:12:41Z")

</div>

This might be useful if a faster SWI-Prolog is desired. However, it appears that speed up is only 30% (for Lua), so it not be worth the effort. ( discussion: Building the fastest Lua interpreter automatically | Hacker…

---

## [The subtle costs of garbage collection](https://swi-prolog.discourse.group/t/the-subtle-costs-of-garbage-collection/6287)

<div class="topic-metadata">

**Author:** [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Replies:** 26\
**Last updated:** [March 4, 2023, 2:50am UTC](https://swi-prolog.discourse.group/t/the-subtle-costs-of-garbage-collection/6287 "2023-03-04T02:50:09Z")

</div>

When trying to make a program run faster recently, I wondered what effect garbage collection has on it, and in particular how much effect the threaded “don’t stop the world” gc was costing. So, I built swipl with -DMULTI…

---

## [Prolog program is much slower than Haskell -- why?](https://swi-prolog.discourse.group/t/prolog-program-is-much-slower-than-haskell-why/6266)

<div class="topic-metadata">

**Author:** [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Replies:** 20\
**Last updated:** [February 24, 2023, 7:21pm UTC](https://swi-prolog.discourse.group/t/prolog-program-is-much-slower-than-haskell-why/6266 "2023-02-24T19:21:06Z")

</div>

I thought I’d learn a bit of Haskell, so I started watching Graham Hutton’s online course. The first example is a generate-and-test solver for the “countdown” puzzle, and I thought “that’s something that Prolog can do bo…

---

## [Pce editor with word wrap, and line numbers](https://swi-prolog.discourse.group/t/pce-editor-with-word-wrap-and-line-numbers/6202)

<div class="topic-metadata">

**Author:** [@paule32](https://swi-prolog.discourse.group/u/paule32)\
**Replies:** 3\
**Last updated:** [February 9, 2023, 3:52pm UTC](https://swi-prolog.discourse.group/t/pce-editor-with-word-wrap-and-line-numbers/6202 "2023-02-09T15:52:35Z")

</div>

I’m using: SWI-Prolog version 9.0.4 for x64-win64 I want the code to: have a input editor for text manipulation (load, save, save as, modified) But what I’m getting is: editor without word wrap, and no line numbers My…

---

## [Proposing the HandAxe Pattern Language: fully unambiguous names for operations on lists, sets, and dictionaries!](https://swi-prolog.discourse.group/t/proposing-the-handaxe-pattern-language-fully-unambiguous-names-for-operations-on-lists-sets-and-dictionaries/6053)

<div class="topic-metadata">

**Author:** [@weavermarquez](https://swi-prolog.discourse.group/u/weavermarquez)\
**Replies:** 2\
**Last updated:** [December 25, 2022, 11:50pm UTC](https://swi-prolog.discourse.group/t/proposing-the-handaxe-pattern-language-fully-unambiguous-names-for-operations-on-lists-sets-and-dictionaries/6053 "2022-12-25T23:50:23Z")

</div>

note: crossposted from r/prolog Time spent considering naming, is time well spent. — Maurice Rabb HandAxe HandAxe is a vocabulary with extremely clear semantics for operating on Ordered and Unordered L…

---

## [Permutations - Stuck in a infinite loop](https://swi-prolog.discourse.group/t/permutations-stuck-in-a-infinite-loop/5995)

<div class="topic-metadata">

**Author:** [@tripsytina](https://swi-prolog.discourse.group/u/tripsytina)\
**Replies:** 7\
**Last updated:** [December 3, 2022, 7:09pm UTC](https://swi-prolog.discourse.group/t/permutations-stuck-in-a-infinite-loop/5995 "2022-12-03T19:09:37Z")

</div>

I have done an algorithm wich gets the most time-efficent list from the permutated lists of a certain list. When i try to run it for a small list (with 2 elements) it works, however, when i try with a bigger list, it g…

---

## [Permutations - Infinite Loop Error](https://swi-prolog.discourse.group/t/permutations-infinite-loop-error/5992)

<div class="topic-metadata">

**Author:** [@tripsytina](https://swi-prolog.discourse.group/u/tripsytina)\
**Replies:** 2\
**Last updated:** [December 2, 2022, 2:30pm UTC](https://swi-prolog.discourse.group/t/permutations-infinite-loop-error/5992 "2022-12-02T14:30:27Z")

</div>

I’m using: SWI-Prolog version 8.4.3 I want the code to: Generate the most time-efficient solution through permutations of a list. But what I’m getting is: An infinite loop after doing the first permutated list. My co…

---

## [How to Use Naive Bayes on SWI-Prolog](https://swi-prolog.discourse.group/t/how-to-use-naive-bayes-on-swi-prolog/5938)

<div class="topic-metadata">

**Author:** [@jankerss](https://swi-prolog.discourse.group/u/jankerss)\
**Replies:** 0\
**Last updated:** [November 15, 2022, 7:11am UTC](https://swi-prolog.discourse.group/t/how-to-use-naive-bayes-on-swi-prolog/5938 "2022-11-15T07:11:31Z")

</div>

Help me, because little bit confused

---

## [How to call a relation raised to a function](https://swi-prolog.discourse.group/t/how-to-call-a-relation-raised-to-a-function/5581)

<div class="topic-metadata">

**Author:** [@kuniaki.mukai](https://swi-prolog.discourse.group/u/kuniaki.mukai)\
**Replies:** 20\
**Last updated:** [July 12, 2022, 10:15am UTC](https://swi-prolog.discourse.group/t/how-to-call-a-relation-raised-to-a-function/5581 "2022-07-12T10:15:25Z")

</div>

For a list \[x-a, x-b, y-c\] of pairs which allows multiple keys, does the dict like list \[x-\[a,b\], y-\[c\]\] have a standard name ? More general, for a binary relation R how the derived function F\_R is called, where F\_R(x…

---

## [Naming clarification about delimited continuation (reset/3 and shift/1)](https://swi-prolog.discourse.group/t/naming-clarification-about-delimited-continuation-reset-3-and-shift-1/5526)

<div class="topic-metadata">

**Author:** [@chansey97](https://swi-prolog.discourse.group/u/chansey97)\
**Replies:** 8\
**Last updated:** [July 4, 2022, 8:50pm UTC](https://swi-prolog.discourse.group/t/naming-clarification-about-delimited-continuation-reset-3-and-shift-1/5526 "2022-07-04T20:50:49Z")

</div>

SWI-Prolog provides two predicates reset/3 and shift/1 to implement delimited continuations. These two predicates are described in Schrijvers et al., 2013 (preprint PDF), which is a very nice paper. However, the names…

---

## [CGI pages for Channel Theory (Barwise-Selgman) are revived](https://swi-prolog.discourse.group/t/cgi-pages-for-channel-theory-barwise-selgman-are-revived/5583)

<div class="topic-metadata">

**Author:** [@kuniaki.mukai](https://swi-prolog.discourse.group/u/kuniaki.mukai)\
**Replies:** 0\
**Last updated:** [July 4, 2022, 9:54am UTC](https://swi-prolog.discourse.group/t/cgi-pages-for-channel-theory-barwise-selgman-are-revived/5583 "2022-07-04T09:54:17Z")

</div>

Around 2015 I wrote a piece of codes for cgi on “Information Flow” inspired by the book: Information Flow - The Logic of Distributed Systems Jon Barwise, Jerry Seligman Cambridge University Press 1977 It was a priva…

---

## [Implementing negation from this book](https://swi-prolog.discourse.group/t/implementing-negation-from-this-book/5576)

<div class="topic-metadata">

**Author:** [@lug](https://swi-prolog.discourse.group/u/lug)\
**Replies:** 1\
**Last updated:** [July 3, 2022, 9:45am UTC](https://swi-prolog.discourse.group/t/implementing-negation-from-this-book/5576 "2022-07-03T09:45:39Z")

</div>

I’ve seen surprisingly few mentions of this book around, which has a few somewhat interesting ideas. A few pages: As advertised, it implements logical negation. It seems to be a kind of constructive negation done b…

---

## [Print vs quoted output of Unicode characters](https://swi-prolog.discourse.group/t/print-vs-quoted-output-of-unicode-characters/5546)

<div class="topic-metadata">

**Author:** [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Replies:** 0\
**Last updated:** [June 22, 2022, 6:34pm UTC](https://swi-prolog.discourse.group/t/print-vs-quoted-output-of-unicode-characters/5546 "2022-06-22T18:34:05Z")

</div>

There are two ways of escaping some Unicode characters: \\\\u and \\\\x. For output, the quoted form prefers \\\\x and the portray form prefers \\\\u: X = '\\x2', Y = '\\u0002', atom\_codes(X, Codes), atom\_chars(X, Chars), …

---

## [term\_string('A', "'A'")](https://swi-prolog.discourse.group/t/term-string-a-a/5516)

<div class="topic-metadata">

**Author:** [@kuniaki.mukai](https://swi-prolog.discourse.group/u/kuniaki.mukai)\
**Replies:** 15\
**Last updated:** [June 22, 2022, 10:56am UTC](https://swi-prolog.discourse.group/t/term-string-a-a/5516 "2022-06-22T10:56:20Z")

</div>

Sometime term\_string/2 confuses me, and it causes bugs into my codes. One of such confuses, I think, comes from that I believed that the length of “atom name” of the “atom” ‘A’ is 1. But, like an example below, th…

---

## [Backtracking cannot see predicates changes when retract/assertz itself](https://swi-prolog.discourse.group/t/backtracking-cannot-see-predicates-changes-when-retract-assertz-itself/5417)

<div class="topic-metadata">

**Author:** [@chansey97](https://swi-prolog.discourse.group/u/chansey97)\
**Replies:** 4\
**Last updated:** [June 16, 2022, 7:56pm UTC](https://swi-prolog.discourse.group/t/backtracking-cannot-see-predicates-changes-when-retract-assertz-itself/5417 "2022-06-16T19:56:46Z")

</div>

I did an experiment about retract/1 or assertz/1. See following program: :- dynamic test/1. update(X) :- test(X), format("update ~w~n", \[X\]), ( X=2 -\> format("update X=2 ~n"), retract(test(3)) ; forma…

---

## [(foreign functions) Safe release of resources during cleanup](https://swi-prolog.discourse.group/t/foreign-functions-safe-release-of-resources-during-cleanup/5382)

<div class="topic-metadata">

**Author:** [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Replies:** 14\
**Last updated:** [June 4, 2022, 6:15pm UTC](https://swi-prolog.discourse.group/t/foreign-functions-safe-release-of-resources-during-cleanup/5382 "2022-06-04T18:15:54Z")

</div>

During cleanup, the normal order of reclaiming blobs isn’t followed. Quoting from the documentation: These objects are reclaimed regardless of their registration count. The order in which the atoms or blobs are reclai…

---

## [How work with socket?](https://swi-prolog.discourse.group/t/how-work-with-socket/5450)

<div class="topic-metadata">

**Author:** [@heiheshang](https://swi-prolog.discourse.group/u/heiheshang)\
**Replies:** 5\
**Last updated:** [June 3, 2022, 7:34am UTC](https://swi-prolog.discourse.group/t/how-work-with-socket/5450 "2022-06-03T07:34:59Z")

</div>

I want to open connections to postgresql and write a message to a socket. I watch tcpdump nothing happens. tcp\_address(Address0, Address), tcp\_socket(Socket), tcp\_connect(Socket, localhost:5432, Stream), set…

---

## [SWI-Prolog Search Documentation should support predicates in packs](https://swi-prolog.discourse.group/t/swi-prolog-search-documentation-should-support-predicates-in-packs/5428)

<div class="topic-metadata">

**Author:** [@chansey97](https://swi-prolog.discourse.group/u/chansey97)\
**Replies:** 0\
**Last updated:** [May 25, 2022, 11:59am UTC](https://swi-prolog.discourse.group/t/swi-prolog-search-documentation-should-support-predicates-in-packs/5428 "2022-05-25T11:59:40Z")

</div>

Currently, SWI-Prolog Search Documentation does not support any predicates in packs. For example, reif.pl has if\_/3, but you cannot search if\_/3 in SWI-Prolog Search Documentation. This is a bit inconvenient. IMO, Searc…

[Previous page](https://swi-prolog.discourse.group/tag/discussion/12.md?match_all_tags=true&tags%5B%5D=discussion)

[Next page](https://swi-prolog.discourse.group/tag/discussion/12.md?match_all_tags=true&page=2&tags%5B%5D=discussion)
