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 WK8PKs8ee2DzOwEAgWs5BA (envelope-from ) for ; Sat, 17 Apr 2021 19:45:51 +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 wLh7JM8ee2DRbwAAbx9fmQ (envelope-from ) for ; Sat, 17 Apr 2021 17:45:51 +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 58AB8CE0E for ; Sat, 17 Apr 2021 19:45:51 +0200 (CEST) Received: from localhost ([::1]:46478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXp0w-0003ps-IG for larch@yhetil.org; Sat, 17 Apr 2021 13:45:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXp0c-0003ph-Dd for guix-devel@gnu.org; Sat, 17 Apr 2021 13:45:30 -0400 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]:56821) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXp0S-00054Y-CR for guix-devel@gnu.org; Sat, 17 Apr 2021 13:45:30 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id 6165C27BC6C; Sat, 17 Apr 2021 18:45:17 +0100 (BST) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 3d4a8c8b; Sat, 17 Apr 2021 17:45:17 +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> <87bladjbsm.fsf@cbaines.net> <20210417110829.03ed516d@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: <20210417110829.03ed516d@lubrito> Date: Sat, 17 Apr 2021 18:45:14 +0100 Message-ID: <875z0kkdp1.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=1618681551; 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=BYu8JDuGVdcIgr89BnY6ykSBOQ3VD77QeAUcVIsVzgU=; b=M4fjxztBTjX7TMeaG8d4DEtKkR4+VXdlaCBT8EffGIjoy+7yjeqHgDP2/9vtR7Nh1KkY0Y 5EHK/Wwe/jo7Cu6iut+XcnuxKhhciZXZ2awZPtkBiGeFq/tvjVxLCfj0KYn6W9rL/Ifjie TPbg/7KhaZUjPgsk96M/npoTX423mo7kHpcECjhY/J2QnwIdRMzuJ0j9ZCpdo8/kTJKWFf YYDQwoxEDMLQYkk41sQtEnHh3JJvdUidKr+ZKx8DAiJCVymaDl8S8tXYew9tsusGboj6nc BWpzFuLg0tt2FVSA57cdmoxLZWiSLo83nBkCkBfAu2Ujwh+episGyJjTvKJvrg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618681551; a=rsa-sha256; cv=none; b=E4uWN6egFNjy2uQMXho4yUUAAjaY/2BDZuKIAD44NHc1pg/ff2Gz8VzoKVJLa8OthlLmXy mqCwa4U4YIoVk2AH70N/zwK45eIq8FLR5FkhdkzpdNT6r0LkGT0PNh7BD2Gj2OhRKIlFEG 08FqAdBb3gpYyqWJ7KU2+IqaHKSt8/nQSRI+yPj9WegYQ6WwKKjOpqdu6EegY3ivg0EaaY JByKjk1T0f0cSg+s0oWViC5HBSXGMQSbIzfDOlsWwuDg3A53W9vTA5mcgBMUfW6dramhb3 jA/aTwj8Ost77waEVGb8hw2VpOzRPuW/U6i7icZqvahUQOptC8LBlgry0bs7Hg== 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: 58AB8CE0E X-Spam-Score: -3.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: a689hLCqONex --=-=-= Content-Type: text/plain Luciana Lima Brito writes: > On Sat, 17 Apr 2021 14:11:37 +0100 > Christopher Baines wrote: > > Hi, > >> 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. > > Done! :) > I even simplified some other stuff, based on what you said. Great, I think that looks much simpler. Some more things to think about: - Variable naming, what does the "matched" in matched outputs mean? (same goes for the other "matched" things) - (if (null? ...), I'm unsure if all of those checks are necessary, I believe some fields at least will never be "null?". - Builder and arguments grouping, I think this makes sense on the HTML page, as they're connected, but does it make sense in the JSON? I think you're getting close to something that's ready to merge though. Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmB7HqpfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XcRHRAAgZmjrPAP5uyD3zVi2PtXZ5PHKsC9B4yM vl1aOPDeUuTZ+HKUMj4CrknECtYrzLW4pSwYvG0DTaL/kJVV/iKrakM7/bjRfGam KDnD8rjm9raFke3d0aqmKq9fcLUrnAYNxxHkfM34OvugxldeRFNj0VG96EfbHlnm n4kLU/KYo1r3JmjNiYjjKjMr9xXxk8lDoSSwwFeCCsDzm+b54r+HSXtmKHIrabGt +tej84c+wrr50JUJyueToYYHf2EO7Dt7bxEjlAO3gz/Q3q3vND9XGMRbg0Jc+WRW ORuF4QU9Q5+VNscLwxN+t3ddDy/y4SrzrE8n8bk0p+xrP5dDp0JlAb0Rbw7OnfEo vz1Ko0N7HSFzdXHhLlFM6og5itKLszf0Ji+Bsua0OI2XvMsjO2ZVd9xtJHjgvYoZ Q6M5Dbta2NkUrcz3R91fC8z1nO+wHe2oRGEQx9cZ0Vp/+laPoZ1XdyqjCcAgJEUH IXWwSvl7ETrCfKTrSjkYWN5C0bHZvfcWxGJKGrKWTj5VsYUu3H+U9tgtH/r10wDY w/YI3+dgSzau20WDHkaCUupdqCYb4uw9Qg0Zk4NGWWQsaMEq6t5dFGSOuOlT43zO ziAIXVYNGxRmDHjxbF9nQVPZvTxX40QXyR8JfIEqNqhNDLQFhFAUwI6TIo22PO8y b4jBixi5OHY= =9FG0 -----END PGP SIGNATURE----- --=-=-=--