Loading CLAUDE.md +25 −8 Original line number Diff line number Diff line Loading @@ -2,9 +2,14 @@ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Related Documentation - **Gendl Lisply Backend**: See `gwl/lisply-backend/CLAUDE.md` for HTTP API access to Gendl REPL - **Emacs Lisply Backend**: See `skewed-emacs` repository: `dot-files/emacs.d/sideloaded/lisply-backend/CLAUDE.md` for Emacs HTTP API access - Both services can run simultaneously for comprehensive development workflow ## Build and Run Commands - Start Docker container: `./docker/run` - Connect with SLIME: `M-x slime-connect RET localhost RET 5200 RET` - Connect with SLIME: `M-x slime-connect RET localhost RET 4201 RET` - Start Gendl services: `(gendl:start-gendl!)` - Access web interface: `http://localhost:9081/geysr` - Run regression tests: `(gdl-lift-utils:run-regression-tests-pass-fail)` Loading @@ -13,6 +18,12 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co - Add to Quicklisp: `(pushnew "/path/to/project/" ql:*local-project-directories* :test #'equalp)` - Load project: `(ql:quickload :project-name)` ## HTTP API Access - **Gendl Lisply Backend**: `http://localhost:9081/lisply/lisp-eval` (POST with JSON `{"code": "lisp-expression"}`) - **Emacs Lisply Backend**: `http://localhost:7080/lisply/lisp-eval` (POST with JSON `{"code": "emacs-lisp-expression"}`) - Use `curl -X POST http://127.0.0.1:9081/lisply/lisp-eval -d '{"code": "(+ 1 2 3)"}' 2>&1 | cat` for testing - Enable development mode: `(setq gwl:*developing?* t)` for Update!/SetSelf links ## Code Style Guidelines - Package names should be kebab-case (e.g., `:gendl`, `:geom-base`) - Function/variable names should be lowercase with hyphens Loading Loading @@ -41,17 +52,21 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ```lisp (define-object custom-object (base-object) :input-slots (("Documentation string" required-param) ("Documentation string" param-with-default default-value)) ("Documentation string" required-param ("Documentation string" optional-param 42) (width-input 8)) :computed-slots ((computed-value (* 2 (the param-with-default))) (display-controls (list :color :blue :transparency 0.5))) ((length (+ (the optional-param) (the width-input))) (display-controls (list :color :blue :transparency 0.5)) ) :objects ((child-object :type 'box :length (the param-with-default) :width 10 :length 10 :width (twice (the-child length)) :height 5))) ``` Loading @@ -62,3 +77,5 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co - Examine object structure: `(the (message-list))` - View inputs only: `(the (message-list :category :inputs))` - For uncertain slots: `(defaulting (the slot-name) default-value)` also see in gendl codebase `documentation/historical/doc/usage.txt` apps/geysr/source/assembly.gdl +0 −1 Original line number Diff line number Diff line Loading @@ -119,7 +119,6 @@ ToDO: ((:meta :name "author" :content "Genworks")) ((:meta :name "keywords" :content "KBE, CL")) ((:meta :name "mobile-web-app-capable" :content "yes")) ((:meta :name "viewport" :content "width=device-width, initial-scale=1.0")) ((:script :src "/static/3rdpty/aframe/aframe.min.js")) (unless *developing?* (htm ((:script :type "text/javascript") Loading apps/geysr/source/viewport.gdl +24 −5 Original line number Diff line number Diff line Loading @@ -688,6 +688,29 @@ to call the :write-embedded-x3d-world function.")) () (with-cl-who () ;; ;; FLAG - trying to display pdf drawings directly in frame ;; or other way without plugin ;; #+nil (let ((drawing (let* ((display-objs (ensure-list (the display-list-objects))) (maybe-drawing (first display-objs))) (when (and (null (rest display-objs)) maybe-drawing (typep maybe-drawing 'base-drawing)) maybe-drawing)))) (if drawing (htm (:iframe :src (theo drawing pdf-url) :width "100%" :height "100%" :style "border:none;")) (htm (:div :id "no-drawing" :width "100%" :height "100%" :style "border:none;")))) (let ((*display-controls* (the display-controls-hash))) (let ((image-format (if (the 2d-boxes?) (the image-format) :png))) (ecase image-format Loading @@ -701,7 +724,3 @@ to call the :write-embedded-x3d-world function.")) base/expanders/source/inputs.lisp +18 −1 Original line number Diff line number Diff line Loading @@ -39,6 +39,23 @@ (defgeneric ,input-sym (,parent-arg ,val-arg ,self-arg)))) input-slot-syms))))) (defun remove-input-methods (name attr-sym) (dolist (input (getf (child-inputs (find-class name)) attr-sym)) (let* ((symbol-function (symbol-function (glisp:intern (symbol-name input) :gdl-inputs))) (method (find-method symbol-function nil (list (find-class name) (glisp:eql-specializer attr-sym) (find-class t)) nil))) (when method (remove-method symbol-function method) (format t "~%Removed object input ~a for object ~a of object definition ~s~%" input attr-sym name)))) ) (defun input-methods (name attr-sym keys expressions special-keys) (let ((input '+input+ #+nil(gensym))) (let ((remove-defunct-expressions Loading base/macros/source/define-object.lisp +7 −3 Original line number Diff line number Diff line Loading @@ -98,12 +98,16 @@ overview of <tt>define-object</tt> syntax." (,new-message-keys ',messages)) (dolist (key (set-difference ,old-message-keys ,new-message-keys)) (let ((method (ignore-errors (find-method (symbol-function (glisp:intern (symbol-name key) :gdl-slots)) nil (list ,class-arg) nil)))) (find-method (symbol-function (glisp:intern (symbol-name key) :gdl-slots)) nil (list ,class-arg) nil)))) (when method (when *report-gdl-redefinitions?* (format t "~%Removing slot: ~a for object definition: ~s~%" key ',name)) (remove-method (symbol-function (glisp:intern (symbol-name key) :gdl-slots)) method))))) (remove-method (symbol-function (glisp:intern (symbol-name key) :gdl-slots)) method) (remove-input-methods ',name key) )))) ,(when (and *compile-documentation-database?* documentation) `(when *load-documentation-database?* Loading Loading
CLAUDE.md +25 −8 Original line number Diff line number Diff line Loading @@ -2,9 +2,14 @@ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Related Documentation - **Gendl Lisply Backend**: See `gwl/lisply-backend/CLAUDE.md` for HTTP API access to Gendl REPL - **Emacs Lisply Backend**: See `skewed-emacs` repository: `dot-files/emacs.d/sideloaded/lisply-backend/CLAUDE.md` for Emacs HTTP API access - Both services can run simultaneously for comprehensive development workflow ## Build and Run Commands - Start Docker container: `./docker/run` - Connect with SLIME: `M-x slime-connect RET localhost RET 5200 RET` - Connect with SLIME: `M-x slime-connect RET localhost RET 4201 RET` - Start Gendl services: `(gendl:start-gendl!)` - Access web interface: `http://localhost:9081/geysr` - Run regression tests: `(gdl-lift-utils:run-regression-tests-pass-fail)` Loading @@ -13,6 +18,12 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co - Add to Quicklisp: `(pushnew "/path/to/project/" ql:*local-project-directories* :test #'equalp)` - Load project: `(ql:quickload :project-name)` ## HTTP API Access - **Gendl Lisply Backend**: `http://localhost:9081/lisply/lisp-eval` (POST with JSON `{"code": "lisp-expression"}`) - **Emacs Lisply Backend**: `http://localhost:7080/lisply/lisp-eval` (POST with JSON `{"code": "emacs-lisp-expression"}`) - Use `curl -X POST http://127.0.0.1:9081/lisply/lisp-eval -d '{"code": "(+ 1 2 3)"}' 2>&1 | cat` for testing - Enable development mode: `(setq gwl:*developing?* t)` for Update!/SetSelf links ## Code Style Guidelines - Package names should be kebab-case (e.g., `:gendl`, `:geom-base`) - Function/variable names should be lowercase with hyphens Loading Loading @@ -41,17 +52,21 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ```lisp (define-object custom-object (base-object) :input-slots (("Documentation string" required-param) ("Documentation string" param-with-default default-value)) ("Documentation string" required-param ("Documentation string" optional-param 42) (width-input 8)) :computed-slots ((computed-value (* 2 (the param-with-default))) (display-controls (list :color :blue :transparency 0.5))) ((length (+ (the optional-param) (the width-input))) (display-controls (list :color :blue :transparency 0.5)) ) :objects ((child-object :type 'box :length (the param-with-default) :width 10 :length 10 :width (twice (the-child length)) :height 5))) ``` Loading @@ -62,3 +77,5 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co - Examine object structure: `(the (message-list))` - View inputs only: `(the (message-list :category :inputs))` - For uncertain slots: `(defaulting (the slot-name) default-value)` also see in gendl codebase `documentation/historical/doc/usage.txt`
apps/geysr/source/assembly.gdl +0 −1 Original line number Diff line number Diff line Loading @@ -119,7 +119,6 @@ ToDO: ((:meta :name "author" :content "Genworks")) ((:meta :name "keywords" :content "KBE, CL")) ((:meta :name "mobile-web-app-capable" :content "yes")) ((:meta :name "viewport" :content "width=device-width, initial-scale=1.0")) ((:script :src "/static/3rdpty/aframe/aframe.min.js")) (unless *developing?* (htm ((:script :type "text/javascript") Loading
apps/geysr/source/viewport.gdl +24 −5 Original line number Diff line number Diff line Loading @@ -688,6 +688,29 @@ to call the :write-embedded-x3d-world function.")) () (with-cl-who () ;; ;; FLAG - trying to display pdf drawings directly in frame ;; or other way without plugin ;; #+nil (let ((drawing (let* ((display-objs (ensure-list (the display-list-objects))) (maybe-drawing (first display-objs))) (when (and (null (rest display-objs)) maybe-drawing (typep maybe-drawing 'base-drawing)) maybe-drawing)))) (if drawing (htm (:iframe :src (theo drawing pdf-url) :width "100%" :height "100%" :style "border:none;")) (htm (:div :id "no-drawing" :width "100%" :height "100%" :style "border:none;")))) (let ((*display-controls* (the display-controls-hash))) (let ((image-format (if (the 2d-boxes?) (the image-format) :png))) (ecase image-format Loading @@ -701,7 +724,3 @@ to call the :write-embedded-x3d-world function."))
base/expanders/source/inputs.lisp +18 −1 Original line number Diff line number Diff line Loading @@ -39,6 +39,23 @@ (defgeneric ,input-sym (,parent-arg ,val-arg ,self-arg)))) input-slot-syms))))) (defun remove-input-methods (name attr-sym) (dolist (input (getf (child-inputs (find-class name)) attr-sym)) (let* ((symbol-function (symbol-function (glisp:intern (symbol-name input) :gdl-inputs))) (method (find-method symbol-function nil (list (find-class name) (glisp:eql-specializer attr-sym) (find-class t)) nil))) (when method (remove-method symbol-function method) (format t "~%Removed object input ~a for object ~a of object definition ~s~%" input attr-sym name)))) ) (defun input-methods (name attr-sym keys expressions special-keys) (let ((input '+input+ #+nil(gensym))) (let ((remove-defunct-expressions Loading
base/macros/source/define-object.lisp +7 −3 Original line number Diff line number Diff line Loading @@ -98,12 +98,16 @@ overview of <tt>define-object</tt> syntax." (,new-message-keys ',messages)) (dolist (key (set-difference ,old-message-keys ,new-message-keys)) (let ((method (ignore-errors (find-method (symbol-function (glisp:intern (symbol-name key) :gdl-slots)) nil (list ,class-arg) nil)))) (find-method (symbol-function (glisp:intern (symbol-name key) :gdl-slots)) nil (list ,class-arg) nil)))) (when method (when *report-gdl-redefinitions?* (format t "~%Removing slot: ~a for object definition: ~s~%" key ',name)) (remove-method (symbol-function (glisp:intern (symbol-name key) :gdl-slots)) method))))) (remove-method (symbol-function (glisp:intern (symbol-name key) :gdl-slots)) method) (remove-input-methods ',name key) )))) ,(when (and *compile-documentation-database?* documentation) `(when *load-documentation-database?* Loading