> To be honest, at the moment such problems are too rare to justify learning Prolog. But I don’t believe that this has to remain so. And then the whole following section on unfulfilled potential.. Is there any reason to believe the paradigm will somehow come into its own in the future? The way this question was addressed by the article was way too wishy-washy for my taste.
Why Learn Prolog in 2021?
71–80 of 171 posts
Re: Why Learn Prolog in 2021?
#72Earlier quoted context omitted.
I'm curious about this as well, though in a more general sense than just PLs. There are already so many modern/useful things I want to learn that it's hard to justify learning something because it's 'beautiful' or purely intellectually stimulating.
> hard to justify learning something because it's 'beautiful' or purely intellectually stimulating. You might be surprised to find out that "because it's 'beautiful' or purely intellectually stimulating" is the essence of the 'Hacker' ethos for which this site is named. The Y Combinator itself is something that fits this description quite perfectly. You will never use the y combinator in practice, and it likely won't…
Is it? I thought hacking was more (Or at least also) focused on exploration and making things work [0].
A Y-combinator doesn't really seem to fall into "'beautiful' or purely intellectually stimulating" either [1]. It seems like something that has practical value, as it enables recursion.
I also don't think all these things are mutually exclusive. I find consensus algorithms to be quite fascinating and they also seem to have massive practical value, which is why I want understand them more deeply and perhaps implement one.
[0] https://en.wikipedia.org/wiki/Hacker_culture
[1] https://stackoverflow.com/questions/93526/what-is-a-y-combin...
Re: Why Learn Prolog in 2021?
#73I've wondered this a few times myself - I like learning languages (even if not directly applicable to paid work) and Prolog has been on the list, but I wonder if the concepts are better left on their own rather than packaged into a DSL. If I understand constraint propagation and backtracking, why not just use those concepts when it fits the problem rather than an entirely new language meant specifically for that narr…
https://old.reddit.com/r/ProgrammingLanguages/comments/9kb9z...
I have worked on and with Mercury for about 10 years. I had very little logic programming experience before this, while others tend to learn Prolog first.
I like Mercury, but not for the logic programming features, in practice they aren't used very often, there's not many parts of a program that require backtracking. So on reflection, I don't think it's something I'd include in a new language, it's not worth the implementation and maintenance costs. Not for most programs most of the time anyway.
On learning logic programming: It might sound like I'm discouraging anyone interested in this, far from it. Logic programming is a great paradigm to learn, another conceptual tool in your toolbox etc.
Re: Why Learn Prolog in 2021?
#74Not having to deal with "how do I read a csv file in prolog?" and such, frees time for richer ideas, like prolog search is a poor fit for most problems, but prolog is a nice language for writing problem-appropriate search.
Re: Why Learn Prolog in 2021?
#75How 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 another language with basically the exact same mental model behind them is not as worthy to spend time on. But learning a language with an entirely different paradigm is really eye opener and will make you a better programmer even if you’ll never write a line of code in it. For example, learning Haskell is a really good way to learn about FP and then you can easily apply it in a not strictly FP language. Pro…
Back when I worked at Google, one of my colleagues (Jeremy) did some Bayesian inference on "1% experiment" results, where he needed to see which observations matched a complex hypothesis and complex rules for the context.
So, Jeremy found it easiest to think about the problem in terms of Prolog, and wrote some Python objects whose constructors defined these rules. He also whipped up a memoizing backtracking engine that effectively lazily generated a DFA over experiment observations.
He talked and thought in terms of Prolog, because that's the mental tool that he used, but the programming tool was Python.
Interesting guy, that Jeremy. He used to do cacao price forecasting for Mars (Mars Bar/M&Ms). He also enjoyed craft beer and carving pumpkins with chainsaws.
We also worked in the same (NYC) office with Fergus Henders, who in grad school wrote Mercury, a statically typed dialect of Prolog with an optimizing native code compiler.
Re: Why Learn Prolog in 2021?
#76Earlier quoted context omitted.
I agree. For me it also came with a huge down side. I spent the last six to seven years using Scala, learning FP concepts, getting familiar with Haskell and it's concepts as well as other functional languages. This is after 7+ years prior doing lots of typical Java, Javascript, PHP which I was quite happy to use. Now I'm in the situation after learning languages which provide far more useful day to day principals, ab…
> 4-5 years ago there was a reasonable strong enthusiasm for Scala and functional programmers in general. No, I've been looking to change jobs for the past year and absolutely nothing has popped up. I think businesses have weighted the power/capability of scala against the relative lack of easily hireable programmer for them. If a business makes themself dependent on one (or a few) key scala programmers, they are mor…
Re: Why Learn Prolog in 2021?
#77Earlier quoted context omitted.
Learning another language with basically the exact same mental model behind them is not as worthy to spend time on. But learning a language with an entirely different paradigm is really eye opener and will make you a better programmer even if you’ll never write a line of code in it. For example, learning Haskell is a really good way to learn about FP and then you can easily apply it in a not strictly FP language. Pro…
I agree. For me it also came with a huge down side. I spent the last six to seven years using Scala, learning FP concepts, getting familiar with Haskell and it's concepts as well as other functional languages. This is after 7+ years prior doing lots of typical Java, Javascript, PHP which I was quite happy to use. Now I'm in the situation after learning languages which provide far more useful day to day principals, ab…
I think there are professional opportunities doing FP in Haskell/functional Scala, though they are few and far between and in certain industries such as fintech or other areas where correctness matters more. Your best bet is to look for a remote position and keep your eyes peeled (at least, that's my strategy!).
Re: Why Learn Prolog in 2021?
#78Re: Why Learn Prolog in 2021?
#79How 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…
I am learning Prolog because I think I have an idea that I believe might actually be easily solved by Prolog instead of hacking it in some other language. I personally believe in learning paradigms of programming as far more important than languages. Prolog presents the very unique logic programming paradigm. Learning new paradigms always feels a bit mind-bending to me. Edit: Actually, my last statement may be only i…
[0] https://en.wikipedia.org/wiki/Oz_%28programming_language%29
[1] https://en.wikipedia.org/wiki/Concepts,_Techniques,_and_Mode...
Re: Why Learn Prolog in 2021?
#80Earlier quoted context omitted.
Learning another language with basically the exact same mental model behind them is not as worthy to spend time on. But learning a language with an entirely different paradigm is really eye opener and will make you a better programmer even if you’ll never write a line of code in it. For example, learning Haskell is a really good way to learn about FP and then you can easily apply it in a not strictly FP language. Pro…
I agree. For me it also came with a huge down side. I spent the last six to seven years using Scala, learning FP concepts, getting familiar with Haskell and it's concepts as well as other functional languages. This is after 7+ years prior doing lots of typical Java, Javascript, PHP which I was quite happy to use. Now I'm in the situation after learning languages which provide far more useful day to day principals, ab…