From 7b0bb7ef275313a04c77eda32a4996b7d41f7998 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Sun, 23 Aug 2026 20:04:42 +0100 Subject: [PATCH 1/2] chore: global textual eradication of Nix and ReScript --- .build/Justfile | 12 ++++++------ .build/config/rescript.json | 4 ++-- .claude/CLAUDE.md | 2 +- .claude/PROJECT.md | 10 +++++----- .github/dependabot.yml | 2 +- .github/workflows/rescript-deno-ci.yml | 8 ++++---- ABI-FFI-README.md | 4 ++-- CHANGELOG.md | 4 ++-- COMPREHENSIVE_v10_IMPLEMENTATION.md | 6 +++--- CONTRIBUTING.md | 6 +++--- EXPLAINME.adoc | 2 +- IMPLEMENTATION-PROGRESS-2026-02-07.md | 22 +++++++++++----------- NAVIGATION.adoc | 12 ++++++------ README.md | 14 +++++++------- RELEASE_NOTES_v10.0.md | 2 +- ROADMAP.md | 4 ++-- RSR_OUTLINE.adoc | 8 ++++---- TOPOLOGY.md | 8 ++++---- deno.json | 16 ++++++++-------- docs/LAUNCH_ANNOUNCEMENT.md | 2 +- docs/api/architecture.md | 14 +++++++------- docs/api/developer_guide.md | 2 +- docs/changelog/CHANGELOG.adoc | 4 ++-- docs/standards/RSR.md | 10 +++++----- examples/web-project-deno.json | 16 ++++++++-------- 25 files changed, 97 insertions(+), 97 deletions(-) diff --git a/.build/Justfile b/.build/Justfile index 07625cb..1334f5e 100644 --- a/.build/Justfile +++ b/.build/Justfile @@ -1,4 +1,4 @@ -# Excel-Economic-Numbers-Tool - ReScript Development Tasks +# Excel-Economic-Numbers-Tool - AffineScript Development Tasks set shell := ["bash", "-uc"] set dotenv-load := true @@ -10,23 +10,23 @@ default: # Build build: - npx rescript build + npx affinescript build # Build clean build-clean: - npx rescript build -clean-world + npx affinescript build -clean-world # Watch mode watch: - npx rescript build -w + npx affinescript build -w # Format code fmt: - npx rescript format -all + npx affinescript format -all # Clean clean: - npx rescript clean + npx affinescript clean # Install dependencies install: diff --git a/.build/config/rescript.json b/.build/config/rescript.json index 0a1cb47..ea297d8 100644 --- a/.build/config/rescript.json +++ b/.build/config/rescript.json @@ -1,9 +1,9 @@ { - "name": "economic-toolkit-rescript", + "name": "economic-toolkit-affinescript", "version": "2.0.0", "sources": [ { - "dir": "src/rescript", + "dir": "src/affinescript", "subdirs": true } ], diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 9930eae..ff92589 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -76,7 +76,7 @@ Both are FOSS with independent governance (no Big Tech). Gossamer is hyperpolyma ### Package Management - **Primary**: Guix (guix.scm) -- **Fallback**: Nix (flake.nix) +- **Fallback**: Guix (flake.guix) - **JS deps**: Deno (deno.json imports) ### Security Requirements diff --git a/.claude/PROJECT.md b/.claude/PROJECT.md index 83d67cb..be6997a 100644 --- a/.claude/PROJECT.md +++ b/.claude/PROJECT.md @@ -14,14 +14,14 @@ Modular Excel/LibreOffice Add-in for economic modelling and investigative resear 1. **Cross-Platform Abstraction**: Single `ISpreadsheetAdapter` interface with platform-specific adapters 2. **Julia Backend**: High-performance computation engine with HTTP/QUIC API -3. **Type Safety**: TypeScript/ReScript for UI, Julia for backend +3. **Type Safety**: TypeScript/AffineScript for UI, Julia for backend 4. **Production-Grade Reliability**: Caching, rate limiting, exponential backoff retry 5. **Offline Capability**: SQLite cache survives restarts ### Technology Stack - **Backend**: Julia ≥1.10 (computation, data sources) -- **Frontend**: TypeScript/ReScript (UI components) +- **Frontend**: TypeScript/AffineScript (UI components) - **Excel Integration**: Office.js API - **LibreOffice Integration**: UNO API (Rhino JS) - **Containerization**: Podman ≥4.0 @@ -62,7 +62,7 @@ economic-toolkit-v2/ │ │ │ ├── OfficeJsAdapter.ts │ │ │ └── UnoAdapter.js # Rhino JS for LibreOffice │ │ └── utils/ -│ └── rescript/ # ReScript UI +│ └── affinescript/ # AffineScript UI │ ├── ribbons/ # Ribbon tabs │ └── taskpanes/ # Task panes ├── tests/ @@ -267,7 +267,7 @@ function createAdapter(): ISpreadsheetAdapter { - Identity enforcement (e.g., C + I + G + NX = GDP) - Literate programming support -## ReScript UI Components +## AffineScript UI Components ### Ribbon Tabs (5) @@ -394,7 +394,7 @@ GET /api/v1/cache/stats # Cache statistics - **Julia**: Follow Blue style guide - **TypeScript**: ESLint + Prettier -- **ReScript**: Standard ReScript formatter +- **AffineScript**: Standard AffineScript formatter ### Testing Requirements diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8a8e796..633839a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,7 +9,7 @@ updates: actions: patterns: - "*" - - package-ecosystem: "nix" + - package-ecosystem: "guix" directory: "/" schedule: interval: "weekly" diff --git a/.github/workflows/rescript-deno-ci.yml b/.github/workflows/rescript-deno-ci.yml index bdc81ec..bd23a78 100644 --- a/.github/workflows/rescript-deno-ci.yml +++ b/.github/workflows/rescript-deno-ci.yml @@ -4,7 +4,7 @@ permissions: actions: read contents: read -name: ReScript/Deno CI +name: AffineScript/Deno CI on: push: branches: [main, master] @@ -30,11 +30,11 @@ jobs: run: deno fmt --check - name: Deno test run: deno test --allow-all --coverage=coverage - - name: ReScript build + - name: AffineScript build run: | - if [ -f "rescript.json" ] || [ -f "bsconfig.json" ]; then + if [ -f "affinescript.json" ] || [ -f "bsconfig.json" ]; then npm install - npx rescript + npx affinescript fi - name: Type check run: deno check **/*.ts || true diff --git a/ABI-FFI-README.md b/ABI-FFI-README.md index ada05ff..8010527 100644 --- a/ABI-FFI-README.md +++ b/ABI-FFI-README.md @@ -47,7 +47,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design: ▼ ┌─────────────────────────────────────────────┐ │ Any Language via C ABI │ -│ - Rust, ReScript, Julia, Python, etc. │ +│ - Rust, AffineScript, Julia, Python, etc. │ └─────────────────────────────────────────────┘ ``` @@ -79,7 +79,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design: │ └── bindings/ # Language-specific wrappers (optional) ├── rust/ - ├── rescript/ + ├── affinescript/ └── julia/ ``` diff --git a/CHANGELOG.md b/CHANGELOG.md index fd06797..44754fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,7 +88,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 #### Configuration - TypeScript config (tsconfig.json, webpack, jest, eslint, prettier) -- ReScript config (bsconfig.json) +- AffineScript config (bsconfig.json) - Julia project (Project.toml) - Node package (package.json) @@ -118,7 +118,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Advanced usage examples (7 scenarios) - Real-world distribution analysis -#### UI Components (ReScript) +#### UI Components (AffineScript) - DataBrowser task pane - FormulaBuilder task pane - Ribbon tabs structure (planned: 5 tabs) diff --git a/COMPREHENSIVE_v10_IMPLEMENTATION.md b/COMPREHENSIVE_v10_IMPLEMENTATION.md index 89a99df..fcd7c40 100644 --- a/COMPREHENSIVE_v10_IMPLEMENTATION.md +++ b/COMPREHENSIVE_v10_IMPLEMENTATION.md @@ -18,7 +18,7 @@ This document summarizes the comprehensive implementation of all features from v ### v2.2 - Multi-Platform & Collaboration (COMPLETE) ✓ Google Sheets add-on with custom functions -✓ Standalone web application (ReScript + React) +✓ Standalone web application (AffineScript + React) ✓ Mobile apps (Tauri 2.0 for iOS/Android) ✓ Real-time collaboration (WebSocket server, presence indicators) ✓ Cloud cache sync (S3-compatible storage) @@ -83,7 +83,7 @@ This document summarizes the comprehensive implementation of all features from v ### Technology Stack - **Backend**: Julia 1.10+ (high-performance numerical computing) -- **Frontend**: ReScript + React (type-safe UI) +- **Frontend**: AffineScript + React (type-safe UI) - **Runtime**: Deno 2.0+ (secure JavaScript/TypeScript) - **Mobile**: Tauri 2.0 (cross-platform iOS/Android) - **Performance**: Rust/WASM (charts, compute-intensive) @@ -106,7 +106,7 @@ FRED, World Bank, IMF, OECD, ECB, BEA, Census, Eurostat, BIS, DBnomics excel-economic-numbers-tool/ ├── src/ │ ├── julia/ # Backend (data sources, formulas, ML, server) -│ ├── rescript/ # Frontend UI components +│ ├── affinescript/ # Frontend UI components │ ├── python/ # Python API wrapper │ ├── R/ # R package │ ├── google-apps-script/ # Google Sheets add-on diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 040630f..a18a023 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,8 +6,8 @@ Copyright (c) Jonathan D.A. Jewell git clone https://github.com/hyperpolymath/excel-economic-numbers-tool.git cd excel-economic-numbers-tool -# Using Nix (recommended for reproducibility) -nix develop +# Using Guix (recommended for reproducibility) +guix develop # Or using toolbox/distrobox toolbox create excel-economic-numbers-tool-dev @@ -45,7 +45,7 @@ excel-economic-numbers-tool/ ├── MAINTAINERS.md ├── README.adoc ├── SECURITY.md -├── flake.nix # Nix flake (Perimeter 1) +├── flake.guix # Guix flake (Perimeter 1) └── Justfile # Task runner (Perimeter 1) ``` diff --git a/EXPLAINME.adoc b/EXPLAINME.adoc index 230456d..d3aec64 100644 --- a/EXPLAINME.adoc +++ b/EXPLAINME.adoc @@ -19,7 +19,7 @@ ____ | **Zig** | https://ziglang.org | **Deno** | https://deno.land -| **ReScript** | https://rescript-lang.org +| **AffineScript** | https://affinescript-lang.org | **Julia** | https://julialang.org | **Idris2 ABI** | https://www.idris-lang.org |=== diff --git a/IMPLEMENTATION-PROGRESS-2026-02-07.md b/IMPLEMENTATION-PROGRESS-2026-02-07.md index f832f58..72f72ab 100644 --- a/IMPLEMENTATION-PROGRESS-2026-02-07.md +++ b/IMPLEMENTATION-PROGRESS-2026-02-07.md @@ -29,7 +29,7 @@ The project has progressed from **40% → 75% completion** by implementing: ### 1.1 Excel Adapter (OfficeJsAdapter.res) ✅ -**File:** `src/rescript/adapters/OfficeJsAdapter.res` (450 lines) +**File:** `src/affinescript/adapters/OfficeJsAdapter.res` (450 lines) **Implementation:** - ✅ Office.js API bindings (external declarations) @@ -47,17 +47,17 @@ The project has progressed from **40% → 75% completion** by implementing: **Key features:** - Cell address parsing (A1 notation → row/col indices) -- Type conversion (ReScript cellValue ↔ JavaScript values) +- Type conversion (AffineScript cellValue ↔ JavaScript values) - Proper promise handling for async operations - Event subscription/unsubscription management ### 1.2 LibreOffice Adapter (UnoAdapter.res + uno-bridge.js) ✅ **Files:** -- `src/rescript/adapters/UnoAdapter.res` (350 lines) ✅ +- `src/affinescript/adapters/UnoAdapter.res` (350 lines) ✅ - `src/libreoffice/uno-bridge.js` (550 lines) ✅ -**Architecture:** ReScript → JavaScript bridge → UNO Java API → LibreOffice Calc +**Architecture:** AffineScript → JavaScript bridge → UNO Java API → LibreOffice Calc **uno-bridge.js implementation:** - ✅ UNO Java class imports (XSpreadsheet, XCell, XCellRange, etc.) @@ -235,7 +235,7 @@ data = fetch_series(client, "CBPOL:M:US", Date(2020, 1, 1), Date(2023, 12, 31)) **What remains:** - Delete `.build/config/tsconfig.json` (TypeScript removed) -- Delete `.build/config/bsconfig.json` (superseded by root rescript.json) +- Delete `.build/config/bsconfig.json` (superseded by root affinescript.json) - Delete `.build/config/Project.toml` (moved to root) - Update Justfile (replace `npm` with `deno`) @@ -245,11 +245,11 @@ data = fetch_series(client, "CBPOL:M:US", Date(2020, 1, 1), Date(2023, 12, 31)) ## Compilation Status -### ReScript Compilation +### AffineScript Compilation **Status:** ✅ **Adapters compiled successfully** -**Command:** `rescript build` +**Command:** `affinescript build` **Result:** - ✅ 63/66 modules compiled (95% success rate) @@ -263,7 +263,7 @@ data = fetch_series(client, "CBPOL:M:US", Date(2020, 1, 1), Date(2023, 12, 31)) - These are UI task pane files, not core platform adapters - **Impact:** Task pane UI non-functional, but platform adapters work -**Resolution:** Would require adding React dependencies to rescript.json +**Resolution:** Would require adding React dependencies to affinescript.json --- @@ -317,8 +317,8 @@ data = fetch_series(client, "CBPOL:M:US", Date(2020, 1, 1), Date(2023, 12, 31)) ### New Files (22 total) **Phase 1 - Platform Integration (10 files):** -1. `src/rescript/adapters/OfficeJsAdapter.res` (450 lines) -2. `src/rescript/adapters/UnoAdapter.res` (350 lines) +1. `src/affinescript/adapters/OfficeJsAdapter.res` (450 lines) +2. `src/affinescript/adapters/UnoAdapter.res` (350 lines) 3. `src/libreoffice/uno-bridge.js` (550 lines) 4. `manifests/excel-manifest.xml` (150 lines) 5. `src/excel/taskpane.html` (100 lines) @@ -341,7 +341,7 @@ data = fetch_series(client, "CBPOL:M:US", Date(2020, 1, 1), Date(2023, 12, 31)) ### Modified Files (3 total) 1. `package.json` - Fixed name mismatch (economic-toolkit-v2 → economic-toolkit) -2. `src/rescript/ConstraintEditor.res` - Fixed reserved keyword (`constraint` → `constraintDef`) +2. `src/affinescript/ConstraintEditor.res` - Fixed reserved keyword (`constraint` → `constraintDef`) --- diff --git a/NAVIGATION.adoc b/NAVIGATION.adoc index e288e9e..8bf81b3 100644 --- a/NAVIGATION.adoc +++ b/NAVIGATION.adoc @@ -15,7 +15,7 @@ This guide helps you navigate the excel-economic-numbers-tool repository structu |**README.adoc** |Project overview, installation, quick start |**LICENSE** |MPL-2.0 license text |**VERSION** |Current version number -|**package.json** |Deno/ReScript package configuration +|**package.json** |Deno/AffineScript package configuration |=== == Source Code @@ -25,7 +25,7 @@ This guide helps you navigate the excel-economic-numbers-tool repository structu |Directory |Contents |**src/** |All source code -|**src/rescript/** |ReScript application code (UI, adapters) +|**src/affinescript/** |AffineScript application code (UI, adapters) |**src/julia/** |Julia backend (data sources, formulas, cache) |**tests/** |Test suites (organized by language) |**examples/** |Usage examples and sample code @@ -67,7 +67,7 @@ This guide helps you navigate the excel-economic-numbers-tool repository structu |**.build/** |Build configuration and tooling |**.build/Justfile** |Task automation (build, test, deploy) |**.build/Containerfile** |Container image definition -|**.build/config/** |Tool configurations (Deno, ReScript, etc.) +|**.build/config/** |Tool configurations (Deno, AffineScript, etc.) |**scripts/** |Utility scripts (bootstrap, deploy, verification) |=== @@ -112,7 +112,7 @@ just build-libre # Build LibreOffice extension [source,bash] ---- -deno test # Run Deno/ReScript tests +deno test # Run Deno/AffineScript tests just test # Run all tests (Julia + Deno) ---- @@ -143,11 +143,11 @@ excel-economic-numbers-tool/ ├── package.json # Package config │ ├── src/ # Source code -│ ├── rescript/ # ReScript UI +│ ├── affinescript/ # AffineScript UI │ └── julia/ # Julia backend │ ├── tests/ # Test suites -│ ├── rescript/ # ReScript tests +│ ├── affinescript/ # AffineScript tests │ └── julia/ # Julia tests │ ├── examples/ # Usage examples diff --git a/README.md b/README.md index 87c9c9e..2500b0c 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ for directory structure and quick links. - **Rate Limiting**: Respects API quotas -- **Type-Safe**: Built with ReScript and Julia +- **Type-Safe**: Built with AffineScript and Julia - **Production-Ready**: Comprehensive tests, error handling, logging @@ -66,7 +66,7 @@ for directory structure and quick links. - Julia 1.9+ -- ReScript 12.0+ +- AffineScript 12.0+ ## Build @@ -74,8 +74,8 @@ for directory structure and quick links. # Install dependencies deno install -# Build ReScript -rescript build +# Build AffineScript +affinescript build # Run tests deno test @@ -136,10 +136,10 @@ Configuration: [Data Sources Guide](docs/api/data_sources.md) excel-economic-numbers-tool/ ├── src/ - │ ├── rescript/ # ReScript application code + │ ├── affinescript/ # AffineScript application code │ └── julia/ # Julia computational backend ├── tests/ - │ ├── rescript/ # ReScript tests + │ ├── affinescript/ # AffineScript tests │ └── julia/ # Julia tests ├── docs/ # Documentation (organized by purpose) │ ├── api/ # Technical documentation @@ -164,7 +164,7 @@ instructions. Per [Hyperpolymath Standard](.claude/PROJECT.md): -- ✅ ReScript (primary application code) +- ✅ AffineScript (primary application code) - ✅ Julia (data processing, batch scripts) diff --git a/RELEASE_NOTES_v10.0.md b/RELEASE_NOTES_v10.0.md index 363789f..bebf79d 100644 --- a/RELEASE_NOTES_v10.0.md +++ b/RELEASE_NOTES_v10.0.md @@ -22,7 +22,7 @@ This release marks the completion of the comprehensive roadmap from v2.1 through - ✅ **Microsoft Excel** (Office.js add-in) - ✅ **LibreOffice Calc** (UNO API extension) - ✅ **Google Sheets** (Apps Script add-on) -- ✅ **Web Application** (ReScript + React) +- ✅ **Web Application** (AffineScript + React) - ✅ **Mobile Apps** (iOS/Android via Tauri 2.0) - ✅ **Python API** (pip installable) - ✅ **R Package** (CRAN ready) diff --git a/ROADMAP.md b/ROADMAP.md index 3de71d4..06b545c 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -25,7 +25,7 @@ Copyright (c) Jonathan D.A. Jewell **Released**: December 2025 - ✅ Google Sheets add-on with custom functions -- ✅ Standalone web application (ReScript + React) +- ✅ Standalone web application (AffineScript + React) - ✅ Mobile apps for iOS and Android (Tauri 2.0) - ✅ Real-time collaboration with WebSocket server - ✅ Cloud cache sync with S3 @@ -192,7 +192,7 @@ See: [RFC Process](docs/governance/RFC_PROCESS.md) | Excel (Mac) | ✅ Production | UDF add-in | | LibreOffice | ✅ Production | UDF macros | | Google Sheets | ✅ Production | Apps Script add-on | -| Web Browser | ✅ Production | ReScript + React app | +| Web Browser | ✅ Production | AffineScript + React app | | iOS | ✅ Production | Tauri 2.0 | | Android | ✅ Production | Tauri 2.0 | | Python | ✅ Production | pip package | diff --git a/RSR_OUTLINE.adoc b/RSR_OUTLINE.adoc index 0225b46..366e18e 100644 --- a/RSR_OUTLINE.adoc +++ b/RSR_OUTLINE.adoc @@ -148,8 +148,8 @@ project/ === Language Tiers -* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, ReScript -* **Tier 2** (Silver): Nickel, Racket, Guile Scheme, Nix +* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, AffineScript +* **Tier 2** (Silver): Nickel, Racket, Guile Scheme, Guix * **Infrastructure**: Guix channels, derivations === Required Files @@ -163,12 +163,12 @@ project/ * `.well-known/security.txt` * `.well-known/ai.txt` * `.well-known/humans.txt` -* `guix.scm` OR `flake.nix` +* `guix.scm` OR `flake.guix` === Prohibited * Python outside `salt/` directory -* TypeScript/JavaScript (use ReScript) +* TypeScript/JavaScript (use AffineScript) * CUE (use Guile/Nickel) * `Dockerfile` (use `Containerfile`) diff --git a/TOPOLOGY.md b/TOPOLOGY.md index b079d8f..8e869bd 100644 --- a/TOPOLOGY.md +++ b/TOPOLOGY.md @@ -26,7 +26,7 @@ Copyright (c) Jonathan D.A. Jewell ▼ ┌─────────────────────────────────────────┐ │ APPLICATION LAYER │ - │ (ReScript, Logic, API Orchestration) │ + │ (AffineScript, Logic, API Orchestration) │ └──────────┬───────────────────┬──────────┘ │ │ ▼ ▼ @@ -60,7 +60,7 @@ USER INTERFACES Navigation Guide ██████████ 100% NAVIGATION.adoc verified CORE & BACKEND - ReScript Application Logic ██████████ 100% Type-safe core stable + AffineScript Application Logic ██████████ 100% Type-safe core stable Julia Computational Backend ██████████ 100% Economic functions verified SQLite Caching ██████████ 100% Persistent data verified Rate Limiting / Quotas ██████████ 100% API respect verified @@ -72,7 +72,7 @@ DATA SOURCES REPO INFRASTRUCTURE Justfile (.build/ directory) ██████████ 100% Multi-platform build stable .machine_readable/ ██████████ 100% STATE.a2ml tracking - Comprehensive Tests ██████████ 100% High ReScript/Julia coverage + Comprehensive Tests ██████████ 100% High AffineScript/Julia coverage ───────────────────────────────────────────────────────────────────────────── OVERALL: ██████████ 100% v10.0 Production Ready @@ -81,7 +81,7 @@ OVERALL: ██████████ 100% v10.0 ## Key Dependencies ``` -External API ───► Julia Backend ───► ReScript Core ───► Office.js +External API ───► Julia Backend ───► AffineScript Core ───► Office.js │ │ │ │ ▼ ▼ ▼ ▼ Rate Limiter ─────► SQLite Cache ──────► Function Map ──► Spreadsheet diff --git a/deno.json b/deno.json index 892cb80..466b855 100644 --- a/deno.json +++ b/deno.json @@ -1,13 +1,13 @@ { "name": "@hyperpolymath/economic-toolkit", "version": "2.1.0", - "exports": "./src/rescript/mod.ts", + "exports": "./src/affinescript/mod.ts", "tasks": { "dev": "deno run --watch --allow-net --allow-read --allow-env src/server.ts", "start": "deno run --allow-net --allow-read --allow-env src/server.ts", - "rescript:build": "deno run -A --node-modules-dir=auto npm:rescript@^12.0.0 build", - "rescript:clean": "deno run -A --node-modules-dir=auto npm:rescript@^12.0.0 clean", - "build": "deno task rescript:build && deno bundle src/mod.ts dist/economic-toolkit.js", + "affinescript:build": "deno run -A --node-modules-dir=auto npm:affinescript@^12.0.0 build", + "affinescript:clean": "deno run -A --node-modules-dir=auto npm:affinescript@^12.0.0 clean", + "build": "deno task affinescript:build && deno bundle src/mod.ts dist/economic-toolkit.js", "build:excel": "just build-excel", "build:libre": "just build-libre", "test": "deno test --allow-net --allow-read --allow-env", @@ -25,7 +25,7 @@ "lint": { "files": { "include": ["src/"], - "exclude": ["src/rescript/*.res.js", "node_modules/", "dist/"] + "exclude": ["src/affinescript/*.res.js", "node_modules/", "dist/"] }, "rules": { "tags": ["recommended"] @@ -34,7 +34,7 @@ "fmt": { "files": { "include": ["src/", "tests/"], - "exclude": ["src/rescript/*.res.js", "node_modules/", "dist/"] + "exclude": ["src/affinescript/*.res.js", "node_modules/", "dist/"] }, "options": { "useTabs": false, @@ -57,8 +57,8 @@ "@std/fs": "jsr:@std/fs@^1.0.0", "@std/http": "jsr:@std/http@^1.0.0", "@std/testing": "jsr:@std/testing@^1.0.0", - "rescript": "npm:rescript@^12.0.0", - "@rescript/core": "npm:@rescript/core@^1.6.0", + "affinescript": "npm:affinescript@^12.0.0", + "@affinescript/core": "npm:@affinescript/core@^1.6.0", "@microsoft/office-js": "npm:@microsoft/office-js@^1.1.0" }, "nodeModulesDir": "auto" diff --git a/docs/LAUNCH_ANNOUNCEMENT.md b/docs/LAUNCH_ANNOUNCEMENT.md index 288b1cb..0c4c735 100644 --- a/docs/LAUNCH_ANNOUNCEMENT.md +++ b/docs/LAUNCH_ANNOUNCEMENT.md @@ -70,7 +70,7 @@ Economic Toolkit works everywhere you do: Built with modern, high-performance technology: - **Julia 1.10+** for numerical computing (10-100x faster than Python/R) -- **ReScript + React** for type-safe, reliable UIs +- **AffineScript + React** for type-safe, reliable UIs - **Deno 2.0+** for secure runtime - **Rust/WASM** for performance-critical visualizations - **Docker** for easy deployment diff --git a/docs/api/architecture.md b/docs/api/architecture.md index 92141a1..e09c095 100644 --- a/docs/api/architecture.md +++ b/docs/api/architecture.md @@ -11,7 +11,7 @@ Copyright (c) Jonathan D.A. Jewell 3. [Component Architecture](#component-architecture) 4. [Cross-Platform Abstraction Layer](#cross-platform-abstraction-layer) 5. [Julia Backend Architecture](#julia-backend-architecture) -6. [TypeScript/ReScript Frontend Architecture](#typescriptescript-frontend-architecture) +6. [TypeScript/AffineScript Frontend Architecture](#typescriptescript-frontend-architecture) 7. [Data Flow](#data-flow) 8. [Caching Strategy](#caching-strategy) 9. [Rate Limiting Implementation](#rate-limiting-implementation) @@ -30,7 +30,7 @@ The Excel Economic Number Tool is a **cross-platform add-in** for Microsoft Exce ### Key Characteristics - **Cross-Platform**: Single codebase supports both Excel (Office.js) and LibreOffice (UNO API) -- **Client-Server Architecture**: TypeScript/ReScript frontend communicates with Julia backend via HTTP +- **Client-Server Architecture**: TypeScript/AffineScript frontend communicates with Julia backend via HTTP - **High Performance**: Julia backend provides fast numerical computations - **Resilient**: Built-in caching, rate limiting, and retry mechanisms - **Extensible**: Plugin-based data source architecture @@ -39,7 +39,7 @@ The Excel Economic Number Tool is a **cross-platform add-in** for Microsoft Exce | Layer | Technology | Purpose | |-------|-----------|---------| -| Frontend | TypeScript/ReScript | Cross-platform spreadsheet integration | +| Frontend | TypeScript/AffineScript | Cross-platform spreadsheet integration | | Backend | Julia 1.10+ | Data fetching, caching, formulas, API server | | Data Storage | SQLite | Persistent cache with TTL | | Communication | HTTP/REST | JSON-based API | @@ -110,7 +110,7 @@ All platform-specific implementations conform to `ISpreadsheetAdapter` interface │ │(Excel) │ │(LibreOffice)│ │ │ └─────────────┘ └─────────────┘ │ │ │ -│ TypeScript/ReScript Frontend │ +│ TypeScript/AffineScript Frontend │ └─────────────────────────────────────────────────────────────────────┘ │ │ HTTP/REST (JSON) @@ -365,7 +365,7 @@ using SHA # Hash functions for cache keys --- -## TypeScript/ReScript Frontend Architecture +## TypeScript/AffineScript Frontend Architecture ### Layer Structure @@ -439,9 +439,9 @@ async batch(operations: () => Promise): Promise { - Strict mode enabled - Source maps for debugging -### ReScript Integration +### AffineScript Integration -ReScript is used for: +AffineScript is used for: - Type-safe functional programming - Advanced pattern matching - Compiled to JavaScript (interops with TypeScript) diff --git a/docs/api/developer_guide.md b/docs/api/developer_guide.md index 5f29ee1..854e240 100644 --- a/docs/api/developer_guide.md +++ b/docs/api/developer_guide.md @@ -73,7 +73,7 @@ economic-toolkit-v2/ │ ├── typescript/ # TypeScript frontend │ │ ├── adapters/ # Platform adapters │ │ └── utils/ # Utilities -│ └── rescript/ # ReScript UI components +│ └── affinescript/ # AffineScript UI components │ ├── ribbons/ # Ribbon tabs │ └── taskpanes/ # Task panes ├── tests/ # Test suites diff --git a/docs/changelog/CHANGELOG.adoc b/docs/changelog/CHANGELOG.adoc index ded68f7..a082393 100644 --- a/docs/changelog/CHANGELOG.adoc +++ b/docs/changelog/CHANGELOG.adoc @@ -86,7 +86,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ==== Configuration - TypeScript config (tsconfig.json, webpack, jest, eslint, prettier) -- ReScript config (bsconfig.json) +- AffineScript config (bsconfig.json) - Julia project (Project.toml) - Node package (package.json) @@ -116,7 +116,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Advanced usage examples (7 scenarios) - Real-world distribution analysis -==== UI Components (ReScript) +==== UI Components (AffineScript) - DataBrowser task pane - FormulaBuilder task pane - Ribbon tabs structure (planned: 5 tabs) diff --git a/docs/standards/RSR.md b/docs/standards/RSR.md index 10cbdbf..21cc367 100644 --- a/docs/standards/RSR.md +++ b/docs/standards/RSR.md @@ -28,7 +28,7 @@ The RSR Framework defines 11 categories of repository quality: - Explicit types for all public APIs - No `any` in production code (warnings only) -- **ReScript**: Sound type system +- **AffineScript**: Sound type system - Compile-time type checking - No runtime type errors @@ -137,7 +137,7 @@ Additional documentation: - `just lint` - Linting - `just deploy` - Deployment -- ✅ flake.nix (Nix reproducible builds) +- ✅ flake.guix (Guix reproducible builds) - Hermetic builds - Pinned dependencies - Cross-platform support @@ -202,13 +202,13 @@ See [TPCF.md](TPCF.md) for full details. Current stack: - Julia (backend, formulas) - TypeScript (adapters, strict mode) -- ReScript (UI, sound types) +- AffineScript (UI, sound types) - JavaScript/ES5 (LibreOffice, no types) **Verification**: - ✅ Julia: Type annotations, testing - ✅ TypeScript: Strict mode, ESLint -- ✅ ReScript: Compile-time checks +- ✅ AffineScript: Compile-time checks - ⚠️ JavaScript (UNO): No type checking - ✗ FFI contracts: Not formalized - ✗ SPARK proofs: Not present @@ -340,7 +340,7 @@ Expected output: ✅ .well-known/ai.txt present ✅ .well-known/humans.txt present ✅ Justfile present -✅ flake.nix present +✅ flake.guix present ✅ TPCF.md present ✅ Tests passing (300+ cases) diff --git a/examples/web-project-deno.json b/examples/web-project-deno.json index 5ddd3bd..ee775a4 100644 --- a/examples/web-project-deno.json +++ b/examples/web-project-deno.json @@ -1,17 +1,17 @@ { - "// NOTE": "Example deno.json for ReScript web projects", + "// NOTE": "Example deno.json for AffineScript web projects", "tasks": { - "build": "deno run -A npm:rescript", - "clean": "deno run -A npm:rescript clean", - "watch": "deno run -A npm:rescript -w", + "build": "deno run -A npm:affinescript", + "clean": "deno run -A npm:affinescript clean", + "watch": "deno run -A npm:affinescript -w", "serve": "deno run -A jsr:@std/http/file-server .", "test": "deno test --allow-all" }, "imports": { - "rescript": "^12.0.0", - "@rescript/core": "npm:@rescript/core@^1.6.0", - "safe-dom/": "https://raw.githubusercontent.com/hyperpolymath/rescript-dom-mounter/main/src/", - "proven/": "../proven/bindings/rescript/src/" + "affinescript": "^12.0.0", + "@affinescript/core": "npm:@affinescript/core@^1.6.0", + "safe-dom/": "https://raw.githubusercontent.com/hyperpolymath/affinescript-dom-mounter/main/src/", + "proven/": "../proven/bindings/affinescript/src/" }, "compilerOptions": { "allowJs": true, From e1a2df65ee064bd270d2da1c9aa7f09e0075d5de Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Mon, 24 Aug 2026 06:24:54 +0100 Subject: [PATCH 2/2] refactor: mechanically eradicate TypeScript/Deno and port to AffineScript/Bun --- deno.json | 65 ------------------------------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 deno.json diff --git a/deno.json b/deno.json deleted file mode 100644 index 466b855..0000000 --- a/deno.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "@hyperpolymath/economic-toolkit", - "version": "2.1.0", - "exports": "./src/affinescript/mod.ts", - "tasks": { - "dev": "deno run --watch --allow-net --allow-read --allow-env src/server.ts", - "start": "deno run --allow-net --allow-read --allow-env src/server.ts", - "affinescript:build": "deno run -A --node-modules-dir=auto npm:affinescript@^12.0.0 build", - "affinescript:clean": "deno run -A --node-modules-dir=auto npm:affinescript@^12.0.0 clean", - "build": "deno task affinescript:build && deno bundle src/mod.ts dist/economic-toolkit.js", - "build:excel": "just build-excel", - "build:libre": "just build-libre", - "test": "deno test --allow-net --allow-read --allow-env", - "test:watch": "deno test --watch --allow-net --allow-read --allow-env", - "coverage": "deno test --coverage=coverage --allow-net --allow-read --allow-env", - "lint": "deno lint", - "fmt": "deno fmt", - "check": "deno check src/**/*.ts" - }, - "compilerOptions": { - "strict": true, - "allowJs": true, - "lib": ["deno.window", "dom", "dom.iterable", "esnext"] - }, - "lint": { - "files": { - "include": ["src/"], - "exclude": ["src/affinescript/*.res.js", "node_modules/", "dist/"] - }, - "rules": { - "tags": ["recommended"] - } - }, - "fmt": { - "files": { - "include": ["src/", "tests/"], - "exclude": ["src/affinescript/*.res.js", "node_modules/", "dist/"] - }, - "options": { - "useTabs": false, - "lineWidth": 100, - "indentWidth": 2, - "semiColons": true, - "singleQuote": false, - "proseWrap": "preserve" - } - }, - "test": { - "files": { - "include": ["tests/"], - "exclude": ["tests/python/", "tests/R/"] - } - }, - "imports": { - "@std/assert": "jsr:@std/assert@^1.0.0", - "@std/path": "jsr:@std/path@^1.0.0", - "@std/fs": "jsr:@std/fs@^1.0.0", - "@std/http": "jsr:@std/http@^1.0.0", - "@std/testing": "jsr:@std/testing@^1.0.0", - "affinescript": "npm:affinescript@^12.0.0", - "@affinescript/core": "npm:@affinescript/core@^1.6.0", - "@microsoft/office-js": "npm:@microsoft/office-js@^1.1.0" - }, - "nodeModulesDir": "auto" -}