Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm officially too dumb for that.

    (loop for system in (list "sxql" "cl-ppcre" "dexador" "clss" "plump" "plump-sexp" "datafly" "xml-emitter" "local-time" "hunchentoot" "cl-who" "lass" "smackjack" "parenscript") do (asdf:load-system system))
I get a load of warnings about "redefining functions". Rather annoying...


You do not need to explicitly load them, ASDF will do it for you. You do need to declare the dependencies though.

Here is an example (example.asd)

  (defsystem :example
    :name "Example"
    :description "Example."
    :author "foo@bar"
    :serial t
    :license "BSD"
    :version "1.0"
    :depends-on (:sxql :cl-ppcre :dexador :clss :plump)
    :components ((:file "packages")
                 (:file "file1")
                 (:file "file2")
                 (:file "file3")))
You don't need to specify .lisp extension for files. Your packages.lisp may be:

  (in-package #:cl-user)

  (defpackage #:example
    (:use #:cl #:sxql #:cl-ppcre)
    (:export #:*global-symbol*
             #:exported-function))
Then you can load your system through ASDF, including all its dependencies, like so:

  (asdf:oos 'asdf:load-op :example)
This assumes that example.asd is inside a directory that can be found in:

  asdf:*central-registry*


Ah, I see, thank you. So I'll have to "install" the script into the registry before being able to just "use" it? :(


The easiest way to do it is to create a .asd for your project and then symlink or copy your project into ~/quicklisp/local-projects (i.e. the folder "local-projects" in the same directory as setup.lisp). Then, either run (ql:register-local-projects) or restart lisp and then do (ql:quickload :my-project) to load it.


Hmm, that makes "just clone the repository and you're done" rather hard. I'll reconsider...

I added the list of packages to the README and I'll think about a good way to use ASDF without QL and/or usability loss later. Thank you though!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: