14 ms·
I've been trying to push myself to learn Prolog, using this book, because Prolog seems like a very elegant way of modeling the interactions between business rul
by throwaway2380 6y ago
I've been trying to push myself to learn Prolog, using this book, because Prolog seems like a very elegant way of modeling the interactions between business rules, compared to the bespoke functions I typically write during web app jobs.
I have no complaints about the book, but I've been struggling to figure out an easy setup for "Prolog as a web app backend." Typical Prolog implementations are not designed to be used as concurrently-accessed databases. Datalog seems to be a nearby technology that is more pointed towards that use case, but even then, there seem to be scant few implementations of Datalog databases with transaction support, and near zero that are open source.
RDF/OWL databases seem to be another conceptually-near possibility, but they also seem to have few implementations that are prepared for high-scale concurrent access.
Overall, it seems that there is a decent amount of interest in "logic-type" query languages as a curiosity, but little attention to implementations that support use in OLTP business applications, which makes adoption difficult.
Does anybody have any advice?
- 7532yahoogmail 6y agoAgree - rules engines are legion in commercial envs and a decent language or accessible non Java reit engine is something on my shopping list too.
- jlarocco 6y agoI'm also curious about this, and what "real world" Prolog actually look like. On one hand, I think the paradigm really simplifies some things, but then on the other hand, everything else (aka routine programming tasks) seems much more convoluted and awkward. I think PAIP may have been on to something, embedding Prolog in Lisp, but that's less elegant and more difficult in most other languages.
- pbh101 6y agoI recently participated in an online Prolog class by Anne Ogborn. It utilized SWI-Prolog [2] and SWISH [3], and mentioned Pengines [4] for web. I haven't used it personally, but that is the pointer I have for Prolog + web. [1] https://twitter.com/AnnieTheObscure https://twitter.com/AnnieTheObscure [2] https://www.swi-prolog.org/ https://www.swi-prolog.org/ [3] https://swish.swi-prolog.org/ https://swish.swi-prolog.org/ [4] https://pengines.swi-prolog.org/docs/index.html https://pengines.swi-prolog.org/docs/index.html [5] http://pathwayslms.com/swipltuts/ http://pathwayslms.com/swipltuts/ [6] https://www.youtube.com/watch?v=JmOHV5IlPyU https://www.youtube.com/watch?v=JmOHV5IlPyU
- slifin 6y agoMaybe checkout one of these databases: - https://www.datomic.com/ https://www.datomic.com/ - https://opencrux.com/ https://opencrux.com/ - https://github.com/replikativ/datahike https://github.com/replikativ/datahike - https://github.com/tonsky/datascript https://github.com/tonsky/datascript
- YeGoblynQueenne 6y agoSwi-Prolog, a popular, free and open source implementation of Prolog, has good support for web development. The Swi-Prolog website itself is written using Swi-Prolog's http libraries. There are a couple of tutorials listed under Tutorials > Web applications on the website. Probably the place to start is: Tutorial — Creating Web Applications in SWI-Prolog http://www.pathwayslms.com/swipltuts/html/index.html http://www.pathwayslms.com/swipltuts/html/index.html