Lua

Lua Series

Lua is a small scripting language designed to be embedded into C/C++ code. It is commonly used for this purpose in games and, most famously, in Roblox. Engineering teams often turn to Lua when they need to include some type of scripting and/or configuration in their systems. It provides a robust scripting engine purposely designed for embedding and is covered by a relatively non-restrictive license.

I first came across Lua when configuring routing for Nginx. It was useful, easy to learn, and, most importantly, robust. I followed that up with some scripting in Redis which was equally as useful. I did not think much more about it until I started using Neovim for which Lua is the language for creating plugins. This was when I started to have a lot of fun with Lua.

My intent with this series

This is not the place to learn Lua (check out the resources section for some ideas with that). My intention is to cover the basics sufficiently that it provides a quick refresher when I come back to Lua after a break. From time to time I add interesting tidbits that I stumble across and/or learn the hard way whilst tackling my own projects.

Moments that I fell in love with Lua

WTF Lua moments

Enjoy your Lua journey

Lua is a ton of fun to learn and it is likely that you will come across Lua used as a scripting language in various tools as you progress through your career. It is also a language you can learn easily enough when you need to, so there is no need to go and learn Lua without a need, but I did find it educational to work with a language designed to be embedded and the table data structure got me thinking a lot about language design choices.

Tools

Web

Languages

Data