From mboxrd@z Thu Jan 1 00:00:00 1970 From: Programmer Subject: Re: Lisp libraries: Other variants? (CCL, CLisp, etc.) Date: Sun, 04 Nov 2018 20:35:37 -0500 Message-ID: <36sgl312.fsf@server.domain.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJTuT-0006Yn-SU for guix-devel@gnu.org; Sun, 04 Nov 2018 20:42:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJTuK-0002RD-5K for guix-devel@gnu.org; Sun, 04 Nov 2018 20:42:30 -0500 Received: from [2604:180:2:725::698a] (port=40740 helo=verisimilitudes.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gJTuI-0002Jo-6N for guix-devel@gnu.org; Sun, 04 Nov 2018 20:42:23 -0500 Received: from localhost (verisimilitudes.net [local]) by verisimilitudes.net (OpenSMTPD) with ESMTPA id cbca1447 for ; Mon, 5 Nov 2018 01:35:37 +0000 (UTC) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org 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.