This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Spike: enforce ctor-kind consistency at the Plugin type level. | |
| * | |
| * ExtractKinds<T> recursively walks a type tree and collects all CExpr | |
| * kind strings — through functions, builder chains, nested objects, | |
| * closure returns, and callback parameter types. | |
| * | |
| * StrictPlugin uses this to reject plugins where ctors produce CExpr | |
| * nodes with kinds not declared in the `kinds` map. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { fromTypedAdj, type Desc, type Expr, type NodeEntry, type RuntimeNode } from "./spike-ur-core"; | |
| export interface DagBridge { | |
| expr: Expr<unknown, Desc<unknown, string, Record<string, NodeEntry<string, string[], unknown>>, string, true>>; | |
| } | |
| function nextIdRuntime(s: string): string { | |
| const chars = s.split(""); | |
| for (let i = chars.length - 1; i >= 0; i--) { | |
| if (chars[i] !== "z") { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ============================================================ | |
| // Spike: Bidirectional graph + type-level gc via parent chains | |
| // ============================================================ | |
| // | |
| // Hypothesis: storing reverse adj (child → parents) enables gc | |
| // without forward graph traversal. Each orphan check walks UP | |
| // the parent chain to root — bounded by tree DEPTH, not node COUNT. | |
| // ============================================================ | |
| // ============================================================ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Spike: end-to-end phantom kind propagation with branded Interpreter. | |
| * Validates the approach described in #233 on a small scale. | |
| * | |
| * Run: npx tsc --noEmit (uses tsconfig.json) | |
| */ | |
| // ============================================================ | |
| // Typed node interfaces | |
| // ============================================================ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ============================================================= | |
| // ASYNC SPIKE: typed async generators + trampoline + | |
| // WeakMap memoization + taint tracking | |
| // ============================================================= | |
| // --- Foundation types ---------------------------------------- | |
| interface Expr<T> { | |
| readonly kind: string; | |
| readonly __T?: T; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| < | |
| [psr:3 bd [notes:2,hh*2] [notes:3,chin*4]] | |
| [bd bd [notes:4,hh*2] [notes:5,chin*4]] | |
| [psr:3 bd [notes:6,hh*2] [notes:7,chin*4]] | |
| [bd bd [notes:8,hh*2] [notes:9,chin*4]] | |
| [[psr:3 psr:3] bd [notes:2,hh*2] [notes:3,chin*4]] | |
| [bd bd [notes:8,hh*2] [notes:9,chin*4]] | |
| [psr:3 bd [notes:9,hh*2] [notes:8,chin*4]] | |
| [bd bd [notes:10,hh*2] [notes:6,chin*4]] | |
| [psr:3 bd [notes:9,hh*2] [notes:7,chin*4]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main where | |
| import Prelude | |
| import Effect (Effect) | |
| import WAGS.Lib.Learn (play) | |
| import WAGS.Lib.Tidal (AFuture, tdl) | |
| import Prelude | |
| import Data.Array ((..)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main where | |
| import Prelude | |
| import Effect (Effect) | |
| import WAGS.Lib.Learn (play) | |
| import WAGS.Lib.Tidal (AFuture, tdl) | |
| import Data.Lens (_Just, set, traversed) | |
| import Data.Profunctor (lcmap) | |
| import WAGS.Math (calcSlope) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main where | |
| import Prelude | |
| import Data.Lens (_Just, set, traversed) | |
| import Data.Newtype (unwrap) | |
| import Data.Profunctor (lcmap) | |
| import Effect (Effect) | |
| import Math ((%)) | |
| import WAGS.Create.Optionals (highpass, pan) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main where | |
| import Prelude | |
| import Data.Maybe (Maybe, maybe) | |
| import Data.Traversable (traverse) | |
| import Debug (spy) | |
| import Effect (Effect) | |
| import Effect.Exception (throw) | |
| import Web.DOM.Element (getAttribute, toNode) |
NewerOlder