Re: [Cbor] A CBOR tag for alternatives/unions, request for comments

Michael Peyton Jones <michael.peyton-jones@iohk.io> Tue, 05 July 2022 13:26 UTC

Return-Path: <michael.peyton-jones@iohk.io>
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 C97A4C15A72D for <cbor@ietfa.amsl.com>; Tue, 5 Jul 2022 06:26:48 -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, HTML_MESSAGE=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_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=iohk.io
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 p_0brIGKBtCf for <cbor@ietfa.amsl.com>; Tue, 5 Jul 2022 06:26:45 -0700 (PDT)
Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) (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 12307C15A731 for <cbor@ietf.org>; Tue, 5 Jul 2022 06:26:45 -0700 (PDT)
Received: by mail-wr1-x42d.google.com with SMTP id v16so6123883wrd.13 for <cbor@ietf.org>; Tue, 05 Jul 2022 06:26:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iohk.io; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GxKTwc1I1b/YHLmFV3yhvT21n7tZkpdOWrD9npYy3zM=; b=IIoJcEK08Z+bhNuR+TQjlrcK4Pvq3gI++EmUaOKR8c4IkN5221xVCAH8KR97OnWs2T 09V6GtWAnHJhUEn2WBD+lhiufOaBReQRZGJ6YnDbOKIFMlB5PaD1rPR1l9cuT+p6hhfI 1ECOAsw8Jg0hSt2xItClVHhCy6yRqCI366FSH1ZLM6qJf3N6Xln1Cd+rH0fHE3uj7ApH GKECUfUWMiiWWA6oHhJxNYUPA/uL9ve688bqYEZtEGAX9mvgJUkUSTdNypXIsjBd4MD6 PwFB/A2drnnPgyjoADFjS//6aQpe41JSm6Lqc5sjTyIwVva2K/VP2nKixubXzIdpgR5H 1U2g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GxKTwc1I1b/YHLmFV3yhvT21n7tZkpdOWrD9npYy3zM=; b=u59GlQU9in/iil3U/aaAvcy0Lz8w2jkxCg8v0HrpQuHfYO3EXxSJgjjRGBIb94CaC+ IsoETtDLte0i5A6PAgSGfCPHj6oi21eyscvVfeJu+IHkSSb1qHbejtwRmxi5qcwFGKtC jyibVB4EKTFWD24974xQzdBjLfOecnvtcRyct8H96GaabgcKsoceWhDo8h5MP4Hpq8tz jDKUBIDAQXCNJfE6mHJ3ElnaRubuS7IflLtAU1VKwMHRoK81YMy7f5WY0yLo2IxECxPK NDOn3mAJ6vY3k6oOoPFE7p92WuO3U3uiPhoeHRDFfUoPRYUMqsMOaCGr4xIPsG9tnBCU tq9w==
X-Gm-Message-State: AJIora9Luytz+x+arftsz+Z85XKbQ4ikwpVIX3EJvUBVq/R82TNsm/s6 Ks4grYBUeOT5L30djhh/viFUDhnxa9JKalbo4R90Rw==
X-Google-Smtp-Source: AGRyM1skmPhhpr0+TRM6uy7DUoS8Lwvob2BoPlEUJ+O6ZRwVFZHwTjSfTKsC6+tKzSP52qNY1MYGGIw1WVy17i61R1Q=
X-Received: by 2002:a5d:4649:0:b0:21b:c48e:3ce2 with SMTP id j9-20020a5d4649000000b0021bc48e3ce2mr32828652wrs.312.1657027603590; Tue, 05 Jul 2022 06:26:43 -0700 (PDT)
MIME-Version: 1.0
References: <2BBF6463-FDB2-4A8A-B20D-7A1AD976A90D@tzi.org> <CAKoRMYFi8uo2GfHA9s1n+-rMO8Ja9=2qMMzjS9Z=F9r3LFozRQ@mail.gmail.com> <8EA89504-C176-4850-9BB8-C7E7206374FF@tzi.org> <CAKoRMYGmOa0hzEFsJh8kpz0bU5x56Yc9P=DBK-ghU83gXxPv7A@mail.gmail.com> <CAKoRMYGUvmxufQUVyvX2mciq5LCmV0Nz-uE2MJn54GDBB+9DRw@mail.gmail.com> <CAKoRMYF_19V6mu4S9GVqfiNzyQVvvOzX6eYwHp_DtZQoG0xTKg@mail.gmail.com> <4B47F4D7-ADE3-4A22-8A5B-97F4E5FCD933@tzi.org> <Yhd3/bwVUOLJLzWu@hephaistos.amsuess.com> <B6FC521C-1C28-4B11-90F2-DE62308B7168@tzi.org> <CAKoRMYGVii8eQAPsGWJn-H8+kJ81QkOGWpybDK44b5wsJbjxtw@mail.gmail.com> <YmAkKEkRMtVFGiTU@hephaistos.amsuess.com>
In-Reply-To: <YmAkKEkRMtVFGiTU@hephaistos.amsuess.com>
From: Michael Peyton Jones <michael.peyton-jones@iohk.io>
Date: Tue, 05 Jul 2022 14:26:32 +0100
Message-ID: <CAKoRMYGMMnCU5i-pNRopL-t4tzb4bN8MiBipoYFjfip4FN_Dpg@mail.gmail.com>
To: Christian Amsüss <christian@amsuess.com>
Cc: Carsten Bormann <cabo@tzi.org>, Duncan Coutts <duncan@well-typed.com>, Alexander Byaly <alexander.byaly@iohk.io>, Jared Corduan <jared.corduan@iohk.io>, cbor@ietf.org
Content-Type: multipart/alternative; boundary="000000000000b204c905e30ecd5e"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/RLyEDS-4aU6Fzh6__Gf_4wWaVts>
Subject: Re: [Cbor] A CBOR tag for alternatives/unions, request for comments
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: Tue, 05 Jul 2022 13:26:48 -0000

Hello all,

I'm not sure what the status of this proposal is. It seems like there's
broad agreement that this is desirable, but we don't have consensus on the
exact tags to use. How can we reach consensus here? Would it be useful to
provide a summary of alternatives and vote?

Best wishes,
Michael

On Wed, 20 Apr 2022 at 16:18, Christian Amsüss <christian@amsuess.com>
wrote:

> Hello Michael, Carsten,
>
> On Thu, Feb 24, 2022 at 02:12:43PM +0000, Michael Peyton Jones wrote:
> > If you'll permit me a toy example, suppose we have a balanced
> > binary tree of numbers. In Haskell, the data type definition would look
> > like this:
>
> Right, multiply tagged items are something I did not consider
> originally. (My mental model for these was shaped by Rust where there is
> often type information available, so that an Option<Option<Option<u8>>>
> has all the information available to still fit in 16 bit, but that's of
> course only available on types that are just repetitive and not
> recursive).
>
> I'd still be slightly happier if this would take less of the 1+1 space
> (121 and 122, maybe? That would suffice for the deep parts of the tree),
> but given it also has Carsten's support (who is the other expert for the
> registry), I'd be OK with it.
>
> The policy for registering these are "specification required", so it all
> doesn't have to wait for notable-tags to be full and done -- and I'm
> just about to send out another mail suggesting to use this. What's your
> plan for progressing with this?
>
> BR
> Christian
>
> --
> There's always a more constrained fish.
>   -- Qui-Gon Jinn
>


-- 

*Michael Peyton Jones*
Software Engineering Lead | London, UK

Website: www.iohk.io <http://iohk.io>
Skype: michael.s.pj
Twitter: @mpeytonjones
PGP Key ID: 29F64616

[image: Input Output] <http://iohk.io>

[image: Twitter] <https://twitter.com/InputOutputHK> [image: Github]
<https://github.com/input-output-hk> [image: LinkedIn]
<https://www.linkedin.com/company/input-output-global>


This e-mail and any file transmitted with it are confidential and intended
solely for the use of the recipient(s) to whom it is addressed.
Dissemination, distribution, and/or copying of the transmission by anyone
other than the intended recipient(s) is prohibited. If you have received
this transmission in error please notify IOHK immediately and delete it
from your system. E-mail transmissions cannot be guaranteed to be secure or
error free. We do not accept liability for any loss, damage, or error
arising from this transmission