Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any language generate targeting code in lua with ruby-like sugar?

Is there any project trying to wrap the Lua with some ruby-like sugar just like what CoffeeScript do to javascript?

I think that will be fun since Lua's syntax is ... not so sweet i think.

like image 497
wsxiaoys Avatar asked Apr 30 '11 11:04

wsxiaoys


2 Answers

MoonScript is a new language that compiles to lua with syntax inspired by CoffeeScript

Language reference with more examples:
http://moonscript.org/reference/

like image 69
zah Avatar answered Nov 15 '22 10:11

zah


You should have a look at Metalua. It allows you to modify the Lua syntax to your heart's desire, while generating Lua bytecode as a result.

I am not sure there are Ruby-style extensions, but you can get inspiration from pythonic, which makes the syntax more Python-like.

like image 45
Michal Kottman Avatar answered Nov 15 '22 12:11

Michal Kottman