5 ms·
Lua static binary can be made to be less than ~150k, while providing very advanced high level dynamic language features you'd expect from JavaScript or PHP. I
by lxe 6y ago
Lua static binary can be made to be less than ~150k, while providing very advanced high level dynamic language features you'd expect from JavaScript or PHP.
I used it to build a admin UI for an embedded device without an MMU. The only other alternative available was C/C++, which slowed the iteration cycle significantly.
Yeah it does things in a strange way, but when I used it, those quirks are vastly overshadowed by its benefits.
- jcims 6y agoDid you compile to bytecode on or off the device? I’m thinking about trying to add Lua support to a small motor controller to provide some more advanced capability inside the control loop. But I don’t actually have any experience doing this, and I can’t even decide if I want to try to compile the bytecode on the device or do that off the device and push the blob to the device. It’s pretty capable microcontroller, STM32G4.
- contingencies 6y agoIf anyone wants to be paid for porting https://github.com/nodemcu/nodemcu-firmware https://github.com/nodemcu/nodemcu-firmware firmware to new ARM hardware + ethernet (not wifi) let me know. Other ongoing embedded work available.
- lxe 6y agoOff device cross-compilation of the Lua interpreter binary, but no bytecode compilation -- it was interpreted Lua from what I can recall (10 years ago). Can't tell what's possible now, and I feel like a microcontroller might be too much for Lua.