3 ms·
I created a language called MoonScript in 2011 It is heavily inspired by CoffeeScript (and Python), it works as a transpiler for Lua. I've since used it regula
by leafo 10y ago
I created a language called MoonScript in 2011
It is heavily inspired by CoffeeScript (and Python), it works as a transpiler for Lua. I've since used it regularly to code dozens of projects.
It's now powering my company along with a handful of websites and supporting libraries. I've also made games and GUI apps with it. The adoption has been pretty minimal, but I'm satisfied regardless. It has definitely improved my productivity.
http://moonscript.org http://moonscript.org
https://github.com/leafo/moonscript https://github.com/leafo/moonscript
- sidegrid 10y agoMoonScript is extremely cool. What are your thoughts on MoonScript in the browser? I know you have an online "Try MoonScript", but what would be the best way to use it in a real (hobby) project with DOM manipulation capabilities? Please don't give up on MoonScript :)
- leafo 10y agoMoonScript is designed to compile to Lua, and there are no good ways to run Lua in the browser right now. It's impossible to write a Lua -> JS transpiler while matching all the same functionality (coroutines), so the only option is to run the entire Lua vm in the browser (The MoonScript online version uses this approach with emscripten). In the future I'd like to be able to run MoonScript in the browser, maybe web assembly is the answer. Another option would be to have a JS target for the MoonScript compiler, but there are some issues with different language features that would make code sharing difficult (1 indexed arrays, metatables, etc.) I have no plans to give up moonscript. I haven't been actively developing it recently though, which I feel guilty about.
- Cyph0n 10y agoleafo! This made the thread 10x better, for me at least :) Since he doesn't want to mention his company, it's called itch.io. It's a game marketplace -- kind of like Steam -- but with a ton of pretty interesting ideas when it comes to advertising, pricing, etc. The really cool thing is that the site is written entirely in MoonScript AND uses the Lapis web framework, which he also wrote entirely in MoonScript. Anyways, if you're ever looking for a place to host and/or sell your game, itch.io is definitely the place to go.