[Cbor] Re: I-D Action: draft-mcnally-deterministic-cbor-10.html

Anders Rundgren <anders.rundgren.net@gmail.com> Mon, 29 July 2024 12:40 UTC

Return-Path: <anders.rundgren.net@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 419ADC14CF17 for <cbor@ietfa.amsl.com>; Mon, 29 Jul 2024 05:40:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.105
X-Spam-Level:
X-Spam-Status: No, score=-2.105 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, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] 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 6SAAM5Ukzumx for <cbor@ietfa.amsl.com>; Mon, 29 Jul 2024 05:40:54 -0700 (PDT)
Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 711CEC14CEFE for <cbor@ietf.org>; Mon, 29 Jul 2024 05:40:54 -0700 (PDT)
Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-427ffae0b91so20863605e9.0 for <cbor@ietf.org>; Mon, 29 Jul 2024 05:40:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722256852; x=1722861652; darn=ietf.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=iLNm+dp1Bd4KTiDPaHIm1AkA9sd+IH13pn1Twsb+9Ls=; b=VUxFZWJBt3WnaZBB9/PxK6cKaQB1ZUiM7yE4pWMaYPkL4PFmlg/IAiYzZYNghllm8R bDeDjcqe8hxPuzhm080/oSdQ/43c3WLWJxLv63HHIk+57gdaSqSVPvYeqdx9xvDwgYad oFpxRHs2cN9ypP9o2OEywb30dYuGz9BvxuGsxcUAfX1BvBG40LnKQpTQepO2EsqGYfxi uTj8QlhaOdFH1n5mQPdrM7Ivj70mSvjnTd07Uq624ZaPJVkZ/vhRXoKckJfGtyQpV3cK mYZaPsL4vauMENcZ71XhAKb07CpqdFX3dc8k7dDf+b7ojoJAX1gGQGcD5oDlpMnr9+46 f7vw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722256852; x=1722861652; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iLNm+dp1Bd4KTiDPaHIm1AkA9sd+IH13pn1Twsb+9Ls=; b=eWkZfZ6u7i/I1Te3ZDvE9gex6267vCDQiVSjSnk6ouZVm/8WP/sfYbv2il7Y6zBoT0 Iwmcb4vic7VQXIyjsp3y1/3QTCFE5962f+y5Gr6sUEwAAxuQD3IVlnOhMVdWQ/pvmH1l 4LebaX1+PLA+KUSGVMCO6xKF/dkVJLs6UwnNfyLE4H7Jp4/btm+A9S1FWQl/TJW9W6vF fwd7cPTCNAu5JUZJK3k2yPLqOmObRSM+wJp4Qas82hBWW4Iqlk8t0j4hZFJVN1z0rJzv b5daLgVyiIUlGki/5ddZxt9syL3IDSuTl4hXb0nDgGdvNbKAk9kMO8oAf0oYHpZZZWv0 h4pw==
X-Gm-Message-State: AOJu0YyCW/ua/fMsTqLZcPSy1decpRKEkq1YV2HkegUyYVhMK20TOUDh 85XT4bcV4May2L+UxheoxpxubbRakkaITqFR70WBQYboU53tNulE
X-Google-Smtp-Source: AGHT+IGkbFUjhPaQttJDPrUo5Z4wGj0v9JALH3gG7k2SvHHSs8idUzwhEOrSjmeEdaQHYS7ZUzETEQ==
X-Received: by 2002:a05:600c:6c8a:b0:426:63f1:9a1b with SMTP id 5b1f17b1804b1-42811e0b6femr64635075e9.33.1722256852340; Mon, 29 Jul 2024 05:40:52 -0700 (PDT)
Received: from ?IPV6:2a01:e0a:e1b:64b0:70e0:e69e:21d2:66ca? ([2a01:e0a:e1b:64b0:70e0:e69e:21d2:66ca]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-4281c79ea02sm43126795e9.46.2024.07.29.05.40.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Jul 2024 05:40:51 -0700 (PDT)
Message-ID: <5a2b1212-200e-4c17-acdf-1278c4539531@gmail.com>
Date: Mon, 29 Jul 2024 14:40:51 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: Wolf McNally <wolf@wolfmcnally.com>
References: <a962e326-ab3f-4857-a1ee-2042cf87f32a@gmail.com> <F3E4450A-EA4B-437E-9C58-5DB3972A152C@island-resort.com> <6601a16c-2b2e-45b2-b4e8-7bd4ba136401@gmail.com> <ea6a35e1-18a7-4bea-8ff8-5249e1f26b71@gmail.com> <CAEBC446-7730-4473-AC93-7908ADCB78B4@wolfmcnally.com>
Content-Language: en-US
From: Anders Rundgren <anders.rundgren.net@gmail.com>
In-Reply-To: <CAEBC446-7730-4473-AC93-7908ADCB78B4@wolfmcnally.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Message-ID-Hash: MCBB7RYAUBBPPWTUN7MI6HJSGDU4MQDX
X-Message-ID-Hash: MCBB7RYAUBBPPWTUN7MI6HJSGDU4MQDX
X-MailFrom: anders.rundgren.net@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: "cbor@ietf.org" <cbor@ietf.org>, Christopher Allen <christophera@lifewithalacrity.com>, Shannon Appelcline <shannon.appelcline@gmail.com>, Carsten Bormann <cabo@tzi.org>, laurence Lundblade <lgl@island-resort.com>, Joe Hildebrand <hildjj@cursive.net>
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [Cbor] Re: I-D Action: draft-mcnally-deterministic-cbor-10.html
List-Id: "Concise Binary Object Representation (CBOR)" <cbor.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/aAbszqUyhbsRtlMabGZa8lDVDhQ>
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>

On 2024-07-29 10:08, Wolf McNally wrote:
> Anders,
> 
> I don’t hear anyone here agreeing with you.

Hi Wolf,

You are 100% correct but it might have an another explanation than you think: the "WG" (You, Carsten, Laurence, Joe, ?), is focusing on *Tool* developers*.

I obviously do not: https://mailarchive.ietf.org/arch/msg/cbor/PFZXSxyvQ7zG6Cj6QmzHd-_K52g/

However, targeting the bulk of *Application* developers, indeed makes interoperability the #1 concern.

Anders



> 
> Not this time, or the last ten times you’ve repeated yourself.
> 
> You might want to consider the reasons for that.
> 
> (And I definitely call on anyone else here who does agree with you to speak up.)
> 
> There are no “breaking changes” in dCBOR.
> 
> dCBOR can be decoded with any CBOR (or CDE) decoder.
> 
> dCBOR can be encoded with any CBOR (or CDE) encoder.
> 
> It won’t be super easy, but you can do it.
> 
> That means that dCBOR is interoperable *enough*.
> 
> But interoperability is *not the point.*
> 
> If CBOR were all about “interoperability” then you could use a CBOR decoder to read a JPEG.
> 
> But you can’t do that. Does that mean CBOR is “broken”?
> 
> No.
> 
> Because the purpose of CBOR is not to be interoperable with everything, or indeed *anything* except CBOR.
> 
> And it is not the purpose of dCBOR to be interoperable with anything except dCBOR.
> 
> “All dCBOR is CBOR, but not all CBOR is dCBOR.”
> 
> “All JPEGs are binary files, but not all binary files are JPEGs.”
> 
> See the pattern?
> 
> CBOR floating point '2.0' is *not* dCBOR and never will be.
> 
> So if you encode CBOR '2.0' and send it to a dCBOR decoder, it *will* be rejected.
> 
> That’s not a “breaking change”.
> 
> And if you present ‘2.0’ to a dCBOR encoder, then it will be encoded as an integer '2'.
> 
> You simply *can’t* encode '2.0' with a strict dCBOR encoder.
> 
> But that is *also* not a “breaking change”.
> 
> Not what you want? Don’t use dCBOR.
> 
> Interoperability is great. But it's *not* the be-all-and-end-all of standards.
> 
> dCBOR is not *about* interoperability.
> 
> It’s about *takes deep breath*…
> 
> …DETERMINISM.
> 
> ~ Wolf
> 
>> On Jul 28, 2024, at 10:47 PM, Anders Rundgren <anders.rundgren.net@gmail.com> wrote:
>>
>> Hello WG,
>>
>> You may think I'm repeating myself and to some extent I do.  However, this posting is about INTEROPERABILITY which is one of the pillars of standards.
>>
>>
>> Since dCBOR introduces a BREAKING change [1] with respect to its parent profile (CDE), I felt inclined commenting a bit on the actual draft.
>>
>> IMO, a revised draft should be fitted with an *Interoperability Section*, giving potential application developers a "heads up" on what to expect: CDE and dCBOR are incompatible at the application level [2].
>>
>> The primary source of the incompatibility is the reliance on numeric reduction.  According to the draft the integer value 2 and the floating point value 2.0 are "semantically equivalent".  This seems like a stretch since floating point numbers and integers have quite different characteristics with respect to math and value ranges, which also make them having pretty distinct use cases.  In addition, the draft alludes that numeric reduction better matches the requirements for deterministic representation of numbers.
>>
>> Anders
>>
>> 1] Although the draft claims that dCBOR is not a "fork" since it maintains compatibility with CBOR [RFC 8949], the reality (the only thing that matters for application developers), is that the referenced decoder implementations [rightfully] reject 2.0 if encoded as CDE.  In the other direction, CDE-compliant decoder implementations and associated applications like https://github.com/cyberphone/CBOR.js/blob/main/test/xyz-decoder.js#L20 would equally rightfully balk at 2.0 encoded according to dCBOR.
>>
>