6 ms·
> Arguably, the imperative programming paradigm is a more natural fit with the von Neumann computer architecture Prolog's lack of popularity suggests that view
by roenxi 8y ago
> Arguably, the imperative programming paradigm is a more natural fit with the von Neumann computer architecture
Prolog's lack of popularity suggests that viewing a computer program as a pure (first order predicate) logic construct isn't a powerful way of thinking in general. That is a bit of a blow to all the programmers who seem to secretly want to be mathematicians because that in turn suggests that the logical aspects of programming are subordinate to hardware realities.
I've gotten a lot of joy out of the Neural Networking fad similarly eclipsing the logic-based AI people. Logic is important and it isn't going away, but reality has too much uncertainty for simple logic to work in practice. The statistically grounded approach makes me happier, and again computer hardware's power is overwhelming the efforts of the logicians to tie everything down to certainties.
Great language though, everyone should take a look at it to see what a different programming model might be.
- jononor 8y ago> Logic is important and it isn't going away, but reality has too much uncertainty for simple logic to work in practice. The statistically grounded approach makes me happier, and again computer hardware's power is overwhelming the efforts of the logicians to tie everything down to certainties. http://incompleteideas.net/IncIdeas/BitterLesson.html http://incompleteideas.net/IncIdeas/BitterLesson.html takes this even further, suggesting that even the statistically grounded, human-enriched approaches are loosing way to simpler methods fuel by hardware advances.
- sgt101 8y agoI think we've got about 12 years of that left. There are three hardware waves coming: 1. In about 12 years we will have another "tick" of general purpose compute doubling. This will happen as sensible, known architectural changes and the slowed progress of Moores type hardware development come together. 2. We will have a wave of hetrogenous and specialist hardware architectures that will bump things along. 3. The hardware manufactures will crack and license / sell servers on a core/hour basis. This will allow people to burst compute on 100's or 1000's of cores without the always on capital commitment. This won't impact on the cloud providers but will provide on prem with a lease of life and allow people who can't migrate to the cloud due to legacy etc an escape hatch. After that, I see a real choke on compute progress; expect a doubling every 50 years at best. The current "Moores" rate is 20 years, but that's based on the current investment fat industry. Once investors get there heads around the technology realities I expect all the cash to come out of chip making really quick. Innovation will crash stop. At that point it's going to be software or bust for AI. I predict software...
- jolmg 8y ago> Prolog's lack of popularity suggests that viewing a computer program as a pure (first order predicate) logic construct isn't a powerful way of thinking in general. No... it doesn't suggest that. If there's one thing I've learned all these years I've learned about various different softwares and languages, it's that popularity does not correlate with power. I'll take Linux over Windows, Archlinux over Ubuntu, Haskell over Java, i3 over Gnome, CLI over GUI, vim and shell over IDEs like Eclipse. I've seen "modern" popular languages adopt features from "obsolete" unpopular languages in ways that pale with the originals, like Python's lambdas and assignment unpacking, which suck. The rest of your post notwithstanding, I disagree with the logic of your first sentence.
- nerdponx 8y agoOut of curiosity, what don't you like about Python's packing/unpacking?
- Something1234 8y agoIf I had to say anything I would guess that the number you unpack has to match the number of things returned rather than being a head and tail.
- OJFord 8y agoNot GP, but it's _very_ limited. Off the top of my head, things you can't do: # nested unpacking (a, b), c = ((1, 2), 3) # destructuring arguments (lambda (a, b): None)((1, 2))
- SirScrambly 8y agoFor your second example, you need to unpack your parameters. (lambda x, y: None)(*(1, 2)) Unless you're saying you should be able to define the set size you pass in.
- OJFord 8y agoYes, it was an example of something you _can't_ do.
- nerdponx 8y ago> Prolog's lack of popularity suggests that viewing a computer program as a pure (first order predicate) logic construct isn't a powerful way of thinking in general. That is a bit of a blow to all the programmers who seem to secretly want to be mathematicians because that in turn suggests that the logical aspects of programming are subordinate to hardware realities. Of course it's powerful. The problem is that it's far removed from, and in many cases in conflict with, how computers actually perform computation.
- TimTheTinker 8y agoNot everyone needs a language to run close to the metal. SQL is equally declarative, but still very popular.
- TimTheTinker 8y agoProlog may suffer from a lack of popularity, but I'd argue that's not because it's lacking in power as a means of expressing an idea. Nor is it due to a hardware paradigm mismatch. Lisp and its variants (especially Clojure) enjoy increasing popularity for all sorts of general-purpose use. Lisp is merely a particular notation for expressing lambda calculus, and is rather far removed from the realities of Von Neumann hardware. I'd argue Prolog's demise is due to three facts: (a) the sorts of ideas best expressed in Prolog have diminished due to new languages becoming available, (b) the remaining ideas best expressed in Prolog are only applicable to a narrow set of problems, and (c) Prolog itself isn't the most ergonomic language to use, so it isn't often people's first choice when alternatives are available.
- SOLAR_FIELDS 8y agoCan you elaborate with an example or two? I’ve always been fascinated by Prolog and thought of it as a language that is very well suited to a specific class of problems. It would be interesting to know what class of problem Prolog excels at and why newer languages or new features in existing languages can do what only Prolog did before.
- TimTheTinker 8y agoI'm afraid I can't -- sorry. I'm not a Prolog practitioner. My above observations are just culled from what I've read over the years. I suspect some kinds of expert systems remain best implemented using some Prolog. Perhaps someone who uses Prolog regularly can chime in.
- blihp 8y agoYou don't even have to look at recent languages... probably the best example of (a) is SQL. SQL arrived a couple of years after Prolog in the 70's, but over the decades SQL has absolutely dominated. Unfortunately for Prolog, SQL provides much of the same functionality while also having the advantage of being a more natural fit for business applications which drove adoption. (and quite likely directly hurt Prolog's prospects)
- slifin 8y ago
- deleted 8y ago[deleted]
- zephyrfalcon 8y agoConsidering how fashion-driven the programming world is, popularity (of the lack of it) of a language or technology says very little about how powerful it is. Prolog's way is very powerful, it's just very different from just about every other language out there, which makes it hard to learn and harder to master. (As an aside, in my experience, people who believe that "programming == math" seems to be mostly attracted to languages like Haskell and OCaml, not so much to Prolog.)
- TimTheTinker 8y ago> people who believe that "programming == math" seems to be mostly attracted to languages like Haskell and OCaml, not so much to Prolog Agreed, but note Lisp also is very math-oriented (it’s a syntax for lambda calculus).
- chriswarbo 8y agoScheme strives to be; but "Lisp" in general includes a whole bunch of imperative and effectful stuff (e.g. all the looping constructs in Common Lisp). Lots of that could be implemented via lambdas and recursion, but it could also be implemented by any other Turing-complete system.
- cannabis_sam 8y ago>that in turn suggests that the logical aspects of programming are subordinate to hardware realities. Why do you think it suggests this?
- otabdeveloper2 8y agoProlog isn't really about pure logic constructs. Prolog is really a database query language. Similar to SQL or GraphQL. Prolog failed because it never got integrated into a serious enterprise data storage engine. (Most Prolog implementations are just text files and in-memory hash tables.)
- justincormack 8y agoI thought Datalog did get integrated into some "proper" storage engines. It is a subset of Prolog, and expressively more like SQL, and designed for query optimisation etc. It was certainly taken seriously for databases for quite a while.