Re: [dispatch] draft-devault-bare-07 to be discussed during IETF 114

Jiri Vlasak <jiri.hubacek@gmail.com> Thu, 28 July 2022 08:51 UTC

Return-Path: <jiri.hubacek@gmail.com>
X-Original-To: dispatch@ietfa.amsl.com
Delivered-To: dispatch@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4A27DC15A725 for <dispatch@ietfa.amsl.com>; Thu, 28 Jul 2022 01:51:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.104
X-Spam-Level:
X-Spam-Status: No, score=-2.104 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_DNSWL_BLOCKED=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 4ZLJlZcdzw55 for <dispatch@ietfa.amsl.com>; Thu, 28 Jul 2022 01:51:32 -0700 (PDT)
Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (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 6456CC14CF15 for <dispatch@ietf.org>; Thu, 28 Jul 2022 01:51:32 -0700 (PDT)
Received: by mail-ed1-x529.google.com with SMTP id i13so1287644edj.11 for <dispatch@ietf.org>; Thu, 28 Jul 2022 01:51:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=8yuZ0SCciiAeZ3ffyn8E/hlgvqVE5i1nM40GzBL58D8=; b=Gq96M8iAkQszL72IfZTu5v5ORAMEwkvSpHEtHQaL6wggKbe6bEwswmLWBLiERFBIqM AUXugodkiPIuX3DjBPGQJ5cWSf594dmI0vmQ9iBYpyV8U8vgjKEuEDkhxm01nky252Pm XKpAms/Zl/hbjFp24+HOocekCTK3H9U5XIDU8fTYAHoTlzfPRhKGNF/2mJJjyoiO2yiO 049wlYqMjacIoddiENyoyEVjOPUw+Ec0D3qQxxgNEp9bTPGf4Jr5BNv5TmJmNfETc87l 6zG44GGGrTO/sBUaqWnkHqhzN+8GsCQH90j5jp7vO5gm2MxlNOZ0mfhna8t67Es4eADv UxWA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=8yuZ0SCciiAeZ3ffyn8E/hlgvqVE5i1nM40GzBL58D8=; b=29CxTIWCEpClaI33B57OlFBkB75ajth/5kfE5wBBYlEhc3T7D7IcaHDDcOT92NI+eT uSMR+nfctMeE0DlZ1vjyZ4UKRTlQxM3GGbnysIHJpUPN8IWmWVXP7NJRFzMjx/k7ysqN X3JwQyFVyAK44wLHA2zTr8vKFJUo5x8jxQGQLhBRRlmufPG6ljClF7xnSLTdBeWdGPzD E0eFIsmDh5NQVFJ+o9ZW8nP96xepGzOxGrJrPAEYFKkb9M30+9ER8Ayk6SPbiyfOV1zM yOLIhWfwHT47sHMASCfm5oqQnuG1iAOq0+Jbe5TT7KMA/1vXi1+ZJEiNFUTeBr4wAeu5 guZw==
X-Gm-Message-State: AJIora8NoRnE+WDW+mkgqRiKs9wKdsrlZ/mtNhn4r4oAtJZR92SXLckL Acr1MUZ0IwmeI6eLLC2vSe68xP78sZQ=
X-Google-Smtp-Source: AGRyM1uvkAlAm2ZZYTZ4+A6trPCcCoYBaNEh0YVcGqjPjq8xJn1+45Z6bLZ7YIWeQVPxh3Rqgu1QuQ==
X-Received: by 2002:a05:6402:345a:b0:43c:abfe:5b75 with SMTP id l26-20020a056402345a00b0043cabfe5b75mr7348290edc.416.1658998290289; Thu, 28 Jul 2022 01:51:30 -0700 (PDT)
Received: from cvut.cz (fw3.ciirc.cvut.cz. [147.32.71.8]) by smtp.gmail.com with ESMTPSA id t6-20020a1709064f0600b0072a66960843sm170365eju.51.2022.07.28.01.51.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jul 2022 01:51:29 -0700 (PDT)
Date: Thu, 28 Jul 2022 10:51:27 +0200
From: Jiri Vlasak <jiri.hubacek@gmail.com>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
Cc: sir@cmpwn.com, dispatch@ietf.org
Message-ID: <YuJOD8c60mrUsDYf@cvut.cz>
Mail-Followup-To: Anders Rundgren <anders.rundgren.net@gmail.com>, sir@cmpwn.com, dispatch@ietf.org
References: <YqC0MHD7MPpcFEuc@cvut.cz> <CAL02cgRVtSdkJxNe50ZLVQgF=3OWaBOC56X_wSdDgEgxovSCng@mail.gmail.com> <YuDxASssK9VtXO05@cvut.cz> <d60e3aad-221a-a7d1-9b34-7bd8b39d6a0c@gmail.com> <YuI9hC33bHV2H84M@cvut.cz> <dacf0f96-1e1f-8ae1-e838-6c39cf120a81@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <dacf0f96-1e1f-8ae1-e838-6c39cf120a81@gmail.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/dispatch/afoMWi9b2D71O9ajHM4b6NVbdHs>
Subject: Re: [dispatch] draft-devault-bare-07 to be discussed during IETF 114
X-BeenThere: dispatch@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: DISPATCH Working Group Mail List <dispatch.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dispatch>, <mailto:dispatch-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dispatch/>
List-Post: <mailto:dispatch@ietf.org>
List-Help: <mailto:dispatch-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dispatch>, <mailto:dispatch-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 28 Jul 2022 08:51:36 -0000

> > Please, note that BARE can not achieve full canonicity -- we need full
> > compliance to IEEE 754 (e.g. NaN values from sensors or infinity in
> > mathematical computations).
> 
> You mean that using variant NaNs for "signaling" is a target for BARE?
> This concept is probably not overly useful since it is not supported
> by many platforms.

BARE target is full compliance to IEEE 754. The design decision is based
on the feedback [1].

> > > For IEEE floating point data, I would consider adapting the CBOR
> > > encoding scheme so the re-serialization becomes fully compatible.
> > 
> > I am sorry but I do not understand. Both, BARE and CBOR use IEEE 754
> > binary formats.
> 
> Yes, but to maintain a consistent format there should be exactly one
> representation of every number, including NaN.

That is not so easy, as discussed in [1]. For BARE, compliance to IEEE
754 is more important than compliance to CBOR.

> Anyway, if canonical representation is of no interest

It is. There are three problematic types with decent trade-off:
- f32, f64: there are good reasons for full compliance to IEEE 754
- str: encoded as utf-8 that does not have to be canonical
- map<A><B>: using explicit alternative (list of pairs) is preferred

When broadly compatible canonical representation is needed, the simplest
solution is to avoid the types above.

> you can safely ignore my comments :)

Not possible on my side, sorry. Your feedback is greatly appreciated. Do
you have some use-case in mind, when canonical f32, f64 are needed?

Thanks,
jiri

[1]: https://lists.sr.ht/~sircmpwn/public-inbox/%3CCAFFTG-a-Vci%2BkS_d_%3DuaX8kyxszqtB-79pcb5580Z9xw72V5kw%40mail.gmail.com%3E