From unknown Mon Aug 18 18:01:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#56114: Guix does not have a documented general and practical procedure for lowering a single lowerable object to the /gnu/store/... string. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 20 Jun 2022 21:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56114 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 56114@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165575893325465 (code B ref -1); Mon, 20 Jun 2022 21:03:02 +0000 Received: (at submit) by debbugs.gnu.org; 20 Jun 2022 21:02:13 +0000 Received: from localhost ([127.0.0.1]:58544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o3OXE-0006ce-Qf for submit@debbugs.gnu.org; Mon, 20 Jun 2022 17:02:13 -0400 Received: from lists.gnu.org ([209.51.188.17]:52142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o3OXC-0006cW-NC for submit@debbugs.gnu.org; Mon, 20 Jun 2022 17:02:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3OXC-000637-Fx for bug-guix@gnu.org; Mon, 20 Jun 2022 17:02:10 -0400 Received: from baptiste.telenet-ops.be ([2a02:1800:120:4::f00:13]:57198) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o3OXA-0004vf-74 for bug-guix@gnu.org; Mon, 20 Jun 2022 17:02:10 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by baptiste.telenet-ops.be with bizsmtp id lZ24270084UW6Th01Z24ZW; Mon, 20 Jun 2022 23:02:04 +0200 Message-ID: <1652a111d71c3e74c61904f89120ea45631c7013.camel@telenet.be> From: Maxime Devos Date: Mon, 20 Jun 2022 23:01:54 +0200 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-KA9CCR+UnBW+wAZWZ0PC" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1655758924; bh=2cALQUithECPWc4nkVFINi/LkCfbV4DS4fdavZ07MOo=; h=Subject:From:To:Date; b=izMTIfZh0TtD2U2CvPDtYRB5tEGshH8bnTiIqETzyP/1wBhlqzVgpAVrsm2DXC/nX Yc4d4PEwEkq3pCA4heKPVGx+sbtUdUvfEGYKFzDds1T1ItstDAuLjl6y5TbUzqYzmm LwzxrFpzojXVg2F1BO9RUKR5wflzYDFWoBr288NRGvdO/uubXFmL7sKgZp+YiL459G tTwCh28S9ABs2sr42f8f9OLvK75iInAPhNOj1lkA6gHLuQXG6amjhnTJO2u/X1wFaa WC7HKiwLxr1dvjP1cR6tFv5K9hbtgJ8XePfXmjSP8ySlgtfHp3I741iqp7RAkX3AQv Sfeqn5NQhGZMQ== Received-SPF: pass client-ip=2a02:1800:120:4::f00:13; envelope-from=maximedevos@telenet.be; helo=baptiste.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-KA9CCR+UnBW+wAZWZ0PC Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Variants of this appear repeatedly on #guix every now and then, and also sometimes unasked by me not posted anywhere. How do I run compile a package, computed-file or more generally a lowerable object from the REPL? Let's look in the manual: > Note that the =E2=80=98(guix monad-repl)=E2=80=99 module extends the Guil= e REPL with > new =E2=80=9Cmeta-commands=E2=80=9D to make it easier to deal with monadi= c > procedures: =E2=80=98run-in-store=E2=80=99, and =E2=80=98enter-store-mona= d=E2=80=99. The former is > used to =E2=80=9Crun=E2=80=9D a single monadic value through the store: >=20 > scheme@(guile-user)> ,run-in-store (package->derivation hello) > $1 =3D # ...> >=20 Um, I want the actual store item, not the derivation, and I'm looking into lowering a non-package, let's look elsewhere: > As it turns out, the call to =E2=80=98package->derivation=E2=80=99 can ev= en be > omitted since it will take place implicitly, as we will see later > (*note G-Expressions::): >=20 > (define (sh-symlink) > (gexp->derivation "sh" > #~(symlink (string-append #$bash > "/bin/bash") > #$output))) >=20 > Calling the monadic =E2=80=98sh-symlink=E2=80=99 has no effect. As so= meone once > said, =E2=80=9Cyou exit a monad like you exit a building on fire: by > running=E2=80=9D. So, to exit the monad and get the desired effect, one m= ust > use =E2=80=98run-with-store=E2=80=99: >=20 > (run-with-store (open-connection) (sh-symlink)) > =E2=87=92 /gnu/store/...-sh-symlink Let's try this (using the REPL command): scheme@(guix-user)> ,run-in-store (plain-file "foo" "bar") While executing meta-command: Wrong type to apply: #< name: "foo" content: "bar" references: ()> doesn't work, let's try the 'lower-object' procedure which I vaguely recall to helped me out in the past but doesn't have any actual examples in the manual: scheme@(guix-user)> ,run-in-store (lower-object (plain-file "foo" "bar")) $15 =3D "/gnu/store/798sxvdgr0680czdggbls7rd3sfwk2yx-foo" This looks useful, let's try it for mixed-text-file: scheme@(guix-user)> ,run-in-store (lower-object (mixed-text-file "foo" "bar")) $17 =3D # /gnu/store/raihpcxdz6wmdpyj67bwd4bjk02xq0x3-foo 7f862e53f820> nooo there's the # again how do I get a compiled mixed- text-file from the REPL? (I mean I could use 'build-derivations' from (guix)The Store, but that accepts a list, not an individual derivation, and it doesn't accept strings according to the documentation so it cannot be used for the 'plain-file' and aren't derivations a super-low-level thing for which G-exps and such were intended to make the low level thing almost an implementation detail?) Seems like we are missing a general & documented & simple to use 'lower-object-completely' (or maybe 'compile-object'?) procedure for this ... And maybe also a ,build-object REPL command? Greetings, Maxime. --=-KA9CCR+UnBW+wAZWZ0PC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYrDgQhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7lnWAP4t9eKDgA5f5zUxI/tGQAC4cIfQ /eWet8YBdeH0L8X2WQEArAYhoWZtS7vv3AmJ81EZelUMrJUtmO5Jv5zgYlacOgs= =Iq/q -----END PGP SIGNATURE----- --=-KA9CCR+UnBW+wAZWZ0PC-- From unknown Mon Aug 18 18:01:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#56114: Guix does not have a documented general and practical procedure for lowering a single lowerable object to the /gnu/store/... string. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 03 Jul 2022 20:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56114 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxime Devos Cc: 56114@debbugs.gnu.org Received: via spool by 56114-submit@debbugs.gnu.org id=B56114.165688145118479 (code B ref 56114); Sun, 03 Jul 2022 20:51:02 +0000 Received: (at 56114) by debbugs.gnu.org; 3 Jul 2022 20:50:51 +0000 Received: from localhost ([127.0.0.1]:45533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o86YM-0004nz-G9 for submit@debbugs.gnu.org; Sun, 03 Jul 2022 16:50:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o86YL-0004nn-BN for 56114@debbugs.gnu.org; Sun, 03 Jul 2022 16:50:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42062) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o86YF-0001aO-2D; Sun, 03 Jul 2022 16:50:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=1MUWv7KeStl3UsY01XQNGUgHjeEP4V5VtS4iH1ZW1tA=; b=EMO+RgZ8gIgn+Yv28+L7 SGN3gC0qsaNc+IojgyNN2QdzsLb+BmSC4uAcKvHyB21T0fJub0jZ+X425TJuYNl2d+QRXMoMBhfz6 jfxgnqF7CcaNPmYYqJ7KdnFHOqlKVMcvncVO6MVjevAwQb12F9jI13L6lD9Xu0CdwoxuJAzBrd0id Q6NI3Br4I9VgxlGNi7eC4a7tz0h/qXZSHgB8XjHwh5sw+bxyXv1OaRGlC5DO9MfIKL2fwKghBGcT3 IuZzPg21Oj9lD8EyxTUk37VB2Z+T2s36s1KWdAgTWkdJiCuShOPyp2FeIxfYiRvxvxexYpS71e1ba GDW5AVGuNlcaVw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:49818 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o86YE-0003Nj-FE; Sun, 03 Jul 2022 16:50:42 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <1652a111d71c3e74c61904f89120ea45631c7013.camel@telenet.be> Date: Sun, 03 Jul 2022 22:50:40 +0200 In-Reply-To: <1652a111d71c3e74c61904f89120ea45631c7013.camel@telenet.be> (Maxime Devos's message of "Mon, 20 Jun 2022 23:01:54 +0200") Message-ID: <87edz1zzrz.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Maxime, Maxime Devos skribis: > Seems like we are missing a general & documented & simple to use > 'lower-object-completely' (or maybe 'compile-object'?) procedure for > this ... And maybe also a ,build-object REPL command? How about the attached patch? Sample session: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> ,use(gnu packages base) scheme@(guile-user)> ,build coreutils $11 =3D "/gnu/store/y8933036ljrz4ah9zcph09nmvdmmv5sf-coreutils-8.32-debug" $12 =3D "/gnu/store/8fpk2cja3f07xls48jfnpgrzrljpqivr-coreutils-8.32" scheme@(guile-user)> ,lower coreutils $13 =3D # /gnu/store/y8933036ljrz4ah9zcph09nmvdmmv5sf-coreutils-8.32-de= bug /gnu/store/8fpk2cja3f07xls48jfnpgrzrljpqivr-coreutils-8.32 7f0ebaf821e0> scheme@(guile-user)> ,build (computed-file "foo" #~(begin (display "hi!\n")= (mkdir #$output)(mkdir #$output:lib))) $14 =3D "/gnu/store/axij9bkg56xv3k1z0l20gd6b0swn14sy-foo-lib" $15 =3D "/gnu/store/h5s7k7m0fxk9n7q7729l3n4q7vyxnvpy-foo" scheme@(guile-user)> ,build (computed-file "foo" #~(begin (display "Goeden = dag!\n")(mkdir #$output))) substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 10= 0.0% substitute: updating substitutes from 'https://guix.bordeaux.inria.fr'... 1= 00.0% building /gnu/store/gplhka9g0bwv8b640zavw1z65y9zrvag-foo.drv... $16 =3D "/gnu/store/ynvga6gxwj68mmk8ddj3i9sjhavkqah1-foo" --8<---------------cut here---------------end--------------->8--- =E2=80=9Clower=E2=80=9D does what you would expect; =E2=80=9Cbuild=E2=80=9D= yields one value per output. If that works for you, I=E2=80=99ll update the manual accordingly, and we c= an always add more features (like build options) later on. Thoughts? Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable diff --git a/guix/monad-repl.scm b/guix/monad-repl.scm index aefabdeebb..15c10efe01 100644 --- a/guix/monad-repl.scm +++ b/guix/monad-repl.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright =C2=A9 2014, 2015, 2016 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2014, 2015, 2016, 2022 Ludovic Court=C3=A8s ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,6 +21,12 @@ (define-module (guix monad-repl) #:use-module (guix monads) #:use-module (guix utils) #:use-module (guix packages) + #:use-module (guix status) + #:autoload (guix gexp) (lower-object) + #:use-module ((guix derivations) + #:select (derivation? + derivation->output-paths built-derivations)) + #:use-module (ice-9 match) #:use-module (ice-9 pretty-print) #:use-module (system repl repl) #:use-module (system repl common) @@ -69,16 +75,56 @@ (define (store-monad-language store) #:guile-for-build guile) 'store-monad))) =20 +(define %build-verbosity 1) + +(define* (evaluate/print-with-store mvalue #:key build?) + "Run monadic value MVALUE in the store monad and print its value." + (with-store store + (set-build-options store + #:print-build-trace #t + #:print-extended-build-trace? #t + #:multiplexed-build-output? #t) + (with-status-verbosity %build-verbosity + (let* ((guile (or (%guile-for-build) + (default-guile-derivation store))) + (values (run-with-store store + (if build? + (mlet %store-monad ((obj mvalue)) + (if (derivation? obj) + (mbegin %store-monad + (built-derivations (list obj)) + (return + (match (derivation->output-paths obj) + (((_ . files) ...) files)))) + (return (list obj)))) + (mlet %store-monad ((obj mvalue)) + (return (list obj)))) + #:guile-for-build guile))) + (for-each (lambda (value) + (run-hook before-print-hook value) + (pretty-print value)) + values))))) + (define-meta-command ((run-in-store guix) repl (form)) "run-in-store EXP Run EXP through the store monad." - (with-store store - (let* ((guile (or (%guile-for-build) - (default-guile-derivation store))) - (value (run-with-store store (repl-eval repl form) - #:guile-for-build guile))) - (run-hook before-print-hook value) - (pretty-print value)))) + (evaluate/print-with-store (repl-eval repl form))) + +(define-meta-command ((verbosity guix) repl (level)) + "verbosity LEVEL +Change build verbosity to LEVEL." + (set! %build-verbosity level)) + +(define-meta-command ((lower guix) repl (form)) + "lower OBJECT +Lower OBJECT into a derivation and return it." + (evaluate/print-with-store (lower-object (repl-eval repl form)))) + +(define-meta-command ((build guix) repl (form)) + "build OBJECT +Lower OBJECT and build it, returning its output file name(s)." + (evaluate/print-with-store (lower-object (repl-eval repl form)) + #:build? #t)) =20 (define-meta-command ((enter-store-monad guix) repl) "enter-store-monad --=-=-=-- From unknown Mon Aug 18 18:01:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#56114: Guix does not have a documented general and practical procedure for lowering a single lowerable object to the /gnu/store/... string. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 04 Jul 2022 15:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56114 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Maxime Devos , 56114@debbugs.gnu.org Received: via spool by 56114-submit@debbugs.gnu.org id=B56114.165694941629376 (code B ref 56114); Mon, 04 Jul 2022 15:44:02 +0000 Received: (at 56114) by debbugs.gnu.org; 4 Jul 2022 15:43:36 +0000 Received: from localhost ([127.0.0.1]:48500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8OEZ-0007dk-JJ for submit@debbugs.gnu.org; Mon, 04 Jul 2022 11:43:35 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:41919) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8OEW-0007dT-1O for 56114@debbugs.gnu.org; Mon, 04 Jul 2022 11:43:34 -0400 Received: by mail-wr1-f46.google.com with SMTP id q9so14022632wrd.8 for <56114@debbugs.gnu.org>; Mon, 04 Jul 2022 08:43:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=2iT8LkBlf9LWU2MVVyoWCTXKacBj8Ycg/gGO6DGwcFA=; b=cGh6ovVwCG4MZHHzvdpL+LGkLzqgxPFJXU1lBF8/pBXaxFwscJPltUftb7NuuNu61O Vm19m44FTE/s5Lscsy0TAcYShl4YgE0VoIq5a7euu506riux8xYfB/lPcKxHiCBFK9EA seoC98+jG7j3kl+3NLr2G7iD/NvBNfNG7dMV1HDqpNWSnqm/JFrQ40/3F4odQVJ+RWU5 NXl5O1Eu+onAqsjt9aYmas3jv2ZPgU3qyT78UQAKLWZVWiy151WsGaPPmF8d1VD5Br12 dFwghXUFL61uutWEjTmc0IpacmHoQth7/yQP4swMSX9st+rOzWOY6u8BbGJqpOxJgjDh uu3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=2iT8LkBlf9LWU2MVVyoWCTXKacBj8Ycg/gGO6DGwcFA=; b=NkJjelFY/X0+EQQhQ700+xe9BQC/3TB66q1bAkHffkjRqiu29lKV0eeBhW2uTNdrXP mSOcdnpOA0ZhG2FcKCEgkSDpvHu2WfHlQW/eb6WVqLWipI9XiSahv/LMRQpdmdNCy1AN m9k2e/z5lCZ3Vvo7Mtzj2NhyhtPzHW/4gWeC2VZFACiZbnMYzHsFvkRvDeSIjua5WQIA 0mjDuClJd9a+1V5H+HAbqu45LPujmSH9H3njI8SXXt7MtudUZc/Qg84zpzEiD78VaQAF +BWfOunGySiy8ttNJquNb4Jdl+/yM1v0Fr1TOOOZGChg+IdLmvPe0auPveQ3Tg/amm1z 1SQg== X-Gm-Message-State: AJIora+Kv6FdPRNZVJjv4QluUFEEfInwkzMFhEGAUs8GTpylVgF5NLAu oykCvc9ciJU2PpTo3pavPoWfezNrO9E= X-Google-Smtp-Source: AGRyM1uNXMGOHP31nSMVChivBdYy3XPFknwa80IfvNYSt5WjXpKFcgrSlDIQSMCYt0tkoze9UsZk5A== X-Received: by 2002:adf:ed83:0:b0:21d:6c97:b4 with SMTP id c3-20020adfed83000000b0021d6c9700b4mr3756621wro.205.1656949405948; Mon, 04 Jul 2022 08:43:25 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id w8-20020a1cf608000000b0039c5a765388sm20288509wmc.28.2022.07.04.08.43.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 08:43:25 -0700 (PDT) From: zimoun References: <1652a111d71c3e74c61904f89120ea45631c7013.camel@telenet.be> <87edz1zzrz.fsf@gnu.org> Date: Mon, 04 Jul 2022 17:43:22 +0200 In-Reply-To: <87edz1zzrz.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sun, 03 Jul 2022 22:50:40 +0200") Message-ID: <87y1x8nasl.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, If I read correctly, this snippet from the manual, >> scheme@(guile-user)> ,run-in-store (package->derivation hello) >> $1 =3D # ...> becomes scheme@(guile-user)> ,lower hello and this snippet, > scheme@(guix-user)> ,run-in-store (lower-object (plain-file "foo" "bar")) > $15 =3D "/gnu/store/798sxvdgr0680czdggbls7rd3sfwk2yx-foo" becomes scheme@(guile-user)> ,build (plain-file "foo" "bar") However, note that, --8<---------------cut here---------------start------------->8--- scheme@(guix-user)> ,build (plain-file "foo" "bar") $1 =3D "/gnu/store/798sxvdgr0680czdggbls7rd3sfwk2yx-foo" scheme@(guix-user)> ,lower (plain-file "foo" "bar") $2 =3D "/gnu/store/798sxvdgr0680czdggbls7rd3sfwk2yx-foo" --8<---------------cut here---------------end--------------->8--- which is confusing, especially when, --8<---------------cut here---------------start------------->8--- scheme@(guix-user)> ,lower (mixed-text-file "foo" "bar") $6 =3D # /gnu/store/raihpcxdz6wmdpyj67bwd4bjk02xq0x3-foo 7f6f9bc5cd20> scheme@(guix-user)> ,build (mixed-text-file "foo" "bar") $7 =3D "/gnu/store/raihpcxdz6wmdpyj67bwd4bjk02xq0x3-foo" --8<---------------cut here---------------end--------------->8--- The issue =E2=80=93 unrelated to the nice patch =E2=80=93 is a potential = =E2=80=9Cinconsistency=E2=80=9D between =E2=80=99=E2=80=99 and =E2=80=99=E2=80= =99; =E2=80=99plain-file=E2=80=99 refers to =E2=80=99text-file=E2=80=99 and =E2=80=99mixed-text-file=E2=80=99 refers to= =E2=80=99text-file*=E2=80=99; and both are really different despite close names around. :-) Maybe the docstring of =E2=80=99plain-file=E2=80=99 and of =E2=80=99mixed-t= ext-file=E2=80=99 could be extended. For instance, --8<---------------cut here---------------start------------->8--- (define (plain-file name content) "Return an lowered object representing a text file called NAME with the g= iven CONTENT (a string) to be added to the store. This is the declarative counterpart of 'text-file'." --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- (define* (mixed-text-file name #:key guile #:rest text) "Return an object representing store file NAME containing TEXT. TEXT is a sequence of strings and file-like objects, as in: (mixed-text-file \"profile\" \"export PATH=3D\" coreutils \"/bin:\" grep \"/bin\") This is the declarative counterpart of 'text-file*' but note that a 'computed-file' object is returned." --8<---------------cut here---------------end--------------->8--- > diff --git a/guix/monad-repl.scm b/guix/monad-repl.scm > index aefabdeebb..15c10efe01 100644 > --- a/guix/monad-repl.scm > +++ b/guix/monad-repl.scm > @@ -1,5 +1,5 @@ All LGTM. > +(define* (evaluate/print-with-store mvalue #:key build?) > + "Run monadic value MVALUE in the store monad and print its value." I do not know if it makes sense to have a list of monadic values, allowing something like: ,build hello coreutils Cheers, simon From unknown Mon Aug 18 18:01:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#56114: Guix does not have a documented general and practical procedure for lowering a single lowerable object to the /gnu/store/... string. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 04 Jul 2022 20:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56114 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: zimoun Cc: Maxime Devos , 56114@debbugs.gnu.org Received: via spool by 56114-submit@debbugs.gnu.org id=B56114.16569656251054 (code B ref 56114); Mon, 04 Jul 2022 20:14:01 +0000 Received: (at 56114) by debbugs.gnu.org; 4 Jul 2022 20:13:45 +0000 Received: from localhost ([127.0.0.1]:48724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8SS1-0000Gv-F6 for submit@debbugs.gnu.org; Mon, 04 Jul 2022 16:13:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8SS0-0000Gb-Ci for 56114@debbugs.gnu.org; Mon, 04 Jul 2022 16:13:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41330) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8SRv-0003AG-3a; Mon, 04 Jul 2022 16:13:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=DKuyrwhEqYEMq1tElb5UTfwyclL0PW9iHlEJ1KrykH8=; b=pD7h2A1gWxol8rA0ww3b 8F8y9KIeu1daFLCE/o2rJSpci9oJ57oK4LmYMRS/CAuum+DhiyQOQ0dr1CViuDSZoJkyRrngM/SJT fsPmRDh1a5BanX30VInN27w3N+kmRXpju3Zvrz1UIWrqXhu/1M7Ru0imjmsHp8bi5pHAvtL2Joorq Juu0+pxzpNwsuhq5h0ciyNSAr5TwdNSUR4fJDyQ3yRGTVFS98CVWD3/nvfAv1Meu3KLko1egr+Zj9 qibUc2q1X3u2p9yNM+XkYYFuD/CAaSOiKLUyooAixGottwiniWt7mLOZKHh9PS7RZf1d0AGOlxtSk 62VkxrU7AxbXDA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:50258 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8SRu-0005BJ-Mp; Mon, 04 Jul 2022 16:13:38 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <1652a111d71c3e74c61904f89120ea45631c7013.camel@telenet.be> <87edz1zzrz.fsf@gnu.org> <87y1x8nasl.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Sextidi 16 Messidor an 230 de la =?UTF-8?Q?R=C3=A9volution,?= jour du Tabac X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 04 Jul 2022 22:13:36 +0200 In-Reply-To: <87y1x8nasl.fsf@gmail.com> (zimoun's message of "Mon, 04 Jul 2022 17:43:22 +0200") Message-ID: <8735fg8wlr.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello! zimoun skribis: > However, note that, > > scheme@(guix-user)> ,build (plain-file "foo" "bar") > $1 =3D "/gnu/store/798sxvdgr0680czdggbls7rd3sfwk2yx-foo" > scheme@(guix-user)> ,lower (plain-file "foo" "bar") > $2 =3D "/gnu/store/798sxvdgr0680czdggbls7rd3sfwk2yx-foo" > > > which is confusing, especially when, > > scheme@(guix-user)> ,lower (mixed-text-file "foo" "bar") > $6 =3D # /gnu/store/raihpcxdz6wmdpyj67bwd4bjk02xq0x3-foo 7f6f9bc5cd20> > scheme@(guix-user)> ,build (mixed-text-file "foo" "bar") > $7 =3D "/gnu/store/raihpcxdz6wmdpyj67bwd4bjk02xq0x3-foo" Right, that=E2=80=99s because =E2=80=98plain-file=E2=80=99 lowers directly = to a store item, not to a derivation. I explicitly made =E2=80=9C,build=E2=80=9D hide that difference; I thought = one would just want =E2=80=9C,build=E2=80=9D to do the right thing and display the re= sulting store item regardless of that kind of detail. Conversely, =E2=80=9C,lower=E2=80=9D is for die-hard hackers and it doesn= =E2=80=99t hide any subtlety. >> +(define* (evaluate/print-with-store mvalue #:key build?) >> + "Run monadic value MVALUE in the store monad and print its value." > > I do not know if it makes sense to have a list of monadic values, > allowing something like: > > ,build hello coreutils I don=E2=80=99t think the REPL can support this syntax, but we could add su= pport for: ,build (list hello coreutils) Thanks for your feedback! Ludo=E2=80=99. From unknown Mon Aug 18 18:01:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#56114: Guix does not have a documented general and practical procedure for lowering a single lowerable object to the /gnu/store/... string. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 04 Jul 2022 22:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56114 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Maxime Devos , 56114@debbugs.gnu.org Received: via spool by 56114-submit@debbugs.gnu.org id=B56114.165697265712883 (code B ref 56114); Mon, 04 Jul 2022 22:11:01 +0000 Received: (at 56114) by debbugs.gnu.org; 4 Jul 2022 22:10:57 +0000 Received: from localhost ([127.0.0.1]:48777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8UHR-0003Li-9h for submit@debbugs.gnu.org; Mon, 04 Jul 2022 18:10:57 -0400 Received: from mail-wm1-f54.google.com ([209.85.128.54]:39915) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8UHM-0003LM-GB for 56114@debbugs.gnu.org; Mon, 04 Jul 2022 18:10:56 -0400 Received: by mail-wm1-f54.google.com with SMTP id c131-20020a1c3589000000b003a19b2bce36so3106097wma.4 for <56114@debbugs.gnu.org>; Mon, 04 Jul 2022 15:10:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=u5cAHAPSCdoCYQk5kLUOYAoYwSa2BYtRliInEoWZvvw=; b=l68YZRSc+gJl09FGFmPHYohLMfdupSQSw6/3iCFwi6JfT7Cg7/Y1x9+2+/lkCd+nRW lEIG5b41PuSav62g+37DRNTAorNhNaHRNGVgpdjHdyXkw4boeASEzqb7q4b8vfdbC9Og KhbvEOOdeggAQ5VrdiS/IirR4F3kL5PL3CGmu29N5ZHR9L3nGxo50AJ0O3MldvkyaA7K +ZTEI4XRzLQnug8RubdKctNJlD8QRvT6tsWzflEQtUohlzm4Ny9GxxiNJXro05nuL8G8 almJIYowOU6S47cS7MsNFRc9eDrzd7jewgp8gbwY9zoI2PW0ag3N6cdcGTR8PbaSJTz0 AcvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=u5cAHAPSCdoCYQk5kLUOYAoYwSa2BYtRliInEoWZvvw=; b=y4NEASHNvLuHKh8svWtR7lb7S+/KqL0N1piJ4sXi24BziZMrCx+5rtOq7KwdgORK0P q5udxTeyHXxNRwNwGObUjUNHapie4L3Lf94/Fkm9A2wMDP0xUKPuYzhLuiqhg8yF4HfY Y3BRvLDSD4eHAEtWSA1bGiZf38koenmMETAEaa4shqG9jP8HgAr/UsSuSi1BE42XzRHP 9RtuyMwlcTv35gUchZ/kQ6uqpyXAyrrP86kNQZLCTLuQrkRqiu7boFHdb1tzv5FIWCSt zsxSH8hBzWg94ICqMeb4aXpw/01v0ycAN5WjHaZbUORCkoEaQIjwYaKItSRib5IrPn2P jM4w== X-Gm-Message-State: AJIora+bG8IRzdbaTAyKsia8reDlY8Cb4KyZSFT55xLwcVoOSjU6qb3Y wvG1OUeySHAMTCYiaZpW4SpJjUGhPbImZg== X-Google-Smtp-Source: AGRyM1un3sp3xcZATOROcZPmh317mymWgLm2Yll7O/nJRifSCKm+GuJTxcDxhtjliLBPmWdqOGZ7tw== X-Received: by 2002:a05:600c:4e04:b0:3a1:8f34:5633 with SMTP id b4-20020a05600c4e0400b003a18f345633mr19401935wmq.169.1656972646455; Mon, 04 Jul 2022 15:10:46 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id j18-20020a05600c191200b003973ea7e725sm22282347wmq.0.2022.07.04.15.10.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 15:10:45 -0700 (PDT) From: zimoun References: <1652a111d71c3e74c61904f89120ea45631c7013.camel@telenet.be> <87edz1zzrz.fsf@gnu.org> <87y1x8nasl.fsf@gmail.com> <8735fg8wlr.fsf@gnu.org> Date: Mon, 04 Jul 2022 23:59:48 +0200 In-Reply-To: <8735fg8wlr.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Mon, 04 Jul 2022 22:13:36 +0200") Message-ID: <865ykczgh7.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On Mon, 04 Jul 2022 at 22:13, Ludovic Court=C3=A8s wrote: > I explicitly made =E2=80=9C,build=E2=80=9D hide that difference; I though= t one would > just want =E2=80=9C,build=E2=80=9D to do the right thing and display the = resulting store > item regardless of that kind of detail. > > Conversely, =E2=80=9C,lower=E2=80=9D is for die-hard hackers and it doesn= =E2=80=99t hide any > subtlety. Both make sense. :-) > Right, that=E2=80=99s because =E2=80=98plain-file=E2=80=99 lowers directl= y to a store item, not > to a derivation. My comment was about an unrelated thing. Well, I do not use every day G-exp nor =E2=80=99plain-file=E2=80=99 and the like. The interface appears= to me unexpected each time I use it but hey I can live with it. :-) However, the documentation (or docstring) does not appear clear, each time I have my =C2=ABaaah right!=C2=BB moment. For instance, the manual says: The local-file, plain-file, computed-file, program-file, and scheme-file procedures below return file-like objects. That is, when unquoted in a G-expression, these objects lead to a file in the store. and the docstrings say: --8<---------------cut here---------------start------------->8--- (define (plain-file name content) "Return an object representing a text file called NAME with the given CONTENT (a string) to be added to the store. This is the declarative counterpart of 'text-file'." --8<---------------cut here---------------end--------------->8--- or --8<---------------cut here---------------start------------->8--- (define* (computed-file name gexp #:key guile (local-build? #t) (options '())) "Return an object representing the store item NAME, a file or directory computed by GEXP. When LOCAL-BUILD? is #t (the default), it ensures the corresponding derivation is built locally. OPTIONS may be used to pass additional arguments to 'gexp->derivation'. This is the declarative counterpart of 'gexp->derivation'." --8<---------------cut here---------------end--------------->8--- when =E2=80=99plain-file=E2=80=99 and =E2=80=99computed-file=E2=80=99 does = not return the same type of =E2=80=9Cfile-like object=E2=80=9C. Especially when reading, --8<---------------cut here---------------start------------->8--- (define* (mixed-text-file name #:key guile #:rest text) "Return an object representing store file NAME containing TEXT. TEXT is a sequence of strings and file-like objects, as in: (mixed-text-file \"profile\" \"export PATH=3D\" coreutils \"/bin:\" grep \"/bin\") This is the declarative counterpart of 'text-file*'." --8<---------------cut here---------------end--------------->8--- it is hard to guess beforehand that =E2=80=99plain-file=E2=80=99 and =E2=80= =99mixed-text-file=E2=80=99 do not return the same type of file-like object. Therefore, I was thinking to tweak these docstrings to better underline their difference. Well, maybe it is only me. :-) Cheers, simon PS: It remembers me unrelated [1] mentioning confusion about =E2=80=9Cfile or file-like object=E2=80=9D. :-) 1: From unknown Mon Aug 18 18:01:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#56114: Guix does not have a documented general and practical procedure for lowering a single lowerable object to the /gnu/store/... string. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 05 Jul 2022 07:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56114 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: zimoun Cc: Maxime Devos , 56114@debbugs.gnu.org Received: via spool by 56114-submit@debbugs.gnu.org id=B56114.165700785016741 (code B ref 56114); Tue, 05 Jul 2022 07:58:01 +0000 Received: (at 56114) by debbugs.gnu.org; 5 Jul 2022 07:57:30 +0000 Received: from localhost ([127.0.0.1]:49227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8dR4-0004Lw-CU for submit@debbugs.gnu.org; Tue, 05 Jul 2022 03:57:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8dR2-0004Li-Tr for 56114@debbugs.gnu.org; Tue, 05 Jul 2022 03:57:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40582) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8dQx-0006Pa-CG; Tue, 05 Jul 2022 03:57:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Vi8ucrOXMevBF9LFXAUN/C6Rk+bqVV8UWCSgTc6b9Ns=; b=UjQTbkOzJ1+58AWaxhdR ika6Iq/6rUINdN8QRcJSrmjbTVCpKZKH8vootBY+0EQaO0uOVwE4WyLUTrvQtVa1JhuPHnKhrQknW MjsOmuD/turzxWmzYkH0ejPnWEJz55ogfPfPagPiGGhUukfzNAxy9He09h/DmoQ6bZZOLVdEyijOR 7HTCmbGwe9U5aREVN4uXu6nxAfBYa0NzZrdLdfAJqXnrVty5iIUXIlM7YnTQTjP7oER8FRaxaPVZ9 Co/IrQiGcJtCuleUFjIfuKFQr8HdEz+4XCyjhMpA34iHQliWehoFvGuYrYw63SRS14wp4NiYvV1bD 7UmxURL17/enKw==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=34730 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8dQv-0003fk-PR; Tue, 05 Jul 2022 03:57:23 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <1652a111d71c3e74c61904f89120ea45631c7013.camel@telenet.be> <87edz1zzrz.fsf@gnu.org> <87y1x8nasl.fsf@gmail.com> <8735fg8wlr.fsf@gnu.org> <865ykczgh7.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Septidi 17 Messidor an 230 de la =?UTF-8?Q?R=C3=A9volution,?= jour de la Groseille X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 05 Jul 2022 09:57:19 +0200 In-Reply-To: <865ykczgh7.fsf@gmail.com> (zimoun's message of "Mon, 04 Jul 2022 23:59:48 +0200") Message-ID: <87wncs56w0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, zimoun skribis: > My comment was about an unrelated thing. I don=E2=80=99t take comments about unrelated things. ;-) > Well, I do not use every day G-exp nor =E2=80=99plain-file=E2=80=99 and t= he like. The > interface appears to me unexpected each time I use it but hey I can > live with it. :-) However, the documentation (or docstring) does not > appear clear, each time I have my =C2=ABaaah right!=C2=BB moment. [...] > it is hard to guess beforehand that =E2=80=99plain-file=E2=80=99 and =E2= =80=99mixed-text-file=E2=80=99 > do not return the same type of file-like object. As someone who writes gexps and manipulates =E2=80=9Cfile-like objects=E2= =80=9D, it doesn=E2=80=99t matter whether a thing lowers to a derivation or to a plain store item. What matters is that you can insert it in a gexp and it=E2=80= =99ll do the right thing. That=E2=80=99s why the docstrings don=E2=80=99t insist= on that difference. Hope it makes sense! Ludo=E2=80=99. From unknown Mon Aug 18 18:01:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#56114: Guix does not have a documented general and practical procedure for lowering a single lowerable object to the /gnu/store/... string. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 05 Jul 2022 10:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56114 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Maxime Devos , 56114@debbugs.gnu.org Received: via spool by 56114-submit@debbugs.gnu.org id=B56114.165701602930393 (code B ref 56114); Tue, 05 Jul 2022 10:14:01 +0000 Received: (at 56114) by debbugs.gnu.org; 5 Jul 2022 10:13:49 +0000 Received: from localhost ([127.0.0.1]:49357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8fYz-0007u8-DO for submit@debbugs.gnu.org; Tue, 05 Jul 2022 06:13:49 -0400 Received: from mail-pj1-f50.google.com ([209.85.216.50]:43571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8fYv-0007tm-Fy for 56114@debbugs.gnu.org; Tue, 05 Jul 2022 06:13:48 -0400 Received: by mail-pj1-f50.google.com with SMTP id o5-20020a17090a3d4500b001ef76490983so7535667pjf.2 for <56114@debbugs.gnu.org>; Tue, 05 Jul 2022 03:13:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Kl8cpzg7Yz85FGGZlfLCDqOLnO5fB/IgPTk4PpRlqEY=; b=YRV0frTQPmd56M0Bv9Ea0iQM8tJISb+TWSgD3Z7ngJ0FTKIQ+ckuE72H4PbqZdwI8d QRWBnaCJQ7zkFZ+986eGF6zeAAY11Co3QJlbDbJb33ZFyHgsTaqKEXvEP2hnC2h6La2o 9aqTuaLfqmioURtX/+uE3pOGhUzQy6Zq1He57GaVycYhZKWW4Ha9m2SjdLnU6/NjWQES pA8zVzXtdZouA7+yui0EFkJ8YAyG/w4+Cpy1OKHdbl4TxV119ErKKxPBYyVRQWKL/66x A720RlFKmSCinf7dMokp0qpnRM2zgQqx+zRTOXs8i+fZ0kzt8nL6vHwpwEsKQ6KMc+s4 ekVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Kl8cpzg7Yz85FGGZlfLCDqOLnO5fB/IgPTk4PpRlqEY=; b=j5IjUXZy3IUtDiQdtI4s6Ux4GdlzOpKY0VlmZnMthgMSHFw5hscrakdtfpF2eJVtgT EzjqWg44cdsRIjpdMQ7ttQLyX7TIl2meWNhyeBetwlzrjSNxnzgIPL3ELWRBM6AONnTH DX/m5uLBoTi4U1/Kdktvb3ty7EWxcEE9qJD1TIeDxef7VbbNEjhqfcVEEc2y8/U48Zpb xJ4GRu4bgXCwbb8NIC4fwdl99CB83yHGyJlP63wI56zIqvVl6e48/NSeB6yTJQPCP8Ka WZaZee2oKtGl3hTUE81gyhpvIjpsep6ewtjCf0E4ppofULvprrZD9mHo5CUANkIvMuSn /OGw== X-Gm-Message-State: AJIora98bqU8lFrNtyyAZLBlITgGaNZkw56b3Gz3XZmnJSMm0xcKKUaE dF72QE40LRoklrWhFk6Ly7bwgUWrBk9bC75UJsI= X-Google-Smtp-Source: AGRyM1vFAj1XDuc+2HMvn52SZ3iaAnOj1tV0wcyupzso+9R9EO0gZGbQWe3T8RC2/VV6OeJm2r68g3CGX1+ZwxssB2g= X-Received: by 2002:a17:90a:c84:b0:1ef:3b1a:6077 with SMTP id v4-20020a17090a0c8400b001ef3b1a6077mr34888643pja.23.1657016019631; Tue, 05 Jul 2022 03:13:39 -0700 (PDT) MIME-Version: 1.0 References: <1652a111d71c3e74c61904f89120ea45631c7013.camel@telenet.be> <87edz1zzrz.fsf@gnu.org> <87y1x8nasl.fsf@gmail.com> <8735fg8wlr.fsf@gnu.org> <865ykczgh7.fsf@gmail.com> <87wncs56w0.fsf@gnu.org> In-Reply-To: <87wncs56w0.fsf@gnu.org> From: zimoun Date: Tue, 5 Jul 2022 12:13:27 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On Tue, 5 Jul 2022 at 09:57, Ludovic Court=C3=A8s wrote: > I don=E2=80=99t take comments about unrelated things. ;-) So one more. ;-) > As someone who writes gexps and manipulates =E2=80=9Cfile-like objects=E2= =80=9D, it > doesn=E2=80=99t matter whether a thing lowers to a derivation or to a pla= in > store item. What matters is that you can insert it in a gexp and it=E2= =80=99ll > do the right thing. That=E2=80=99s why the docstrings don=E2=80=99t insi= st on that > difference. > > Hope it makes sense! The difference is explained nowhere and to understand why the returned call is different, then one has to read the code; it is what I did. :-) Well, "do the right thing" is an expectation based on an understanding about what the "right thing" means. :-) When I am manipulating "file-like objects", I am always confused by what it means and thus it appears to me that it does not "do the right thing" and it is hard to understand why. Yes it makes sense to not insistt on that difference once you have clear understanding of this very difference. However, when learning G-Exp -- which is already unusual -- "file-like objects" and how to manipulate them is hard to grasp because the difference is never written down. I still think the docstring or the manual should mention such difference. Explicit is better than implicit. In the face of ambiguity, refuse the temptation to guess. =E2=80=93 The Zen of Python, by Tim Peters =E2=80=93 Anyway! That's unrelated. ;-) Cheers, simon From unknown Mon Aug 18 18:01:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#56114: Guix does not have a documented general and practical procedure for lowering a single lowerable object to the /gnu/store/... string. References: <1652a111d71c3e74c61904f89120ea45631c7013.camel@telenet.be> In-Reply-To: <1652a111d71c3e74c61904f89120ea45631c7013.camel@telenet.be> Resent-From: jbranso@dismail.de Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 07 Jul 2022 22:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56114 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 56114@debbugs.gnu.org Received: via spool by 56114-submit@debbugs.gnu.org id=B56114.165723273012570 (code B ref 56114); Thu, 07 Jul 2022 22:26:01 +0000 Received: (at 56114) by debbugs.gnu.org; 7 Jul 2022 22:25:30 +0000 Received: from localhost ([127.0.0.1]:58243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o9Zw9-0003Gg-Sd for submit@debbugs.gnu.org; Thu, 07 Jul 2022 18:25:30 -0400 Received: from mx1.dismail.de ([78.46.223.134]:33330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o9Zw7-0003GR-QO for 56114@debbugs.gnu.org; Thu, 07 Jul 2022 18:25:28 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 3c8d3a9b for <56114@debbugs.gnu.org>; Fri, 8 Jul 2022 00:25:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h= mime-version:date:content-type:from:message-id:subject:to; s= 20190914; bh=UqTGx8t1jjKllDQBCW7wPVN/PU20ewF1enM2ka1I9pw=; b=iye rQJVdg5rQgU+otUWI4/2KnJ0u8gvc8kbFJOjR5wT12Vj3Olrf1TCIWcVLdm7+ezp 4FvNiyFoAmCKaLs7VYKPeG1ZoCRsI5et15IMWclwkyzyPMulUIdcnapdtdW/bIk5 bs2HFtUpgfRxQmZ9xJ6BI3sgudIHhz7VHAZP17c3qwneB64Ce/PjnURZDXTAyQ57 8urynVmA0xzxjeYvac/h9a/SEIuEfNjhIpniIUqpbaUrbMj+0VxQ7LzNa7KIUoyN h6AvUDOF7TaRtp2UTV776JBDeKKNgGXe+jo7tderZAR1F9sVujKawDjQJCjcNKwc RiXdgfwDLOEtBEzXKzw== Received: from smtp1.dismail.de ( [10.240.26.11]) by mx1.dismail.de (OpenSMTPD) with ESMTP id d069112c for <56114@debbugs.gnu.org>; Fri, 8 Jul 2022 00:25:20 +0200 (CEST) Received: from smtp1.dismail.de (localhost [127.0.0.1]) by smtp1.dismail.de (OpenSMTPD) with ESMTP id 8a9d7496 for <56114@debbugs.gnu.org>; Fri, 8 Jul 2022 00:25:19 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 659377ef (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <56114@debbugs.gnu.org>; Fri, 8 Jul 2022 00:25:19 +0200 (CEST) MIME-Version: 1.0 Date: Thu, 07 Jul 2022 22:25:19 +0000 Content-Type: multipart/alternative; boundary="--=_RainLoop_442_556865668.1657232719" X-Mailer: RainLoop/1.16.0a From: jbranso@dismail.de Message-ID: X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) ----=_RainLoop_442_556865668.1657232719 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable I was playing around with this today, and it is awesome! I think it should be merged, because it has already helped me with my ope= nsmtpd records project. Thanks, Joshua ----=_RainLoop_442_556865668.1657232719 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
<= br>I was playing around with this today, and it is awesome!

I thin= k it should be merged, because it has already helped me with my opensmtpd= records project.

Thanks,

Joshua
=
----=_RainLoop_442_556865668.1657232719-- From unknown Mon Aug 18 18:01:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#56114: Guix does not have a documented general and practical procedure for lowering a single lowerable object to the /gnu/store/... string. Resent-From: Joshua Branson Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 10 Jul 2022 20:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56114 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: zimoun Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxime Devos , 56114@debbugs.gnu.org Received: via spool by 56114-submit@debbugs.gnu.org id=B56114.165748343516526 (code B ref 56114); Sun, 10 Jul 2022 20:04:02 +0000 Received: (at 56114) by debbugs.gnu.org; 10 Jul 2022 20:03:55 +0000 Received: from localhost ([127.0.0.1]:37818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAd9n-0004IT-2J for submit@debbugs.gnu.org; Sun, 10 Jul 2022 16:03:55 -0400 Received: from mx1.dismail.de ([78.46.223.134]:41334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAd9l-0004IC-AE for 56114@debbugs.gnu.org; Sun, 10 Jul 2022 16:03:54 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 3ab9a3da; Sun, 10 Jul 2022 22:03:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=20190914; bh=qvVcZ5kkom86DmNmlQRdNHiIKTGN7TvFdN eWiJ8wY2o=; b=i1+n59vQfm83KZU0mj6f1UFyNDRK6pY/JQWgfjU7QeOTilqh31 JV45DPDMfnN+Vy+62EuPAu2zBZvydkENrv8tLS3dUUqTQ9aQXIP7Opb0aDhPmjr+ brPE+9D1QZLpJkPgl29U9PAyAseyeOQb2wKMSk/XOZwHyNDnSMWR3kQknoethx6s d2WBoaKZK9o4JFLkhPN3gTInW4uEQ5CiD0d6lMhMqHdLPB7Gwn8ITmJxFd/S1fRp gyo1yhSY3NksQYk8CeFs2ArtsborGOiJsju40pGE+2fJYbi0W5uBzA1WfreUxAKu uO0MUFkF7iE32zHPmXlm1jloLkHESAbJrMTA== Received: from smtp1.dismail.de ( [10.240.26.11]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 33cab69c; Sun, 10 Jul 2022 22:03:46 +0200 (CEST) Received: from smtp1.dismail.de (localhost [127.0.0.1]) by smtp1.dismail.de (OpenSMTPD) with ESMTP id c33f2926; Sun, 10 Jul 2022 22:03:45 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id b62ba956 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 10 Jul 2022 22:03:44 +0200 (CEST) From: Joshua Branson References: <1652a111d71c3e74c61904f89120ea45631c7013.camel@telenet.be> <87edz1zzrz.fsf@gnu.org> <87y1x8nasl.fsf@gmail.com> <8735fg8wlr.fsf@gnu.org> <865ykczgh7.fsf@gmail.com> <87wncs56w0.fsf@gnu.org> Date: Sun, 10 Jul 2022 16:03:41 -0400 In-Reply-To: (zimoun's message of "Tue, 5 Jul 2022 12:13:27 +0200") Message-ID: <87mtdgohuq.fsf@dismail.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Whoops. I sent my original message to the list, not directly to ya'll. ,build and ,lower are awesome! I reccomend that we add ludo's proposed patch into guix. It's awesome! Thanks, Joshua From unknown Mon Aug 18 18:01:41 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Maxime Devos Subject: bug#56114: closed (Re: bug#56114: Guix does not have a documented general and practical procedure for lowering a single lowerable object to the /gnu/store/... string.) Message-ID: References: <87o7xq5qob.fsf@gnu.org> <1652a111d71c3e74c61904f89120ea45631c7013.camel@telenet.be> X-Gnu-PR-Message: they-closed 56114 X-Gnu-PR-Package: guix Reply-To: 56114@debbugs.gnu.org Date: Fri, 15 Jul 2022 15:42:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1657899722-19681-1" This is a multi-part message in MIME format... ------------=_1657899722-19681-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #56114: Guix does not have a documented general and practical procedure for= lowering a single lowerable object to the /gnu/store/... string. which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 56114@debbugs.gnu.org. --=20 56114: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D56114 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1657899722-19681-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 56114-done) by debbugs.gnu.org; 15 Jul 2022 15:41:52 +0000 Received: from localhost ([127.0.0.1]:42036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oCNRw-000575-1H for submit@debbugs.gnu.org; Fri, 15 Jul 2022 11:41:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oCNRu-00056q-9s for 56114-done@debbugs.gnu.org; Fri, 15 Jul 2022 11:41:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35082) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oCNRl-0003EA-TU; Fri, 15 Jul 2022 11:41:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=zH7nCoSwIoKHJA7jzO2IO2d6yqMQLQ6WdSsoC+Kkp6o=; b=Ffdkp/L21JNQ+fdeTliT dYqDj0H/GKwbvCjpaSHOvwzkQ10dRwvNmYcHGC+Cwq5UsDYGEkJoXyT5OEQWrDtxUnun5V6lwAoIx w0r06ZX27t71qBoa8aY4uvmuTaP/F1j8OkmSN6vm/H7GOny1hQgtUUtmHrwDVA8G0MmniRYAh0IJ6 BPF4ZGSqEUokJfslE4UPx/OJxDL/haDvzgc+ZOlWZXS/sz5lIlYJUTV/0Zz+mYdRiHXmxbwXs+IaB wt7DPwb1XtIKQZPnqjVIOo3bgl1tE0rvs0A5t3A8gCwBnXgYGZzO7vnIvOchsgLvDdud6CjImE3Yg H+epGlph5cf++w==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:53777 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oCNRl-00034T-GU; Fri, 15 Jul 2022 11:41:41 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Joshua Branson Subject: Re: bug#56114: Guix does not have a documented general and practical procedure for lowering a single lowerable object to the /gnu/store/... string. References: <1652a111d71c3e74c61904f89120ea45631c7013.camel@telenet.be> <87edz1zzrz.fsf@gnu.org> <87y1x8nasl.fsf@gmail.com> <8735fg8wlr.fsf@gnu.org> <865ykczgh7.fsf@gmail.com> <87wncs56w0.fsf@gnu.org> <87mtdgohuq.fsf@dismail.de> Date: Fri, 15 Jul 2022 17:41:40 +0200 In-Reply-To: <87mtdgohuq.fsf@dismail.de> (Joshua Branson's message of "Sun, 10 Jul 2022 16:03:41 -0400") Message-ID: <87o7xq5qob.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56114-done Cc: Maxime Devos , 56114-done@debbugs.gnu.org, zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! Thanks all for your support. :-) I=E2=80=99ve pushed these new REPL commands as 4ce7f1fb24a111f3e92d5b889d1271bebf109d09, including a new =E2=80=9CUsing Gu= ix Interactively=E2=80=9D section in the manual to document it. Feedback welc= ome! I=E2=80=99m sure we can add more REPL commands as we better see what useful shorthands would be welcome. Cheers, Ludo=E2=80=99. ------------=_1657899722-19681-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 20 Jun 2022 21:02:13 +0000 Received: from localhost ([127.0.0.1]:58544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o3OXE-0006ce-Qf for submit@debbugs.gnu.org; Mon, 20 Jun 2022 17:02:13 -0400 Received: from lists.gnu.org ([209.51.188.17]:52142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o3OXC-0006cW-NC for submit@debbugs.gnu.org; Mon, 20 Jun 2022 17:02:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3OXC-000637-Fx for bug-guix@gnu.org; Mon, 20 Jun 2022 17:02:10 -0400 Received: from baptiste.telenet-ops.be ([2a02:1800:120:4::f00:13]:57198) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o3OXA-0004vf-74 for bug-guix@gnu.org; Mon, 20 Jun 2022 17:02:10 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by baptiste.telenet-ops.be with bizsmtp id lZ24270084UW6Th01Z24ZW; Mon, 20 Jun 2022 23:02:04 +0200 Message-ID: <1652a111d71c3e74c61904f89120ea45631c7013.camel@telenet.be> Subject: Guix does not have a documented general and practical procedure for lowering a single lowerable object to the /gnu/store/... string. From: Maxime Devos To: bug-guix@gnu.org Date: Mon, 20 Jun 2022 23:01:54 +0200 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-KA9CCR+UnBW+wAZWZ0PC" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1655758924; bh=2cALQUithECPWc4nkVFINi/LkCfbV4DS4fdavZ07MOo=; h=Subject:From:To:Date; b=izMTIfZh0TtD2U2CvPDtYRB5tEGshH8bnTiIqETzyP/1wBhlqzVgpAVrsm2DXC/nX Yc4d4PEwEkq3pCA4heKPVGx+sbtUdUvfEGYKFzDds1T1ItstDAuLjl6y5TbUzqYzmm LwzxrFpzojXVg2F1BO9RUKR5wflzYDFWoBr288NRGvdO/uubXFmL7sKgZp+YiL459G tTwCh28S9ABs2sr42f8f9OLvK75iInAPhNOj1lkA6gHLuQXG6amjhnTJO2u/X1wFaa WC7HKiwLxr1dvjP1cR6tFv5K9hbtgJ8XePfXmjSP8ySlgtfHp3I741iqp7RAkX3AQv Sfeqn5NQhGZMQ== Received-SPF: pass client-ip=2a02:1800:120:4::f00:13; envelope-from=maximedevos@telenet.be; helo=baptiste.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-KA9CCR+UnBW+wAZWZ0PC Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Variants of this appear repeatedly on #guix every now and then, and also sometimes unasked by me not posted anywhere. How do I run compile a package, computed-file or more generally a lowerable object from the REPL? Let's look in the manual: > Note that the =E2=80=98(guix monad-repl)=E2=80=99 module extends the Guil= e REPL with > new =E2=80=9Cmeta-commands=E2=80=9D to make it easier to deal with monadi= c > procedures: =E2=80=98run-in-store=E2=80=99, and =E2=80=98enter-store-mona= d=E2=80=99. The former is > used to =E2=80=9Crun=E2=80=9D a single monadic value through the store: >=20 > scheme@(guile-user)> ,run-in-store (package->derivation hello) > $1 =3D # ...> >=20 Um, I want the actual store item, not the derivation, and I'm looking into lowering a non-package, let's look elsewhere: > As it turns out, the call to =E2=80=98package->derivation=E2=80=99 can ev= en be > omitted since it will take place implicitly, as we will see later > (*note G-Expressions::): >=20 > (define (sh-symlink) > (gexp->derivation "sh" > #~(symlink (string-append #$bash > "/bin/bash") > #$output))) >=20 > Calling the monadic =E2=80=98sh-symlink=E2=80=99 has no effect. As so= meone once > said, =E2=80=9Cyou exit a monad like you exit a building on fire: by > running=E2=80=9D. So, to exit the monad and get the desired effect, one m= ust > use =E2=80=98run-with-store=E2=80=99: >=20 > (run-with-store (open-connection) (sh-symlink)) > =E2=87=92 /gnu/store/...-sh-symlink Let's try this (using the REPL command): scheme@(guix-user)> ,run-in-store (plain-file "foo" "bar") While executing meta-command: Wrong type to apply: #< name: "foo" content: "bar" references: ()> doesn't work, let's try the 'lower-object' procedure which I vaguely recall to helped me out in the past but doesn't have any actual examples in the manual: scheme@(guix-user)> ,run-in-store (lower-object (plain-file "foo" "bar")) $15 =3D "/gnu/store/798sxvdgr0680czdggbls7rd3sfwk2yx-foo" This looks useful, let's try it for mixed-text-file: scheme@(guix-user)> ,run-in-store (lower-object (mixed-text-file "foo" "bar")) $17 =3D # /gnu/store/raihpcxdz6wmdpyj67bwd4bjk02xq0x3-foo 7f862e53f820> nooo there's the # again how do I get a compiled mixed- text-file from the REPL? (I mean I could use 'build-derivations' from (guix)The Store, but that accepts a list, not an individual derivation, and it doesn't accept strings according to the documentation so it cannot be used for the 'plain-file' and aren't derivations a super-low-level thing for which G-exps and such were intended to make the low level thing almost an implementation detail?) Seems like we are missing a general & documented & simple to use 'lower-object-completely' (or maybe 'compile-object'?) procedure for this ... And maybe also a ,build-object REPL command? Greetings, Maxime. --=-KA9CCR+UnBW+wAZWZ0PC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYrDgQhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7lnWAP4t9eKDgA5f5zUxI/tGQAC4cIfQ /eWet8YBdeH0L8X2WQEArAYhoWZtS7vv3AmJ81EZelUMrJUtmO5Jv5zgYlacOgs= =Iq/q -----END PGP SIGNATURE----- --=-KA9CCR+UnBW+wAZWZ0PC-- ------------=_1657899722-19681-1-- From unknown Mon Aug 18 18:01:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#56114: Guix does not have a documented general and practical procedure for lowering a single lowerable object to the /gnu/store/... string. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 19 Jul 2022 14:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56114 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Joshua Branson Cc: 56114-done@debbugs.gnu.org, zimoun Received: via spool by 56114-done@debbugs.gnu.org id=D56114.165823983231793 (code D ref 56114); Tue, 19 Jul 2022 14:11:02 +0000 Received: (at 56114-done) by debbugs.gnu.org; 19 Jul 2022 14:10:32 +0000 Received: from localhost ([127.0.0.1]:54824 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDnvj-0008Gj-QX for submit@debbugs.gnu.org; Tue, 19 Jul 2022 10:10:32 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:60940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDnvf-0008GU-MB for 56114-done@debbugs.gnu.org; Tue, 19 Jul 2022 10:10:31 -0400 Received: from ptr-bvsjgyig5nh0salm0pi.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:5dba:d409:33f7:a16]) by michel.telenet-ops.be with bizsmtp id x2AR2700c20ykKC062AR9p; Tue, 19 Jul 2022 16:10:26 +0200 Message-ID: <42461a055f438b7a01d7783a3daaa68c3507dbfb.camel@telenet.be> From: Maxime Devos Date: Tue, 19 Jul 2022 16:10:25 +0200 In-Reply-To: <87o7xq5qob.fsf@gnu.org> References: <1652a111d71c3e74c61904f89120ea45631c7013.camel@telenet.be> <87edz1zzrz.fsf@gnu.org> <87y1x8nasl.fsf@gmail.com> <8735fg8wlr.fsf@gnu.org> <865ykczgh7.fsf@gmail.com> <87wncs56w0.fsf@gnu.org> <87mtdgohuq.fsf@dismail.de> <87o7xq5qob.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1658239826; bh=PY63ZvTmsVhYoaXsql3gIIFYeCHVCrwMr0tltEKvBvI=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=FKnv03yRpndpNTdBXkbPekhtCnbjAFwHN0RAGfQ3tvXzNcsBxnRnYk906aQMtQiOJ /kYbDuFdifHgUObvimPOzMA1EflpsnojEcKm+J/50wq3x90p0yo5XBeD7e4e9Cb07H 7CiASgPvBzEplX48nQ8pC5DXU9Zv0Sk26es+PtnOzFthvG5XP1vaJz8aE1TAbA2YOU 7CbIVZ8kx/trZzULk4+NT1va+wdGpEtk6/FbUfH4hZTla5ib7foEeFJwOVFJ9QuuML 9M2Jm6JPq2Q+nM5i5G+E5rxBL4Mw3xmnvKQS5iwu23qtRsoYJ7Qc3yiu+7K+JAm0vV VLvAU0zdVacQg== X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Courtès schreef op vr 15-07-2022 om 17:41 [+0200]: > Hi! > > Thanks all for your support.  :-) > > I’ve pushed these new REPL commands as > 4ce7f1fb24a111f3e92d5b889d1271bebf109d09, including a new “Using Guix > Interactively” section in the manual to document it.  Feedback welcome! > > I’m sure we can add more REPL commands as we better see what useful > shorthands would be welcome. > > Cheers, > Ludo’. Works nicely: scheme@(guix-user)> ,build (@ (gnu packages base) hello) [...] $1 = "/gnu/store/s5pd3rnzymliafb4la5sca63j86xs0y0-hello-2.12.1" though an actual documented _procedure_ (not command) seems to be missing, so maybe the issue needs to be reopened later, don't know yet ... Greetings, Maxime.