4 ms·
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 regula
by tunesmith 7y ago
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...
- carapace 7y agoYou are in luck my friend! Tau Prolog: A Prolog interpreter in JavaScript http://tau-prolog.org/ 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.
- rscho 7y agohttp://www.pathwayslms.com/swipltuts/html/index.html http://www.pathwayslms.com/swipltuts/html/index.html https://www.swi-prolog.org/pldoc/doc_for?object=section(%27packages/jpl.html%27) https://www.swi-prolog.org/pldoc/doc_for?object=section(%27p... https://pengines.swi-prolog.org/docs/index.html https://pengines.swi-prolog.org/docs/index.html SWI prolog has all you need, and more! Shameless plug for smalltalkers (hobbyist work in progress): https://github.com/Rscho314/pengines_smalltalk https://github.com/Rscho314/pengines_smalltalk
- ianandrich 7y agoSWI Prolog also has the ability to provide a simple endpoint for querying prolog dynamically provided by the Pengines library. https://github.com/Anniepoo/JavaPengine https://github.com/Anniepoo/JavaPengine Querying is straightforward. It's simply another service in your web stack if you go this route.