Skip to content
HomeVideosBooks
AllTopicsTrends
BlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    Cover of The art of Prolog

    The art of Prolog

    Leon Sterling, Ehud Yehuda Shapiro · 1986

    This second edition contains revised chapters taking into account recent research advances. More advanced exercises have been included, and "Part II The Prolog Language" has been modified to be compatible with the new Prolog standard. This is a graduate level text that can be used for self-study.

    Programming
    Open LibraryAmazon
    Stats for nerds
    36recommend
    114mentions
    65people
    2009–2026years
    62% recommend38% neutral

    Mentions per year

    2009201120132015201720192021202320252026

    What Hacker News says

    1. kriroJul 2026
      Looking at the table of contents, I see no mention of Gödel/incompleteness theorems or limitations which is not a great sign. It does look well structured though but I'd probably recommend just going with "Introduction to Logic" by Tarski and "Metalogic. An introduction to the metatheory of standard first order logic." by Hunter. Those served me well and are fairly understandable for a non-mathematician (imo).

      Alternatively hop straight into Prolog (Art of Prolog, Craft of Prolog).

      thread
    2. floxyJan 2026
      I guess we are supposed to pile on, so I'll add that the author should read "The Art of Prolog" (Sterling & Shapiro) and then "The Craft of Prolog" (O'Keefe).
      thread
    3. kriroJun 2025
      I love Prolog but haven't used it in ages. I should really give it a go again. Whenever I used it my brain needed some adjustment time and then switched to declarative mode. It's a really unique experience and hard to describe. It was also my first contact with immutable data.

      Is implementing a Kanren and embedding it as suggested by the author really the recommended approach? Back in the day I used Sicstus mostly but tried to use SWI whenever possible (because I'm a FLOSS guy at heart). I'm asking because we went the opposite direction and used Prolog as the first language and called Java or C when needed (io, GUI). I'd describe the result as a "hot mess".

      Random note: "Art of Prolog" and "Craft of Prolog" remain two of my favorite CS books to this day.

      I'd be curious what the "state of the art" is these days and would love ve to hear from some folks using Prolog in the trenches.

      thread
    4. z5hOct 2024
      So first, let's keep in mind that with no execution model, Prolog is still a "syntax" for Horn clauses. It's still a way to document knowledge. Add SLD resolution and we can compute. The paper (intentionally I presume) orders clauses of a simple predicate to illustrate (cause) a problem in Prolog.

      But what I actually find is the more time spent in Prolog, the more natural it is to express things in a way that is clear, logical and performant. As with any language/paradigm, there are a few gotchas to be experienced. But generally speaking, SLD resolution has never once been an obstacle (in the past 2 years) of coding.

      The general execution model of Prolog is pretty simple. The lack of functions actually makes meta-programming much clearer and simpler. A term is just data, unless it's stated as a goal. It's only a valid goal if you've already defined its meaning.

      So I'd be concerned that Curry gives up the simplicity of Prolog's execution model, and ease of meta-programming. I struggle with the lack of types in Prolog, but also know I can (at least in theory) use Prolog to solve correctness problems in Prolog code.

      I'm currently using SWI-Prolog. Performance is excellent, it has excellent high-level concurrency primitives[0] (when was the last time you pegged all your cores solving a problem?), and many libraries. I might be one of the few people who has committed to using the integrated editor (PceEmacs) despite being a Vim person. PceEmacs is just too good at syntax highlighting and error detection.

      At the same time, I'm a huge fan of Markus Triska. His Youtube[1] stuff is mind-expanding (watch all of it, even if you never write Prolog). He has an excellent book online[2]. I admire the way he explains and advances pure monotonic Prolog, and I appreciate the push for ISO conformance and his support for Prologs that that do the same (SWI is not on that list).

      If you want to learn Prolog, watch all of Markus Triska's videos, read his book, and learn what Prolog could be in a perfect world. Then download SWI-Prolog, and maybe break some rules while getting things done at a blazing speed. Eventually you'll gravitate to what makes sense for you.

      The Art of Prolog is a classic "must have". Clause and Effect is a good "hit the ground running" (on page 70 you're into symbolic differentiation via term rewriting).

      0 https://www.swi-prolog.org/pldoc/man?section=thread

      1 https://www.youtube.com/@ThePowerOfProlog

      2 https://www.metalevel.at/prolog

      thread
    5. mstJul 2024
      If you want to see something truly fascinating, take apart https://logtalk.org/ - it implements an OO system for prolog which gives you all sorts of advantages (the least of which being a not-terrible way of getting namespaces).

      Reading "The Art of Prolog" and "The Craft of Prolog" was fun for me, as was learning how the Warren Abstract Machine works.

      (I am not at all a prolog expert, merely a programmer who happens to be fascinated by it, so this is all dabbling on my end but hopefully provides some stuff that's fun to learn for you as well)

      thread
    6. kriroSep 2023
      I can basically +1 the sentiment here. Used Prolog during my three university AI classes (basically "AI A Modern Approach" front to back + Prolog programming) and it was a mind bending experience. I always have to warm up before my brain can think Prolog again. I also wrote horrible prology spaghetti code in my other language during the Prolog semesters :D

      Biggest downside "back in the day" was interop with other things was tricky. Either you embedded a Prolog in a JVM or something like that (usually with less features) or you relied on some sort of C binding. My takeaway was it's great so solve certain tasks (especially CSP) but not for solving tasks with a user interface in the mix (or file system access or any miriad of other things).

      "Back then" SWI was also lagging behind and we used some proprietary solution which I'm generally not a fan of when it comes to programming languages/environement (Sicstus iirc.). Last time I checked SWI has caught up with the prorietary stuff and would be my go to now though.

      The Prolog exam was also the one I was most afraid of during university because it consisted of a 60 Minute live coding section (solve three tasks of increasing difficulty) followed by an oral exam. My prep experience was that often times it just takes some reasoning and sitting there before the magic moment comes and the Prolog solution pops up in my brain...not exactly what you want in a timed exam situation. Thankfully I aced it by spending 40 minutes on the easiest task and solving the other two in a matter of minutes. The follow up course was a lot of fun (implement a game playing agent and compete against other teams in a tournament).

      "The Art of Prolog" and "The Craft of Prolog" were also two of the better programming books I have read in my life.

      thread

    Related

    Cover of The craft of Prolog
    2009–2026

    The craft of Prolog

    Richard A. O'Keefe
    18 recommend · 57
    Cover of Prolog and natural-language analysis
    2010–2025

    Prolog and natural-language analysis

    Fernando C. N. Pereira
    6 recommend · 11
    Cover of Programming in Prolog
    2009–2026

    Programming in Prolog

    William F. Clocksin
    8 recommend · 22
    Prolog Programming in DepthMichael A. Covington
    2009–2025

    Prolog Programming in Depth

    Michael A. Covington
    4 recommend · 5
    Cover of Prolog programming for artificial intelligence
    2009–2026

    Prolog programming for artificial intelligence

    Ivan Bratko
    10 recommend · 17
    Cover of AI algorithms, data structures, and idioms in Prolog, Lisp, and Java
    2013–2022

    AI algorithms, data structures, and idioms in Prolog, Lisp, and Java

    George F. Luger
    1 recommend · 8
    Cover of Adventure in Prolog
    2016–2026

    Adventure in Prolog

    Dennis Merritt
    6 recommend · 10
    Cover of Foundations of Logic Programming
    2010–2026

    Foundations of Logic Programming

    John W. Lloyd
    1 recommend · 7