update docs
This commit is contained in:
parent
a25bb5d1ca
commit
f937a3454d
2 changed files with 54 additions and 26 deletions
63
README.org
63
README.org
|
|
@ -49,7 +49,7 @@ Grimu-R is an *open ecosystem* and a framework for mixed visual-textual *dataflo
|
||||||
It consists primarily of the following components:
|
It consists primarily of the following components:
|
||||||
- Execution model allowing computations to be expressed as *reactive graphs*
|
- Execution model allowing computations to be expressed as *reactive graphs*
|
||||||
- *Polyglot scripting* runtime environment
|
- *Polyglot scripting* runtime environment
|
||||||
- Live web-based *visual-textual* editor
|
- Interactive web-based *visual-textual* editor
|
||||||
#+TOC: headlines 2
|
#+TOC: headlines 2
|
||||||
* Table of Contents :TOC_2_gh:noexport:
|
* Table of Contents :TOC_2_gh:noexport:
|
||||||
- [[#inspiration][Inspiration]]
|
- [[#inspiration][Inspiration]]
|
||||||
|
|
@ -78,10 +78,10 @@ It consists primarily of the following components:
|
||||||
- [[#features][Features]]
|
- [[#features][Features]]
|
||||||
- [[#faq][FAQ]]
|
- [[#faq][FAQ]]
|
||||||
- [[#is-this-a-yet-another-web-framework][Is this a yet another web framework?]]
|
- [[#is-this-a-yet-another-web-framework][Is this a yet another web framework?]]
|
||||||
- [[#a-user-can-execute-arbitrary-code-on-my-backend-really][A user can execute arbitrary code on my backend? Really?]]
|
- [[#how-does-malleability-work-in-client-server-applications][How does malleability work in client-server applications?]]
|
||||||
- [[#can-i-opt-out-of-nix][Can I opt out of Nix?]]
|
- [[#can-i-opt-out-of-nix][Can I opt out of Nix?]]
|
||||||
- [[#how-do-i-test-my-weave][How do I test my weave?]]
|
- [[#how-do-i-test-my-weave][How do I test my weave?]]
|
||||||
- [[#can-i-intergate-ai-models][Can I intergate AI models?]]
|
- [[#can-i-integrate-ai-models][Can I integrate AI models?]]
|
||||||
|
|
||||||
* Inspiration
|
* Inspiration
|
||||||
- [[https://github.com/enso-org/enso][Enso]]
|
- [[https://github.com/enso-org/enso][Enso]]
|
||||||
|
|
@ -105,6 +105,10 @@ a CLI tool, an RPC server, or a web application, to be distributed as such or in
|
||||||
|
|
||||||
Powered by Nix, Grimu-R projects require minimal effort to build, run, or depend on.
|
Powered by Nix, Grimu-R projects require minimal effort to build, run, or depend on.
|
||||||
|
|
||||||
|
For interactive use with scripts, the default mode is runtime dependencies.
|
||||||
|
|
||||||
|
For builds, it is recommended to have dependencies defined statically and provisioned by Nix.
|
||||||
|
|
||||||
** Reactivity taken seriously
|
** Reactivity taken seriously
|
||||||
|
|
||||||
Push or pull? Throttle, debounce, batch?
|
Push or pull? Throttle, debounce, batch?
|
||||||
|
|
@ -133,9 +137,8 @@ No code to low code to high code.
|
||||||
Some things Grimu-R itself will not take care of, delegating them to the surrounding environment:
|
Some things Grimu-R itself will not take care of, delegating them to the surrounding environment:
|
||||||
|
|
||||||
- Resumable/durable execution
|
- Resumable/durable execution
|
||||||
- Distributed computing (outside of client-server)
|
- Distributed deployment orchestration
|
||||||
- Collaborative editing
|
- Collaborative editing
|
||||||
- Untrusted code sandboxing
|
|
||||||
- Authentication and access control
|
- Authentication and access control
|
||||||
- Telemetry
|
- Telemetry
|
||||||
* Use cases
|
* Use cases
|
||||||
|
|
@ -196,7 +199,7 @@ directly in the visual editor, enabling live code changes without rebuilding the
|
||||||
* How it works
|
* How it works
|
||||||
** Development environment
|
** Development environment
|
||||||
|
|
||||||
Grimu-R projects being Nix flakes, the development tooling ("loom") is provisioned as a Nix shell.
|
Grimu-R projects being Nix flakes, the development tooling ("loom") is provisioned in a Nix shell.
|
||||||
|
|
||||||
It gives you the visual editor, the companion CLI tool and the execution context for spells.
|
It gives you the visual editor, the companion CLI tool and the execution context for spells.
|
||||||
|
|
||||||
|
|
@ -205,7 +208,7 @@ It gives you the visual editor, the companion CLI tool and the execution context
|
||||||
- The visual editor is served by a development or application server.
|
- The visual editor is served by a development or application server.
|
||||||
- Changes and execution requests for server-side spells are sent over a bidirectional WebSocket connection.
|
- Changes and execution requests for server-side spells are sent over a bidirectional WebSocket connection.
|
||||||
- User modifications are stored locally in the browser's storage, exportable as a file.
|
- User modifications are stored locally in the browser's storage, exportable as a file.
|
||||||
- Weaves are tracked by usual VSC tools.
|
- Weaves are tracked by usual VCS tools.
|
||||||
|
|
||||||
** Cross-language connections
|
** Cross-language connections
|
||||||
|
|
||||||
|
|
@ -213,10 +216,14 @@ Think Unix pipes but with structured data formats like JSON lines instead of pla
|
||||||
|
|
||||||
** Execution environment
|
** Execution environment
|
||||||
|
|
||||||
Scrolls used in a weave have their requirements defined in Nix terms.
|
Purpose-specific scrolls used in a weave have their requirements defined in Nix terms.
|
||||||
|
|
||||||
For example, if several scrolls need Node.js, they can all refer to the same nodejs Nix package defined in the flake.
|
For example, if several scrolls need Deno, they can all refer to the same deno Nix package defined in the flake and declare their Deno dependencies normally.
|
||||||
All of that, and optionally the visual editor, is bundled into a target build ("edition").
|
|
||||||
|
A single copy of Deno runtime and a shared Deno cache would be bundled in an edition.
|
||||||
|
|
||||||
|
However, the general-purpose Deno scroll executing arbitrary TypeScript inscriptions
|
||||||
|
would have Deno fetch dependencies during runtime.
|
||||||
|
|
||||||
* Features
|
* Features
|
||||||
| | On the roadmap | Ideas |
|
| | On the roadmap | Ideas |
|
||||||
|
|
@ -238,16 +245,13 @@ One framework called [[https://cycle.js.org/][Cycle.js]] defines a web applicati
|
||||||
Grimu-R can do a similar thing if you want it to.
|
Grimu-R can do a similar thing if you want it to.
|
||||||
Or you could use any framework you like with the dataflow stuff being incidental.
|
Or you could use any framework you like with the dataflow stuff being incidental.
|
||||||
|
|
||||||
** A user can execute arbitrary code on my backend? Really?
|
** How does malleability work in client-server applications?
|
||||||
|
|
||||||
By default, any client-server Grimu-R build ("edition") would allow users to see
|
Unlike standalone editions executing entirely on the end user's machine,
|
||||||
and edit client-side parts of the weave only.
|
client-server editions split the weave between runtime components.
|
||||||
|
|
||||||
This is but superficially different from users messing around in their
|
Only the client-side part of the weave can be inspected and edited by
|
||||||
browser's console or employing a browser extension.
|
the end user.
|
||||||
|
|
||||||
On the other hand, if the server-side parts run in a trusted environment with authorized access,
|
|
||||||
you could give users a more generous degree of control.
|
|
||||||
|
|
||||||
** Can I opt out of Nix?
|
** Can I opt out of Nix?
|
||||||
|
|
||||||
|
|
@ -257,6 +261,8 @@ While Grimu-R is built on top of Nix and wouldn't make a lot of sense otherwise,
|
||||||
you always have the option to access out-of-store files from your spells' inscriptions,
|
you always have the option to access out-of-store files from your spells' inscriptions,
|
||||||
at the cost of reproducibility.
|
at the cost of reproducibility.
|
||||||
|
|
||||||
|
So you could use e. g. runtime JS imports or call some executable on PATH from a shell script.
|
||||||
|
|
||||||
** How do I test my weave?
|
** How do I test my weave?
|
||||||
|
|
||||||
If you do it manually: right in the visual editor.
|
If you do it manually: right in the visual editor.
|
||||||
|
|
@ -265,10 +271,23 @@ Add spells with a constant output as test data sources and stitch them to the sp
|
||||||
If you need automation: build an edition and call the ornaments programmatically.
|
If you need automation: build an edition and call the ornaments programmatically.
|
||||||
If you already have test data stored in the weave, you can extract it by the spell's id using loom CLI or library.
|
If you already have test data stored in the weave, you can extract it by the spell's id using loom CLI or library.
|
||||||
|
|
||||||
** Can I intergate AI models?
|
** Can I integrate AI models?
|
||||||
|
|
||||||
If you want something like [[https://computer.tldraw.com/][tldraw computer]], Grimu-R would accomodate that and beyond,
|
There are three integration scenarios which would make sense:
|
||||||
potentially supporting fancier features like tool use and MCP servers.
|
|
||||||
|
|
||||||
However, until someone contributes scrolls tailored for the purpose, Grimu-R would offer worse ergonomics.
|
1. AI spells in the weave:
|
||||||
|
|
||||||
|
Spells calling inference APIs, equipped with MCP spells and
|
||||||
|
template spells for prompt composition
|
||||||
|
|
||||||
|
2. AI weaving copilot:
|
||||||
|
|
||||||
|
Loom providing AI tools to edit the weave
|
||||||
|
|
||||||
|
3. MCP server editions:
|
||||||
|
|
||||||
|
Ornaments exposed as tools for external AI systems
|
||||||
|
|
||||||
|
#1 is easy to do even with no out-of-the-box support.
|
||||||
|
|
||||||
|
#2 and #3 would require some work on development tooling.
|
||||||
|
|
|
||||||
|
|
@ -18,27 +18,36 @@ body {
|
||||||
|
|
||||||
** Weave
|
** Weave
|
||||||
Defines a collection of ornaments.
|
Defines a collection of ornaments.
|
||||||
Can assign one weave as default.
|
|
||||||
** Ornament
|
** Ornament
|
||||||
Has reactive inputs and outputs.
|
Has reactive inputs and outputs.
|
||||||
Serves as an externally invocable entry point.
|
Serves as an externally invocable entry point.
|
||||||
Contains spells or nested ornaments.
|
Contains spells or nested ornaments.
|
||||||
|
Can be distributed within a grimoire or a servitor.
|
||||||
** Spell
|
** Spell
|
||||||
Has reactive inputs and outputs.
|
Has reactive inputs and outputs.
|
||||||
Atomic execution unit.
|
Atomic execution unit.
|
||||||
Cannot be directly invoked externally.
|
Cannot be directly invoked externally.
|
||||||
May have an inscription.
|
May have an inscription.
|
||||||
Created from a scroll and executed in its runtime environment.
|
Created from a scroll and executed in the shelf environment.
|
||||||
** Stitch
|
** Stitch
|
||||||
Connects a reactive input to a compatible reactive output.
|
Connects a reactive input to a compatible reactive output.
|
||||||
** Inscription
|
** Inscription
|
||||||
Defines code in a scripting language to be ran when the corresponding spell is executed.
|
Defines code in a scripting language to be run when the corresponding spell is executed.
|
||||||
|
May be defined statically in the weave or considered a reactive input.
|
||||||
** Scroll
|
** Scroll
|
||||||
Defines source code, its build dependencies and runtime environment.
|
Defines source code, its build dependencies and runtime environment.
|
||||||
Provides a default spell configuration.
|
Provides a default spell configuration.
|
||||||
|
Declares runtime compatibility (browser-only, non-browser, or universal).
|
||||||
** Shelf
|
** Shelf
|
||||||
Contains all the scrolls defined in a project as well as its dependencies.
|
Contains all the scrolls defined in a project as well as its dependencies.
|
||||||
|
Provisions a shared runtime environment for spells based on these scrolls.
|
||||||
** Edition
|
** Edition
|
||||||
Represents a weave as a compiled program.
|
Represents (a part of) the weave as a grimoire, a servitor, or a consistent collection of these.
|
||||||
|
** Grimoire
|
||||||
|
Presents a set of ornaments as a program with human-facing interface.
|
||||||
|
Uses bridge spells to communicate with servitor-side ornaments within the same edition.
|
||||||
|
Has a dedicated interface ornament (entry point).
|
||||||
|
** Servitor
|
||||||
|
Presents a set of ornaments as a local/remote daemon/server endpoints/methods.
|
||||||
** Loom
|
** Loom
|
||||||
Provisions tools for interactive or programmatic weaving.
|
Provisions tools for interactive or programmatic weaving.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue