Changed around line 1
- aftertext
- Below is a list of questions that are commonly asked by people who are new to Tree Notation. If you have a question not listed here please ask us by filing an issue, sending a pull request, or posting a message to the Tree Notation Subreddit.
+ * Below is a list of questions that are commonly asked by people who are new to Tree Notation. If you have a question not listed here please ask us by filing an issue, sending a pull request, or posting a message to the Tree Notation Subreddit.
- section Overview
+ # Overview
- question What is Tree Notation?
+ ? What is Tree Notation?
- paragraph
- Tree Notation is a basic building block that you can build higher level Tree Languages on top of. For programmers, this might give you an idea of the structure behind Tree notation:
+ * Tree Notation is a basic building block that you can build higher level Tree Languages on top of. For programmers, this might give you an idea of the structure behind Tree notation:
Changed around line 18: code
- paragraph
- Code or information represented in a Tree Language therefore always has a similar appearance - it is indented to show structure, rather than (necessarily) using the symbols you might see in traditional programming languages such as C++ and Java - and languages intended for data storage and communication, such as XML and JSON.
+ * Code or information represented in a Tree Language therefore always has a similar appearance - it is indented to show structure, rather than (necessarily) using the symbols you might see in traditional programming languages such as C++ and Java - and languages intended for data storage and communication, such as XML and JSON.
- paragraph
- This simple, yet powerful, base structure may looks a little like Python, Visual Basic, YAML - or 'Domain Specific Languages' written 'on top' of existing programming languages. This isn’t by accident: such languages were designed to look similar to natural language, using words over symbols and indentation to denote structure.
+ * This simple, yet powerful, base structure may looks a little like Python, Visual Basic, YAML - or 'Domain Specific Languages' written 'on top' of existing programming languages. This isn’t by accident: such languages were designed to look similar to natural language, using words over symbols and indentation to denote structure.
- paragraph
- Here’s an example of a minimal HTML document represented in a Tree Language:
+ * Here’s an example of a minimal HTML document represented in a Tree Language:
- paragraph
- One important feature of Tree Notation is that due to its simplicity and consistency, Tree Languages are easy to write - and code or information represented in a Tree Language is easy to syntax check (and highlight) - and autocomplete.
+ * One important feature of Tree Notation is that due to its simplicity and consistency, Tree Languages are easy to write - and code or information represented in a Tree Language is easy to syntax check (and highlight) - and autocomplete.
- paragraph
- (Thank you to @vakradrz for this answer)
+ * (Thank you to @vakradrz for this answer)
- question There are already over 10,000 programming languages and over 1,000 syntax systems like JSON, XML and BNF, why create another one?
+ ? There are already over 10,000 programming languages and over 1,000 syntax systems like JSON, XML and BNF, why create another one?
- paragraph
- There is only 1 binary. Tree Notation is more like binary than it is like a programming language. Tree Notation is a basic building block that you can build higher level languages on top of. Tree Notation is an error-free base notation like binary.
+ * There is only 1 binary. Tree Notation is more like binary than it is like a programming language. Tree Notation is a basic building block that you can build higher level languages on top of. Tree Notation is an error-free base notation like binary.
- paragraph
- This is our current stack of computer languages:
+ * This is our current stack of computer languages:
- paragraph
- In the future we think the stack may look like this:
+ * In the future we think the stack may look like this:
- paragraph
- We all use software tools to build software. Tree Notation makes building these tools easier, and as more people join the Tree Notation ecosystem there may be significant network effects. If Jane is building a Tree Language and tools for automating train schedules, and John is building a Tree Language and tools for doing cancer research, even though their 2 domains are very different, they can share a lot of the tools and code.
+ * We all use software tools to build software. Tree Notation makes building these tools easier, and as more people join the Tree Notation ecosystem there may be significant network effects. If Jane is building a Tree Language and tools for automating train schedules, and John is building a Tree Language and tools for doing cancer research, even though their 2 domains are very different, they can share a lot of the tools and code.
- question What's the difference between Tree Notation and Tree Languages?
+ ? What's the difference between Tree Notation and Tree Languages?
- paragraph
- Tree Notation is a base level notation. Generally users use Tree Languages, which make Tree Notation useful. The Tree Language Grammar🔗jtree.treenotation.org/designer/#standard%20grammar is a tool to make it easier to build Tree Languages.
+ * Tree Notation is a base level notation. Generally users use Tree Languages, which make Tree Notation useful. The Tree Language Grammar🔗jtree.treenotation.org/designer/#standard%20grammar is a tool to make it easier to build Tree Languages.
- question What is special about Tree Notation?
+ ? What is special about Tree Notation?
- aftertext
- Tree Notation may seem similar to notations like JSON, XML, YAML or S-expressions. However, Tree Notation is the most minimal, has an isomorphism to Euclidean geometry, and the concept of syntax errors does not exist. These differences may make Tree Notation substantially different and may cause a _significant improvement_ in computing.
+ * Tree Notation may seem similar to notations like JSON, XML, YAML or S-expressions. However, Tree Notation is the most minimal, has an isomorphism to Euclidean geometry, and the concept of syntax errors does not exist. These differences may make Tree Notation substantially different and may cause a _significant improvement_ in computing.
- question What major problems in computer science does help Tree Notation solve?
+ ? What major problems in computer science does help Tree Notation solve?
- orderedList
- 1. Program synthesis. Tree Notation makes it easier to train AI models to write great code. Deep Learning models are only as good as the data you train it on. Tree Notation code is noiseless, clean data, which we posit will enable a 10x+ improvement over the state-of-the-art of AI programs that write code and/or assist users in writing code.
- 2. Clean data. In data science a rule of thumb is that 20% of your time will go toward doing data science, and 80% of your time will go toward getting, cleaning, and organizing data. Tree Notation offers a number of techniques that, coupled with network effects, could greatly reduce time wasted on cleaning data.
- 3. Visual programming. Tree Notation is the first notation where a visual design tool could generate code as minimal as someone could write by hand. Traditional languages have a critical flaw--there are infinite ways to represent any given structure. In Tree Notation there is only 1 way to represent 1 structure. This simplification is one of a few core reasons why Tree Notation could help solve the Visual Programming problem.
+ - 1. Program synthesis. Tree Notation makes it easier to train AI models to write great code. Deep Learning models are only as good as the data you train it on. Tree Notation code is noiseless, clean data, which we posit will enable a 10x+ improvement over the state-of-the-art of AI programs that write code and/or assist users in writing code.
+ - 2. Clean data. In data science a rule of thumb is that 20% of your time will go toward doing data science, and 80% of your time will go toward getting, cleaning, and organizing data. Tree Notation offers a number of techniques that, coupled with network effects, could greatly reduce time wasted on cleaning data.
+ - 3. Visual programming. Tree Notation is the first notation where a visual design tool could generate code as minimal as someone could write by hand. Traditional languages have a critical flaw--there are infinite ways to represent any given structure. In Tree Notation there is only 1 way to represent 1 structure. This simplification is one of a few core reasons why Tree Notation could help solve the Visual Programming problem.
- paragraph
- The data science app Ohayo🔗github.com/treenotation/ohayo is in part an experiment to test these 3 advantages of Tree Notation.
+ * The data science app Ohayo🔗github.com/treenotation/ohayo is in part an experiment to test these 3 advantages of Tree Notation.
- question What is a basic example of Tree Notation for file formats?
+ ? What is a basic example of Tree Notation for file formats?
- aftertext
- Currently all Node.js npm projects contain a `package.json` file. While this is simple, it could be simpler using Tree Notation, and better. Let's take a look. package.json:
+ * Currently all Node.js npm projects contain a `package.json` file. While this is simple, it could be simpler using Tree Notation, and better. Let's take a look. package.json:
Changed around line 82: code
- paragraph
- package.npm:
+ * package.npm:
Changed around line 92: code
- aftertext
- It may look like the only benefit is fewer syntax characters, but there's actually more we can now do. Our `package.npm` grammar file gets typechecking, autocomplete, tailored syntax highlighting, can support multiline strings, strings without quotes that don't require escaping, comments, and more.
+ * It may look like the only benefit is fewer syntax characters, but there's actually more we can now do. Our `package.npm` grammar file gets typechecking, autocomplete, tailored syntax highlighting, can support multiline strings, strings without quotes that don't require escaping, comments, and more.
- paragraph
- Note: the JSON example above works correctly, but JSON and Tree Notation are not equivalent by default, since JSON does not support certain structures and Tree Notation does not implement all JSON types by default. If you want JSON features such as keys with spaces, numbers, or arrays, you'll need to use a higher level Tree Language such as Dug🔗jtree.treenotation.org/designer/#standard%20dug that has a 1-to-1 relationship to JSON.
+ * Note: the JSON example above works correctly, but JSON and Tree Notation are not equivalent by default, since JSON does not support certain structures and Tree Notation does not implement all JSON types by default. If you want JSON features such as keys with spaces, numbers, or arrays, you'll need to use a higher level Tree Language such as Dug🔗jtree.treenotation.org/designer/#standard%20dug that has a 1-to-1 relationship to JSON.
- question What is a basic example of Tree Notation for programming languages?
+ ? What is a basic example of Tree Notation for programming languages?
- paragraph
- In the example below, Tree Notation is used as a base for a math Tree Language where traditionally S-Expressions/Lisp might be used.
+ * In the example below, Tree Notation is used as a base for a math Tree Language where traditionally S-Expressions/Lisp might be used.
- paragraph
- make8.math:
+ * make8.math:
- paragraph
- make8.lisp:
+ * make8.lisp:
- paragraph
- The second example contains 13 parts, whereas the first only has 7. There are also infinite ways to represent the second example, since the compiler ignores insignificant whitespace, whereas in the first there is only 1 way to represent that particular structure.
+ * The second example contains 13 parts, whereas the first only has 7. There are also infinite ways to represent the second example, since the compiler ignores insignificant whitespace, whereas in the first there is only 1 way to represent that particular structure.
- question What are some advanced examples of Tree Notation in action?
+ ? What are some advanced examples of Tree Notation in action?
- paragraph
- Check out the Ohayo🔗github.com/treenotation/ohayo project or the Tree Language Designer🔗jtree.treenotation.org/designer/.
+ * Check out the Ohayo🔗github.com/treenotation/ohayo project or the Tree Language Designer🔗jtree.treenotation.org/designer/.
- question How can I build a new Tree Language?
+ ? How can I build a new Tree Language?
- aftertext
- A good place to start is with our simple $Tree Language Builder$.
+ * A good place to start is with our simple $Tree Language Builder$.
- question Where can I use Tree Notation?
+ ? Where can I use Tree Notation?
- paragraph
- Everywhere! Anywhere you use programming languages or encodings, you can use Tree Notation. Hopefully a Tree Notation Ecosystem will grow, if Tree Notation turns out to be a good idea. Until then use it wherever and don't be shy about asking for help.
+ * Everywhere! Anywhere you use programming languages or encodings, you can use Tree Notation. Hopefully a Tree Notation Ecosystem will grow, if Tree Notation turns out to be a good idea. Until then use it wherever and don't be shy about asking for help.
- question What are some examples of Tree Languages?
+ ? What are some examples of Tree Languages?
- paragraph
- question Languages that add numbers or compile to HTML are cute, but are there any advanced Tree Language?
+ ? Languages that add numbers or compile to HTML are cute, but are there any advanced Tree Language?
- paragraph
- Currently the most advanced somewhat-useful Tree Language is OhayoLang, the dataflow language in the data science studio
Ohayo. In 2023, OhayoLang could be a competitive rival to Python or R for 80% of data science tasks. Another very powerful language is
Grammar, which is similar to ANTLR or Racket in that it's a language for building languages. However, in 2023 the most powerful Tree Language could be yours!
+ * Currently the most advanced somewhat-useful Tree Language is OhayoLang, the dataflow language in the data science studio
Ohayo. In 2023, OhayoLang could be a competitive rival to Python or R for 80% of data science tasks. Another very powerful language is
Grammar, which is similar to ANTLR or Racket in that it's a language for building languages. However, in 2023 the most powerful Tree Language could be yours!
- section Structure
+ # Structure
- question What is the difference between Tree Notation and Tree Languages?
+ ? What is the difference between Tree Notation and Tree Languages?
- aftertext
- There is an important distinction between _Tree Notation_ and _Tree Languages_. Tree Notation is a simple dumb format for encoding Tree Data structures. Tree Languages give you higher level semantics. There is not a single general purpose "Tree Language", like you might expect if you come from the Racket or Lisp worlds. Instead, there are many independent general purpose "Tree Languages" with any semantics desired by the language designer(s).
+ * There is an important distinction between _Tree Notation_ and _Tree Languages_. Tree Notation is a simple dumb format for encoding Tree Data structures. Tree Languages give you higher level semantics. There is not a single general purpose "Tree Language", like you might expect if you come from the Racket or Lisp worlds. Instead, there are many independent general purpose "Tree Languages" with any semantics desired by the language designer(s).
- question What are the data structures in Tree Notation?
+ ? What are the data structures in Tree Notation?
- paragraph
- This is the base Tree Notation:
+ * This is the base Tree Notation:
Changed around line 156: code
- aftertext
- The Tree is _the_ data structure in Tree Notation. Types like booleans, ints and vectors only exist at the higher level Tree Language level. The theory behind Tree Notation is that concepts like booleans, ints and vectors are just kinds of Trees.
+ * The Tree is _the_ data structure in Tree Notation. Types like booleans, ints and vectors only exist at the higher level Tree Language level. The theory behind Tree Notation is that concepts like booleans, ints and vectors are just kinds of Trees.
- paragraph
- Higher level Tree Languages are where additional concepts can be added like strings, integers, booleans, control flow, assignment, encapsulation, functions, and so forth.
+ * Higher level Tree Languages are where additional concepts can be added like strings, integers, booleans, control flow, assignment, encapsulation, functions, and so forth.
- question What are the basic terms when talking about things written in Tree Notation?
+ ? What are the basic terms when talking about things written in Tree Notation?
- paragraph
- Example:
+ * Example:
- aftertext
- In Tree Notation, the units of measure are *words* and *nodes*. Each line is equal to one node. The example program above has 5 words and 2 nodes. In this language the nodeType is determined by the first words (if and print). Notice how the second line in the program above is indented by one space, this makes the print node a *child node* of the line above it, the if node.
+ * In Tree Notation, the units of measure are *words* and *nodes*. Each line is equal to one node. The example program above has 5 words and 2 nodes. In this language the nodeType is determined by the first words (if and print). Notice how the second line in the program above is indented by one space, this makes the print node a *child node* of the line above it, the if node.
- paragraph
- If you are familiar with Lisp terminology, you can think of words as atoms.
+ * If you are familiar with Lisp terminology, you can think of words as atoms.
- aftertext
- Grammar files add the additional concept of *cells*, which can be thought of as placeholders and type information for words. Grammar files define new languages with *nodeTypes* and *cellTypes*. In the example language above, the word "true" would be in a boolean cell type.
+ * Grammar files add the additional concept of *cells*, which can be thought of as placeholders and type information for words. Grammar files define new languages with *nodeTypes* and *cellTypes*. In the example language above, the word "true" would be in a boolean cell type.
- aftertext
- Here is a longer spec.
+ * Here is a longer spec.
- question Does Tree Notation use tabs or spaces?
+ ? Does Tree Notation use tabs or spaces?
- paragraph
- Tree Notation uses a single space to indent blocks which indicates parent/child relationship. You can only increase the indent level one level at a time.
+ * Tree Notation uses a single space to indent blocks which indicates parent/child relationship. You can only increase the indent level one level at a time.
- question Does Tree Notation work on Windows?
+ ? Does Tree Notation work on Windows?
- aftertext
- Yes. Tree Notation only uses the `\n` character to separate nodes/lines. `\r` is either ignored or treated as a content character. In practice it's easier to drop all `\r` :).
+ * Yes. Tree Notation only uses the `\n` character to separate nodes/lines. `\r` is either ignored or treated as a content character. In practice it's easier to drop all `\r` :).
- question Does Tree Notation support Unicode or just ASCII?
+ ? Does Tree Notation support Unicode or just ASCII?
- paragraph
- Tree Notation supports all encodings. This is perfectly valid Tree Notation:
+ * Tree Notation supports all encodings. This is perfectly valid Tree Notation:
- paragraph
- In fact, there is no such thing as an invalid Tree Notation document at the base level, just as there is no such thing as an "invalid binary sequence".
+ * In fact, there is no such thing as an invalid Tree Notation document at the base level, just as there is no such thing as an "invalid binary sequence".
- paragraph
- Usually when using Tree Notation you use a higher level grammar, called a Tree Language, and so you can still have invalid programs in that language (because of typos, for example) even though your Tree Notation is valid.
+ * Usually when using Tree Notation you use a higher level grammar, called a Tree Language, and so you can still have invalid programs in that language (because of typos, for example) even though your Tree Notation is valid.
- question How do I escape characters?
+ ? How do I escape characters?
- paragraph
- In Tree Notation you never need to escape characters. If your node spans across multiple lines, simply indent the child lines by one space more than their parent, leave the rest of the line as is, and ensure your nodeType definition treats child nodes as one block. Some Tree Languages might have the notion of escape characters in certain places, but there's no such thing at the Tree Notation base layer.
+ * In Tree Notation you never need to escape characters. If your node spans across multiple lines, simply indent the child lines by one space more than their parent, leave the rest of the line as is, and ensure your nodeType definition treats child nodes as one block. Some Tree Languages might have the notion of escape characters in certain places, but there's no such thing at the Tree Notation base layer.
- question Does Tree Notation directly map to XML or JSON?
+ ? Does Tree Notation directly map to XML or JSON?
- paragraph
- No. A subset of Tree Notation does, but for perfect one-to-one matching you'll want to use a Tree Language specifically designed for that language.
+ * No. A subset of Tree Notation does, but for perfect one-to-one matching you'll want to use a Tree Language specifically designed for that language.
- question Can I use Tree Notation with any programming language?
+ ? Can I use Tree Notation with any programming language?
- paragraph
- Yes! The
JTree library provides Tree Notation support for TypeScript and Javascript, but someday there may be Tree Notation and Tree Grammar libraries in all programming languages, similar to how most languages nowadays have JSON libraries.
+ * Yes! The
JTree library provides Tree Notation support for TypeScript and Javascript, but someday there may be Tree Notation and Tree Grammar libraries in all programming languages, similar to how most languages nowadays have JSON libraries.
- paragraph
- section Project Status
+ # Project Status
- question Who makes Tree Notation, and is it open source?
+ ? Who makes Tree Notation, and is it open source?
- paragraph
- Tree Notation is free and open source. The Tree Notation Lab is a distributed research group started in Hawaii that works on the core Tree Notation infrastructure projects. The plan is to build the infrastructure needed to test whether Tree Notation is a good idea. If it is, get a broader Tree Notation ecosystem growing.
+ * Tree Notation is free and open source. The Tree Notation Lab is a distributed research group started in Hawaii that works on the core Tree Notation infrastructure projects. The plan is to build the infrastructure needed to test whether Tree Notation is a good idea. If it is, get a broader Tree Notation ecosystem growing.
- question Is Tree Notation ready for production use?
+ ? Is Tree Notation ready for production use?
- paragraph
- Sort of! Tree Notation is ready for early adopters. If you use Tree Notation today, you probably will want to stay up to date with what's happening as the tooling is still rapidly evolving.
+ * Sort of! Tree Notation is ready for early adopters. If you use Tree Notation today, you probably will want to stay up to date with what's happening as the tooling is still rapidly evolving.
- paragraph
- If you'd prefer to wait until most of the details are settled, late 2023 is probably a better time to start using it.
+ * If you'd prefer to wait until most of the details are settled, late 2023 is probably a better time to start using it.
- question How can I help?
+ ? How can I help?
- paragraph
- Thank you for asking! There's plenty of work to be done. Particularly important needs now are someone with project management skills to help organize and lead the team, someone to do community organizing/evangelism, dev leads to make libraries in various languages, testers to do cross platform testing, and more. Get in touch if you want to help.
+ * Thank you for asking! There's plenty of work to be done. Particularly important needs now are someone with project management skills to help organize and lead the team, someone to do community organizing/evangelism, dev leads to make libraries in various languages, testers to do cross platform testing, and more. Get in touch if you want to help.
- section Editing Tips
+ # Editing Tips
- question How can I copy and paste code in Tree Notation and have the editor ensure correct indentation?
+ ? How can I copy and paste code in Tree Notation and have the editor ensure correct indentation?
- paragraph
- Look for a "Paste and indent" command. For example, in Sublime Text you can click Edit->Paste and Indent, or press Cmd+Shift+v.
+ * Look for a "Paste and indent" command. For example, in Sublime Text you can click Edit->Paste and Indent, or press Cmd+Shift+v.
- question Do I have to count the spaces?
+ ? Do I have to count the spaces?
- paragraph
- No. We strongly recommend using an editor that supports Tree Notation with syntax highlighting, indentation help and more (if we don't have support for your favorite editor yet, please help us add it!). If you are finding it difficult to use Tree Notation, that's just because the editor support is in the early stages. Please let us know what problems you are having so we can get them fixed.
+ * No. We strongly recommend using an editor that supports Tree Notation with syntax highlighting, indentation help and more (if we don't have support for your favorite editor yet, please help us add it!). If you are finding it difficult to use Tree Notation, that's just because the editor support is in the early stages. Please let us know what problems you are having so we can get them fixed.
- section For Advanced Tree Language Creators
+ # For Advanced Tree Language Creators
- question What are the benefits to writing a "Grammar" file to create my Tree Language?
+ ? What are the benefits to writing a "Grammar" file to create my Tree Language?
- paragraph
- By creating 1 file in Grammar, you get a new programming language with autocomplete, syntax highlighting, type-checking, help, integration tests, compiling, and more. The goal of Grammar is to help you create a new, robust, well tested language as easily as possible.
+ * By creating 1 file in Grammar, you get a new programming language with autocomplete, syntax highlighting, type-checking, help, integration tests, compiling, and more. The goal of Grammar is to help you create a new, robust, well tested language as easily as possible.
- question Can I use infix notation, postfix notation, or pattern matching?
+ ? Can I use infix notation, postfix notation, or pattern matching?
- paragraph
- Yes! As of JTree 35, the Grammar Language that ships with Jtree now supports other notations. Originally only prefix notation was supported without writing a decent amount of target code.
+ * Yes! As of JTree 35, the Grammar Language that ships with Jtree now supports other notations. Originally only prefix notation was supported without writing a decent amount of target code.
- question Can I do inline Trees?
+ ? Can I do inline Trees?
- paragraph
- Yes! While not supported at the base Tree Notation level, your individual nodes can certainly have inline trees. Often your Tree Languages will have nodes that contain content written in traditional languages like Javascript, Lisp, or Python. Or you could even have inline trees written in Tree Notation, except using something like the pipe character as nodeBreakSymbol instead of the newline character.
+ * Yes! While not supported at the base Tree Notation level, your individual nodes can certainly have inline trees. Often your Tree Languages will have nodes that contain content written in traditional languages like Javascript, Lisp, or Python. Or you could even have inline trees written in Tree Notation, except using something like the pipe character as nodeBreakSymbol instead of the newline character.
- section Lisp Related Questions
+ # Lisp Related Questions
- question How is this different from S-Expressions?
+ ? How is this different from S-Expressions?
- paragraph
- It is largely accurate to say Tree Notation is S-Expressions without parenthesis. But this makes them very different! Tree Notation gives you fewer chances to make errors, easier program concatenation and ad hoc parser writing, easier program synthesis, easier visual programming, easier code analysis, and more.
+ * It is largely accurate to say Tree Notation is S-Expressions without parenthesis. But this makes them very different! Tree Notation gives you fewer chances to make errors, easier program concatenation and ad hoc parser writing, easier program synthesis, easier visual programming, easier code analysis, and more.
- question Is Tree Notation just Lisp?
+ ? Is Tree Notation just Lisp?
- paragraph
- No. It is largely accurate to say Tree Notation is S-Expressions without parenthesis. However, Tree Notation has a useful geometric isomorphism that S-Expressions/Lisp lack, that might have significant network effects.
+ * No. It is largely accurate to say Tree Notation is S-Expressions without parenthesis. However, Tree Notation has a useful geometric isomorphism that S-Expressions/Lisp lack, that might have significant network effects.
- question What's an example of "ad hoc" parsing that you can do with Tree Notation that you cannot do with S-Expressions?
+ ? What's an example of "ad hoc" parsing that you can do with Tree Notation that you cannot do with S-Expressions?
- aftertext
- If you have a Tree Language with a root nodeType named `folder`, and you want to rename the keyword of that nodeType to `project`, you can easily do it with an ad-hoc regex: `s/^folder/project/`. This would be type safe, even if you started parsing in the middle of the document. You cannot do that with S-Expressions, as you'd have to first parse the document into a Tree data structure, and could not operate on it as a string.
+ * If you have a Tree Language with a root nodeType named `folder`, and you want to rename the keyword of that nodeType to `project`, you can easily do it with an ad-hoc regex: `s/^folder/project/`. This would be type safe, even if you started parsing in the middle of the document. You cannot do that with S-Expressions, as you'd have to first parse the document into a Tree data structure, and could not operate on it as a string.
- question What's something else you can do with Tree Notation that you can't do with Lisp?
+ ? What's something else you can do with Tree Notation that you can't do with Lisp?
- paragraph
- Easy program concatenation. For example, in Tree Notation you can create valid new programs simply by appending strings, whereas in Lisp you might first have to do some parentheses removing and inserting.
+ * Easy program concatenation. For example, in Tree Notation you can create valid new programs simply by appending strings, whereas in Lisp you might first have to do some parentheses removing and inserting.
- question What's something else that is worse in Lisp?
+ ? What's something else that is worse in Lisp?
- paragraph
- In Lisp you have to escape certain characters. In Tree Notation, you never need to escape characters. (Note: although you are 100% free to design Tree Languages that implement escape characters, that is almost never necessary).
+ * In Lisp you have to escape certain characters. In Tree Notation, you never need to escape characters. (Note: although you are 100% free to design Tree Languages that implement escape characters, that is almost never necessary).
- section History
+ # History
- question Are there any papers written about Tree Notation?
+ ? Are there any papers written about Tree Notation?
- paragraph
- You can read the half-baked papers🔗github.com/treenotation/research/tree/master/papers about Tree Notation.
+ * You can read the half-baked papers🔗github.com/treenotation/research/tree/master/papers about Tree Notation.
- aftertext
- The basic gist of the theory is that all structures are trees, Tree Notation is all you need to represent trees, and by building things up from Tree Notation we might be able to make things simpler _AND better_.
+ * The basic gist of the theory is that all structures are trees, Tree Notation is all you need to represent trees, and by building things up from Tree Notation we might be able to make things simpler _AND better_.
- question Which language influenced Tree Notation the most?
+ ? Which language influenced Tree Notation the most?
- paragraph
- Syntactically there's no question--it was
HAML. See the origin story below if you are curious why. Semantically there's been a lot of influences from thousands of languages. Particularly influential ones are Lisp, Haskell, Racket, ANTLR, TypeScript, C#, Python, Scheme, Javascript, COBOL, Rebol, Mathematica, APL, R, Red-Lang, Fortran, Forth, C++, JSON, XML, HTML, CSS, SQL, somewhat, but not necessarily, in that order.
+ * Syntactically there's no question--it was
HAML. See the origin story below if you are curious why. Semantically there's been a lot of influences from thousands of languages. Particularly influential ones are Lisp, Haskell, Racket, ANTLR, TypeScript, C#, Python, Scheme, Javascript, COBOL, Rebol, Mathematica, APL, R, Red-Lang, Fortran, Forth, C++, JSON, XML, HTML, CSS, SQL, somewhat, but not necessarily, in that order.
- question Who is the first person to discover Tree Notation?
+ ? Who is the first person to discover Tree Notation?
- paragraph
- Breck Yunits et al. came up with Tree Notation circa 2012. However, it turns out in 2003 Egil Möller
proposed "I-Expressions", or "Indentation-sensitive syntax", an alternative to S-Expressions in Scheme that is 80% similar to Tree Notation. A few implementation details weren't ideal, but the core is largely the same.
+ * Breck Yunits et al. came up with Tree Notation circa 2012. However, it turns out in 2003 Egil Möller
proposed "I-Expressions", or "Indentation-sensitive syntax", an alternative to S-Expressions in Scheme that is 80% similar to Tree Notation. A few implementation details weren't ideal, but the core is largely the same.
- question Why didn't I-Expressions catch on?
+ ? Why didn't I-Expressions catch on?
- paragraph
- Not sure. Perhaps because it was pitched as a different way to write Lisp, and that was it. With Tree Notation, coming up with an improved way to write Lisp was never a primary goal. Our primary goals have been to enable visual programming, simpler APIs, cleaner code and program synthesis, for which Tree Notation is an ideal tool.
+ * Not sure. Perhaps because it was pitched as a different way to write Lisp, and that was it. With Tree Notation, coming up with an improved way to write Lisp was never a primary goal. Our primary goals have been to enable visual programming, simpler APIs, cleaner code and program synthesis, for which Tree Notation is an ideal tool.
- question How was Tree Notation discovered?
+ ? How was Tree Notation discovered?
- paragraph
- If Tree Notation turns out to be a good idea, below is the origin story.
+ * If Tree Notation turns out to be a good idea, below is the origin story.
Changed around line 323: quote
- section Other
+ # Other
- question Did you know that if you think this could grow to rival the web you are an idiot?
+ ? Did you know that if you think this could grow to rival the web you are an idiot?
- paragraph
- Thank you for reminding us the web was not built in a day!
+ * Thank you for reminding us the web was not built in a day!
- question How confident are you that this is a good idea?
+ ? How confident are you that this is a good idea?
- paragraph
- If you round up, 10%. But in the 90% chance that this is not a good idea, attempting to prove that it is a good or a bad idea seems to be a promising line of research.
+ * If you round up, 10%. But in the 90% chance that this is not a good idea, attempting to prove that it is a good or a bad idea seems to be a promising line of research.
- question What is the Zen of Tree Notation?
+ ? What is the Zen of Tree Notation?
- paragraph
- Rule #1. Put it in a Tree Language.
+ * Rule #1. Put it in a Tree Language.
- paragraph
- End of Rules.
+ * End of Rules.
- permalink index
+ permalink index.html