5 ms·
The Power of Prolog [video]
- xvilka 6y agoIf 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]. [1] https://www.metalevel.at/prolog https://www.metalevel.at/prolog [2] https://book.simply-logical.space/ https://book.simply-logical.space/ [3] https://github.com/klaussinani/awesome-prolog https://github.com/klaussinani/awesome-prolog [4] https://github.com/ML-KULeuven/problog https://github.com/ML-KULeuven/problog [5] https://github.com/mthom/scryer-prolog https://github.com/mthom/scryer-prolog
- AdieuToLogic 6y agoThanks 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.
- JadeNB 6y agoI 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 https://mitpress.mit.edu/books/craft-prolog .
- gambler 6y agoI 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.
- falsissime 6y agoIn 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.
- rurban 6y agoI'm quite happy with picat, which supports traditional if and loops. It's also fast and supports some solvers, recursive backtracking is optional. Skipping an expr by cut is in every prolog, but loops not.
- grizzles 6y agoYou 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.
- thewarrior 6y agoDoes anyone have any stories of how they used Prolog in production to solve an interesting business problem ?
- j-pb 6y agoLots of robotics startups are using prolog for planning.
- sesuximo 6y agoI do not use prolog in production, but I frequently use ideas from prolog (program with constraints and a solver) in other languages
- eterps 6y agoNot exactly a business problem, but I heard that a Prolog-like approach works very well for a type inference system.
- simplify 6y agoIt's light on details (plan to fill out more later) but we're using Prolog for the roles & permissions system in our Rails app https://pubb.substack.com/p/practical-prolog-in-ruby-on-rails https://pubb.substack.com/p/practical-prolog-in-ruby-on-rail...
- vimslayer 6y agoIdk 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. https://yarnpkg.com/features/constraints https://yarnpkg.com/features/constraints
- dang 6y agoSome big threads, including one from a month ago: https://news.ycombinator.com/item?id=22804079 https://news.ycombinator.com/item?id=22804079 2018: https://news.ycombinator.com/item?id=17121028 https://news.ycombinator.com/item?id=17121028 2017: https://news.ycombinator.com/item?id=14045987 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.
- PopeDotNinja 6y agoI've seen a bit of Prolog in the wild, but never got deep into it. Syntactically it reminds me of Erlang. Are they at all similar?
- reddit_clone 6y agoEarly Erlang was based on prolog.
- wtetzner 6y agoMore specifically, the first Erlang compiler was written in prolog, and it inherited a lot of its syntax and some of its features.