The main feature of ASP that I like is the ability to handle Now, ASP is not a full-fledged language but instead should be viewed as a workable pure-logic based notation for expressing some kinds of problems. In particular negation is handled really well. Its not easy to learn but is well worth the effort.
Why Learn Prolog in 2021?
121–130 of 171 posts
Re: Why Learn Prolog in 2021?
#122I'm not convinced there's great utility in smart contracts, but if there is, I think there's a huge utility in contracts being declarative and statically typed, to avoid many of the problems we've seen with existing contracts. In that case, a statically typed Prolog dialect would be a good starting point. The contract would be a set of declarative rules describing acceptable next states of the contract. To make the c…
Similarly down this path I found Factor. A different approach but supports backtracking. https://factorcode.org/
Re: Why Learn Prolog in 2021?
#123Re: Why Learn Prolog in 2021?
#124I used prolog in anger when I first started at a startup some years ago (why that was is another story) and while I found it interesting, it was really quite an ineffective experience for me. Firstly, by being so declarative if was very easy to end up with O(a^n) algorithms by mistake and secondly I found, at least in what I was doing, that for example the ordering of declarations would change program behaviour which…
I had the same problem when trying out Haskell: they give abstractions that are not constant multipliers in terms of speed or memory usage compared to a low level solution (like garbage collection and dynamic typing). Rust gives just the opposite type of abstraction over C++: memory safety without adding any unpredictability in execution (and of course updates in the language design). While relational algebra (SQL) i…
Haskell I can't comment on, though I can totally see that happening there, there might be better means of managing complexity and giving hints to actual implementation.
With prolog the means of expression seems capable only of posing the 'question' rather than indicating that it should be not be implemented in the most naive possible way.
As interesting and mind-bending a language as prolog is I just couldn't get past that and it has made me think it's just not a practical language to use for anything real. But I am happy to be proven wrong!
Re: Why Learn Prolog in 2021?
#125Prolog implementations are too heavily reliant on the stated order of predicate rules in order to make execution progress. Many predicates are non-terminating or extremely inefficient when faced with goal inversion, but are often 'fixed' by simply reversing the order of some of its rules (but making it useless in the original direction in the process). This is disappointing when trying to maximize prolog's biggest po…
Re: Why Learn Prolog in 2021?
#126How do you guys think about the opportunity cost of learning dead/dying/new/unpopular languages? Even with newer languages that are gaining popularity and are likely to be used in the future, I struggle to justify the time investment. I could be wrong but some of my concerns are: - my time is better spent getting deeper into some more popular language that I already know to some extent - unused skills deteriorate wit…
Learning an esoteric language is as valuable as learning anything else: it’s as challenging and as mind opening as you’re willing to stray. If you’re just exploring another language with the same paradigms you’re used to, you’re just playing in a sandbox. If you’re trying something that feels novel, that has different primitives and constructs and workflows, you might learn new ways to think about using your more com…
Sorry for ranting and unfairly picking your post for replying, but I'm a little bit disappointed to see the clueless and roundabout reaction of HNers here who, rather than sticking to the topic of Prolog, see stories like this as an invitation to advertise their fringe language, their not-quite-Prolog language, or their personal pet peeve.
Re: Why Learn Prolog in 2021?
#127When I hear "Prolog", it reminds me of the quote about Prolog: "The elegant solution is not efficient. The efficient solution is not elegant"
Re: Why Learn Prolog in 2021?
#128Please improve the style of your webpage. It seems to just serve up the text directly, leading to far too many characters per line, and making it extremely difficult to read. Ideally your line length should be somewhere around 70 to 90 characters.
Re: Why Learn Prolog in 2021?
#129When I hear "Prolog", it reminds me of the quote about Prolog: "The elegant solution is not efficient. The efficient solution is not elegant"
Re: Why Learn Prolog in 2021?
#130To save you a click: - Because the author likes it. - Because it's different. - Because very few other people like it. Is this really an effective pitch to students who are looking for an efficient way to use their limited resources?