Programming is a wonderful skill to learn. It can allow you to automate otherwise repetitive tasks on your computer. Create a database of your movie, book, music, or Lego collection. Access remote web services to see who is in space. Even make games. In short anything you can think of getting a computer to do for you, you can do with programming.
Learning to program also teaches you how to solve problems. It gets you thinking logically. Breaking down hard or complex tasks into small, manageable pieces. To tell a computer what to do, you first need to figure out how to do it!
So where do you start?
Computers are given instructions in something called a programming language. A bit like the language we use everyday - be it English, French, or Japanese - it is a human readable, easily written set of instructions that tell a computer exactly what to do. There are literally hundreds of programming languages out there. So which one do you learn?
Lua is a very small and powerful language. It uses a small number of English words and a handful of special symbols to allow you to create pretty much any program you could want. It supports different styles of programming, and it's also rather fun. The basics are simple to learn, and the more advanced concepts are pretty much optional.
Once you grasp the basics, which are presented here in this guide, you can write a number of neat little programs that run on any computer with the Lua interpreter on it. Hang on? Why does the computer need an interpreter? Don't all computers speak all programming languages?
Lua is a programming language. It can be read and written by humans. A computer on the other hand only understands binary. That's a language made up solely of the numbers 0 and 1. So how does your Lua program get turned into the binary language that a computer understands? The answer is the Lua interpreter.
The Lua interpreter is a computer program. You install it much like you do a word processor or photo viewer application. It's job though is very different to those other applications. Rather than present a user interface for you to interact with, the Lua interpreter's job is to translate Lua programs into something the computer can run.
There are many layers to this process, but you can safely ignore those. The thing to understand is that the Lua interpreter takes a program written in the Lua language and runs it on the computer to do what you told it to.
Now we know the Lua interpreter can run a program on the computer, how do we go about writing a program in the Lua language? Much like we can write documents in a word processor application, we can use an integrated development environment (IDE) application to help us write Lua programs.
ZeroBrane Studio is just such an application. It's free and it also happens to be written in the Lua programming language. It is a simple to use and powerfully featured application that runs on Windows, MacOS, and Linux computers. An IDE helps you to write your Lua programs using features like syntax highlighting and auto complete. It also helps you fix problems with your program using a debugger. Don't worry if that all sounds a little alien to you right now. All will be covered in this guide.
Right, that's enough talk about programming and Lua. Let's get your computer setup to write and run Lua programs.
This is by far the trickiest step to instruct you on, as all computers are subtly different, and things may change since this was written. If you get stuck on a step, or something doesn't work, your best bet is to turn to the internet and search for help. Be specific with your search, include the details of the error message you are getting and you should land on a helpful result. You could also ask an AI such as CoPilot for help. (Just remember though, that AI will very often make up an answer that is completely wrong!)
Go to the ZeroBrane Studio website.
Click the download link.
Free software is often supported by voluntary donations. If you'd like to donate to the maker then you can do so here. If not, click the Take me to the download page this time link to download the program without making a donation.
Download the Windows 32bit (exe installer).
Once downloaded, open up your downloads folder and run the exe file.
Pick a suitable destination folder for your installation. I like to use C:\ZeroBraneStudio.
Let the installer run. You now have the Lua interpreter and a Lua IDE installed!
Go to the ZeroBrane Studio website.
Click the download link.
Free software is often supported by voluntary donations. If you'd like to donate to the maker then you can do so here. If not, click the Take me to the download page this time link to download the program without making a donation.
Download the appropriate file for your operating system, and run the installer.
Pick a suitable destination folder for your installation. I like to use C:\ZeroBraneStudio.
Let the installer run. You now have the Lua interpreter and a Lua IDE installed!
Before we write our first program, let's take a look at the IDE and get familiar with it.

Toolbar. You can run and debug your program from here.
Project view. You can see all the files in your current working directory here.
Editor window. You type in your Lua code in this window.
Output window. Any output from your program is shown here.
A project is a folder that contains your Lua scripts. When you start a new program, it is a good idea to create a new project. However you can have multiple programs in one project. Its just an organisation method.
By default the IDE opens a project full of Lua samples. These are invaluable for learning, and I recommend you take a look once you have the basics of Lua syntax learnt. For the samples in this guide we want to use a new project folder for them.
On the toolbar, clik the yellow fodler icon that says Choose a project directory.
In the dialogue window that follows, pick a suitable location on your computer to
create a new folder by navigating to it and clicking the New folder button. Give
it the name little_bit_of_lua.

Now we can write a simple program to test your installation of Lua and the IDE. In the editor window enter the following Lua code.
print("Hello, world!")
Save the program as hello_world.lua. Run the program by clicking the double
green arrow in the tool bar. You should see text in the output window like the
following.
Hello, world!
Congratulations you just wrote and ran your first Lua program! It's only one line long, but we all need to start somewhere. Hello world is the universal first program for learning any programming language (not just Lua).