unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Programmer <programmer@verisimilitudes.net>
To: guix-devel@gnu.org
Subject: Re: Lisp libraries: Other variants? (CCL, CLisp, etc.)
Date: Sun, 04 Nov 2018 20:35:37 -0500	[thread overview]
Message-ID: <36sgl312.fsf@server.domain.com> (raw)

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 particularly
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 environmental
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
acute-terminal-control.lisp:

(unless (find-package "ACUTE-TERMINAL-CONTROL")
  (load (make-pathname :name "cl-ecma-48" :type "lisp" :defaults *load-pathname*))
  (load (make-pathname :directory '(:absolute "run" "current-system" "profile" "lib")
                       :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" "lib")
                       :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 LISP-IMPLEMENTATION-TYPE.

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 Quicklisp.

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	other threads:[~2018-11-05  1:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05  1:35 Programmer [this message]
2018-11-05 21:03 ` Lisp libraries: Other variants? (CCL, CLisp, etc.) Pierre Neidhardt
  -- strict thread matches above, loose matches on Subject: below --
2018-11-09  6:45 Programmer
2018-11-09 11:02 ` Pierre Neidhardt
2018-11-09 20:17   ` Programmer
2018-11-10 10:02     ` Pierre Neidhardt
2018-10-20 10:10 Pierre Neidhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36sgl312.fsf@server.domain.com \
    --to=programmer@verisimilitudes.net \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).