From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] guix package: Show which generation is the current one. Date: Tue, 24 Sep 2013 16:16:51 +0200 Message-ID: <87txha8fu4.fsf@gnu.org> References: <87vc2o4qwc.fsf@gnu.org> <87y57kljro.fsf@karetnikov.org> <87hae81uvo.fsf@gnu.org> <87li2oslzh.fsf_-_@karetnikov.org> <87hadcr4sh.fsf_-_@karetnikov.org> <8738ow5zif.fsf@gnu.org> <87vc1r6nu0.fsf@karetnikov.org> <87ob7izrsp.fsf_-_@karetnikov.org> <8761tqbd6h.fsf@gnu.org> <87wqm6tjd5.fsf@karetnikov.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOTV5-0005V8-Dj for guix-devel@gnu.org; Tue, 24 Sep 2013 10:22:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOTUx-0003G3-1l for guix-devel@gnu.org; Tue, 24 Sep 2013 10:22:03 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:57227) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOTUw-0003Fh-SN for guix-devel@gnu.org; Tue, 24 Sep 2013 10:21:54 -0400 In-Reply-To: <87wqm6tjd5.fsf@karetnikov.org> (Nikita Karetnikov's message of "Tue, 24 Sep 2013 17:55:02 +0400") 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+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Nikita Karetnikov Cc: guix-devel@gnu.org Nikita Karetnikov skribis: >> Could we instead of a global (current-generation-number profile) >> procedure? We=E2=80=99d store the number in a local variable here, to a= void >> repeated =E2=80=98readlink=E2=80=99 calls. > > I don=E2=80=99t see how the former implies the latter. Could you expand = on > this? I=E2=80=99m suggesting to have a procedure like this: (define (current-generation-number profile) ;; Return the current generation number of PROFILE. ...) And then you could do: (let ((generation (current-generation-number profile))) ...) Does that make sense? Ludo=E2=80=99.