From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6AjGDCHBd2MRfwEAbAwnHQ (envelope-from ) for ; Fri, 18 Nov 2022 18:30:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id +Ay3DCHBd2PwwQAAauVa8A (envelope-from ) for ; Fri, 18 Nov 2022 18:30:09 +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 CA7791AA45 for ; Fri, 18 Nov 2022 18:30:08 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ow5Bl-0001Ki-9u; Fri, 18 Nov 2022 12:30:05 -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 1ow5Bj-0001Jd-81 for guix-patches@gnu.org; Fri, 18 Nov 2022 12:30:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ow5Bi-0000Xh-Vr for guix-patches@gnu.org; Fri, 18 Nov 2022 12:30:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ow5Bi-0002D3-OC for guix-patches@gnu.org; Fri, 18 Nov 2022 12:30:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#58660] [PATCH v2 1/3] etc: teams: Add 'show' subcommand. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 18 Nov 2022 17:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58660 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 58660@debbugs.gnu.org Received: via spool by 58660-submit@debbugs.gnu.org id=B58660.16687926008460 (code B ref 58660); Fri, 18 Nov 2022 17:30:02 +0000 Received: (at 58660) by debbugs.gnu.org; 18 Nov 2022 17:30:00 +0000 Received: from localhost ([127.0.0.1]:38173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow5Bg-0002CO-Bh for submit@debbugs.gnu.org; Fri, 18 Nov 2022 12:30:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow5Be-0002CB-Av for 58660@debbugs.gnu.org; Fri, 18 Nov 2022 12:29:58 -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 1ow5BZ-0000Vi-33; Fri, 18 Nov 2022 12:29:53 -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=UT888Yn7LyiuQckII1iPD+ESvccV3kV+LJTcy/eZrOE=; b=eETxZYbwUvkLUEi9qxos Y2yAc42KjvdniycGOm25m917gX+MJ2AG4CoNZxklU37zNbjwas7pxzdyBEEQM5zMO/Q0I9uu4HKQb JulBGugqxKDTypk39Y87eJNR4b96xWLHcldkg0+PbxVa1uV2MVgzA2XRjUJuJIbwVXg7uMKguWVGE 3/qJkGGe3mo0C+LloNQQVISJXXP1LGG1AN8r2+fA/b9lgFUtIwKxEj+bjDMlZM6rm/G5a/rippmym 1JM0nrgVTR+ZtYajixyNEjZvWrnQh8BK2eeWqfdCqxnVaR9PvG0VdcHNCVjoIqamtDHZyLmx1V/dP Mfut2kvuIq9T5Q==; Received: from 2a02-8429-81d2-3d01-94c9-8097-ea5c-2775.rev.sfr.net ([2a02:8429:81d2:3d01:94c9:8097:ea5c:2775] helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ow5BY-0006Vu-GH; Fri, 18 Nov 2022 12:29:52 -0500 From: Mathieu Othacehe References: <20221117202820.2054593-1-zimon.toutoune@gmail.com> Date: Fri, 18 Nov 2022 18:29:50 +0100 In-Reply-To: <20221117202820.2054593-1-zimon.toutoune@gmail.com> (zimoun's message of "Thu, 17 Nov 2022 21:28:18 +0100") Message-ID: <87bkp4f9wx.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1668792608; 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:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=UT888Yn7LyiuQckII1iPD+ESvccV3kV+LJTcy/eZrOE=; b=ANJwIpOlb+zZh6XFj7c5P5p7jtFYZuptSM01HJYxG1t4DBcPUpoO2J5+Cq1OMIXFsuMIjp 6s8RITELaZwDRuiAubE2DSLRkEGMuY+GGn80hLOvNxTiis/MYwvakw5CFS5NNApahK2Zvf QERO+Fw1ubDMOs4jauFoYnvpBXj2M439ShSO7OhumONFypPALWpRWbXZOXick5RIn3Esf3 NJFCyun9fZ2CE0VTYT9QsTklPSqqcbwNWPP7LH2AfNrrhmSij1Aep03i8MlOcODLQoK5Xc erymL6mypEL/4tiB4JUJYtQH3RdvOdZ7qkzLElRlx4hdQftUyy6/UoB9BQQpZQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668792608; a=rsa-sha256; cv=none; b=M2Rlw9229UfxTaEl1LrwTHvj7uDfwndGBgK5TUUKVh9VxEICAhjtMHxYh+kl2jG/fLKVWq VpzefbIvZOt7LD7PGU3QyiMQVXuASfwzo0pCFB29o+pOcKMnIy66Ac7Wfm1eQ1QjqVguCW KS+gF8SFfTI2e7KVTYqr6c2+uO8vtCB9AtLrnYIitMjTd2phzd/B03mv2uuWRnaVtgyjHC WWn8A1OKZ4tKJy7x/E6xsoO5fmhZVj/h1SzJLpFJUwoUsB/1lTLtcGUGRQ02e8Q2Us3cR5 Cp58fdo7IfbLsKi9cw5hMEbh10nUM0V27xGTRV5JmXP9LSKr8b7Wj8vAHNn6/g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=eETxZYbw; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=eETxZYbw; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: CA7791AA45 X-Spam-Score: -2.42 X-Migadu-Scanner: scn1.migadu.com X-TUID: 6z8u/zhXXMtw Hello, > "Print all teams, their scope and their members." > (define port* (current-output-port)) > (define width* (%text-width)) > @@ -564,11 +565,13 @@ (define width* (%text-width)) > (scope (format #f "scope: ~{~s ~}~%" scope)))) > (list-members team port* "+ ") > (newline)) This procedure is starting to get a little complex. We could put the above is a sub-procedure called "print-team". > + (sort > + (hash-map->list (lambda (key value) value) %teams) > + (lambda (team1 team2) > + (stringstring (team-id team1)) > + (symbol->string (team-id team2)))))))) That could be in a variable called %sorted-teams. Thanks, Mathieu