← Back to context

Comment by giraffe_lady

1 day ago

I think if you were going to design a rigorous approach to programming from the ground up as part of a like new quadrivium or something, lua could have a place in it.

But when people decide to learn programming now, they usually have a goal in mind so the best language is the one that lets them keep that objective in focus as they learn. Not necessarily do it most easily: love is good because while making a game with it is a huge undertaking for a novice, they can see the whole time that game-making is what they're building up to.

But for example I've seen rank beginners get really fascinated with data visualization, or interacting with their local government's API, or text generation, or audio stuff. All things that are going to be out of reach for a novice in lua. And a lot of people will show up saying they want to make games, but it's because video games are the one programming artifact they have positive experiences with. Once they start to see the broader possibilities other interests develop.

Anyway I have had a lot of success introducing programming with roblox scripting. It adds a lot of the "missing" lua library features and the script editor is a decent basic IDE that simplifies tooling, another huge pain point for novices.

For non-game focused beginners I've had the best results in ruby. Python works as well once you get going but the whitespace is a frustrating time sink in a classroom environment. In these the strength is being able to grab a library for any API they'd want to work with, and build something that feels like an actual useful tool to them.

> Anyway I have had a lot of success introducing programming with roblox scripting. It adds a lot of the "missing" lua library features and the script editor is a decent basic IDE that simplifies tooling, another huge pain point for novices.

I've had some success introducing programming in Lua to kids (ages 7-12) by way of the OpenComputers Minecraft mod. They were all already into playing modded Minecraft, and getting in-world feedback from running various commands (turning on/off redstone signals, moving around blocks, attacking monsters, etc.) meant that the "boring" time between "hey, let me show you how to program" and something exciting happening was <5 minutes. Beyond Minecraft-specific libraries, the computers in the mod also come with a HTTP client library, an editor and a shell that directly runs Lua scripts.

  • Yeah, this is one of the situations it makes sense to use lua. They're specifically interested in something that can be accomplished in it, and it's already configured into an environment that mitigates some of its weaknesses as a learning language. Roblox scripting is another area where I've had good results introducing kids to programming.