From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OBxIGBpus2EDHAAAgWs5BA (envelope-from ) for ; Fri, 10 Dec 2021 16:11:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id UDMdFBpus2FsMAAA1q6Kng (envelope-from ) for ; Fri, 10 Dec 2021 15:11:22 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E7EE6373DA for ; Fri, 10 Dec 2021 16:11:21 +0100 (CET) Received: from localhost ([::1]:60252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvhYO-0002lP-6j for larch@yhetil.org; Fri, 10 Dec 2021 10:11:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvhYC-0002kb-JF for help-guix@gnu.org; Fri, 10 Dec 2021 10:11:08 -0500 Received: from sender3-op-o10.zoho.com ([136.143.184.10]:17698) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvhY6-0003sS-R3 for help-guix@gnu.org; Fri, 10 Dec 2021 10:11:08 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1639149052; cv=none; d=zohomail.com; s=zohoarc; b=UHP/DpcnNkcb6xnoYKbUwlCMwXei+eZj9fX8P5ctqH0odorXpH+PG58Hd7XRboH0pYsLeOUmV/zD0W6Q7U1ClkLgaqL98O2J/PACYqAAYEQrHSJ4OmBGR88d2CMPnE8yy9Yy0WUMQCDRA4TXwRRpiqeGbfpc/kRiIetc4BlLcGM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639149052; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=AFwMkkEgeq1bWK25pDwYajpbCbT5F5pQa1qHGVzMQwk=; b=ShHPL+mw1p6xoeTsHgvGGFXlXr2Fn7aUXfnMRVCn1tI8ROG5vsM4ddztqE6r9dMqE21SdBqQzG9PN0R/s/Netsfvm6ky5mEYnySOmRofA0oxr0V54g58k2lKkOaWvXbcCL9fcFlg27J+5CbNuVDRHuypADHc0GODhn2YDWzSHeM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=rdklein.fr; spf=pass smtp.mailfrom=edou@rdklein.fr; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1639149051; s=zoho; d=rdklein.fr; i=edou@rdklein.fr; h=References:From:To:Cc:Subject:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=AFwMkkEgeq1bWK25pDwYajpbCbT5F5pQa1qHGVzMQwk=; b=FAszdVFeZAS2qBPvbQ94k00ykyoQYJgh97qwfIb2+dkoqQ9GEpodYTEQ1NApYyFI LZqsqnt68TSHvX+KnZgn3lhrNMlv5mxHB9M0JgHEbZftkClVz7wAJ5qf9heXHhLk/iN m7qkUKFXaGgWR8wzYgY8Wy5aynNU80pDN9XJzEFw= Received: from schwarzy (lfbn-idf3-1-439-245.w83-114.abo.wanadoo.fr [83.114.32.245]) by mx.zohomail.com with SMTPS id 1639149048762659.6237296563054; Fri, 10 Dec 2021 07:10:48 -0800 (PST) References: <20211210054458.GB5842@gac.attlocal.net> <20211210055454.GB6841@gac.attlocal.net> User-agent: mu4e 1.6.10; emacs 27.2 From: Edouard Klein To: jgart Subject: Re: Loading Common Lisp Libraries with GNU/Guix in a REPL Date: Fri, 10 Dec 2021 16:03:12 +0100 In-reply-to: <20211210055454.GB6841@gac.attlocal.net> Message-ID: <87bl1oa44k.fsf@rdklein.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.184.10; envelope-from=edou@rdklein.fr; helo=sender3-op-o10.zoho.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639149082; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=AFwMkkEgeq1bWK25pDwYajpbCbT5F5pQa1qHGVzMQwk=; b=hJCjl4JacojyC/gNXvazSKkByh+9h/hTvDLdtBlDoOGU9kIDG7oZTSO+H5cQxDY54XGo78 iLnUbmzXxNAoi4Y5FaTtMoDIRNwDOHbdV/ZlidYPF/rg24qA29pthPvuh6VvKuUTFNy4fs HIIXf1QbDfHEGL5k2ubeHgxxfSEQWfPT9wZGtJ8Bzvw51C9AGWITq5qbtMWF+66w8hLK5J 2pIna5Q+H/oEf94ZHeYwWvUi2XS50vNIdKpHE6G/sTXlyAHfzRrP0FLdjderPq+jHzCI+M m0JgpbdF5vozuIwFy3um3EHeqXc0QEk8/RmmPiAieOmSR7ekv+AbMcWz2a9pdg== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1639149082; a=rsa-sha256; cv=pass; b=OxZBkGfsBkaanJqovEt9HF+rOH7P3gh9JU8zcGNXxRD340p14iI9fV4d2Ggjx0SYlBKskg Az+C7/3etnJ4wO5EFojbEKBXcf7JupL/yQYAN6OQzxfkBG5KLtLXdSpxAN7nK7TOA510wW mMglXzSgC7TNWtz3aoQvFUxATdY56obbIdpjZJFqERuxzpKQqetbu6+azYUGkgSJMcYP/v JIWJb01P2kX4ZxJZ5RiX8gXUnG8pYcsWe20sseaVduLiC6riF0nnD3Lqg8Alh1I8dVj3zn 6S9GMCJ2MS8wgdtb2XwwlFTuON84Qd34yCcYMhvNBYuAOYbRmtUEdKu5cZL0Kg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=rdklein.fr header.s=zoho header.b=FAszdVFe; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.46 Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=rdklein.fr header.s=zoho header.b=FAszdVFe; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E7EE6373DA X-Spam-Score: -4.46 X-Migadu-Scanner: scn1.migadu.com X-TUID: fkL08AXoQIrm Hi ! I don't know the "correct" way to do it, but the way I do things is: Create a manifest.scm or guix.scm file in the directory. Here is an example manifest.scm file: #+begin_src scheme (define-module (osef) #:use-module (guix packages) #:use-module (gnu packages) #:use-module (guix profiles) #:use-module (gnu packages lisp) #:use-module (gnu packages lisp-xyz) #:use-module (gnu packages readline) ) (packages->manifest (list sbcl sbcl-numcl rlwrap)) #+end_src Then I run guix shell, which will automatically load this manifest.scm file. Then, same as you, I run rlwrap sbcl. Finally I invoke the following in sbcl: #+begin_src lisp (load "~/.emacs.d/elpa/27.2/develop/slime-20211021.507/swank-loader.lis= p") ;; Found using find .emacs.d/ -iname '*swank*' (swank-loader:init) (swank:create-server) #+end_src This allows my emacs instance, which lives outside the guix shell, to communicate with the sbcl instance which lives inside. I don't want to pollute each project with my emacs config, which is done once and for all for all projects. To connect: M-x slime-connet, enter, enter. Then I just (require :numcl) (for example). I did not need to use asdf, although this may be package-specific. I remember being unable to load a package once, but I don't rememder which or why (sorry). So basically, the same as you already do. If there is a more canonical way, I'd be happy to know :) Cheers, Edouard. jgart writes: > On Fri, 10 Dec 2021 05:44:58 -0500 jgart wrote: > > Alternatively, I was able to also load code this way also after running > the following: > > ``` > $ guix shell sbcl sbcl-cl-str rlwrap > > CL-USER(2): > jgart@gac ~ [env] =CE=BB rlwrap sbcl > This is SBCL 2.1.9, an implementation of ANSI Common Lisp. > More information about SBCL is available at . > > SBCL is free software, provided as is, with absolutely no warranty. > It is mostly in the public domain; some portions are provided under > BSD-style licenses. See the CREDITS and COPYING files in the > distribution for more information. > CL-USER(1): (asdf:make "str")=20 > WARNING: System definition file > #P"/gnu/store/aljfy13phr526w0iqmqz0cf2cnxkjxlb-sbcl-cl-ppcre-unicode-2.1.= 1/share/common-lisp/sbcl/cl-ppcre-unicode/cl-ppcre-unicode.asd" > contains definition for system "cl-ppcre-unicode-test". Please only > define "cl-ppcre-unicode" and secondary systems with a name starting with > "cl-ppcre-unicode/" (e.g. "cl-ppcre-unicode/test") in that file. > > ;;; Computing Hangul syllable names > T > CL-USER(2): (in-package :str) > > # > STR(3): (trim " rst ") > > "rst" > STR(4): (join " " '("foo" "bar" "baz")) > > "foo bar baz" > STR(5): (concat "f" "o" "o") > > "foo" > STR(6): (split "+" "foo++bar") > > ("foo" "" "bar") > ```