Next: Reorganize, Previous: Create a project skeleton, Up: Making a small Lisp project with quickproject and Quicklisp [Contents][Index]
$HOME/src/lisp/swatchblade/swatchblade.lisp
and start hacking.
I define variables with defvar
and defparameter
, functions with defun
and defgeneric
, macros with defmacro
, classes with defclass
, etc.
As I write each one, I compile it immediately with ‘C-c C-c’ and occasionally switch over to the REPL to run some code.
defpackage
form in
package.lisp
to import symbols. For example, I might want to use several
Vecto symbols without package prefixes, so I could do this:
(defpackage #:swatchblade (:use #:cl) (:shadowing-import-from #:vecto #:with-canvas #:rounded-rectangle #:set-rgb-fill #:save-png-stream))
(asdf:defsystem #:swatchblade :serial t :depends-on (#:vecto #:hunchentoot #:cl-colors) :components ((:file "package") (:file "swatchblade")))
Reloading the system with ql:quickload
will install (if necessary) and
load any newly-required systems.