Re: [Rfc-markdown] 1.3.34: map most codeblock classes to <sourcecode> instead of <artwork>

Carsten Bormann <cabo@tzi.org> Fri, 19 February 2021 08:46 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: rfc-markdown@ietfa.amsl.com
Delivered-To: rfc-markdown@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E84233A0D4E for <rfc-markdown@ietfa.amsl.com>; Fri, 19 Feb 2021 00:46:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 wNy9MT4dRKPu for <rfc-markdown@ietfa.amsl.com>; Fri, 19 Feb 2021 00:46:02 -0800 (PST)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 13BF83A0D39 for <rfc-markdown@ietf.org>; Fri, 19 Feb 2021 00:46:01 -0800 (PST)
Received: from [192.168.217.118] (p5089a828.dip0.t-ipconnect.de [80.137.168.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4DhlXm1m9fzyRB; Fri, 19 Feb 2021 09:46:00 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <77684aa0-dcdb-fc38-8d31-86f2f5ae2ede@gmx.de>
Date: Fri, 19 Feb 2021 09:45:59 +0100
Cc: rfc-markdown@ietf.org
X-Mao-Original-Outgoing-Id: 635417159.340462-e110aa66ee1b1dc926279df6f341d670
Content-Transfer-Encoding: quoted-printable
Message-Id: <22FFC094-63C4-43E8-8FDA-28832DD7FF28@tzi.org>
References: <4E1735EC-A5DD-4201-A6EA-2285D5CC9C21@tzi.org> <20210219072402.GA151175@miek.nl> <77684aa0-dcdb-fc38-8d31-86f2f5ae2ede@gmx.de>
To: Julian Reschke <julian.reschke@gmx.de>
X-Mailer: Apple Mail (2.3608.120.23.2.4)
Archived-At: <https://mailarchive.ietf.org/arch/msg/rfc-markdown/-TMLuKxSopzSbB3z90ipkPE4AKU>
Subject: Re: [Rfc-markdown] 1.3.34: map most codeblock classes to <sourcecode> instead of <artwork>
X-BeenThere: rfc-markdown@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "rfc-markdown is a discussion list for people writing I-Ds and RFCs in Markdown and the authors of the tools used for that." <rfc-markdown.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rfc-markdown>, <mailto:rfc-markdown-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rfc-markdown/>
List-Post: <mailto:rfc-markdown@ietf.org>
List-Help: <mailto:rfc-markdown-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rfc-markdown>, <mailto:rfc-markdown-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Feb 2021 08:46:06 -0000

> 
> FWIW, I'm not sure what the use case for not left-aligning source code is?

I had one just yesterday…

https://datatracker.ietf.org/doc/draft-bormann-core-media-content-type-format/

(In a normal publication I’d use color.)

> Slightly related to this: it seems we need to come up with
> recommendations about what is artwork and what is sourcecode. For
> instance, in the HTTP specs, is a HTTP message example (or a header
> field example) artwork or sourcecode?

I’d say:
Q: Is it meant for machine consumption?
No?  Artwork.

Examples:

PEM, CBOR-diag, JSON data items that can be parsed: source code.
ABNF, CDDL, YANG: source code (but see example above)
Pseudocode, C, Python: source code

Math: artwork
Illustrative excerpts of code for human consumption: artwork
Call-flows (example in RFC 7991), HTTP interactions: artwork
UML stuff, MSCs, flow charts, GANTT charts: artwork

(Deliberately) Bad code (counterexamples): Hmm.

Grüße, Carsten