HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
mthom
scryer-prolog
Rust2018–2026
mthom / scryer-prolog

scryer-prolog

A modern Prolog implementation written mostly in Rust.

20Distinct people
81Mentions
2Explicit recommenders
2.5KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A modern Prolog implementation written mostly in Rust.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

(Will be continued in Part 13) It will take me to read this book, but I love it! I'll be following along in https://github.com/mthom/scryer-prolog (written in Rust) so one…

sitkack used a recommendation phrase. 2 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 12:01:57 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year81 dated mentions

Observed mentions: 2018-02-26 18:34:13 UTC to 2026-08-05 20:11:30 UTC.

0510152018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 8 mentions; 1 submissions, 7 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 14 mentions; 0 submissions, 14 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 8 mentions; 2 submissions, 6 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 5 mentions; 2 submissions, 3 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 10 mentions; 5 submissions, 5 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 16 mentions; 7 submissions, 9 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 13 mentions; 5 submissions, 8 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC211
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC817
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC14014
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC826
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC523
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC1055
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC1679
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC1358
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC514

What Hacker News says

8 sources
> I'm guessing the Prolog compiler is super complex compared to, say, a C compiler to be able to give developers that much power. They're not that complex. I'm writing one from scratch right now: http://github.com/mthom/scryer-prolog Speaking of constraint solvers, the author of Power of Prolog, Markus Triska, is now in the process of porting his clp(ℤ) constraint solver over to my system, having already ported his boolean constraint solver, clp(B). They are quite complex, but it helps that they're written entirely in Prolog.
In Logic Puzzles with Prolog (2017)
In general, using any of the mentioned predicates (->)/2, (\+)/1 or !/0 in Prolog code destroys essential properties we expect from classical logic, and therefore complicates declarative reasoning about the code to such an extent that it can be said to prevent it entirely. For example, both versions of foo/2 that are shown above suffer from the same core deficiency: If some_condition/1 has multiple solutions, then they are cut away and not generated at all. Therefore, for the most general query, ?- foo(X, Y). only a single answer, or a proper subset of all answers one would expect when reading (->)/2 as "implies", may be shown where, under a declarative reading based on first-order logic, there ought to be more. This is problematic because if any concrete solution S is cut off due to this deficiency, we can still force the Prolog sys
Read the rest
tem to yield it with: ?- X = S, foo(X, Y). So, we are in the situation that adding a constraint (X = S) yields a solution that is not shown when the constraint is removed. In other words, a specialized version of the predicate is more general than the original definition. This violates monotonicity, which is an essential property of classical first-order logic, and the basis for declarative debugging approaches that let us reason about the location of mistakes in Prolog predicates. To write good declarative Prolog code that is also efficient, we first need to find and implement the mechanisms that let us express predicates like foo/2 in such a way that they are efficient while retaining their generality as logical relations. One important building block pertaining to this concrete example was recently found with the new language construct if_/3, described in Indexing dif/2 by Ulrich Neumerkel and Stefan Kral: https://arxiv.org/abs/1607.01590 With if_/3, we can write foo/2 as: foo(X, Y) :- if_(some_condition(X), bar(Y, X) baz(X, Y)). The only requirement for this to work is to have a reified version of some_condition/1, in such a way that we can tell, from the implicit second argument, whether the condition holds or not, while still generating all answers for the most general query. Some predicates are already reified in the library, so we can write for example: ?- X = a, if_(X = a, Y = b, Y = c). X = a, Y = b. which succeeds without leaving choice-points, and that is good for performance. At the same time, we get both answers (X = a and also dif(X, a), i.e., X is not equal to a) on backtracking if we omit the first goal: ?- if_(X = a, Y = b, Y = c). X = a, Y = b ; Y = c, dif(X, a). Hence, the predicate retains important logical properties we expect from first-order logic, and this allows declarative reading and debugging based on these properties. To benefit from the true power of Prolog, such constructs must become available in Prolog implementations. For example, currently, the only Prolog system that ships with if_/3 as a built-in feature is Mark Thom's Scryer Prolog, where if_/3 and related predicates are available in library(reif): https://github.com/mthom/scryer-prolog https://github.com/mthom/scryer-prolog/blob/master/src/prolo... Other features that are necessary to make Prolog programs more declarative include CLP(ℤ) constraints, pure I/O, efficient implementation of partial strings as lists of characters etc., all of which are currently work in progress and as of yet only partially available in some Prolog systems. Over time, such features will become more widely available, and then they can be more easily taught and used to obtain Prolog programs that are pure and efficient.
In Swish: SWI Prolog Notebook
If anyone is interested in learning Prolog I can recommend two very good Prolog books: The Power of Prolog[1] and Simply Logical: Intelligent Reasoning by Example[2]. I also recommend visiting the Awesome Prolog list[3]. Worth checking also a very interesting extension of the Prolog - Probabilistic Prolog, aka ProbLog[4]. And modern ISO-compatible implementation in Rust language - Scryer Prolog[5]. [1] https://www.metalevel.at/prolog [2] https://book.simply-logical.space/ [3] https://github.com/klaussinani/awesome-prolog [4] https://github.com/ML-KULeuven/problog [5] https://github.com/mthom/scryer-prolog
In Swish: SWI Prolog Notebook
Two more very good Prolog books: The Power of Prolog[1] and Simply Logical: Intelligent Reasoning by Example[2]. I also recommend visiting the Awesome Prolog list[3]. There is also a very interesting extension of the Prolog - Probabilistic Prolog, aka ProbLog[4]. And modern ISO-compatible implementation in Rust language - Scryer Prolog[5]. [1] https://github.com/triska/the-power-of-prolog/ [2] https://book.simply-logical.space/ [3] https://github.com/klaussinani/awesome-prolog [4] https://github.com/ML-KULeuven/problog [5] https://github.com/mthom/scryer-prolog
In Adventure in Prolog Tutorial (2016)
Here is the official site[1] of the project. There is a request[2] to add it in the Scryer Prolog[3] (ISO Prolog implementation in Rust). And implementations in Rust[4] itself, and Julia[5] language. [1] https://posithub.org/index [2] https://github.com/mthom/scryer-prolog/issues/6 [3] https://github.com/mthom/scryer-prolog [4] https://gitlab.com/burrbull/softposit-rs [5] https://juliacomputing.com/blog/2016/03/29/unums.html
In John Gustafson’s crusade to replace floating point with something better
Well, symbolic AI people also work on probabilistic reasoning. The production level example is ProbLog[1][2], used in genetics. There is even DeepProbLog[3], adding deep learning in the mix. The only problem both implemented in Python. I hope there will be alternatives in native languages. Scryer Prolog[4] might become this implementation one day (it is written in Rust). Another approach is to extend vanilla Prolog, like cplint[5] does. [1] https://dtai.cs.kuleuven.be/problog/ [2] https://bitbucket.org/problog/problog [3] https://bitbucket.org/problog/deepproblog [4] https://github.com/mthom/scryer-prolog [5] https://github.com/friguzzi/cplint
In Ask HN: Will there ever be a resurgence of interest in symbolic AI?
There is an interesting project - DeepProbLog[1], based on the ProbLog[2] (a Prolog dialect with probabilistic reasoning) and Deep Learning combined. I only wish it was Rust, so it would have been safer, faster, and easier to embed in your programs. I have high hopes to the Scryer Prolog[3], and it seems[4] the author think about probabilistic extensions too. [1] https://bitbucket.org/problog/deepproblog [2] https://dtai.cs.kuleuven.be/problog/ [3] https://github.com/mthom/scryer-prolog [4] https://github.com/mthom/scryer-prolog/issues/69
In Combine statistical and symbolic artificial intelligence techniques

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.