I’ve been hacking on uLisp for a couple months and have a few things that might be of interest. For now this is only in my fork at https://github.com/dastels/ulisp-arm.
Some LispLibrary magic to provide a “load-file” function as well as autoloading a list of files on startup.
Support for the Bounce2 library to allow adding debouncers on input pins.
LIS3DH support in C, but I want to move that to lisp if/as possible. It’s mainly for a project I’m working on.
A relatively complete implementation of Scheme’s format function.
Simple macros: quasiquote, unquote, unquote-splicing, defmacro, macro, and expand. The first 3 have syntactic shortcuts as usual (backquote, comma, at - at is used instead of the usual comma-at due to complication in the lexer).
Added tinyusb support along side SDCard support (used in exactly the same way, using “flashfs” in place of “sd”. Tiny USB provides a flash file system using the external SPI flash storage present on many boards, notably Adafruit’s “Express” boards. Not only that, but it provides access to that flash filesystem directly via mounting as a USB drive. You can copy files to it by drag & drop, etc. as well as edit files directly on it. Eventually reload-on-change support will be added.
Added gensym and intern functions.
Added keywords (symbols that begin with a colon). There always evaluate to themselves and can’t be rebound.
Using several of the above additions, I ported/simplified a common lisp logging package:
(defvar *LOGGER:LEVEL* 3) (defun logger:set-level (level) (setf *LOGGER:LEVEL* level)) (defun logger:do-log (level-name log-level format-str &rest args) (when (<= log-level *LOGGER:LEVEL*) (let ((full-format (concatenate 'string "~A - ~A (~A): " format-str))) (dolist (arg (list log-level level-name (millis))) (push arg args)) (eval `(format t ,full-format @args))))) (defmacro logger:define-level (name level-value) (let ((macro-name (intern (format nil "log~a" name)))) `(defmacro ,macro-name (format-str &rest args) `(logger:do-log ,,name ,,level-value ,format-str @args)))) (logger:define-level :emerg 1) (logger:define-level :alert 2) (logger:define-level :crit 3) (logger:define-level :error 4) (logger:define-level :warn 5) (logger:define-level :notice 6) (logger:define-level :info 7) (logger:define-level :debug 8) (logger:define-level :debug1 9) (logger:define-level :debug2 10) (logger:define-level :debug3 11) (logger:define-level :debug4 12)