From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 eCfaHMnWoGN9hAAAbAwnHQ (envelope-from ) for ; Mon, 19 Dec 2022 22:25:29 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SFupHMnWoGN/UAAA9RJhRA (envelope-from ) for ; Mon, 19 Dec 2022 22:25:29 +0100 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 13A3D16D50 for ; Mon, 19 Dec 2022 22:25:28 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7NdC-0002HB-NL; Mon, 19 Dec 2022 16:25:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7NdA-0002Gk-EL for guix-devel@gnu.org; Mon, 19 Dec 2022 16:25:04 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7NdA-0000Ld-5M; Mon, 19 Dec 2022 16:25:04 -0500 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=GA4S3jka84jR3w5CfJJkvKDRGNqrapFWNifT0++iBRA=; b=KflZexyacyIXhnZzXogK 87RnRT+9Te2pz0ICSrdUnp2rmwe1HFZPdtqqeYEY1eB/yT8X7HsvOy2hOCaQr/OhnuG35HTlaA4Wp eS99FpcHjKJKKFsL/NO2TnWU2ZVJpul1x/0DSqBkdpjD0SuJ6Lm8cyxoK1/LWPb4aJ9RPF8aDC/lF 8Kq1jKJ/LdCZkXtXLuvsSVsFqzI02jKrxY4P9EMeVr5ZcXnnCsGWwkLd7qC8pRXqfPF1LoYu9DoHH qHHv3Xvz4C9SXzawdBKdaAH3O8GLfexF7aHO2H3QnBW0Kz1rMPKqL8yDl5RZYpNHWFp0Je0sB8HRK hy/EfpF1Z4Wn2g==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7Nd9-0005VM-P3; Mon, 19 Dec 2022 16:25:03 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "Antoine R. Dumont (@ardumont)" Cc: guix-devel@gnu.org Subject: Re: File search References: <87pmd1r8kt.fsf@gmail.com> <87mt85r7h8.fsf@gmail.com> <87lenonydz.fsf@gnu.org> <877cz7qg80.fsf@gmail.com> <878rjkn949.fsf@gnu.org> <87pmcsriwu.fsf@gmail.com> <87v8mi2q9t.fsf@gnu.org> <87pmck7g6y.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Nonidi 29 Frimaire an 231 de la =?utf-8?Q?R=C3=A9vol?= =?utf-8?Q?ution=2C?= jour de l'Olive 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, 19 Dec 2022 22:25:01 +0100 In-Reply-To: <87pmck7g6y.fsf@gmail.com> (Antoine R. Dumont's message of "Thu, 15 Dec 2022 18:03:01 +0100") Message-ID: <87bknzccia.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=KflZexya; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671485129; a=rsa-sha256; cv=none; b=pjdjqRIwZjcWkmML69V8Rfvb6wq/et4aEaDuBoELsc56MBTS6dNH3q/3iTqP3NgxB51k87 n6GqaB6l8Z/IQt/k5i/zEJrx0aWndH4K056ofY1fkp9FCAvExn/SzBYxoiFMFZM12MPPoc 6XO2KyWy+DHYM14XPDtBCR/UOGhzSOEccWii2M9NpbKZC6/1tR4J/hD0KIN10WDVZ1w540 8D2CLZOF80MtYv+aZ+Ob7ce/gnK+r2kMlD742prrBfrlK1Efnm/2AvWVsi37EQqkNQV3L1 I6alZUUVp4BsWYLAtMWWjFRWlr989AyM5aNoX+4UOUaG42eOQqjwHmAyVFT1Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671485129; 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=GA4S3jka84jR3w5CfJJkvKDRGNqrapFWNifT0++iBRA=; b=t1Q8PNewqruRsPjlf/sXJuXJrgiwJe+cQ4nsTbKHCrbl1HC6kv3f7Ew/yw9wY/ovxWIexI 4l7yA4fya3gif9/WSXK1nKF96B86e42tKHKFWLjzfSBQ4yWJ5GrDpDeRtgPB819v9TiUx0 EsWprbIITQR6aEZA/4r3dJNQjY1JZOvd9ikbpvbK28RY0M9YLYi2jI4+6jsPW4VLdC0JTJ 1UrFqKwKLeheWA4smP3UkTEXqc4E1KNpDtPWnnjCeYfnwkoridjr3bGyPOCJQeGNhYwA8D Nlb+oGxm5jb/pfyQTPQT7Ie7W7dz1n2z4jgjQNTtTq/fadh6wM58hAUdTZ2r9Q== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=KflZexya; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -5.90 X-Spam-Score: -5.90 X-Migadu-Queue-Id: 13A3D16D50 X-TUID: 17TH1xAMkQux Hi Antoine! "Antoine R. Dumont (@ardumont)" skribis: > Here is the rough changelog: > > - The local db cache is now versioned. Migration will transparently > happen for users at each index command calls (if need be). Perfect! > - The cli parsing got rewritten to be more flexible (inspired from > existing code from guix, notably `guix home`). > > - We can now choose the indexation method using the > `--with-method=3D{store|manifests}` flag. The "manifests" method is the > default, seel the help message for more details). Excellent. (I think we can call it =E2=80=98--method=E2=80=99, without =E2= =80=9Cwith=E2=80=9D.) > - Finally, the indexation methods are displayed using a progress bar. Yay, I love progress bars. :-) > Heads up, I did not yet address the "output" part. Thanks @zimoun for > the clarification btw ;) Future work. ;-) >> In the package case, the number of packages is known ahead. > > @civodul For the index 'store' implementation, ^ I did not find that > information. (length (all-packages)) gives you the total number of packages you=E2=80=99= re going to traverse. =E2=80=98all-packages=E2=80=99 is not instantaneous, bu= t as a good approximation the time spent in =E2=80=98all-packages=E2=80=99 can be ignor= ed. > So, as a costly implementation detail, I'm folding over all packages > first to know the total number of packages (for the progress bar). And > then another round trip to actually do the insert. You could build up the package list just once and call =E2=80=98length=E2= =80=99 on it. > Hope you'll find it mostly to your taste! I do! > Note: I gather we'll rework the commits at some point (when it's ready) > so I did not bother too much right now. I think at this point we could consider integration in Guix proper, under =E2=80=98guix/scripts=E2=80=99. For that we could dismiss commit his= tory. That=E2=80=99ll entail extra work (d=E2=80=99oh!) such as fine-tuning, writ= ing tests, and writing a section for the manual. The other option, if you prefer, would be to keep it in a separate repo as an extension that people can install. To me that would be more of a temporary solution because I think it=E2=80=99s a useful feature that ought= to be provided by Guix proper eventually. WDYT? :-) Ludo=E2=80=99.