Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install new packages for common lisp without asdf-install

I am new to cl, and I just learned to install packages using asdf-install, but I don't know how it works, I wonder how the package can be installed manully, then I could understand the use of the files in the root directory of the source code, thanks.

like image 901
levin li Avatar asked Dec 09 '11 04:12

levin li


People also ask

Where does Quicklisp install packages?

Quicklisp package manager it will install itself in ~/quicklisp/quicklisp/ . It is installed but we want to have Quicklisp available everytime we start sbcl. Otherwise we'd have to load the file located at ~/quicklisp/quicklisp/setup.

How to load Quicklisp?

Install Quicklisp If you want Quicklisp to always be loaded in your Lisp sessions, run (ql:add-to-init-file) : this adds the right stuff to the init file of your CL implementation. Otherwise, you have to run (load "~/quicklisp/setup.

How do you set up a lisp?

Steps for installation on Windows:Step 1: Download LISP. Step 2: After downloading the compressed zip file on your windows machine now extract it. Step 3: Now open the extracted folder. Step 4: Open clisp.exe to run clisp commands.


1 Answers

Short answer: Just use quicklisp.

Long answer: if you want to understand, how the package, or - more precisely - ASDF system, is laid out, that's a good idea. Actually, there's nothing hard about that.

Every ASDF system should have a system definition file with .asd extension. This file names other file of the system with their paths relative to the .asd file, their types (by default: lisp source code) and dependencies. Your Lisp should know where to find the system definition file. In ASDF there are 2 ways to inform Lisp about it: adding the directory, in which you store the file or symlink to it, to asdf:*central-registry* list or setting up special configuration files (called source-registry - more on that in ASDF manual).

Now if you want to install the system by hand, just download its sources, extract them into some directory (like in /home/user/lib/lisp/ - you may get /home/user/lib/lisp/cl-ppcre-2.3.1/, inside which there's cl-ppcre.asd). To let your Lisp find out about it just (push "/home/user/lib/lisp/cl-ppcre-2.3.1/" asdf:*central-registry*) (and don't forget the trailing slash - it's required), and then you can load the system with (asdf:oos 'asdf:load-op :cl-ppcre).

You might also setup a special dir, where you'll symlink your existing systems, like /home/user/.lisp/ and add it to *central-registry* at Lisp startup type (e.g. in .sbclrc). Now if you want to temporarily override some of the system linked in this dir, say, with a newer version, you don't need to unlink anything - just push the path to alternative system to *central-registry*.

Quicklisp does all that for you and more...

like image 96
Vsevolod Dyomkin Avatar answered Oct 20 '22 00:10

Vsevolod Dyomkin