If anyone is interested in learning Prolog I can recommend two very good Prolog books: The Power of Prolog (from the author of the video)[1] and Simply Logical: Intelligent Reasoning by Example[2]. I also recommend visiting the Awesome Prolog list[3]. Worth checking also interesting extension of the Prolog - Probabilistic Prolog, aka ProbLog[4]. And modern ISO-compatible implementation in Rust language - Scryer Prolog[5].
Thanks for sharing those resources. With both of the books having online versions, I can easily share them with people interested in logic programming in general and Prolog in specific.
I always drop in on any Prolog recommendations and mention O'Keefe's highly idiosyncratic but wonderful "The craft of Prolog": https://mitpress.mit.edu/books/craft-prolog .
I would be gladly writing a lot of stuff in a Prolog-like language if there was a dialect that separated rule construction from traversal manipulation. This is such an obvious thing. I should be able to construct a set of rules and then say "but this time, ignore this branch" (without changing the tree with cuts). Or something like "do depth-first for up to 1000 levels and give me the incomplete set of answers".
In SQL you don't change the database simply because you want to run a different query. You manipulate the query, the indices and the query hints.
In fact, you can do this with Prolog already, however, you have restrict yourself to the pure monotonic subset. Many parts of Prolog the do not fit can be replaced by purer counterparts. See library(si), library(reif), library(clpz) for such attempts.
You could try datalog with your own parser. Personally I feel like their is a need for a new industry standard language that lets you encode assertions with either a boolean or a probability.
I'm very curious about the recent practical applications of prolog, do you have a link to any of these startups' websites or an article commenting about such applications?
Idk if this qualifies as "in production", but the JavaScript package manager Yarn (version 2) and its users use Prolog to define rules for their dependencies. Like if you have submodules A and B and both depend on package C, you may use Prolog to constrain that both A and B must always use the same version of C and updating C must be done in both packages.
19 comments
[ 8.6 ms ] story [ 1501 ms ] thread[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 SQL you don't change the database simply because you want to run a different query. You manipulate the query, the indices and the query hints.
Skipping an expr by cut is in every prolog, but loops not.
https://yarnpkg.com/features/constraints
https://news.ycombinator.com/item?id=22804079
2018: https://news.ycombinator.com/item?id=17121028
2017: https://news.ycombinator.com/item?id=14045987
Although one month is well within the year range for duplicates on HN, the videos weren't posted before. Borderline call but we'll leave it up.