4 ms·
noob question from a hardware guy : what is a small embeddable dynamic language? What would be a user-case for example?
by logtempo 3y ago
noob question from a hardware guy : what is a small embeddable dynamic language? What would be a user-case for example?
- bbkane 3y ago"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-scripting/intro-to-scripting 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-file#typical-uses https://github.com/openresty/lua-nginx-module?tab=readme-ov-... - configure and extend NGINX https://wezfurlong.org/wezterm/config/lua/general.html 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-config/wezterm/format_tab_title.lua https://github.com/bbkane/dotfiles/blob/master/wezterm/dot-c... https://m.youtube.com/watch?v=MQBr9hwf0BY https://m.youtube.com/watch?v=MQBr9hwf0BY - configure your text editor
- __s 3y agoThe 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 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
- corysama 3y agoA hardware guy might appreciate https://github.com/snabbco/snabb https://github.com/snabbco/snabb https://blogs.igalia.com/dpino/2017/11/13/snabb-network-toolkit/ https://blogs.igalia.com/dpino/2017/11/13/snabb-network-tool...
- thisislife2 3y agoAutomation. 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/ https://www.gnu.org/software/guile/ ).
- jcarrano 3y agoLua 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.