Love the links to SWISH playground: really got me to want to try it out!
The Simplicity of Prolog
71–80 of 134 posts
Re: The Simplicity of Prolog
#72Earlier quoted context omitted.
I'm not riled up, I even upvoted your OP, but it's uncouth to drop a quote without any context as a reply to a comment. Of course there's going to be misunderstandings. I didn't remember that quote from O'Keefe. Prolog is indeed not trying to be smart and SLD-Resolution is dead simple - it's a sound and complete deductive inference system with a single rule. The reason Prolog is in turn so simple is because, thanks t…
TBH, I don't remember where I first read it, but it's all over the web xD. This is all just a misunderstanding: since I knew you were a Prolog expert, I assumed you would recognize my (botched) quote and the context. Yeah, I understand it as: 'better to keep it simple and understandable'
Re: The Simplicity of Prolog
#73I have a long standing love affair with Prolog and frustration for its failure to grow. Prolog has poor features for abstraction and is actually not declarative enough! Prolog's limitations can be great for starting to get the paradigm but then you hit a wall. (Kind of like standard Pascal!) Mercury and Curry fix some of these limitations as does miniKanren. Integrating CLP is important yet so far always clumsy as st…
Respectfully have to disagree. Prolog has the best features for abstraction of any language I've used, I suspect it may be near an optimal fixed point for metaprogramming expression[3]. I will say the other side of that wall is breathtaking. Also not sure what you mean, CLP is a first class consideration in many Prologs, esp Scryer Prolog. Check these crazy demos out: [1] https://youtu.be/h5Xy4YjCZxM [2] https://yout…
Re: The Simplicity of Prolog
#74Earlier quoted context omitted.
That's the oldest complaint in the book about Prolog: "it's not 100% declarative". OK. So use Java. Or C. You think you'll have more declarative fun writing a Zebra Puzzle solver in C, than in Prolog? Be my guest. No, the truth is that Prolog is a unique language that is almost perfectly poised between the two extremes of beautiful but unusable formal purity and everyday programming utility. Prolog makes pragmatic ch…
my criticism cuts to the chase. that's why you write such a lengthy rebuttal. cause it hurts your feelings. > So use Java. Or C. You think you'll have more declarative fun writing a Zebra Puzzle solver in C, than in Prolog? and that, my dear friendo, is _whataboutism_!
Re: The Simplicity of Prolog
#75I liked the authorization example. I've encountered Prolog articles before, but showing the code alongside an OOP implementation was a nice demonstration of its expressive power. As a follow-up, I'd love to learn how this auth system could be put into production. In this example, authorization rules are provided in the code (`user_role(mike, supervisor)`) and queried similarly. What if I wanted this system to expose…
Re: The Simplicity of Prolog
#76Earlier quoted context omitted.
SWI Prolog 7 added "X = Dict.key" syntax and that use of "." makes it fundamentally incompatible, ISO standard breaking, backwards incompatible to previous Prologs, sideways incompatible to other Prologs. This is a worse sin in Prolog than it seems at a glance, because one of the strengths Prolog has is code-is-data / data-is-code metaprogramming. That includes exporting code as Prolog terms (use cases you might use…
> [...] might [...] might [...] might [...] might [...] might [...] All of what you say is true, and yet practical applications that did break are somehow not talked about quite as much as hypothetical applications that might have broken. SWI could reuse infix dot precisely because it was universally considered bad style to use it in the old style, and hence was not used in the old style. Which is not to say that I t…
I am not aware of any practical applications which have broken, but then I'm not aware of anyone using Prolog for anything, anywhere.
Re: The Simplicity of Prolog
#77In a long forgotten past a large part of my graduation was Prolog (I was as far ahead then as i'm behind now with the ol' AI thing; I worked on mixing neural nets, reasoning with uncertainty with Prolog at the time) and, after hallucinatory episodes living, sleeping, (day)dreaming in Prolog for months on end, when something was finished I was always so surprised how clean, readable and 'too little' the code looked fo…
I really wish there was "regex for prolog", ie: when pounding away in JavaScript be able to do: let options = { foo: 1, bar: 2, ... } ```prolog $X :- fromJson( options ) Solution = Optimize( $X ) ... ``` ...like writing a whole web app in prolog sounds terrifying (same as writing a whole web app in regex), but recognizing and having some excellent interop between "modes" is obviously useful for regex, sometimes sql i…
Re: The Simplicity of Prolog
#78Re: The Simplicity of Prolog
#79I have a long standing love affair with Prolog and frustration for its failure to grow. Prolog has poor features for abstraction and is actually not declarative enough! Prolog's limitations can be great for starting to get the paradigm but then you hit a wall. (Kind of like standard Pascal!) Mercury and Curry fix some of these limitations as does miniKanren. Integrating CLP is important yet so far always clumsy as st…
How does MiniKanren fix some limitations? MiniKanren corresponds to the purely relational subset of Prolog.
Re: The Simplicity of Prolog
#80Earlier quoted context omitted.
How does MiniKanren fix some limitations? MiniKanren corresponds to the purely relational subset of Prolog.
By allowing you to use the features of the host language to complement the features of miniKanren. Having good support for multiple programming paradigms is better than trying to make one paradigm fit all needs. Poplog[1] was an earlier attempt to provide such synergies but it failed to gain market share. It's now free software so take a look! The Racket ecosystem is another approach where each module can choose a la…