2 ms·
> How would you encode a protocol with Tree Notation? I am not 100% sure I understand your question because the word "protocol" can mean slightly different thi
by breck 6y ago
> How would you encode a protocol with Tree Notation?
I am not 100% sure I understand your question because the
word "protocol" can mean slightly different things in
different contexts, but one possible answer is that there is
a grammar language (called
Grammar—https://jtree.treenotation.org/designer/#standard%20grammar https://jtree.treenotation.org/designer/#standard%20grammar),
in which you can define new languages/protocols.
> But you still need to write code for each language and each protocol right?
Today, yes. And this is a very good question because
something that is coming up a lot more now. Increasingly I
am getting messages from people building new Tree Notation
libraries in different host languages. The problem is people
quickly get the basic structure done (pretty much just
nested spreadsheets), and then are like "okay what next?
how do I add support for the higher level tree languages".
So that is becoming the top priority to figure out. Do we
make a universal Grammar language that then is implemented
in all host targets (JS, C, C#, Kotlin, Swift, GoLang,
Java, Closure, Haskell, Python, etc) so that people can
define a language (or "protocol") in this Grammar language
and then generate get parsers/compilers in any of those
community supported host languages? That seems like a likely
path, but a lot to figure out there.
> I have always felt like web assembly was missing a
well-defined system for extending the API and also a
strong external module system.
I agree! I've been wanting to write a Grammar for a simple
Tree Language that compiles to WASM for years but just
haven't found the time
(https://github.com/treenotation/research/issues/7 https://github.com/treenotation/research/issues/7).
If anyone wants to explore that space, happy to help!