Subject: Re: [Cbor] Consolidated set of tags for containers

From: Kio Smallwood <[email-masked]>
Date: Tue, 06 Apr 2021 18:19:47 +0100

I'm quite happy with this. Especially the use of abstract data types. 

I would like to add that Sets already have a tag of 258

Would it be worth considering how to handle multiple tags that fulfil the same role e.g. tag 258 and 144?

Cheers. 
Kio

On 19 March 2021 00:27:53 GMT, Emile Cormier <[email-masked]> wrote:
>I branched my consolidated map tags proposal to include tags for
>list-like
>containers. This now lives on the "with-lists" branch on my GitHub
>repo.
>With the addition of list-like containers, the proposal now contains
>tags
>for representing containers like lists, sets and bags.
>
>https://github.com/ecorm/cbor-map-like/blob/with-lists/README.md
>
>Summary of changes:
>
>* Added "Category" column for either "Dictionary" or "Collection"
>
>* Added dictionaries with arbitrary keys and uniform values to make
>decoding the traits less insane. This increases the total number of
>tags
>from 20 to 24.
>
>* Removed programming languages section in favor of abstract data types
>that model each tag. Much less maintenance this way.
>
>I await your comments, critiques, and questions.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

---

From: Emile Cormier <[email-masked]>
Date: Tue, 6 Apr 2021 18:02:04 -0300

> I would like to add that Sets already have a tag of 258

Thanks! I've added a reference to tag 258 to my draft.
https://github.com/ecorm/cbor-map-like/blob/with-lists/README.md

Would it be worth considering how to handle multiple tags that fulfil the
> same role e.g. tag 258 and 144?
>

I'd say that a decoder should treat them as being synonymous.

One thing that should be considered is removing the tags for uniform keys
and arbitrary values. That would reduce the number of allotted tags from 24
to 20 (in my "with-lists" variant, that is). However, the logic for
decoding each trait would become more complex, as it would no longer be
"one-hot" bit encoding (in EE parlance). A small lookup table could take
care of associating traits with tag values. Such a table would only be 20
bytes if traits are packed into bits.

Cheers,
Emile Cormier

---

From: Emile Cormier <[email-masked]>
Date: Wed, 7 Apr 2021 18:44:39 -0300

On Tue, Apr 6, 2021 at 6:02 PM Emile Cormier <[email-masked]>
wrote:

> and arbitrary values.

Sorry, I meant removing tags for arbitrary keys and uniform values, which I
believe would be a rare use case.