4 ms·
Can you tell us about the problem you've encountered in #3? I'm really interested
by bacteria 3y ago
Can you tell us about the problem you've encountered in #3? I'm really interested
- rhelz 3y agoI was writing a theorem prover for higher-order modal logic. All the theorem provers written in C or C++ were tens of thousands of lines, and even at that they had only a fraction of what I needed. What's more, they were all like 100 times *slower* at proving theorems which prolog could prove out of the box. So I decided to try to implement the features I needed on top of the theorem prover which prolog already is. Took me forever, but eventually it all came together like a thunderclap, and I was able to implement a theorem prover for quantified, higher-order modal logic which was amazingly-blazingly fast--in 67 lines of prolog. In terms of lines-of-code per day, its the least productive I've ever been :-)
- ngruhn 3y agoI guess this is rather category #2 than #3, but my favorite example is Advent of Code 2021, day 24: https://adventofcode.com/2021/day/24 https://adventofcode.com/2021/day/24. I think many people consider this one of the hardest AOC problems ever and at the time many people didn't even code up a complete solution but solved in manually (me included). However, with Prolog it's almost trivial. So many of Prologs strengths come together here: writing parsers, writing interpreters, solving integer constraints, and in particular "reasoning backwards".