SWI-Prolog 10.0.0 released
40 points by aarroyoc
40 points by aarroyoc
OT: Can we create a tag for logic-programming where we can tag articles for prolog, datalog and the ilk?
create a tag proposal, here's an example: https://lobste.rs/s/uxim1u/tag_proposal_self_hosting
Hah, nice, their WASM playground will make it much easier for me to bore people with my Prolog demo :D
(Just doing a couple of father predicates and a grandfather rule.)
Hmm, just tried the WASM playground with one of my files and it gives different answers to the local version 9.2.9 I have. Most peculiar. (The swish one linked below does give the correct answer but that's 9.3.36.)
Will have to try the v10 once it makes it to Arch packages.
Is there a historical reason why answer set programming (implemented by e.g. clasp) is (seemingly) so much less popular than for example prolog or datalog?
In the academic world, from my POV (don't have any data), ASP is currently a more active field of research than both Prolog and Datalog. But I think it's less popular for the average developer not just because ASP is much newer than Prolog (1972 vs 1999) but because when Prolog appeared the amount of programming languages was smaller and Prolog was ported to quite a few systems, like DOS (Turbo Prolog, Prolog II), VAX, etc. ASP has a few advantages over Prolog but it's way less flexible as a general programming language, which Prolog manages to d And even in the field of just solving some problems, sometimes Prolog with clpz/clpfd can still be faster than ASP (some benchmarks in this slides)
IMO ASP's lack of flexibility is in many ways its main advantage over Prolog. ASP is quite expressive for things that are actually "shaped like" constraint problems, but it doesn't bend over backward like Prolog does to embed procedural programming affordances inside logic programming. As a result, you organically find yourself writing the non-constraint-y bits of your logic in Python, then calling out to the ASP solver via the Python bridge once you've extracted the purely constraint-y core of whatever problem you're trying to solve. This used to be super awkward, but these days it feels pretty smooth in my experience – the Python API for interacting with the solver has improved a ton since I first started using ASP. Maybe there'd be proportionally more ASP adoption outside academia if this was more widely known?