Re: [Cbor] eliding CBOR diagnostic notation binary contents

Michael Richardson <mcr+ietf@sandelman.ca> Sun, 13 March 2022 21:29 UTC

Return-Path: <mcr+ietf@sandelman.ca>
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 91C123A1743 for <cbor@ietfa.amsl.com>; Sun, 13 Mar 2022 14:29:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.109
X-Spam-Level:
X-Spam-Status: No, score=-7.109 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, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=sandelman.ca
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 x9WsICsGZCcL for <cbor@ietfa.amsl.com>; Sun, 13 Mar 2022 14:29:35 -0700 (PDT)
Received: from tuna.sandelman.ca (tuna.sandelman.ca [IPv6:2607:f0b0:f:3:216:3eff:fe7c:d1f3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 65F1E3A105E for <cbor@ietf.org>; Sun, 13 Mar 2022 14:29:34 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by tuna.sandelman.ca (Postfix) with ESMTP id 77E0038A5F; Sun, 13 Mar 2022 17:39:14 -0400 (EDT)
Received: from tuna.sandelman.ca ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id exvUy5xDp_LK; Sun, 13 Mar 2022 17:39:12 -0400 (EDT)
Received: from sandelman.ca (obiwan.sandelman.ca [IPv6:2607:f0b0:f:2::247]) by tuna.sandelman.ca (Postfix) with ESMTP id 211E138A5E; Sun, 13 Mar 2022 17:39:12 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sandelman.ca; s=mail; t=1647207552; bh=gnmIQ/Q4tH40MTYmzkAYauYdbCJKiBGNw6pPsLXWDPI=; h=From:To:cc:Subject:In-Reply-To:References:Date:From; b=2d0kjpHblBzpcGw3nnayEv3P1Ve942dMnmmGRIfquLp1J3qcv3Rj0Omublc6tKGUu 3/PjGwPGuV6wy1U003Qkt2VDTTNdA6PXA8CNLmQP+Vj2v9thjIkew30I5Q1r62df19 UNg1wog6vqNb2prhx969O5Z7l/zy7ROcgnEpYgmV4DIIPUiSp0EMLvUsZjuqAnshHA TixLiz4s1qji+ImubtN8qqWGG6UzjF1JCCv3Igdl/+db699SSPop5V6xMcXQ/ifGgg bf+xAedlc5+J0zEEVZCaxyUZfmXVwAtbyZ+3cihGSXYvY3mXQkZoHlIO35OALWX8mk oGobaNilF8dnQ==
Received: from localhost (localhost [IPv6:::1]) by sandelman.ca (Postfix) with ESMTP id 6463F468; Sun, 13 Mar 2022 17:29:29 -0400 (EDT)
From: Michael Richardson <mcr+ietf@sandelman.ca>
To: Carsten Bormann <cabo@tzi.org>
cc: =?us-ascii?Q?=3D=3Futf-8=3FQ=3FChristian=5FAms=3DC3=3DBCss=3F=3D?= <christian@amsuess.com>, cbor@ietf.org
In-Reply-To: <5FA0EAE5-2E02-4968-847D-8F516C2FCC65@tzi.org>
References: <289545.1643998363@dooku> <982B35D9-8541-4AB6-88DE-55018DB5BB6B@tzi.org> <27168.1644006597@localhost> <D6BA4596-C08F-4CDF-AEB4-20C264D3BB34@tzi.org> <YgO2eOiH5gMdwSGd@hephaistos.amsuess.com> <13A46D26-E131-42C8-B325-C57857246699@tzi.org> <YhY8jT6/APLawwBF@hephaistos.amsuess.com> <9709.1645661896@localhost> <83575A66-894D-4013-9E89-AA3E0DB4641B@tzi.org> <30798.1645665697@localhost> <5FA0EAE5-2E02-4968-847D-8F516C2FCC65@tzi.org>
X-Mailer: MH-E 8.6+git; nmh 1.7+dev; GNU Emacs 26.1
X-Face: $\n1pF)h^`}$H>Hk{L"x@)JS7<%Az}5RyS@k9X%29-lHB$Ti.V>2bi.~ehC0; <'$9xN5Ub# z!G,p`nR&p7Fz@^UXIn156S8.~^@MJ*mMsD7=QFeq%AL4m<nPbLgmtKK-5dC@#:k
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature"
Date: Sun, 13 Mar 2022 17:29:29 -0400
Message-ID: <26078.1647206969@localhost>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/DZX7X3PW9v76mAl4PZCz7heROqE>
Subject: Re: [Cbor] eliding CBOR diagnostic notation binary contents
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: Sun, 13 Mar 2022 21:29:41 -0000

Carsten Bormann <cabo@tzi.org> wrote:
    >>> Actually processing elisions should be a special flag.  That should
    >>> address your concern.
    >>
    >> Yes, that works for me.

    > In cbor-diagnostic, this flag is now “-ah”.

Cool.

    > $ gem install cbor-elision

    > $ echo "h'...4711...'" | diag2pretty.rb -ah

The direction I really want to automate is cbor2pretty, when generating examples.
There are some ways in which I can see doing this:
  1) some option which just elides any bstr longer than X.
  2) some option which elides based upon some other (content-relevant) tag.
  3) some option which takes some kind of CBOR-PATH to specify what to elide.

I think that "CBOR-PATH" is not yet a thing, but I think I've heard you talk
about how we can essentially use JSONPATH to do this?

--
Michael Richardson <mcr+IETF@sandelman.ca>   . o O ( IPv6 IøT consulting )
           Sandelman Software Works Inc, Ottawa and Worldwide