locxter.net

A quick look at using Prolog with VSCode

2025-02-09

Today's article is another one born from my practical needs to install a rather obscure piece of software for university and work my way around a few obstacles. This time we are talking about locally installing a modern Prolog interpreter and integrating it with VSCode for a nice development environment (a similar IntelliJ plugin sadly isn't available anymore)...

If you need Prolog, you probably already know what it is used for, but just in case you got here out of curiosity here's a quick a introduction. Prolog is a logic programming language, meaning that as a subset of declarative programming languages it differs quite a bit from our popular imperative programming languages and focuses more on the What instead of the How. This means that a programmer mostly has to provide an exact description of the problem to solve and the system will resolve it automatically. This can be rather perplexing for our programmer brains that are mostly used to imperative C-like languages - especially if you had nothing to do in the past with the principles of first-order logic it is based on.

Whatever it might be, here's how to install and get it running:

Since that was so fun, here are a few more helpful notes for using it:

Just like last week with MATLAB, I truly hope you never have to use this software though, since it is mostly an esoteric language with rather limited real-world use and can be quite a source of headaches. But as always, feel free to share your thoughts and experiences in the comments down below and have a lovely day...

RSS feed