From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SHMhMrs1YGIajAAAbAwnHQ (envelope-from ) for ; Wed, 20 Apr 2022 18:32:59 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kKoHMbs1YGItLAAAG6o9tA (envelope-from ) for ; Wed, 20 Apr 2022 18:32:59 +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 595C5170A9 for ; Wed, 20 Apr 2022 18:32:59 +0200 (CEST) Received: from localhost ([::1]:58754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhDGE-0001Ba-3P for larch@yhetil.org; Wed, 20 Apr 2022 12:32:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCx9-0004Oq-DW for gwl-devel@gnu.org; Wed, 20 Apr 2022 12:13:15 -0400 Received: from smtp.polymtl.ca ([132.207.4.11]:41265) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCx5-00070x-H8 for gwl-devel@gnu.org; Wed, 20 Apr 2022 12:13:12 -0400 Received: from localhost (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 23KGD357023389 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Apr 2022 12:13:08 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 23KGD357023389 To: Ricardo Wurmus Cc: gwl-devel@gnu.org Subject: Re: Guile code snippet In-Reply-To: <87r15srshn.fsf@elephly.net> References: <87h76oo26s.fsf@laura> <87r15srshn.fsf@elephly.net> Date: Wed, 20 Apr 2022 12:13:03 -0400 Message-ID: <87ee1rohrk.fsf@laura> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Poly-FromMTA: (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) at Wed, 20 Apr 2022 16:13:03 +0000 Received-SPF: pass client-ip=132.207.4.11; envelope-from=olivier.dion@polymtl.ca; helo=smtp.polymtl.ca X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: , Errors-To: gwl-devel-bounces+larch=yhetil.org@gnu.org Sender: "gwl-devel" Reply-to: Olivier Dion From: Olivier Dion via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1650472379; h=from:from:sender:sender:reply-to: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; bh=18qKSqdFoNwFoMfyKnJ4ClbLmAKWrr+cIttTC2nj01g=; b=ngjDj3UWBibKPBeOBNMGWMo4Os+J2PIr/zVKvX9KbuPrXZlbTEItGaGVXa6U0SbL5e5FHO MHZizRlhNQhGsJJwkGItmA7RJhiI1eE/7qiDsDY50YQRzFe7eMcAlXgP7AZv9Sdy4LWWQ3 xg+urmQYrdyBNnywHBpmfT3LR8x7nzJck2Lr36veNQDrJkGtgPyAY28Sez2ha1nSyhCbp8 wzHNIfyZ+2r5E38IRxwPgfJQ0Aed40mPntpJheihTv7EcEE77ZkUBqsi2WtAEMNZsJnBfT unGVXCKS+iUgmzcDv9H9BL1cWDMSqWo70Nqfzc3fwzTAm92hDKsjv9x2ST+Dpg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650472379; a=rsa-sha256; cv=none; b=HpUR/0KcVnvXWU9jqw4oDsxRzP38xUAhzWh8Neidofh0vYyQs/Iygy97VA46OeU+fktuwP gJS+dT+ji3F8mvhNRBpdNuhFUwq6+wAIl6eIceB7XqKsyaFVp/kHkrtQcWjUWGwrr/QNBG iGsJX01/jj+2tIj2CgwcSBytlyk68jVDcpTG6lXd/QBqvQgWk5T2Z52MY/CdLzVl8PTpAk yDO6CzttbKAy1jYGH1hpNu+F+znyVKiobff/wJYOJZejkcOmq3dYrURtWh0nDolyxUrpJd LHlQKkn/Pr3+I9h22SGz1X/sHihgblXiR9LEuv+U1a1Ujak0AimePlys71XDbQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: -3.04 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: 595C5170A9 X-Spam-Score: -3.04 X-Migadu-Scanner: scn1.migadu.com X-TUID: TXYCHyDqydNf On Wed, 20 Apr 2022, Ricardo Wurmus wrote: > 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!~%")))) This does not work in my case for example: process guile-foo packages "guile" "guile-foo" procedure ` use-modules (foo) | no code for module (libpatch patch) and when I try the guile shebang: # /bin/guile { (display "foo") } | ERROR: In procedure %resolve-variable: | Unbound variable: ungexp --=20 Olivier Dion oldiob.dev