{"slug": "swi-prolog", "name": "SWI-Prolog", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 6, "commenters": 9, "warners": 0, "score": 5.876, "rising": -1.96, "first": "2025-11-12", "latest": "2026-08-10", "why": "SWI is about 10,000 times faster than my implementation. It's a work of art!", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 6, "neutral": 3, "compare": 0, "warn": 0}, "spark": [2, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "SWI is about 10,000 times faster than my implementation. It's a work of art!", "kind": "", "icon": true, "domain": "swi-prolog.org", "github_repo": null, "official_url": "https://www.swi-prolog.org", "pricing": "", "aliases": ["SWI-Prolog"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 771867280, "item_id": 48241705, "url": "https://news.ycombinator.com/item?id=48241705", "by": "anthk", "date": "2026-05-22", "version": null, "stance": "recommend", "quote": "Just get Swi Prolog.", "excerpt": "A bit expensive. Just get Swi Prolog. https://www.swi-prolog.org/ The Simply Logical book as a start: https://book.simply-logical.space/src/simply-logical.html you can get a PDF just fine. Also, for hardcore mode, get paper and pen, I'm not kidding: (again, just use SWI Prolog): https://www.ida.liu.se/~ulfni53/lpp/bok/ Another approach. Scheme and Logic: S9 Scheme, get the bleeding edge version and compile it. Enough", "context": "", "use_case": "", "switched_from": "", "story": "Chess Invariants"}, {"id": 770838993, "item_id": 48177437, "url": "https://news.ycombinator.com/item?id=48177437", "by": "crabbone", "date": "2026-05-18", "version": null, "stance": "recommend", "quote": "Prolog was convenient", "excerpt": "I used Prolog twice in production, but none of them were what I'd expect to be the \"typical\" uses. 1. I used GoLog (a Prolog interpreted in Go) for defining some functional tests in the project where the testing infrastructure was otherwise written in Go. 2. I used Prolog (SWI) to write a parser for Thrift (both the definition and binary format) simply because I needed one, and Prolog was convenient. What I expect pe", "context": "", "use_case": "Thrift parser", "switched_from": "", "story": "Prolog Coding Horror"}, {"id": 754309056, "item_id": 47144316, "url": "https://news.ycombinator.com/item?id=47144316", "by": "crustycoder", "date": "2026-02-24", "version": null, "stance": "recommend", "quote": "you can even run it directly in your browser as there's a WASM port", "excerpt": "Things have moved on since 1994, not only can you still embed it in C and a load of other languages, you can even run it directly in your browser as there's a WASM port. https://www.swi-prolog.org/pldoc/man?section=wasm-version", "context": "", "use_case": "", "switched_from": "", "story": "Extending C with Prolog (1994)"}, {"id": 754248784, "item_id": 47140549, "url": "https://news.ycombinator.com/item?id=47140549", "by": "sprior", "date": "2026-02-24", "version": null, "stance": "recommend", "quote": "The Prolog is pretty nice the way I can now specify predicates for MQTT topic paths", "excerpt": "I started using Prolog in my self written home automation system over 20 years ago. At first I was using CORBA and I linked ACE/Tao into SWI-Prolog so that Prolog could catch and send CORBA messages. That worked for years but was too annoying to add new message types since a wrapper had to be written for each, plus threading had to be coordinated between C++ and Prolog. Eventually I ditched the CORBA stuff and switch", "context": "built own home automation system", "use_case": "home automation logic", "switched_from": "", "story": "Extending C with Prolog (1994)"}, {"id": 734526464, "item_id": 45907904, "url": "https://news.ycombinator.com/item?id=45907904", "by": "eatsleepmonad", "date": "2025-11-12", "version": null, "stance": "recommend", "quote": "SWI is about 10,000 times faster than my implementation. It's a work of art!", "excerpt": "I recently implemented an eagerly evaluated embedded Prolog dialect in Dart for my game applications. I used SWI documentation extensively to figure out what to implement. But I think I had the most difficulty designing the interface between the logic code and Dart. I ended up with a way to add \"Dart-defined relations\", where you provide relations backed dynamically by your ECS or database. State stays in imperative ", "context": "built own embedded Prolog in Dart", "use_case": "Prolog reference and benchmark", "switched_from": "", "story": "Learn Prolog Now (2006)"}]}], "caveats": [], "who": [{"by": "sprior", "context": "built own home automation system", "url": "https://news.ycombinator.com/item?id=47140549", "date": "2026-02-24"}, {"by": "eatsleepmonad", "context": "built own embedded Prolog in Dart", "url": "https://news.ycombinator.com/item?id=45907904", "date": "2025-11-12"}], "tags": [], "use_cases": ["logic engine for agent harness", "thrift parser", "home automation logic", "prolog reference and benchmark", "prolog server interface"], "compared": [], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=45900978", "title": "Learn Prolog Now (2006)", "mentions": 4}, {"url": "https://news.ycombinator.com/item?id=47112148", "title": "Extending C with Prolog (1994)", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=49233423", "title": "Ask HN: What are you working on? (August 2026)", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48234252", "title": "Chess Invariants", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48173268", "title": "Prolog Coding Horror", "mentions": 1}], "sentiment_by_month": {"2025-11": {"neutral": 2, "recommend": 2}, "2025-12": {}, "2026-01": {}, "2026-02": {"recommend": 2}, "2026-03": {}, "2026-04": {}, "2026-05": {"recommend": 2}, "2026-06": {}, "2026-07": {}, "2026-08": {"neutral": 1}, "2026-09": {}, "2026-10": {}}, "versions": [], "version_unnamed": 0, "family_ref": null, "runs_on": null, "lines": [], "quotes": [{"id": 787904289, "item_id": 49244018, "url": "https://news.ycombinator.com/item?id=49244018", "by": "schmuhblaster", "date": "2026-08-10", "version": null, "stance": "neutral", "quote": "built on SWI Prolog\u2019s WASM version", "excerpt": "I\u2019ve been working on DeepClause [0], an agentic harness, the core of which is based on Prolog. Every interaction (conversation turn, plan, execute plan, etc.) triggers a small logic program that orchestrates one or more agent loops or prompts. All these programs are completely hackable, so you can easily adjust the core logic and behavior of your agents in a reliable manner. Also, instead of using markdown specs, you", "context": "", "use_case": "logic engine for agent harness", "switched_from": "", "story": "Ask HN: What are you working on? (August 2026)"}, {"id": 771867280, "item_id": 48241705, "url": "https://news.ycombinator.com/item?id=48241705", "by": "anthk", "date": "2026-05-22", "version": null, "stance": "recommend", "quote": "Just get Swi Prolog.", "excerpt": "A bit expensive. Just get Swi Prolog. https://www.swi-prolog.org/ The Simply Logical book as a start: https://book.simply-logical.space/src/simply-logical.html you can get a PDF just fine. Also, for hardcore mode, get paper and pen, I'm not kidding: (again, just use SWI Prolog): https://www.ida.liu.se/~ulfni53/lpp/bok/ Another approach. Scheme and Logic: S9 Scheme, get the bleeding edge version and compile it. Enough", "context": "", "use_case": "", "switched_from": "", "story": "Chess Invariants"}, {"id": 770838993, "item_id": 48177437, "url": "https://news.ycombinator.com/item?id=48177437", "by": "crabbone", "date": "2026-05-18", "version": null, "stance": "recommend", "quote": "Prolog was convenient", "excerpt": "I used Prolog twice in production, but none of them were what I'd expect to be the \"typical\" uses. 1. I used GoLog (a Prolog interpreted in Go) for defining some functional tests in the project where the testing infrastructure was otherwise written in Go. 2. I used Prolog (SWI) to write a parser for Thrift (both the definition and binary format) simply because I needed one, and Prolog was convenient. What I expect pe", "context": "", "use_case": "Thrift parser", "switched_from": "", "story": "Prolog Coding Horror"}, {"id": 754309056, "item_id": 47144316, "url": "https://news.ycombinator.com/item?id=47144316", "by": "crustycoder", "date": "2026-02-24", "version": null, "stance": "recommend", "quote": "you can even run it directly in your browser as there's a WASM port", "excerpt": "Things have moved on since 1994, not only can you still embed it in C and a load of other languages, you can even run it directly in your browser as there's a WASM port. https://www.swi-prolog.org/pldoc/man?section=wasm-version", "context": "", "use_case": "", "switched_from": "", "story": "Extending C with Prolog (1994)"}, {"id": 754248784, "item_id": 47140549, "url": "https://news.ycombinator.com/item?id=47140549", "by": "sprior", "date": "2026-02-24", "version": null, "stance": "recommend", "quote": "The Prolog is pretty nice the way I can now specify predicates for MQTT topic paths", "excerpt": "I started using Prolog in my self written home automation system over 20 years ago. At first I was using CORBA and I linked ACE/Tao into SWI-Prolog so that Prolog could catch and send CORBA messages. That worked for years but was too annoying to add new message types since a wrapper had to be written for each, plus threading had to be coordinated between C++ and Prolog. Eventually I ditched the CORBA stuff and switch", "context": "built own home automation system", "use_case": "home automation logic", "switched_from": "", "story": "Extending C with Prolog (1994)"}, {"id": 734526464, "item_id": 45907904, "url": "https://news.ycombinator.com/item?id=45907904", "by": "eatsleepmonad", "date": "2025-11-12", "version": null, "stance": "recommend", "quote": "SWI is about 10,000 times faster than my implementation. It's a work of art!", "excerpt": "I recently implemented an eagerly evaluated embedded Prolog dialect in Dart for my game applications. I used SWI documentation extensively to figure out what to implement. But I think I had the most difficulty designing the interface between the logic code and Dart. I ended up with a way to add \"Dart-defined relations\", where you provide relations backed dynamically by your ECS or database. State stays in imperative ", "context": "built own embedded Prolog in Dart", "use_case": "Prolog reference and benchmark", "switched_from": "", "story": "Learn Prolog Now (2006)"}, {"id": 734483968, "item_id": 45905248, "url": "https://news.ycombinator.com/item?id=45905248", "by": "dragonwriter", "date": "2025-11-12", "version": null, "stance": "recommend", "quote": "SWI-Prolog specifically provides a fairly straightforward JSON-based server mode", "excerpt": "If you really want something that takes Prolog strings instead (and want the full power of prolog), then there are bindings to prolog interpreters from many languages, and also SWI-Prolog specifically provides a fairly straightforward JSON-based server mode \"Machine Query Interface\" that should be fairly simple to interface with any language. https://www.swi-prolog.org/pldoc/man?section=mqi-overview", "context": "", "use_case": "Prolog server interface", "switched_from": "", "story": "Learn Prolog Now (2006)"}, {"id": 734469808, "item_id": 45904363, "url": "https://news.ycombinator.com/item?id=45904363", "by": "jll29", "date": "2025-11-12", "version": null, "stance": "neutral", "quote": "SWI-Prolog can also be linked against C/C++ code", "excerpt": "What you mean is not \"regex for Prolog\" but an embedded PROLOG interpreter, which exists. Ironically, the most common way I have seen people do this is use an embedded LISP interpreter, in which a small PROLOG is easily implemented. https://www.metalevel.at/lisprolog/ suggests Lisprolog (Here are some embedded LISPs: ECL, PicoLisp, tulisp) SWI-Prolog can also be linked against C/C++ code: https://stackoverflow.com/qu", "context": "", "use_case": "", "switched_from": "", "story": "Learn Prolog Now (2006)"}, {"id": 734447648, "item_id": 45902978, "url": "https://news.ycombinator.com/item?id=45902978", "by": "jodrellblank", "date": "2025-11-12", "version": null, "stance": "neutral", "quote": "SWI Prolog (specifically, see [2] again) is a high level interpreted language implemented in C", "excerpt": "Do you mean Northern Conservative Baptist Great Lakes Region Council of 1879 standard Prolog?[2] SWI Prolog (specifically, see [2] again) is a high level interpreted language implemented in C, with an FFI to use libraries written in C[1], shipping with a standard library for HTTP, threading, ODBC, desktop GUI, and so on. In that sense it's very close to Python. You can do everyday ordinary things with it, like comput", "context": "", "use_case": "", "switched_from": "", "story": "Learn Prolog Now (2006)"}]}