[noise] Machine-readable pattern list

Trevor Perrin trevp at trevp.net
Wed Oct 5 09:29:10 PDT 2016


On Wed, Oct 5, 2016 at 1:30 AM, Rhys Weatherley
<rhys.weatherley at gmail.com> wrote:
> On Wed, Oct 5, 2016 at 4:01 PM, Trevor Perrin <trevp at trevp.net> wrote:
>>
>> Maybe, but if the only benefit here is that a tool that works with
>> text patterns can avoid scanning for "...", that's not that much of a
>> gain.
>>
>> There's not that much cost to this proposal either.  But the visual
>> appearance would be a little messier (we're indicating the same
>> information 2 different ways).
>
>
> I'd argue that it is not the same information.  Pre-message tokens come from
> a more restrictive set ("e", "f", and "s" only) and can only occur in
> certain orders.  The grammar can enforce these rules if it knows early
> enough.

Sure, but in terms of the whole pattern, one of these visual
indicators is redundant (we could remove the "...", or the different
arrows, and the pre-messages would still be clear).

So that's a bit more visual clutter, and someone might wonder if the
double-arrows could be used after the dots, or single arrows before.


> I can live with it either way I suppose, but the more context-free the
> better from a langsec point of view.

Langsec is about parsing untrusted inputs, but patterns aren't
transmitted - we're just talking about a (probably small) number of
tools that might do some analysis or code-generation from patterns.


> ABNF for the grammar is appended.  Basic tokens only, no hybrid.  Extending
> it to hybrid tokens is obvious.

That's cool, but it's an easy tweak to have 2 grammars, one for
pre-messages, one without.


>> Also, currently you can think of "->" and "<-" as arrows, rather than
>> text, and I've done this sometimes:
>>
>> https://noiseprotocol.org/docs/noise_stanford_seminar_2016.pdf
>>
>> With "=>" notation this isn't as easy - you'd need a fat and skinny
>> arrow, or an arrow with two tails?
>
>
> Unicode has lots of arrows to choose from for fancy presentations. :-)

Yeah, but you have to choose, and the reader has to think about the difference.

I have sort of a minimalist attitude here (would prefer to leave out
any complication that doesn't add significant value), so I'm not yet
sure this is worth it.

Trevor


More information about the Noise mailing list