As mentioned in an earlier thread, I've been working on porting the Lua interpreter to the Netburner runtime. I'm happy to announce that as of the next beta release, it will available. It is still a work in progress, lacking drivers for most Netburner library functions, but it functions and is fairly high level.
Some information about the implementation of the Lua interpreter itself:
- It is dynamically allocated. It currently does not have a setting to create a soft limit.
- All numbers alike. The type is set by a compile time flag. It defaults to double.
- Strings are internally cstrings: memory efficient, but resizing, concatination, etc. are expensive as usual.
That said, the memory usage is on the order of 200k flash and ram for the interpreter functions and ~20k ram for a base interpreter instance. Speed seems acceptable for user facing code, but has not been tested currently for extreme performance (though, anyone wanting to use a scripting language in an interrupt routine, let me know the results).
I'm working on getting a couple basic example apps for it to demonstrate user customizable webpages and emails, as well as examples for interfacing between Lua and C/C++ (populating a Lua environment/retrieving return values).