News for hackers. Stuff that matters.
Re:What Is miniKanren? by adamgordonbell on Thursday January 02, 2025 @10:53AM (#42575478)
Request: I'd love to learn more logic programming, SAT solvers, and equation solvers, but in a language I'm familiar with. Maybe python? But where to start?

I played with some Scala mini Karen implementations before, but the ones I tried were all half-baked or non-working.

Re:What Is miniKanren? by will_byrd on Thursday January 02, 2025 @10:56AM (#42575503)
You might find Chris Mungall's py-typedlogic interesting:

https://py-typedlogic.github.io/

Re:What Is miniKanren? by adamgordonbell on Thursday January 02, 2025 @11:07AM (#42575630)
Thanks! And thanks for miniKanren and reasoned schemer!
Re:What Is miniKanren? by debugnik on Thursday January 02, 2025 @11:20AM (#42575768)
If you're interested in SMT solvers, the Z3 bindings for Python are very easy to use.
Re:What Is miniKanren? by sn9 on Friday January 03, 2025 @03:30PM (#42589190)
Hillel Wayne is working on a Logic for Programmers book [0] that might be what you're looking for.

[0] https://leanpub.com/logic

Re:What Is miniKanren? by hwayne on Friday January 03, 2025 @05:02PM (#42589907)
The chapters on both constraint solvers and logic programming are pretty short overviews, we're talking less than 15 pages. I wouldn't recommend it if that's what you're specifically interested in.

For SAT/SMT in Python, I've heard this book is pretty good: https://theory.stanford.edu/~nikolaj/programmingz3.html. Google OR-tools has a Python frontend and they have interactive tutorials (https://developers.google.com/optimization/examples). I don't know about logic programming in Python. Note that while there's some overlap between logic programming and constraint solving ([1] [2]), the communities are pretty independent from each other. Different histories, tools, techniques, etc.

[1]: https://www.swi-prolog.org/pldoc/man?section=clpfd

[2]: http://picat-lang.org/picatbook2015.html