core-logic

2020-05-03T16:25:55.032700Z

Are there any good resources for learning core logic? I'm looking to translate a prolog sudoku CLP rule to clojure.

2020-05-04T07:48:09.033Z

The reasoned schemer is probably the main one. There are some minor differences to core logic, but they’re mainly just syntactic ones.

2020-05-04T07:49:23.033300Z

Also the core.logic unit tests… iirc there is a sudoku solver as an example in there

EmmanuelOga 2020-05-06T05:33:19.033500Z

I don't really understand the reasoner schemer and the rest of the books on that series

EmmanuelOga 2020-05-06T05:34:23.033700Z

I thought it was supposed to be a way to teach difficult concepts in a way that "anybody could understand them", starting "from the beginning" and just putting some effort behind...

EmmanuelOga 2020-05-06T05:34:40.033900Z

I find those books assume a HUGE amount of pre-existent knowledge

EmmanuelOga 2020-05-06T05:35:43.034100Z

I determined that the best way to learn core.logic will probably have to be to learn prolog first, since there seems to be at least a couple of... normal books to learn from 🙂

EmmanuelOga 2020-05-06T05:37:01.034300Z

maybe some other resource on http://minikanren.org/ could be useful but I haven't gone through the avalanche of links yet.

EmmanuelOga 2020-05-06T05:37:54.034500Z

https://mitpress.mit.edu/books/art-prolog-second-edition looks promising

2020-05-06T10:37:09.035Z

I personally really like the reasoned schemer and the other books in the series. Each panel builds on the last, and I don’t think they require much prior knowledge (beyond perhaps some of the little schemer, or a rough familiarity with a lisp e.g. clojure). I think the problem with those books isn’t so much that they assume any pre existing knowledge about logic programming; you can and should I think really read them without a computer… It’s more that they don’t tell you anything about why you should care, or how to apply it in practice… or even really what each chapter is teaching you. However, I also happened to have learned prolog 20 years ago, so :man-shrugging: Regardless the art of prolog is a great book; though you’ll probably want to learn minikanren as its own thing too. Many examples won’t translate directly.

porkostomus 2020-05-03T22:13:48.032800Z

This looks like it might help: https://github.com/daveray/logic-99