https://gitlab.synchro.net/main/sbbs/-/commit/e2a8307110280f8f5bef30e7
Modified Files:
src/syncterm/Wren.adoc src/syncterm/scripts/console.wren syncterm.wren src/syncterm/wren_bind.c
Log Message:
SyncTERM: Wren console — /mods command + REPL.modules
Adds REPL.modules, a foreign static getter that walks
modules->entries directly to enumerate every module currently
loaded into the VM (including core, every embedded module, every
user script, and anything pulled in via import). Skips empty
slots and tombstones (key is UNDEFINED_VAL for both); non-string
keys are filtered defensively.
console.wren grows a /mods command that calls REPL.modules,
sorts via a byte-wise stringLT_ helper, and prints the result.
Wren's String doesn't implement <, so List.sort()'s default
{|a, b| a < b} comparator aborts on string lists; the helper does
ASCII-safe byte comparison and is reusable for other string sorts
that come up later.
Wren.adoc refreshed: documents the new Hook.dispatch_ contract
("hooks must run synchronously; wrap parking work in
Fiber.new {...}.call()"), corrects the Modal Input section's
description of nextEvent-from-a-hook (now detected and reported,
not silently hung), describes REPL.eval's actual statement-keyword pre-classifier (was still describing the old try-expression-first
flow), and adds REPL.modules + /mods + /? + /q to the command
tables.
Co-Authored-By: Claude Opus 4.7 (1M context) <
noreply@anthropic.com>
--- SBBSecho 3.37-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)