From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6NldMAifemAJlwAAgWs5BA (envelope-from ) for ; Sat, 17 Apr 2021 10:40:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id wBoeKgifemBuFAAAB5/wlQ (envelope-from ) for ; Sat, 17 Apr 2021 08:40:40 +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 5A0F525EAB for ; Sat, 17 Apr 2021 10:40:40 +0200 (CEST) Received: from localhost ([::1]:50612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXgVL-0000i3-5l for larch@yhetil.org; Sat, 17 Apr 2021 04:40:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXgVB-0000hx-TA for guix-devel@gnu.org; Sat, 17 Apr 2021 04:40:29 -0400 Received: from mira.cbaines.net ([212.71.252.8]:42820) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXgVA-0008Tj-4o for guix-devel@gnu.org; Sat, 17 Apr 2021 04:40:29 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id 9FDC927BC6C; Sat, 17 Apr 2021 09:40:26 +0100 (BST) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id ff452c5a; Sat, 17 Apr 2021 08:40:26 +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> 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: <20210416194735.0f4ccaed@lubrito> Date: Sat, 17 Apr 2021 09:40:22 +0100 Message-ID: <877dl1xq15.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=212.71.252.8; 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=1618648840; 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=o4THGcpOkClUI+XpnSHb2axcxZgTF8nrvtAc1QEt3bk=; b=O8wJkwzG+2pA7rZagZdf3/7RWftcf+XStmm3hYlR3OejcYnfxIG5SDNN9DRE4Vge7T2GNA eQpGvxVj6uhf9t80DcDjSvvs4ez0GyELgqLeYcm4J7ufEl+2L8k3jE8hFm9bE2fH+uLOrv mypJVi6ULtF4c4Zs7EPgrHBqjOSzCZQFR2SMJ9Z8CZzlXgQKa3QW6LZmSWGwc9ZVCLMNtv GZ366gfhk3buo0yTI5HMkdlAAPhli7AjeWifRoyjAxOS9snJbrRpCiDTcklrI3YXAWmIfR fr+PbMTVURQkefwUdhL+UyOl5ggPMlF4Rz3WLLGwCW2Eq+nZONhmSOu5nXURMg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618648840; a=rsa-sha256; cv=none; b=TTC2Vyh5LGT3N6P4G98i315MGApgM/OeqIv2ebL9XjPsTjVFfR871tFVsXYuePQaTKfWF+ hWm6MK8XCNM3qZt0BDuZfErAP+GAf4qpPGJYCsyfQNtrR+/U7cv0I5h3JwcLuKXmuokZqf 4hpXHnmLgQjUuxwijLTzxZ2RbeH7cRuuI9E2uOnzJE7XKJzsClYZcV/B8yfqHue3y3gO53 4bzCdDPz/UG4w6lcQAqzEqjXr4iUw2UpfyJUz7ilfxOGsyORwRuraLpyhmNTqlRIquqJJw BbpF+oG4GI7okEnOT3GJXheyb9C8Zv897NAn/5yElY6EC6x/F+vDHVussa360g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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: 5A0F525EAB X-Spam-Score: -3.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: H4akWp9ej7xW --=-=-= Content-Type: text/plain Luciana Lima Brito writes: > On Fri, 16 Apr 2021 20:17:45 +0100 > Christopher Baines wrote: > > Hi, > > I hope the patch is correct this time. > I considered all you said, so I separated the > functions to get outputs, inputs and sources. I also implemented > everything inside the case of the json/application. Yep, that's looking good, much neater. >> While a flatter list is what you want when building an HTML table, I >> think you were looking to get a JSON object separating the common, >> base and target elements, right? If so, then map, rather than >> append-map should be more useful to you here. Since above you're >> passing in two lists of three things, if the procedure passed to map >> returns a pair with a string in the first position, you'll end up >> producing the scheme version of a JSON object (an alist). > > You were right about that, I'm using map now. > > Please, let me know if I missed something. > Thanks in advance, I'm learning a great deal! :) 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmB6nvdfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XcKYRAAjib2ipW0sdYXlyubtMO+YNq2olQ8erIU JDr3sbdxp6hgDUJw4yFu424x3ZIqeQ8GT43LpkWc/to3QvF3c3qY8rGlSrLyggq1 jc4S17cVsJoFiIlEeYVyEk03MW3V3cOiYCeJn4ysOeFBOHC9JREixMZOsJfhWo9v pK3iZ6GdGNXt5iSUveFfxflviwnFRrcWRMO+uYYFe2Wj8vyybhAkfq7v61lVxn+K Li/B772OdbXRuBnJt/jE8uPQ3oPcehvRWY7xj6doyj7SEG6tjIactPFufuMOx8rF eA00oPDaL7PtbXVDSpfD93P5C4WsyaV7tql+XOXERRDRQeJs66v6bKQNNsseJKZq S30hpJuGs/iNQf4yTaaIGvrEONIQdr491+4oCbCDxdlKu+XA2z0hJQuit+30ybzn Pm1hq+1d06SfGLrQa5FnLSCYVEzW0u2c2AcR3Tl43nZ5YvgtFrfJEstZC0w6e/59 WTsya7XuhXUWljsxtVvZLyfhQ4Cgla5C9q35lzMiE7S9X6bdT/FNvHeWg/cCz7pl fOzVjoO0xpOxb2kLhGlqElR/0M21Ye4DdYQDE+ra+UQ0sftRu81GXClfrfh1tTif PDIe/BqqVKdRNOjkoPgxi6H5hp83zAECDmHLONT019od8b/JN0eonCIkM748Aoi6 UlxKB8vjK1U= =uVZN -----END PGP SIGNATURE----- --=-=-=--