Changes to faq.scroll.pub

ffff:72.234.190.31
ffff:72.234.190.31
3 months ago
Updated spec.scroll
spec.scroll
Changed around line 1
- header.scroll
+
+ header.scroll
+ printTitle
Changed around line 86: Parsers is an advanced language for building other languages. This spec is writt
- footer.scroll
+ footer.scroll
ffff:72.234.190.31
ffff:72.234.190.31
3 months ago
Updated readme.scroll
readme.scroll
Changed around line 2: permalink index.html
+ printTitle
ffff:72.234.190.31
ffff:72.234.190.31
3 months ago
Updated readme.scroll
readme.scroll
Changed around line 2: permalink index.html
- printTitle
ffff:72.234.190.31
ffff:72.234.190.31
3 months ago
Updated header.scroll
header.scroll
Changed around line 3: baseUrl https://faq.scroll.pub/
- editUrl /edit.html?fileName=
+ editBaseUrl /edit.html?fileName=
ffff:72.234.190.31
ffff:72.234.190.31
3 months ago
Updated header.scroll
header.scroll
Changed around line 3: baseUrl https://faq.scroll.pub/
- editUrl https://github.com/breck7/faq.scroll.pub/blob/main
+ editUrl /edit.html?fileName=
ffff:72.234.190.31
ffff:72.234.190.31
3 months ago
Updated readme.scroll
readme.scroll
Changed around line 1
- import header.scroll
+ permalink index.html
+
+ header.scroll
- permalink index.html
ffff:72.234.190.31
ffff:72.234.190.31
3 months ago
Updated header.scroll
header.scroll
Changed around line 1
- description Frequently Asked Questions about Particles
- viewSourceUrl https://github.com/breck7/faq.scroll.pub/blob/main
+ buildHtml
+ buildTxt
+ description Frequently Asked Questions about Particles
+ editUrl https://github.com/breck7/faq.scroll.pub/blob/main
+
- gazetteCss
+ theme gazette
- viewSourceButton
- buildTxt
- buildHtml
+ editButton
ffff:72.234.190.31
ffff:72.234.190.31
3 months ago
Updated footer.scroll
footer.scroll
Changed around line 1
+
- viewSourceButton
- scrollVersionLink
+ editButton
+ scrollVersionLink
Breck Yunits
Breck Yunits
4 months ago
readme.scroll
Changed around line 4: printTitle
- * Below is a list of questions that are commonly asked by people who are new to Particles. If you have a question not listed here please ask us on Twitter or by posting a message to the World Wide Scroll Subreddit.
+ Below is a list of questions that are commonly asked by people who are new to Particles, Parsers and Scroll. If you have a question not listed here please ask us on Twitter or by posting a message to the World Wide Scroll Subreddit.
Changed around line 23: code
- children: Particle[]
- line: string
+ subparticle: Particle[]
+ atoms: string[]
- * Code or information represented in a Scroll Dialect 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 parsers 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.
- * 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.
- * Here’s an example of a minimal HTML document represented in a Scroll Dialect:
+ * Here’s an example of a minimal HTML document represented in parsers:
- * One important feature of Particles is that due to its simplicity and consistency, Scroll Dialects are easy to write - and code or information represented in a Scroll Dialect is easy to syntax check (and highlight) - and autocomplete.
+ One important feature of Particles is that due to its simplicity and consistency, parsers are easy to write - and code or information represented in parsers is easy to syntax check (and highlight) - and autocomplete.
- * (Thank you to @vakradrz for this answer)
+ (Thank you to @vakradrz for this answer)
- * There is only 1 binary. Particles is more like binary than it is like a programming language. Particles is a basic building block that you can build higher level languages on top of. Particles is an error-free base syntax like binary.
- * This is our current stack of computer languages:
+ There is only 1 binary. Particles is more like binary than it is like a programming language. Particles is a basic building block that you can build higher level languages on top of. Particles is an error-free base syntax like binary.
+ This is our current stack of computer languages:
- * In the future we think the stack may look like this:
+ In the future we think the stack may look like this:
- 1 Binary => 1 Particles => 10,000+ Scroll Languages
+ 1 Binary => 1 Particles => 10,000+ Scroll microlangs
- * We all use software tools to build software. Particles makes building these tools easier, and as more people join the Particles ecosystem there may be significant network effects. If Jane is building a Scroll Dialect and tools for automating train schedules, and John is building a Scroll Dialect 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. Particles makes building these tools easier, and as more people join the Particles ecosystem there may be significant network effects. If Jane is building parsers and tools for automating train schedules, and John is building parsers and tools for doing cancer research, even though their 2 domains are very different, they can share a lot of the tools and code.
- ? What's the difference between Particles and Scroll Dialects?
- * Particles is a base level syntax. Generally users use Scroll Dialects, which make Particles useful. The Scroll Dialect Grammar is a tool to make it easier to build Scroll Dialects.
- https://sdk.scroll.pub/designer/#standard%20grammar Grammar
+ ? What's the difference between Particles, Parsers Scroll?
+ Particles is the base level syntax. Generally users use the higher level Scroll, which is built on Particles and makes Particles useful. Scroll is written in Parsers, which is also built on Particles.
+ https://sdk.scroll.pub/designer/#standard%20parsers Parsers
- * Particles may seem similar to notations like JSON, XML, YAML or S-expressions. However, Particles is the most minimal, has an isomorphism to Euclidean geometry, and the concept of syntax errors does not exist. These differences may make Particles substantially different and may cause a _significant improvement_ in computing.
+ Particles may seem similar to notations like JSON, XML, YAML or S-expressions. However, Particles is the most minimal, has an isomorphism to Euclidean geometry, and the concept of syntax errors does not exist. These differences may make Particles substantially different and may cause a _significant improvement_ in computing.
- 1. Program synthesis. Particles 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. Particles 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. Particles offers a number of techniques that, coupled with network effects, could greatly reduce time wasted on cleaning data.
- 3. Visual programming. Particles is the first syntax 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 Particles there is only 1 way to represent 1 structure. This simplification is one of a few core reasons why Particles could help solve the Visual Programming problem.
- * The data science app Ohayo is in part an experiment to test these 3 advantages of Particles.
+ The data science app Ohayo is in part an experiment to test these 3 advantages of Particles.
- * Currently all Node.js npm projects contain a `package.json` file. While this is simple, it could be simpler using Particles, and better. Let's take a look.
- * package.json:
- code
+ Currently all Node.js npm projects contain a `package.json` file. While this is simple, it could be simpler using Particles, and better. Let's take a look.
+ codeWithHeader package.json
Changed around line 80: code
- * package.npm:
- code
+ codeWithHeader package.scroll
Changed around line 88: code
- * 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.scroll` file would have Parsers to get typechecking, autocomplete, tailored syntax highlighting, support for multiline strings, strings without quotes that don't require escaping, comments, and more.
- * Note: the JSON example above works correctly, but JSON and Particles are not equivalent by default, since JSON does not support certain structures and Particles 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 Scroll Dialect such as Dug that has a 1-to-1 relationship to JSON.
+ Note: the JSON example above works correctly, but JSON and Particles are not equivalent by default, since JSON does not support certain structures and Particles 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 Parsers such as Dug that has a 1-to-1 relationship to JSON.
- * In the example below, Particles is used as a base for a math Scroll Dialect where traditionally S-Expressions/Lisp might be used.
- * make8.math:
- code
+ In the example below, Particles is used as a base for a math Scroll Dialect where traditionally S-Expressions/Lisp might be used.
+ codeWithHeader make8.math
- * make8.lisp:
- code
+ codeWithHeader make8.lisp
- * 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.
- * Check out the Ohayo project or the Scroll Dialect Designer.
+ Check out the Ohayo project or the Parsers Designer.
- https://sdk.scroll.pub/designer/ Scroll Dialect Designer
+ https://sdk.scroll.pub/designer/ Parsers Designer
- ? How can I build a new Scroll Dialect?
- * A good place to start is with our simple $Scroll Dialect Builder$.
- wrap $ http://sdk.scroll.pub/designer/
+ ? How can I extend Scroll?
+ A good place to start is with our simple Parsers Designer.
+ http://sdk.scroll.pub/designer/ Parsers Designer
- * Everywhere! Anywhere you use programming languages or encodings, you can use Particles. Hopefully a Particles Ecosystem will grow, if Particles turns out to be a good idea. Until then use it wherever and don't be shy about asking for help.
-
- ? What are some examples of Scroll microlangs?
- * There are over a dozen example microlangs in the ScrollSDK GitHub repo. Here's a language that compiles to HTML, a language similar to Make, and a language that does simple math .
-
- ? Languages that add numbers or compile to HTML are cute, but are there any advanced Scroll Dialect?
- * Currently the most advanced somewhat-useful Scroll Dialect 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 Scroll Dialect could be yours!
+ Everywhere! Anywhere you use programming languages or encodings, you can use Particles. Hopefully a Particles Ecosystem will grow, if Particles turns out to be a good idea. Until then use it wherever and don't be shy about asking for help.
- ? What is the difference between Particles and Scroll Dialects?
- * There is an important distinction between _Particles_ and _Scroll Dialects_. Particles is a simple dumb format for encoding Tree Data structures. Scroll Dialects give you higher level semantics. There is not a single general purpose "Scroll Dialect", like you might expect if you come from the Racket or Lisp worlds. Instead, there are many independent general purpose "Scroll Dialects" with any semantics desired by the language designer(s).
-
- * This is the base Particles:
+ This is the base Particles:
- edgeSymbol = " " // Increasing indent to denote parent/child relationship
+ edgeSymbol = " " // Increasing indent to denote subparticles
- children: Particle[]
- line: string
+ subparticles: Particle[]
+ atoms: string[]
- * The Tree is _the_ data structure in Particles. Types like booleans, ints and vectors only exist at the higher level Scroll Dialect level. The theory behind Particles is that concepts like booleans, ints and vectors are just kinds of Trees.
+ This tree-like Node called Particle is _the_ data structure in Particles. Types like booleans, ints and vectors only exist at the higher level once Parsers is added.
- * Higher level Scroll Dialects are where additional concepts can be added like strings, integers, booleans, control flow, assignment, encapsulation, functions, and so forth.
+ Parsers and Scroll (which is written in Parsers) is where additional concepts can be added like strings, integers, booleans, control flow, assignment, encapsulation, functions, and so forth.
- * Example:
+ Example:
- * In Particles, the units of measure are *words* and *particles*. Each line is equal to one particle. The example program above has 5 words and 2 particles. In this language the particleType 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 particle a *child particle* of the line above it, the if particle.
-
- * If you are familiar with Lisp terminology, you can think of words as atoms.
+ In Particles, the units of measure are *atoms* and *particles*. Each line is equal to one particle. The example program above has 5 atoms and 2 particles. In this language the particleType 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 particle a *subparticle* of the line above it, the if particle.
- * 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 *particleTypes* and *cellTypes*. In the example language above, the word "true" would be in a boolean cell type.
+ Parsers add the additional concept of *typed atoms*, which can be thought of as placeholders and type information for words. Parsers define new languages with *particleTypes* and *atomTypes*. In the example language above, the word "true" would be in a boolean atom type.
- * Here is a longer spec.
+ Here is a longer spec.
- * Particles uses a single space to indent blocks which indicates parent/child relationship. You can only increase the indent level one level at a time.
+ Particles uses a single space to indent blocks which indicates parent/child relationship. You can only increase the indent level one level at a time.
- * Yes. Particles only uses the `\n` character to separate particles/lines. `\r` is either ignored or treated as a content character. In practice it's easier to drop all `\r` :).
+ Yes. Particles only uses the `\n` character to separate particles/lines. `\r` is either ignored or treated as a content character. In practice it's easier to drop all `\r` :).
- * Particles supports all encodings. This is perfectly valid Particles:
+ Particles supports all encodings. This is perfectly valid Particles:
- * In fact, there is no such thing as an invalid Particles 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 Particles document at the base level, just as there is no such thing as an "invalid binary sequence".
- * Usually when using Particles you use a higher level grammar, called a Scroll Dialect, and so you can still have invalid programs in that language (because of typos, for example) even though your Particles is valid.
+ Usually when using Particles you use a higher level grammar, implemented with Parsers, and so you can still have invalid programs in that language (because of typos, for example) even though your Particles is valid.
- * In Particles you never need to escape characters. If your particle 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 particleType definition treats child particles as one block. Some Scroll Dialects might have the notion of escape characters in certain places, but there's no such thing at the Particles base layer.
+ In Particles you never need to escape characters. If your particle 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 particleType definition treats child particles as one block. Some parsers might have the notion of escape characters in certain places, but there's no such thing at the Particles base layer.
- * No. A subset of Particles does, but for perfect one-to-one matching you'll want to use a Scroll Dialect specifically designed for that language.
+ No. A subset of Particles does, but for perfect one-to-one matching you'll want to use parsers specifically designed for that language.
- * Yes! The ScrollSDK provides Particles support for TypeScript and Javascript, but someday there may be Particles and Parser implementations in all programming languages, similar to how most languages nowadays have JSON libraries.
+ Yes! The ScrollSDK provides Particles support for TypeScript and Javascript, but someday there may be Particles and Parser implementations in all programming languages, similar to how most languages nowadays have JSON libraries.
+ https://github.com/breck7/scrollsdk ScrollSDK
- * If you want to build a Particles library for your language, there is a meta project intended to help!
+ If you want to build a Particles library for your language, the swim tests are intended to help!
+ https://github.com/breck7/scrollsdk/tree/main/swim swim tests
- * Particles is free and open source. The Particles Lab is a distributed research group started in Hawaii that works on the core Particles infrastructure projects. The plan is to build the infrastructure needed to test whether Particles is a good idea. If it is, get a broader Particles ecosystem growing.
+ Particles is free, open source, and public domain. The Particles Lab is a distributed research group started in Hawaii that works on the core Particles infrastructure projects. The plan is to build the infrastructure needed to test whether Particles is a good idea. If it is, get a broader Particles ecosystem growing.
- * Sort of! Particles is ready for early adopters. If you use Particles today, you probably will want to stay up to date with what's happening as the tooling is still rapidly evolving.
+ Yes! Particles is ready for early adopters. If you use Particles today, you probably will want to stay up to date with what's happening as the tooling is still rapidly evolving.
- * 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 2024 is probably a better time to start using it.
- * 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.
- * 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.
- * No. We strongly recommend using an editor that supports Particles 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 Particles, 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 Particles 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 Particles, 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.
- # For Advanced Scroll Dialect Creators
+ # For Parsers Creators
- ? What are the benefits to writing a "Grammar" file to create my Scroll Dialect?
- * 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.
+ ? What are the benefits to writing a parsers?
+ By creating 1 file in parsers, you get a new programming language with autocomplete, syntax highlighting, type-checking, help, integration tests, compiling, and more. The goal of Parsers is to help you create a new, robust, well tested language as easily as possible.
- * Yes! As of ScrollSDK 35, Parsers supports other notations. Originally only prefix notation was supported without writing a decent amount of target code.
+ Yes! As of ScrollSDK 35, Parsers supports other notations. Originally only prefix notation was supported without writing a decent amount of target code.
- * Yes! While not supported at the base Particles level, your individual particles can certainly have inline trees. Often your Scroll Dialects will have particles that contain content written in traditional languages like Javascript, Lisp, or Python. Or you could even have inline trees written in Particles, except using something like the pipe character as particleBreakSymbol instead of the newline character.
+ Yes! While not supported at the base Particles level, your individual particles can certainly have inline trees. Often your parsers will have particles that contain content written in traditional languages like Javascript, Lisp, or Python. Or you could even have inline trees written in Particles, except using something like the pipe character as particleBreakSymbol instead of the newline character.
- * It is largely accurate to say Particles is S-Expressions without parenthesis. But this makes them very different! Particles 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 Particles is S-Expressions without parenthesis. But this makes them very different! Particles 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.
- * No. It is largely accurate to say Particles is S-Expressions without parenthesis. However, Particles has a useful geometric isomorphism that S-Expressions/Lisp lack, that might have significant network effects.
+ No. It is largely accurate to say Particles is S-Expressions without parenthesis. However, Particles has a useful geometric isomorphism that S-Expressions/Lisp lack, that might have significant network effects.
- * If you have a Scroll Dialect with a root particleType named `folder`, and you want to rename the keyword of that particleType 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 parsers with a root particleType named `folder`, and you want to rename the keyword of that particleType 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.
- * Easy program concatenation. For example, in Particles 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 Particles you can create valid new programs simply by appending strings, whereas in Lisp you might first have to do some parentheses removing and inserting.
- * In Lisp you have to escape certain characters. In Particles, you never need to escape characters. (Note: although you are 100% free to design Scroll Dialects that implement escape characters, that is almost never necessary).
+ In Lisp you have to escape certain characters. In Particles, you never need to escape characters. (Note: although you are 100% free to design parsers that implement escape characters, that is almost never necessary).
- * You can read the half-baked papers about Particles.
- https://github.com/breck7/research/tree/master/papers papers
+ You can read the half-baked papers about Particles.
+ https://breckyunits.com/papers.html papers
- * The basic gist of the theory is that all structures are trees, Particles is all you need to represent trees, and by building things up from Particles we might be able to make things simpler _AND better_.
+ The basic gist of the theory is that all structures are trees, Particles is all you need to represent trees, and by building things up from Particles we might be able to make things simpler _AND better_.
- * 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.
+ http://haml.info/ HAML
- * Breck Yunits et al. came up with Particles 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 Particles. A few implementation details weren't ideal, but the core is largely the same.
+ Breck Yunits et al. came up with Particles 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 Particles. A few implementation details weren't ideal, but the core is largely the same.
+ https://srfi.schemers.org/srfi-49/srfi-49.html proposed
- * Not sure. Perhaps because it was pitched as a different way to write Lisp, and that was it. With Particles, 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 Particles is an ideal tool.
+ Not sure. Perhaps because it was pitched as a different way to write Lisp, and that was it. With Particles, 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 Particles is an ideal tool.
- * If Particles turns out to be a good idea, below is the origin story.
+ If Particles turns out to be a good idea, below is the origin story.
Changed around line 268: quote
- * 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!
- * 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.
- * Rule #1. Put it in a Scroll Dialect.
- * End of Rules.
+ Rule #1. Put it in a parser.
+ End of Rules.
- import footer.scroll
+ footer.scroll
spec.scroll
Changed around line 1
- import header.scroll
+ header.scroll
Changed around line 19: The basic structure of a Particles object is as follows:
- words: string[]
- children: Particle[]
+ atoms: string[]
+ subparticles: Particle[]
Changed around line 31: code
- A program in Particles is isomorphic to a spreadsheet. A single row is a node. Words are in cells. You can make a row a child of the row above it by indenting it with an additional blank cell in the head.
+ A program in Particles is isomorphic to a spreadsheet. A single row is a particle. Atoms are in cells. You can make a row a subparticle of the row above it by indenting it with an additional blank cell in the head.
- particleBreakSymbol
- - wordBreakSymbol
+ - atomBreakSymbol
- edgeSymbol
- *particleBreakSymbol* delimits nodes (lines), *wordBreakSymbol* delimits words (cells), and *edgeSymbol* is used to indicate the parent/child relationship between nodes.
+ *particleBreakSymbol* delimits particles (lines), *atomBreakSymbol* delimits atoms (cells/atoms), and *edgeSymbol* is used to indicate the parent/child relationship between particles.
- With just particleBreakSymbol and wordBreakSymbol, you get Grid Notation. The addition of edgeSymbol adds the parent/child concept.
+ With just particleBreakSymbol and atomBreakSymbol, you get Grid Notation. The addition of edgeSymbol adds the parent/child concept.
Changed around line 58: code
- wordBreakSymbol
+ atomBreakSymbol
Changed around line 68: code
- # by convention is the same as wordBreakSymbol above
+ # by convention is the same as atomBreakSymbol above
- For better interoperability with existing spreadsheet applications the tab character `\t` can be used for wordBreakSymbol and edgeSymbol.
+ For better interoperability with existing spreadsheet applications the tab character `\t` can be used for atomBreakSymbol and edgeSymbol.
- Although in theory edgeSymbol and wordBreakSymbol can conflict, in practice, given higher level Parsers, that does not happen.
+ Although in theory edgeSymbol and atomBreakSymbol can conflict, in practice, given higher level Parsers, that does not happen.
Changed around line 84: Parsers is an advanced language for building other languages. This spec is writt
- import footer.scroll
+ footer.scroll
Breck Yunits
Breck Yunits
4 months ago
header.scroll
Changed around line 1
- description Frequently Asked Questions about Particle Notation
+ description Frequently Asked Questions about Particles
readme.scroll
Changed around line 1
- title Particle Notation Frequently Asked Questions
+ title Particles Frequently Asked Questions
- * Below is a list of questions that are commonly asked by people who are new to Particle Notation. If you have a question not listed here please ask us on Twitter or by posting a message to the World Wide Scroll Subreddit.
- https://notation.scroll.pub/ Particle Notation
+ * Below is a list of questions that are commonly asked by people who are new to Particles. If you have a question not listed here please ask us on Twitter or by posting a message to the World Wide Scroll Subreddit.
+ https://particles.scroll.pub/ Particles
- Particle Notation was originally called Scroll Notation and before that Tree Notation.
+ Particles was originally called Scroll Notation and before that Tree Notation.
- ? What is Particle Notation?
- Particle Notation is a simple syntax that Scroll is built on top of.
+ ? What is Particles?
+ Particles is a simple syntax that Scroll is built on top of.
- For programmers, this might give you an idea of the structure behind Particle Notation:
+ For programmers, this might give you an idea of the structure behind Particles:
Changed around line 38: code
- * One important feature of Particle Notation is that due to its simplicity and consistency, Scroll Dialects are easy to write - and code or information represented in a Scroll Dialect is easy to syntax check (and highlight) - and autocomplete.
+ * One important feature of Particles is that due to its simplicity and consistency, Scroll Dialects are easy to write - and code or information represented in a Scroll Dialect is easy to syntax check (and highlight) - and autocomplete.
- * There is only 1 binary. Particle Notation is more like binary than it is like a programming language. Particle Notation is a basic building block that you can build higher level languages on top of. Particle Notation is an error-free base notation like binary.
+ * There is only 1 binary. Particles is more like binary than it is like a programming language. Particles is a basic building block that you can build higher level languages on top of. Particles is an error-free base syntax like binary.
- 1 Binary => 1 Particle Notation => 10,000+ Scroll Languages
+ 1 Binary => 1 Particles => 10,000+ Scroll Languages
- * We all use software tools to build software. Particle Notation makes building these tools easier, and as more people join the Particle Notation ecosystem there may be significant network effects. If Jane is building a Scroll Dialect and tools for automating train schedules, and John is building a Scroll Dialect 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. Particles makes building these tools easier, and as more people join the Particles ecosystem there may be significant network effects. If Jane is building a Scroll Dialect and tools for automating train schedules, and John is building a Scroll Dialect and tools for doing cancer research, even though their 2 domains are very different, they can share a lot of the tools and code.
- ? What's the difference between Particle Notation and Scroll Dialects?
- * Particle Notation is a base level notation. Generally users use Scroll Dialects, which make Particle Notation useful. The Scroll Dialect Grammar is a tool to make it easier to build Scroll Dialects.
+ ? What's the difference between Particles and Scroll Dialects?
+ * Particles is a base level syntax. Generally users use Scroll Dialects, which make Particles useful. The Scroll Dialect Grammar is a tool to make it easier to build Scroll Dialects.
- ? What is special about Particle Notation?
- * Particle Notation may seem similar to notations like JSON, XML, YAML or S-expressions. However, Particle Notation is the most minimal, has an isomorphism to Euclidean geometry, and the concept of syntax errors does not exist. These differences may make Particle Notation substantially different and may cause a _significant improvement_ in computing.
+ ? What is special about Particles?
+ * Particles may seem similar to notations like JSON, XML, YAML or S-expressions. However, Particles is the most minimal, has an isomorphism to Euclidean geometry, and the concept of syntax errors does not exist. These differences may make Particles substantially different and may cause a _significant improvement_ in computing.
- ? What major problems in computer science does help Particle Notation solve?
- - 1. Program synthesis. Particle 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. Particle 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. Particle Notation offers a number of techniques that, coupled with network effects, could greatly reduce time wasted on cleaning data.
- - 3. Visual programming. Particle 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 Particle Notation there is only 1 way to represent 1 structure. This simplification is one of a few core reasons why Particle Notation could help solve the Visual Programming problem.
+ ? What major problems in computer science does help Particles solve?
+ - 1. Program synthesis. Particles 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. Particles 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. Particles offers a number of techniques that, coupled with network effects, could greatly reduce time wasted on cleaning data.
+ - 3. Visual programming. Particles is the first syntax 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 Particles there is only 1 way to represent 1 structure. This simplification is one of a few core reasons why Particles could help solve the Visual Programming problem.
- * The data science app Ohayo is in part an experiment to test these 3 advantages of Particle Notation.
+ * The data science app Ohayo is in part an experiment to test these 3 advantages of Particles.
- ? What is a basic example of Particle Notation for file formats?
- * Currently all Node.js npm projects contain a `package.json` file. While this is simple, it could be simpler using Particle Notation, and better. Let's take a look.
+ ? What is a basic example of Particles for file formats?
+ * Currently all Node.js npm projects contain a `package.json` file. While this is simple, it could be simpler using Particles, and better. Let's take a look.
Changed around line 92: code
- * Note: the JSON example above works correctly, but JSON and Particle Notation are not equivalent by default, since JSON does not support certain structures and Particle 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 Scroll Dialect such as Dug that has a 1-to-1 relationship to JSON.
+ * Note: the JSON example above works correctly, but JSON and Particles are not equivalent by default, since JSON does not support certain structures and Particles 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 Scroll Dialect such as Dug that has a 1-to-1 relationship to JSON.
- ? What is a basic example of Particle Notation for programming languages?
- * In the example below, Particle Notation is used as a base for a math Scroll Dialect where traditionally S-Expressions/Lisp might be used.
+ ? What is a basic example of Particles for programming languages?
+ * In the example below, Particles is used as a base for a math Scroll Dialect where traditionally S-Expressions/Lisp might be used.
Changed around line 107: code
- ? What are some advanced examples of Particle Notation in action?
+ ? What are some advanced examples of Particles in action?
Changed around line 116: code
- ? Where can I use Particle Notation?
- * Everywhere! Anywhere you use programming languages or encodings, you can use Particle Notation. Hopefully a Particle Notation Ecosystem will grow, if Particle Notation turns out to be a good idea. Until then use it wherever and don't be shy about asking for help.
+ ? Where can I use Particles?
+ * Everywhere! Anywhere you use programming languages or encodings, you can use Particles. Hopefully a Particles Ecosystem will grow, if Particles turns out to be a good idea. Until then use it wherever and don't be shy about asking for help.
Changed around line 127: code
- ? What is the difference between Particle Notation and Scroll Dialects?
- * There is an important distinction between _Particle Notation_ and _Scroll Dialects_. Particle Notation is a simple dumb format for encoding Tree Data structures. Scroll Dialects give you higher level semantics. There is not a single general purpose "Scroll Dialect", like you might expect if you come from the Racket or Lisp worlds. Instead, there are many independent general purpose "Scroll Dialects" with any semantics desired by the language designer(s).
+ ? What is the difference between Particles and Scroll Dialects?
+ * There is an important distinction between _Particles_ and _Scroll Dialects_. Particles is a simple dumb format for encoding Tree Data structures. Scroll Dialects give you higher level semantics. There is not a single general purpose "Scroll Dialect", like you might expect if you come from the Racket or Lisp worlds. Instead, there are many independent general purpose "Scroll Dialects" with any semantics desired by the language designer(s).
- ? What are the data structures in Particle Notation?
- * This is the base Particle Notation:
+ ? What are the data structures in Particles?
+ * This is the base Particles:
Changed around line 141: code
- * The Tree is _the_ data structure in Particle Notation. Types like booleans, ints and vectors only exist at the higher level Scroll Dialect level. The theory behind Particle Notation is that concepts like booleans, ints and vectors are just kinds of Trees.
+ * The Tree is _the_ data structure in Particles. Types like booleans, ints and vectors only exist at the higher level Scroll Dialect level. The theory behind Particles is that concepts like booleans, ints and vectors are just kinds of Trees.
- ? What are the basic terms when talking about things written in Particle Notation?
+ ? What are the basic terms when talking about things written in Particles?
- * In Particle Notation, the units of measure are *words* and *particles*. Each line is equal to one particle. The example program above has 5 words and 2 particles. In this language the particleType 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 particle a *child particle* of the line above it, the if particle.
+ * In Particles, the units of measure are *words* and *particles*. Each line is equal to one particle. The example program above has 5 words and 2 particles. In this language the particleType 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 particle a *child particle* of the line above it, the if particle.
Changed around line 160: code
- ? Does Particle Notation use tabs or spaces?
- * Particle 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.
+ ? Does Particles use tabs or spaces?
+ * Particles uses a single space to indent blocks which indicates parent/child relationship. You can only increase the indent level one level at a time.
- ? Does Particle Notation work on Windows?
- * Yes. Particle Notation only uses the `\n` character to separate particles/lines. `\r` is either ignored or treated as a content character. In practice it's easier to drop all `\r` :).
+ ? Does Particles work on Windows?
+ * Yes. Particles only uses the `\n` character to separate particles/lines. `\r` is either ignored or treated as a content character. In practice it's easier to drop all `\r` :).
- ? Does Particle Notation support Unicode or just ASCII?
- * Particle Notation supports all encodings. This is perfectly valid Particle Notation:
+ ? Does Particles support Unicode or just ASCII?
+ * Particles supports all encodings. This is perfectly valid Particles:
- * In fact, there is no such thing as an invalid Particle 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 Particles document at the base level, just as there is no such thing as an "invalid binary sequence".
- * Usually when using Particle Notation you use a higher level grammar, called a Scroll Dialect, and so you can still have invalid programs in that language (because of typos, for example) even though your Particle Notation is valid.
+ * Usually when using Particles you use a higher level grammar, called a Scroll Dialect, and so you can still have invalid programs in that language (because of typos, for example) even though your Particles is valid.
- * In Particle Notation you never need to escape characters. If your particle 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 particleType definition treats child particles as one block. Some Scroll Dialects might have the notion of escape characters in certain places, but there's no such thing at the Particle Notation base layer.
+ * In Particles you never need to escape characters. If your particle 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 particleType definition treats child particles as one block. Some Scroll Dialects might have the notion of escape characters in certain places, but there's no such thing at the Particles base layer.
- ? Does Particle Notation directly map to XML or JSON?
- * No. A subset of Particle Notation does, but for perfect one-to-one matching you'll want to use a Scroll Dialect specifically designed for that language.
+ ? Does Particles directly map to XML or JSON?
+ * No. A subset of Particles does, but for perfect one-to-one matching you'll want to use a Scroll Dialect specifically designed for that language.
- ? Can I use Particle Notation with any programming language?
- * Yes! The ScrollSDK provides Particle Notation support for TypeScript and Javascript, but someday there may be Particle Notation and Parser implementations in all programming languages, similar to how most languages nowadays have JSON libraries.
+ ? Can I use Particles with any programming language?
+ * Yes! The ScrollSDK provides Particles support for TypeScript and Javascript, but someday there may be Particles and Parser implementations in all programming languages, similar to how most languages nowadays have JSON libraries.
- * If you want to build a Particle Notation library for your language, there is a meta project intended to help!
+ * If you want to build a Particles library for your language, there is a meta project intended to help!
- ? Who makes Particle Notation, and is it open source?
- * Particle Notation is free and open source. The Particle Notation Lab is a distributed research group started in Hawaii that works on the core Particle Notation infrastructure projects. The plan is to build the infrastructure needed to test whether Particle Notation is a good idea. If it is, get a broader Particle Notation ecosystem growing.
+ ? Who makes Particles, and is it open source?
+ * Particles is free and open source. The Particles Lab is a distributed research group started in Hawaii that works on the core Particles infrastructure projects. The plan is to build the infrastructure needed to test whether Particles is a good idea. If it is, get a broader Particles ecosystem growing.
- ? Is Particle Notation ready for production use?
- * Sort of! Particle Notation is ready for early adopters. If you use Particle Notation today, you probably will want to stay up to date with what's happening as the tooling is still rapidly evolving.
+ ? Is Particles ready for production use?
+ * Sort of! Particles is ready for early adopters. If you use Particles today, you probably will want to stay up to date with what's happening as the tooling is still rapidly evolving.
Changed around line 203: code
- ? How can I copy and paste code in Particle Notation and have the editor ensure correct indentation?
+ ? How can I copy and paste code in Particles and have the editor ensure correct indentation?
- * No. We strongly recommend using an editor that supports Particle 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 Particle 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 Particles 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 Particles, 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.
Changed around line 218: code
- * Yes! While not supported at the base Particle Notation level, your individual particles can certainly have inline trees. Often your Scroll Dialects will have particles that contain content written in traditional languages like Javascript, Lisp, or Python. Or you could even have inline trees written in Particle Notation, except using something like the pipe character as particleBreakSymbol instead of the newline character.
+ * Yes! While not supported at the base Particles level, your individual particles can certainly have inline trees. Often your Scroll Dialects will have particles that contain content written in traditional languages like Javascript, Lisp, or Python. Or you could even have inline trees written in Particles, except using something like the pipe character as particleBreakSymbol instead of the newline character.
- * It is largely accurate to say Particle Notation is S-Expressions without parenthesis. But this makes them very different! Particle 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 Particles is S-Expressions without parenthesis. But this makes them very different! Particles 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.
- ? Is Particle Notation just Lisp?
- * No. It is largely accurate to say Particle Notation is S-Expressions without parenthesis. However, Particle Notation has a useful geometric isomorphism that S-Expressions/Lisp lack, that might have significant network effects.
+ ? Is Particles just Lisp?
+ * No. It is largely accurate to say Particles is S-Expressions without parenthesis. However, Particles has a useful geometric isomorphism that S-Expressions/Lisp lack, that might have significant network effects.
- ? What's an example of "ad hoc" parsing that you can do with Particle Notation that you cannot do with S-Expressions?
+ ? What's an example of "ad hoc" parsing that you can do with Particles that you cannot do with S-Expressions?
- ? What's something else you can do with Particle Notation that you can't do with Lisp?
- * Easy program concatenation. For example, in Particle 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.
+ ? What's something else you can do with Particles that you can't do with Lisp?
+ * Easy program concatenation. For example, in Particles you can create valid new programs simply by appending strings, whereas in Lisp you might first have to do some parentheses removing and inserting.
- * In Lisp you have to escape certain characters. In Particle Notation, you never need to escape characters. (Note: although you are 100% free to design Scroll Dialects that implement escape characters, that is almost never necessary).
+ * In Lisp you have to escape certain characters. In Particles, you never need to escape characters. (Note: although you are 100% free to design Scroll Dialects that implement escape characters, that is almost never necessary).
- ? Are there any papers written about Particle Notation?
- * You can read the half-baked papers about Particle Notation.
+ ? Are there any papers written about Particles?
+ * You can read the half-baked papers about Particles.
- * The basic gist of the theory is that all structures are trees, Particle Notation is all you need to represent trees, and by building things up from Particle Notation we might be able to make things simpler _AND better_.
+ * The basic gist of the theory is that all structures are trees, Particles is all you need to represent trees, and by building things up from Particles we might be able to make things simpler _AND better_.
- ? Which language influenced Particle Notation the most?
+ ? Which language influenced Particles the most?
- ? Who is the first person to discover Particle Notation?
- * Breck Yunits et al. came up with Particle 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 Particle Notation. A few implementation details weren't ideal, but the core is largely the same.
+ ? Who is the first person to discover Particles?
+ * Breck Yunits et al. came up with Particles 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 Particles. A few implementation details weren't ideal, but the core is largely the same.
- * Not sure. Perhaps because it was pitched as a different way to write Lisp, and that was it. With Particle 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 Particle Notation is an ideal tool.
+ * Not sure. Perhaps because it was pitched as a different way to write Lisp, and that was it. With Particles, 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 Particles is an ideal tool.
- ? How was Particle Notation discovered?
- * If Particle Notation turns out to be a good idea, below is the origin story.
+ ? How was Particles discovered?
+ * If Particles turns out to be a good idea, below is the origin story.
Changed around line 274: quote
- It was over 7 years before the first "aha" moment that Particle Notation started to maybe get useful.
+ It was over 7 years before the first "aha" moment that Particles started to maybe get useful.
Changed around line 284: quote
- ? What is the Zen of Particle Notation?
+ ? What is the Zen of Particles?
spec.scroll
Changed around line 1
- title Particle Notation Spec
+ title Particles Spec
- Particle Notation is a subset of a class of languages called two dimensional languages.
+ Particles is a subset of a class of languages called two dimensional languages.
- Particle Notation is a middle ground that utilitizes ideas from the two dimensional language world using present day technology.
+ Particles is a middle ground that utilitizes ideas from the two dimensional language world using present day technology.
- # Particle Notation Spec
+ # Particles Spec
- The basic structure of a Particle Notation object is as follows:
+ The basic structure of a Particles object is as follows:
Changed around line 24: code
- All documents are valid Particle Notation documents. Like binary notation, there are no syntax errors in Particle Notation. For every possible string _abc_:
+ All documents are valid Particles documents. Like binary notation, there are no syntax errors in Particles. For every possible string _abc_:
- A program in Particle Notation is isomorphic to a spreadsheet. A single row is a node. Words are in cells. You can make a row a child of the row above it by indenting it with an additional blank cell in the head.
+ A program in Particles is isomorphic to a spreadsheet. A single row is a node. Words are in cells. You can make a row a child of the row above it by indenting it with an additional blank cell in the head.
- A Particle Notation object is a sequence of bits/bytes/characters(hereafter abbreviated as chars). Particle Notation requires the definition of 3 special chars, which turn an otherwise unstructured linear sequence of chars into a structured recursive tree object.
+ A Particles object is a sequence of bits/bytes/characters(hereafter abbreviated as chars). Particles requires the definition of 3 special chars, which turn an otherwise unstructured linear sequence of chars into a structured recursive tree object.
- particleBreakSymbol
Changed around line 74: For better interoperability with existing spreadsheet applications the tab chara
- * This is currently the full spec of Particle Notation.
+ * This is currently the full spec of Particles.
- The structure above defines Particle Notation. Particle Notation is a very basic notation. On top of Particle Notation, people use _Parsers_. You can see examples of higher level Parsers in the Parsers Designer.
+ The structure above defines Particles. Particles is a very basic notation. On top of Particles, people use _Parsers_. You can see examples of higher level Parsers in the Parsers Designer.
Breck Yunits
Breck Yunits
4 months ago
.gitignore
Changed around line 1
- *.xml
+ *.xml
+ *.txt
footer.scroll
Changed around line 1
- pageFooter
+ center
+ viewSourceButton
+ scrollVersionLink
header.scroll
Changed around line 1
- description Frequently Asked Questions about Scroll Notation
- git https://github.com/breck7/faq.scroll.pub
+ description Frequently Asked Questions about Particle Notation
- email breck7@gmail.com
- pageHeader
+ homeButton
+ leftRightButtons
+ viewSourceButton
readme.scroll
Changed around line 1
- title Scroll Notation Frequently Asked Questions
+ title Particle Notation Frequently Asked Questions
- startColumns 4
+ thinColumns 4
- * Below is a list of questions that are commonly asked by people who are new to Scroll Notation. If you have a question not listed here please ask us on Twitter or by posting a message to the Scroll Subreddit.
- https://notation.scroll.pub/ Scroll Notation
+ * Below is a list of questions that are commonly asked by people who are new to Particle Notation. If you have a question not listed here please ask us on Twitter or by posting a message to the World Wide Scroll Subreddit.
+ https://notation.scroll.pub/ Particle Notation
- https://www.reddit.com/r/ScrollLang/ Scroll Subreddit
+ https://www.reddit.com/r/WorldWideScroll/ World Wide Scroll Subreddit
- Scroll Notation was originally called Tree Notation.
+ Particle Notation was originally called Scroll Notation and before that Tree Notation.
- ? What is Scroll Notation?
- Scroll Notation is a simple syntax that Scroll is built on top of.
+ ? What is Particle Notation?
+ Particle Notation is a simple syntax that Scroll is built on top of.
- For programmers, this might give you an idea of the structure behind Scroll Notation:
+ For programmers, this might give you an idea of the structure behind Particle Notation:
- nodeBreakSymbol = "\n" // New lines separate nodes
+ particleBreakSymbol = "\n" // New lines separate particles
- interface TreeNode {
- children: TreeNode[]
+ interface Particle {
+ children: Particle[]
Changed around line 38: code
- * One important feature of Scroll Notation is that due to its simplicity and consistency, Scroll Dialects are easy to write - and code or information represented in a Scroll Dialect is easy to syntax check (and highlight) - and autocomplete.
+ * One important feature of Particle Notation is that due to its simplicity and consistency, Scroll Dialects are easy to write - and code or information represented in a Scroll Dialect is easy to syntax check (and highlight) - and autocomplete.
- * There is only 1 binary. Scroll Notation is more like binary than it is like a programming language. Scroll Notation is a basic building block that you can build higher level languages on top of. Scroll Notation is an error-free base notation like binary.
+ * There is only 1 binary. Particle Notation is more like binary than it is like a programming language. Particle Notation is a basic building block that you can build higher level languages on top of. Particle Notation is an error-free base notation like binary.
- 1 Binary => 1 Scroll Notation => 10,000+ Scroll Languages
+ 1 Binary => 1 Particle Notation => 10,000+ Scroll Languages
- * We all use software tools to build software. Scroll Notation makes building these tools easier, and as more people join the Scroll Notation ecosystem there may be significant network effects. If Jane is building a Scroll Dialect and tools for automating train schedules, and John is building a Scroll Dialect 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. Particle Notation makes building these tools easier, and as more people join the Particle Notation ecosystem there may be significant network effects. If Jane is building a Scroll Dialect and tools for automating train schedules, and John is building a Scroll Dialect and tools for doing cancer research, even though their 2 domains are very different, they can share a lot of the tools and code.
- ? What's the difference between Scroll Notation and Scroll Dialects?
- * Scroll Notation is a base level notation. Generally users use Scroll Dialects, which make Scroll Notation useful. The Scroll Dialect Grammar is a tool to make it easier to build Scroll Dialects.
+ ? What's the difference between Particle Notation and Scroll Dialects?
+ * Particle Notation is a base level notation. Generally users use Scroll Dialects, which make Particle Notation useful. The Scroll Dialect Grammar is a tool to make it easier to build Scroll Dialects.
- ? What is special about Scroll Notation?
- * Scroll Notation may seem similar to notations like JSON, XML, YAML or S-expressions. However, Scroll Notation is the most minimal, has an isomorphism to Euclidean geometry, and the concept of syntax errors does not exist. These differences may make Scroll Notation substantially different and may cause a _significant improvement_ in computing.
+ ? What is special about Particle Notation?
+ * Particle Notation may seem similar to notations like JSON, XML, YAML or S-expressions. However, Particle Notation is the most minimal, has an isomorphism to Euclidean geometry, and the concept of syntax errors does not exist. These differences may make Particle Notation substantially different and may cause a _significant improvement_ in computing.
- ? What major problems in computer science does help Scroll Notation solve?
- - 1. Program synthesis. Scroll 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. Scroll 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. Scroll Notation offers a number of techniques that, coupled with network effects, could greatly reduce time wasted on cleaning data.
- - 3. Visual programming. Scroll 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 Scroll Notation there is only 1 way to represent 1 structure. This simplification is one of a few core reasons why Scroll Notation could help solve the Visual Programming problem.
+ ? What major problems in computer science does help Particle Notation solve?
+ - 1. Program synthesis. Particle 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. Particle 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. Particle Notation offers a number of techniques that, coupled with network effects, could greatly reduce time wasted on cleaning data.
+ - 3. Visual programming. Particle 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 Particle Notation there is only 1 way to represent 1 structure. This simplification is one of a few core reasons why Particle Notation could help solve the Visual Programming problem.
- * The data science app Ohayo is in part an experiment to test these 3 advantages of Scroll Notation.
+ * The data science app Ohayo is in part an experiment to test these 3 advantages of Particle Notation.
- ? What is a basic example of Scroll Notation for file formats?
- * Currently all Node.js npm projects contain a `package.json` file. While this is simple, it could be simpler using Scroll Notation, and better. Let's take a look.
+ ? What is a basic example of Particle Notation for file formats?
+ * Currently all Node.js npm projects contain a `package.json` file. While this is simple, it could be simpler using Particle Notation, and better. Let's take a look.
Changed around line 92: code
- * Note: the JSON example above works correctly, but JSON and Scroll Notation are not equivalent by default, since JSON does not support certain structures and Scroll 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 Scroll Dialect such as Dug that has a 1-to-1 relationship to JSON.
+ * Note: the JSON example above works correctly, but JSON and Particle Notation are not equivalent by default, since JSON does not support certain structures and Particle 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 Scroll Dialect such as Dug that has a 1-to-1 relationship to JSON.
- ? What is a basic example of Scroll Notation for programming languages?
- * In the example below, Scroll Notation is used as a base for a math Scroll Dialect where traditionally S-Expressions/Lisp might be used.
+ ? What is a basic example of Particle Notation for programming languages?
+ * In the example below, Particle Notation is used as a base for a math Scroll Dialect where traditionally S-Expressions/Lisp might be used.
Changed around line 107: code
- ? What are some advanced examples of Scroll Notation in action?
+ ? What are some advanced examples of Particle Notation in action?
Changed around line 116: code
- ? Where can I use Scroll Notation?
- * Everywhere! Anywhere you use programming languages or encodings, you can use Scroll Notation. Hopefully a Scroll Notation Ecosystem will grow, if Scroll Notation turns out to be a good idea. Until then use it wherever and don't be shy about asking for help.
+ ? Where can I use Particle Notation?
+ * Everywhere! Anywhere you use programming languages or encodings, you can use Particle Notation. Hopefully a Particle Notation Ecosystem will grow, if Particle Notation turns out to be a good idea. Until then use it wherever and don't be shy about asking for help.
- ? What are some examples of Scroll Dialects?
- * There are over a dozen example languages in the JTree GitHub repo. Here's a language that compiles to HTML, a language similar to Make, and a language that does simple math .
+ ? What are some examples of Scroll microlangs?
+ * There are over a dozen example microlangs in the ScrollSDK GitHub repo. Here's a language that compiles to HTML, a language similar to Make, and a language that does simple math .
- ? What is the difference between Scroll Notation and Scroll Dialects?
- * There is an important distinction between _Scroll Notation_ and _Scroll Dialects_. Scroll Notation is a simple dumb format for encoding Tree Data structures. Scroll Dialects give you higher level semantics. There is not a single general purpose "Scroll Dialect", like you might expect if you come from the Racket or Lisp worlds. Instead, there are many independent general purpose "Scroll Dialects" with any semantics desired by the language designer(s).
+ ? What is the difference between Particle Notation and Scroll Dialects?
+ * There is an important distinction between _Particle Notation_ and _Scroll Dialects_. Particle Notation is a simple dumb format for encoding Tree Data structures. Scroll Dialects give you higher level semantics. There is not a single general purpose "Scroll Dialect", like you might expect if you come from the Racket or Lisp worlds. Instead, there are many independent general purpose "Scroll Dialects" with any semantics desired by the language designer(s).
- ? What are the data structures in Scroll Notation?
- * This is the base Scroll Notation:
+ ? What are the data structures in Particle Notation?
+ * This is the base Particle Notation:
- nodeBreakSymbol = "\n" // New lines separate nodes
+ particleBreakSymbol = "\n" // New lines separate particles
- interface TreeNode {
- parent: &TreeNode
- children: TreeNode[]
+ interface Particle {
+ parent: &Particle
+ children: Particle[]
- * The Tree is _the_ data structure in Scroll Notation. Types like booleans, ints and vectors only exist at the higher level Scroll Dialect level. The theory behind Scroll Notation is that concepts like booleans, ints and vectors are just kinds of Trees.
+ * The Tree is _the_ data structure in Particle Notation. Types like booleans, ints and vectors only exist at the higher level Scroll Dialect level. The theory behind Particle Notation is that concepts like booleans, ints and vectors are just kinds of Trees.
- ? What are the basic terms when talking about things written in Scroll Notation?
+ ? What are the basic terms when talking about things written in Particle Notation?
- * In Scroll 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 Particle Notation, the units of measure are *words* and *particles*. Each line is equal to one particle. The example program above has 5 words and 2 particles. In this language the particleType 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 particle a *child particle* of the line above it, the if particle.
- * 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 *particleTypes* and *cellTypes*. In the example language above, the word "true" would be in a boolean cell type.
- ? Does Scroll Notation use tabs or spaces?
- * Scroll 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.
+ ? Does Particle Notation use tabs or spaces?
+ * Particle 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.
- ? Does Scroll Notation work on Windows?
- * Yes. Scroll 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` :).
+ ? Does Particle Notation work on Windows?
+ * Yes. Particle Notation only uses the `\n` character to separate particles/lines. `\r` is either ignored or treated as a content character. In practice it's easier to drop all `\r` :).
- ? Does Scroll Notation support Unicode or just ASCII?
- * Scroll Notation supports all encodings. This is perfectly valid Scroll Notation:
+ ? Does Particle Notation support Unicode or just ASCII?
+ * Particle Notation supports all encodings. This is perfectly valid Particle Notation:
- * In fact, there is no such thing as an invalid Scroll 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 Particle Notation document at the base level, just as there is no such thing as an "invalid binary sequence".
- * Usually when using Scroll Notation you use a higher level grammar, called a Scroll Dialect, and so you can still have invalid programs in that language (because of typos, for example) even though your Scroll Notation is valid.
+ * Usually when using Particle Notation you use a higher level grammar, called a Scroll Dialect, and so you can still have invalid programs in that language (because of typos, for example) even though your Particle Notation is valid.
- * In Scroll 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 Scroll Dialects might have the notion of escape characters in certain places, but there's no such thing at the Scroll Notation base layer.
+ * In Particle Notation you never need to escape characters. If your particle 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 particleType definition treats child particles as one block. Some Scroll Dialects might have the notion of escape characters in certain places, but there's no such thing at the Particle Notation base layer.
- ? Does Scroll Notation directly map to XML or JSON?
- * No. A subset of Scroll Notation does, but for perfect one-to-one matching you'll want to use a Scroll Dialect specifically designed for that language.
+ ? Does Particle Notation directly map to XML or JSON?
+ * No. A subset of Particle Notation does, but for perfect one-to-one matching you'll want to use a Scroll Dialect specifically designed for that language.
- ? Can I use Scroll Notation with any programming language?
- * Yes! The JTree library provides Scroll Notation support for TypeScript and Javascript, but someday there may be Scroll Notation and Tree Grammar libraries in all programming languages, similar to how most languages nowadays have JSON libraries.
+ ? Can I use Particle Notation with any programming language?
+ * Yes! The ScrollSDK provides Particle Notation support for TypeScript and Javascript, but someday there may be Particle Notation and Parser implementations in all programming languages, similar to how most languages nowadays have JSON libraries.
- * If you want to build a Scroll Notation library for your language, there is a meta project intended to help!
+ * If you want to build a Particle Notation library for your language, there is a meta project intended to help!
- ? Who makes Scroll Notation, and is it open source?
- * Scroll Notation is free and open source. The Scroll Notation Lab is a distributed research group started in Hawaii that works on the core Scroll Notation infrastructure projects. The plan is to build the infrastructure needed to test whether Scroll Notation is a good idea. If it is, get a broader Scroll Notation ecosystem growing.
+ ? Who makes Particle Notation, and is it open source?
+ * Particle Notation is free and open source. The Particle Notation Lab is a distributed research group started in Hawaii that works on the core Particle Notation infrastructure projects. The plan is to build the infrastructure needed to test whether Particle Notation is a good idea. If it is, get a broader Particle Notation ecosystem growing.
- ? Is Scroll Notation ready for production use?
- * Sort of! Scroll Notation is ready for early adopters. If you use Scroll Notation today, you probably will want to stay up to date with what's happening as the tooling is still rapidly evolving.
+ ? Is Particle Notation ready for production use?
+ * Sort of! Particle Notation is ready for early adopters. If you use Particle Notation today, you probably will want to stay up to date with what's happening as the tooling is still rapidly evolving.
Changed around line 203: code
- ? How can I copy and paste code in Scroll Notation and have the editor ensure correct indentation?
+ ? How can I copy and paste code in Particle Notation and have the editor ensure correct indentation?
- * No. We strongly recommend using an editor that supports Scroll 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 Scroll 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 Particle 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 Particle 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.
Changed around line 215: 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.
+ * Yes! As of ScrollSDK 35, Parsers supports other notations. Originally only prefix notation was supported without writing a decent amount of target code.
- * Yes! While not supported at the base Scroll Notation level, your individual nodes can certainly have inline trees. Often your Scroll Dialects will have nodes that contain content written in traditional languages like Javascript, Lisp, or Python. Or you could even have inline trees written in Scroll Notation, except using something like the pipe character as nodeBreakSymbol instead of the newline character.
+ * Yes! While not supported at the base Particle Notation level, your individual particles can certainly have inline trees. Often your Scroll Dialects will have particles that contain content written in traditional languages like Javascript, Lisp, or Python. Or you could even have inline trees written in Particle Notation, except using something like the pipe character as particleBreakSymbol instead of the newline character.
- * It is largely accurate to say Scroll Notation is S-Expressions without parenthesis. But this makes them very different! Scroll 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 Particle Notation is S-Expressions without parenthesis. But this makes them very different! Particle 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.
- ? Is Scroll Notation just Lisp?
- * No. It is largely accurate to say Scroll Notation is S-Expressions without parenthesis. However, Scroll Notation has a useful geometric isomorphism that S-Expressions/Lisp lack, that might have significant network effects.
+ ? Is Particle Notation just Lisp?
+ * No. It is largely accurate to say Particle Notation is S-Expressions without parenthesis. However, Particle Notation has a useful geometric isomorphism that S-Expressions/Lisp lack, that might have significant network effects.
- ? What's an example of "ad hoc" parsing that you can do with Scroll Notation that you cannot do with S-Expressions?
- * If you have a Scroll Dialect 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.
+ ? What's an example of "ad hoc" parsing that you can do with Particle Notation that you cannot do with S-Expressions?
+ * If you have a Scroll Dialect with a root particleType named `folder`, and you want to rename the keyword of that particleType 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.
- ? What's something else you can do with Scroll Notation that you can't do with Lisp?
- * Easy program concatenation. For example, in Scroll 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.
+ ? What's something else you can do with Particle Notation that you can't do with Lisp?
+ * Easy program concatenation. For example, in Particle 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.
- * In Lisp you have to escape certain characters. In Scroll Notation, you never need to escape characters. (Note: although you are 100% free to design Scroll Dialects that implement escape characters, that is almost never necessary).
+ * In Lisp you have to escape certain characters. In Particle Notation, you never need to escape characters. (Note: although you are 100% free to design Scroll Dialects that implement escape characters, that is almost never necessary).
- ? Are there any papers written about Scroll Notation?
- * You can read the half-baked papers about Scroll Notation.
+ ? Are there any papers written about Particle Notation?
+ * You can read the half-baked papers about Particle Notation.
- * The basic gist of the theory is that all structures are trees, Scroll Notation is all you need to represent trees, and by building things up from Scroll Notation we might be able to make things simpler _AND better_.
+ * The basic gist of the theory is that all structures are trees, Particle Notation is all you need to represent trees, and by building things up from Particle Notation we might be able to make things simpler _AND better_.
- ? Which language influenced Scroll Notation the most?
+ ? Which language influenced Particle Notation the most?
- ? Who is the first person to discover Scroll Notation?
- * Breck Yunits et al. came up with Scroll 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 Scroll Notation. A few implementation details weren't ideal, but the core is largely the same.
+ ? Who is the first person to discover Particle Notation?
+ * Breck Yunits et al. came up with Particle 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 Particle Notation. A few implementation details weren't ideal, but the core is largely the same.
- * Not sure. Perhaps because it was pitched as a different way to write Lisp, and that was it. With Scroll 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 Scroll Notation is an ideal tool.
+ * Not sure. Perhaps because it was pitched as a different way to write Lisp, and that was it. With Particle 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 Particle Notation is an ideal tool.
- ? How was Scroll Notation discovered?
- * If Scroll Notation turns out to be a good idea, below is the origin story.
+ ? How was Particle Notation discovered?
+ * If Particle Notation turns out to be a good idea, below is the origin story.
Changed around line 274: quote
- It was over 7 years before the first "aha" moment that Scroll Notation started to maybe get useful.
+ It was over 7 years before the first "aha" moment that Particle Notation started to maybe get useful.
Changed around line 284: quote
- ? What is the Zen of Scroll Notation?
+ ? What is the Zen of Particle Notation?
spec.scroll
Changed around line 1
- title Scroll Notation Spec
- startColumns 4
+ title Particle Notation Spec
+ thinColumns 4
- * Scroll Notation is a subset of a class of languages called two dimensional languages.
+ Particle Notation is a subset of a class of languages called two dimensional languages.
- * One dimensional languages assume a one dimensional array of bits with a single read head
- moving in order.
+ One dimensional languages assume a one dimensional array of bits with a single read head moving in order.
- * Two dimensional languages break those assumptions. There may be multiple read heads that
- can move not just on the x axis but on the y axis as well.
+ Two dimensional languages break those assumptions. There may be multiple read heads that can move not just on the x axis but on the y axis as well.
- * Scroll Notation is a middle ground that utilitizes ideas from the two dimensional language
- world using present day technology.
+ Particle Notation is a middle ground that utilitizes ideas from the two dimensional language world using present day technology.
- # Scroll Notation Spec
+ # Particle Notation Spec
- * The basic structure of a Scroll Notation object is as follows:
+ The basic structure of a Particle Notation object is as follows:
- interface TreeNode {
- parent: &TreeNode
+ interface Particle {
+ parent: &Particle
- children: TreeNode[]
+ children: Particle[]
- * All documents are valid Scroll Notation documents. Like binary notation, there are no syntax errors in Scroll Notation. For every possible string _abc_:
+ All documents are valid Particle Notation documents. Like binary notation, there are no syntax errors in Particle Notation. For every possible string _abc_:
- new TreeNode(abc).toString() === abc
+ new Particle(abc).toString() === abc
- * Errors can only occur at a higher semantic level in _Tree Languages_.
+ Errors can only occur at a higher semantic level in _Parsers_.
- * A program in Scroll Notation is isomorphic to a spreadsheet. A single row is a node. Words are in cells. You can make a row a child of the row above it by indenting it with an additional blank cell in the head.
+ A program in Particle Notation is isomorphic to a spreadsheet. A single row is a node. Words are in cells. You can make a row a child of the row above it by indenting it with an additional blank cell in the head.
- * A Scroll Notation object is a sequence of bits/bytes/characters(hereafter abbreviated as chars). Scroll Notation requires the definition of 3 special chars, which turn an otherwise unstructured linear sequence of chars into a structured recursive tree object.
+ A Particle Notation object is a sequence of bits/bytes/characters(hereafter abbreviated as chars). Particle Notation requires the definition of 3 special chars, which turn an otherwise unstructured linear sequence of chars into a structured recursive tree object.
- - nodeBreakSymbol
+ - particleBreakSymbol
- wordBreakSymbol
- edgeSymbol
- * *nodeBreakSymbol* delimits nodes (lines), *wordBreakSymbol* delimits words (cells), and *edgeSymbol* is used to indicate the parent/child relationship between nodes.
+ *particleBreakSymbol* delimits nodes (lines), *wordBreakSymbol* delimits words (cells), and *edgeSymbol* is used to indicate the parent/child relationship between nodes.
- * With just nodeBreakSymbol and wordBreakSymbol, you get Grid Notation. The addition of edgeSymbol adds the parent/child concept.
+ With just particleBreakSymbol and wordBreakSymbol, you get Grid Notation. The addition of edgeSymbol adds the parent/child concept.
- * By convention those special symbols are:
+ By convention those special symbols are:
- nodeBreakSymbol
+ particleBreakSymbol
Changed around line 70: code
- * For better interoperability with existing spreadsheet applications the tab character `\t` is often used for wordBreakSymbol and edgeSymbol.
+ For better interoperability with existing spreadsheet applications the tab character `\t` can be used for wordBreakSymbol and edgeSymbol.
- * Although in theory edgeSymbol and wordBreakSymbol can conflict, in practice, given a higher level Tree Language grammar, that does not happen.
+ Although in theory edgeSymbol and wordBreakSymbol can conflict, in practice, given higher level Parsers, that does not happen.
- * This is currently the full spec of Scroll Notation.
+ * This is currently the full spec of Particle Notation.
- # Tree Languages
- * The structure above defines Scroll Notation. Scroll Notation is a very basic notation. On top of Scroll Notation, people build _Tree Languages_. You can see examples of higher level Tree Languages in the Tree Language Designer.
- https://sdk.scroll.pub/designer/ Tree Language Designer
+ # Parsers
+ The structure above defines Particle Notation. Particle Notation is a very basic notation. On top of Particle Notation, people use _Parsers_. You can see examples of higher level Parsers in the Parsers Designer.
+ https://sdk.scroll.pub/designer/ Parsers Designer
- * The Grammar Language is an advanced Tree Language for building other Tree Languages. This spec is written in a Tree Language called Scroll.
- https://sdk.scroll.pub/designer/#standard%20grammar Grammar Language
- https://github.com/publicdomaincompany/scroll/blob/master/scrolldown.grammar Scroll
+ Parsers is an advanced language for building other languages. This spec is written in a language built on Parsers called Scroll.
+ https://sdk.scroll.pub/designer Parsers
+ https://scroll.pub Scroll
Breck Yunits
Breck Yunits
6 months ago
checkpoint
workflows/buildAndDeployScroll.yaml
Changed around line 19: jobs:
- name: Deploy 🚀
- branch: scroll-output # The branch the action should deploy to.
- folder: .
+ branch: wws # The branch the action should deploy to.
+ folder: .
header.scroll
Changed around line 6: email breck7@gmail.com
- pageHeader
+ pageHeader
+ buildTxt
+ buildHtml
spec.txt
Changed around line 0
- This spec has moved here: https://faq.scroll.pub/spec.html
Breck Yunits
Breck Yunits
7 months ago
checkpoint
footer.scroll
Changed around line 1
- scrollFooter
+ pageFooter
header.scroll
Changed around line 5: viewSourceUrl https://github.com/breck7/faq.scroll.pub/blob/main
- scrollCssTag
- scrollHeader
+ gazetteCss
+ pageHeader
readme.scroll
Changed around line 1
+ printTitle
Changed around line 15: startColumns 4
- * Scroll 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 Scroll Notation:
+ Scroll Notation is a simple syntax that Scroll is built on top of.
+
+ For programmers, this might give you an idea of the structure behind Scroll Notation:
Changed around line 27: code
- * 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 Scroll Dialect 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.
- * 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 Scroll Dialect:
- * One important feature of Scroll 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 Scroll Notation is that due to its simplicity and consistency, Scroll Dialects are easy to write - and code or information represented in a Scroll Dialect is easy to syntax check (and highlight) - and autocomplete.
Changed around line 49: quote
- 1 Binary => 1 Scroll Notation => 10,000+ Tree Languages
+ 1 Binary => 1 Scroll Notation => 10,000+ Scroll Languages
- * We all use software tools to build software. Scroll Notation makes building these tools easier, and as more people join the Scroll 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. Scroll Notation makes building these tools easier, and as more people join the Scroll Notation ecosystem there may be significant network effects. If Jane is building a Scroll Dialect and tools for automating train schedules, and John is building a Scroll Dialect and tools for doing cancer research, even though their 2 domains are very different, they can share a lot of the tools and code.
- ? What's the difference between Scroll Notation and Tree Languages?
- * Scroll Notation is a base level notation. Generally users use Tree Languages, which make Scroll Notation useful. The Tree Language Grammar is a tool to make it easier to build Tree Languages.
+ ? What's the difference between Scroll Notation and Scroll Dialects?
+ * Scroll Notation is a base level notation. Generally users use Scroll Dialects, which make Scroll Notation useful. The Scroll Dialect Grammar is a tool to make it easier to build Scroll Dialects.
Changed around line 92: code
- * Note: the JSON example above works correctly, but JSON and Scroll Notation are not equivalent by default, since JSON does not support certain structures and Scroll 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 that has a 1-to-1 relationship to JSON.
+ * Note: the JSON example above works correctly, but JSON and Scroll Notation are not equivalent by default, since JSON does not support certain structures and Scroll 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 Scroll Dialect such as Dug that has a 1-to-1 relationship to JSON.
- * In the example below, Scroll Notation is used as a base for a math Tree Language where traditionally S-Expressions/Lisp might be used.
+ * In the example below, Scroll Notation is used as a base for a math Scroll Dialect where traditionally S-Expressions/Lisp might be used.
Changed around line 108: code
- * Check out the Ohayo project or the Tree Language Designer.
+ * Check out the Ohayo project or the Scroll Dialect Designer.
- https://sdk.scroll.pub/designer/ Tree Language Designer
+ https://sdk.scroll.pub/designer/ Scroll Dialect Designer
- ? How can I build a new Tree Language?
- * A good place to start is with our simple $Tree Language Builder$.
+ ? How can I build a new Scroll Dialect?
+ * A good place to start is with our simple $Scroll Dialect Builder$.
- ? What are some examples of Tree Languages?
+ ? What are some examples of Scroll Dialects?
- ? Languages that add numbers or compile to HTML are cute, but are there any advanced Tree Language?
- * 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!
+ ? Languages that add numbers or compile to HTML are cute, but are there any advanced Scroll Dialect?
+ * Currently the most advanced somewhat-useful Scroll Dialect 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 Scroll Dialect could be yours!
- ? What is the difference between Scroll Notation and Tree Languages?
- * There is an important distinction between _Scroll Notation_ and _Tree Languages_. Scroll 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).
+ ? What is the difference between Scroll Notation and Scroll Dialects?
+ * There is an important distinction between _Scroll Notation_ and _Scroll Dialects_. Scroll Notation is a simple dumb format for encoding Tree Data structures. Scroll Dialects give you higher level semantics. There is not a single general purpose "Scroll Dialect", like you might expect if you come from the Racket or Lisp worlds. Instead, there are many independent general purpose "Scroll Dialects" with any semantics desired by the language designer(s).
Changed around line 141: code
- * The Tree is _the_ data structure in Scroll Notation. Types like booleans, ints and vectors only exist at the higher level Tree Language level. The theory behind Scroll Notation is that concepts like booleans, ints and vectors are just kinds of Trees.
+ * The Tree is _the_ data structure in Scroll Notation. Types like booleans, ints and vectors only exist at the higher level Scroll Dialect level. The theory behind Scroll Notation is that concepts like booleans, ints and vectors are just kinds of Trees.
- * 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 Scroll Dialects are where additional concepts can be added like strings, integers, booleans, control flow, assignment, encapsulation, functions, and so forth.
Changed around line 175: code
- * Usually when using Scroll 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 Scroll Notation is valid.
+ * Usually when using Scroll Notation you use a higher level grammar, called a Scroll Dialect, and so you can still have invalid programs in that language (because of typos, for example) even though your Scroll Notation is valid.
- * In Scroll 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 Scroll Notation base layer.
+ * In Scroll 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 Scroll Dialects might have the notion of escape characters in certain places, but there's no such thing at the Scroll Notation base layer.
- * No. A subset of Scroll 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 Scroll Notation does, but for perfect one-to-one matching you'll want to use a Scroll Dialect specifically designed for that language.
Changed around line 209: code
- # For Advanced Tree Language Creators
+ # For Advanced Scroll Dialect Creators
- ? 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 Scroll Dialect?
- * Yes! While not supported at the base Scroll 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 Scroll Notation, except using something like the pipe character as nodeBreakSymbol instead of the newline character.
+ * Yes! While not supported at the base Scroll Notation level, your individual nodes can certainly have inline trees. Often your Scroll Dialects will have nodes that contain content written in traditional languages like Javascript, Lisp, or Python. Or you could even have inline trees written in Scroll Notation, except using something like the pipe character as nodeBreakSymbol instead of the newline character.
Changed around line 229: code
- * 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 Scroll Dialect 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.
- * In Lisp you have to escape certain characters. In Scroll 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 Scroll Notation, you never need to escape characters. (Note: although you are 100% free to design Scroll Dialects that implement escape characters, that is almost never necessary).
Changed around line 285: quote
- * Rule #1. Put it in a Tree Language.
+ * Rule #1. Put it in a Scroll Dialect.
Breck Yunits
Breck Yunits
7 months ago
checkpoint
readme.scroll
Changed around line 3: title Scroll Notation Frequently Asked Questions
- * Below is a list of questions that are commonly asked by people who are new to Scroll 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 Scroll Notation Subreddit.
+ * Below is a list of questions that are commonly asked by people who are new to Scroll Notation. If you have a question not listed here please ask us on Twitter or by posting a message to the Scroll Subreddit.
- https://www.reddit.com/r/ScrollLang// Subreddit
+ https://x.com/breckyunits Twitter
+ https://www.reddit.com/r/ScrollLang/ Scroll Subreddit
+ ? What was the old name?
+ Scroll Notation was originally called Tree Notation.
+
Breck Yunits
Breck Yunits
7 months ago
checkpoint
readme.scroll
Changed around line 5: startColumns 4
- https://www.reddit.com/r/treenotation/ Subreddit
+ https://www.reddit.com/r/ScrollLang// Subreddit
Breck Yunits
Breck Yunits
7 months ago
Rename Tree notation to Scroll Notation
CNAME
Changed around line 1
- faq.treenotation.org
+ faq.scroll.pub
header.scroll
Changed around line 1
- description Frequently Asked Questions about Tree Notation
- git https://github.com/treenotation/faq.treenotation.org
- viewSourceUrl https://github.com/treenotation/faq.treenotation.org/blob/main
- email faq@treenotation.org
- baseUrl https://faq.treenotation.org/
+ description Frequently Asked Questions about Scroll Notation
+ git https://github.com/breck7/faq.scroll.pub
+ viewSourceUrl https://github.com/breck7/faq.scroll.pub/blob/main
+ email breck7@gmail.com
+ baseUrl https://faq.scroll.pub/
readme.scroll
Changed around line 1
- title Tree Notation Frequently Asked Questions
+ title Scroll Notation Frequently Asked Questions
- * 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.
- https://treenotation.org/ Tree Notation
+ * Below is a list of questions that are commonly asked by people who are new to Scroll 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 Scroll Notation Subreddit.
+ https://notation.scroll.pub/ Scroll Notation
- ? What is 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:
+ ? What is Scroll Notation?
+ * Scroll 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 Scroll Notation:
Changed around line 31: code
- * 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 Scroll 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.
- * 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. Scroll Notation is more like binary than it is like a programming language. Scroll Notation is a basic building block that you can build higher level languages on top of. Scroll Notation is an error-free base notation like binary.
- 1 Binary => 1 Tree Notation => 10,000+ Tree Languages
+ 1 Binary => 1 Scroll Notation => 10,000+ Tree Languages
- * 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. Scroll Notation makes building these tools easier, and as more people join the Scroll 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.
- ? What's the difference between Tree Notation and Tree Languages?
- * Tree Notation is a base level notation. Generally users use Tree Languages, which make Tree Notation useful. The Tree Language Grammar is a tool to make it easier to build Tree Languages.
- https://jtree.treenotation.org/designer/#standard%20grammar Grammar
+ ? What's the difference between Scroll Notation and Tree Languages?
+ * Scroll Notation is a base level notation. Generally users use Tree Languages, which make Scroll Notation useful. The Tree Language Grammar is a tool to make it easier to build Tree Languages.
+ https://sdk.scroll.pub/designer/#standard%20grammar Grammar
- ? What is special about Tree Notation?
- * 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.
+ ? What is special about Scroll Notation?
+ * Scroll Notation may seem similar to notations like JSON, XML, YAML or S-expressions. However, Scroll Notation is the most minimal, has an isomorphism to Euclidean geometry, and the concept of syntax errors does not exist. These differences may make Scroll Notation substantially different and may cause a _significant improvement_ in computing.
- ? What major problems in computer science does help Tree Notation solve?
- - 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.
+ ? What major problems in computer science does help Scroll Notation solve?
+ - 1. Program synthesis. Scroll 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. Scroll 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. Scroll Notation offers a number of techniques that, coupled with network effects, could greatly reduce time wasted on cleaning data.
+ - 3. Visual programming. Scroll 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 Scroll Notation there is only 1 way to represent 1 structure. This simplification is one of a few core reasons why Scroll Notation could help solve the Visual Programming problem.
- * The data science app Ohayo is in part an experiment to test these 3 advantages of Tree Notation.
- https://github.com/treenotation/ohayo Ohayo
+ * The data science app Ohayo is in part an experiment to test these 3 advantages of Scroll Notation.
+ https://github.com/breck7/ohayo Ohayo
- ? What is a basic example of Tree Notation for file formats?
- * 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.
+ ? What is a basic example of Scroll Notation for file formats?
+ * Currently all Node.js npm projects contain a `package.json` file. While this is simple, it could be simpler using Scroll Notation, and better. Let's take a look.
Changed around line 85: code
- * 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 that has a 1-to-1 relationship to JSON.
- https://jtree.treenotation.org/designer/#standard%20dug Dug
+ * Note: the JSON example above works correctly, but JSON and Scroll Notation are not equivalent by default, since JSON does not support certain structures and Scroll 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 that has a 1-to-1 relationship to JSON.
+ https://sdk.scroll.pub/designer/#standard%20dug Dug
- ? What is a basic example of Tree Notation for programming languages?
- * In the example below, Tree Notation is used as a base for a math Tree Language where traditionally S-Expressions/Lisp might be used.
+ ? What is a basic example of Scroll Notation for programming languages?
+ * In the example below, Scroll Notation is used as a base for a math Tree Language where traditionally S-Expressions/Lisp might be used.
Changed around line 100: code
- ? What are some advanced examples of Tree Notation in action?
+ ? What are some advanced examples of Scroll Notation in action?
- https://github.com/treenotation/ohayo Ohayo
- https://jtree.treenotation.org/designer/ Tree Language Designer
+ https://github.com/breck7/ohayo Ohayo
+ https://sdk.scroll.pub/designer/ Tree Language Designer
- wrap $ http://jtree.treenotation.org/designer/
+ wrap $ http://sdk.scroll.pub/designer/
- ? Where can I use Tree Notation?
- * 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.
+ ? Where can I use Scroll Notation?
+ * Everywhere! Anywhere you use programming languages or encodings, you can use Scroll Notation. Hopefully a Scroll Notation Ecosystem will grow, if Scroll Notation turns out to be a good idea. Until then use it wherever and don't be shy about asking for help.
- * There are over a dozen example languages in the JTree GitHub repo. Here's a language that compiles to HTML, a language similar to Make, and a language that does simple math .
+ * There are over a dozen example languages in the JTree GitHub repo. Here's a language that compiles to HTML, a language similar to Make, and a language that does simple math .
- * 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!
- ? What is the difference between Tree Notation and Tree Languages?
- * 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).
+ ? What is the difference between Scroll Notation and Tree Languages?
+ * There is an important distinction between _Scroll Notation_ and _Tree Languages_. Scroll 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).
- ? What are the data structures in Tree Notation?
- * This is the base Tree Notation:
+ ? What are the data structures in Scroll Notation?
+ * This is the base Scroll Notation:
Changed around line 134: code
- * 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 Scroll Notation. Types like booleans, ints and vectors only exist at the higher level Tree Language level. The theory behind Scroll Notation is that concepts like booleans, ints and vectors are just kinds of Trees.
- ? What are the basic terms when talking about things written in Tree Notation?
+ ? What are the basic terms when talking about things written in Scroll Notation?
- * 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 Scroll 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.
Changed around line 153: code
- ? Does Tree Notation use tabs or spaces?
- * 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.
+ ? Does Scroll Notation use tabs or spaces?
+ * Scroll 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.
- ? Does Tree Notation work on Windows?
- * 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` :).
+ ? Does Scroll Notation work on Windows?
+ * Yes. Scroll 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` :).
- ? Does Tree Notation support Unicode or just ASCII?
- * Tree Notation supports all encodings. This is perfectly valid Tree Notation:
+ ? Does Scroll Notation support Unicode or just ASCII?
+ * Scroll Notation supports all encodings. This is perfectly valid Scroll Notation:
- * 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 Scroll Notation document at the base level, just as there is no such thing as an "invalid binary sequence".
- * 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 Scroll 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 Scroll Notation is valid.
- * 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 Scroll 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 Scroll Notation base layer.
- ? Does Tree Notation directly map to XML or JSON?
- * 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.
+ ? Does Scroll Notation directly map to XML or JSON?
+ * No. A subset of Scroll Notation does, but for perfect one-to-one matching you'll want to use a Tree Language specifically designed for that language.
- ? Can I use Tree Notation with any programming language?
- * 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.
+ ? Can I use Scroll Notation with any programming language?
+ * Yes! The JTree library provides Scroll Notation support for TypeScript and Javascript, but someday there may be Scroll Notation and Tree Grammar libraries in all programming languages, similar to how most languages nowadays have JSON libraries.
- * If you want to build a Tree Notation library for your language, there is a meta project intended to help!
+ * If you want to build a Scroll Notation library for your language, there is a meta project intended to help!
- ? Who makes Tree Notation, and is it open source?
- * 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.
+ ? Who makes Scroll Notation, and is it open source?
+ * Scroll Notation is free and open source. The Scroll Notation Lab is a distributed research group started in Hawaii that works on the core Scroll Notation infrastructure projects. The plan is to build the infrastructure needed to test whether Scroll Notation is a good idea. If it is, get a broader Scroll Notation ecosystem growing.
- ? Is Tree Notation ready for production use?
- * 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.
+ ? Is Scroll Notation ready for production use?
+ * Sort of! Scroll Notation is ready for early adopters. If you use Scroll Notation today, you probably will want to stay up to date with what's happening as the tooling is still rapidly evolving.
Changed around line 196: code
- ? 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 Scroll Notation and have the editor ensure correct indentation?
- * 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 Scroll 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 Scroll 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.
Changed around line 211: code
- * 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 Scroll 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 Scroll Notation, except using something like the pipe character as nodeBreakSymbol instead of the newline character.
- * 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 Scroll Notation is S-Expressions without parenthesis. But this makes them very different! Scroll 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.
- ? Is Tree Notation just Lisp?
- * 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.
+ ? Is Scroll Notation just Lisp?
+ * No. It is largely accurate to say Scroll Notation is S-Expressions without parenthesis. However, Scroll Notation has a useful geometric isomorphism that S-Expressions/Lisp lack, that might have significant network effects.
- ? 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 Scroll Notation that you cannot do with S-Expressions?
- ? What's something else you can do with Tree Notation that you can't do with Lisp?
- * 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.
+ ? What's something else you can do with Scroll Notation that you can't do with Lisp?
+ * Easy program concatenation. For example, in Scroll 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.
- * 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 Scroll 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).
- ? Are there any papers written about Tree Notation?
- * You can read the half-baked papers about Tree Notation.
- https://github.com/treenotation/research/tree/master/papers papers
+ ? Are there any papers written about Scroll Notation?
+ * You can read the half-baked papers about Scroll Notation.
+ https://github.com/breck7/research/tree/master/papers papers
- * 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, Scroll Notation is all you need to represent trees, and by building things up from Scroll Notation we might be able to make things simpler _AND better_.
- ? Which language influenced Tree Notation the most?
+ ? Which language influenced Scroll Notation the most?
- ? Who is the first person to discover Tree Notation?
- * 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.
+ ? Who is the first person to discover Scroll Notation?
+ * Breck Yunits et al. came up with Scroll 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 Scroll Notation. A few implementation details weren't ideal, but the core is largely the same.
- * 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 Scroll 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 Scroll Notation is an ideal tool.
- ? How was Tree Notation discovered?
- * If Tree Notation turns out to be a good idea, below is the origin story.
+ ? How was Scroll Notation discovered?
+ * If Scroll Notation turns out to be a good idea, below is the origin story.
Changed around line 267: quote
- It was over 7 years before the first "aha" moment that Tree Notation started to maybe get useful.
+ It was over 7 years before the first "aha" moment that Scroll Notation started to maybe get useful.
Changed around line 277: quote
- ? What is the Zen of Tree Notation?
+ ? What is the Zen of Scroll Notation?
spec.scroll
Changed around line 1
- title Tree Notation Spec
+ title Scroll Notation Spec
- * Tree Notation is a subset of a class of languages called two dimensional languages.
+ * Scroll Notation is a subset of a class of languages called two dimensional languages.
Changed around line 12: startColumns 4
- * Tree Notation is a middle ground that utilitizes ideas from the two dimensional language
+ * Scroll Notation is a middle ground that utilitizes ideas from the two dimensional language
- # Tree Notation Spec
+ # Scroll Notation Spec
- * The basic structure of a Tree Notation object is as follows:
+ * The basic structure of a Scroll Notation object is as follows:
Changed around line 27: code
- * All documents are valid Tree Notation documents. Like binary notation, there are no syntax errors in Tree Notation. For every possible string _abc_:
+ * All documents are valid Scroll Notation documents. Like binary notation, there are no syntax errors in Scroll Notation. For every possible string _abc_:
- new TreeNotation(abc).toString() === abc
+ new TreeNode(abc).toString() === abc
- * A program in Tree Notation is isomorphic to a spreadsheet. A single row is a node. Words are in cells. You can make a row a child of the row above it by indenting it with an additional blank cell in the head.
+ * A program in Scroll Notation is isomorphic to a spreadsheet. A single row is a node. Words are in cells. You can make a row a child of the row above it by indenting it with an additional blank cell in the head.
- * A Tree Notation object is a sequence of bits/bytes/characters(hereafter abbreviated as chars). Tree Notation requires the definition of 3 special chars, which turn an otherwise unstructured linear sequence of chars into a structured recursive tree object.
+ * A Scroll Notation object is a sequence of bits/bytes/characters(hereafter abbreviated as chars). Scroll Notation requires the definition of 3 special chars, which turn an otherwise unstructured linear sequence of chars into a structured recursive tree object.
- nodeBreakSymbol
Changed around line 77: code
- * This is currently the full spec of Tree Notation.
+ * This is currently the full spec of Scroll Notation.
- * The structure above defines Tree Notation. Tree Notation is a very basic notation. On top of Tree Notation, people build _Tree Languages_. You can see examples of higher level Tree Languages in the Tree Language Designer.
- https://jtree.treenotation.org/designer/ Tree Language Designer
+ * The structure above defines Scroll Notation. Scroll Notation is a very basic notation. On top of Scroll Notation, people build _Tree Languages_. You can see examples of higher level Tree Languages in the Tree Language Designer.
+ https://sdk.scroll.pub/designer/ Tree Language Designer
- https://jtree.treenotation.org/designer/#standard%20grammar Grammar Language
+ https://sdk.scroll.pub/designer/#standard%20grammar Grammar Language
spec.txt
Changed around line 1
- This spec has moved here: https://faq.treenotation.org/spec.html
+ This spec has moved here: https://faq.scroll.pub/spec.html
Breck Yunits
Breck Yunits
2 years ago
Update scroll
footer.scroll
Changed around line 1
+ importOnly
+ endColumns
+ scrollFooter
header.scroll
Changed around line 1
+ importOnly
+ description Frequently Asked Questions about Tree Notation
+ git https://github.com/treenotation/faq.treenotation.org
+ viewSourceUrl https://github.com/treenotation/faq.treenotation.org/blob/main
+ email faq@treenotation.org
+ baseUrl https://faq.treenotation.org/
+ metaTags
+ scrollCssTag
+ scrollHeader
readme.scroll
Changed around line 1
+ import header.scroll
+ permalink index.html
+ startColumns 4
Changed around line 10: title Tree Notation Frequently Asked Questions
-
Changed around line 36: code
-
-
-
-
-
-
- * 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 is a tool to make it easier to build Tree Languages.
+ https://jtree.treenotation.org/designer/#standard%20grammar Grammar
-
- wrapsOn
-
- 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.
- * 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 is in part an experiment to test these 3 advantages of Tree Notation.
+ https://github.com/treenotation/ohayo Ohayo
-
- * 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:
- wrapsOn
-
+ * 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 74: code
-
-
Changed around line 84: code
- wrapsOn
- * 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 that has a 1-to-1 relationship to JSON.
+ https://jtree.treenotation.org/designer/#standard%20dug Dug
-
-
-
-
-
-
-
- * Check out the Ohayo🔗github.com/treenotation/ohayo project or the Tree Language Designer🔗jtree.treenotation.org/designer/.
+ * Check out the Ohayo project or the Tree Language Designer.
+ https://github.com/treenotation/ohayo Ohayo
+ https://jtree.treenotation.org/designer/ Tree Language Designer
-
-
-
-
-
- wrapsOn
-
-
Changed around line 135: code
- wrapsOn
-
-
- wrapsOn
- wrapsOn
-
-
- wrapsOn
-
-
Changed around line 171: code
-
-
-
Changed around line 184: code
-
-
-
-
-
-
-
-
-
-
-
- wrapsOn
-
-
-
- * You can read the half-baked papers🔗github.com/treenotation/research/tree/master/papers about Tree Notation.
+ * You can read the half-baked papers about Tree Notation.
+ https://github.com/treenotation/research/tree/master/papers papers
- wrapsOn
-
-
-
-
Changed around line 272: quote
-
-
-
-
- permalink index.html
- skipIndexPage
+ import footer.scroll
scroll.settings
Changed around line 0
- importOnly
- siteTitle Tree Notation FAQ
- siteDescription Frequently Asked Questions about Tree Notation
- github https://github.com/treenotation/faq.treenotation.org
- viewSourceUrl https://github.com/treenotation/faq.treenotation.org/blob/main
- twitter https://twitter.com/treenotation
- email faq@treenotation.com
- baseUrl https://faq.treenotation.org/
spec.scroll
Changed around line 1
+ import header.scroll
+ startColumns 4
Changed around line 18: title Tree Notation Spec
-
-
Changed around line 27: code
-
- * All documents are valid Tree Notation documents. Like binary notation, there are no syntax errors in Tree Notation. For every possible string abc:
-
+ * All documents are valid Tree Notation documents. Like binary notation, there are no syntax errors in Tree Notation. For every possible string _abc_:
- * Errors can only occur at a higher semantic level in Tree Languages.
+ * Errors can only occur at a higher semantic level in _Tree Languages_.
-
- * A program in Tree Notation is isomorphic to a spreadsheet. A single row is a node. Words are
- in cells. You can make a row a child of the row above it by indenting it with an additional blank
- cell in the head.
+ * A program in Tree Notation is isomorphic to a spreadsheet. A single row is a node. Words are in cells. You can make a row a child of the row above it by indenting it with an additional blank cell in the head.
-
- * A Tree Notation object is a sequence of bits/bytes/characters(hereafter abbreviated
- as chars). Tree Notation requires the definition of 3 special chars, which turn
- an otherwise unstructured linear sequence of chars into a structured recursive tree object.
+ * A Tree Notation object is a sequence of bits/bytes/characters(hereafter abbreviated as chars). Tree Notation requires the definition of 3 special chars, which turn an otherwise unstructured linear sequence of chars into a structured recursive tree object.
+ - nodeBreakSymbol
+ - wordBreakSymbol
+ - edgeSymbol
- list
- - nodeBreakSymbol
- - wordBreakSymbol
- - edgeSymbol
+ * *nodeBreakSymbol* delimits nodes (lines), *wordBreakSymbol* delimits words (cells), and *edgeSymbol* is used to indicate the parent/child relationship between nodes.
- * nodeBreakSymbol delimits nodes (lines), wordBreakSymbol delimits words (cells), and edgeSymbol is used to indicate the parent/child relationship between nodes.
-
- * With just nodeBreakSymbol and wordBreakSymbol, you get Grid Notation. The addition of edgeSymbol adds the
- parent/child concept.
+ * With just nodeBreakSymbol and wordBreakSymbol, you get Grid Notation. The addition of edgeSymbol adds the parent/child concept.
Changed around line 73: code
- * For better interoperability with existing spreadsheet applications the tab character "\t" is often used for wordBreakSymbol and edgeSymbol.
+ * For better interoperability with existing spreadsheet applications the tab character `\t` is often used for wordBreakSymbol and edgeSymbol.
+ * The structure above defines Tree Notation. Tree Notation is a very basic notation. On top of Tree Notation, people build _Tree Languages_. You can see examples of higher level Tree Languages in the Tree Language Designer.
+ https://jtree.treenotation.org/designer/ Tree Language Designer
- * The structure above defines Tree Notation. Tree Notation is a very basic notation. On top of
- Tree Notation, people build Tree Languages. You can see examples of higher level
- Tree Languages here.
-
- * The Grammar Language is an advanced Tree Language for building other Tree Languages. This spec is written in a Tree Language called Scrolldown.
+ * The Grammar Language is an advanced Tree Language for building other Tree Languages. This spec is written in a Tree Language called Scroll.
+ https://jtree.treenotation.org/designer/#standard%20grammar Grammar Language
+ https://github.com/publicdomaincompany/scroll/blob/master/scrolldown.grammar Scroll
- skipIndexPage
- maxColumns 2
+ import footer.scroll
Breck Yunits
Breck Yunits
2 years ago
Update scroll
readme.scroll
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
- There are over a dozen example languages in the JTree GitHub repo. Here's a language that compiles to HTML, a language similar to Make, and a language that does simple math .
+ * There are over a dozen example languages in the JTree GitHub repo. Here's a language that compiles to HTML, a language similar to Make, and a language that does simple math .
- 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
- If you want to build a Tree Notation library for your language, there is a meta project intended to help!
+ * If you want to build a Tree Notation library for your language, there is a meta project intended to help!
- 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
scroll.settings
Changed around line 1
- title Tree Notation FAQ
- description Frequently Asked Questions about Tree Notation
+ importOnly
+ siteTitle Tree Notation FAQ
+ siteDescription Frequently Asked Questions about Tree Notation
- git https://github.com/treenotation/faq.treenotation.org/blob/main
+ viewSourceUrl https://github.com/treenotation/faq.treenotation.org/blob/main
spec.scroll
Changed around line 1
- section Introduction to Two Dimensional Languages
+ # Introduction to Two Dimensional Languages
- paragraph
- Tree Notation is a subset of a class of languages called two dimensional languages.
+ * Tree Notation is a subset of a class of languages called two dimensional languages.
- paragraph
- One dimensional languages assume a one dimensional array of bits with a single read head
+ * One dimensional languages assume a one dimensional array of bits with a single read head
- paragraph
- Two dimensional languages break those assumptions. There may be multiple read heads that
+ * Two dimensional languages break those assumptions. There may be multiple read heads that
- paragraph
- Tree Notation is a middle ground that utilitizes ideas from the two dimensional language
+ * Tree Notation is a middle ground that utilitizes ideas from the two dimensional language
- section Tree Notation Spec
+ # Tree Notation Spec
- subsection The Data Structure
+ ## The Data Structure
- paragraph
- The basic structure of a Tree Notation object is as follows:
+ * The basic structure of a Tree Notation object is as follows:
Changed around line 26: code
- subsection No Syntax Errors
+ ## No Syntax Errors
- paragraph
- All documents are valid Tree Notation documents. Like binary notation, there are no syntax errors in Tree Notation. For every possible string abc:
+ * All documents are valid Tree Notation documents. Like binary notation, there are no syntax errors in Tree Notation. For every possible string abc:
- paragraph
- Errors can only occur at a higher semantic level in Tree Languages.
+ * Errors can only occur at a higher semantic level in Tree Languages.
- subsection Isomorphism to Spreadsheets
+ ## Isomorphism to Spreadsheets
- paragraph
- A program in Tree Notation is isomorphic to a spreadsheet. A single row is a node. Words are
+ * A program in Tree Notation is isomorphic to a spreadsheet. A single row is a node. Words are
- subsection Special Symbols
+ ## Special Symbols
- paragraph
- A Tree Notation object is a sequence of bits/bytes/characters(hereafter abbreviated
+ * A Tree Notation object is a sequence of bits/bytes/characters(hereafter abbreviated
- paragraph
- Those 3 special chars are:
+ * Those 3 special chars are:
- nodeBreakSymbol
- wordBreakSymbol
- edgeSymbol
- paragraph
- nodeBreakSymbol delimits nodes (lines), wordBreakSymbol delimits words (cells), and edgeSymbol is used to indicate the parent/child relationship between nodes.
+ * nodeBreakSymbol delimits nodes (lines), wordBreakSymbol delimits words (cells), and edgeSymbol is used to indicate the parent/child relationship between nodes.
- paragraph
- With just nodeBreakSymbol and wordBreakSymbol, you get Grid Notation. The addition of edgeSymbol adds the
+ * With just nodeBreakSymbol and wordBreakSymbol, you get Grid Notation. The addition of edgeSymbol adds the
- paragraph
- By convention those special symbols are:
+ * By convention those special symbols are:
Changed around line 84: code
- paragraph
- For better interoperability with existing spreadsheet applications the tab character "\t" is often used for wordBreakSymbol and edgeSymbol.
+ * For better interoperability with existing spreadsheet applications the tab character "\t" is often used for wordBreakSymbol and edgeSymbol.
- paragraph
- Although in theory edgeSymbol and wordBreakSymbol can conflict, in practice, given a higher level Tree Language grammar, that does not happen.
+ * Although in theory edgeSymbol and wordBreakSymbol can conflict, in practice, given a higher level Tree Language grammar, that does not happen.
- paragraph
- This is currently the full spec of Tree Notation.
+ * This is currently the full spec of Tree Notation.
- section Tree Languages
+ # Tree Languages
- paragraph
- The structure above defines Tree Notation. Tree Notation is a very basic notation. On top of
+ * The structure above defines Tree Notation. Tree Notation is a very basic notation. On top of
- paragraph
- The Grammar Language is an advanced Tree Language for building other Tree Languages. This spec is written in a Tree Language called Scrolldown.
+ * The Grammar Language is an advanced Tree Language for building other Tree Languages. This spec is written in a Tree Language called Scrolldown.
Breck Yunits
Breck Yunits
2 years ago
Merge pull request #6 from joakim/patch-1 Move goalpost from 2020 to 2023
Joakim
Joakim
2 years ago
Move goalpost from 2020 to 2023
readme.scroll
Changed around line 162: paragraph
- Currently the most advanced somewhat-useful Tree Language is OhayoLang, the dataflow language in the data science studio Ohayo. In 2020, 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 2020 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!
Changed around line 275: paragraph
- If you'd prefer to wait until most of the details are settled, late 2020 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.
Breck Yunits
Breck Yunits
2 years ago
Some minor edits
readme.scroll
Changed around line 1
- paragraph
- 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 TreeNotation Subreddit🔗www.reddit.com/r/treenotation/.
+ 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.
+ https://treenotation.org/ Tree Notation
+ https://www.reddit.com/r/treenotation/ Subreddit
Changed around line 67: paragraph
- paragraph
+ aftertext
+ wrapsOn
Changed around line 83: paragraph
- paragraph
- 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:
+ 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:
+ wrapsOn
Changed around line 109: code
- paragraph
- 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.
+ 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.
+ wrapsOn
Changed around line 145: paragraph
- paragraph
- A good place to start is with our simple Tree Language Builder.
+ aftertext
+ A good place to start is with our simple $Tree Language Builder$.
+ wrap $ http://jtree.treenotation.org/designer/
Changed around line 168: section Structure
- paragraph
+ aftertext
+ wrapsOn
Changed around line 186: code
- paragraph
+ aftertext
+ wrapsOn
Changed around line 202: code
- paragraph
- 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.
+ 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.
+ wrapsOn
- paragraph
- 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
+ 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.
+ wrapsOn
Changed around line 224: paragraph
- paragraph
- 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" :).
+ 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` :).
+ wrapsOn
Changed around line 282: question How can I help?
- question How is the Tree Notation Lab funded?
-
- paragraph
- The Tree Notation Lab is funded entirely by anonymous gifts. You can donate bitcoin to the Tree Notation Lab at this address: 36DMShMSDUp19FnshHZDnoVCGrAYCrowfN
-
Changed around line 325: paragraph
- paragraph
- 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.
+ 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.
+ wrapsOn
Changed around line 346: question Are there any papers written about Tree Notation?
- paragraph
+ aftertext
+ wrapsOn
spec.scroll
Changed around line 116: paragraph
- skipIndexPage
+ skipIndexPage
+ maxColumns 2
Breck Yunits
Breck Yunits
2 years ago
Flatten folder and make build happen via a Git workflow, to address @celtic-coder's points
workflows/buildAndDeployScroll.yaml
Changed around line 1
+ # Adapted from https://github.com/JamesIves/github-pages-deploy-action
+ name: Build and Deploy Scroll
+ on:
+ push:
+ branches:
+ - main
+ jobs:
+ build-and-deploy:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout 🛎️
+ uses: actions/checkout@v2.3.1
+ - name: Install and Build
+ run: |
+ npm install scroll-cli
+ ./node_modules/scroll-cli/scroll.js build
+ # Uncomment the line below if you are ignoring *.html files in your gitignore file
+ rm .gitignore
+ - name: Deploy 🚀
+ uses: JamesIves/github-pages-deploy-action@4.1.4
+ with:
+ branch: scroll-output # The branch the action should deploy to.
+ folder: .
.gitignore
Changed around line 1
- .DS_Store
+ .DS_Store
+ *.html
+ *.xml
index.html
Changed around line 0
-
+
+
+
+
+ Tree Notation Frequently Asked Questions - Tree Notation FAQ
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+
Frequently Asked Questions about Tree Notation
+
+
+
+
+

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 TreeNotation Subreddit.

+
+

Overview

+
+

What is 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:

+
+ nodeBreakSymbol = "\n" // New lines separate nodes
+ edgeSymbol = " " // Increasing indent to denote parent/child relationship
+ interface TreeNode {
+ children: TreeNode[]
+ line: string
+ }
+
+

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.

+
+

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.

+
+

Here’s an example of a minimal HTML document represented in a Tree Language:

+
+ html
+ body
+ div おはようございます
+
+

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.

+
+

(Thank you to @vakradrz for this answer)

+
+

There are already over 10,000 programming languages and over 1,000 syntax systems like JSON, XML and BNF, why create another one?

+
+

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.

+
+

This is our current stack of computer languages:

+
+
1 Binary => 1,000+ Syntaxes => 10,000+ languages
+
+

In the future we think the stack may look like this:

+
+
1 Binary => 1 Tree Notation => 10,000+ Tree Languages
+
+

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.

+
+

What's the difference between Tree Notation and Tree Languages?

+
+

Tree Notation is a base level notation. Generally users use Tree Languages, which make Tree Notation useful. The Tree Language Grammar is a tool to make it easier to build Tree Languages.

+
+

What is special about Tree Notation?

+
+

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.

+
+

What major problems in computer science does help Tree Notation solve?

+
+
    +
  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. +
  3. 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.
  4. +
  5. 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.
  6. +
    +
    +

    The data science app Ohayo is in part an experiment to test these 3 advantages of Tree Notation.

    +
    +

    What is a basic example of Tree Notation for file formats?

    +
    +

    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:

    +
    + {
    + "name": "mypackage"
    + "version": "2.1.1"
    + "description": "A package",
    + "repository": {
    + "type": "git",
    + "url": "git://github.com/username/mypackage"
    + }
    + }
    +
    +

    package.npm:

    +
    + name mypackage
    + version 2.1.1
    + description A package
    + repository
    + type git
    + url git://github.com/username/mypackage
    +
    +

    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.

    +
    +

    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 that has a 1-to-1 relationship to JSON.

    +
    +

    What is a basic example of Tree Notation for programming languages?

    +
    +

    In the example below, Tree Notation is used as a base for a math Tree Language where traditionally S-Expressions/Lisp might be used.

    +
    +

    make8.math:

    +
    + multiply
    + add 1 1
    + add 2 2
    +
    +

    make8.lisp:

    +
    + (* (+ 1 1) (+ 2 2))
    +
    +

    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.

    +
    +

    What are some advanced examples of Tree Notation in action?

    +
    +

    Check out the Ohayo project or the Tree Language Designer.

    +
    +

    How can I build a new Tree Language?

    +
    +

    A good place to start is with our simple Tree Language Builder.

    +
    +

    Where can I use Tree Notation?

    +
    +

    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.

    +
    +

    What are some examples of Tree Languages?

    +
    +

    There are over a dozen example languages in the JTree GitHub repo. Here's a language that compiles to HTML, a language similar to Make, and a language that does simple math .

    +
    +

    Languages that add numbers or compile to HTML are cute, but are there any advanced Tree Language?

    +
    +

    Currently the most advanced somewhat-useful Tree Language is OhayoLang, the dataflow language in the data science studio Ohayo. In 2020, 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 2020 the most powerful Tree Language could be yours!

    +
    +

    Structure

    +
    +

    What is the difference between Tree Notation and Tree Languages?

    +
    +

    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).

    +
    +

    What are the data structures in Tree Notation?

    +
    +

    This is the base Tree Notation:

    +
    + nodeBreakSymbol = "\n" // New lines separate nodes
    + edgeSymbol = " " // Increasing indent to denote parent/child relationship
    + interface TreeNode {
    + parent: &TreeNode
    + children: TreeNode[]
    + line: string
    + }
    +
    +

    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.

    +
    +

    Higher level Tree Languages are where additional concepts can be added like strings, integers, booleans, control flow, assignment, encapsulation, functions, and so forth.

    +
    +

    What are the basic terms when talking about things written in Tree Notation?

    +
    +

    Example:

    +
    + if true
    + print Hello world
    +
    +

    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.

    +
    +

    If you are familiar with Lisp terminology, you can think of words as atoms.

    +
    +

    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.

    +
    +

    Here is a longer spec.

    +
    +

    Does Tree Notation use tabs or spaces?

    +
    +

    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.

    +
    +

    Does Tree Notation work on Windows?

    +
    +

    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" :).

    +
    +

    Does Tree Notation support Unicode or just ASCII?

    +
    +

    Tree Notation supports all encodings. This is perfectly valid Tree Notation:

    +
    + html
    + body
    + div おはようございます
    +
    +

    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".

    +
    +

    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.

    +
    +

    How do I escape characters?

    +
    +

    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.

    +
    +

    Does Tree Notation directly map to XML or JSON?

    +
    +

    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.

    +
    +

    Can I use Tree Notation with any programming language?

    +
    +

    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.

    +
    +

    If you want to build a Tree Notation library for your language, there is a meta project intended to help!

    +
    +

    Project Status

    +
    +

    Who makes Tree Notation, and is it open source?

    +
    +

    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.

    +
    +

    Is Tree Notation ready for production use?

    +
    +

    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.

    +
    +

    If you'd prefer to wait until most of the details are settled, late 2020 is probably a better time to start using it.

    +
    +

    How can I 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.

    +
    +

    How is the Tree Notation Lab funded?

    +
    +

    The Tree Notation Lab is funded entirely by anonymous gifts. You can donate bitcoin to the Tree Notation Lab at this address: 36DMShMSDUp19FnshHZDnoVCGrAYCrowfN

    +
    +

    Editing Tips

    +
    +

    How can I copy and paste code in Tree Notation and have the editor ensure correct indentation?

    +
    +

    Look for a "Paste and indent" command. For example, in Sublime Text you can click Edit->Paste and Indent, or press Cmd+Shift+v.

    +
    +

    Do I have to count the spaces?

    +
    +

    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.

    +
    +

    For Advanced Tree Language Creators

    +
    +

    What are the benefits to writing a "Grammar" file to create my Tree Language?

    +
    +

    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.

    +
    +

    Can I use infix notation, postfix notation, or pattern matching?

    +
    +

    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.

    +
    +

    Can I do inline Trees?

    +
    +

    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.

    +
    +

    Lisp Related Questions

    +
    +

    How is this different from S-Expressions?

    +
    +

    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.

    +
    +

    Is Tree Notation just Lisp?

    +
    +

    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.

    +
    +

    What's an example of "ad hoc" parsing that you can do with Tree Notation that you cannot do with S-Expressions?

    +
    +

    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.

    +
    +

    What's something else you can do with Tree Notation that you can't do with Lisp?

    +
    +

    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.

    +
    +

    What's something else that is worse in Lisp?

    +
    +

    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).

    +
    +

    History

    +
    +

    Are there any papers written about Tree Notation?

    +
    +

    You can read the half-baked papers about Tree Notation.

    +
    +

    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_.

    +
    +

    Which language influenced Tree Notation the most?

    +
    +

    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.

    +
    +

    Who is the first person to discover Tree Notation?

    +
    +

    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.

    +
    +

    Why didn't I-Expressions catch on?

    +
    +

    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.

    +
    +

    How was Tree Notation discovered?

    +
    +

    If Tree Notation turns out to be a good idea, below is the origin story.

    +
    +
    The year was 2012. Barack Hussein Obama was president, Prettier hadn't been released yet, and humans talked to other humans more than Alexa.
    +
    + Our startup NudgePad was building a visual web page editor in our office in San Francisco, which was located in the backroom of a warehouse that built wooden pianos by hand. In comparison to Nudge Inc., the wooden piano business was _booming_.
    +
    + With NudgePad, users could drag, drop and edit their web pages without touching any code. It worked awesome, at least 1 percent of the time. As the user was editing their pages visually, we coded NudgePad to read and write the language HAML, which I had learned at my previous job.
    +
    + I ended up needing to write my own HAML parser and code generator for reasons long since forgotten. Because we were a broke startup, I kept trying to cut syntax from the language to save time and money.
    +
    + Every now and then I would remove some syntax character from our HAML clone and still somehow get everything in NudgePad to work. Eventually the language was just spaces, newlines, and colons.
    +
    + And then there was an "aha!" moment. I remember I was walking to work, going over the code in my head, and had just reached the 101 overpass when I realized I could dump the colons! I went straight to my desk, opened up my editor, and a couple hours later had removed the colons and everything still worked. I remember at the time thinking that was potentially a profound idea but I _was positive_ someone had built it already. I thought there was no chance it hadn't been invented yet because it was so simple.
    +
    + But for years I'd ping folks in industry, post on message boards, and do a lot of Google searches. It took me years of searching for it before I thought maybe no had noticed and leveraged this idea before.
    +
    + 5 years later I had another "aha" moment when I realized it would also be a good base notation for _any_ type of computer language, and wrote a paper about it. Which went on to be cited over (editor's note: it says "zero" here, is that correct?) times.
    +
    +
    +

    Other

    +
    +

    Did you know that if you think this could grow to rival the web you are an idiot?

    +
    +

    Thank you for reminding us the web was not built in a day!

    +
    +

    How confident are you that this is a good idea?

    +
    +

    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.

    +
    +

    What is the Zen of Tree Notation?

    +
    +

    Rule #1. Put it in a Tree Language.

    +
    +

    End of Rules.

    +
    +
    +
    readme.scroll
    Changed around line 1
    + title Tree Notation Frequently Asked Questions
    + permalink index
    +
    + paragraph
    + 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 TreeNotation Subreddit🔗www.reddit.com/r/treenotation/.
    +
    + section Overview
    +
    + question 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:
    +
    + code
    + nodeBreakSymbol = "\n" // New lines separate nodes
    + edgeSymbol = " " // Increasing indent to denote parent/child relationship
    + interface TreeNode {
    + children: TreeNode[]
    + line: string
    + }
    +
    + 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.
    +
    + 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.
    +
    + paragraph
    + Here’s an example of a minimal HTML document represented in a Tree Language:
    +
    + code
    + html
    + body
    + div おはようございます
    +
    + 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.
    +
    + paragraph
    + (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?
    +
    + 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.
    +
    + paragraph
    + This is our current stack of computer languages:
    +
    + quote
    + 1 Binary => 1,000+ Syntaxes => 10,000+ languages
    +
    + paragraph
    + In the future we think the stack may look like this:
    +
    + quote
    + 1 Binary => 1 Tree Notation => 10,000+ Tree Languages
    +
    + 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.
    +
    + question 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.
    +
    + question What is special about Tree Notation?
    +
    + paragraph
    + 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?
    +
    + 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.
    +
    + paragraph
    + 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?
    +
    + paragraph
    + 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:
    +
    + code
    + {
    + "name": "mypackage"
    + "version": "2.1.1"
    + "description": "A package",
    + "repository": {
    + "type": "git",
    + "url": "git://github.com/username/mypackage"
    + }
    + }
    +
    + paragraph
    + package.npm:
    +
    + code
    + name mypackage
    + version 2.1.1
    + description A package
    + repository
    + type git
    + url git://github.com/username/mypackage
    +
    + paragraph
    + 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.
    +
    + question 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.
    +
    + paragraph
    + make8.math:
    +
    + code
    + multiply
    + add 1 1
    + add 2 2
    +
    + paragraph
    + make8.lisp:
    +
    + code
    + (* (+ 1 1) (+ 2 2))
    +
    + 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.
    +
    + question 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/.
    +
    + question How can I build a new Tree Language?
    +
    + paragraph
    + A good place to start is with our simple Tree Language Builder.
    +
    + question 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.
    +
    + question What are some examples of Tree Languages?
    +
    + paragraph
    + There are over a dozen example languages in the JTree GitHub repo. Here's a language that compiles to HTML, a language similar to Make, and a language that does simple math .
    +
    + question 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 2020, 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 2020 the most powerful Tree Language could be yours!
    +
    + section Structure
    +
    + question What is the difference between Tree Notation and Tree Languages?
    +
    + paragraph
    + 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?
    +
    + paragraph
    + This is the base Tree Notation:
    +
    + code
    + nodeBreakSymbol = "\n" // New lines separate nodes
    + edgeSymbol = " " // Increasing indent to denote parent/child relationship
    + interface TreeNode {
    + parent: &TreeNode
    + children: TreeNode[]
    + line: string
    + }
    +
    + paragraph
    + 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.
    +
    + question What are the basic terms when talking about things written in Tree Notation?
    +
    + paragraph
    + Example:
    +
    + code
    + if true
    + print Hello world
    +
    + paragraph
    + 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.
    +
    + paragraph
    + 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.
    +
    + paragraph
    + Here is a longer spec🔗faq.treenotation.org/spec/.
    +
    + question 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.
    +
    + question Does Tree Notation work on Windows?
    +
    + paragraph
    + 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?
    +
    + paragraph
    + Tree Notation supports all encodings. This is perfectly valid Tree Notation:
    +
    + code
    + html
    + body
    + div おはようございます
    +
    + 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".
    +
    + 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.
    +
    + question 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.
    +
    + question 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.
    +
    + question 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.
    +
    + paragraph
    + If you want to build a Tree Notation library for your language, there is a meta project intended to help!
    +
    + section Project Status
    +
    + question 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.
    +
    + question 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.
    +
    + paragraph
    + If you'd prefer to wait until most of the details are settled, late 2020 is probably a better time to start using it.
    +
    + question 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.
    +
    + question How is the Tree Notation Lab funded?
    +
    + paragraph
    + The Tree Notation Lab is funded entirely by anonymous gifts. You can donate bitcoin to the Tree Notation Lab at this address: 36DMShMSDUp19FnshHZDnoVCGrAYCrowfN
    +
    + section Editing Tips
    +
    + question 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.
    +
    + question 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.
    +
    + section For Advanced Tree Language Creators
    +
    + question 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.
    +
    + question 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.
    +
    + question 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.
    +
    + section Lisp Related Questions
    +
    + question 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.
    +
    + question 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.
    +
    + question What's an example of "ad hoc" parsing that you can do with Tree Notation that you cannot do with S-Expressions?
    +
    + paragraph
    + 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?
    +
    + 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.
    +
    + question 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).
    +
    + section History
    +
    + question 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.
    +
    + paragraph
    + 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?
    +
    + 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.
    +
    + question 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.
    +
    + question 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.
    +
    + question How was Tree Notation discovered?
    +
    + paragraph
    + If Tree Notation turns out to be a good idea, below is the origin story.
    +
    + quote
    + The year was 2012. Barack Hussein Obama was president, Prettier hadn't been released yet, and humans talked to other humans more than Alexa.
    +
    + Our startup NudgePad was building a visual web page editor in our office in San Francisco, which was located in the backroom of a warehouse that built wooden pianos by hand. In comparison to Nudge Inc., the wooden piano business was _booming_.
    +
    + With NudgePad, users could drag, drop and edit their web pages without touching any code. It worked awesome, at least 1 percent of the time. As the user was editing their pages visually, we coded NudgePad to read and write the language HAML, which I had learned at my previous job.
    +
    + I ended up needing to write my own HAML parser and code generator for reasons long since forgotten. Because we were a broke startup, I kept trying to cut syntax from the language to save time and money.
    +
    + Every now and then I would remove some syntax character from our HAML clone and still somehow get everything in NudgePad to work. Eventually the language was just spaces, newlines, and colons.
    +
    + And then there was an "aha!" moment. I remember I was walking to work, going over the code in my head, and had just reached the 101 overpass when I realized I could dump the colons! I went straight to my desk, opened up my editor, and a couple hours later had removed the colons and everything still worked. I remember at the time thinking that was potentially a profound idea but I _was positive_ someone had built it already. I thought there was no chance it hadn't been invented yet because it was so simple.
    +
    + But for years I'd ping folks in industry, post on message boards, and do a lot of Google searches. It took me years of searching for it before I thought maybe no had noticed and leveraged this idea before.
    +
    + 5 years later I had another "aha" moment when I realized it would also be a good base notation for _any_ type of computer language, and wrote a paper about it. Which went on to be cited over (editor's note: it says "zero" here, is that correct?) times.
    +
    + It was over 7 years before the first "aha" moment that Tree Notation started to maybe get useful.
    +
    + section Other
    +
    + question 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!
    +
    + question 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.
    +
    + question What is the Zen of Tree Notation?
    +
    + paragraph
    + Rule #1. Put it in a Tree Language.
    +
    + paragraph
    + End of Rules.
    +
    scroll.settings
    Changed around line 1
    + title Tree Notation FAQ
    + description Frequently Asked Questions about Tree Notation
    + github https://github.com/treenotation/faq.treenotation.org
    + git https://github.com/treenotation/faq.treenotation.org/blob/main
    + twitter https://twitter.com/treenotation
    + email faq@treenotation.com
    + baseUrl https://faq.treenotation.org/
    spec/index.html
    Changed around line 3
    - http://scroll.publicdomaincompany.com/
    + https://scroll.pub
    - Scroll v12.0.0
    + Scroll v21.1.0
    - ->
    +
    -
    +
    +
    +
    +

    +
    +
    A more formal spec of Tree Notation
    +
    +
    +
    +
    +

    Introduction to Two Dimensional Languages

    +
    +

    Tree Notation is a subset of a class of languages called two dimensional languages.

    +
    +

    One dimensional languages assume a one dimensional array of bits with a single read head

    + moving in order.

    +
    +

    Two dimensional languages break those assumptions. There may be multiple read heads that

    + can move not just on the x axis but on the y axis as well.

    +
    +

    Tree Notation is a middle ground that utilitizes ideas from the two dimensional language

    + world using present day technology.

    +
    +

    Tree Notation Spec

    +
    +

    The Data Structure

    +
    +

    The basic structure of a Tree Notation object is as follows:

    +
    + interface TreeNode {
    + parent: &TreeNode
    + words: string[]
    + children: TreeNode[]
    + }
    +
    +

    No Syntax Errors

    +
    +

    All documents are valid Tree Notation documents. Like binary notation, there are no syntax errors in Tree Notation. For every possible string abc:

    +
    + new TreeNotation(abc).toString() === abc
    +
    +

    Errors can only occur at a higher semantic level in Tree Languages.

    +
    +

    Isomorphism to Spreadsheets

    +
    +

    A program in Tree Notation is isomorphic to a spreadsheet. A single row is a node. Words are

    + in cells. You can make a row a child of the row above it by indenting it with an additional blank
    + cell in the head.

    +
    +

    Special Symbols

    +
    +

    A Tree Notation object is a sequence of bits/bytes/characters(hereafter abbreviated

    + as chars). Tree Notation requires the definition of 3 special chars, which turn
    + an otherwise unstructured linear sequence of chars into a structured recursive tree object.

    +
    +

    Those 3 special chars are:

    +
    +
      +
    • nodeBreakSymbol
    • +
    • wordBreakSymbol
    • +
    • edgeSymbol
    • +
      +
      +

      nodeBreakSymbol delimits nodes (lines), wordBreakSymbol delimits words (cells), and edgeSymbol is used to indicate the parent/child relationship between nodes.

      +
      +

      With just nodeBreakSymbol and wordBreakSymbol, you get Grid Notation. The addition of edgeSymbol adds the

      + parent/child concept.

      +
      +

      By convention those special symbols are:

      +
      + nodeBreakSymbol
      + newline character
      + Keyboard: Enter Key
      + Binary: 00001010
      + Hex: 0A
      + Decimal: 10
      + As string: "\n"
      + (Note: On Windows, "\r" is treated the same as any other non-special char)
      +
      + wordBreakSymbol
      + space character
      + Keyboard: Space Key
      + Binary: 00100000
      + Hex: 20
      + Decimal: 32
      + As string: " "
      +
      + edgeSymbol
      + # by convention is the same as edgeSymbol above
      +
      +

      For better interoperability with existing spreadsheet applications the tab character "\t" is often used for wordBreakSymbol and edgeSymbol.

      +
      +

      Although in theory edgeSymbol and wordBreakSymbol can conflict, in practice, given a higher level Tree Language grammar, that does not happen.

      +
      +

      This is currently the full spec of Tree Notation.

      +
      +

      Tree Languages

      +
      +

      The structure above defines Tree Notation. Tree Notation is a very basic notation. On top of

      + Tree Notation, people build Tree Languages. You can see examples of higher level
      + Tree Languages here.

      +
      +

      The Grammar Language is an advanced Tree Language for building other Tree Languages. This spec is written in a Tree Language called Scrolldown.

      +
      +
      +
      spec/readme.html
      Changed around line 1
      +
      +
      +
      +
      + Tree Notation Spec - Tree Notation Spec
      +
      +
      +
      +
      +

      +
      +
      A more formal spec of Tree Notation
      +
      +
      +
      +
      +

      Introduction to Two Dimensional Languages

      +
      +

      Tree Notation is a subset of a class of languages called two dimensional languages.

      +
      +

      One dimensional languages assume a one dimensional array of bits with a single read head

      + moving in order.

      +
      +

      Two dimensional languages break those assumptions. There may be multiple read heads that

      + can move not just on the x axis but on the y axis as well.

      +
      +

      Tree Notation is a middle ground that utilitizes ideas from the two dimensional language

      + world using present day technology.

      +
      +

      Tree Notation Spec

      +
      +

      The Data Structure

      +
      +

      The basic structure of a Tree Notation object is as follows:

      +
      + interface TreeNode {
      + parent: &TreeNode
      + words: string[]
      + children: TreeNode[]
      + }
      +
      +

      No Syntax Errors

      +
      +

      All documents are valid Tree Notation documents. Like binary notation, there are no syntax errors in Tree Notation. For every possible string abc:

      +
      + new TreeNotation(abc).toString() === abc
      +
      +

      Errors can only occur at a higher semantic level in Tree Languages.

      +
      +

      Isomorphism to Spreadsheets

      +
      +

      A program in Tree Notation is isomorphic to a spreadsheet. A single row is a node. Words are

      + in cells. You can make a row a child of the row above it by indenting it with an additional blank
      + cell in the head.

      +
      +

      Special Symbols

      +
      +

      A Tree Notation object is a sequence of bits/bytes/characters(hereafter abbreviated

      + as chars). Tree Notation requires the definition of 3 special chars, which turn
      + an otherwise unstructured linear sequence of chars into a structured recursive tree object.

      +
      +

      Those 3 special chars are:

      +
      +
        +
      • nodeBreakSymbol
      • +
      • wordBreakSymbol
      • +
      • edgeSymbol
      • +
        +
        +

        nodeBreakSymbol delimits nodes (lines), wordBreakSymbol delimits words (cells), and edgeSymbol is used to indicate the parent/child relationship between nodes.

        +
        +

        With just nodeBreakSymbol and wordBreakSymbol, you get Grid Notation. The addition of edgeSymbol adds the

        + parent/child concept.

        +
        +

        By convention those special symbols are:

        +
        + nodeBreakSymbol
        + newline character
        + Keyboard: Enter Key
        + Binary: 00001010
        + Hex: 0A
        + Decimal: 10
        + As string: "\n"
        + (Note: On Windows, "\r" is treated the same as any other non-special char)
        +
        + wordBreakSymbol
        + space character
        + Keyboard: Space Key
        + Binary: 00100000
        + Hex: 20
        + Decimal: 32
        + As string: " "
        +
        + edgeSymbol
        + # by convention is the same as edgeSymbol above
        +
        +

        For better interoperability with existing spreadsheet applications the tab character "\t" is often used for wordBreakSymbol and edgeSymbol.

        +
        +

        Although in theory edgeSymbol and wordBreakSymbol can conflict, in practice, given a higher level Tree Language grammar, that does not happen.

        +
        +

        This is currently the full spec of Tree Notation.

        +
        +

        Tree Languages

        +
        +

        The structure above defines Tree Notation. Tree Notation is a very basic notation. On top of

        + Tree Notation, people build Tree Languages. You can see examples of higher level
        + Tree Languages here.

        +
        +

        The Grammar Language is an advanced Tree Language for building other Tree Languages. This spec is written in a Tree Language called Scrolldown.

        +
        +
        +
        spec/readme.scroll
        Changed around line 1
        + title Tree Notation Spec
        +
        + title3 Introduction to Two Dimensional Languages
        +
        + paragraph
        + Tree Notation is a subset of a class of languages called two dimensional languages.
        +
        + paragraph
        + One dimensional languages assume a one dimensional array of bits with a single read head
        + moving in order.
        +
        + paragraph
        + Two dimensional languages break those assumptions. There may be multiple read heads that
        + can move not just on the x axis but on the y axis as well.
        +
        + paragraph
        + Tree Notation is a middle ground that utilitizes ideas from the two dimensional language
        + world using present day technology.
        +
        + title2 Tree Notation Spec
        +
        + title4 The Data Structure
        +
        + paragraph
        + The basic structure of a Tree Notation object is as follows:
        +
        + code
        + interface TreeNode {
        + parent: &TreeNode
        + words: string[]
        + children: TreeNode[]
        + }
        +
        + title4 No Syntax Errors
        +
        + paragraph
        + All documents are valid Tree Notation documents. Like binary notation, there are no syntax errors in Tree Notation. For every possible string abc:
        +
        + code
        + new TreeNotation(abc).toString() === abc
        +
        + paragraph
        + Errors can only occur at a higher semantic level in Tree Languages.
        +
        + title4 Isomorphism to Spreadsheets
        +
        + paragraph
        + A program in Tree Notation is isomorphic to a spreadsheet. A single row is a node. Words are
        + in cells. You can make a row a child of the row above it by indenting it with an additional blank
        + cell in the head.
        +
        + title4 Special Symbols
        +
        + paragraph
        + A Tree Notation object is a sequence of bits/bytes/characters(hereafter abbreviated
        + as chars). Tree Notation requires the definition of 3 special chars, which turn
        + an otherwise unstructured linear sequence of chars into a structured recursive tree object.
        +
        + paragraph
        + Those 3 special chars are:
        +
        + list
        + - nodeBreakSymbol
        + - wordBreakSymbol
        + - edgeSymbol
        +
        + paragraph
        + nodeBreakSymbol delimits nodes (lines), wordBreakSymbol delimits words (cells), and edgeSymbol is used to indicate the parent/child relationship between nodes.
        +
        + paragraph
        + With just nodeBreakSymbol and wordBreakSymbol, you get Grid Notation. The addition of edgeSymbol adds the
        + parent/child concept.
        +
        + paragraph
        + By convention those special symbols are:
        +
        + code
        + nodeBreakSymbol
        + newline character
        + Keyboard: Enter Key
        + Binary: 00001010
        + Hex: 0A
        + Decimal: 10
        + As string: "\n"
        + (Note: On Windows, "\r" is treated the same as any other non-special char)
        +
        + code
        + wordBreakSymbol
        + space character
        + Keyboard: Space Key
        + Binary: 00100000
        + Hex: 20
        + Decimal: 32
        + As string: " "
        +
        + code
        + edgeSymbol
        + # by convention is the same as edgeSymbol above
        +
        + paragraph
        + For better interoperability with existing spreadsheet applications the tab character "\t" is often used for wordBreakSymbol and edgeSymbol.
        +
        + paragraph
        + Although in theory edgeSymbol and wordBreakSymbol can conflict, in practice, given a higher level Tree Language grammar, that does not happen.
        +
        + paragraph
        + This is currently the full spec of Tree Notation.
        +
        + title2 Tree Languages
        +
        + paragraph
        + The structure above defines Tree Notation. Tree Notation is a very basic notation. On top of
        + Tree Notation, people build Tree Languages. You can see examples of higher level
        + Tree Languages here.
        +
        + paragraph
        + The Grammar Language is an advanced Tree Language for building other Tree Languages. This spec is written in a Tree Language called Scrolldown.
        spec/scrollSettings.map
        Changed around line 1
        + title Tree Notation Spec
        + description A more formal spec of Tree Notation
        + github https://github.com/treenotation/faq.treenotation.org
        + git https://github.com/treenotation/faq.treenotation.org/blob/master/spece
        + twitter https://twitter.com/treenotation
        + email spec@treenotation.org
        Breck Yunits
        Breck Yunits
        4 years ago
        Merge pull request #2 from rmorey/patch-1
        Ryan Morey
        Ryan Morey
        4 years ago
        Fix broken link to `spec.txt`
        README.md
        Changed around line 161: If you are familiar with Lisp terminology, you can think of words as atoms.
        - Here is a [longer spec](https://github.com/treenotation/jtree/blob/master/spec.txt).
        + Here is a [longer spec](https://faq.treenotation.org/spec.txt).
        Breck Yunits
        Breck Yunits
        4 years ago
        Update spec.txt Line length
        spec.txt
        Changed around line 2: A Tree Notation object is a sequence of bits/bytes/characters(hereafter abbrevia
        - Those 3 special chars are referred to as nodeBreakSymbol, edgeSymbol, and wordBreakSymbol. nodeBreakSymbol delimits nodes and edgeSymbol is used to indicate the parent/child relationship between nodes. wordBreakSymbol delimits words in a string.
        + Those 3 special chars are referred to as nodeBreakSymbol, edgeSymbol, and wordBreakSymbol. nodeBreakSymbol delimits
        + nodes and edgeSymbol is used to indicate the parent/child relationship between nodes. wordBreakSymbol delimits
        + words in a string.
        - With just nodeBreakSymbol and wordBreakSymbol, you get Grid Notation. The addition of edgeSymbol adds the parent/child concept.
        + With just nodeBreakSymbol and wordBreakSymbol, you get Grid Notation. The addition of edgeSymbol adds the
        + parent/child concept.
        Breck Yunits
        Breck Yunits
        4 years ago
        Update spec.txt
        spec.txt
        Changed around line 1
        - as chars). Tree Notation requires the definition of at least 2 special chars which turn
        + as chars). Tree Notation requires the definition of at least 2 special chars (and usually 3), which turn
        Breck Yunits
        Breck Yunits
        4 years ago
        Removed XI and YI and updated FAQ
        README.md
        Changed around line 1
        - Tree Notation Frequently Asked Questions
        - ========================================
        + # Tree Notation Frequently Asked Questions
        Changed around line 10: Below is a list of questions that are commonly asked by people who are new to
        - YI = "\n" // New lines separate nodes
        - XI = " " // Increasing indent to denote parent/child relationship
        + nodeBreakSymbol = "\n" // New lines separate nodes
        + edgeSymbol = " " // Increasing indent to denote parent/child relationship
        Changed around line 43: In the future we think the stack may look like this:
        - We all use software tools to build software. Tree Notation makes building these tools significantly easier, and as more people join the Tree Notation ecosystem there will 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 our 2 domains are very different, we 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.
        - Tree Notation is a base level notation. Generally users use Tree Languages, which make Tree Notation useful. We are building a Tree Language called [Grammar](http://jtree.treenotation.org/designer/#standard%20grammar) 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](https://jtree.treenotation.org/designer/#standard%20grammar) is a tool to make it easier to build Tree Languages.
        - Tree Notation may seem similar to notations like JSON, XML, YAML or S-expressions. However, Tree Notation is the most minimal, is grounded in 3-dimensional geometry, and the concept of syntax errors does not exist. We think this makes Tree Notation substantially different and will cause a *major improvement* in computing. Tree Notation solves some major problems in computer science.
        + 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.
        - 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, will greatly reduce time wasted on cleaning data.
        - 3. Visual programming. Tree Notation is the first notation where a visual design tool can generate code as good as someone can 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 is helping solve the Visual Programming problem.
        + 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.
        - We are building the data science app [Ohayo](https://github.com/treenotation/ohayo) in part to demonstrate these 3 advantages of Tree Notation.
        + The data science app [Ohayo](https://github.com/treenotation/ohayo) is in part an experiment to test these 3 advantages of Tree Notation.
        Changed around line 86: package.npm:
        - It may look like the only benefit is fewer syntax characters, but there's actually a lot more we can now do. Our "package.npm" grammar file gets typechecking, autocomplete, tailored syntax highlighting ([github highlighting coming soon](https://github.com/treenotation/jtree/issues/55)), 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 ([github highlighting coming soon](https://github.com/treenotation/jtree/issues/55)), can support multiline strings, strings without quotes that don't require escaping, comments, and more.
        - There are over a dozen example languages in the JTree GitHub repo. Here's a language that compiles to HTML, a language similar to Make, and a language that does simple math .
        + There are over a dozen example languages in the JTree GitHub repo. Here's a language that compiles to HTML, a language similar to Make, and a language that does simple math .
        - Currently the most advanced non-experimental Tree Language that we are aware of is Flow, the dataflow language used by our visual data science studio Ohayo. By 2020, we expect Flow to 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 2020 the most powerful Tree Language could be yours! We are here to help you build it!
        + Currently the most advanced somewhat-useful Tree Language is OhayoLang, the dataflow language in the data science studio Ohayo. In 2020, 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 2020 the most powerful Tree Language could be yours!
        - There is a very 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).
        - YI = "\n" // New lines separate nodes
        - XI = " " // Increasing indent to denote parent/child relationship
        + nodeBreakSymbol = "\n" // New lines separate nodes
        + edgeSymbol = " " // Increasing indent to denote parent/child relationship
        - 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.
        Changed around line 155: Example:
        - 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 termined 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.
        Changed around line 169: Tree Notation uses a single space to indent blocks which indicates parent/child
        - Yes. Tree Notation only uses the "\n" character to separate nodes/lines. "\r" is either ignored or treated as a content character. Our testing so far on Windows is not that extensive, so we would love more help from Windows users!
        + 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" :).
        Changed around line 193: No. A subset of Tree Notation does, but for perfect one-to-one matching you'll w
        - Yes! The JTree library provides Tree Notation support for TypeScript and Javascript, but we hope that there will eventually 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.
        - If you want to build a Tree Notation library for your language, let us know how we can help!
        + If you want to build a Tree Notation library for your language, there is a meta project intended to help!
        - Tree Notation is free and open source. The Tree Notation Lab, a research group at the University of Hawaii Cancer Center in Oahu, is currently behind a lot of the core Tree Notation infrastructure projects. We are building the infrastructure needed so that we can build better tools for cancer researchers, clinicians, and patients, but the faster we can get the broader Tree Notation ecosystem growing, the easier our work will become.
        + 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.
        - If you'd prefer to wait until most of the details are settled, 2020 is probably a better time to start using it.
        + If you'd prefer to wait until most of the details are settled, late 2020 is probably a better time to start using it.
        - Thank you for asking! We need a lot of volunteers. 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.
        Changed around line 239: Yes! As of JTree 35, the Grammar Language that ships with Jtree now supports oth
        - 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 YI 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.
        - It is largely accurate to say Tree Notation is S-Expressions without parenthesis. But this makes them almost completely 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.
        - No. It is largely accurate to say Tree Notation is Lisp without parenthesis. However, that distinction ends up making a chasmic difference which will become more important over time, and we think the Tree Notation ecosystem will grow to dwarf the Lisp ecosystem.
        + 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.
        - #### What's an example of "ad hoc" parsing that you can do with Tree Notation that you cannot do with Lisp?
        + #### What's an example of "ad hoc" parsing that you can do with Tree Notation that you cannot do with S-Expressions?
        - 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 parantheses 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.
        Changed around line 267: In Lisp you have to escape certain characters. In Tree Notation, you never need
        - You can read the half-baked [papers about Tree Notation](https://github.com/treenotation/jtree/tree/master/papers).
        + You can read the half-baked [papers about Tree Notation](https://github.com/treenotation/research/tree/master/papers).
        - 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_.
        Changed around line 277: Syntactically there's no question--it was HAML.
        - We 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.
        - Not sure. We think it's because perhaps 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.
        - Below is a transcript of Breck telling the origin story. This is taken from the upcoming E! True Hollywood Story 'Tree Notation: the Drugs, Sex, and Fights in the days before it had 84 stars.`
        + If Tree Notation turns out to be a good idea, below is the origin story.
        - Our startup NudgePad was building a visual web page editor in our office in San Francisco, which was located in the backroom of a warehouse that built wooden pianos by hand. In comparison to Nudge Inc., the wooden piano business was *booming*.
        + Our startup NudgePad was building a visual web page editor in our office in San Francisco, which was located in the backroom of a warehouse that built wooden pianos by hand. In comparison to Nudge Inc., the wooden piano business was _booming_.
        - With NudgePad, users could drag, drop and edit their web pages without touching any code. It worked awesome, at least 1 percent of the time. As the user was editing their pages visually, we coded NudgePad to read and write the language HAML, which I had learned at my previous job at Lab Zero.
        + With NudgePad, users could drag, drop and edit their web pages without touching any code. It worked awesome, at least 1 percent of the time. As the user was editing their pages visually, we coded NudgePad to read and write the language HAML, which I had learned at my previous job.
        - I ended up needing to write my own HAML parser and code generator for reasons long since forgotten. Because we were a broke startup, I kept trying to cut syntax from the language to save time and money. This also saved me from talking to users, a key strategy behind any great business (\s).
        + I ended up needing to write my own HAML parser and code generator for reasons long since forgotten. Because we were a broke startup, I kept trying to cut syntax from the language to save time and money.
        - And then there was an "aha!" moment. I remember I was walking to work, going over the code in my head, and had just reached the 101 overpass when I realized I could dump the colons! I went straight to my desk, opened up my editor, and a couple hours later had removed the colons and everything still worked. I remember at the time thinking that was potentially a profound idea but I *was positive* someone had built it already. I thought there was no chance it hadn't been invented yet because it was so simple. By Kevin's Law, It had probably appeared on Shark Tank before.
        + And then there was an "aha!" moment. I remember I was walking to work, going over the code in my head, and had just reached the 101 overpass when I realized I could dump the colons! I went straight to my desk, opened up my editor, and a couple hours later had removed the colons and everything still worked. I remember at the time thinking that was potentially a profound idea but I _was positive_ someone had built it already. I thought there was no chance it hadn't been invented yet because it was so simple.
        - 5 years later I had another "aha" moment when I realized it would also be a good base notation for *any* type of computer language, and wrote a paper about it. Which went on to be cited over (editor's note: it says "zero" here, is that correct?) times.
        + 5 years later I had another "aha" moment when I realized it would also be a good base notation for _any_ type of computer language, and wrote a paper about it. Which went on to be cited over (editor's note: it says "zero" here, is that correct?) times.
        - It was over 7 years before the first "aha" moment that Tree Notation started to get good."
        + It was over 7 years before the first "aha" moment that Tree Notation started to maybe get useful."
        +
        + #### How confident are you that this is a good idea?
        +
        + 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.
        spec.txt
        Changed around line 2: A Tree Notation object is a sequence of bits/bytes/characters(hereafter abbrevia
        - Those 2 special chars are referred to as XI and YI. YI delimits nodes and XI is used
        - to indicate the parent/child relationship between nodes.
        + Those 3 special chars are referred to as nodeBreakSymbol, edgeSymbol, and wordBreakSymbol. nodeBreakSymbol delimits nodes and edgeSymbol is used to indicate the parent/child relationship between nodes. wordBreakSymbol delimits words in a string.
        +
        + With just nodeBreakSymbol and wordBreakSymbol, you get Grid Notation. The addition of edgeSymbol adds the parent/child concept.
        - YI
        + nodeBreakSymbol
        Changed around line 17: Decimal: 10
        - XI
        + edgeSymbol
        Changed around line 25: Hex: 20
        - Often it is beneficial to define a third delimiter, ZI, which is used to
        - separate words/cells on a line. By convention ZI is also a space. Although
        - in theory ZI and XI can conflict, in practice, given a higher level Tree Language
        - grammar, that does not happen.
        + wordBreakSymbol by convention is the same as edgeSymbol. Although in theory edgeSymbol and wordBreakSymbol
        + can conflict, in practice, given a higher level Tree Language grammar, that does not happen.
        Changed around line 36: interface TreeNode {
        -
        Breck Yunits
        Breck Yunits
        5 years ago
        Create zen.dumbdown
        zen.dumbdown
        Changed around line 1
        + title The Zen of Tree Notation
        +
        + subtitle Rule #1. Put it in a Tree Language.
        +
        + paragraph End of Rules.
        Breck Yunits
        Breck Yunits
        5 years ago
        Create spec.txt
        spec.txt
        Changed around line 1
        + A Tree Notation object is a sequence of bits/bytes/characters(hereafter abbreviated
        + as chars). Tree Notation requires the definition of at least 2 special chars which turn
        + an otherwise unstructured linear sequence of chars into a structured recursive tree object.
        +
        + Those 2 special chars are referred to as XI and YI. YI delimits nodes and XI is used
        + to indicate the parent/child relationship between nodes.
        +
        + By convention those special characters are:
        +
        + YI
        + newline character
        + Keyboard: Enter Key
        + Binary: 00001010
        + Hex: 0A
        + Decimal: 10
        + As string: "\n"
        + (Note: On Windows, "\r" is treated the same as any other non-special char)
        +
        + XI
        + space character
        + Keyboard: Space Key
        + Binary: 00100000
        + Hex: 20
        + Decimal: 32
        + As string: " "
        +
        + Often it is beneficial to define a third delimiter, ZI, which is used to
        + separate words/cells on a line. By convention ZI is also a space. Although
        + in theory ZI and XI can conflict, in practice, given a higher level Tree Language
        + grammar, that does not happen.
        +
        + The basic structure of a Tree Notation object is as follows:
        +
        + interface TreeNode {
        + parent: &TreeNode
        + children: TreeNode[]
        + line: string
        + }
        +
        +
        + From those building blocks one can build higher level languages. The "Grammar Language"
        + and code should be referenced to learn how to define and implement cells and higher level Tree Languages.
        +
        + This is currently the full spec of Tree Notation.
        Breck Yunits
        Breck Yunits
        5 years ago
        Added github link
        README.md
        Changed around line 1
        + [View this on GitHub](https://github.com/treenotation/faq.treenotation.org).
        +
        Breck Yunits
        Breck Yunits
        5 years ago
        Update README.md
        README.md
        Changed around line 1
        - # faq.treenotation.org
        - Tree Notation FAQ
        + Tree Notation Frequently Asked Questions
        + ========================================
        +
        + 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 [TreeNotation Subreddit](https://www.reddit.com/r/treenotation/).
        +
        + ## Overview
        +
        + #### What is 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:
        +
        + YI = "\n" // New lines separate nodes
        + XI = " " // Increasing indent to denote parent/child relationship
        + interface TreeNode {
        + children: TreeNode[]
        + line: string
        + }
        +
        + 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.
        +
        + 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.
        +
        + Here’s an example of a minimal HTML document represented in a Tree Language:
        +
        + html
        + body
        + div おはようございます
        +
        + 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.
        +
        + (Thank you to @vakradrz for this answer)
        +
        + #### There are already over 10,000 programming languages and over 1,000 syntax systems like JSON, XML and BNF, why create another one?
        +
        + 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.
        +
        + This is our current stack of computer languages:
        +
        + 1 Binary => 1,000+ Syntaxes => 10,000+ languages
        +
        + In the future we think the stack may look like this:
        +
        + 1 Binary => 1 Tree Notation => 10,000+ Tree Languages
        +
        + We all use software tools to build software. Tree Notation makes building these tools significantly easier, and as more people join the Tree Notation ecosystem there will 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 our 2 domains are very different, we can share a lot of the tools and code.
        +
        + #### What's the difference between Tree Notation and Tree Languages?
        +
        + Tree Notation is a base level notation. Generally users use Tree Languages, which make Tree Notation useful. We are building a Tree Language called [Grammar](http://jtree.treenotation.org/designer/#standard%20grammar) to make it easier to build Tree Languages.
        +
        + #### What is special about Tree Notation?
        +
        + Tree Notation may seem similar to notations like JSON, XML, YAML or S-expressions. However, Tree Notation is the most minimal, is grounded in 3-dimensional geometry, and the concept of syntax errors does not exist. We think this makes Tree Notation substantially different and will cause a *major improvement* in computing. Tree Notation solves some major problems in computer science.
        +
        + #### What major problems in computer science does help Tree Notation solve?
        +
        + 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, will greatly reduce time wasted on cleaning data.
        + 3. Visual programming. Tree Notation is the first notation where a visual design tool can generate code as good as someone can 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 is helping solve the Visual Programming problem.
        +
        + We are building the data science app [Ohayo](https://github.com/treenotation/ohayo) in part to demonstrate these 3 advantages of Tree Notation.
        +
        + #### What is a basic example of Tree Notation for file formats?
        +
        + 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:
        +
        + {
        + "name": "mypackage"
        + "version": "2.1.1"
        + "description": "A package",
        + "repository": {
        + "type": "git",
        + "url": "git://github.com/username/mypackage"
        + }
        + }
        +
        + package.npm:
        +
        + name mypackage
        + version 2.1.1
        + description A package
        + repository
        + type git
        + url git://github.com/username/mypackage
        +
        + It may look like the only benefit is fewer syntax characters, but there's actually a lot more we can now do. Our "package.npm" grammar file gets typechecking, autocomplete, tailored syntax highlighting ([github highlighting coming soon](https://github.com/treenotation/jtree/issues/55)), can support multiline strings, strings without quotes that don't require escaping, comments, and more.
        +
        + 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](http://jtree.treenotation.org/designer/#standard%20dug) that has a 1-to-1 relationship to JSON.
        +
        + #### What is a basic example of Tree Notation for programming languages?
        +
        + In the example below, Tree Notation is used as a base for a math Tree Language where traditionally S-Expressions/Lisp might be used.
        +
        + make8.math:
        +
        + multiply
        + add 1 1
        + add 2 2
        +
        + make8.lisp:
        +
        + (* (+ 1 1) (+ 2 2))
        +
        + 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.
        +
        + #### What are some advanced examples of Tree Notation in action?
        +
        + Check out the [Ohayo](https://github.com/treenotation/ohayo) project or the [Tree Language Builder](http://jtree.treenotation.org/designer/).
        +
        + #### How can I build a new Tree Language?
        +
        + A good place to start is with our simple Tree Language Builder.
        +
        + #### Where can I use Tree Notation?
        +
        + Everywhere! Anywhere you use programming languages or encodings, you can use Tree Notation. In the early days of the Tree Notation Ecosystem, it will require more work but we are here to help.
        +
        + #### What are some examples of Tree Languages?
        +
        + There are over a dozen example languages in the JTree GitHub repo. Here's a language that compiles to HTML, a language similar to Make, and a language that does simple math .
        +
        + #### Languages that add numbers or compile to HTML are cute, but are there any advanced Tree Language?
        +
        + Currently the most advanced non-experimental Tree Language that we are aware of is Flow, the dataflow language used by our visual data science studio Ohayo. By 2020, we expect Flow to 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 2020 the most powerful Tree Language could be yours! We are here to help you build it!
        +
        + ## Structure
        +
        + #### What is the difference between Tree Notation and Tree Languages?
        +
        + There is a very 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).
        +
        + #### What are the data structures in Tree Notation?
        +
        + This is the base Tree Notation:
        +
        + YI = "\n" // New lines separate nodes
        + XI = " " // Increasing indent to denote parent/child relationship
        + interface TreeNode {
        + parent: &TreeNode
        + children: TreeNode[]
        + line: string
        + }
        +
        + 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.
        +
        + Higher level Tree Languages are where additional concepts can be added like strings, integers, booleans, control flow, assignment, encapsulation, functions, and so forth.
        +
        + #### What are the basic terms when talking about things written in Tree Notation?
        +
        + Example:
        +
        + if true
        + print Hello world
        +
        + 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 termined 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.
        +
        + If you are familiar with Lisp terminology, you can think of words as atoms.
        +
        + 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.
        +
        + Here is a [longer spec](https://github.com/treenotation/jtree/blob/master/spec.txt).
        +
        + #### Does Tree Notation use tabs or spaces?
        +
        + 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.
        +
        + #### Does Tree Notation work on Windows?
        +
        + Yes. Tree Notation only uses the "\n" character to separate nodes/lines. "\r" is either ignored or treated as a content character. Our testing so far on Windows is not that extensive, so we would love more help from Windows users!
        +
        + #### Does Tree Notation support Unicode or just ASCII?
        +
        + Tree Notation supports all encodings. This is perfectly valid Tree Notation:
        +
        + html
        + body
        + div おはようございます
        +
        + 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".
        +
        + 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.
        +
        + #### How do I escape characters?
        +
        + 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.
        +
        + #### Does Tree Notation directly map to XML or JSON?
        +
        + 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.
        +
        + #### Can I use Tree Notation with any programming language?
        +
        + Yes! The JTree library provides Tree Notation support for TypeScript and Javascript, but we hope that there will eventually be Tree Notation and Tree Grammar libraries in all programming languages, similar to how most languages nowadays have JSON libraries.
        +
        + If you want to build a Tree Notation library for your language, let us know how we can help!
        +
        + ## Project Status
        +
        + #### Who makes Tree Notation, and is it open source?
        +
        + Tree Notation is free and open source. The Tree Notation Lab, a research group at the University of Hawaii Cancer Center in Oahu, is currently behind a lot of the core Tree Notation infrastructure projects. We are building the infrastructure needed so that we can build better tools for cancer researchers, clinicians, and patients, but the faster we can get the broader Tree Notation ecosystem growing, the easier our work will become.
        +
        + #### Is Tree Notation ready for production use?
        +
        + 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.
        +
        + If you'd prefer to wait until most of the details are settled, 2020 is probably a better time to start using it.
        +
        + #### How can I help?
        +
        + Thank you for asking! We need a lot of volunteers. 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.
        +
        + #### How is the Tree Notation Lab funded?
        +
        + The Tree Notation Lab is funded entirely by anonymous gifts. You can donate bitcoin to the Tree Notation Lab at this address: 36DMShMSDUp19FnshHZDnoVCGrAYCrowfN
        +
        + ## Editing Tips
        +
        + #### How can I copy and paste code in Tree Notation and have the editor ensure correct indentation?
        +
        + Look for a "Paste and indent" command. For example, in Sublime Text you can click Edit->Paste and Indent, or press Cmd+Shift+v.
        +
        + #### Do I have to count the spaces?
        +
        + 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.
        +
        + ## For Advanced Tree Language Creators
        +
        + #### What are the benefits to writing a "Grammar" file to create my Tree Language?
        +
        + 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.
        +
        + #### Can I use infix notation, postfix notation, or pattern matching?
        +
        + 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.
        +
        + #### Can I do inline Trees?
        +
        + 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 YI instead of the newline character.
        +
        + ## Lisp Related Questions
        +
        + #### How is this different from S-Expressions?
        +
        + It is largely accurate to say Tree Notation is S-Expressions without parenthesis. But this makes them almost completely 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.
        +
        + #### Is Tree Notation just Lisp?
        +
        + No. It is largely accurate to say Tree Notation is Lisp without parenthesis. However, that distinction ends up making a chasmic difference which will become more important over time, and we think the Tree Notation ecosystem will grow to dwarf the Lisp ecosystem.
        +
        + #### What's an example of "ad hoc" parsing that you can do with Tree Notation that you cannot do with Lisp?
        +
        + 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.
        +
        + #### What's something else you can do with Tree Notation that you can't do with Lisp?
        +
        + 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 parantheses removing and inserting.
        +
        + #### What's something else that is worse in Lisp?
        +
        + 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).
        +
        + ## History
        +
        + #### Are there any papers written about Tree Notation?
        +
        + You can read the half-baked [papers about Tree Notation](https://github.com/treenotation/jtree/tree/master/papers).
        +
        + 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*.
        +
        + #### Which language influenced Tree Notation the most?
        +
        + 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.
        +
        + #### Who is the first person to discover Tree Notation?
        +
        + We 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.
        +
        + #### Why didn't I-Expressions catch on?
        +
        + Not sure. We think it's because perhaps 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.
        +
        + #### How was Tree Notation discovered?
        +
        + Below is a transcript of Breck telling the origin story. This is taken from the upcoming E! True Hollywood Story 'Tree Notation: the Drugs, Sex, and Fights in the days before it had 84 stars.`
        +
        + "The year was 2012. Barack Hussein Obama was president, Prettier hadn't been released yet, and humans talked to other humans more than Alexa.
        +
        + Our startup NudgePad was building a visual web page editor in our office in San Francisco, which was located in the backroom of a warehouse that built wooden pianos by hand. In comparison to Nudge Inc., the wooden piano business was *booming*.
        +
        + With NudgePad, users could drag, drop and edit their web pages without touching any code. It worked awesome, at least 1 percent of the time. As the user was editing their pages visually, we coded NudgePad to read and write the language HAML, which I had learned at my previous job at Lab Zero.
        +
        + I ended up needing to write my own HAML parser and code generator for reasons long since forgotten. Because we were a broke startup, I kept trying to cut syntax from the language to save time and money. This also saved me from talking to users, a key strategy behind any great business (\s).
        +
        + Every now and then I would remove some syntax character from our HAML clone and still somehow get everything in NudgePad to work. Eventually the language was just spaces, newlines, and colons.
        +
        + And then there was an "aha!" moment. I remember I was walking to work, going over the code in my head, and had just reached the 101 overpass when I realized I could dump the colons! I went straight to my desk, opened up my editor, and a couple hours later had removed the colons and everything still worked. I remember at the time thinking that was potentially a profound idea but I *was positive* someone had built it already. I thought there was no chance it hadn't been invented yet because it was so simple. By Kevin's Law, It had probably appeared on Shark Tank before.
        +
        + But for years I'd ping folks in industry, post on message boards, and do a lot of Google searches. It took me years of searching for it before I thought maybe no had noticed and leveraged this idea before.
        +
        + 5 years later I had another "aha" moment when I realized it would also be a good base notation for *any* type of computer language, and wrote a paper about it. Which went on to be cited over (editor's note: it says "zero" here, is that correct?) times.
        +
        + It was over 7 years before the first "aha" moment that Tree Notation started to get good."
        +
        + ## Other
        +
        + #### Did you know that if you think this could grow to rival the web you are an idiot?
        +
        + Thank you for reminding us the web was not built in a day!
        Breck Yunits
        Breck Yunits
        5 years ago
        Create CNAME
        CNAME
        Changed around line 1
        + faq.treenotation.org
        Breck Yunits
        Breck Yunits
        5 years ago
        Initial commit
        README.md
        Changed around line 1
        + # faq.treenotation.org
        + Tree Notation FAQ