Commit 41480f0
feat: P3 aggregate packages + P4 educational materials + JS/Pseudocode faces
Completes all remaining items from the AFFINESCRIPT-NEXT.adoc session briefing.
Priority 1 (conformance 12/12) and Priority 2 (python-face) were already done.
This commit finishes Priority 2 (remaining faces) + Priority 3 + Priority 4.
Priority 2 — remaining faces:
- lib/js_face.ml: JS/TS-style preprocessor (const/let/var→let, function→fn,
async function→fn/Async, null/undefined→(), ===→==, import-from→use)
- lib/pseudocode_face.ml: natural-language pseudocode preprocessor
(function/procedure→fn, set...to→let, if...then→if{, end→}, is→==,
and/or/not, output/print→IO.println, -- comments→//)
- lib/face.ml: Js and Pseudocode variants added to face type; full error
vocabulary for quantity/unify/type/resolve errors in all four faces
- bin/main.ml: --face js/javascript/pseudocode/pseudo options wired;
preview-js and preview-pseudocode debug subcommands added
- lib/dune: js_face and pseudocode_face added to modules list
- docs/specs/faces.md: JS and Pseudocode faces listed as Beta
Priority 3 — aggregate library ecosystem:
- packages/affine-js/: Deno ESM package — AffineModule (fromFile/fromBytes/
call/runMain), marshal/unmarshal, AFFINE_TAG/AFFINE_SIZE constants,
makeRuntimeImports with default IO handlers, types.d.ts declarations
- packages/affine-ts/: typed call helpers (callInt/callFloat/callString/
callOption/callResult) + narrowing predicates (isOk/isErr/isSome/isNone/
expectOk/expectSome); re-exports all of affine-js
- packages/affine-res/: ReScript bindings — AffineScriptValue.t variant type
with toJs/ofJs/expect*/toOption helpers; AffineScript module with fromFile/
fromBytes/call/runMain/callInt/callFloat/callBool/callString/callOption/callOk
Priority 4 — educational materials:
- docs/guides/frontier-guide.adoc: 6-chapter unveiling tutorial covering all
six problems AffineScript solves (null/mutation/errors/effects/rows/WASM)
- docs/guides/warmup/: 4 annotated warmup scripts with exercises
(01_basics, 02_ownership, 03_effects, 04_rows)
73/73 E2E tests: 0 regressions. Build clean.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent cda36ef commit 41480f0
28 files changed
Lines changed: 3411 additions & 18 deletions
File tree
- .machine_readable/6a2
- bin
- docs
- guides
- warmup
- specs
- lib
- packages
- affine-js
- affine-res
- src
- affine-ts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| |||
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
76 | 94 | | |
77 | 95 | | |
78 | 96 | | |
| |||
359 | 377 | | |
360 | 378 | | |
361 | 379 | | |
362 | | - | |
363 | | - | |
| 380 | + | |
| 381 | + | |
364 | 382 | | |
365 | 383 | | |
366 | 384 | | |
367 | 385 | | |
368 | | - | |
369 | | - | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
370 | 393 | | |
371 | 394 | | |
372 | 395 | | |
| |||
457 | 480 | | |
458 | 481 | | |
459 | 482 | | |
460 | | - | |
461 | | - | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
462 | 489 | | |
463 | 490 | | |
464 | 491 | | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
469 | 501 | | |
470 | 502 | | |
471 | 503 | | |
| |||
512 | 544 | | |
513 | 545 | | |
514 | 546 | | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
515 | 557 | | |
516 | 558 | | |
517 | 559 | | |
518 | 560 | | |
519 | | - | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
520 | 566 | | |
521 | 567 | | |
0 commit comments