jrockway
jrockway

Reputation: 42674

asdf-installing libraries from the command-line

Coming from a Perl background, I have to say I prefer cpan Foo::Bar to the having to start sbcl, (require :asdf-install) and finally (asdf-install:install :foo-bar). Is there anything more convenient than this around?

Upvotes: 4

Views: 493

Answers (3)

Matt Curtis
Matt Curtis

Reputation: 23624

You might check out http://www.quicklisp.org/ - it's quick and easy to install, then to download, install, and load systems:

(ql:quickload :cxml)

To translate to Perl, this is like (shell) cpanm cxml and (inside Perl) use cxml all in one.

You can search for systems as well; for instance to list all the :

(ql:system-apropos "xml")

Commonly you'd be running a lisp process and giving it these commands directly, but if you prefer to do your installation and so on from the shell, you could define aliases (as you have in the answer https://stackoverflow.com/a/427333/17221):

function ql_install {
    sbcl --eval "(ql:quickload :$1)" --eval "(quit)"
}

function ql_apropos {
    sbcl --eval "(ql:system-apropos \"$1\")" --eval "(quit)"
}

Upvotes: 1

Doug Currie
Doug Currie

Reputation: 41180

Common Lisp can be verbose; however most (all?) implementations support a Lisp startup file that defines/loads whatever you like to personalize your development environment.

Also, check out Mudballs.

Upvotes: 1

jrockway
jrockway

Reputation: 42674

There is clbuild:

http://common-lisp.net/project/clbuild/

But I add this to my .bashrc:

function asdf_install {
    sbcl --eval "(asdf:operate 'asdf:load-op :asdf-install)" --eval "(asdf-install:install :$1)" --eval "(quit)"
}

function asdf_oos {
    rlwrap sbcl --eval "(asdf:operate 'asdf:$2 :$1)"
}

Upvotes: 3

Related Questions