This is proposal for a refactor of the entire 8/16 bit codebase to be useful with Arduino-mk and be split among multiple files with some form of abstraction.
I read and understand Why are the uLisp sources in a single file?
but I really feel that having structured project can be really beneficial, and price to pay (harder to develop with Arduino IDE) is worth paying, mainly because:
Arduino IDE is really limiting
Developers already have multitude of useful tools for software development like debuggers, git, makefiles and there is not really a reason to reinvent everything inside JVM application
It would be possible to merge all architectures under one project, without code duplication and platform specific code could be handled with makefiles.
It could spur more of core development with more accessible codebase.
Compilation times will be improved (compiling only the changed files)
Since Arduino IDE does lot of preprocessing (mainly forward declarations), current codebase is not actually correct C++ code
Currently not all decisions are necessarily good, but it compiles, uploads and runs ATmega1284. And its a start.
Also for me this is a learning exercise, so please point to me any glaring errors that I overlooked.
Next to do:
Improve abstraction of hardware (currently in streams.h, i2c.h, and image.h), so its easier to add new low-level support for protocols and ports on other platforms.
add more comments to make codebase more accessible.
reformat project to be includable as arduino library. Than it would be almost as easy for the users to use uLisp. (double clicking .ino file is pretty high bar, but we can come close).
Another option is to create release file, that is all files merged into one.
Hope you find my contribution worthwhile.