Open dragoncoder047 opened 2 years ago
The intention is for code to be compiled for the microcontroller from C - that way small microcontrollers can be used without the overhead of an interpreter. Maybe the word scripting is misleading here(?). I'm planning to explore actually running Cognate on a microcontroller once I've got the new compiler feature complete and stable.
I was worried of that. What I want to do is hook up the microcontroller directly to a storage device (flash drive, SD card, etc), have it read the .cog
files and execute them onboard, without having to be connected to a regular computer to do the compiling. I'm going to be using an ESP32, which has megabytes of both RAM and flash, so memory consumption and speed are not concerns at least for me.
Ah yeah that'd be a problem with the current implementation. I'll almost certainly ship a small interpreter with the new compiler once it's done, but CognaC in its current iteration won't be much help here, sorry!
From the readme:
... but microcontrollers can't compile and run C. Is there a "pure interpreter" for a microcontroller somewhere that actually executes the code instead of transpiling it to C? If there isn't, how do I make one out of this code here?