I am quite pleased with the ability to easily use prolog from within python and vice versa. It makes it now one of the easiest and most expressive solvers to plug into for my tastes. I'm starting to accumulate useful solvers here https://github.com/philzook58/prologsolvers/tree/164297d87f6...
You need to install swi prolog https://www.swi-prolog.org/download/stable and pip install janus_swi
A simple example to get started: https://www.swi-prolog.org/pldoc/doc_for?object=section(%27p...
import janus_swi as janus
janus.consult("path", """
edge(a,b).
edge(b,c).
edge(c,d).
:- table path/2.
path(X,Y) :- edge(X,Y).
path(X,Y) :- edge(X,Z), path(Z,Y).
""")
list(janus.query("path(a,Y)."))
Re:Ask HN: What's Prolog Like in 2024?
by mark_l_watson on Thursday July 18, 2024 @10:46AM
(#40996060)
Hey, thanks! That looks cool.
On the topic of multi-paradigm programming, including logic programming, Oz/Mozart is an obligatory mention. See CTM and http://mozart2.org/mozart-v1/doc-1.4.0/tutorial/index.html.
The authors were fairly prominent Prolog researchers. It's sad Van Roy is retiring and nobody is taking this forward. AliceML, a StandardML dialect inspired by Oz is also abandonware.
"The Janus System: Multi-paradigm Programming in Prolog and Python"