Re:Show HN: Now my pet programming language can run in the b...
by nilslice on Saturday February 10, 2024 @03:24PM
(#39329858)
ah that makes sense! so `compute` can still execute a script with an empty memory (just to test things out)?
feel free to join us on Discord if you’d like: https://extism.org/discord — happy to chat about it there. I think your language embedded in a bunch of apps as a scripting lang (beyond Rust) would be really cool to see.
Re:Show HN: Now my pet programming language can run in the b...
by nbittich on Monday February 12, 2024 @04:02PM
(#39350457)
sorry for the late answer, I've modified the method so that you no longer need to provide the context (see newer version of app.js).
It will be a pleasure to discuss it on discord, I'll already join the server and will contact you in a few days hopefully.
The ctx variable is a piece of memory, kind of the heap where functions and variables are stored during the script execution; I did it that way because I wanted to keep whatever is in that memory after each script execution, so in a prior version you could define a variable x, run the script, then re-run a completely different script, but still have access to the x variable. I removed it at the end because I wasn't sure if it was a good idea, or at the very least should be documented, but I kept the ctx thing there (could easily remove it tho)