I recently asked @grok about Prolog being useless incomprehensible shit for anything bigger than one page: Professionals write Prolog by focusing on the predicates and relations and leaving the execution flow to the interpreter. They also use the Constraint Logic Programming extensions (like clpfd) which use smart, external algorithms to solve problems instead of relying on Prolog's relatively "dumb" brute-force sear…
Learn Prolog Now (2006)
141–150 of 251 posts
Re: Learn Prolog Now (2006)
#142Earlier quoted context omitted.
Right, Python is usually the second-best choice for a language for any problem --- arguably the one thing it is best at is learning to program (in Python) --- it wins based on ease-of-learning/familiarity/widespread usage/library availability.
I don't know if I would say its second-best. It just happened to get really popular because it has relatively easy syntax, and Numpy is a really great library making all of those scientific packages that people were using Fortran and C++ for before available in an easier language. This boosted the language, right when data science became a thing, right when dynamic programming became popular, right when there was a b…
PS The big companies that actually make the LLMs, don't use Python (anymore). Its a lousy language for ML/AI. Its designed to script Linux GUIs and automate tasks. Its started off as a Perl replacement afterall. And this isn't a slight on the folks who write Python itself. It is a problem for all the folks who insist on slamming it into all sorts of places that it isn't well suited because they won't learn any CS.
Re: Learn Prolog Now (2006)
#143Earlier quoted context omitted.
human brains are insanely powerful pattern matching and shortcut-taking machines. There's very little brute forcing going on.
Your second sentence contradicts your first.
Just note: human pattern matching is not Haskell/Erlang/ML pattern matching. It doesn't go [1] through all possible matches of every possible combination of all available criteria
[1] If it does, it's the most powerful computing device imaginable.
Re: Learn Prolog Now (2006)
#144I've recently started modeling some of my domains/potential code designs in Prolog. I'm not that advanced. I don't really know Prolog that well. But even just using a couple basic prolog patterns to implement a working spec in the 'prolog way' is *unbelievably* useful for shipping really clean code designs to replace hoary old chestnut code. (prolog -> ruby)
Which is separate from the actual types in the code.
Which is separate from the deployment section of the docs.
Re: Learn Prolog Now (2006)
#145I remember writing a Prolog(ish) interpreter in Common Lisp in an 90's AI course in grad school for Theorem proving (which is essentially what Prolog is doing under the hood). Really foundational to my understanding of how declarative programming works. In an ideal world I would still be programming in Lisp and using Prolog tools.
> In an ideal world… I see this sentiment a lot lately. A sense of missed nostalgia. What happened? In 20 years, will people reminisce about JavaScript frameworks and reminisce how this was an ideal world??
Re: Learn Prolog Now (2006)
#146What kind of problems is Prolog helping to solve besides GOFAI, theorem proving and computational linguistics?
Prolog's constraint solving and unification are exactly what is required for solving type-checking constraints in a Hindley-Milner type system.
Re: Learn Prolog Now (2006)
#147The background image says "testing version" - is there a production version?
Re: Learn Prolog Now (2006)
#148Earlier quoted context omitted.
> "4. Prolog is good at solving reasoning problems." Plain Prolog's way of solving reasoning problems is effectively: for person in [martha, brian, sarah, tyrone]: if timmy.parent == person: print "solved!" You hard code some options, write a logical condition with placeholders, and Prolog brute-forces every option in every placeholder. It doesn't do reasoning . Arguably it lets a human express reasoning problems bet…
Its a Horn clause resolver...that's exactly the kind of reasoning that LLMs are bad at. I have no idea how to graft Prolog to an LLM but if you can graft any programming language to it, you can graft Prolog more easily. Also, that you push Python and JavaScript makes me think you don't know many languages. Those are terrible languages to try to graft to anything. Just because you only know those 2 languages doesn't m…
There would be MCP bindings to said server, which would be accessible upon request. The LLM would provide a message, it could even formulate Prolog statements per a structured prompt, and then await the result, and then continue.
Re: Learn Prolog Now (2006)
#149Hah. Found this book back at my dad's this past winter: https://imgur.com/a/CyG1E2P Had never heard of it before, and this is first I'm hearing of it since. Also had other cool old shit, like CIB copies of Borland Turbo Pascal 6.0, old Maxis games, Windows 3.1
Re: Learn Prolog Now (2006)
#150Earlier quoted context omitted.
What makes you think your brain isn't also brute forcing potential solutions subconciously and only surfacing the useful results?
Because I can solve problems that would take the age of the universe to brute force, without waiting the age of the universe. So can you: start counting at 1, increment the counter up to 10^8000, then print the counter value. Prolog: 1, 2, 3, 4, 5 ... You and me instantly: 10^8000