Graphical code editor and profiler?

I have noticed places on the web where posts mentioned the existence of a graphical debugger being distributed with the SWI-Prolog package.

I have also noticed posts mentioning the absence of a graphical code editor.

And I have noticed the absence of a profiler (e.g. GitHub - plasma-umass/coz: Coz: Causal Profiling).

Also, is it true that XPCE is being deprecated?

xpce is deprecated as a means to build new graphical applications in SWI-Prolog. For now, it is not going to be discontinued though as it is used for most of the development tools. These tools include PceEmacs, a GNU-Emacs clone written in Prolog+xpce. Most of its functionality is now part of the sweep package for GNU-Emacs. The graphical front-end for the profiler is also in xpce (not sure what “coz” does), as well as a thread monitor, cross referencing tool, etc.

xpce is mainly old, and is not likely to be updated to deal with modern look and feel, scaling, alpha channel, rotation, etc. Other than that, it will stay alive for quite a while, so if it suits your needs, use it.

These days I mostly write UIs as web services. Notably the https://htmx.org/ framework fits nicely with SWI-Prolog’s web infrastructure.

I could not figure out how to invoke PceEmacs.

I am running Ubuntu and have installed the entire SWI-Prolog package.
If there is something more to install, would you please share the details?

Saw a few screenshots, and XPCE does not look all that bad.

You need to install swi-prolog-x, i.e.

 sudo apt-get install swi-prolog-x

Debian likes small packages :slight_smile: This makes sense as server installations typically do not want the GUI and on a server it would pull in all the X11 stuff.

Thanks for the prompt response. I already have installed “swi-prolog-x”.
Is there any binary I need to execute at the command-line?

I executed “swipl”, but couldn’t figure how to proceed, then ran “apropos pceemacs”, still could not follow the instructions.

I searched for PceEmacs as well as pceemacs on the Ubuntu system, found nothing.

No more issues. Found a document explaining how to start-up PceEmacs.

Jan, thanks for the support. :blush:

BTW, XPCE really does not “look” all that bad, certainly not a good citizen as far as LnF integration with Ubuntu goes, but seems quite functional.

I played with the PceEmacs editor as well as a bunch of the included tools.
It was interesting.
Other than the fact that the widgets have an archaic look and feel, there is not much to crib/complain about.

I have used a lot of GUIs, but the important point to consider is “design is not so much about how it looks, as it is about how it works”.

Developers engaged with Prolog, and especially those building graphical applications using SWI-Prolog are already considered outliers.
As an example, take the case of Squeak or even Pharo, their applications “do not” confirm to the native look and feel, at all.

It would be worthwhile to consider developing a full IDE using the components that exist as separate tools.
Considering the design of such an integrated development system, I would wholeheartedly vouch for Aza Raskin, my mentor’s son.

I’m open to any initiative to make (SWI-)Prolog more accessible. There are a lot of possible routes and I never really made up my mind. The good news is that developments such as PDT (Eclipse plugin), SWISH, VsCode plugin and sweep have turned a large part the IDE infrastructure into a number of pure Prolog libraries, separated from the GUI code.

Over the years I’ve built up a set of tools in xpce+Prolog mostly to suit my own needs. Many people have contributed to that with small patches, but notably with complaints and suggestions. The tools are not “integrated”, in part by design as this allows them to be used together with other tools. As a consequence you can use the graphical debugger while Prolog runs embedded in emacs/vscode/eclipse/…

Notably the editor is a difficult choice. Programmers want one editor for all their work. Supporting Prolog is hard for most environments due to the somewhat awkward syntax and notably due to the lack of keywords and the “program is data” feature. Both make it hard to classify tokens while a language with these properties make this classification more important. Proper highlighting requires fairly detailed program analysis and integrating that into an external editor is hard. sweep is the only successful integration, achieved by embedding Prolog into GNU-Emacs. Language Server Protocol (LSP) seems attractive, but does as yet not provide a full workable alternative.