Next: , Up: Making a small Lisp project with quickproject and Quicklisp   [Contents][Index]


5.10.1.1 Get a comfortable environment

NOTE: done only once, not once per project

  1. install Quicklisp and the Quicklisp Slime Helper file and update the SBCL startup file
    • download quicklisp.lisp
    • run the following commands
      (load "quicklisp.lisp")
      (quicklisp-quickstart:install)
      (ql:add-to-init-file)
      (ql:quickload "quicklisp-slime-helper")
      
    • now, Quicklisp loads automatically every time Lisp is started
  2. configure ASDF2

    a) Get a directory structure for your projects

    • By default, ASDF2 scans a directory called $HOME/.local/share/common-lisp/source/ and projects will be put there without any configuration;
    • Or make a symbolic link to your projects directory here.
      ln -s ~/path/to/my/projects ~/.local/share/common-lisp/source/
      
    • There is also a special directory in Quicklisp for local projects, e.g. $HOME/quicklisp/local-projects/
    • Alternatively set up ASDF2 to scan a particular directory tree, for example $HOME/src/lisp/ for a local system.

    b) create a config file named

    $HOME/.config/common-lisp/source-registry.conf.d/projects.conf
    

    that has this in it:

    (:tree (:home "src/lisp/"))
    

    c) With that file in place, you can

    • add new projects to that directory tree,
    • and after the command
      ~(asdf:initialize-source-registry)~
      
    • the project’s systems will be loadable with
      ~asdf:load-system~.