Re: [Cbor] Cutting down base64 (b64'....') in diagnostic notation examples, before elision
Carsten Bormann <cabo@tzi.org> Thu, 24 March 2022 20:18 UTC
Return-Path: <cabo@tzi.org>
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 E70273A1427
for <cbor@ietfa.amsl.com>; Thu, 24 Mar 2022 13:18:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.909
X-Spam-Level:
X-Spam-Status: No, score=-1.909 tagged_above=-999 required=5
tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_BLOCKED=0.001,
SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01]
autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44])
by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id vIGq-MUQjmth for <cbor@ietfa.amsl.com>;
Thu, 24 Mar 2022 13:18:10 -0700 (PDT)
Received: from gabriel-smtp.zfn.uni-bremen.de (gabriel-smtp.zfn.uni-bremen.de
[IPv6:2001:638:708:32::15])
(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ietfa.amsl.com (Postfix) with ESMTPS id 441D53A142D
for <cbor@ietf.org>; Thu, 24 Mar 2022 13:18:10 -0700 (PDT)
Received: from [192.168.217.118] (p5089ad4f.dip0.t-ipconnect.de
[80.137.173.79])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by gabriel-smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4KPc3f3znHzDCbG;
Thu, 24 Mar 2022 21:18:06 +0100 (CET)
Content-Type: text/plain;
charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <31286.1648145820@dooku>
Date: Thu, 24 Mar 2022 21:18:06 +0100
Cc: cbor@ietf.org
X-Mao-Original-Outgoing-Id: 669845886.101522-397a92b68beca7227650dd3f22d883ed
Content-Transfer-Encoding: quoted-printable
Message-Id: <033FCC0B-3890-4A4A-968A-1DF274B9AD7D@tzi.org>
References: <0B4A3773-CC4D-4404-9CF4-E58F34AF3574@tzi.org>
<31286.1648145820@dooku>
To: Michael Richardson <mcr@sandelman.ca>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/3yQtXihFTRWZRpfYuiQ4vi95fzA>
Subject: Re: [Cbor] Cutting down base64 (b64'....') in diagnostic notation
examples, before elision
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>,
<mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>,
<mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 24 Mar 2022 20:18:24 -0000
>
>> If you randomly truncate a base64 string (no padding), there is only a
>> 1 out of 3 chance (actually 21/64) that the result will still be a
>> base64 string (no padding). If you cut it down to a multiple of 4
>> characters, the result will always be valid.
>
> That's a good point.
I once said that we don’t need CBOR or CDDL doctors.
I still strongly believe that, but this is an example of arcane ancient knowledge that is never written up properly…
> I wonder if this is worth sharing with the RPC people in some fashion.
So far, RPC was not the place where examples were checked.
But it is knowledge they could pass on to authors.
I’m wondering what checking I could add to kramdown-rfc to make it easier to submit healthy examples. (Kramdown-rfc already checks your JSON.)
> "Is xml2rfc complaining about too long lines, and you just aren't sure how to
> fix that?"
{::include-fold foo1.cbor-diag}
(Ouch, this is more for YANG than for CBOR EDN.)
> "Available now, for an unlimited time, the CBOR how-to-elide HOWTO"
Yes, we need to start the WG wiki…
Grüße, Carsten
- [Cbor] Cutting down base64 (b64'....') in diagnos… Carsten Bormann
- Re: [Cbor] Cutting down base64 (b64'....') in dia… Michael Richardson
- Re: [Cbor] Cutting down base64 (b64'....') in dia… Carsten Bormann
- Re: [Cbor] Cutting down base64 (b64'....') in dia… Michael Richardson
- Re: [Cbor] Cutting down base64 (b64'....') in dia… Carsten Bormann