lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Yeah, it's not required in this case. I've got a few places where I
need to optimize the generated code a bit.

On Thu, Aug 11, 2011 at 12:07 AM, Xavier Wang <weasley.wx@gmail.com> wrote:
> 2011/8/11 leaf corcoran <leafot@gmail.com>:
>> Hello,
>>
>> I've been working on a little language heavily inspired by
>> CoffeeScript, which I've called MoonScript. The homepage is located at
>> http://moonscript.org
>>
>> It compiles into Lua, but there are numerous ways to actually run the code.
>>
>> The parser is all done in LPeg, and the majority of the compiler
>> itself is written in MoonScript. I've also used a few other libraries
>> (listed on the site) to build the tools.
>>
>> I've also written copious amounts of documentation in the hopes that
>> someone will actually use it, http://moonscript.org/reference
>>
>> The source is located on GitHub: https://github.com/leafo/moonscript
>>
>> I've successfully installed it with LuaRocks on both Linux and OSX. I
>> have not tried it on Windows, but I don't see why it wouldn't work.
>>
>> I think there's some pretty cool stuff in it. By just requiring
>> "moonscript", you can make the require function MoonScript aware and
>> have it automatically build and run .moon files as you would with .lua
>> files. I've also got line number reversal, so errors that happen in
>> the compiled Lua are rewritten to point back to the original
>> MoonScript line.
>>
>> Anyway, check it out the docs to see the rest of the features. I'd
>> appreciate any input (including feature requests). This is the initial
>> release so there might be some bumps.
>>
>> Thanks, Leaf
>>
>>
>
> Looks interesting, A question:
> Why use (function()...end)() method to create a class? if I write
> class in a function, every times the function called, the new function
> will created, is that OK?
>
>