News for hackers. Stuff that matters.
Re:Dialogical logic programming by PaulHoule on Monday February 11, 2019 @01:30PM (#19136877)
It sounds like the compiler has an SMT solver built in; that is an NP-complete operation and could get slow if it has to solve something complex.

I like the idea though that time in programming languages is the root of very much evil. That is, the programmer must spend time thinking about what order to put the statements.

In many cases the order does not matter so it is wasted cognitive effort. In some cases it matters a great deal.

Re:Dialogical logic programming by adamnemecek on Monday February 11, 2019 @01:52PM (#19137154)
Check out this language called CHR

https://en.m.wikipedia.org/wiki/Constraint_Handling_Rules

It’s like prolog without the performance overhead thanks to the magic of linear logic.

Re:Dialogical logic programming by tom_mellior on Wednesday February 13, 2019 @04:58AM (#19151820)
What connection do you see between CHR and linear logic? I've never seen it described that way.

Anyway, the last time I needed to write a constraint solver in Prolog, I did try it in CHR, but it was way too slow for my needs, so I ended up rewriting it in plain SWI-Prolog. So from this one data point, I don't see where your assertion of "without the performance overhead" comes from.

I also found CHR's multiset semantics quite painful for my application, a lot of my rules had to be careful not to post duplicates of constraints. I would have loved having a single flag for telling the CHR system to just take care of that for me. That would have cleaned up my model and probably been more efficient as well. All of the above is qualified by the fact that I was a relative CHR newbie at the time.

Overall: CHR is quite interesting, but it's no magic silver bullet, and you seem to be overselling it.

Re:Dialogical logic programming by adamnemecek on Wednesday February 13, 2019 @10:35AM (#19153804)
Re:Dialogical logic programming by tom_mellior on Thursday February 14, 2019 @04:31AM (#19160692)
OK, yes, a "foundation" in the sense that researchers went and looked at already existing CHR and decided that its semantics was not as clear as it should be, and that it could be explained nicely in terms of linear logic. Not "the foundation" in the sense that the people initially designing CHR decided to base it on linear logic (unlike Wadler's work on linear type systems, say). Interesting, thanks. But this approach is hardly a way to achieve "[no] performance overhead thanks to the magic of linear logic".
Re:Dialogical logic programming by poizan42 on Monday February 11, 2019 @03:23PM (#19137920)
It is SAT that is NP-complete. SMT may be undecidable depending on your theories.