The Power of Prolog
21–30 of 69 posts
Re: The Power of Prolog
#22The rete algorithm was supposed to be a solution but has anyone applied rete to a prolog implementation yet?
Re: The Power of Prolog
#23Earlier quoted context omitted.
On the other hand, with dozens of lines of Prolog you can solve some problems that would take many thousands of lines in other languages (and a lot of calm study before you can map them into a real logic or imperative algorithm). I still avoid it, because yeah, once you solve that problem and avoid those thousands of lines, you are stuck. If you try make the rest of your system in Prolog, it will become a non-viable…
There was a functional JVM language with built-in datalog that came through the other day. Datalog brings a lot of the value of pure prolog.
Re: The Power of Prolog
#24Prolog is cool but has exponential complexity which makes it impractical for real world use. The rete algorithm was supposed to be a solution but has anyone applied rete to a prolog implementation yet?
Re: The Power of Prolog
#25Earlier quoted context omitted.
Prolog is a deep language and can teach so you a lot. The main problem is that any prolog program bigger than, say, a thousand lines of code become difficult to debug and understand. There are ways to make things better e.g. avoid impure prolog etc. but it is still problematic. Engineers are always looking for technologies to hop onto. Prolog is niche for a reason: I don’t think Prolog scales. In some ways it is too…
Are there any Prolog scripting engines or embeddable runtimes? It feels like the kind of thing where you might use it to solve a small part of your problem domain and leave the rest to a conventional language.
Javascript: http://tau-prolog.org/
Java: https://apice.unibo.it/xwiki/bin/view/Tuprolog/ (also SWI, Ciao and Sicstus have Java bridges)
Go: https://github.com/ichiban/prolog
Common Lisp: https://www.cliki.net/Prolog
Racket: https://docs.racket-lang.org/racklog/
Guile: https://gitlab.com/gule-log/guile-log
Erlang: https://github.com/rvirding/erlog
Also SWI and Ciao have a pretty straight forward FFI for C.
Re: The Power of Prolog
#26Earlier quoted context omitted.
Are there any Prolog scripting engines or embeddable runtimes? It feels like the kind of thing where you might use it to solve a small part of your problem domain and leave the rest to a conventional language.
Off the top of my head: Javascript: http://tau-prolog.org/ Java: https://apice.unibo.it/xwiki/bin/view/Tuprolog/ (also SWI, Ciao and Sicstus have Java bridges) Go: https://github.com/ichiban/prolog Common Lisp: https://www.cliki.net/Prolog Racket: https://docs.racket-lang.org/racklog/ Guile: https://gitlab.com/gule-log/guile-log Erlang: https://github.com/rvirding/erlog Also SWI and Ciao have a pretty straight forwar…
https://github.com/tau-prolog/tau-prolog/blob/master/RELEASE...
this looks handy https://github.com/tau-prolog/tau-prolog/issues/295
Re: The Power of Prolog
#27Prolog is the only language that I've ever learned that feels like magic. Of course, it's not, but it feels like that. I'm still learning it, but I feel it and the logic paradigm are underused. I wonder if it's fair to consider it constraint-based programming rather than just logic programming. I used the book Thinking as Computation to learn it (and still am), and that's what it felt like we were doing in the book:…
What scenarios have you used it for?
That said, I used it for a simple game AI at university. My AI was the best of the class and it was something like 30 LOC. I remember thinking I would have spend 5x more time writing the same thing in C instead of 1 hour (plus some tests and play session)
Re: The Power of Prolog
#28Re: The Power of Prolog
#29Re: The Power of Prolog
#30Earlier quoted context omitted.
Prolog is a deep language and can teach so you a lot. The main problem is that any prolog program bigger than, say, a thousand lines of code become difficult to debug and understand. There are ways to make things better e.g. avoid impure prolog etc. but it is still problematic. Engineers are always looking for technologies to hop onto. Prolog is niche for a reason: I don’t think Prolog scales. In some ways it is too…
Are there any Prolog scripting engines or embeddable runtimes? It feels like the kind of thing where you might use it to solve a small part of your problem domain and leave the rest to a conventional language.