4d7b3e299c
spec: format — CL-style string formatting (~a ~s ~d ~x ~o ~b ~f ~% ~& ~~ ~t)
...
28 tests, passes on both JS and OCaml.
- spec/stdlib.sx: pure SX format function
- spec/primitives.sx: format primitive declaration
- lib/r7rs.sx: fix number->string to support optional radix arg
- hosts/ocaml: add format-decimal primitive, load stdlib.sx in test runner
- hosts/javascript: load stdlib.sx in test runner
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-01 19:58:54 +00:00
c8d7fdd59a
tcl: Phase 2 core commands — if/while/for/foreach/switch/break/continue/return/error/expr (+20 tests, 107 total)
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 16s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-26 14:40:48 +00:00
4f4b735958
apl: array model + scalar primitives Phase 2 (+82 tests)
...
Implement lib/apl/runtime.sx — APL array model and scalar primitive library:
- make-array/apl-scalar/apl-vector/enclose/disclose constructors
- array-rank/scalar?/array-ref accessors; apl-io=1 (⎕IO default)
- broadcast-monadic/broadcast-dyadic engine (scalar↔scalar, scalar↔array, array↔array)
- Arithmetic: + - × ÷ ⌈ ⌊ * ⍟ | ! ○ (all monadic+dyadic per APL convention)
- Comparison: < ≤ = ≥ > ≠ (return 0/1)
- Logical: ~ ∧ ∨ ⍱ ⍲
- Shape: ⍴ (apl-shape), , (apl-ravel), ≢ (apl-tally), ≡ (apl-depth)
- ⍳ (apl-iota) with ⎕IO=1 — vector 1..n
82 tests in lib/apl/tests/scalar.sx covering all primitive groups;
includes lists-eq helper for ListRef-aware comparison.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-26 14:24:49 +00:00
da8ba104a6
apl: right-to-left parser + 44 tests (Phase 1, step 2)
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 17s
Implement lib/apl/parser.sx — APL expression parser:
- Segment-based algorithm: scan L→R collecting {fn,val} segments
- build-tree constructs AST with leftmost-fn = root (right-to-left semantics)
- Handles: monadic/dyadic fns, strands (:vec), assignment (:assign)
- Operators: derived-fn (:derived-fn op fn), inner product (:derived-fn2)
- Outer product ∘.f (:outer), dfns {:dfn stmt...}, guards (:guard cond expr)
- split-statements is bracket-aware (depth tracking prevents splitting inside {})
44 new parser tests + 46 existing tokenizer = 90/90 green.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-26 14:05:43 +00:00
82da16e4bb
tcl: Phase 2 eval engine — tcl-eval-script + set/puts/incr/append (+20 tests, 87 total)
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 17s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-26 14:02:52 +00:00
4da91bb9b4
cl: Phase 2 eval — 127 tests, 299 total green
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 12s
lib/common-lisp/eval.sx: cl-eval-ast implementing quote, if, progn,
let/let*, flet, labels, setq/setf, function, lambda, the, locally,
eval-when, defun, defvar/defparameter/defconstant, built-in arithmetic
(+/-/*//, min/max/abs/evenp/oddp), comparisons, predicates, list ops,
string ops, funcall/apply/mapcar.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 18:58:48 +00:00
6ee052593c
tcl: Phase 1 parser — word-simple? + word-literal helpers (+15 tests, 67 total)
2026-04-25 18:47:34 +00:00
f247cb2898
js: let/const TDZ infrastructure — sentinel + kind threading in transpiler
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 11s
Threads declaration kind ("var"/"let"/"const") through js-transpile-var →
js-vardecl-forms so the transpiler knows which kind is being declared.
Infrastructure for full TDZ enforcement: js-tdz-check can wrap let/const
reads to raise TypeError before initialization.
Updates plans/js-on-sx.md: ticks [x] for TDZ, marks regex blocker RESOLVED,
adds progress log entry for 2026-04-25.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 18:35:32 +00:00
f8023cf74e
js: regex engine (lib/js/regex.sx) — pure-SX recursive backtracker
...
Adds a full regex engine written in SX, installed via js-regex-platform-override!.
Supports char classes (. \d\D\w\W\s\S [abc] [^abc] ranges), anchors (^ $ \b \B),
quantifiers (* + ? {n,m} greedy and lazy), capturing/non-capturing groups,
alternation (a|b), flags i/g/m. exec() returns {:match :index :input :groups}.
Also fixes String.prototype.match to dispatch through the platform engine
(was calling js-regex-stub-exec directly, bypassing regex.sx).
Adds TDZ sentinel infrastructure: __js_tdz_sentinel__, js-tdz?, js-tdz-check.
Updates test.sh (+34 regex tests + 4 TDZ infra tests), conformance.sh,
and test262-runner.py to load regex.sx as epoch 6.
Tests: 559/560 unit (1 pre-existing failure), 148/148 conformance.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 18:35:23 +00:00
1819156d1e
prolog: cross-validate compiler vs interpreter (+17)
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 18:32:36 +00:00
cdee007185
cl: Phase 1 lambda-list parser + 31 tests (172 total green)
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 18:26:58 +00:00
c73b696494
apl: tokenizer + 46 tests (Phase 1, step 1)
...
Unicode-aware byte scanner using starts-with?/consume! for multi-byte
APL glyphs. Handles numbers (¯-negative), string literals, identifiers
(⎕ system names), all APL function/operator glyphs, :Keywords,
comments ⍝, diamond ⋄, assignment ←.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 18:22:30 +00:00
666e29d5f0
tcl: Phase 1 tokenizer — Dodekalogue (52 tests green)
2026-04-25 18:22:10 +00:00
bcf6057ac5
common-lisp: Phase 1 reader + 62 tests (141 total)
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
lib/common-lisp/parser.sx — cl-read/cl-read-all: lists, dotted
pairs (a . b) → cons dict, quote/backquote/unquote/splice as
wrapper lists, #' → FUNCTION, #(…) → vector dict, #:foo →
uninterned dict, NIL→nil, T→true, integer radix conversion
(#xFF/#b1010/#o17). Floats/ratios kept as annotated dicts.
lib/common-lisp/tests/parse.sx — 62 tests, all green.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 18:15:07 +00:00
8a9c074141
prolog: compile clauses to SX closures (+17)
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 18:08:27 +00:00
13d0ebcce8
common-lisp: Phase 1 tokenizer + 79 tests
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
lib/common-lisp/reader.sx — CL tokenizer: symbols with package
qualification (pkg:sym/pkg::sym), integers, floats, ratios, hex/
binary/octal (#xFF/#b1010/#o17), strings with escapes, #\ char
literals (named + bare), reader macros (#' #( #: ,@), line and
nested block comments.
lib/common-lisp/tests/read.sx — 79 tests, all green.
lib/common-lisp/test.sh — test runner (sx_server pipe protocol).
Key SX gotcha: use str not concat for string building.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 18:06:30 +00:00
7e7a9c06e9
smalltalk: GNU Smalltalk compare harness; all briefing checkboxes done
Test, Build, and Deploy / test-build-deploy (push) Failing after 11s
2026-04-25 16:32:26 +00:00
75032c5789
smalltalk: block intrinsifier (8 idioms) + 24 tests -> 847/847
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 16:10:27 +00:00
df62c02a21
smalltalk: per-call-site inline cache + 10 IC tests
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 15:30:36 +00:00
5d369daf2b
smalltalk: ANSI X3J20 validator subset + 62 tests -> 813/813
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 14:48:47 +00:00
446a0e7d68
smalltalk: Pharo Kernel/Collections-Tests slice (91 tests) -> 751/751
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 14:14:11 +00:00
788ac9dd05
predsort/3, term_variables/2, arith: floor/ceiling/truncate/round/sign/sqrt/pow
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
- pl-eval-arith: add floor, ceiling, truncate, round, sqrt, sign, pow, integer,
float, float_integer_part, float_fractional_part, **, ^ operators
- pl-collect-vars: helper that extracts unbound variables from a term (left-to-right,
deduplicated by var id)
- term_variables/2: dispatches via pl-collect-vars, unifies second arg with var list
- pl-predsort-insert!: inserts one element into a sorted list using a 3-arg comparator
predicate; deduplicates elements where comparator returns '='
- pl-predsort-build!: builds sorted list via fold over pl-predsort-insert!
- predsort/3: full ISO predsort — sorts and deduplicates a list using a caller-supplied
predicate
- lib/prolog/tests/advanced.sx: 21 tests (12 arith, 5 term_variables, 4 predsort)
- conformance.sh: add advanced suite
- scoreboard: 517/517 (was 496/496)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 14:13:12 +00:00
537e2cdb5a
sub_atom/5 (non-det substring) + aggregate_all/3 (count/bag/sum/max/min/set)
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Adds two new builtins to lib/prolog/runtime.sx:
- sub_atom/5: non-deterministic substring enumeration. Iterates all
(start, length) pairs over the atom string, tries to unify Before,
Length, After, SubAtom for each candidate. Uses CPS loop helpers
pl-substring, pl-sub-atom-try-one!, pl-sub-atom-loop!. Fixed trail
undo semantics: only undo on backtrack (k returns false), not on success.
- aggregate_all/3: collects all solutions via pl-collect-solutions then
reduces. Templates: count, bag(T), sum(E), max(E), min(E), set(T).
max/min fail on empty; count/bag/sum/set always succeed.
New test suite lib/prolog/tests/string_agg.sx: 25 tests, all passing.
Total conformance: 496/496.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 13:50:13 +00:00
0ca664b81c
smalltalk: SUnit port (TestCase/TestSuite/TestResult/TestFailure) + 19 tests
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 13:43:18 +00:00
2075db62ba
Add :- to op table (prec 1200 xfx); enable assert/asserta/assertz with rule terms
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
- parser.sx: add (":-" 1200 "xfx") to pl-op-table so (head :- body) parses
inside paren expressions (parens reset prec to 1200, allowing xfx match)
- parser.sx: extend pl-token-op to accept "op" token type, not just "atom",
since the tokenizer emits :- as {:type "op" :value ":-"}
- tests/assert_rules.sx: 15 new tests covering assertz/asserta with rule
terms, conjunction in rule body, recursive rules, and ordering
- conformance.sh: wire in assert_rules suite
- 456 → 471 tests, all passing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 13:22:09 +00:00
fa600442d6
smalltalk: String>>format: + universal printOn: + 18 tests
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 13:11:17 +00:00
be2000a048
IO predicates: term_to_atom/2, term_string/2, with_output_to/2, format/1,2, writeln/1
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Adds 6 new built-in predicates to the Prolog runtime and 24 tests covering
term<->atom conversion (bidirectional), output capture, format directives (~w/~a/~d/~n/~~).
456/456 tests passing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 13:00:42 +00:00
04ed092f88
Char predicates: char_type/2, upcase_atom/2, downcase_atom/2, string_upper/2, string_lower/2
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
27 new tests, 432/432 total. char_type/2 supports alpha, alnum, digit,
digit(Weight), space/white, upper(Lower), lower(Upper), ascii(Code), punct.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 12:41:31 +00:00
15da694c0d
smalltalk: Number tower (Fraction, factorial, gcd:/lcm:, etc.) + 47 tests
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 12:31:05 +00:00
5a83f4ef51
Set predicates: foldl/4, list_to_set/2, intersection/3, subtract/3, union/3
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Adds 5 new built-in predicates to the Prolog runtime with 15 tests.
390 → 405 tests across 20 suites (all passing).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-25 12:22:03 +00:00
47249900f2
smalltalk: Stream hierarchy + 21 tests; test.sh timeout 60s -> 180s
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 12:02:37 +00:00
8f0af85d01
Meta-call predicates: forall/2, maplist/2, maplist/3, include/3, exclude/3
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Adds pl-apply-goal helper for safe call/N goal construction (atom or compound),
five solver helpers (pl-solve-forall!, pl-solve-maplist2!, pl-solve-maplist3!,
pl-solve-include!, pl-solve-exclude!), five cond clauses in pl-solve!, and a
new test suite (15/15 passing). Total conformance: 390/390.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 11:59:35 +00:00
8ef05514b5
List/utility predicates: ==/2, \==/2, flatten/2, numlist/3, atomic_list_concat/2,3, sum_list/2, max_list/2, min_list/2, delete/3
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
33 new tests, all 375/375 conformance tests passing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 11:37:52 +00:00
496447ae36
smalltalk: HashedCollection/Set/Dictionary/IdentityDictionary + 29 tests
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 11:27:00 +00:00
0823832dcd
Meta/logic predicates: \\+/not/once/ignore/ground/sort/msort/atom_number/number_string (+25 tests, 342 total)
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-25 11:06:10 +00:00
3be722d5b6
smalltalk: SequenceableCollection methods (13) + String at:/copyFrom:to: + 28 tests
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 10:58:08 +00:00
0b5f3c180e
smalltalk: Exception/on:do:/ensure:/ifCurtailed: + 15 tests
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 10:31:59 +00:00
8ee0928a3d
ISO predicates: succ/2 + plus/3 + between/3 + length/2 + last/2 + nth0/3 + nth1/3 + max/min arith (+29 tests, 317 total)
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-25 10:31:28 +00:00
25a4ce4a05
prolog-query SX API: pl-load + pl-query-all + pl-query-one + pl-query (+16 tests)
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-25 09:58:56 +00:00
fdd8e18cc3
smalltalk: Object>>becomeForward: + 6 tests
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 09:54:40 +00:00
3e83624317
smalltalk: Behavior>>compile: + addSelector:/removeSelector: + 9 tests
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 09:30:18 +00:00
f72868c445
String/atom predicates: var/nonvar/atom/number/compound/callable/atomic/is_list + atom_length/atom_concat/atom_chars/atom_codes/char_code/number_codes/number_chars
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-25 09:27:08 +00:00
1c4ac47450
smalltalk: respondsTo:/isKindOf:/isMemberOf: + 26 tests
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 09:06:40 +00:00
4ced16f04e
smalltalk: Object>>perform: family + 10 tests
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 08:42:08 +00:00
c6f58116bf
prolog: copy_term/2 + functor/3 + arg/3, 14 tests; =.. deferred
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 08:39:32 +00:00
9954a234ae
smalltalk: reflection accessors (Object>>class, methodDict, selectors)
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 08:18:32 +00:00
76ee8cc39b
prolog: findall/3 + bagof/3 + setof/3, 11 tests
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 08:06:35 +00:00
44dc32aa54
erlang: round-out BIFs (+40 tests), full plan ticked at 530/530
Test, Build, and Deploy / test-build-deploy (push) Failing after 10s
2026-04-25 08:06:17 +00:00
ae94a24de5
smalltalk: conformance.sh + scoreboard.{json,md}
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 07:54:48 +00:00
a8cfd84f18
erlang: ETS-lite (+13 tests)
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-04-25 07:32:24 +00:00