logoalt Hacker News

Prolog Coding Horror

74 pointsby RohanAdwankaryesterday at 9:15 PM25 commentsview on HN

Comments

schmuhblastertoday at 2:29 AM

As someone who has developed a somewhat weird obsession with Prolog, I can highly recommend Markus Triska's other articles on Prolog. His article on meta-interpreters [0] was particularly inspiring for me.

[0] https://www.complang.tuwien.ac.at/ulrich/prolog_misc/acomip....

rtpgyesterday at 10:56 PM

There's something quite illuminating with this first "horror", where they basically say "it's OK to report wrong answers, because you can check the answers".

I don't think I've ever felt like it's OK for my program to provide a list of answers where some are right and some are wrong, but reading this... and generally believing in P != NP.... maybe that's a decent way of looking at some stuff!

show 1 reply
appilyesterday at 10:13 PM

What do people use Prolog for in the real world? I learned about it on a university course and it seems so esoteric compared to other things on the course. Like something invented just for computer scientists to enjoy.

show 3 replies
mmastracyesterday at 11:59 PM

If you want to understand prolog, you must understand the four-port model:

https://grack.com/writing/school/enel553/report/prolog.html

show 1 reply
txhwindtoday at 3:09 AM

now we may have a more powerful "Prolog" - LLM Agent, though not precise and correct somtimes.

crustycoderyesterday at 10:10 PM

Mostly overblown.