beanz Magazine


It looks like JavaScript, has a Python aesthetic, and integrates easily with C/C++. Meet Lua: a scripting language for fantasy computers.

Hey everyone and welcome back to our series highlighting different programming languages. This issue we’re going to discuss a language that’s useful in a lot of different gaming contexts: Lua.

Lua has actually been around for over twenty years but is still going strong. It’s the scripting language for Roblox Studio and for most of the “fantasy computers” on the market right now, like the TIC-80 system described elsewhere in this issue.

Lua is a language that’s designed to be easy to use that also can integrate into projects written in C/C++. That’s why it’s so commonly seen as a scripting language in things like Roblox, TIC-80, or even something as nerdy as a typesetting system for books.

If I were to compare Lua to any other language I’d probably say it’s closest to JavaScript but with Ruby and Python’s aesthetic.

For example, a simple loop through an array that doubles each element looks like:

Become a subscriber and get access to the rest of this article. Plus all our magazine articles.

Stories also include numerous links to help parents, kids, and teachers learn more. Get access today at just $15 per year for online magazine only or $29.99/year for print + online ($35/year outside US)!

Subscribe Today!

Also In The August 2018 Issue

Use SketchUp to recreate the famous optical illusion that grows and shrinks people around the room.

Learn what makes a good rogue-like game and how to make one yourself.

Unleash your inner digital chef through this simple (but mouth-watering) Python activity.

Dinosaur fossils, STEM podcasts, and a day in the life of a paleontologist.

A fun introduction to programming games with fantasy computers. The 70s and 80s are back in style!

Real life treasure hunts are a way to get outdoors, learn map skills, and have fun finding hidden caches near you.

Tips & trips to help you have a great time on the Internet, even when others don’t behave well.

How scientists finally cracked the code behind the mysterious language of Ancient Egypt.

Two small projects introducing you to Edublocks, a language that bridges the gap between Scratch and Python.

Take your CLI skills to the next level as you combine, redirect, and script commands.

It looks like JavaScript, has a Python aesthetic, and integrates easily with C/C++. Meet Lua: a scripting language for fantasy computers.

How the high-tech LIGO made a huge discovery and won its three founders a Nobel Prize.

An introduction to the devices that’ll make your robots zoom, skitter, and spin.

Learn the secrets behind pixels, image blurs, and all your favourite Instagram filters!

Links from the bottom of all the August 2018 articles, collected in one place for you to print, share, or bookmark.

Interesting stories about computer science, software programming, and technology for August 2018.