Fork me on GitHub
#core-logic
<
2017-07-27
>
swizzard00:07:31

hi all, i’m working my way through the reasoned schemer with core.logic; i’ve read https://github.com/clojure/core.logic/wiki/Differences-from-The-Reasoned-Schemer, but i’m still a little confused?

swizzard00:07:25

specifically by the use of the non-prefixed cond, e.g.:

swizzard00:07:04

also, i’m not sure how to get conde to properly evaluate:

norman00:07:31

(run* [q] (conde [fail succeed] [succeed fail]))

norman01:07:43

@swizzard The book examples aren’t really great in isolation. I’d have to check my copy of the book when I get home to see the context of this.

norman01:07:07

But the above is how to run an equivalent core.logic conde

swizzard16:07:23

when/why would you use lcons instead of just list?

norman16:07:55

I don’t think I’ve ever used lcons

norman16:07:10

Probably you’d just use it when trying to do examples from minkanren

swizzard16:07:05

@norman that’s kind of what i assumed, but wanted to be sure, thanks 🙂

norman17:07:36

We (ThreatGRID) have probably one of the only production apps with a signficant core.logic component, so I’m heavily biased towards the practical things

swizzard17:07:26

i hope you don’t get annoyed by me asking a bunch more dumb questions, because i’m only on chapter 2 of TRS

norman17:07:40

That’s 2 more chapters than most 🙂

swizzard17:07:04

i have vague dreams of using CLP and maybe rete to build an “is my rpg breakable?” tester

swizzard17:07:14

so i figure i need to actually understand logic programming first