Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BABLR: an unreleased project #31

Open
conartist6 opened this issue Mar 5, 2024 · 5 comments
Open

BABLR: an unreleased project #31

conartist6 opened this issue Mar 5, 2024 · 5 comments

Comments

@conartist6
Copy link

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
@conartist6
Copy link
Author

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

@agentofuser
Copy link

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.

@conartist6
Copy link
Author

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.

@conartist6
Copy link
Author

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.

@conartist6
Copy link
Author

conartist6 commented Mar 5, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants