4 ms·
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 d
by anentropic 3y ago
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
- _a_a_a_ 3y agoI have no idea if this is even remotely correct, but perhaps MiniKanren could be called the Pascal of the logic programming world?
- will_byrd 3y agoI think that's a fair comparison. I have always loved Pascal, BTW!
- will_byrd 3y agoI 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.
- usgroup 3y agoIf 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.
- usgroup 3y agoCould 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.