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 eBkAHnQNEGBocQAA0tVLHw (envelope-from ) for ; Tue, 26 Jan 2021 12:39:16 +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 AGe7GXQNEGAFeQAAbx9fmQ (envelope-from ) for ; Tue, 26 Jan 2021 12:39:16 +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 2343B9403EB for ; Tue, 26 Jan 2021 12:39:15 +0000 (UTC) Received: from localhost ([::1]:36924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4Nco-0000nq-Pu for larch@yhetil.org; Tue, 26 Jan 2021 07:39:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4Ncc-0000jX-PA for guix-patches@gnu.org; Tue, 26 Jan 2021 07:39:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:57648) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4Ncc-0002of-H4 for guix-patches@gnu.org; Tue, 26 Jan 2021 07:39:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l4Ncc-0000qU-Ek for guix-patches@gnu.org; Tue, 26 Jan 2021 07:39:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46100] [PATCH 0/4] Memoize inferior package access. Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 26 Jan 2021 12:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46100 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 46100-submit@debbugs.gnu.org id=B46100.16116647053204 (code B ref 46100); Tue, 26 Jan 2021 12:39:02 +0000 Received: (at 46100) by debbugs.gnu.org; 26 Jan 2021 12:38:25 +0000 Received: from localhost ([127.0.0.1]:40961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4Nc1-0000pc-3x for submit@debbugs.gnu.org; Tue, 26 Jan 2021 07:38:25 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4Nbz-0000pT-9f for 46100@debbugs.gnu.org; Tue, 26 Jan 2021 07:38:23 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1611664696; cv=none; d=zohomail.com; s=zohoarc; b=RLVh8c7aGGAoSFAkwzNvmzAlQAJAnw+l7msTdXFSiLBR/wJijr/rf9Q/Ls6SI73L0WI0df1wGXlvTpSXzVqHjSPq8XjbBHe5vsqKOycve0VnVrd7nvYENSc66df5lB3en5j3oWhYgJQBRsdTeAaLWP9xKQQtslq/Me+YsVu1LQY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611664696; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=sTrRgChdcristXxMArNGLoIPxQBf/e3cR26c5AR9iE0=; b=fpZw0cDwFQ2T77n17IjobhTkNZ/qDgKEjDTSIm+QHCuGp3ulCWxUPIbE8TkJZx6Ub6YXL9m67WpMhAaAX2HTB6J/jF5N6isV9ip+INMdUOF17LlIoN17HCIPR/Du0x7NsW6cowwOG+x438luHohBYbbl1Z/5J0s/4lTPojkzF/4= 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= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1611664696; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=sTrRgChdcristXxMArNGLoIPxQBf/e3cR26c5AR9iE0=; b=g8zhBEWF1oqvO13ilSpcWgb4jWjNWtsIm5G9xMDrgOgK1BIqeBrVf9l1hRrKUKzO INYv69HsjppuMcXVVrnFB71YffpmMSaqjD/uWtkBKw6KERInIpBBoe8LheCmndx7+BO QjlWlOCPg2qGVctH8guqU7E2FL/vYFRyjDdsMBiI= Received: from localhost (p54ad4e0d.dip0.t-ipconnect.de [84.173.78.13]) by mx.zohomail.com with SMTPS id 1611664694466168.85463198854302; Tue, 26 Jan 2021 04:38:14 -0800 (PST) References: <20210125133738.15609-1-rekado@elephly.net> <20210125133738.15609-2-rekado@elephly.net> <878s8g0yln.fsf_-_@gnu.org> <874kj40wbp.fsf_-_@gnu.org> User-agent: mu4e 1.4.13; emacs 27.1 From: Ricardo Wurmus In-reply-to: <874kj40wbp.fsf_-_@gnu.org> 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 Date: Tue, 26 Jan 2021 13:38:11 +0100 Message-ID: <87y2gfj2ks.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 46100@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 2.15 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=g8zhBEWF; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 2343B9403EB X-Spam-Score: 2.15 X-Migadu-Scanner: scn1.migadu.com X-TUID: fuaMMbbzvx1w Ludovic Court=C3=A8s writes: > Ludovic Court=C3=A8s skribis: > >> There=E2=80=99s a catch here: OUTPUT should be taken into account. >> >> Also it=E2=80=99s better to use eq?-ness but=E2=80=A6 I realized >> =E2=80=98inferior-package-inputs=E2=80=99 & co. do not preserve eq?-ness. > > I think I went overboard here: given that is a simple > flat record type, using =E2=80=98equal?=E2=80=99/=E2=80=98hash-ref=E2=80= =99 is reasonable and that way > we avoid the troubles of building an ID-to-package table. All in all > it=E2=80=99s slightly more efficient. This looks good to me. It is very similar to my first version (which I didn=E2=80=99t send to the list), which also built a key consisting of the arguments to inferior-package->manifest-entry =E2=80=94 I wasn=E2=80=99t sure which of t= hem was important so I used them all instead of just consing package and output. I also like the use of define-syntax-rule to make it all look neater. --=20 Ricardo