Page 1 of 4

MoonScript & love

Posted: Tue Aug 16, 2011 6:55 am
by leafo
Hi everyone,

I recently released a programming language that I made which compiles into lua. It's called moonscript. The homepage is here: http://moonscript.org and the reference manual is here: http://moonscript.org/reference and the code is here: https://github.com/leafo/moonscript.
I've used a similar project called CoffeeScript as inspiration for the syntax. Moonscript might be a little different compared to what you've been programming in, but after using it for a while I've found the syntax quite nice.

I've known about love for some time now and I figured it would be a good fit for moonscript. I've attempted to put moonscript directly into love, and it seems to be working. I added a special loader that searches for .moon files in addition to .lua files in the love project directory. It builds right into love, so there is no extra stuff to install.

I uploaded it to my github, https://github.com/leafo/moonscript-love (sorry I don't know hg). If there is any interest in using it I'll try to put together some windows/osx builds. Works great on linux at the moment.

Any input appreciated, thanks.

Re: MoonScript & love

Posted: Tue Aug 16, 2011 12:06 pm
by pancakepalace
It seems like a really powerful language. You've fixed a lot of things I don't like about Lua, like repeating local, not being able to do +=, and the massively annoying fact that function parameters cannot have default values. Good job.

My only criticism is that the language is a tad too flexible for my taste. I imagine a job where I would have to maintain moonscripts written in extreme flexible fashion and I would be pulling my hair out screaming for Lua! Used personally, this doesn't cause a problem as I could obviously dictate what rules I want to follow.

Re: MoonScript & love

Posted: Tue Aug 16, 2011 12:27 pm
by TechnoCat
I actually wasn't going to try it.
But, seeing how you built it into LOVE and integrated any sort of extra work I would have to do, I have to try it out now. Good work.

Re: MoonScript & love

Posted: Tue Aug 16, 2011 3:21 pm
by bmelts
Oh man, MoonScript looks awesome. I'm definitely gonna be trying this out. And maybe making a Mac build of moonscript-love.

Might I suggest LÜNA for the name of your LÖVE fork?

Re: MoonScript & love

Posted: Tue Aug 16, 2011 11:28 pm
by Robin
Looks very interesting. It looks like it has some code duplication in the generated code. I don't know if it is feasible to fix it, though.

Re: MoonScript & love

Posted: Wed Aug 17, 2011 12:09 am
by Taehl
Moonscript doesn't interest me. Sorry. It just looks too... Loose, for my taste. I like Lua because it's very straightforward and literal. Moonscript looks "gentler", but Lua just feels more pure and clean. I like how Lua will let me do anything I want with my whitespace. *Shrugs* There can be no language that's best for everyone. But it looks like a good project.

Re: MoonScript & love

Posted: Wed Aug 17, 2011 2:28 am
by pancakepalace
Lua would be super awesome if it could just fix a few things to streamline the syntax. I find it unacceptable that it does not have the following features: 1) default params for functions, 2) += operators, 3) ternary conditionals. I also prefer braces to the if/then/else/end syntax which reminds me of my basic days back in the 80's.

I looked at moonscript some more, and I have to agree with Taehl. It's just way to flexible for my taste.

Re: MoonScript & love

Posted: Wed Aug 17, 2011 3:05 pm
by vpdp_pc
Very interesting. I hope there is a build for that project (Love with Moonscript). Thanks

Re: MoonScript & love

Posted: Wed Aug 17, 2011 5:07 pm
by Roland_Yonaba
Think I'm definitely going to try this.
Awesome work.

Re: MoonScript & love

Posted: Fri Aug 19, 2011 8:19 am
by T-Bone
Looks cool, and I love how it simply just works with Lua and even LÖVE. Still, the syntax isn't really my style, so I'll stick with vanilla Lua. Still cool, though :neko: