Member-only story
Exploring Programming Languages — MoonScript
Let’s continue our exploration of programming languages with a new, interesting one: MoonScript.
Not a Medium subscriber? 😕 You can read this post for free here 🥳
MoonScript is a relatively new language, as it’s only 13 years old. It was first published in 2013.
I think I heard about MoonScript a few years back, but never really paid attention to it.
Fun fact: MoonScript is a CoffeeScript-inspired language that compiles to Lua.
Ok, let’s jump into our main topic, which is creating an LED Numbers application.
The application should work like this: we input 1977, and it returns:
Now, keep in mind that we want to show this to newcomers to MoonScript, not to seasoned developers.
The first thing we’re going to do is create a Table (Dictionary) that holds lists (Similar to a Map in other languages) to hold all the components of the LED numbers:
leds = {"0": {" _ ","| | ","|_| "},
"1": {" ","| ","| "},
"2": {" _ "," _| ","|_ "},
"3": {"_ ","_| ","_| "},
"4": {"…









