News for hackers. Stuff that matters.
Re:Differences Between miniKanren and Prolog by anentropic on Tuesday January 23, 2024 @12:11PM (#39106195)
I can't speak to the relative usefulness, performance etc of the two paradigms... but:

> MiniKanren is not a general purpose programming language

and

> you do find ... implementations of mini or micro Kanren in every language

could easily be positives - the idea of being able to do a bit of "logic programming" in your regular language is appealing

My impression is it's fully intended to be implemented as a library in other languages and no one expects there to be a dedicated "commercial grade" MiniKanren interpreter

Re:Differences Between miniKanren and Prolog by will_byrd on Tuesday January 23, 2024 @01:14PM (#39107236)
I agree.

Much of the success of miniKanren has been due to it not trying to be an Everything Language.

The most pragmatic variant of miniKanren, core.logic in Clojure, was popular because it didn't try to replace Clojure's behavior in general. Clojure programmers don't want to write a web server or financial application in a logic language, but might want just a bit of miniKanren-like reasoning in part of their application.

As pointed out by @giraffe_lady, pragmatic core.logic-like small embedded domain-specific language implementations in other popular languages would be useful.

The original motivation for miniKanren was to have a small, simple, easy to learn/teach/hack implementation of logic programming that could be taught to students learning functional programming in Scheme. microKanren in particular seems to have nailed this, especially since you can wrap macros around microKanren primitives to get miniKanren, and since microKanren can easily be implemented an almost any language. Once again, the fact that miniKanren and microKanren don't try to do everything is probably a key reason for their success from a teaching standpoint.

Re:Differences Between miniKanren and Prolog by usgroup on Tuesday January 23, 2024 @06:19PM (#39111380)
If you know of a few serious applications of miniKanren in the wild, it would be great to see. I also like the idea of logic programming as a library but I’ve seen enough Prolog to know that making logic programming viable takes a sophisticated interpreter, and I’ve yet to see Kanren indispensable to an application.
Re:Differences Between miniKanren and Prolog by _a_a_a_ on Tuesday January 23, 2024 @01:21PM (#39107349)
I have no idea if this is even remotely correct, but perhaps MiniKanren could be called the Pascal of the logic programming world?
Re:Differences Between miniKanren and Prolog by will_byrd on Tuesday January 23, 2024 @02:12PM (#39108126)
I think that's a fair comparison. I have always loved Pascal, BTW!
Re:Differences Between miniKanren and Prolog by usgroup on Tuesday January 23, 2024 @06:31PM (#39111498)
Could be a positive but is it? What does a non-toy problem requiring a bit of logic programming look like? Perhaps a routing or a scheduling problem? Would you not use a MIP or a constraint solver for that? They are typically callable from host languages.

Too easy and you don’t need logic programming, a bit harder and you reach for proper solvers, so where does embedded logic programming fit?

Prolog takes the view — and mostly exists in the wild — as primarily a non embedded general purpose language. For some applications — eg a stock exchange or an airline booking service — it makes a lot of sense. You could write a web service in Prolog and then call it from other services not written in Prolog.