I’d like to be able to edit lisp programs in uLisp (and there’s edit, which works well enough), and then save them to the SD card. There’s more work to be done there (like trimming old copies of functions), but I can’t figure out how to write functions to the SD card such that they can be loaded again later. I can write a function for this, but I’m curious if I’m missing something. For example, I’d like to be able to do
> (defun sqr (x)
"(sqr x)
Return x^2."
(* x x))
> (with-sd-card (str "tools.lsp" 1)
(pprint sqr str))
> (load "tools.lsp")
sqr
nil
Ideally, it would preserve indentation but that’s not strictly necessary. Am I missing a function here?