MoonScript v0.2.3

Today marks MoonScript version 0.2.3, the CoffeeScript inspired language that compiles to Lua. It’s been about 3 months since last release. I've got a couple new features, fixes, Lua 5.2 support and a backwards incompatible change.

You can follow me on twitter for updates or complaints. Also if you're using MoonScript I'd love to hear about it: leafot@gmail.com.

Changes

  • For loops when used as expressions will no longer discard nil values when accumulating into an array table. This is a backwards incompatible change. Instead you should use the continue keyword to filter out iterations you don’t want to keep. Read more here.
  • The moonscript module no longer sets a global value for moonscript and instead returns it. You should update your code:
moonscript = require "moonscript"

New Things

Bug Fixes

  • Numbers that start with a dot, like .03, are correctly parsed
  • Fixed typo in fold library function
  • Fix declaration hoisting inside of class body, works the same as local * now

Other Stuff

MoonScript has made its way into GitHub. .moon files should start to be recognized in the near future.

Web

I've started a couple interesting projects for MoonScript as a web programming language.

  • Lapis — A MoonScript friendly web framework. Includes application routing, a HTML construction MoonScript DSL, and a basic ORM.
  • cloud_storage — A MoonScript/Lua module for interacting with Google Cloud Storage.

Using the following I've created a community powered Lua rock hosting website called MoonRocks:

http://rocks.moonscript.org. (source)

Compiled MoonScript runs inside of the nginx distribution OpenResty. I created a created a Lua rock for running OpenResty on Heroku in conjunction with my Heroku Lua buildpack.

Games

Ludum Dare happened again, two games were created in MoonScript:

Additionally, Michael F has created a game engine, BoxEngine, which natively supports MoonScript.

Thanks

Thanks to everyone who provided feedback for this release. See you next time.