MoonScript & love

General discussion about LÖVE, Lua, game development, puns, and unicorns.
leafo
Prole
Posts: 28
Joined: Tue Aug 16, 2011 6:01 am

MoonScript & love

Post 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.
pancakepalace
Prole
Posts: 40
Joined: Wed Aug 03, 2011 3:13 pm

Re: MoonScript & love

Post 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.
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

Re: MoonScript & love

Post 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.
User avatar
bmelts
Party member
Posts: 380
Joined: Fri Jan 30, 2009 3:16 am
Location: Wiscönsin
Contact:

Re: MoonScript & love

Post 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?
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: MoonScript & love

Post 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.
Help us help you: attach a .love.
User avatar
Taehl
Dreaming in associative arrays
Posts: 1025
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: MoonScript & love

Post 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.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
pancakepalace
Prole
Posts: 40
Joined: Wed Aug 03, 2011 3:13 pm

Re: MoonScript & love

Post 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.
vpdp_pc
Prole
Posts: 15
Joined: Fri Jul 29, 2011 5:39 am

Re: MoonScript & love

Post by vpdp_pc »

Very interesting. I hope there is a build for that project (Love with Moonscript). Thanks
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: MoonScript & love

Post by Roland_Yonaba »

Think I'm definitely going to try this.
Awesome work.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: MoonScript & love

Post 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:
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest