c04f38a1ba
apl: multi-axis bracket A[I;J] / A[I;] / A[;J] (+8 tests, 475/475)
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 50s
Parser: split-bracket-content splits inner tokens on :semi at
depth 0; maybe-bracket emits (:bracket arr axis-exprs...) for
multi-axis access, with :all marker for empty axes.
Runtime: apl-bracket-multi enumerates index combinations via
apl-cartesian (helper) and produces sub-array. Scalar axes
collapse from result shape; vector / nil axes contribute their
length.
apl-run "M ← (3 3) ⍴ ⍳9 ⋄ M[2;2]" → 5
apl-run "M ← (3 3) ⍴ ⍳9 ⋄ M[1;]" → 1 2 3
apl-run "M ← (3 3) ⍴ ⍳9 ⋄ M[;2]" → 2 5 8
apl-run "M ← (2 3) ⍴ ⍳6 ⋄ M[1 2;1 2]" → 2x2 sub-block
2026-05-07 17:56:24 +00:00
b13819c50c
apl: named function definitions f ← {…} (+7 tests, 467/467)
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 53s
Parser: apl-collect-fn-bindings pre-scans stmt-groups for
`name ← { ... }` patterns and populates apl-known-fn-names.
is-fn-tok? consults this list; collect-segments-loop emits
(:fn-name nm) for known names so they parse as functions.
Resolver: apl-resolve-{monadic,dyadic} handle :fn-name by
looking up env, asserting the binding is a dfn, returning
a closure that dispatches to apl-call-dfn{-m,}.
Recursion still works: `fact ← {0=⍵:1 ⋄ ⍵×∇⍵-1} ⋄ fact 5` → 120.
2026-05-07 17:33:41 +00:00
d9cf00f287
apl: quick-wins bundle — decimals + ⎕← + strings (+10 tests, 460/460)
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 49s
Three small unblockers in one iteration:
- tokenizer: read-digits! now consumes optional ".digits" suffix,
so 3.7 and ¯2.5 are single number tokens.
- tokenizer: ⎕ followed by ← emits a single :name "⎕←" token
(instead of splitting on the assign glyph). Parser registers
⎕← in apl-quad-fn-names; apl-monadic-fn maps to apl-quad-print.
- eval-ast: :str AST nodes evaluate to char arrays. Single-char
strings become rank-0 scalars; multi-char become rank-1 vectors
of single-char strings.
2026-05-07 17:26:37 +00:00
0c0ed0605a
plans: Phase 8 — quick-wins, named fns, multi-axis brackets, .apl-as-tests, trains, perf
Test, Build, and Deploy / test-build-deploy (push) Failing after 49s
2026-05-07 17:20:47 +00:00
0dd2fa3058
apl: :Trap exception machinery — Phase 7 complete (+5 tests, 450/450)
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m8s
apl-throw raises a tagged ("apl-error" code msg) error.
apl-trap-matches? checks if codes list contains the error's code
(0 = catch-all, à la Dyalog).
Eval-stmt :trap clause wraps try-block with R7RS guard;
on match, runs catch-block; on mismatch, re-raises.
Bonus :throw AST node for testing.
test.sh + conformance.sh now load lib/r7rs.sx (for guard) and
include eval-ops + pipeline suites in scoreboard.
All Phase 7 unchecked items are now ticked.
Final scoreboard: 450/450 across 10 suites.
2026-05-07 14:53:22 +00:00
67ff2a3ae8
apl: idiom corpus 34→64 + fix ≢/≡ glyph recognition (+30 tests, 445/445)
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m4s
30 new source-string idioms via apl-run: triangulars, factorial,
running sum/product, parity counts, identity matrix, mult-table,
dot product, ∧.= equality, take/drop/reverse, tally, ravel,
count-of-value, etc.
Side-fix: tokenizer's apl-glyph-set was missing ≢ and ≡ — they
were silently skipped. Added them and to apl-parse-fn-glyphs.
2026-05-07 14:20:42 +00:00
aaabe370d6
apl: bracket indexing A[I] → (I⌷A) (+7 tests, 415/415)
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m29s
Parser: maybe-bracket helper wraps any value followed by [expr]
into (:dyad (:fn-glyph ⌷) idx val). Wired into :name and :lparen
branches of collect-segments-loop.
apl-run "(10 20 30)[2]" → 20
apl-run "A ← 100 200 300 ⋄ A[2]" → 200
apl-run "(⍳5)[3] × 7" → 21
Multi-axis A[I;J] deferred — needs semicolon-split parsing.
2026-05-07 14:07:05 +00:00
637ba4102f
apl: ⎕ quad-names end-to-end (+8 tests, 408/408)
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m4s
Parser: apl-quad-fn-names list; is-fn-tok? + :name clause
in collect-segments-loop now route ⎕FMT through fn pipeline.
Eval-ast: :name branch dispatches ⎕IO/⎕ML/⎕FR/⎕TS to apl-quad-*
niladics; apl-monadic-fn handles ⎕FMT.
⎕← (print) deferred — tokenizer splits ⎕← into name + :assign.
2026-05-07 13:49:35 +00:00
7cf8b74d1d
apl: end-to-end pipeline apl-run + 25 source-string tests (400/400)
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m7s
apl-run = parse-apl + apl-eval-ast against empty env. Wires
tokenizer + parser + transpile + runtime as one entry point.
test.sh now loads tokenizer.sx + parser.sx alongside transpile.sx.
Source-string tests cover scalars, strands, dyadic arith,
right-to-left precedence, monadic primitives, /, \, ⌈/, ×/,
∘.×, +.×, ⍴, comparisons, classic one-liners.
Tokenizer doesn't yet handle decimal literals (3.7 → 3 . 7),
so two such tests substituted with integer min/max-reduce.
2026-05-07 13:17:39 +00:00
dec1cf3fbe
apl: operators in apl-eval-ast via resolvers (+14 tests, 375/375)
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m0s
apl-resolve-monadic and apl-resolve-dyadic dispatch :derived-fn,
:outer, and :derived-fn2 nodes to the matching operator helper.
:monad/:dyad in apl-eval-ast now route through these resolvers.
Removed queens(8) test (too slow under current 300s timeout).
2026-05-07 12:45:21 +00:00
52df09655d
plans: Phase 7 — end-to-end pipeline + close gaps (operators in eval-ast, :quad-name, idiom expansion, :Trap)
Test, Build, and Deploy / test-build-deploy (push) Failing after 33s
2026-05-07 11:46:42 +00:00
d755caeb9a
apl: idiom corpus — 34 classic idioms; entire plan complete (362/362)
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m2s
2026-05-07 07:29:04 +00:00
3e77dd4ded
apl: ⎕ system functions + drive corpus to 100+ (+13 tests, 328/328)
Test, Build, and Deploy / test-build-deploy (push) Failing after 51s
2026-05-07 06:56:20 +00:00
0f13052900
apl: quicksort recursive partition — Phase 6 classics complete (+9 tests, 315/315)
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m0s
2026-05-07 06:23:03 +00:00
e37167a58e
apl: n-queens via permute + diagonal filter, q(8)=92 (+10 tests, 306/306)
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m5s
2026-05-07 05:46:54 +00:00
49eb22243a
apl: mandelbrot real-axis batched z=z²+c (+9 tests, 296/296)
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m5s
2026-05-07 05:07:25 +00:00
20a61de693
apl: life Conway via 9-shift toroidal sum (+7 tests, 287/287)
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m8s
2026-05-07 04:36:49 +00:00
ed0853f4a0
apl: primes sieve (2=+⌿0=A∘.|A)/A←⍳N + apl-compress (+11 tests, 280/280)
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m6s
2026-05-07 04:07:09 +00:00
ec26b61cbe
apl: conformance.sh + scoreboard.{json,md} — Phase 5 complete (269/269)
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m3s
2026-05-07 03:37:58 +00:00
bee4e0846c
apl: niladic/monadic/dyadic valence dispatch (+14 tests, 269/269)
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m6s
2026-05-07 03:10:07 +00:00
f591ee17c3
apl: control words :If/:While/:For/:Select (+10 tests, 255/255)
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m3s
2026-05-07 02:42:28 +00:00
1900726fc9
apl: tradfn ∇ header — line-numbered stmts + :branch goto (+10 tests, 245/245)
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m4s
2026-05-07 02:13:00 +00:00
16167c5d9b
apl: dfn complete — guards, locals, ∇ recursion, ⍺← default (+9 tests, 235/235)
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m3s
2026-05-07 01:44:19 +00:00
84d210b6b3
apl: dfn foundation — transpile.sx + apl-eval-ast (+15 tests, 226/226)
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m2s
2026-05-07 00:57:59 +00:00
3628a504db
plans: tick Phase 4 40+ tests (operators.sx has 117)
Test, Build, and Deploy / test-build-deploy (push) Failing after 57s
2026-05-07 00:27:55 +00:00
4c71c5a75e
apl: at @ replace+apply (+10 tests, 211/211)
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-05-07 00:27:40 +00:00
9eecbde61e
apl: rank f⍤k cell decomposition (+10 tests, 201/201)
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m0s
2026-05-07 00:00:14 +00:00
4dbd3a0b34
apl: power f⍣n + fixed-point f⍣≡ (+9 tests, 191/191)
Test, Build, and Deploy / test-build-deploy (push) Failing after 56s
2026-05-06 23:32:26 +00:00
3d2bdc52b5
apl: compose f∘g (+9 tests, 182/182)
Test, Build, and Deploy / test-build-deploy (push) Failing after 46s
2026-05-06 23:03:14 +00:00
d570da1dea
apl: commute f⍨ (+10 tests, 173/173)
Test, Build, and Deploy / test-build-deploy (push) Failing after 50s
2026-05-06 22:36:11 +00:00
d67e04a9ad
apl: inner product f.g (+12 tests, 163/163)
Test, Build, and Deploy / test-build-deploy (push) Failing after 58s
2026-05-06 22:09:13 +00:00
4332b4032f
apl: outer product ∘.f (+12 tests, 151/151)
Test, Build, and Deploy / test-build-deploy (push) Failing after 53s
2026-05-06 21:41:15 +00:00
3489c9f131
apl: each f¨ monadic + dyadic (+14 tests, 139/139)
Test, Build, and Deploy / test-build-deploy (push) Failing after 51s
2026-05-06 21:14:49 +00:00
c56f400403
apl: scan f\ + f⍀ (+15 tests, 125/125)
Test, Build, and Deploy / test-build-deploy (push) Failing after 53s
2026-05-06 20:46:16 +00:00
c63c0d26e8
plans: tick reduce f/ f⌿, progress log
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 49s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 19:39:34 +00:00
c5ceb9c718
apl: reduce f/ and f⌿ (last+first axis); 110/110 tests
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 19:39:11 +00:00
e42aec8957
plans: Phase 3 complete — tick membership/without/40+tests boxes
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 45s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 19:25:07 +00:00
ce72070d2a
apl: membership ∊, dyadic ⍳, without ~ (dyadic); 94/94 tests
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 19:24:46 +00:00
32efdfe4aa
plans: tick Phase 3 enclose/disclose, progress log
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 45s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 19:17:56 +00:00
e06e3ad014
apl: enclose ⊂ / disclose ⊃; 82/82 tests
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 19:17:30 +00:00
ad914b413c
plans: tick Phase 3 grade-up/down, progress log
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 39s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 19:03:05 +00:00
7dfa092ed2
apl: Phase 3 grade-up ⍋ / grade-down ⍒ — 74/74 tests green
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Add apl-grade (stable insertion sort helper), apl-grade-up, apl-grade-down.
Stability guaranteed via secondary sort key (original index). 8 new tests.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 19:02:49 +00:00
03e9df3ecf
plans: tick Phase 3 squad ⌷, progress log
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 47s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 18:57:24 +00:00
e11fbd6140
apl: Phase 3 squad ⌷ indexing — 66/66 tests green
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Add apl-squad: scalar index into vector, fully-specified multi-dim index,
partial index returning sub-array slice. 7 new tests.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 18:57:07 +00:00
248dca5b32
plans: tick Phase 3 catenate, progress log
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 45s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 18:51:58 +00:00
71ad7d2d24
apl: Phase 3 catenate , and first-axis — 59/59 tests green
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Add apl-catenate (dyadic ,, last-axis join, scalar promotion) and
apl-catenate-first (first-axis join, row-major append). 9 new tests.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 18:51:32 +00:00
c03ba9eccb
plans: tick Phase 3 step 2 take/drop/rotate, progress log
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 50s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 18:45:37 +00:00
3c83985841
apl: Phase 3 take ↑ / drop ↓ / rotate ⌽⊖ — 50/50 tests green
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Add apl-take (dyadic ↑, multi-axis, cycling pad), apl-drop (dyadic ↓),
apl-reverse (monadic ⌽), apl-rotate (dyadic ⌽, last axis),
apl-reverse-first (monadic ⊖), apl-rotate-first (dyadic ⊖, first axis),
apl-safe-mod helper for negative rotation arithmetic.
23 new tests in lib/apl/tests/structural.sx.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 18:45:12 +00:00
6a6a94e203
plans: tick Phase 3 step 1 reshape/transpose, progress log
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 54s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 18:37:10 +00:00
be26f77410
apl: Phase 3 reshape ⍴ / transpose ⍉ — 27/27 structural tests green
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Add apl-reshape (dyadic ⍴, cycling), apl-transpose (monadic ⍉, reverse
axes), apl-transpose-dyadic (dyadic ⍉, permutation), plus helpers
apl-strides / apl-flat->multi / apl-multi->flat.
lib/apl/tests/structural.sx: 27 new tests covering ravel, reshape,
monadic/dyadic transpose across scalar/vector/matrix/3-D cases.
test.sh now runs structural.sx via its own inline framework (skips
stale tests/runtime.sx which targeted a pre-Phase-2 list-based API).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-06 18:36:43 +00:00