Gpascal as a sandbox interpreter?

Posted by Andrews on Sun 17 Mar 2019 02:03 AM — 4 posts, 17,216 views.

#0
I was thinking about this esp32 library which displays VGA directly from an esp32:

https://www.youtube.com/watch?v=G70CZLPjsXU&t=213s
https://www.youtube.com/watch?v=qJ68fRff5_k
https://www.youtube.com/watch?v=wu5sySCW5NE
https://www.tindie.com/products/bitluni/esp32-vga-board/

I was thinking it would be great to be able to load scripts from the web that could run programs and drive graphics and sound using the above library on an esp32.

There's not much free memory on the esp32 so no chance of HTML working.

Ideally it would be a simple programming language, and also be a secure sandbox so downloaded scripts could not directly program the esp32 CPU and could not send network requests to the local network.

I got to thinking - hey, maybe Gpascal might fit the bill... it seems a good simple language, able to control sprites and sound.

Of course it would have to be rewritten for the esp32 - it's a big project.

But I was interested to hear what anyone else thought about this idea.

Do you think gpascal might be a good simple language to run sandboxed scripts downloaded from the Internet? An embedded systems programming/scripting/graphics language.

It's really just a fun thought experiment as I don't have the time or skills to implement it but I do like the idea of Gpascal having a modern purpose.
Amended on Sun 17 Mar 2019 02:50 AM by Andrews
Australia Forum Administrator #1
GPascal comprised an editor, a compiler and an interpreter. Which of those would you be proposing to put on this chip?
#2
The idea being that a Gpascal script is loaded via HTTP(S) from some server and run on the esp32.

Presumably that means the script would need to be compiled and then run via the interpreter ... is that how Gpascal works?

No need for an editor as the input files would be text loaded via HTTP.
Australia Forum Administrator #3
Considering that the source for Gpascal is 6502 assembler, attempting to do an interpreter would basically be a rewrite, assuming you are going to program it in C or C++.

It could be done, but you may as well do something similar to Lua.