One interesting development recently is a load of research into, reverse engineering of and emulation of the 1986 Sega AI Computer[1], which used prolog under the hood for mostly educational software. Unfortunately it does not seem there is a way to actually write some prolog for the thing today :(
Ask HN: What's Prolog like in 2024?
11–20 of 289 posts
Re: Ask HN: What's Prolog like in 2024?
#12Earlier quoted context omitted.
could you please expand on it? i would love to read more
Many many languages that you will encounter and use in live projects are primarily imperative, eg: C, C++, JavaScript. The describe the "how" and "in what order". While I was an undergrad I was exposed to Standard ML and Prolog, both of which were/are much more about declarative "what", though they could only practically interact with the actual world by side-effects and some imposed ordering (SML's 'ref', Prolog's c…
Re: Ask HN: What's Prolog like in 2024?
#13Re: Ask HN: What's Prolog like in 2024?
#14I would check out Markus Triska's work to have your mind blown:
Re: Ask HN: What's Prolog like in 2024?
#15Re: Ask HN: What's Prolog like in 2024?
#16Related areas like constraint programming are still very relevant.
Re: Ask HN: What's Prolog like in 2024?
#17Re: Ask HN: What's Prolog like in 2024?
#18Not quite what you asked for, but as someone using it quite a lot back in the late '80s during a CS&AI degree, Prolog has its interesting features and I'm glad I used it, but I haven't missed it since. I do like declarative stuff, eg CSS!, and that remains a good memory.
could you please expand on it? i would love to read more
In an introductory prolog course you will soon find that when a prolog program is written to solve some problem like 'whats-the-next-chess-move' it's actually doing a depth first (and if you use the ! cut-operator, it will stop looking for any more solutions).
But in principle, it's up to the interpreter/compiler to decide how to find solutions. In the same way that a C compiler might say "ah, you're doing tail-recursion, let me make a loop out of that", a prolog compiler might say "gee, this problem looks like it would be much more efficient to use simulated annealing to find some answers in a shorter time". That's perhaps a bit far-fetched, but a great example is Datalog which has solvers that parallelize the search. You don't write a parallel algorithm, it's just that a parallel algorithm is used to solve your problem.
A specific feature I miss in other programming approaches is that if you can find the answer to the question "is A a child of B?", the very same code is also the function to find out all of A's children, or all of B's parents. No need to explicitly code a loop, or to create the inverse function.
Re: Ask HN: What's Prolog like in 2024?
#19Prolog has reached an exciting new milestone with Scryer prolog. It is the first highly performant open source iso-compliant Prolog. I would check out Markus Triska's work to have your mind blown: https://www.metalevel.at/prolog https://youtube.com/@thepowerofprolog
Re: Ask HN: What's Prolog like in 2024?
#20Definitive reference: https://www.urbanautomaton.com/blog/2015/08/10/the-pledge-to...
Fuckin' A.