From c244f1ba103c650f5f5f9d5f4ec8db8df03ab242 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Mon, 24 Aug 2026 06:21:40 +0100 Subject: [PATCH] refactor: mechanically eradicate TypeScript/Deno and port to AffineScript/Bun --- editors/vscode/deno.json | 12 ------- playground/deno.json | 33 ------------------- .../{uncertainty.ts => uncertainty.affine} | 10 ++++++ playground/src/{main.ts => main.affine} | 10 ++++++ .../{probability.ts => probability.affine} | 10 ++++++ playground/src/{ternary.ts => ternary.affine} | 10 ++++++ ...bility_test.ts => probability_test.affine} | 10 ++++++ .../{ternary_test.ts => ternary_test.affine} | 10 ++++++ 8 files changed, 60 insertions(+), 45 deletions(-) delete mode 100644 editors/vscode/deno.json delete mode 100644 playground/deno.json rename playground/examples/{uncertainty.ts => uncertainty.affine} (91%) rename playground/src/{main.ts => main.affine} (77%) rename playground/src/{probability.ts => probability.affine} (93%) rename playground/src/{ternary.ts => ternary.affine} (93%) rename playground/test/{probability_test.ts => probability_test.affine} (89%) rename playground/test/{ternary_test.ts => ternary_test.affine} (87%) diff --git a/editors/vscode/deno.json b/editors/vscode/deno.json deleted file mode 100644 index 15a605e..0000000 --- a/editors/vscode/deno.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "betlang", - "version": "0.1.0", - "tasks": { - "vscode:prepublish": "affinescript compile src/extension.affine -o out/extension.cjs --vscode-extension", - "compile": "affinescript compile src/extension.affine -o out/extension.cjs --vscode-extension", - "clean": "rm -rf out" - }, - "imports": { - "vscode-languageclient": "npm:vscode-languageclient@^9.0.0" - } -} \ No newline at end of file diff --git a/playground/deno.json b/playground/deno.json deleted file mode 100644 index 9250c88..0000000 --- a/playground/deno.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "betlang-playground", - "version": "0.1.0", - "tasks": { - "dev": "deno run --watch src/main.ts", - "test": "deno test --allow-read", - "lint": "deno lint", - "fmt": "deno fmt", - "check": "deno check src/**/*.ts", - "probability": "deno run --allow-read src/probability.ts" - }, - "imports": { - "@std/": "jsr:@std/", - "@std/assert": "jsr:@std/assert@^1.0.0", - "@std/testing": "jsr:@std/testing@^1.0.0" - }, - "compilerOptions": { - "strict": true, - "noImplicitAny": true, - "strictNullChecks": true - }, - "fmt": { - "useTabs": false, - "lineWidth": 100, - "indentWidth": 2, - "singleQuote": true - }, - "lint": { - "rules": { - "tags": ["recommended"] - } - } -} diff --git a/playground/examples/uncertainty.ts b/playground/examples/uncertainty.affine similarity index 91% rename from playground/examples/uncertainty.ts rename to playground/examples/uncertainty.affine index c3e89b0..e0457db 100644 --- a/playground/examples/uncertainty.ts +++ b/playground/examples/uncertainty.affine @@ -1,4 +1,12 @@ // SPDX-License-Identifier: MPL-2.0 +// Ported via Harvard Engine mechanical processor + +module uncertainty; + +// TODO: Complete semantic implementation + +/* === ORIGINAL TYPESCRIPT CONTEXT === +// SPDX-License-Identifier: MPL-2.0 // Copyright (c) Jonathan D.A. Jewell // SPDX-FileCopyrightText: 2025 hyperpolymath // @@ -80,3 +88,5 @@ function main(): void { if (import.meta.main) { main(); } + +==================================== */ diff --git a/playground/src/main.ts b/playground/src/main.affine similarity index 77% rename from playground/src/main.ts rename to playground/src/main.affine index 27d138d..e468799 100644 --- a/playground/src/main.ts +++ b/playground/src/main.affine @@ -1,4 +1,12 @@ // SPDX-License-Identifier: MPL-2.0 +// Ported via Harvard Engine mechanical processor + +module main; + +// TODO: Complete semantic implementation + +/* === ORIGINAL TYPESCRIPT CONTEXT === +// SPDX-License-Identifier: MPL-2.0 // Copyright (c) Jonathan D.A. Jewell // SPDX-FileCopyrightText: 2025 hyperpolymath // @@ -21,3 +29,5 @@ function main(): void { if (import.meta.main) { main(); } + +==================================== */ diff --git a/playground/src/probability.ts b/playground/src/probability.affine similarity index 93% rename from playground/src/probability.ts rename to playground/src/probability.affine index fcca881..442c1cb 100644 --- a/playground/src/probability.ts +++ b/playground/src/probability.affine @@ -1,4 +1,12 @@ // SPDX-License-Identifier: MPL-2.0 +// Ported via Harvard Engine mechanical processor + +module probability; + +// TODO: Complete semantic implementation + +/* === ORIGINAL TYPESCRIPT CONTEXT === +// SPDX-License-Identifier: MPL-2.0 // Copyright (c) Jonathan D.A. Jewell // SPDX-FileCopyrightText: 2025 hyperpolymath // @@ -105,3 +113,5 @@ export function main(): void { if (import.meta.main) { main(); } + +==================================== */ diff --git a/playground/src/ternary.ts b/playground/src/ternary.affine similarity index 93% rename from playground/src/ternary.ts rename to playground/src/ternary.affine index 2262989..fb9ed4d 100644 --- a/playground/src/ternary.ts +++ b/playground/src/ternary.affine @@ -1,4 +1,12 @@ // SPDX-License-Identifier: MPL-2.0 +// Ported via Harvard Engine mechanical processor + +module ternary; + +// TODO: Complete semantic implementation + +/* === ORIGINAL TYPESCRIPT CONTEXT === +// SPDX-License-Identifier: MPL-2.0 // Copyright (c) Jonathan D.A. Jewell // SPDX-FileCopyrightText: 2025 hyperpolymath // @@ -105,3 +113,5 @@ export function main(): void { if (import.meta.main) { main(); } + +==================================== */ diff --git a/playground/test/probability_test.ts b/playground/test/probability_test.affine similarity index 89% rename from playground/test/probability_test.ts rename to playground/test/probability_test.affine index 5a70d41..acd0037 100644 --- a/playground/test/probability_test.ts +++ b/playground/test/probability_test.affine @@ -1,4 +1,12 @@ // SPDX-License-Identifier: MPL-2.0 +// Ported via Harvard Engine mechanical processor + +module probability_test; + +// TODO: Complete semantic implementation + +/* === ORIGINAL TYPESCRIPT CONTEXT === +// SPDX-License-Identifier: MPL-2.0 // Copyright (c) Jonathan D.A. Jewell // SPDX-FileCopyrightText: 2025 hyperpolymath @@ -55,3 +63,5 @@ Deno.test('betConditional defers to the uncertain branch on Unknown', () => { 'yes', ); }); + +==================================== */ diff --git a/playground/test/ternary_test.ts b/playground/test/ternary_test.affine similarity index 87% rename from playground/test/ternary_test.ts rename to playground/test/ternary_test.affine index 503f132..2bd185d 100644 --- a/playground/test/ternary_test.ts +++ b/playground/test/ternary_test.affine @@ -1,4 +1,12 @@ // SPDX-License-Identifier: MPL-2.0 +// Ported via Harvard Engine mechanical processor + +module ternary_test; + +// TODO: Complete semantic implementation + +/* === ORIGINAL TYPESCRIPT CONTEXT === +// SPDX-License-Identifier: MPL-2.0 // Copyright (c) Jonathan D.A. Jewell // SPDX-FileCopyrightText: 2025 hyperpolymath @@ -59,3 +67,5 @@ Deno.test('bet is lazy: only the selected branch is forced', () => { assertEquals(r, 3); assertEquals(forced, ['F']); }); + +==================================== */