Comment

Comment by YeGoblynQueenne

I feel your pain. For me the worse case of this is web dev, where there's a different language for every task: html, CSS, javascript, SQL, your back-end language, XML, JSON, and so on.

But, Swi has my back on that, too:

https://www.swi-prolog.org/FAQ/PrologLAMP.txt

  Can I replace a LAMP stack with SWI-Prolog?
  
  Yes, you can, and you'll be happier for it.
  
  LAMP is short for the following open source components to realise a web
  server:
  
      Linux
      Apache
      MySQL
      PHP
  
  In this picture, Linux provides the OS, Apache the web server, MySQL the
  database and PHP server-side scripting facilities. In fact, most of these
  components can be replaced. One can replace Linux with almost any other OS,
  Apache with Nginx, MySQL with PostgreSQL. PHP is similar to ASP.
  
  There are also larger replacements of this stack, such as Tomcat, which
  replaces both Apache and PHP. Similar architectures are available for Python
  (django), Ruby (Ruby on Rails) etc. As we will see below, this is the picture
  into which SWI-Prolog fits.  

  The SWI-Prolog web framework
  
  The SWI-Prolog web framework (obviously) does not replace the OS. It does
  replace Apache, PHP and to some extent MySQL. We could refer to the stack as
  LP (Linux Prolog). Below, we point at the various libraries that make up the
  stack and relate them to the LAMP components they replace.
You can't quite replace html/css/js of course, since the browsers depend on them- but they can be embedded in Prolog easily. I believe the http library in my other comment here has facilities to do this.

Also- if you ever need to write a parser for some topsy-turvy ad-hoc markup language some third-party is using that you are forced to process, Prolog is probably the best language to do this, thanks to its Definite Clause Grammars notation that's basically BNF, except that it's not restricted to context-free grammars:

https://en.wikipedia.org/wiki/Definite_clause_grammar

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton