From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WDHRIh1lfGA43wAAgWs5BA (envelope-from ) for ; Sun, 18 Apr 2021 18:58:05 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id CMaGHh1lfGAFLQAA1q6Kng (envelope-from ) for ; Sun, 18 Apr 2021 16:58:05 +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 DD93A24988 for ; Sun, 18 Apr 2021 18:58:04 +0200 (CEST) Received: from localhost ([::1]:51154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYAkF-0003SL-Ng for larch@yhetil.org; Sun, 18 Apr 2021 12:58:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYANM-0004ct-2V for guix-devel@gnu.org; Sun, 18 Apr 2021 12:34:25 -0400 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]:34337) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYANI-0005AQ-6z for guix-devel@gnu.org; Sun, 18 Apr 2021 12:34:23 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id 49BA927BC6C; Sun, 18 Apr 2021 17:34:16 +0100 (BST) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 584a0320; Sun, 18 Apr 2021 16:34:16 +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> <875z0kkdp1.fsf@cbaines.net> <20210418101207.3ad239ae@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: <20210418101207.3ad239ae@lubrito> Date: Sun, 18 Apr 2021 17:34:13 +0100 Message-ID: <87zgxvimbe.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=1618765085; 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=ENFFs4QgIWJhicPJk7uOTQAeHCG0SNENwmtRFxuPiuI=; b=UQN7pMg3wlV4aWiyQ0kTfqy+wtWiGr4m8sQqKTCK8OFbpZz9cSwg+oYv03SfqNgTHbmkDg z3LdA4nsr02LlCvSnesPpS4yvAHsg5ucHE7dTy+dm0JbvnvQig5N3NmmI6Kf9p1Vvp43in FgKoPzRzAwIiYFBtuR8Spjs5FuFxqZqt361QJs1jTsaG9sli/Hv7vBk0v8gunV7ud5UE4J KS6HOcfW20SxZmK7ZFWGoUdDbCbwFYQlPxCjfWXTVZUVhKSKvBRIfQXYBfpgQ0B0WlFZcl /syk7ffw+EVkOoWgEuKUaGdZ0nEvGFx8Z/eVh5ZIgQWR42E20yfGZ0jTrl7TLQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618765085; a=rsa-sha256; cv=none; b=RgxwU5lCF3DL6m2M2DW5vkogAs6TYCbD2D2WXu3iZ29cSPrXT7XMqVRbl87QuMfqTnPwFL +TdddtzSmPLY15VsKbmq/7/cJvDi6vABK2/PH1jGVKSIq6LlZE9kdor9lwLZ027TYF4gux ADDFxE2Qb7bofcHXpWtK1jEadU6BCzIg75zcU73HyP25kQCZMMzI7P+p9ly50xKzCm+sKf Jtsmd9qC+ClP3zHhx0tmBcyeI/7jnybyMrXLb2zI6OdT5CmbfyqLiJfYLCIYMQWfJ1csb4 sFCdjQ/8bvlBeRpzq5IXsPFPy5Wa45q7AWhNm3g4KhvQ5Ude17JaDTZFzXfm/Q== 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: -4.54 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: DD93A24988 X-Spam-Score: -4.54 X-Migadu-Scanner: scn0.migadu.com X-TUID: rcwTijDCYRwz --=-=-= Content-Type: text/plain Luciana Lima Brito writes: > Hi, > > On Sat, 17 Apr 2021 18:45:14 +0100 > Christopher Baines wrote: > >> Some more things to think about: >> >> - Variable naming, what does the "matched" in matched outputs mean? >> (same goes for the other "matched" things) > > The name matched would refer to the match function, but I changed to > *-values. The names I wanted were "outputs", "inputs" > and "sources", but I already used them. If you have anything in mind, > please let me know. I think it might be good to do something, just to narrow the scope. The outputs binding is valid for the whole let*, and all the code in it, but is only used on three lines, in one single place. Maybe there could be a let there that just defines outputs (maybe named output-groups so you can use the outputs binding for the overall thing). >> - (if (null? ...), I'm unsure if all of those checks are necessary, I >> believe some fields at least will never be "null?". > > I revised it, I think now it's better. > About the "recursive" field, apparently it assumes a string value "t" > or "f", and I convert this to a boolean. Are there other values > possible? That's a good question, I'd look at the database schema, assuming the type of the field is a boolean, the question is whether the field is nullable? >> I think you're getting close to something that's ready to merge >> though. > > One last thing, I see that on the html the commom inputs are ommited. > Does this make sense for the json too? Hmm, I'm not sure why that is on the HTML page, but I'd generally try and keep most bits in the JSON, since it's not as helpful to omit bits if they're not that important. One other thing I noticed is that the alist for the args is being picked apart then reconstructed. Like for the inputs, outputs and sources, I'd map over the arguments alist and transform it to the way you want it to be. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmB8X4VfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XcxMRAAjNWNkB1/F8YlNXdd9HKXj5fw8HqVF5M8 l3JW9GFIvoWkuOANuGkS4IvZqnP5PKz9KRPxaPzKlujDhQrGUb6bkve4A/3RLAF3 BIoktbu4eK4UHS94M5OpN6Fs1UxaHcyQuG/8ZLewHT3/uuMZOcTOSAgguYDIj15e f/ZjPfqHGEWVBeueWjXILHAe31hWyB0gGCrBLMJBPodp18XJf/SMHp+DM254CVNw QsjzvO01TwhcKFmRxQL2lF8IXJaV/GRAk0XpCzbtlNe/grRn6L60stV/W0a3wio8 xYBnGZcYTeEJTHC6WFEMFySoctuTRjbAQfEZdOmIrt/oHJjGFluL2RLUfEsV0cgF 1BcGv1qiPC4Tsn9wKmnKheoVf/Z91BHZ70V0Gl6UxmzHf6sUP6bH3gTItXfc31T1 L3PoGv6Y1YtRkGZgCXxNwN8rREP3U3bwBoJkw7mtKsIQUq22T0aEd4SWzVSW5956 UEUH9XgXZpWhj206O00ibDMslpTeYL2hCiqmfS/AyTVcWbJMJcu4QzLhShyacp+9 twYBqr/zfWmdOmGd7FM7X6wooCveWCul+dpevLgD8B+D/k+A2Ic26X7BqLFlCXe6 EV3FaBBkTFgnX7z3QpJVeY1OCIMSlpQsbS2Kpv9qQCY0PN4lTgZ3XaaTi/jlEthc xS3FeqTOhJg= =lTOD -----END PGP SIGNATURE----- --=-=-=--