DEV Community

Vee Satayamas
Vee Satayamas

Posted on • Updated on

Preparing to create a new project in Common Lisp

Prerequisite

Emacs

(setq inferior-lisp-program "sbcl")
Enter fullscreen mode Exit fullscreen mode

Anyways, for me, I need more memory so I did this.

(setq inferior-lisp-program "sbcl --dynamic-space-size 13000")
Enter fullscreen mode Exit fullscreen mode

ASDF

  • Edit ~/.config/common-lisp/source-registry.conf
(:source-registry
  (:tree (:home "Develop/thesis"))
  :inherit-configuration)
Enter fullscreen mode Exit fullscreen mode

Develop/thesis must be changed to a path to a directory in the home directory.

The project

My project name is mt-seq and I put it in ~/Develop/thesis.

Update 2020-12-06: Or the project can be created using quickproject. Thanks Michał "phoe" Herda.

  • ~/Develop/thesis/mt-seq.asd
(defsystem mt-seq
  :description "mt-seq"
  :author "Vee Satayamas"
  :license "LLGPL"
  :depends-on ("asdf" "lparallel" "bt-semaphore")
  :components ((:module "src"
        :serial t
        :components ((:file "packages")
                 (:file "mt")))))
Enter fullscreen mode Exit fullscreen mode
  • ~/Develop/thesis/src/mt.lisp
(in-package :mt-seq)

(defun toto (x)
  x)
Enter fullscreen mode Exit fullscreen mode
  • ~/Develop/thesis/src/packages.lisp
(defpackage :mt-seq
  (:use :cl :lparallel :bt-semaphore)
  (:export #:toto))
Enter fullscreen mode Exit fullscreen mode

I expect that this should be sufficient for starting a new project in Common Lisp in a proper format.

Discussion (0)