This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

how use libraries without QL

4 posts · 4912 views

Hello,

does anybody know how use/include libraries (which was installed with Quicklisp), but without Quicklisp?
For example, I installed the library X with QL (ql:quickload "X"), after that I close my sbcl/clisp and start it again. In this moment the system still does not know about QL. How to include new library X in my project without QL?

Thank you,
Alex

Re: how use libraries without QL

You can load Quicklisp by yourself and then load the given library:
;;; The following lines added by ql:add-to-init-file:
#-quicklisp
(let ((quicklisp-init (merge-pathnames "qkcl/setup.lisp"
                                       (user-homedir-pathname))))
  (when (probe-file quicklisp-init)
    (load quicklisp-init)))
Looking to my gists on Github, I've used only asdf, that's another possibility:
(require :asdf)
(require :some-library-installed-by-ql)
cl-2dsyntax is my attempt to create a Python-like reader. My mirror of CLHS (and the dark themed version). Temporary mirrors of aferomentioned: CLHS and a dark version.

Re: how use libraries without QL

REQUIRE is part of your implementation, and isn't required (lol) to know anything about asdf. Also the proper way to load asdf systems is ASDF:LOAD-SYSTEM

Re: how use libraries without QL

Well, back in the day I was using:
(asdf:oos 'asdf:load-op :system) ;or
(asdf:operate 'asdf:load-op :system)
because of this site (I'm going to fix that and add the load-system option).

When I was writing that gist I didn't like the tardiness of writing the aferomentioned asdf part and used require instead, provided that require is enhanced by asdf. I can't recall clearly why I used the first line with require (either that wouldn't work without it at specific circumstances in a specific implementation or I've just wanted that there for cleanliness) -- I know it's now lengthy as well.

So for the OP, for completeness I provide the code for loading:
(asdf:load-system 'some-library-installed-by-ql) ;or
(asdf:load-system :some-library-installed-by-ql)
cl-2dsyntax is my attempt to create a Python-like reader. My mirror of CLHS (and the dark themed version). Temporary mirrors of aferomentioned: CLHS and a dark version.