lua-users home
lua-l archive

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


cool language, can you compile it to lua vm?

On Thu, Aug 11, 2011 at 03:07:34PM +0800, Xavier Wang 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?

-- 
cheers
    Yunfan Jiang
{'nick':['jyf', 'geek42'], 'im': {'gtalk': 'jyf1987@gmail.com', 'irc': 'irc.freenode.net#ubuntu-cn'}, 'blog': 'http://geek42.info', 'interesting': {'teck': ['linux', 'python', 'lua', 'c', 'nosql', 'redis', 'nginx'], 'history': ['chinese history',], 'sf': [42,], 'music': ['NewAge style', 'chinese old theme', 'Any strange music']}}