I am experimenting with the ability of uLisp to read and write to the SD card, as detailed in the uLisp docs:
So far, I can perform a (directory) and read from a super-short file (with-sd-card (str “test.lsp”) (read str)) but anything larger causes uLisp to completely hang. It also fails when writing to a file. Getting this working would make it much more practical to load Lisp programs from file, and log results from running apps.
I’d love to hear if anyone has a similar experience, and if this is something that requires some rewriting of the uLisp implementation to work.
Still loving my portable Lisp machine!
And other things that need trying:
- Compiling a new version with #define resetautorun uncommented (so pre-defined code can load when you power up - very handy)
- Experimenting with graphics. Keen to know if graphics are supported!
Ok, I’ve found that the file handling works fine, you just need to be careful!
For example, if you define this function, you can load programs from SD-Card.
This makes it possible to copy sample code to the SD card from the uLisp site, and run it. Should save about three hours of careful typing!
For best results, delete any comments and white space at the start of the Lisp file. That’s what broke my first attempts. I need to write a more robust loading function, but this one is simple and mostly works.
And remember you can use (save-image) and (load-image) to save it, so you don’t need to retype it. Once you have it saved, you can quickly load other Lisp programs from SD.
And yes, graphics under uLisp are supported - although might be a little buggy. One example restarted my PicoCalc with the text upside down..
Having met a few Lisp programmers in my day, I would not be a bit surprised if the person who wrote this implementation of Lisp did that on purpose.
1 Like
Looking through the apps on uLisp.com, some fun recursive stuff 
2 Likes