Something like Pengines in SWI Prolog

Suggestions for new Logtalk features

Moderator: Paulo Moura

Post Reply
Posts: 1
Joined: Sat Jul 25, 2020 6:21 pm
Location: Stuttgart

Something like Pengines in SWI Prolog

Post by hnbeck »

Hi all,

after some initial problems I'm very happy to be here :)

One thing I would like to discuss. The forum "Wishlist" may not be the best, but it could be seen as a wishlist for Logtalk.

I'm playing arround with SWI Prologs Pengins package. This is a nice tool to connect a web application (HTML/JS) with Prolog, and I have also projects to connect Python and C#. But Pengines has its problems and is special to SWI Prolog.

It would be nice if there could be some objects in Logtalk which can talk remotely, together, using a standard protocol (http, websocks....)
Or I coudl express my wish in a more solution free way: I wish a simple possibility ot connect Python, C# or aother languages with Logtalk apps (independend of the backend) in the sense that Python or C# or JS (or whatever) send messages to a Logtalk appl

Of course, backend independent can only be as long the backends provide at least a socket access. But I think you understand my intention :)



Paulo Moura
Logtalk developer
Posts: 519
Joined: Sat May 05, 2007 8:35 am
Location: Portugal

Re: Something like Pengines in SWI Prolog

Post by Paulo Moura »

This have been discussed a few times in the past. I once made a proposal for standardizing Prolog foreign language interfaces at the Prolog Common initiative. But there was no followup and the Prolog Common initiative eventually died.

Only a few Prolog backends provide a sockets interface. There's no standard and the interfaces differ. Logtalk provides a "redis" library that, due to these limitations, can only be used with GNU Prolog, Qu-Prolog, SICStus Prolog, SWI-Prolog, and XSB backends. It would also support ECLiPSe if they fix some bugs (long overdue). This library only uses a subset of the sockets predicates but still cannot be used in half of the backends.

I fully realize how much this lack of Prolog standardization limits what you can do in a portable way from Logtalk. Hard to make progress when most Prolog systems don't really care much about standardization. These are the kind of issues that sadly often results in applications running in a single backend.

It may, just may, be possible to improve this situation by abstracting from the backends foreign language interfaces. But that's a challenging task and there are currently no resources available to explore such a solution.
Paulo Moura
Logtalk developer

Post Reply