TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

MoonScript v0.2.2 is released

59 pointsby leafoover 12 years ago

4 comments

jacktoole1over 12 years ago
It's great to see more development of the language! MoonScript is great if you're looking for the niceness of CoffeeScript in an embedded environment (Lua's semantics also behave more sanely than Javascript's). I have roughly 5000 lines of MoonScript powering my side project [1], and it's been a pleasure to write.<p>Any thoughts of letting the 'do' keyword support coffeescript-style 'do' semantics as well? Invoking a multi-line anonymous function is currently a bit impractical, and allowing do to invoke a single function parameter would make that a lot nicer, and allow for capturing variable's in a closure more easily. Example from the coffeescript docs:<p><pre><code> for filename in list do (filename) -&#62; fs.readFile filename, (err, contents) -&#62; compile filename, contents.toString() </code></pre> [1] <a href="http://www.codingspellbook.com/" rel="nofollow">http://www.codingspellbook.com/</a>
评论 #4742110 未加载
lukegruover 12 years ago
Cool project! Just wondering why you decided to roll your own parser. Is there a lua parser generator library?<p>I've been working on a source translator, sort of like coffeescript for VimL [1], and I can't imagine writing the parser myself instead a BNF grammar (but please correct me if I'm wrong, I only took a cursory look at the src)<p>[1] <a href="https://github.com/luke-gru/riml" rel="nofollow">https://github.com/luke-gru/riml</a>
评论 #4742099 未加载
thirdreplicatorover 12 years ago
What's so great about compiling to Lua?
评论 #4742791 未加载
评论 #4742059 未加载
malkiaover 12 years ago
Is there an emacs-mode for it?
评论 #4742386 未加载