logoalt Hacker News

Common Lisp, ASDF, and Quicklisp: packaging explained

98 pointsby todsacerdotiyesterday at 11:10 AM32 commentsview on HN

Comments

susamtoday at 2:34 AM

Quicklisp is great and I recommend using it along with a brief introduction in both my Common Lisp setup guides for Vim and Emacs:

https://susam.net/lisp-in-vim.html

https://github.com/susam/emacs4cl

However, for my personal projects, I usually just download the package versions I need from GitHub with curl within a simple while loop:

https://github.com/susam/susam.net/blob/0.4.0/Makefile#L83-L...

https://github.com/susam/susam.net/blob/0.4.0/meta/cldeps/fo...

Then I point ASDF to the download directory with CL_SOURCE_REGISTRY and load it in my Lisp program using good old ASDF:LOAD-SYSTEM:

https://github.com/susam/susam.net/blob/0.4.0/etc/form.servi...

https://github.com/susam/susam.net/blob/0.4.0/form.lisp#L5

The last four links I have shared above all get automated by a simple QL:QUICKLOAD call if we're using Quicklisp, and that's one of the reasons Quicklisp has become almost a de facto standard in the community.'

show 1 reply
mtdewcmuyesterday at 11:34 PM

I started learning Common Lisp, but ASDF and Quicklisp threw me off. I couldn't tell if you were supposed to choose one or the other or they were used together. This might revive my interest in Common Lisp if I get around to reading it. But in the meantime I drifted off to Racket, which is relatively well documented and has extensive libraries and really unique features.

show 2 replies
vindareltoday at 10:46 AM

Pretty good, except and I don't share the advice to use package-inferred-systems, like, at all. It hides the third-party libraries you rely on, it prevents you from using one package in multiple files (a flexibility not common out there), you can't see the project's structure at first glance… just use a simple .asd file declaration, you'll be fine.

more: https://lispcookbook.github.io/cl-cookbook/

libraries: https://github.com/CodyReichert/awesome-cl/

show 1 reply
regularfryyesterday at 11:43 PM

What's missing from any of this, which has really confused me in the past, is any notion of dependency versioning. We get predefined dependencies as a distribution in quicklisp - which is great as far as it goes - but how do people manage without being able to say "this system depends on a version of that system greater than X"?

show 1 reply
brooke2kyesterday at 11:44 PM

I messed around with common lisp for a while a few months ago, and I remember the packaging/dependency situation was by far the most difficult and confusing part. So thanks for writing this article, bookmarked it for the next time I write some CL :)

tmtvltoday at 1:19 AM

Quicklisp is great, it's the defacto standard, but compared to OCICL it kinda feels ancient. There's also CLPM, but last time I checked it was broken by a combination of dead links and missing functions.

show 1 reply
cvdubtoday at 4:38 AM

ASDF (Another System Definition Facility) is my all time favorite name for a piece of software. Descriptive, funny, and easy to type!

brabeltoday at 1:23 PM

Another point that needs clarification is testing. Theres a lot of different test systems but they are all amateurish. Does anyone know something that works well? Stuff like rov, parachute, clunit is all really basic. Not even support for good html reports and tagging tests for example.

show 2 replies
librecelltoday at 2:39 AM

thank you so kindly for sharing this it is very helpful!