8 ms·
To playing well with Python, this was on a front page some time ago: https://arxiv.org/abs/2308.15893 https://arxiv.org/abs/2308.15893 "The Janus System: Multi
by klibertp 2y ago
To playing well with Python, this was on a front page some time ago: https://arxiv.org/abs/2308.15893 https://arxiv.org/abs/2308.15893
"The Janus System: Multi-paradigm Programming in Prolog and Python"
- mark_l_watson 2y agoHey, thanks! That looks cool.
- philzook 2y agoI 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/164297d87f67202e5906d03a5b07d6ff7ce75ef9 https://github.com/philzook58/prologsolvers/tree/164297d87f6... You need to install swi prolog https://www.swi-prolog.org/download/stable 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(%27packages/janus.html%27) 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)."))
- nextos 2y agoOn 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 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.