Thoughts about "Thoughts About App Structure"

Added by hexagon5un almost 4 years ago


I've been playing around with Mecrisp a lot as well, and stumbled on a primitive (?) verison of your hierarchy that suits me well. It doesn't use cornerstoning, b/c frankly I didn't know about it until reading your post (thanks!).

Instead of reverting to cornerstone states, I load up the equivalent of your A+B+C libraries one time, and dump the flash to a .bin file. Then I can just re-flash as needed. That means only going through the comparatively slow serial upload once(ish). I'm also enjoying having the ROM image as a ground-truth for this kind of hyper-flexible development.

I also ended up doing something very similar to your D/E split, although I keep the D code in flash, and keep work-in-progress in E and RAM and reset/reload a lot. When parts of E code get stable enough, they get pushed to ROM, and the code transferred over to the D file, which keeps load times low.

When I've messed up in D -- or it needs a refactor (both of which happen a lot), I just reflash the A+B+C image and re-load the new D into flash. When D finally becomes a "complete" library, I move the file somewhere else and re-dump the flash to a new (A+B+C).bin file and it all starts over again.

That video is great. A very interesting example of a development style that's radically different from mine, but looks like it's a direction to head in. After all, I'm just learning Forth to expand my mind. Already I've found myself writing smaller functions in both C and Python as a result. Time will tell if this is a good thing...