| ▲ | Prolog Coding Horror(metalevel.at) |
| 45 points by RohanAdwankar 3 hours ago | 13 comments |
| |
|
| ▲ | mmastrac 9 minutes ago | parent | next [-] |
| If you want to understand prolog, you must understand the four-port model: https://grack.com/writing/school/enel553/report/prolog.html |
|
| ▲ | rtpg an hour ago | parent | prev | next [-] |
| 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! |
| |
| ▲ | Zarathustra30 13 minutes ago | parent | next [-] | | I've actually run into this in the wild, with regards to sales forecasting. A program we were using returned zero if the error bars on a forecast were over 100%. For example, selling somewhere between 1 and 7 units, but averaging 3. Returning 3 was "wrong", but infinitely more correct than retuning 0. | |
| ▲ | hedora 36 minutes ago | parent | prev | next [-] | | The article server is offline, but I assume they found out that prolog rule evaluation depends on the order the rules are presented in the program. If so, the language they thought they were using (and that they should actually use) is datalog, not prolog. Datalog has declarative semantics: All facts that are derivable from the base database and the rules will be derived by the interpreter, and it will not add extra hallucinated facts. If that's not true, it's a bug in the runtime, not in the language. | |
| ▲ | DonHopkins an hour ago | parent | prev [-] | | Sometimes the Biorhythm program on my Apple ][ failed to produce correct answers. But it sure was great for impressing cool hippie chicks. https://www.youtube.com/watch?v=jYoY1cwAd90 |
|
|
| ▲ | appil 2 hours ago | parent | prev | next [-] |
| 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. |
| |
| ▲ | radomir_cernoch 2 hours ago | parent | next [-] | | Some applications were discussed in https://news.ycombinator.com/item?id=40994552 | |
| ▲ | bmitch3020 30 minutes ago | parent | prev | next [-] | | 20+ years ago, it was the backend for the business rules engine that processed various logging and monitoring events. The concept was interesting, the performance was terrible, and businesses mostly didn't want to touch it. After I setup clients with a generic set of rules that worked on Prolog facts, most all of my clients were happy to limit their changes to only those fact files. | |
| ▲ | christophilus 2 hours ago | parent | prev [-] | | Dunno about Prolog, but Datomic uses datalog for its query language, and it’s excellent. Datalog is a subset of Prolog. | | |
| ▲ | ted_dunning an hour ago | parent | next [-] | | Datalog may appear to be a subset, but it is quite distinct semantically. | |
| ▲ | raffael_de an hour ago | parent | prev [-] | | What is Datalog used for nowadays? | | |
| ▲ | AlotOfReading 26 minutes ago | parent [-] | | Other than databases, program analysis. The polonius borrow checker in rustc uses datalog internally. But you can use it for lots of things. Whenever I'm frustrated with graph based tools being slow (like build systems), I run the graph through a datalog engine for comparison. It's usually much, much faster. |
|
|
|
|
| ▲ | crustycoder 2 hours ago | parent | prev [-] |
| Mostly overblown. |