Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My take on miniKanren is that it's implementation is designed to be small and hackable. Especially small with microKanren. If you don't know scheme/lisp, but want to roll your own for educational purposes, then check this out: https://codon.com/hello-declarative-world

Vs Prolog, the emphasis in miniKanren is on constraint programming --- especially writing new constraints to extend it to more problems. Where (chief variants of) Prolog have been optimized in various ways for certain types of problems.

See Will Byrd's answer here: https://stackoverflow.com/questions/28467011/what-are-the-ma...

What I read about Datalog is that it is basically a recursive relational database. It's set up for "deductive queries". This wording reminds me of miniKanren --- but the Kanrens are Turing complete.

Ah, Wikipedia has this to say:

In contrast to Prolog, Datalog,

1.) disallows complex terms as arguments of predicates, e.g., p (1, 2) is admissible but not p (f (1), 2),

2.) imposes certain stratification restrictions on the use of negation and recursion,

3.) requires that every variable that appears in the head of a clause also appears in a nonarithmetic positive (i.e. not negated) literal in the body of the clause,

4.) requires that every variable appearing in a negative literal in the body of a clause also appears in some positive literal in the body of the clause[4]

I'd have to put some thought into checking this list against the capabilities of miniKanren. Generally it doesn't ring any bells.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: