From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id mJ4FLdigX1/+PAAA0tVLHw (envelope-from ) for ; Mon, 14 Sep 2020 16:56:56 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WBk6J9igX18ZDgAAbx9fmQ (envelope-from ) for ; Mon, 14 Sep 2020 16:56:56 +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 6AEA794036A for ; Mon, 14 Sep 2020 16:56:56 +0000 (UTC) Received: from localhost ([::1]:46376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHrmh-0003GS-9x for larch@yhetil.org; Mon, 14 Sep 2020 12:56:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHrkJ-0000s7-It for guix-devel@gnu.org; Mon, 14 Sep 2020 12:54:27 -0400 Received: from mail-qv1-xf2e.google.com ([2607:f8b0:4864:20::f2e]:42368) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHrkF-000282-Uu; Mon, 14 Sep 2020 12:54:27 -0400 Received: by mail-qv1-xf2e.google.com with SMTP id h1so44357qvo.9; Mon, 14 Sep 2020 09:54:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=m6y1n0T2rwcUUIFGlJIhK791cD1H35bWOL4IL07exsM=; b=Y92Oayd5FFz3fRne7ADELVZUm9phYl67RYN6G8+0qAd1yJ9cAMnHSxtKsMm/+bz+Aj 2zhivUh5V/JGJG8LKlP06ghCo/aIjw4RwKEEKpzqRs3IvPh10gIeQOF02w2p5lpxHISA /lSqktrf+9PQI7qi/u6bqVWTF+r2XuO55vxi86dKKENCHet7gezAAXqDL07HEMRBEoIP otNZISHL+k01K2te5gj8sGJdXmUiF4nJPSQlAB72gp5fyzTw3dJyy5UiUZfn8BY3UgZj PIMprK64PrQrsv3YwhGuiF1etbRvEsu+eOabSK7Ezq6paRAEOSxuruAX/iScwZkQg3o5 Khew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=m6y1n0T2rwcUUIFGlJIhK791cD1H35bWOL4IL07exsM=; b=mdA3C79FlgtG9pdu0nFxjny93FLoOa+u+j0z0TDjbeH/aQMedThfmyL2Lo575XXEa0 Hlsz2JwlTlk5ig9a7qMJAZ8mKCzbMaOfp2QFybgMgIernlxP/Q54SYlZOWmk9FpJt9lH 5qegnjnpfSl3rTvgYVwhcweuHEWQhc0EDGXp6ft6A3JREEUt6V2jXRfBa4Bqri4LMmSW XlJKp34UVJBCP+Bma0CM51R1Z2q5RYCqly3MJVJqgNBoTHqtxu/fF4LfLJspD7+0kQ6r CbTS8JMsguXW6dhT0Fh4D0wMTOREdZ4MksWHza49BK2IOTbwMHho3iwnJMnFh90aOTn6 5e5A== X-Gm-Message-State: AOAM532Y05JzWIBhfsMv0an9VBt5IShlwbhKDa04S+UN0o9mu3WEK2gd tmyO7hbQh6EypUxXXUwQIn4iu0Jx35Axpg== X-Google-Smtp-Source: ABdhPJwQ7w/rIpsQjQ2S61YS2Ops114HOB09YhAxCaDM1UoazPJVl9DQs66TWHnzrFsFADVwutlEjA== X-Received: by 2002:a0c:b902:: with SMTP id u2mr13690765qvf.7.1600102461637; Mon, 14 Sep 2020 09:54:21 -0700 (PDT) Received: from hurd (dsl-205-233-124-4.b2b2c.ca. [205.233.124.4]) by smtp.gmail.com with ESMTPSA id u13sm13997499qtv.57.2020.09.14.09.54.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 09:54:21 -0700 (PDT) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: Dependency cycle issues when using a Gexp-based snippet References: <87h7ssx07p.fsf@gmail.com> <87wo1nzr6p.fsf@gnu.org> <87mu286wt0.fsf@gmail.com> <877dt6orwn.fsf@gnu.org> Date: Mon, 14 Sep 2020 12:55:10 -0400 In-Reply-To: <877dt6orwn.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Mon, 07 Sep 2020 11:30:32 +0200") Message-ID: <87tuw047td.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::f2e; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qv1-xf2e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=Y92Oayd5; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: 1byivMBzP+JZ Hello Ludovic, [...] >> What is the difference between delayed and thunked? Would a thunked >> capture the closure of its environment while delayed not? Is the >> closure useful to access record-bound values such as the version field >> of a package? > > =E2=80=98Thunk=E2=80=99 uses an actual thunk (zero-argument procedure) th= at=E2=80=99s called > each time the field is accessed; =E2=80=98delayed=E2=80=99 uses a promise= , which is > similar except that the result is memoized (info "(guile) Delayed > Evaluation"). Thanks for the explanation! Now I wonder why delayed should not always be preferable to thunks? Is there a reason to offer thunked as well? [...] > What would be interesting is a comparison of the performance of > =E2=80=98package-derivation=E2=80=99, which can be done with something li= ke: > > time guix build -d --no-grafts libreoffice pandoc > > For memory consumption, try: > > GUIX_PROFILING=3Dgc guix build -d --no-grafts libreoffice pandoc Thanks for these "benchmarking" tips :-). Unfortunately, making the 'snippet' field either thunked or delayed causes 'guix build' to stop working entirely, peaking the CPU and slowy eating RAM away (looks like a typical dependency cycle). I'm at a lost as to how this can be debugged. That's unfortunate, because as it stands, Gexp-based snippets don't seem very usable. Thank you, Maxim