←back to thread

Learn Prolog Now

(lpn.swi-prolog.org)
205 points rramadass | 3 comments | | HN request time: 0s | source
Show context
ecshafer ◴[] No.45902617[source]
I really enjoyed learning Prolog in university, but it is a weird language. I think that 98% of tasks I would not want to use Prolog for, but for that remaining 2% of tasks it's extremely well suited for. I have always wished that I could easily call Prolog easily from other languages when it suited the use case, however good luck getting most companies to allow writing some code in Prolog.
replies(2): >>45902720 #>>45903229 #
1. rootnod3 ◴[] No.45902720[source]
That is where Lisp or Scheme weirdly shines. It is incredibly easy to add prolog to a Lisp or a Scheme. It’s almost as if it comes out naturally if you just go down the rabbit hole.

“The little prover” is a fantastic book for that. The whole series is.

replies(1): >>45902885 #
2. ecshafer ◴[] No.45902885[source]
I worked through the little scheme but not the little prover, I think Ill take a look at that. Thanks.
replies(1): >>45903335 #
3. rootnod3 ◴[] No.45903335[source]
One can of course add the same stuff to other languages in form of libraries and stuff, but lisp/scheme make it incredibly easy to make it look like part of the language itself and make seem a mere extension of the language. So you can have both worlds if you want to. Lisp/scheme is not dead.

In fact, in recent years people have started contributing again and are rediscovering the merits.