Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

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

feat: CL piece launcher — type notepat.lisp to run CL notepat

C binary detects .lisp pieces and execs /ac-swank --piece <name>.
SBCL takes over with DRM graphics + Swank REPL. notepat.lisp is
the first CL piece, visible in the list command.

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

+37
+9
fedac/native/cl/main.lisp
··· 342 342 (force-output *error-output*) 343 343 (return-from main)))) 344 344 345 + ;; --piece MODE: run a specific CL piece with graphics (launched by C binary) 346 + (let ((piece-arg (second (member "--piece" (uiop:command-line-arguments) :test #'string=)))) 347 + (when piece-arg 348 + (format *error-output* "[cl] Running CL piece: ~A~%" piece-arg) 349 + (force-output *error-output*) 350 + ;; Go straight to native CL notepat (the only CL piece for now) 351 + ;; Future: dispatch to different CL pieces based on piece-arg 352 + (setf *js-fallback* t))) 353 + 345 354 ;; Determine piece: config.json > command-line arg > default 346 355 (unless *js-fallback* 347 356 (let* ((cfg (handler-case (ac-native.config:load-config)
+7
fedac/native/pieces/notepat.lisp
··· 1 + ;;; notepat.lisp — Common Lisp notepat piece 2 + ;;; This is a marker file that tells the C runtime to hand off to /ac-swank 3 + ;;; which runs the native CL notepat (defined in cl/main.lisp). 4 + ;;; 5 + ;;; To run: type "notepat.lisp" at the prompt, or select it from the list. 6 + ;;; The C binary will exec /ac-swank --piece notepat, which launches 7 + ;;; the full CL notepat with DRM graphics, audio, and Swank REPL.
+21
fedac/native/src/ac-native.c
··· 3028 3028 // NOTE: "claude" and "cc" aliases removed — claude.mjs handles auth curtain 3029 3029 // before jumping to terminal:claude itself. 3030 3030 3031 + // Check for .lisp piece — hand off to SBCL 3032 + { 3033 + char lisp_path[256]; 3034 + // Strip .lisp suffix if present 3035 + char lisp_name[128]; 3036 + strncpy(lisp_name, rt->jump_target, sizeof(lisp_name) - 1); 3037 + lisp_name[sizeof(lisp_name) - 1] = 0; 3038 + char *dot = strstr(lisp_name, ".lisp"); 3039 + if (dot) *dot = 0; 3040 + snprintf(lisp_path, sizeof(lisp_path), "/pieces/%s.lisp", lisp_name); 3041 + if (access(lisp_path, F_OK) == 0 && access("/ac-swank", X_OK) == 0) { 3042 + ac_log("[ac-native] Launching CL piece: %s\n", lisp_name); 3043 + // Clean up before exec 3044 + if (logfile) { fflush(logfile); fsync(fileno(logfile)); } 3045 + sync(); 3046 + execl("/ac-swank", "ac-swank", "--piece", lisp_name, NULL); 3047 + // execl failed — fall through to JS path 3048 + ac_log("[ac-native] execl /ac-swank failed: %s\n", strerror(errno)); 3049 + } 3050 + } 3051 + 3031 3052 // Construct piece path: /pieces/<name>.mjs 3032 3053 char jump_path[256]; 3033 3054 snprintf(jump_path, sizeof(jump_path), "/pieces/%s.mjs", rt->jump_target);