[Cbor] Re: Consensus call on EDN literals single ABNF
Ira McDonald <blueroofmusic@gmail.com> Thu, 25 July 2024 23:21 UTC
Return-Path: <blueroofmusic@gmail.com>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 49426C14F60A for <cbor@ietfa.amsl.com>; Thu, 25 Jul 2024 16:21:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.108
X-Spam-Level:
X-Spam-Status: No, score=-2.108 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iyxV3X8GyWPP for <cbor@ietfa.amsl.com>; Thu, 25 Jul 2024 16:21:14 -0700 (PDT)
Received: from mail-vk1-xa2d.google.com (mail-vk1-xa2d.google.com [IPv6:2607:f8b0:4864:20::a2d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 95BCBC14F61E for <cbor@ietf.org>; Thu, 25 Jul 2024 16:21:14 -0700 (PDT)
Received: by mail-vk1-xa2d.google.com with SMTP id 71dfb90a1353d-4f52c326501so47491e0c.1 for <cbor@ietf.org>; Thu, 25 Jul 2024 16:21:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721949673; x=1722554473; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=s/zkQ39TFZQJKtZTCT8YSI0O4k56Trb6IOCaE16Zq34=; b=V7JkaWNfBkHd4erUwNYU/mf+m+z0qvHeYoGfKlkpcV9ccGQhUoM7kFz8gBAGZsmNOz GPgNIv26NXQTrvlmfbphJWJjMOg/xiRzTuQlmun18JQ/iUQwv0kiyUPYIYt7HAlzTgNG wIaUf54knI8lTiH9mMzLI6IhFPcWDF/Ly61ZggT7qW+ZtTYoLMLfk5D7O+SlkQBMRcfq PR4vxruDxFxs+2sSQuwAeRLxUA2BZ+pOw+jHfgG8EJBjGiJqc2gAbT2VKHWTgA52yhjn iQANqlnUb4ZJxLwGOiepMUpl7FmQs+HPemXNODI9OX8kKGbL2K+zovS9lV6H7j5Zc4nL bIlw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721949673; x=1722554473; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=s/zkQ39TFZQJKtZTCT8YSI0O4k56Trb6IOCaE16Zq34=; b=dI1EPLT6rxiV0bQi/d8N02ekKohOcKCBC2u9D+svOsbHlTE01t18Un0zwT/9s1CE6B FA7DXDQriuFLp1JeayvZCB88+6nJjMW7SMepUBLNqk+fV7Pw3p5cCMzVE1/yswLo+NEW IxmuORFOfWEXrwYI2kduq6NO6evAYcrUP9a13HgCeuSzaFAc8Gekg+8Ri+oW+9vrEDAY PPPe2MTVBu9SR4EJOyut+PGuNdqgxSPSWSaqvgtAbe0PvVWe4cJCCbpnmeCGndn0QDbw NKWdDlrwQW0xU32qIP9APvWHQVvDZLvXCbG7CLbVncVbbPlkIW5vVVPGoEMHBMqR7d2y 72zw==
X-Forwarded-Encrypted: i=1; AJvYcCWr4iiD81nTD2EDecmMBJVJCLq6RcDxd+Z7kUVzA6d3bUsAl4eQlOCZsct1vP251hlqX1H1RWs+dSi0JNno
X-Gm-Message-State: AOJu0Yz/8vrOL8oHhueUuwwRj5P9yTB9MQsD90Q+G0NdwW3VIYNaKjUL ewsb3/2muOViWursifqn+qlRFOgkrqIJn2Y/MtY2xqzw7EeeiF9taW2dKCvcnRj66dQG9I/zd94 M91k8dL4jpUWGHyzM+yQFZGM7DPM=
X-Google-Smtp-Source: AGHT+IHHxu3b7oYXtIRxYLVELeA3zUywFb4EJ5PgdnjYEWvrCLgiEqo0t1ZlmvyssJcA9UYFvl4wsKsxWakDD9zyp7A=
X-Received: by 2002:a05:6122:a0b:b0:4ef:281f:84d7 with SMTP id 71dfb90a1353d-4f6ca2a6516mr4202411e0c.2.1721949673495; Thu, 25 Jul 2024 16:21:13 -0700 (PDT)
MIME-Version: 1.0
References: <ZpxlWGAC9UMLqd9c@hephaistos.amsuess.com> <CAN40gSudKn5NyD+5J5j59V1fvt2e+f_iAXO9FmmH6Mu8Q823RA@mail.gmail.com> <CAKoiRuZZ4UCjUwwUbVuM0_JqXefmrU23YG_3d-JmJEznh7ASQw@mail.gmail.com> <7D42D73E-0DDE-491C-A9AA-BCA6B51773EC@tzi.org>
In-Reply-To: <7D42D73E-0DDE-491C-A9AA-BCA6B51773EC@tzi.org>
From: Ira McDonald <blueroofmusic@gmail.com>
Date: Thu, 25 Jul 2024 19:21:02 -0400
Message-ID: <CAN40gSuqvy5OLjPg9vHJjY8-_wZMT+QgJ8GQU61xYe-mOXyxtQ@mail.gmail.com>
To: Carsten Bormann <cabo@tzi.org>, Ira McDonald <blueroofmusic@gmail.com>
Content-Type: multipart/alternative; boundary="0000000000009c2605061e1aa64c"
Message-ID-Hash: OUMM2DVPFR4M2SXS5PFH6XCPWY6AEABH
X-Message-ID-Hash: OUMM2DVPFR4M2SXS5PFH6XCPWY6AEABH
X-MailFrom: blueroofmusic@gmail.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-cbor.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: Rohan Mahy <rohan.mahy@gmail.com>, Christian Amsüss <christian@amsuess.com>, CBOR <cbor@ietf.org>
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [Cbor] Re: Consensus call on EDN literals single ABNF
List-Id: "Concise Binary Object Representation (CBOR)" <cbor.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/NllI495R-bP2rl_9hD_SWHrDMfs>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Owner: <mailto:cbor-owner@ietf.org>
List-Post: <mailto:cbor@ietf.org>
List-Subscribe: <mailto:cbor-join@ietf.org>
List-Unsubscribe: <mailto:cbor-leave@ietf.org>
Rohan, I can't write a substantive comment. I had major shoulder surgery two weeks ago and have my right arm in a rigid brace 24x7 for eight weeks. I endorse the WG consensus and Christian and Carsten's replies. This note took me ten minutes to write with my left hand on a touchpad on my phone.🙂 On Thu, Jul 25, 2024, 3:05 PM Carsten Bormann <cabo@tzi.org> wrote: > On 21. Jul 2024, at 18:25, Rohan Mahy <rohan.mahy@gmail.com> wrote: > > > > Hi Ira, > > Could you please give your reasoning in a few words? > > I’m also not Ira. > > What Christian said (606 words). > > I have written up my own view below (716 words), if you care. > > Grüße, Carsten > > > There are strong technical reasons for the two-layer model. > > The original focus of the original edn-literal proposal was to have a > pluggable syntax for application-specific literals. > This idea is quite successful and has been embraced already to “plug” a > number of holes in EDN. > From an architectural point of view, a pluggable literal syntax fits > exceedingly well with the whole idea of CBOR tags, which are a pluggable > extension mechanism for the data model behind the interchange format. > (Side observation: It took us a lot of energy in 2013 to get the concept > of tags accepted, because the concept was rather innovative at the time.) > > A pluggable literal syntax can only be done cleanly when it is based on a > common base syntax for all those pluggables. > This becomes clear when you look at section 3.1. > The functionality to handle unknown application-extension identifiers is > rather important for deployability, to minimize friction when introducing > new identifiers. > A lot of experience went into getting this right. > > Increasing the coupling between the base ABNF and each > application-extension by moving to a one-layer model would damage the > proposal by making the base ABNF unstable and by requiring it to change it > for each new application-extension. > > I don't see a point in mashing up the ABNF grammar in the specification to > make it single-level. > The argument that this has always been done this way in production parser > implementation is not at all compelling for our case (the intuition here > appears to come from SIP, which does require production-quality text-based > parsing — exactly what we are trying to get rid of with CBOR. OBTW, > SIP/SDP is two-layer; you wouldn't munch the SDP syntax into the SIP > syntax.) > EDN is not about production parsing, it is a tools and documents syntax. > > More importantly, an EDN implementation does not have to be built directly > from the ABNF the document uses for defining the syntax. > > The next little innovation was recognizing that we could treat hex/base64 > literals the same way as the pluggables; this was just an obvious > simplifying step. > Actually, the various text-based representations for binary data do make > great pluggables — there really is no good reason to be limited to > base16/32/64, and the clear separation even allows us to cleanly defer > defining base32 because we currently have no implementation experience. > > Again, this clean model can be broken up and special-cased and be made > more complicated in the document, but there would need to be a really good > reason to do so. > > The objective of including ABNF was being able to explain the syntax, and, > if possible, even to generate code from that. > (Parser combinators (nom) were mentioned; I don't see a reason why nom > cannot be used for directly implementing the two layer approach, by the > way.) > Doing code generation directly from the ABNF is not the single, normative > way to do an implementation. > There is nothing wrong with an implementer who comes up with their own > grammar, and I wouldn’t mind cultivating a single-level ABNF as a separate > project. > Putting this into the main document (and replacing the clean syntax) is > just premature optimization, like as if TCP and IP had been described in a > single document — this was certainly possible (and was done this way in > 1974), but the invention of layers and the separation of functionalities > was what made IP so powerful. > > EDN-literals as defined today has a clear mental model for the pluggable > part. > It is eminently easy to check that the syntax makes sense. > I'd say that swapping out a major part of the grammar is a rather risky > late change. > There are a few other CBOR and CDDL drafts that really wait for our > attention, and I really don’t want to waste more time on this subject now > that we have a stable basis. > > If there were any merit to doing this change, I might be more open to it. > But the upside is very limited, and it also would be a big regression. > > Of course, what we really want is for ABNF itself to specify how the > two-layer approach works (using the first layer to transform, then parse > using the second layer). Stay tuned... > >
- [Cbor] Consensus call on EDN literals single ABNF Christian Amsüss
- [Cbor] Re: Consensus call on EDN literals single … Ira McDonald
- [Cbor] Re: Consensus call on EDN literals single … Rohan Mahy
- [Cbor] Re: Consensus call on EDN literals single … Christian Amsüss
- [Cbor] Re: Consensus call on EDN literals single … Pete Resnick
- [Cbor] Re: Consensus call on EDN literals single … Rohan Mahy
- [Cbor] Re: Consensus call on EDN literals single … Carsten Bormann
- [Cbor] Re: Consensus call on EDN literals single … Carsten Bormann
- [Cbor] Re: Consensus call on EDN literals single … Pete Resnick
- [Cbor] Re: Consensus call on EDN literals single … Carsten Bormann
- [Cbor] Re: Consensus call on EDN literals single … Pete Resnick
- [Cbor] Re: Consensus call on EDN literals single … Carsten Bormann
- [Cbor] Re: Consensus call on EDN literals single … Pete Resnick
- [Cbor] Re: Consensus call on EDN literals single … Carsten Bormann
- [Cbor] Re: Consensus call on EDN literals single … Rohan Mahy
- [Cbor] Re: Consensus call on EDN literals single … Ira McDonald
- [Cbor] Re: Consensus call on EDN literals single … Rohan Mahy