yairchu/awesome-structure-editors

BABLR: an unreleased project

Opened this issue · 5 comments

https://github.com/bablr-lang/

On particular axes it is:

  • Intended for programmers
  • Runs natively in a web browser (it's written in JS)
  • Will be donation-driven
  • Will eventually support ALL programming languages
  • Will eventually support voice programming through Cursorless

Oh it's also headless, so it will be able to support many UI experiences built on top.

This looks very exciting! Anywhere I can read more about the VM/language design for performing operations on the code-DOM?

Still trying to figure out basic things (like what's the difference between bablr-vm and agast-vm), but from naive first look at evaluate.jss it seems kind of concatenative?

I've done research on modeling/designing UI as a Turing-complete concatenative action language and seeing "VM" in the context of edit operations struck a chord. Would also love to have a chat if you're interested.

Yes, it's all based on stream processing -- in other words the computations are time-ordered not space-ordered.

The distinction is that agAST is a language-agnostic format akin to XML. It has some very basic rules about document structure, and agast-vm ensures that those very basic rules cannot be broken.

BABLR is the language-aware layer (like ANTLR), and you can think of it more like XML schema validation. Within it the rules of the specified language cannot be broken.

The insight was that HTML works the same way: it doesn't tell you exactly what data structure to use to store your DOM in (which is crucial for interoperability), but instead it defines trees by their traversal: HTML is basically a sequence of instructions for how to traverse a specific tree, which is a sufficiently powerful representation to do query engine execution, deserialization, equality checking, and streaming transformation.

The most basic of the bablr-vm invariants is that printSource(parse(someLanguage, sourceText)) === sourceText, and just knowing that to be true is a big win for being able to build a language-agnostic semantic editor. Notice that printSource does not even care what language the document is in.