News for hackers. Stuff that matters.
Re:Learn Prolog Now by 33a on Sunday March 22, 2015 @12:28PM (#9247312)
A lot of UI programming patterns are much easier to express in a constraint programming language. Things like data binding don't exist in logic programming, since they are captured by constraints. It is also easier to do common tasks like position elements in a way which reacts nicely due to resizing a viewport, etc.

Today constraint solving is still confined to a lot of niche applications like physics engines or CAD systems, but I keep hoping for the day that someone will build a more integrated system which makes it easier for anyone to grab constraints and plug them in where it makes sense.

Re:Learn Prolog Now by Animats on Sunday March 22, 2015 @01:48PM (#9247613)
Prolog isn't a numerical constraint solver.

I once had to write a menu system in Turbo Prolog. Not fun. Totally the wrong tool for the job. Prolog isn't that useful when you have to cause an action, as opposed to computing a result.

Re:Learn Prolog Now by abathologist on Sunday March 22, 2015 @03:16PM (#9247875)
Have you used any of the numerical constraint solving libraries available for many Prolog implementations?[1] (It is also worth noting that Turbo Prolog is a rather peculiar—and now rather old—take on Prolog. I believe it has been superseded by Visual Prolog).

[1]: e.g., SWI Prolog's http://www.swi-prolog.org/pldoc/man?section=clpfd, or http://www.swi-prolog.org/pldoc/man?section=clpqr

Re:Learn Prolog Now by ufo on Sunday March 22, 2015 @04:28PM (#9248093)
Another issue for prolog is that many of these "constraint solving" problems will lead to exponential-time algorithms in the worst case, specially if you use a naive implementation. Because of this, its common to use more specialized solvers (linear programming, SAT, ILP, SMT, etc) instead of a general logic-programming one.
Re:Learn Prolog Now by stephencanon on Sunday March 22, 2015 @01:44PM (#9247599)
Autolayout (iOS and OS X layout engine) is built on a constraint solver.