Re: [netmod] Call for adoption request of draft-kwatsen-netmod-artwork-folding-04

Martin Bjorklund <mbj@tail-f.com> Fri, 29 June 2018 08:16 UTC

Return-Path: <mbj@tail-f.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BA6DF130E7A for <netmod@ietfa.amsl.com>; Fri, 29 Jun 2018 01:16:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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 p_NiP_-PR2KJ for <netmod@ietfa.amsl.com>; Fri, 29 Jun 2018 01:16:34 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id C8C66130E8A for <netmod@ietf.org>; Fri, 29 Jun 2018 01:16:33 -0700 (PDT)
Received: from localhost (h-80-27.A165.priv.bahnhof.se [212.85.80.27]) by mail.tail-f.com (Postfix) with ESMTPSA id 1734B1AE02F0; Fri, 29 Jun 2018 10:16:33 +0200 (CEST)
Date: Fri, 29 Jun 2018 10:16:32 +0200 (CEST)
Message-Id: <20180629.101632.1503590872337483708.mbj@tail-f.com>
To: kwatsen@juniper.net
Cc: rharolde@umich.edu, netmod@ietf.org, rwilton=40cisco.com@dmarc.ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <F969FDE4-6E83-45C5-8D63-957280949AEE@juniper.net>
References: <20180628.080813.2173042785762431704.mbj@tail-f.com> <CA+nkc8BvdB9oZVc236PDyM4g+J2+=dtsr5vFScDn0-7MQk13hA@mail.gmail.com> <F969FDE4-6E83-45C5-8D63-957280949AEE@juniper.net>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/q4_aGdks6-zufzH3xj4mmy_wZJY>
Subject: Re: [netmod] Call for adoption request of draft-kwatsen-netmod-artwork-folding-04
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 29 Jun 2018 08:16:42 -0000

Kent Watsen <kwatsen@juniper.net>; wrote:
> 
> 
> >>But with variable placement of the '\' character you can do:
> >>
> >>        This very long line happens to have a space character \
> >>        immediately after the fold column.";
> >>
> 
> This would not work, since the line is one character too long
> 
> 
> >> or
> >>
> >>        This very long line happens to have a space \
> >>        character immediately after the fold column.";
> 
> This is legal, but is in the realm of manual-folding, or "semi-manual
> folding", for what you do with your preprocessing-scripts.
> 
> 
> >>so I'm not sure that disallowing space at the fold column is a
> >> problem.
> >>
> >> Note that even with this, your original "one-liner sed" still produces
> >> valid results, so if you just want a simple folding program you can
> >> use that.
> 
> True.  We could define a feature-rich format, for which the existing
> script only-supports a lowest common denominator.  From a folding
> perspective, that might be okay, but from an unfolding perspective,
> it could not be used to unfold any folded-artwork, and so I'd push
> to fix the script to unfold any input.
> 
> 
> >> The problem is that this does not work in cases where there are a 
> >> lot of spaces - particularly where there are more than 'line-length'
> >> spaces in a row, in the middle of the line.
> 
> Right, so if the input was something like an empty table row:
> 
>        +------------------+------------------+-----------------+------etc.
>        |                  |                  |                 |
> 
> Or a snippet of a UML diagram where the line is a 100% blank:
> 
>                                                                       etc.
> 
> Allowing arbitrary per-line indent makes decoding these cases ambiguous.

Yes, but is this really a problem?  I don't think it would be a good
idea to take a very width ascii-table and fold it like this - the
point of having a ascii table is to make the data easy to read; that
won't be the case if the table is folded.

IMO the problem we want to solve is folding when there is no
alternative.  E.g., XML or JSON snippets with long identifier names,
source code snippets etc.



/martin



> 
> 
> 
> If the goal is to have a pair or rules like:
> 
>   1. Any line ending with "\\n" is considered folded, regardless of the column.
>   2. The original/source artwork MUST NOT have any lines ending with '\' char.
> 
> which would support your semi-manual folding scripts, I think it is possible
> (TBD), but it would entail having a fixed indent rule (e.g., some hardcoded
> column number, or always use the same indent as previous line, or always use
> the same indent as the previous line plus some fixed offset).  Given a clear
> rule, the unfolding alg can chomp just the right amount of whitespace out,
> leaving any remaining whitespace, for a loss-less decode.
> 
> Alternatively, we can have arbitrary per-line indent, but then we need to 
> have a fixed fold-column, or assert that the source artwork has no whitespace
> where the fold begins, which means blank lines could never be supported.  This
> was mentioned above also.
> 
> 
> PS: Regarding Rob's desire for 120-char line lengths, I forgot to mention
> before that the current I-D doesn't specify a maximum.  It only says that
> 69 is the default, and 53 is the minimum, so 120 is fine.
> 
> 
> Kent // contributor
> 
> 
>