Re: [Cbor] Status of Appendix A in RFC 8949
Laurence Lundblade <lgl@island-resort.com> Fri, 05 May 2023 17:29 UTC
Return-Path: <lgl@island-resort.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 DAF1BC151B2B for <cbor@ietfa.amsl.com>; Fri, 5 May 2023 10:29:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
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 1X07Hq57n-nh for <cbor@ietfa.amsl.com>; Fri, 5 May 2023 10:29:55 -0700 (PDT)
Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2090.outbound.protection.outlook.com [40.107.100.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 70F8CC151B2C for <cbor@ietf.org>; Fri, 5 May 2023 10:29:55 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=apvlGOldjP7BUMfC9MOQxUMi9ppGWFRUeHc4gKo0oQIvyQkbHOcPBRJ7pUQ7RnfgTE2Bis5KJPwBE3HF7iWZEGWf60KtE63t0B8RtyZTEfs7o8j9G9nUPZr7uIr0tSbx65Gknqzg57Nx3TVKbgMYwQFdMl08y8NXCLrGn1DOdWx4PMuCC+uR3vytSFgYjR67hJD3kdI5N8dYCMvTS5nmE6d7mrrUNxem/YJxeQMoGWgsVhvrCVnA96XwWBs66WA7orldim+YlH9rOQ40WHB2z3ede/1ZoCx4Zi3SoDaHW4M1edSECk5tpjn6ayCGRqQ7icxGT2M/Qx14+9jw/V+UGg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PtICe+N7HfwR/zkEsEpjBVWahAwlTUpbohoXYRP62W8=; b=FNLm6KC2M23cNHXAa33CMW/OvNKVAN7Ip1/BohuwAsBFoyA4SkL6A9FCvoeeEuMJH2aeB0cYTsqSkyn/YFLwOwBQC5OR05NfryNQvhxDkvV4CHUgzcnW3snw7xVatIH7LZ1lvsm5mZPUQ0viZdvJZdKMGn6jfEdT8MVGXm6orSI2g3cl5JUAY3c0szM4xGUPQ3SYwqnJOcvP56QXNX1u/5y9EbNaIVVNdlLtbgK5bVRv3pf7gSzPYp7OR+4j0lIhSAwQWPwrZnQaq3oollDmkSnluNW86u8WVBeJKeeYvEzmiZmcVUc4orXsrrulNqNIAuyueVM8XCEcEhAr309M9w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=island-resort.com; dmarc=pass action=none header.from=island-resort.com; dkim=pass header.d=island-resort.com; arc=none
Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=island-resort.com;
Received: from PH7PR22MB3092.namprd22.prod.outlook.com (2603:10b6:510:13b::8) by SA1PR22MB3194.namprd22.prod.outlook.com (2603:10b6:806:23e::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.11; Fri, 5 May 2023 17:29:50 +0000
Received: from PH7PR22MB3092.namprd22.prod.outlook.com ([fe80::489:cd46:282b:2285]) by PH7PR22MB3092.namprd22.prod.outlook.com ([fe80::489:cd46:282b:2285%4]) with mapi id 15.20.6387.012; Fri, 5 May 2023 17:29:50 +0000
Content-Type: text/plain; charset="utf-8"
From: Laurence Lundblade <lgl@island-resort.com>
In-Reply-To: <e16961f5-edbc-233e-3e24-e3a20bc57ea4@gmail.com>
Date: Fri, 05 May 2023 10:29:48 -0700
Cc: Carsten Bormann <cabo@tzi.org>, "cbor@ietf.org" <cbor@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <14044F50-CAC6-4F4E-ADC2-D4C545FA5A63@island-resort.com>
References: <8233a692-df84-f093-96bf-fe99c03adfc5@gmail.com> <31111796-3CF7-4F8F-A805-4CBE1124E9D8@tzi.org> <e16961f5-edbc-233e-3e24-e3a20bc57ea4@gmail.com>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
X-Mailer: Apple Mail (2.3445.104.21)
X-ClientProxiedBy: BY5PR04CA0029.namprd04.prod.outlook.com (2603:10b6:a03:1d0::39) To PH7PR22MB3092.namprd22.prod.outlook.com (2603:10b6:510:13b::8)
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: PH7PR22MB3092:EE_|SA1PR22MB3194:EE_
X-MS-Office365-Filtering-Correlation-Id: e651f469-c403-4d1f-14c8-08db4d8e54c0
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: nmyFLx9bDeEgIxZ+PE6sQmoLJf/eZCyPXHdCJL8Oi38KzASqU10ePnyBjoMCxM9SfsvguIr1uMsFcQOBQGTsVbS+ax4wrZVIAlACyTeLnYULW5YoYcR2t0bNa6upz6Laz1on5oXKYvmf+nRWSro5xtbgJEW7zeb4NoAjHPisPwdNsIE4Na47PLHc4nChgItgfuKp4KbM+R37GAH2hs/t356T8qzTd0x1crFAHEqbLEcdICZiCyspVJeKKoI2FupiBVUSh54ajQ/30CX0tDZpUJEEHf+jJ33H037msTuYLL+wiBNNVMJKDTCJ2+D/kXHnL/AE5cmZeq4cl01VcHA9jsSi4zhO4vGEZ9+qwbqdhnPdumO68DGm/3hJz+FI7fV+1Db2aiFtBgc/ZxEqamr/sPq1tdaje4pphAUiEd5DQ0dYSJroUpHj84U1w2fE+YN3dXn4Q5Pw5+KeoDwEA8RFg6sR7HdUHPzuIgLICFwx77ljmU6JFbAsG/ILWtdTjThGf/ROsYa/EYEKCN+oN0mAGkAMdnyOkV7/cE+Lq1rUE0/4kjx9+JqgvCMoKd3xkvP3Z688ADMPVR2N4YRU5OTfgTdiuLzhhI3Q3jzCjNsxAMetRxLQSsUNHFjnLkEko7VKCm+NnKrGO1WTPqgV8ukDKPa8oKCRBEQPDyU8paDKfjw=
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR22MB3092.namprd22.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(366004)(396003)(39830400003)(136003)(376002)(346002)(451199021)(478600001)(86362001)(36756003)(33656002)(6486002)(316002)(54906003)(6916009)(4326008)(52116002)(66556008)(66946007)(66476007)(966005)(53546011)(5660300002)(8676002)(8936002)(41300700001)(2906002)(38350700002)(186003)(38100700002)(2616005)(6506007)(26005)(6512007)(83380400001)(45980500001); DIR:OUT; SFP:1102;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: 51u53Mj9QJ2m29ZaRCNjMhWqSqvwE3lOTGtOtnqSVDywlsmr+93rzizN7Lg8H4mJZbvDq/ks0GSmMgC4E5wNz1gcx0j7zjMv6cydUD0oMwf+FH/xO/bIzz40BL6L/sGXi5V98+11MNtzgQ2Enue8xk36b90jDaG9iOV6QhV81RGsX8oT1YWmT5lZ+kimY6NuZJqBHCLL0WKUvME63oKBGSs6ilw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dkuoEi69Z90dRobOwDSebk6bggwbCDOLppEa8du2kaQFeFUF6MpWTZP3TlD3dKRiXubXeqw+No0rTwbeo1GuGj3Lvt5piNLnsOiSW6dmlotpJ3oNwTobMt0isTrS5jZSHZrJqnBL9mYWEXwU7/8z4ddy/OKNasCiKPfCIeGiLL1UP35S1qwK9MlwDwwMlxIGdV9R3/CEjZpwqWSWl78SPbGsbNWRIRAMgvh8lcphUSwWdgjC/lobQoVpEFZ+h2EQOeWe11mIB1a4QdFxK5pQ004+BW4K+LS9GYrQVM3OjFO4DPQlwcZPXs4Ifsc9iHh
X-OriginatorOrg: island-resort.com
X-MS-Exchange-CrossTenant-Network-Message-Id: e651f469-c403-4d1f-14c8-08db4d8e54c0
X-MS-Exchange-CrossTenant-AuthSource: PH7PR22MB3092.namprd22.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2023 17:29:50.7077 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: ad4b5b91-a549-4435-8c42-a30bf94d14a8
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: opUMqv7jh30babI4VbOdx554r1Fsrs8dAZZCV2MNeFenrxzhhl45oEH/jo3Aaj6O+P/cReVaQeueiX+1OQ+Z6A==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR22MB3194
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/sVnxPrhhdxZIn3gEhqmCdgYte-Q>
Subject: Re: [Cbor] Status of Appendix A in RFC 8949
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.39
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: Fri, 05 May 2023 17:29:59 -0000
Us humans can indicate the value in question in many ways, “negative four”, “X subtract XIV" (a stretch since Roman’s didn’t have negative numbers), “-4” or “-4.0”. My understanding is that diagnostic notation is just another way to express a value and does NOT require any particular serialization. There’s not any normative requirement that diagnostic notation encode / decode in any particular way (and that is OK). It’s up to individual applications to say whether a particular data item is to be encoded as a float or an integer, just like a particular application says whether to use an array or a map, a bstr or a tstr. DCBOR changes this by removing this flexibility. It always requires “negative four”, “-4.000000000” or how ever us humans denote it to be encoded as a preferred encoded CBOR integer 0x23. This is a good thing and if you want that behavior use DCBOR. DCBOR will not work for everyone though, so we can’t make it the rule. Some will still want to specify a particular value is always encoded as a float. If an application says that an item must be encoded as an integer, then there is the question of 0x23 (preferred) or 0x38 0x03 (not preferred) or a few others. In practice there’s no profile needed here as every widely used encoder will do preferred and also be able to decode non-preferred, but if you want to be super tight in a spec, you should say only preferred encoding. DCCBOR covers this too. To summarize: - int vs float encoding of a number is an application layer decision - Serialization of CBOR int type 0 and 1 might be a profile issue for some, but isn’t really in practice - DCBOR gives specific behavior for the two above for those that want it LL To give an example from QCBOR. An application calls QCBOREncode_AddInt64() if it wants CBOR integer encoding or QCBOREncode_AddDouble() if it wants float encoding. QCBOREncode_AddDouble() will never produce CBOR integer encoding. There will probably be a new method, QCBOREncode_AddDCBORNumDouble() that will implement the behavior of outputting -4.0000 as a CBOR integer. > On May 5, 2023, at 12:27 AM, Anders Rundgren <anders.rundgren.net@gmail.com> wrote: > > https://cbor.me produces CBOR data items like 0xf9c400 that are rejected by applications building on https://www.ietf.org/archive/id/draft-mcnally-deterministic-cbor-01.html#name-reduction-of-floating-point > > Still both solutions claim to be RFC compliant. > > So the question is simply: is a CBOR interoperability profile a suitable work item for the CBOR WG, or should it preferably be taken to OASIS, ETSI, or the W3C? > > The target for an interoperability profile are the 80-90% of all developers working with enterprise systems as well as open standards for banking and similar. > > thanx, > Anders > > On 2023-05-05 8: > 52, Carsten Bormann wrote: >>> In >>> https://www.rfc-editor.org/rfc/rfc8949.html#name-examples-of-encoded-cbor-da >>> there is a table with some example values given in Diagnostic Notation and how they are to be encoded in CBOR. >>> >>> A problem with this is that the appendix is not marked as "non-normative" although it it is (apparently…) >> It is not marked as informative because it is normative. >> As far as examples can be normative, of course. >> But if your CBOR diagnostic notation implementation does not handle these examples as given, it is not a CBOR diagnostic notation implementation. >>> based on Rule 2 in section 4.2.2. >> CBOR diagnostic notation is a readable representation for what is actually being interchanged. >> If your are changing a 4.0 to a 4, this becomes visible at this level. >>> Why is that a problem? Well, in >>> https://www.ietf.org/archive/id/draft-mcnally-deterministic-cbor-01.html#name-reduction-of-floating-point >>> Rule 1 is (apparently...) applied, which means that "-4.0" would return 0x23 rather than 0xf9c400 proposed in Appendix A as well as by Carsten's CBOR playground (https://cbor.me/) >> Again, diagnostic notation for 0x23 is “-4”. >> Both “-4” and “-4.0” actually have multiple encodings each, with a defined preferred encoding. >>> Taking CBOR to the world of shrink-wrapped software comparable to Open API will undoubtedly require a CBOR interoperability profile. >> You keep saying that. >>> In such a profile, deterministic encoding is a side effect. >> Not at all, as deterministic encoding also does things like determining map ordering, which many applications (and thus their “profiles”) do not need. >> Grüße, Carsten > > _______________________________________________ > CBOR mailing list > CBOR@ietf.org > https://www.ietf.org/mailman/listinfo/cbor
- [Cbor] Status of Appendix A in RFC 8949 Anders Rundgren
- Re: [Cbor] Status of Appendix A in RFC 8949 Carsten Bormann
- Re: [Cbor] Status of Appendix A in RFC 8949 Carsten Bormann
- Re: [Cbor] Status of Appendix A in RFC 8949 Anders Rundgren
- Re: [Cbor] Status of Appendix A in RFC 8949 Anders Rundgren
- Re: [Cbor] Status of Appendix A in RFC 8949 Anders Rundgren
- Re: [Cbor] Status of Appendix A in RFC 8949 Carsten Bormann
- Re: [Cbor] Status of Appendix A in RFC 8949 Anders Rundgren
- Re: [Cbor] Status of Appendix A in RFC 8949 Carsten Bormann
- Re: [Cbor] Status of Appendix A in RFC 8949 Laurence Lundblade
- Re: [Cbor] Status of Appendix A in RFC 8949 Anders Rundgren
- Re: [Cbor] Status of Appendix A in RFC 8949 Brian E Carpenter
- Re: [Cbor] Status of Appendix A in RFC 8949 Anders Rundgren
- Re: [Cbor] Status of Appendix A in RFC 8949 Laurence Lundblade
- Re: [Cbor] Status of Appendix A in RFC 8949 Anders Rundgren