News for hackers. Stuff that matters.
Re:Adventure in Prolog Tutorial (2016) by tunesmith on Sunday August 25, 2019 @03:50PM (#20795084)
I love the idea of prolog, but I'm stumped when I try to imagine integrating it into other web-based projects. Is there a way? Like for instance having a regular javascript frontend, and a JVM based backend like with spring or play, integrating logic programming and prolog somehow?

Or more generally, now that you know prolog, what kind of real-life things do you find it useful for? I mean I've seen all the tutorials of it solving sudoku and logic puzzles, but...

Re:Adventure in Prolog Tutorial (2016) by rscho on Sunday August 25, 2019 @07:20PM (#20796296)
Re:Adventure in Prolog Tutorial (2016) by carapace on Sunday August 25, 2019 @05:48PM (#20795819)
You are in luck my friend!

Tau Prolog: A Prolog interpreter in JavaScript

http://tau-prolog.org/

> Tau Prolog is a Prolog interpreter fully implemented in JavaScript. While most online interpreters are remote servers with an installed version of the interpreter which receive code, execute it and return the results, Tau Prolog is fully implemented on JavaScript and the code is analysed and parsed on the client side.

> Tau Prolog is not just an implementation of the logic programming resolution mechanism, but a complete Prolog interpreter. Furthermore, the implementation of this interpreter has been directed by the ISO Prolog Standard.

As for what I find it useful for, see the sibling comment for details.

Re:Adventure in Prolog Tutorial (2016) by ianandrich on Monday August 26, 2019 @12:54PM (#20801452)
SWI Prolog also has the ability to provide a simple endpoint for querying prolog dynamically provided by the Pengines library.

https://github.com/Anniepoo/JavaPengine

Querying is straightforward. It's simply another service in your web stack if you go this route.