Common Lisp Creating A New Project
From copec
Contents
- 1 Overview
- 2 Project Creation (Steps)
- 2.1 Make Sure Environment is Setup
- 2.2 Install quickproject
- 2.3 Create Project
- 2.4 Edit Stuff
- 2.4.1 Load the skeleton
- 2.4.2 Hack the planet starting in swatchblade.lisp
- 2.4.3 Import vecto symbols under package.lisp
- 2.4.4 Add libraries cl-colors under swatchblade.asd
- 2.4.5 Add source files utils, graphics, web under swatchblade.asd
- 2.4.6 Export some sort of entry point symbols under package.lisp
- 2.5 Load Project
- 2.6 Use Project
Overview
Template procedure on how to create new Common Lisp project. Totally stolen from:
Project Creation (Steps)
Make Sure Environment is Setup
Install quickproject
CL-USER> (ql:quickload "quickproject")
Create Project
CL-USER> (quickproject:make-project "~/org.unaen.dev.src/lisp/swatchblade/" :depends-on '(vecto hunchentoot)) "swatchblade"
Default Files Created
~/org.unaen.dev.src/lisp/swatchblade/
- package.lisp
- swatchblade.lisp
- swatchblade.asd
- README.txt
Edit Stuff
Load the skeleton
Hack the planet starting in swatchblade.lisp
Import vecto symbols under package.lisp
(defpackage #:swatchblade (:use #:cl) (:shadowing-import-from #:vecto #:with-canvas #:rounded-rectangle #:set-rgb-fill #:save-png-stream))
Add libraries cl-colors under swatchblade.asd
(asdf:defsystem #:swatchblade :serial t :depends-on (#:vecto #:hunchentoot #:cl-colors) :components ((:file "package") (:file "swatchblade")))
Add source files utils, graphics, web under swatchblade.asd
Simple ":serial t" loading example:
(asdf:defsystem #:swatchblade :serial t :depends-on (#:vecto #:hunchentoot) :components ((:file "package") (:file "utils") (:file "graphics") (:file "web") (:file "swatchblade")))
Export some sort of entry point symbols under package.lisp
(defpackage #:swatchblade (:use #:cl) (:export #:start-web-server) (:shadowing-import-from #:vecto #:with-canvas #:rounded-rectangle #:set-rgb-fill #:save-png-stream))
Load Project
CL-USER> (ql:quickload "swatchblade")
Use Project
CL-USER> (ql:quickload "swatchblade") loading output CL-USER> (swatchblade:start-web-server :port 8080) Server started on port 8080.