From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eJQ1MUnYX2KdHQEAbAwnHQ (envelope-from ) for ; Wed, 20 Apr 2022 11:54:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id +PRfMEnYX2LywQAAG6o9tA (envelope-from ) for ; Wed, 20 Apr 2022 11:54:17 +0200 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 23845102E7 for ; Wed, 20 Apr 2022 11:54:15 +0200 (CEST) Received: from localhost ([::1]:50242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nh72M-0003kF-Bu for larch@yhetil.org; Wed, 20 Apr 2022 05:54:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh71U-0002i7-Be for gwl-devel@gnu.org; Wed, 20 Apr 2022 05:53:20 -0400 Received: from sender4-of-o50.zoho.com ([136.143.188.50]:21046) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh71R-0000Sq-Eg for gwl-devel@gnu.org; Wed, 20 Apr 2022 05:53:20 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1650448392; cv=none; d=zohomail.com; s=zohoarc; b=KDChNiAiNEe8oHOEN9IVDgVcTQZvhlj2SybGVFxRZ5b2eWC/lo4uyW5q1x14Pp2RheAMw0ktQRiV5aMbwWTKJqQpsGCAIMdI3uTRjqBN3XSMjxonGH0SX7f8677Vgrwkovt1sxhpTVxhzexVaC7Pfzyexw0MLYM274nSwuZ2Y5w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1650448392; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=6THrjvLloaUvraZKwK1elbPWVnjKveCRai4qtgBqUB4=; b=APyrom7+eZoE0Bo1RIh085zKBsqFMlyYXkLkPc1MOzLmymQBedJthxQoHHqZF9FCDNH3DZhn0Hyrv/Yr8ATpQB9XMh19zGiKYi5n9KNn5PQh58pUyS7cgq8m75FxHLtqDLSE8BQEl6TJGCmF2xsmo81tBJWGZU4W85gPSnrhbxc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1650448392; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=6THrjvLloaUvraZKwK1elbPWVnjKveCRai4qtgBqUB4=; b=RdrLgVjhb1YCGdGR2sSSSwvulJOCPY+JgTLnyG86d384qpTkNNaG/mpKfjnMn2YV wzuEbXgPTDQA8s4aIA2maxZYvqImoZ7MBdM6+s5RCIGpsj1pmKKIh/mdmwA84bxLQXH kfUZoACFc0VOm4+dUDrVXAxtu63wuLAp6fCl/wKk= Received: from localhost (i5E862DCC.versanet.de [94.134.45.204]) by mx.zohomail.com with SMTPS id 16504483921201021.3715518759865; Wed, 20 Apr 2022 02:53:12 -0700 (PDT) References: <87h76oo26s.fsf@laura> User-agent: mu4e 1.6.10; emacs 28.0.50 From: Ricardo Wurmus To: Olivier Dion Subject: Re: Guile code snippet Date: Wed, 20 Apr 2022 11:47:36 +0200 In-reply-to: <87h76oo26s.fsf@laura> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Message-ID: <87r15srshn.fsf@elephly.net> 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.188.50; envelope-from=rekado@elephly.net; helo=sender4-of-o50.zoho.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-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, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: gwl-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gwl-devel@gnu.org Errors-To: gwl-devel-bounces+larch=yhetil.org@gnu.org Sender: "gwl-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1650448457; 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=6THrjvLloaUvraZKwK1elbPWVnjKveCRai4qtgBqUB4=; b=u4+xrEaUCmC8eG8DkRs7eiEaCGdKCx3w3v8rcfsVxXjy6JEObtTd4y1Uk/06g+pjaeJxew J6MaP0MA9V5AYSXHnI0yHwcd9MMVGFuupByIionLOANFzZHZGSJFAVu5vKGhosrXoUSzut FO2CuLGkXE+47t57SXPdxgnDafpd6lMGP0mBkwFgNSnyYLUClv35CcGtZrcqZ6RNZ78zsm FLKGqAD9dsL1PJZNTvWgG50YKpryVkUFx+GOA5rwDgkeYKaNBKDts+LTHgFIVgHA7uNDN+ hjLGLoxEt8wQ8d3brTt11oCAfd5QyiIh3f+pJ2GVbedVjjH+xWp/+fzzbRG/5A== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1650448457; a=rsa-sha256; cv=pass; b=GGCFvy4uQzxwTsXC+GMkI2z4+/OvI77Pwo2L9x63rK6z4e+uwdt4tVm4sMK5tFRisB5QIJ 1Veb5cHX/eQpE+YhRufOyU+X5nv/JjrCSgKE6BOKxGJlMuMYBg+roBmDQXhCKowhNbVcTk /HjX57DpqZyXEl1NH+0a1ebWdTpcSdhjclAvNohZzwksTEaFh4BjUpqxyaV774yCrenqRH NOcX68RsNzEoQLWVbTafFNnrtO/H6K8TXZ55gax8cYEvT5WsZuR6XNwK5CVVn1wpxGNHXz s38lSh07btmutCtIeyMsvmd7ez0Zl+aBRL8exHT+1+xqTZ8yUX62vOKz9FHNcg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=RdrLgVjh; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "gwl-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="gwl-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -6.84 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=RdrLgVjh; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "gwl-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="gwl-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 23845102E7 X-Spam-Score: -6.84 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1uw5AafZ0AIO Hi Olivier, > Is there an easy way to do code snippet in Guile? I currently do: > # { guile snippet.scm } The manual introduces how to use code snippets: https://guixwl.org/manual/html_node/Code-Snippets.html This # { =E2=80=A6 } is just a shorthand for # /bin/bash -c { =E2=80=A6 } You can use any interpreter after the hash, e.g. # /bin/guile =E2=80=A6 { =E2=80=A6 } But you could just as well provide a quoted Scheme expression or an actual G-expression right there, e.g. (procedure `(call-with-output-file ,(first outputs) (lambda (port) (format port "Hello, world!~%")))) --=20 Ricardo