[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: uses of Lua
- From: "Marek Novak | ACRIOS Systems s.r.o." <novak@...>
- Date: Mon, 28 Mar 2022 17:50:42 +0200
Hello Roberto & all mailing list members,
Maybe I could mention we use Lua (5.1.5 planning to move to 5.4.4) in
our IoT devices. Here is the API we use
https://wiki.acrios.com/en/acr-cv/lua-api .
Basically, as we have constrained resources (STM32L431CC
microcontroller, 256kB FLASH, 64kB SRAM) we adjusted luaconf.h not to
use floats etc.
The use-case of the device is to be a universal scriptable and
programmable converter between Modbus/MBus/wireless MBus and NB-IoT and
LoRaWAN radio protocols. It can be used as data concentrator, smart IoT
end node sensor or actuator etc.
We have implemented over-the-air firmware update, but in IoT networks,
the amount of data to consume during it and also the energy that is
consumed during it has to be kept low - so we profit from having Lua -
in case we need to adjust just the high-level application logic, we
don't update the whole firmware (180-230kB LZF compressed), but just the
lua script (3-8kB).
I went even further in this, and thought of making it possible to
dynamically update the Lua API by uploading a new API function, linked
against already existing firmware, so that every device has its 1-6kB
"patch" area in the firmware. Thanks to that, we can theoretically
replace a buggy API function without re-uploading the whole firmware. I
published a paper on the topic here:
https://ieeexplore.ieee.org/document/8733437 in 2019. However since
then, we did not need to use it in practice yet, but it can save the day
by making it possible to do economy firmware update for thousands of
devices without draining the IoT device batteries, once it is needed.
Thank you for giving world Lua!
(+ sorry for answering first directly to you and now correctly to the
mailing list... this is my first mailing list message)
---
Marek Novak
CTO, ACRIOS Systems s.r.o.
On 28. 03. 22 17:42, Matthew Wild wrote:
On Mon, 28 Mar 2022 at 14:13, Roberto Ierusalimschy
<roberto@inf.puc-rio.br <mailto:roberto@inf.puc-rio.br>> wrote:
Are there new relevant uses of Lua we should be aware of?
("new" ≈ released in the last year.)
Some interesting new Lua-based or related projects that crossed my radar
in the past year or so:
- SNKRX, an open-source game written in Lua. Steam:
https://store.steampowered.com/app/915310/SNKRX/
<https://store.steampowered.com/app/915310/SNKRX/> Github:
https://github.com/a327ex/SNKRX <https://github.com/a327ex/SNKRX>
- MicroStudio is an online game development environment, it added Lua
support this year:
https://microstudio.dev/community/news/microstudio-now-supports-4-programming-languages-microscript-python-javascript-and-lua/254/
<https://microstudio.dev/community/news/microstudio-now-supports-4-programming-languages-microscript-python-javascript-and-lua/254/>
- RedBean is a self-contained portable binary web server. It embeds Lua
for dynamic page generation: https://redbean.dev/ <https://redbean.dev/>
- FullMoon extends RedBean's default Lua runtime with a more extensive
framework for web applications: https://github.com/pkulchenko/fullmoon
<https://github.com/pkulchenko/fullmoon>
- Lite XL is a GUI text editor written in Lua:
https://github.com/lite-xl/lite-xl <https://github.com/lite-xl/lite-xl>
- https://supershields.io/ <https://supershields.io/> is a web service
that can dynamically generate "badges" (small informational images)
backed by Lua scripts (dev docs:
https://github.com/0ddParity/supershields/wiki/Supershields-scripting
<https://github.com/0ddParity/supershields/wiki/Supershields-scripting> )
- Self-contained Lua 5.1 distribution (Go reimplementation):
https://github.com/tongson/LadyLua <https://github.com/tongson/LadyLua>
- Yuescript is a Moonscript dialect (compiles to Lua):
https://github.com/pigpigyyy/Yuescript
<https://github.com/pigpigyyy/Yuescript>
- The mpv video player supports Lua plugins (not new), enabling
experiments such as https://github.com/dfaker/VR-reversal/
<https://github.com/dfaker/VR-reversal/>
- LuaRT is a Windows-focused Lua distribution/framework:
https://www.luart.org/ <https://www.luart.org/>
- Roblox open-sourced their Lua-derived scripting language:
https://luau-lang.org/ <https://luau-lang.org/>
- Zoltan, for hosting Lua in Zig programs:
https://zig.news/ranciere/zoltan-a-minimalist-lua-binding-4mp4
<https://zig.news/ranciere/zoltan-a-minimalist-lua-binding-4mp4>
- "Writing Compiler Front-Ends for LLVM with Lua using Mewa":
https://www.codeproject.com/Articles/5301384/Writing-Compiler-Front-Ends-for-LLVM-with-Lua-usin
<https://www.codeproject.com/Articles/5301384/Writing-Compiler-Front-Ends-for-LLVM-with-Lua-usin>
- LunarML, ML->Lua compiler: https://github.com/minoki/LunarML
<https://github.com/minoki/LunarML>
- Lua for PalmOS:
https://oldvcr.blogspot.com/2021/08/plua-revisited-lua-for-palmos-and.html
<https://oldvcr.blogspot.com/2021/08/plua-revisited-lua-for-palmos-and.html>