3 ms·
> What is making Scrolldown more 2d than markdown? Is it just the extendibility? You hit the nail on the head. The extendibility is the key thing. In Scrolldow
by breck 5y ago
> What is making Scrolldown more 2d than markdown? Is it just the extendibility?
You hit the nail on the head. The extendibility is the key thing. In Scrolldown every little piece of content is in its own little scope. It's like every block is it's own little file written in one of many different grammars. These all compose effortlessly. This is the early days, but I expect there to be thousands of little "micro-grammars" for use by people using Scroll. For example, you might have a microgrammar for making flow charts, or making interactive observablehq/worrydream/jupyter like documents, or quick sims, or blueprints, or audio content, or slide shows. It's sort of like web components done right.
> I also noticed your example grammar often contains a lot of js code.
The idea with Grammar is to keep refining the language and hoisting as many patterns into pure 2D/Tree languages as possible. But I have to use resources judiciously, and strike a balance between research and deliverables. Folks have started Tree Notation implementations in languages like Kotlin and Swift, and when/if there turns out to be a need to have something like a Kotlin Grammar interpreter, then at the time it would make sense to iterate on Grammar so the `javascript` blocks are instead a DSL. You can see that is a bit in progress with the `compiler` nodes; but have gone with the hacky `javascript` bits in many places just for pragmatic reasons.
> So it's not intended as different language but as data model with built in JavaScript? Kinda like a more modern XSLT?
Grammar started out as a POC but evolved into something pretty practical. Sort of an ANTLR for 2D languages. But sometimes I still just hard code the parser/compiler for a language from scratch. They are generally pretty simple.