The C Lua interpreter takes ~150k. It's easy to extend with your own types/functions. So it makes it easy to use as a Turing complete configuration language
Over the last couple weeks I've been integrating gopher-lua (a Lua implementation in Go, which then plays nice with Go types & its GC) into PeerDB for scripting data transformations. It's been easy expose stuff like decimal types to the script. It allows a program to make itself extensible
Automation. It can be used to automate tasks in an app. For example, a common task in a Photo Editor app is to resize photos. But resizing 100's of photos manually can be a pain. If the app has scripting support, you can write a script to resize photos and just run it. It can also be used to add the feature of creating extensions / add-ons for an app. (See https://www.gnu.org/software/guile/ ).
Lua can certainly work, though it takes up a bit more ram than absolutely necessary due to it allocating language data structures (tables mainly) during startup. If you have enough ram it is fine. I ported Lua to the RIOT OS and it was not all that hard.
Comments
noob question from a hardware guy : what is a small embeddable dynamic language? What would be a user-case for example?
"small embeddable dynamic languages" are usually used to configure or program other larger compiled applications. This is bes understood by example:
https://create.roblox.com/docs/tutorials/scripting/basic-scr... - make a mini game in Roblox
https://github.com/openresty/lua-nginx-module?tab=readme-ov-... - configure and extend NGINX
https://wezfurlong.org/wezterm/config/lua/general.html - make your terminal more useful (my personal config changes the tab color based on the process name - https://github.com/bbkane/dotfiles/blob/master/wezterm/dot-c...
https://m.youtube.com/watch?v=MQBr9hwf0BY - configure your text editor
ho I see. It's kind of a programming interface, a "higher level" language, a plug-in.
for exemple, GdScript in Godot game engine would fall into the "embedded dynamic language" ?
Yes I think so- it manipulates and orchestrates the compiled C++ code underneath.
The C Lua interpreter takes ~150k. It's easy to extend with your own types/functions. So it makes it easy to use as a Turing complete configuration language
redis exposes a Lua scripting interface if one wants to avoid latency of executing commands back & forth over network: https://redis.io/docs/interact/programmability/eval-intro
Over the last couple weeks I've been integrating gopher-lua (a Lua implementation in Go, which then plays nice with Go types & its GC) into PeerDB for scripting data transformations. It's been easy expose stuff like decimal types to the script. It allows a program to make itself extensible
A hardware guy might appreciate
https://github.com/snabbco/snabb
https://blogs.igalia.com/dpino/2017/11/13/snabb-network-tool...
Automation. It can be used to automate tasks in an app. For example, a common task in a Photo Editor app is to resize photos. But resizing 100's of photos manually can be a pain. If the app has scripting support, you can write a script to resize photos and just run it. It can also be used to add the feature of creating extensions / add-ons for an app. (See https://www.gnu.org/software/guile/ ).
Lua can certainly work, though it takes up a bit more ram than absolutely necessary due to it allocating language data structures (tables mainly) during startup. If you have enough ram it is fine. I ported Lua to the RIOT OS and it was not all that hard.