From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mAMvEqreemAQRwEAgWs5BA (envelope-from ) for ; Sat, 17 Apr 2021 15:12:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id ACLcC6reemA0LgAAbx9fmQ (envelope-from ) for ; Sat, 17 Apr 2021 13:12:10 +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 E45279A5F for ; Sat, 17 Apr 2021 15:12:09 +0200 (CEST) Received: from localhost ([::1]:38824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXkk5-0002Ks-2j for larch@yhetil.org; Sat, 17 Apr 2021 09:12:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXkji-0002Km-DU for guix-devel@gnu.org; Sat, 17 Apr 2021 09:11:46 -0400 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]:47529) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXkjg-0007Zk-Gd for guix-devel@gnu.org; Sat, 17 Apr 2021 09:11:46 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id 72CD527BC6C; Sat, 17 Apr 2021 14:11:41 +0100 (BST) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 7230323b; Sat, 17 Apr 2021 13:11:40 +0000 (UTC) References: <20210414164859.7acc631f@lubrito> <87wnt4x7e3.fsf@cbaines.net> <20210415130947.7387a546@lubrito> <87o8efxhil.fsf@cbaines.net> <20210416120740.05a819ca@lubrito> <87czuuxmdd.fsf@cbaines.net> <20210416154600.62c4a97d@lubrito> <87a6pyxcme.fsf@cbaines.net> <20210416194735.0f4ccaed@lubrito> <877dl1xq15.fsf@cbaines.net> <20210417094857.14599c72@lubrito> User-agent: mu4e 1.4.15; emacs 27.1 From: Christopher Baines To: Luciana Lima Brito Subject: Re: Outreachy - Guix Data Service: implementing basic json output for derivation comparison page In-reply-to: <20210417094857.14599c72@lubrito> Date: Sat, 17 Apr 2021 14:11:37 +0100 Message-ID: <87bladjbsm.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-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@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618665130; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=duWlBrnfd5gDAjOJBfTcGpOxs+lzd1DlInabasoHZ4w=; b=RwKui12J/gSyDc/3rIUWrS3azJnff4saJCAHN+VIqCzRX19g58UgW609nv7crrxL2K03k9 rfnVP5vZ2g2WN0YfCRUMpElBs4JX5JiAtSUJ+Ob8UfwO/cr8Ok9j2okWDcJLq0NYrc0pg4 IAmhl1p1VFqDVO0UkXBfl1/NsVRtf/G43FRMZhBrpgNBgAqLYzjFTBMyT2phhq7ZwxL3NC 2lk38jXBjpbGPmc7YzjBx9I2rVKp7tCS5RRptwNDHYYx9L8cC2ZSwWFlmbzv0SO9WktbM7 f3mleBjuNOml98/qlwEbWcKriPXi6hSCR5ti47kfS5lW8ZwiGcTXu19lSjYm4w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618665130; a=rsa-sha256; cv=none; b=RJO4MTCl0VSyN5Gy9RVs/HsFB+HZbOQwxNdQxTjpCmTx1yZLONdAF+TBEYNW+Td0hDCpeC v0JMT90itGDdHFe9C3qRo5nb+cvQQs+89hKb9ZXTs699DAcuwA4BtdGJPTIq8R2PpBgLIW OktSB+hg4tVpNdXW56G2siueSFclLzvxlZTywUiLHN0GGD/9OvYgNF/fUmIa9ABf+X+C0Z VqvACdl76u6YS6K3NEVjONl9qJE2qCZ88Rdsw6Lc/6ra/Rx4RQoIubTL35KCbwwIl9BMgm 7A6MPg/+RSnlcH/WXS/C5WOKxwb+Gm4Vq5NxyMi3NCC+7bLvucMCGu/wmk6v4Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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-Migadu-Spam-Score: -3.04 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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-Migadu-Queue-Id: E45279A5F X-Spam-Score: -3.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: iFLhLK7ivPjM --=-=-= Content-Type: text/plain Luciana Lima Brito writes: > On Sat, 17 Apr 2021 09:40:22 +0100 > Christopher Baines wrote: > >> I think you're getting there, but it looks like you're close to what >> you want with matched-outputs say, and then later you pick bits out >> of that alist, generate vectors from the lists, and then rebuild the >> alist. I think you can remove all that complexity by just tweaking >> what you're doing up when you generate matched-outputs. I think this >> is true for matched-outputs, matched-inputs and matched-sources. > > It's beautiful! > Now I could understand better the alist, and things make much more > sense to me. I simplified this part of getting properly the values from > matched-outputs, matched-inputs and matched-sources. I think that's better, but you're still taking the matched-outputs, matched-inputs and matched-sources alists, then later making the values vectors rather than lists. The code would be even simpler if you converted to a vector just after the map that produces the relevant lists. I haven't looked to closely at the rest, but it looks like the environment-variables binding is unnecessary, given how simple the bit of code used is, it can just be inlined in the one place where the binding is used. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmB63olfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XeSkQ//XKdmJ2LS7YIK67+bpWwIAgpuXgsWsbSm AtnOlzzZT8RbnUEe522GXPxBzo7t3pvNnu7hrKyZorYH5B549caNmqfDYIMqNngP UuDfzqVysQY1NPs62k8b7fW8Xi7YW17HG+dik/OStLnFIlTBQWePRq9y56sMv5z1 InxPpCvDPaJb0ATQjkgZHEweLfokW79dwfUa5AOyiYmPyT83kjJ6pMzw4cSWvD39 OyfbTChI8S53S7s1rm5i2mDcwQrDDoTfRNdFcIiIGKD5VV+UC3McXoVxXjmU6A0l VU6tEsRbrGV7pDlBsMplSLBOIWCNW1AwXSM0H+NOPteJtQCMDMdfC7WjT/gzv7Yb Qh07BLpTGVEbuB/WZCNE2+gEYIIx9AfMPOXFmvmzj9UhJ9LCsiB1gOisCoSrHyJc 1Z6B5L84LSxOtvly05OVkKLDDigu9wfEmS/FpTdAAg8E82q9Z3ANCCbZajrvhwP7 fGH4gUYmYCJqwj+ZyFHRbIQmX99vaFpyv3bRHZnrThxdp4DCc3XCyKYjLh5GA3Kw /uAL/H4g3fKcvVa9BUQPXw91TYqCtfqBuQeM9Cp6JF0Y+ojlUDeEv4PxM6Y52sF9 CUKPthj7ubFAgobMQGlvEdV/rH+6sQwvVG2NUPR7vVTs2UHFfkc1UIW7kd/Xm8iX xk0C1hLsBA8= =1tQ8 -----END PGP SIGNATURE----- --=-=-=--