Nice language
It reminds me the syntax of Groovy. It's a quite new language, isn't it?
But it's suuuuch a pain to install on Windows ... I had to:
- Download luarocks and run install.bat
- Add C:\LuaRocks\bin to the PATH
- Install
wget (required by LuaRocks. Why doesn't it integrate it?)
- Add c:\Program Files (x86)\GnuWin32\bin to the PATH
- Install
Visual Studio Express because... Moonscript's dependency "lpeg" is built with VC's command "cl"
- Add C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64 to the PATH (there are several cl.exe versions in the installation directory, use the one which runs on your computer)
- Install
git required by Moonscript's dependency "luafilesystem"
- Add C:\Program Files (x86)\Git\bin to the PATH
- Open the Visual Studio 2010 Express command line prompt for 'cl.exe' to work
- Run luarocks:
http://moonscript.org/#installation- Add C:\LuaRocks\bin to the PATH
- Copy all the .dll files from C:\LuaRocks\lib\lua\5.1 to C:\LuaRocks\bin (strangely "C:\LuaRocks\lib\lua\5.1" is not scanned when loading Lua modules)
And now "moonc test.moon" throws:
lua: fatal error: `C:\LuaRocks/share/lua/5.1//alt_getopt.lua:75: attempt to get length of local 'arg' (a nil value)
stack traceback:
C:\LuaRocks/share/lua/5.1//alt_getopt.lua:75: in function 'get_ordered_opts'
C:\LuaRocks/share/lua/5.1//alt_getopt.lua:156: in function 'get_opts'
[string "..."]:11: in main chunk
Any idea? The wierd thing is that I cannot find where alt_getopt is used by Moonlight in its source code.
[edit] get_opts is actually called from inlined Lua code in moonc.exe. Command-line arguments doesn't appear to be correctly propagated to the "arg" variable, may be a Moonscript bug on Windows ?