From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: Lisp libraries: Other variants? (CCL, CLisp, etc.) Date: Fri, 09 Nov 2018 12:02:36 +0100 Message-ID: <87bm6y4ipf.fsf@ambrevar.xyz> References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gL4Yp-000481-No for guix-devel@gnu.org; Fri, 09 Nov 2018 06:02:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gL4Yl-0004Pg-I8 for guix-devel@gnu.org; Fri, 09 Nov 2018 06:02:47 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:59227) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gL4Yl-0004Lc-67 for guix-devel@gnu.org; Fri, 09 Nov 2018 06:02:43 -0500 In-reply-to: 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: Programmer Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > : Have you looked at lisp-utils.scm? I think it incorporates some of you= r 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 anyth= ing. 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? Sure: https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build/lisp-utils= .scm More generally, you'd be better off checking out the whole repository. The= n I recommend you look at those files: =2D guix/build-system/asdf.scm =2D guix/build/lisp-utils.scm =2D guix/build/asdf-build-system.scm > 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. I did not mean Scheme either. I don't know if something general enough cou= ld be devised for Scheme as well. It's probably too ambitious ;) > : 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 impleme= ntation name and it may be > a good idea to think ahead and also use the particular version in the sub= directory name. This > provides a simple, perfectly portable, and rather foolproof way to get th= e proper behavior for this. But how do you build this for a single Guix package? If you want FASLs for, say, SBCL and CCL, then you need to invoke both compilers when building the= Guix package. It would be much to heavy weight that every single Lisp package depended on all Lisp compilers, plus it would result in disk consuming pack= ages that would benefit practically no one (no one uses all Lisp compilers at the same time). So we need different packages. Which is what we are doing at the moment. Does that make sense? I could be missing something. Can you see a way around 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 r= ather grotesquely large and > unwieldy, among other things. If this is more general than Guix, does it still belong to the Guix project? Shouldn't it belong to the Common Lisp community as a replacement for ASDF?= I know the Common Lisp community has been talking about replacing ASDF for a while. Fare (one of the maintainers) has talked about it a few times: https://fare.livejournal.com/190738.html and other articles. > : We want to install libraries in the store. Why do you suggest we put i= t 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 fu= nction, that would handle > loading dependencies and the actual library. But who places those files? Guix cannot. Did you mean the user guix-profile instead? > : Sorry, I don't understand how your proposal would eliminate the POSIX-a= ssumption > : issue. Can you provide an example? > Sure I can. It's been a while since I've tried this, but common Common L= isp 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 d= oes things differently. > With the idea of generating the code used to load things from a higher-le= vel description, you can > adapt it to the particular system, rather than simply checking many direc= tories like it's a > configure script or something. My understanding is that CL-CFFI makes those assumptions. A few months bac= k I had brought up the issue upstream and they told me they were not eager to c= hange it. https://mailman.common-lisp.net/pipermail/cffi-devel/2018-May/003048.html The way we do it now is probably optimal. See cl-sqlite for instance. I'm realizing my answers might come off as discouraging. I hope it's not, = we still need to work on the build system on the Guix side, while the Common L= isp side would certainly benefit from improvements to ASDF (or its successor). Cheers! =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlvlaUwACgkQm9z0l6S7 zH9s/gf/cQg2QUZmV4hMEVbQoDSBbLAnEJATnAPsK3q8K62o3OdA3gixTfVnbvYW yKMDS/G4FRJ5d37ie3fbfmldPV3hpdkY//2qsYZeYXnyXOjEEFtuH7uV+xl0bgD7 0V91uNRlPPCNfINpREXMmntSb7p3+v+/BlXEN9SdQspRnbzCZRflXPUz0qw5ETJY O74hPUmropfxF1w93qLzN4isLsGlC/9yj2Uhm9t/tkFN/CaqhRBY2eunuMsfVNcW XvfBwZaUPg5cJ6Q+5nhvc7Fn1YjucQTjYQdUwOW/qK1PiGnSZ4U5mN/Ma2EKirJ3 V9UlLzYjn2pvh4yeYZZbfhhLsY0K3Q== =wO3y -----END PGP SIGNATURE----- --=-=-=--