From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uIT5I4CXw2GFYAAAgWs5BA (envelope-from ) for ; Wed, 22 Dec 2021 22:24:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2IB4H4CXw2HbUwAAbx9fmQ (envelope-from ) for ; Wed, 22 Dec 2021 21:24:16 +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 21CC1AAF7 for ; Wed, 22 Dec 2021 22:24:16 +0100 (CET) Received: from localhost ([::1]:45530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n095q-0003lT-9U for larch@yhetil.org; Wed, 22 Dec 2021 16:24:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n095b-0003l3-0v for guix-devel@gnu.org; Wed, 22 Dec 2021 16:24:00 -0500 Received: from libre.brussels ([144.76.234.112]:60914) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n095T-0005Dm-LD for guix-devel@gnu.org; Wed, 22 Dec 2021 16:23:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libre.brussels; s=mail; t=1640208228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tpHQ1GwcrLQWpHpYdt1rOpkDim7QdBvYI08iB9/3fS8=; b=fM4xmjJRWr3llBY5OhdXScvZ+gR1HtzZPseHLIEB2P+Bt12OykQIh/xpZ9Xm8bMbXtdHdz P/DKUTt6r7SGkbcsWJq1i7wCuSWiwodO8sv/JSbuMhsnjsZ6Qp+DEszynA3IBNHxNcFooc vtKDUCBGXqwvzwVdQzwGEmXgS/wOSZM= References: <86bl18sscd.fsf@gmail.com> <23734860fbd9ee8f96b6878aadde0b2a5fe74b69.camel@gmail.com> From: indieterminacy@libre.brussels To: Liliana Marie Prikler Subject: Re: Convention for new =?utf-8?Q?=E2=80=9Cguix_style=E2=80=9C=3F?= Date: Wed, 22 Dec 2021 22:17:42 +0100 In-reply-to: <23734860fbd9ee8f96b6878aadde0b2a5fe74b69.camel@gmail.com> Message-ID: <87lf0cpcan.fsf@qiuy04.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=144.76.234.112; envelope-from=indieterminacy@libre.brussels; helo=libre.brussels X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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.29 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 X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640208256; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=tpHQ1GwcrLQWpHpYdt1rOpkDim7QdBvYI08iB9/3fS8=; b=XMDhZ+06baQr+Xstsg2XhET0aQpsXmM0bpaS+iGoEJHxm1aueURsMgYyAyxCnNft9uxRhh iObh1M/ckpYAm7//ReraeHpnkMINv4AEq9gUaBT96M042mIpZHnj3qT+shKSLRdoxWCjYl 4Nhaqi2CrnuS4vuzBHLGUDOPrViOsnwBU6m/pXb8eFfTCtuJ7/FGuS8Hg2lINdd/XInrUv 477XpUKN4aP43xqfHNgqV8hrCMHypFRj+urCkQtXTtnfOxh/eWxpzr9coz90gl4S/o+Uzd mZaNSfW27cE62ASVaRBCWTZLT81WZwlloISXwx3iWmAAWDmpLH74R29mInWJ1w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640208256; a=rsa-sha256; cv=none; b=ruITLdLKFEeu04NXxSdh0KkGVk4O0b/0XTkRC0vq28Z9qIVjOuGgTYl8pFM+Y6chvdDhT7 Hl9rXW2cOWo/ySnpOWImnZX4011UiBCegmwLb+VqfL9VgHnq1BUimPziW6OSSRhoNmMDKU y9xLgu608HLCq4VQzlUXsZtyOnRniDamrs6Sx4cwvSaBJq9JkmpcBb4KPB5RixL91nD5d0 x6gFlHk16eUPZbKsslt7BBimSx49TLbYOpa++UU2KVDgLD5DHVj/imfZhqhofxSZPnwSWQ 0HJcEmNuO8FutdEpShr5t5zrnEgR9ufalQe/1mu3ZmIMCX4Cm6FE/Ws+wjhlmA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=libre.brussels header.s=mail header.b=fM4xmjJR; dmarc=fail reason="SPF not aligned (relaxed)" header.from=libre.brussels (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.24 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=libre.brussels header.s=mail header.b=fM4xmjJR; dmarc=fail reason="SPF not aligned (relaxed)" header.from=libre.brussels (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 21CC1AAF7 X-Spam-Score: -1.24 X-Migadu-Scanner: scn0.migadu.com X-TUID: XwSBVH4i0ta7 I wonder if there has been any progress made by Arun Isaac with his program= , Semantically meaningful S-expression diff https://archive.fosdem.org/2021/schedule/event/sexpressiondiff/ ``` Traditional diff implementations, such as GNU Diff, treat files as a flat list of lines. A tree-diff algorithm that can produce minimal and semantically meaningful output is a surprisingly more difficult and complex problem. In fact, for unordered trees, the problem is NP-hard. ``` Jonathan Liliana Marie Prikler writes: > Hi, > > Am Mittwoch, dem 22.12.2021 um 14:05 +0100 schrieb zimoun: >> [...] >> --8<---------------cut here---------------start------------->8--- >> =C2=A0=C2=A0=C2=A0 (inputs >> =C2=A0=C2=A0=C2=A0=C2=A0 (list libx11 libiberty ;needed for objdump supp= ort >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 zlib))=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;also needed for obj= dump >> support >> --8<---------------cut here---------------end--------------->8--- >>=20 >> when the comments apply to only one line as it was: >>=20 >> --8<---------------cut here---------------start------------->8--- >> =C2=A0=C2=A0=C2=A0=C2=A0 `(("libx11" ,libx11) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ("libiberty" ,libiberty)=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ;needed for objdump >> support >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ("zlib" ,zlib)))=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;also needed for >> objdump support >> --8<---------------cut here---------------end--------------->8--- >>=20 >> Other said, this looks better: >>=20 >> --8<---------------cut here---------------start------------->8--- >> =C2=A0=C2=A0=C2=A0 (inputs >> =C2=A0=C2=A0=C2=A0=C2=A0 (list libx11 >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 libiberty ;= needed for objdump support >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 zlib))=C2= =A0=C2=A0=C2=A0 ;also needed for objdump support >> --8<---------------cut here---------------end--------------->8--- >>=20 >> Obviously, we could come up a rule depending on comments, numbers of >> inputs, length, etc.=C2=A0 It was not the case with the old style when >> nothing prevented us to do it.=C2=A0 Because one item per line is, IMHO, >> easier to maintain. > For me personally, this illustrates two things. First, the weakness of > line comments over preceding line comments ad second the verbosity of > old input style. You could easily write=C2=A0 > (list libiberty zlib) ; for objdump > in the new style, which you couldn't before. Therefore, I wouldn't > mandate a "one line per input" restriction, as the only reason it was > ever imposed was a historical limitation. > >> Consider the case, >>=20 >> =C2=A0=C2=A0=C2=A0 (inputs >> =C2=A0=C2=A0=C2=A0=C2=A0 (list bar foo1 foo2 foo3 foo3 foo4)) >>=20 >> then another =E2=80=99baz=E2=80=99 inputs is added, do we end with, >>=20 >> =C2=A0=C2=A0=C2=A0 (inputs >> =C2=A0=C2=A0=C2=A0=C2=A0 (list bar foo1 foo2 foo3 foo3 foo4 >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 baz)) >>=20 >> to minimize and ease reading the diff, or do we end with, >>=20 >> =C2=A0=C2=A0=C2=A0 (inputs >> =C2=A0=C2=A0=C2=A0=C2=A0 (list bar >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 baz >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 foo1 >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 foo2 >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 foo3 >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 foo3 >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 foo4)) >>=20 >> ?=C2=A0 And the converse is also true, consider the case just above and >> what >> happens if foo1, foo2 and foo3 are removed. >>=20 >> One item per line solves all these boring cosmetic questions. >>=20 >> Therefore, I propose to always have only one item per line.=C2=A0 To be >> concrete, for one item: >>=20 >> =C2=A0 (inputs >> =C2=A0=C2=A0 (list foo)) >>=20 >> or not >>=20 >> =C2=A0 (inputs (list foo)) >>=20 >> And for more than one item: >>=20 >> =C2=A0 (inputs >> =C2=A0=C2=A0 (list foo >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 bar)) >>=20 >> This would avoid =E2=80=9Ccosmetic=E2=80=9D changes when adding/removing= inputs >> and/or comments. > In my personal opinion, everything else being equal, changes to > inputs/native-inputs/propagated-inputs should (almost) always be seen > as changes to the field, as would be documented in the ChangeLog. > > I think the usual scheme coding guidelines also apply well to inputs, > e.g. inline short stuff, but don't do funky things when the lines grow > unnecessarily long. > > Now I am putting aside the issue of tooling here, because I think that > humans ought to be able to look at the diff and see that something's > wrong and correct it, but as others point out an "I don't touch > comments" approach would be very fine by me. > > Cheers