News for hackers. Stuff that matters.
Re:Web Programming in SWI Prolog (2019) by carapace on Friday February 21, 2020 @10:38AM (#22383852)
Also check out Anne Ogborn's tutorial "Creating Web Applications in SWI-Prolog" http://www.pathwayslms.com/swipltuts/html/

Following that I made a very simple ("hello world" simple) server that serves Tau Prolog ( http://tau-prolog.org/ ) to the client and establishes a websocket connection between them.

It's here FWIW: https://git.sr.ht/~sforman/yrad-nettles (WARNING: it's not meant for public consumption, I think it might be broken at the moment because I was experimenting with serving prolog scripts like js scripts when I stopped working on it... I'm putting it out here in case you want to try to glean some insight from it. I was looking over it myself just now and I forget a lot about how it's supposed to work, so read it alongside Anne's tutorial, if at all. Cheers! Also, I should mention it depends on a whole different project, an implementation of Joy programming language, to actually do anything, because it's meant to act as a remote shell/UI for that language hosted in a Prolog server. So, yeah... you're gonna want to comment that out.)

Re:Web Programming in SWI Prolog (2019) by ipnon on Friday February 21, 2020 @10:59AM (#22384072)
While web programming in Prolog has been insightful, I think there are more expedient areas of application for the language.

Prolog is especially underutilized in databases.

Re:Web Programming in SWI Prolog (2019) by chekovcodes on Friday February 21, 2020 @01:21PM (#22385386)
This is a database written in Prolog: https://github.com/terminusdb/terminus-server - albeit with a RUST storage engine - prolog's lack of types means there are better storage solutions, but for constraint logic, it's unbeatable.
Re:Web Programming in SWI Prolog (2019) by ipnon on Friday February 21, 2020 @01:50PM (#22385644)
A statically typed logic language would be ideal for both
Re:Web Programming in SWI Prolog (2019) by Avshalom on Friday February 21, 2020 @02:23PM (#22385928)
Re:Web Programming in SWI Prolog (2019) by lliamander on Friday February 21, 2020 @06:08PM (#22387917)
Mercury is cool. I translated a simple Prolog program to it once, and it was a head trip. Hard to get my mind around, but also helped me see the connection between functions and relations.
Re:Web Programming in SWI Prolog (2019) by ggleason on Saturday February 22, 2020 @04:30PM (#22393459)
We evaluated the use of Mercury before settling on prolog for terminusDB. Mercury is a great language, but the community and library support is just a bit too small.
Re:Web Programming in SWI Prolog (2019) by segmondy on Friday February 21, 2020 @12:06PM (#22384687)
Prolog is already a database, why bring in the mess of an external DB. I have used Prolog and ODBC to access a postgres DB. I found it better to just export the data and turn it into a Prolog DB then process my rules than have it run all those logic across the wire.
Re:Web Programming in SWI Prolog (2019) by The_rationalist on Friday February 21, 2020 @04:20PM (#22386879)
What about performance?
Re:Web Programming in SWI Prolog (2019) by namelosw on Friday February 21, 2020 @06:30PM (#22388090)
For Clojure, there is Datomic[0] (a DB with S-expression Datalog) and DataScript[1] (in memory Datalog for browser) which has a fair amount of usage. Also, there's a bitemporal database use Datalog name Crux[2] seems to be quite promising.

[0] https://www.datomic.com/ [1] https://github.com/tonsky/datascript [2] https://opencrux.com/

Re:Web Programming in SWI Prolog (2019) by simplify on Friday February 21, 2020 @01:50PM (#22385641)
Learning web Prolog is my current programming side project. My ultimate goal is to create an online board gaming platform, as writing board game rules in Prolog has turned out to be a smooth and pleasant experience :)

Not to mention, SWI Prolog already has http, websockets, rpcs, and pubsub built in, so there isn't really a need to download any external libraries.

Re:Web Programming in SWI Prolog (2019) by jakearmitage on Friday February 21, 2020 @10:42AM (#22383884)
What could be good uses of a prolog-based web service? Calendar availability? Scheduling appointments? Issue diagnosis?
Re:Web Programming in SWI Prolog (2019) by bawolff on Friday February 21, 2020 @03:36PM (#22386458)
It's a turing complete language... so anything you want!
Re:Web Programming in SWI Prolog (2019) by momofarm on Friday February 21, 2020 @11:28AM (#22384343)
Maybe we should ask what's the real world use of prolog nowadays ?

We already have countless database at dispodispose. Too many shiny tech which can do recommendations.