r/lua • u/kayinfire • Nov 01 '25
Does anyone else use lua as their main language for system automation and shell scripting?
it's no secret that Lua is heavily underrated. ironically, i used to be against lua until i understood how nifty it is as a language. i formerly thought that one had to use index or metatable to create objects, only to find out that i could do this
```
function NameOfObject(instanceVariable1, instanceVariable2)
return{
method1 = function(self)
end,
method2 = function(self)
end,
method3 = function(self)
end,
}
end
```
and just like that it overtook the appreciation i had for how objects can be created in other languages.
in a less subjective sense, however, given how ridiculuously fast lua is compared to the bulk of languages that are interpreted, i committed to it for all my scripting needs.
lua has now become my premier choice for automating anything related to my environment: my file system, my window manager, and even my system settings. it also greatly helps that i can automate repetitive and tedious text editing in neovim with lua as well.
i formerly used python for my scripting needs, and in retrospect, it's rather comical to me how poor python is as a scripting language compared to lua; it's a night and day difference. i can always trust lua for a startup time that is as good as instantaneous, whereas such a thing would be a fool's game in python.
granted, python does have all the abstractions one can hope for, but for system tasks, it's just outright overkill. one does not need a gazillian abstractions for system admin or shell scripting needs
anyways, i've rambled long enough. is there anyone else that uses lua for shell scripting needs and system automation, as opposed to roblox, C programming, game dev, and other low level tasks?
View all comments
Show parent comment
1
u/RiverBard Nov 01 '25
Will do! How does that differ from
io.popen? A quick search doesn't show it in the Reference Manual. I just started using Lua for this earlier this week.