Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: CL reads piece from config.json, LISP tag in main loop

- main() reads config.json to determine piece (like C version does)
- Loads /pieces/<name>.mjs (standalone, no imports) via QuickJS
- LISP tag now drawn every frame in top-right corner (not just splash)
- JS bridge file reader trims null bytes from read-sequence

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+18 -6
+18 -6
fedac/native/cl/main.lisp
··· 324 324 325 325 (defun main () 326 326 "AC Native OS entry point. Runs .mjs pieces via QuickJS or native CL notepat." 327 - ;; Run .mjs pieces via QuickJS bridge 327 + ;; Determine piece: config.json > command-line arg > default 328 328 (unless *js-fallback* 329 - (let ((args (uiop:command-line-arguments))) 330 - (when args 331 - (let ((piece-path (first args))) 332 - (when (and piece-path (search ".mjs" piece-path)) 333 - (return-from main (main-js piece-path))))))) 329 + (let* ((cfg (handler-case (ac-native.config:load-config) 330 + (error () (ac-native.config:make-config)))) 331 + (config-piece (ac-native.config:config-piece cfg)) 332 + (args (uiop:command-line-arguments)) 333 + (piece-name (or config-piece 334 + (when args (first args)) 335 + "notepat")) 336 + (piece-path (if (search "/" piece-name) 337 + piece-name ; already a path 338 + (format nil "/pieces/~A.mjs" piece-name)))) 339 + (when (probe-file piece-path) 340 + (return-from main (main-js piece-path))))) 334 341 (setf *js-fallback* nil) 335 342 336 343 ;; No .mjs piece specified — fall back to native CL notepat ··· 755 762 756 763 ;; Refresh IP every ~5 seconds 757 764 (when (zerop (mod *np-frame* 300)) (refresh-ip)) 765 + 766 + ;; LISP tag (top right) — always visible in CL variant 767 + (when (string= *build-variant* "cl") 768 + (graph-ink *np-graph* (make-color :r 255 :g 200 :b 80 :a 160)) 769 + (font-draw *np-graph* "LISP" (- *np-sw* (font-measure "LISP") 4) 3)) 758 770 759 771 ;; ── Present ── 760 772 (ac-native.drm:drm-present *np-display* *np-screen* *np-scale*)