[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lisp libraries: Other variants? (CCL, CLisp, etc.)

From: Programmer
Subject: Re: Lisp libraries: Other variants? (CCL, CLisp, etc.)
Date: Sun, 04 Nov 2018 20:35:37 -0500

After having emailed Pierre Neidhardt, he kindly directed me to express my 
Common Lisp Guix package
proposal here.

I have for a short while been mulling over a proposal for an alternative and 
purely declarative
method of defining Common Lisp packages, with the intention of being far 
simpler in implementation
and use than the combination of ASDF and Quicklisp, along with being more 
secure than the latter.

The idea is simpler packaging, through a system called PACKAGER, which would 
provide a very
high-level and exhaustive declaration of an entire Common Lisp package or 
collection of packages
that could be compiled down to ASDF or Guix declarations, as two examples.  
However, the particular
form of this has not yet been shaped by sufficiently varied packages and is not 
intended to be used by the user, so I'll continue to the second stage.

The simpler replacement for Quicklisp is distribution of the Common Lisp 
packages by the system
package manager itself.  I'm aware that Guix already hosts several Common Lisp 
packages, but tends
to group them with implementations.  While I can see that the common prefix is 
``cl-'', I'm not yet
clear on how a package that itself starts with ``cl-'' would be prefixed.  
Moving on, the idea is
simply, to easily permit installing just the Common Lisp itself in a standard 
location to then be
loaded easily from any Common Lisp implementation.

This location could default to "~/.common-lisp/" and be controlled through an 
variable, with a name such as GUIX_COMMON_LISP_HOME.  The intent is that Common 
Lisp libraries could
be exposed under /run/current-system/profile/lib/ and you could then have 
Common Lisp programs such
as the following in the standard location to load conveniently.  The following 
example is how the
file for ACUTE-TERMINAL-CONTROL, a library I've written, looks under this 
system, at

(unless (find-package "ACUTE-TERMINAL-CONTROL")
  (load (make-pathname :name "cl-ecma-48" :type "lisp" :defaults 
  (load (make-pathname :directory '(:absolute "run" "current-system" "profile" 
                       :name "acute-terminal-control" :type "lisp")))

This file checks for itself, loads its sole dependency, and then loads itself.  
Note the use of
*LOAD-PATHNAME* to permit customization of the Common Lisp directory.  The 
dependency is another
library I've written, a leaf, and looks like this, at cl-ecma-48.lisp:

(unless (find-package "CL-ECMA-48")
  (load (make-pathname :directory '(:absolute "run" "current-system" "profile" 
                       :name "cl-ecma-48" :type "lisp")))

It is entirely feasible to store FASLs under a subdirectory of this Common Lisp 
directory and to
have subdirectories in that by implementation with names decided by 

One main way I've seen ASDF fail under Guix is in loading libraries written in 
other languages, as
it assumes a typical POSIX file system structure.  As the files actually loaded 
by this system
proposed would be generated as needed and for the system, that eliminates this. 
 I desire to spread
this system so that it's very easy to install and use Common Lisp libraries 
from the beginning of a
new distribution, using the system package manager and standard Common Lisp 
functions.  Note that
there's no need to install any software from the user side, unlike ASDF and 

I'm, of course, seeking thoughts about this proposed system and am open to any 
suggestions any of
you may have.  I'd be very glad to get such a pleasant system started under 
Guix and then slowly
moving the convention to increasingly more systems.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]