How to use quicklisp to manager common lisp packages
http://xach.livejournal.com/278047.html
http://common-lisp.net/project/asdf/asdf.html
quicklisp is an amazing tool in common lisp tool. It just like "easy-install" in python field, and "cpan" in Perl world.
We can install or load some package into lisp's core image by quicklisp's help,
this will load the package, if this package didn't installed, it will search in the quicklisp's repository in the net, and install it.
But, If I want to load a package that is developed by myself. May I use ql:quickload to manage my personal project? Yes, you can.
ql:quickload use the ASDF2 package to do this. First, We need to config ASDF, it can scan a particular directory tree for my own project. To do that, I create a config file named ~/.config/common-lisp/source-registry.conf.d/projects.conf
that has following stuff:
now you can load you project, by:
I need to create a project named "mypackage"
quickproject:make-project create several files in above directory
* package.lisp
* mypackage.lisp
* mypackage.asd
* README.txt
http://common-lisp.net/project/asdf/asdf.html
quicklisp is an amazing tool in common lisp tool. It just like "easy-install" in python field, and "cpan" in Perl world.
* How to install or load package by quicklisp
We can install or load some package into lisp's core image by quicklisp's help,
(ql:quickload "package name")
this will load the package, if this package didn't installed, it will search in the quicklisp's repository in the net, and install it.
But, If I want to load a package that is developed by myself. May I use ql:quickload to manage my personal project? Yes, you can.
ql:quickload use the ASDF2 package to do this. First, We need to config ASDF, it can scan a particular directory tree for my own project. To do that, I create a config file named ~/.config/common-lisp/source-registry.conf.d/projects.conf
that has following stuff:
(:tree (:home "src/lisp/"))
now you can load you project, by:
(ql:quickload "my package")or
(require "my package")or
(asdf:load-system "my package")if asdf can not find the symbol; try to initialize asdf source registry by
(asdf:initialize-source-registry)
* How to create a project by quicklisp
I need to create a project named "mypackage"
(ql:quickload "quickproject") (quickproject:make-project "~/src/lisp/mypackage" :depends-on '(ql))
quickproject:make-project create several files in above directory
* package.lisp
* mypackage.lisp
* mypackage.asd
* README.txt
Comments
Post a Comment