Is it possible to make my Common Lisp program configurable/extendable/scriptable in Common Lisp itself, if so, how (un)practical would it be[.]
Sure, maybe start with the following example from Practical Common Lisp, focusing on the PRINT
, and READ
procedures, and then maybe take a peek at EVAL
.
(defun save-db (filename)
(with-open-file (out filename
:direction :output
:if-exists :supersede)
(with-standard-io-syntax
(print *db* out))))
(defun load-db (filename)
(with-open-file (in filename)
(with-standard-io-syntax
(setf *db* (read in)))))