From mboxrd@z Thu Jan 1 00:00:00 1970 From: Programmer Subject: Re: Lisp libraries: Other variants? (CCL, CLisp, etc.) Date: Fri, 09 Nov 2018 01:45:28 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gL0YC-0007Kt-Jg for guix-devel@gnu.org; Fri, 09 Nov 2018 01:45:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gL0YB-0004F7-3p for guix-devel@gnu.org; Fri, 09 Nov 2018 01:45:52 -0500 Received: from [2604:180:2:725::698a] (port=38488 helo=verisimilitudes.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gL0YA-0002sZ-KE for guix-devel@gnu.org; Fri, 09 Nov 2018 01:45:50 -0500 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: Pierre Neidhardt Cc: guix-devel@gnu.org >Have you looked at lisp-utils.scm? I think it incorporates some of your ideas >already. It could perhaps be generalized following your ideas so that it works >for all Lisps out of the box. I've not. I did a cursory search for this as well, but didn't find anything. Would you be so kind as to link me to it so I can give a good idea of whether it's similar or not? I was aiming for something specifically suited to Common Lisp, since many Schemes have their own way of doing things, but if a general approach works best then that would be great. It is important to note, however, that I find it a very important quality that there be no need to load code into the Common Lisp implementation for doing this, as that's inconvenient. Ideally, the Common Lisp implementation is just told what file to LOAD and everything else is handled nicely. I'd also want to make my proposed method work across many different systems, ideally, with little friction. >Question: Are .fasl files compatible across Common Lisp implementations? If >not, then what's your suggestion? FASLs aren't standardized in form, so even the same implementation across different versions may be unable to use earlier or later FASLs. My suggestion, if this becomes an issue, is to have FASLs deposited in a fasl subdirectory of the Common Lisp directory with further subdirectories denoted by Lisp implementation name and it may be a good idea to think ahead and also use the particular version in the subdirectory name. This provides a simple, perfectly portable, and rather foolproof way to get the proper behavior for this. >By "system", do you mean a _build system_ or something else? I meant something like ASDF, but more abstract and able to be compiled to representations including ASDF and Guix declarations and whatnot, with the reasoning that ASDF is rather grotesquely large and unwieldy, among other things. >We want to install libraries in the store. Why do you suggest we put it in the >user's home? You misunderstand. The library would be in the store, but there would be a file placed in the user's home directory, because Common Lisp has a USER-HOMEDIR-PATHNAME function, that would handle loading dependencies and the actual library. So, you'd LOAD the same file whether you're using Guix, Debian, etc. and so whether the actual library is the store, /usr/lib/, or anywhere else, varying on how the system package manager does it. >Sorry, I don't understand how your proposal would eliminate the POSIX-assumption >issue. Can you provide an example? Sure I can. It's been a while since I've tried this, but common Common Lisp tools to load code don't actually know anything about the structure of the system, so under POSIX they simply check the usual locations, instead. This blows up miserably under Guix, since it does things differently. With the idea of generating the code used to load things from a higher-level description, you can adapt it to the particular system, rather than simply checking many directories like it's a configure script or something. Just let me know if anything else is still unclear. I'd be very glad to help Guix have a pleasant Common Lisp packaging method that works across systems.