File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Tangle Playground
2+
3+ A local PWA playground for the Tangle topological programming language.
4+
5+ ## Status
6+
7+ ** Scaffold.** The directory structure is in place. The interactive playground
8+ itself is not yet built.
9+
10+ ## Intended architecture (pattern mirrors sibling language playgrounds)
11+
12+ - ** Compiler backend:** ` compiler/tangle-wasm/ ` compiled to WASM
13+ - ** Runtime:** Deno or Bun serving the PWA shell + static assets
14+ - ** UI:** ReScript + React SPA with Monaco editor
15+ - ** Execution modes:**
16+ - ` parse ` — show AST
17+ - ` typecheck ` — show type errors + inferred types
18+ - ` compile ` — PlanarDiagram / TangleIR output
19+ - ` eval ` — step-through evaluator (PanLL timeline if available)
20+ - ** Share-by-URL:** URL-encoded source for sharing snippets
21+ - ** Examples:** ` playground/examples/ ` — starter programs
22+
23+ ## Directory layout
24+
25+ ```
26+ playground/
27+ ├── README.md (this file)
28+ ├── public/ (static assets; PWA shell goes here when built)
29+ └── examples/ (starter .tangle programs)
30+ ```
31+
32+ ## Next steps to build this out
33+
34+ 1 . Write a minimal Deno server that serves ` public/ ` + a ` /run ` endpoint
35+ 2 . Build tangle-wasm to WASM with ` wasm-pack ` or similar
36+ 3 . Add Monaco editor with Tangle syntax highlighting
37+ 4 . Add execution-mode tabs
38+ 5 . Add example loader wiring up ` playground/examples/ `
39+
40+ See sibling playgrounds for patterns:
41+ - ` /var/mnt/eclipse/repos/nextgen-languages/eclexia/playground/ `
42+ - ` /var/mnt/eclipse/repos/nextgen-languages/betlang/playground/ `
Original file line number Diff line number Diff line change 1+ -- SPDX-License-Identifier: PMPL-1.0-or-later
2+ -- Example: figure-eight knot — alternating crossings on two strands
3+
4+ let fig8 = sigma_1 ; sigma_2_inv ; sigma_1 ; sigma_2_inv
Original file line number Diff line number Diff line change 1+ -- SPDX-License-Identifier: PMPL-1.0-or-later
2+ -- Example: trefoil knot as three positive crossings in sequence
3+
4+ let trefoil = sigma_1 ; sigma_1 ; sigma_1
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6+ < title > Tangle Playground (placeholder)</ title >
7+ < style >
8+ body { font-family : system-ui, sans-serif; padding : 32px ; max-width : 640px ; margin : auto; }
9+ code { background : # f0f0f0 ; padding : 2px 6px ; border-radius : 3px ; }
10+ </ style >
11+ </ head >
12+ < body >
13+ < h1 > Tangle Playground</ h1 >
14+ < p > This is a placeholder. The interactive playground is not yet built.</ p >
15+ < p > See < code > playground/README.md</ code > for the intended architecture and
16+ next steps.</ p >
17+ < p > In the meantime, explore example programs in
18+ < code > playground/examples/</ code > or the Tangle compiler at
19+ < code > compiler/</ code > .</ p >
20+ </ body >
21+ </ html >
You can’t perform that action at this time.
0 commit comments