Live data from Hacker News

The Power of Prolog

metalevel.at

1–10 of 69 posts

Re: The Power of Prolog

#4
Prolog is the only language that I've ever learned that feels like magic. Of course, it's not, but it feels like that. I'm still learning it, but I feel it and the logic paradigm are underused. I wonder if it's fair to consider it constraint-based programming rather than just logic programming. I used the book Thinking as Computation to learn it (and still am), and that's what it felt like we were doing in the book: just setting up constraints for the program to run through and find matches for the constraints.

Re: The Power of Prolog

#5
This is one of the best resources for learning modern Prolog. It mainly uses Scryer Prolog, which is a still-in-progress open source Prolog system, but very promising and adheres to the ISO standard.

Re: The Power of Prolog

#6
post #4

Prolog is the only language that I've ever learned that feels like magic. Of course, it's not, but it feels like that. I'm still learning it, but I feel it and the logic paradigm are underused. I wonder if it's fair to consider it constraint-based programming rather than just logic programming. I used the book Thinking as Computation to learn it (and still am), and that's what it felt like we were doing in the book:…

It's criminally underused, and it's a weird blind spot for software developers to have. My input on this is that our primary working tool, a programming language, is so powerful and wide that (within the limits of computability) it can literally do anything; therefore we are less likely to question the paradigm or look for a different one, even when it would be more suited to the problem at hand.

Re: The Power of Prolog

#7
post #4

Prolog is the only language that I've ever learned that feels like magic. Of course, it's not, but it feels like that. I'm still learning it, but I feel it and the logic paradigm are underused. I wonder if it's fair to consider it constraint-based programming rather than just logic programming. I used the book Thinking as Computation to learn it (and still am), and that's what it felt like we were doing in the book:…

> I wonder if it's fair to consider it constraint-based programming rather than just logic programming

Prolog III is considered the origin of constraint logic programming: http://www.prolog-heritage.org/en/ph30.html

Re: The Power of Prolog

#8
post #6
post #4

Prolog is the only language that I've ever learned that feels like magic. Of course, it's not, but it feels like that. I'm still learning it, but I feel it and the logic paradigm are underused. I wonder if it's fair to consider it constraint-based programming rather than just logic programming. I used the book Thinking as Computation to learn it (and still am), and that's what it felt like we were doing in the book:…

It's criminally underused , and it's a weird blind spot for software developers to have. My input on this is that our primary working tool, a programming language, is so powerful and wide that (within the limits of computability) it can literally do anything; therefore we are less likely to question the paradigm or look for a different one, even when it would be more suited to the problem at hand.

Prolog is a deep language and can teach so you a lot. The main problem is that any prolog program bigger than, say, a thousand lines of code become difficult to debug and understand. There are ways to make things better e.g. avoid impure prolog etc. but it is still problematic.

Engineers are always looking for technologies to hop onto. Prolog is niche for a reason: I don’t think Prolog scales. In some ways it is too flexible and powerful.

Re: The Power of Prolog

#9
post #6
post #4

Prolog is the only language that I've ever learned that feels like magic. Of course, it's not, but it feels like that. I'm still learning it, but I feel it and the logic paradigm are underused. I wonder if it's fair to consider it constraint-based programming rather than just logic programming. I used the book Thinking as Computation to learn it (and still am), and that's what it felt like we were doing in the book:…

It's criminally underused , and it's a weird blind spot for software developers to have. My input on this is that our primary working tool, a programming language, is so powerful and wide that (within the limits of computability) it can literally do anything; therefore we are less likely to question the paradigm or look for a different one, even when it would be more suited to the problem at hand.

indeed, a LOT of problems boil down to satifiability problems that are super easily expressed in PROLOG. I was recently musing about some of the problems with "automated" ffmpeg processing of obscure files (things like realvideo, etc), because there are a lot of edge cases in terms of filters that can't work on X color space or whatever, and the obvious solution that presented itself was a prolog rules/knowledge base that "understands" the conversion process and finds appropriate filters to put together a chain between some arbitrary input and output tuples.

Re: The Power of Prolog

#10
I'm not an enthusiast of real world applications of prolog, I saw a prolog project fail and get rewritten in Cpp

But! I'm forever grateful for the things learning prolog did to my brain

Post reply on HN