|
| 1 | +# Tangle Dialects — hosted DSL scaffolds |
| 2 | + |
| 3 | +Tangle is a Turing-complete topological programming language. It is NOT |
| 4 | +a DSL host by accident — it was designed to support compositional |
| 5 | +calculi grounded in knot theory, category theory, and related algebraic |
| 6 | +structures. |
| 7 | + |
| 8 | +This directory holds *scaffolds* for DSLs that could be hosted on Tangle. |
| 9 | +Each scaffold is an EBNF grammar sketch — evidence that the idea is |
| 10 | +coherent and could be built out, not a complete implementation. |
| 11 | + |
| 12 | +## The pattern |
| 13 | + |
| 14 | +When a DSL matures from sketch → alpha implementation, it should follow |
| 15 | +the KRL precedent: |
| 16 | + |
| 17 | +1. Start with an EBNF grammar sketch here (`grammar-sketch.ebnf`) |
| 18 | +2. Write 1-3 example programs |
| 19 | +3. When ready to implement: graduate to its own top-level repo (like `krl/`) |
| 20 | +4. Implement parser in Tangle OCaml or sibling language |
| 21 | +5. Wire through to TangleIR or its own IR type |
| 22 | + |
| 23 | +Keeping sketches here demonstrates Tangle's claim to be a general |
| 24 | +multi-DSL host, not a single-purpose language. |
| 25 | + |
| 26 | +## Current scaffolds |
| 27 | + |
| 28 | +| Dialect | Status | Domain | |
| 29 | +|---|---|---| |
| 30 | +| [krl](../../krl/) (separate repo) | grade E | Knot resolution — construct, transform, resolve, retrieve | |
| 31 | +| [braid-calculus](braid-calculus/) | sketch | Artin braid group Bn calculus | |
| 32 | +| [quantum-circuit](quantum-circuit/) | sketch | Quantum circuit compositional calculus | |
| 33 | +| [string-diagram](string-diagram/) | sketch | Monoidal/braided category string diagrams | |
| 34 | + |
| 35 | +## Relationship to KRL |
| 36 | + |
| 37 | +KRL lives at `/var/mnt/eclipse/repos/krl` (sibling top-level repo), NOT |
| 38 | +here. This is intentional: KRL has graduated past the scaffold stage and |
| 39 | +earned its own repo. These scaffolds represent future candidates that |
| 40 | +may graduate similarly. |
| 41 | + |
| 42 | +## Contribution |
| 43 | + |
| 44 | +To propose a new DSL scaffold: |
| 45 | + |
| 46 | +1. Create `dialects/<name>/` with at minimum `grammar-sketch.ebnf` |
| 47 | +2. Write `dialects/<name>/README.md` explaining the domain + 1-2 example programs |
| 48 | +3. Link from this README |
| 49 | +4. Keep it to a sketch — no implementation yet |
0 commit comments