[1] https://github.com/jasonhemann/microKanren
[2] https://mitpress.mit.edu/books/reasoned-schemer-second-editi...
[3] https://www.youtube.com/watch?v=irjP8BO1B8Y&ab_channel=Cloju...
[4] https://www.youtube.com/watch?v=y1bVJOAfhKY&t=10s&ab_channel...
And remember this language for when, after you know Prolog, you start to see how it applies nicely to parts of everything you write, but it completely unsuitable for solving the entirety of almost any problem.
I'd be happy to try to explain anything you found confusing.
Perhaps this online tutorial would be a helpful start:
Personally, while I did some Lisp back in university and was reasonably conversant in it at the time, nowadays whenever something nontrivial is presented in Lisp, it’s just too much mental overhead to get back into it, in addition to trying to understand the thing that is being presented.
Terminology like “logic variable” also needs to be explained, if you want to address an audience that isn’t already familiar with logic programming.
I think python is the most common and simple language with majority of devs would understand for concepts learning, but it is likely too slow for practical applications.
First it says "== unifies two terms". Then the first example says "(== x z) (== 3 y)" associates x with z and y with 3. Are "unify" and "associate" the same thing? Why use different words? Why does the association reverse for x and z vs 3 and y? Is it commutative?
For example you could start with two facts like "Fedora is red." and "Cat is green." Then if you ask the system "X is red." it'll tell you "X = fedora". If you ask it to list all the solutions of "X and Y are not the same color." it'll list "X = fedora, Y = cat" and "X = cat, Y = fedora". This process of binding variables to values (or other variables during simplification) is unification.
(== x x) = x for all x
It is commutative: (== x y) = (== y x) for all x and y
It is idempotent: (== x (== x y)) = (== x y) for all x and y
And it is associative: (== x (== y z)) = (== (== x y) z)
It's not transitive, e.g. if we unify pairs (using made up syntax [a, b]) then (== [x, 1] [2, y]) = [2, 1]
(== [2, y] [z, 3]) = [2, 3]
(== [x, 1] [z, 3]) does not unify (since 1 does not unify with 3)From the submitted page, "The core language, using Scheme as the host language, is described in this short, interactive tutorial."
Really---anything short of that is sub-optimal performance. I think some of it comes from new eyes reading and pointing out room for improvement. The other half is someone having the time to figure out the fix and implement it.