Re: [Gen-art] Genart last call review of draft-ietf-httpbis-header-structure-18

Poul-Henning Kamp <phk@phk.freebsd.dk> Tue, 05 May 2020 20:29 UTC

Return-Path: <phk@critter.freebsd.dk>
X-Original-To: gen-art@ietfa.amsl.com
Delivered-To: gen-art@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A9FE13A09ED; Tue, 5 May 2020 13:29:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, LOTS_OF_MONEY=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xYoB2-05jLAu; Tue, 5 May 2020 13:29:23 -0700 (PDT)
Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AFF003A0659; Tue, 5 May 2020 13:29:22 -0700 (PDT)
Received: from critter.freebsd.dk (v-critter.freebsd.dk [192.168.55.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by phk.freebsd.dk (Postfix) with ESMTPS id 70B931AF106; Tue, 5 May 2020 20:29:17 +0000 (UTC)
Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id 045KTGda011204 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 5 May 2020 20:29:16 GMT (envelope-from phk@critter.freebsd.dk)
Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id 045KTDfk011203; Tue, 5 May 2020 20:29:13 GMT (envelope-from phk)
To: David Schinazi <dschinazi.ietf@gmail.com>, mnot@mnot.net, phk@varnish-cache.org, tpauly@apple.com, superuser@gmail.com, barryleiba@gmail.com, barryleiba@computer.org
cc: gen-art <gen-art@ietf.org>, draft-ietf-httpbis-header-structure.all@ietf.org, HTTP Working Group <ietf-http-wg@w3.org>, last-call@ietf.org
In-reply-to: <CAPDSy+4y9ZZ-f=MyV1b_-t5OygyYgdr3W4V4soiLVGOgzXKdMg@mail.gmail.com>
From: Poul-Henning Kamp <phk@phk.freebsd.dk>
References: <158864148815.25056.4870473086918483854@ietfa.amsl.com> <2E578812-9E59-426E-85A9-B3A5AEA12853@mnot.net> <CAPDSy+4y9ZZ-f=MyV1b_-t5OygyYgdr3W4V4soiLVGOgzXKdMg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <11201.1588710553.1@critter.freebsd.dk>
Content-Transfer-Encoding: quoted-printable
Date: Tue, 05 May 2020 20:29:13 +0000
Message-ID: <11202.1588710553@critter.freebsd.dk>
Archived-At: <https://mailarchive.ietf.org/arch/msg/gen-art/imZe7tde4xEkKbqIVZuXkf7Q5bQ>
Subject: Re: [Gen-art] Genart last call review of draft-ietf-httpbis-header-structure-18
X-BeenThere: gen-art@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "GEN-ART: General Area Review Team" <gen-art.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/gen-art>, <mailto:gen-art-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/gen-art/>
List-Post: <mailto:gen-art@ietf.org>
List-Help: <mailto:gen-art-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/gen-art>, <mailto:gen-art-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 05 May 2020 20:29:25 -0000

--------
In message <CAPDSy+4y9ZZ-f=MyV1b_-t5OygyYgdr3W4V4soiLVGOgzXKdMg@mail.gmail.com>, David Schinazi writes:

>Sounds good. I was mainly curious because I defined a sh-integer in one of
>my drafts for a value that can in theory go up to 2^62-1, and I wonder if
>it's worth the added complexity to support values between 10^15 and 2^62...

Let me chime in here, as the 10^15 thing is largely my "fault".

Without resorting to "there are N kinds of people" jokes, there are
essentially four classes of numbers:

A) Normal numbers.

B) Scaled numbers

C) Identifying numbers

D) Cryptographic numbers

The 10^15 has historically been more than fine for class A, people
generally hate when there are more than 10 digits in a number, this
we know this because AT&T did a LOT of research on this, back when
people did a lot more with numbers by hand than we do today.

In class B people deal with huge numbers by downscaling:  Millions,
Trillions, GigaBytes and PetaBytes.  Nobody really cares if the
stimulus was 1.000.000.000.000 or 1.000.000.000.010 dollars, so
sawing of the right hand side is a good way to make numbers manageable,
at the cost of suffixing multiplier: $125M

In class C we have numbers which are used to enumerate things,
customer numbers, passport numbers and so on.  By their nature these
numbers are not subject to arithmetic, but mainly because of the
punched cards and the numeric keypad, using digits for encoding
them is traditional.  I would recommend that these be encoded either
as byte sequences, or if they are important for manual debugging
as strings.

Class D is strictly speaking not only cryptographic numbers, but
again, these are not usually subject of arithmetic, but in difference
from class C they have a fundamental numeric nature, and there
may be some mathematical operators which apply to them, for instance
ordering.  For these, I would recommend using fixed size
byte sequences with a defined endianess.  But again:  If they are
important to human debugging, for instance being able to tell
which is larger/smaller, it may make more sense to put them
in a string with a suitable radix.


Poul-Henning

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.