Hey all, I made MoonScript about 6 years ago. I used it to build a ton of opensource stuff in addition to the company I founded. I use it every day and I'm very happy with how it's turned out. I regret not updating the language more frequently, but I've been busy building a bunch of stuff in it. The biggest open source project is a web framework for Open Resty: https://github.com/leafo/lapis It's used for the followi…
MoonScript, a programmer friendly language that compiles to Lua
61–70 of 171 posts
Re: MoonScript, a programmer friendly language that compiles to Lua
#62Re: MoonScript, a programmer friendly language that compiles to Lua
#63I understand that people love programming in classes, but I really want something like a stripped-down ES6. In particular, I want: 1. Lists and objects/dicts only; objects have no prototypes at all; objects have no first-class methods, but they can have functions as member variables, and those functions can close over other data in the object 2. All function and variable declaration is anonymous (as a consequence of…
Moonscript uses local by default (compiles to Lua). Here is your code in Moonscript: foo = { x: {1, 2, 3}, y: (a, b, c) -> sum = a + b + c sum * sum }
Re: MoonScript, a programmer friendly language that compiles to Lua
#64Lapis + MoonScript + OpenResty looks like a lot of fun, so I was just starting to get a local environment running for it and immediately ran into the Lua 5.1 and 5.2+ divergence. For someone who has just been a casual observer of the Lua ecosystem over the years, can someone talk about the community's feelings towards that divergence? The OpenResty docs basically state it's not worth the effort to support anything bu…
Re: MoonScript, a programmer friendly language that compiles to Lua
#65Re: MoonScript, a programmer friendly language that compiles to Lua
#66Adding superlatives to your stuff is, to me, just noise. e.g: "fast", "simple", "friendly", "lightweight". I would rather provide conclusive proof, like some side to side comparison of features to illustrate how idiomatic MoonScript is supposedly friendlier than Lua. Personally I think the changes are not necessarily in the right direction: For example, what if you have a typo in a variable identifier when assigning…
I see it as a toy language. The only person I think would find it useful is leafo himself since he can edit it however he wants. But everyone else should stay away from it. Plain Lua is so much better.
I really enjoy using it.
Re: MoonScript, a programmer friendly language that compiles to Lua
#67I was on a team that used Lua in production on tens of thousands of machines running 24/7. The Lua interpreter was the weak link in the system, requiring at least daily restarts. Squashed so many bugs over the years, and still found more and more all the time. What I'm saying is, the Lua interpreter itself is flawed and I can't imagine using it as a runtime if I had the chance to avoid it. That said, the language was…
Re: MoonScript, a programmer friendly language that compiles to Lua
#68Can this be used instead of Lua with Redis? Is there an example somewhere of that?
Re: MoonScript, a programmer friendly language that compiles to Lua
#69"Moonscript is like CoffeeScript for Lua" That's a very succinct description and from skimming the examples, quite apt. But what I want is Typescript for Lua, specifically to use with Redis. That way I can define interfaces for my keys/values and have static checks on their usage.
Re: MoonScript, a programmer friendly language that compiles to Lua
#70Lapis + MoonScript + OpenResty looks like a lot of fun, so I was just starting to get a local environment running for it and immediately ran into the Lua 5.1 and 5.2+ divergence. For someone who has just been a casual observer of the Lua ecosystem over the years, can someone talk about the community's feelings towards that divergence? The OpenResty docs basically state it's not worth the effort to support anything bu…
For me personally, the advantages of luajit currently outweigh the desire to upgrade to newer versions of the language.
Regarding Lua 5.1 being old, I haven't really found it to be an issue.. Lua isn't like most scripting languages, it doesn't come with a huge standard library. It's effectively just the language and some primitives. So it ages quite well as is.