core-logic

2017-07-31T16:02:31.879863Z

Not really. Many of the examples out there outdated, and few of them are written by people who have a strong understanding of core.logic. I don’t see much new being written, since for the most part core.logic has been abandoned. Being a core.* project with JIRA and the whole clojure process behind it means it’s unlikely that it will get significant contributions

2017-07-31T17:02:02.929785Z

@swizzard I am currently learning it too, maybe we can discover stuff together ;) defne, as I understood it, is just a short form for defn + matche

swizzard 2017-07-31T17:02:34.948755Z

@norman why has it been abandoned? is there a better alternative?

2017-07-31T17:02:41.952870Z

Nope

2017-07-31T17:02:55.961353Z

You could consider it basically done

swizzard 2017-07-31T17:03:01.964213Z

ok

2017-07-31T17:03:07.967659Z

Although there’s lots more that could be done if anyone cared

2017-07-31T17:03:48.991444Z

I think the bigger problem is that it’s a technology without much of a clear use.

2017-07-31T17:04:25.012695Z

At one point I considered possibly writing a core.logic book

2017-07-31T17:04:45.023767Z

So then I went out trying to find other people using core.logic in real applications

2017-07-31T17:05:01.033111Z

And I really couldn’t find anyone besides us using

swizzard 2017-07-31T17:05:04.034871Z

hm

2017-07-31T17:05:27.048520Z

Maybe more people would use it if they understood it

2017-07-31T17:05:29.049376Z

🙂

swizzard 2017-07-31T17:06:00.066761Z

ha, perhaps

2017-07-31T17:06:43.090332Z

As you’ve discovered, the reasoned schemer approach to learning core.logic isn’t great

2017-07-31T17:15:57.396542Z

at one point rackspace's managed security was using or planning on using core.logic, but I haven't seen them asking about it in a while so they may have changed it up

2017-07-31T17:17:46.456906Z

I can't imagine any of the clojure teams I've worked with letting something written in core.logic through code review. The first comment would be "this would be clearer if you used map / filter / etc"

2017-07-31T17:25:07.708465Z

We use core.logic because it’s the cleanest/clearest way to write complex queries.

2017-07-31T17:25:22.717111Z

The abstraction you can get is really great

2017-07-31T17:25:45.730030Z

We have non-clojurists writing core.logic queries and they don’t even know it

2017-07-31T17:26:09.743682Z

sure

2017-07-31T17:26:46.764757Z

But we’ve worked really hard to give them good abstractions

2017-07-31T17:26:52.768347Z

the initial introduction of core.logic is a tough hill to climb

2017-07-31T17:27:24.786860Z

because at the beginning what you are doing isn't so complicated, so it seems like you could just do it with map and filter and whatever, and it would be easier for people to follow

2017-07-31T17:27:48.800164Z

I mean, 95% of what we are using it for could honestly be done with datalog

2017-07-31T17:27:54.803802Z

except the queries would be brutal

2017-07-31T17:28:23.820379Z

the seq library is some kind of local maxima, and it takes a bunch of energy to get to something else

2017-07-31T17:29:26.857822Z

I don't think a lot of teams can do it (as I've said none of the teams I've been on seemed to want to spend energy in that way)

2017-07-31T17:29:43.867580Z

which is a shame (for core.logic and other things)

2017-07-31T17:32:31.967370Z

I’d like to think there are good use cases for core.logic besides ours…

2017-07-31T17:33:22.997376Z

sorry, I think I am not being clear, I 100% think core.logic is a better for a lot of cases

2017-07-31T17:35:11.060010Z

but it doesn't get used because programmers aren't willing to expend extra energy to escape the local maxima(the seq library) to get to something better

2017-07-31T17:46:38.450791Z

I don’t know clojure developers like that.

2017-07-31T17:47:29.480138Z

But if I can’t tell them practical things they can do with core.logic, I can’t criticize them much for not using it

2017-07-31T17:53:37.693887Z

I want to use it to write a type checker, maybe you can help? I saw the basic type checker example, and I am wondering how I can get type errors from my program instead of ()

2017-07-31T17:57:46.842561Z

use conde

2017-07-31T17:58:06.854004Z

the type terms unify or add this error to a list of error messages

2017-07-31T18:01:07.965700Z

(I guess you'd want conda instead maybe)

2017-07-31T18:02:54.030258Z

Ok, that goes in the direction what I thought too, gonna try that

2017-07-31T18:04:05.072010Z

I read that conda is a non relational goal, what does that imply?

2017-07-31T18:20:05.622570Z

I haven't used conda much, but if I recall it is committed choice

2017-07-31T18:21:16.663939Z

with conde all the arms are tried in "parallel", but conda only the first arm with the first goal that succeeds will be tried

2017-07-31T18:21:58.688163Z

which would make sense here, I think, if the type terms unify you don't care about building up a list of errors

2017-07-31T18:38:28.269241Z

Right, also confirms my expectations, was just worried it might have a performance impact or something

urbank 2017-07-31T19:29:49.995408Z

Is there still a plan to completely port it to clojurescript?