Hello, friends!
I’m new to Prolog, but I’m not new to programming. I’ve seen Prolog, never really understood it’s purpose, until I started delving more into economics and economic theory. While we could do the following in Haskell:
data Actor = Actor { captial :: Int
, resources :: Int } deriving(Show)
or Agda
record Actor (C R : Set) : Set where
field
capital : C
resources : R
This is likely possible in Haskell or Agda, and we can add more stuff to each record, do comparisons, etc. However I’m not trying to validate types, I’m trying validate logic. Sure, the types probably don’t hurt to have and could be interesting to map up relationships, but it adds a bunch of extra work to wire everything up for just trying to map out and test out some given logic.
Anyway, I’m using Emacs with Sweeprolog. I have the follow in my Emacs configuration for Prolog:
;;;;; Prolog
;;;;;
(use-package prolog
:ensure nil
:mode ("\\.pl\\'" . prolog-mode)
:when (executable-find "swipl")
:custom
(prolog-system 'swi))
(use-package sweeprolog
:when (executable-find "swipl")
:hook (prolog-mode . sweeprolog-mode)
:custom
(sweeprolog-swipl-path (executable-find "swipl"))
(sweeprolog-faces-style 'dark)
:config
(push "--stack-limit=512m" sweeprolog-init-args))
Sweeprolog starts fine, but it seems to reset my Emacs’s theme (doom-nord
) to the default theme. Is this a bug, or is there something else I need to do to make sure that Sweeprolog doesn’t do that.
Looking forward to posting here more in the future!