moonscript VS TypeScriptToLua

Compare moonscript vs TypeScriptToLua and see what are their differences.

TypeScriptToLua

Typescript to lua transpiler. https://typescripttolua.github.io/ (by TypeScriptToLua)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
moonscript TypeScriptToLua
35 10
3,112 1,963
- 2.9%
4.4 8.3
6 months ago about 1 month ago
Lua TypeScript
- MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

moonscript

Posts with mentions or reviews of moonscript. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-09-13.
  • Why Fennel?
    12 projects | news.ycombinator.com | 13 Sep 2023
    Now I like lua, and think single pass is the way to go for interpreted, since you don't have the disadvantage of a slow compile time no matter how big your codebase gets, BUT its not great to write in. things like +=, ++, are not possible, which means the only solution is to transpile into it, which has led to some good languages like moonscript[0], teal[1] which offers static type checking, an absolute must as your codebase grows.

    [0]: https://moonscript.org/

  • Forth: The programming language that writes itself: The Web Page
    7 projects | news.ycombinator.com | 16 Jul 2023
    That can be very productive and clever, but be - and stay - aware that such polyglot solutions tend to be maintenance headaches in the longer run.

    There is a really nice open source project out there that allows you to train your hearing and your sightreading, but it's written in the authors own language which in turn compiles to JavaScript and the headache to set up their toolchain is such that I haven't bothered fixing any of the bugs that I'm aware of (and there are plenty).

    https://sightreading.training/

    https://github.com/leafo/sightreading.training

    It's written in a language called 'Moonscript':

    https://github.com/leafo/moonscript

    Which compiles to Lua. Which compiles to JS.

    Madness. Nice madness, but still, it stopped me from being a contributor.

  • Lua: The Little Language That Could
    19 projects | /r/programming | 28 May 2023
    RE: the cost of switching at this point, what about languages that compile to Lua? Like https://moonscript.org/. That would let you keep the legacy code, no?
  • Trying to make a website with Lapis
    2 projects | /r/lua | 25 Mar 2023
    In the case of Lapis, it is actually written in Moonscript, which needs a few more things.
  • Launch HN: Moonrepo (YC W23) – Open-source build system
    12 projects | news.ycombinator.com | 21 Feb 2023
  • Using Lua with C++
    9 projects | news.ycombinator.com | 14 Feb 2023
  • Using other languages
    6 projects | /r/ComputerCraft | 8 Feb 2023
    There's also some languages made to compile straight to Lua: - MoonScript is the most popular Lua wrapper - it's built to be more Python-like, featuring indentation-based scopes, function calls without parentheses, lambda syntax, list comprehension, and much more. - Yuescript is a modern update to MoonScript that adds more features (I haven't used it myself, so I'm not entirely sure exactly how it differs from MS). - Teal is a version of Lua that adds static typing for better code standards.
  • Best Websites For Coders
    51 projects | dev.to | 25 Jan 2023
    A programmer-friendly language that compiles to Lua.
  • data types in function definition
    12 projects | /r/lua | 13 Jan 2023
  • A MiniTron In 47 Lines
    2 projects | dev.to | 11 Jan 2023
    This is a sample code for learning, written in Moonscript for TIC-80:

TypeScriptToLua

Posts with mentions or reviews of TypeScriptToLua. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-11-12.
  • Lang Lua
    8 projects | news.ycombinator.com | 12 Nov 2022
    I've had some success with https://github.com/TypeScriptToLua/TypeScriptToLua

    Luau may be an alternative as well, haven't tried it.

    I love Lua, but at larger scales it's unmanageable.

  • Are there any 3rd party libraries which enables us to write nvim plugins?
    7 projects | /r/neovim | 3 Oct 2022
    There are some plugins (typescript.nvim) that use a Typescript to lua transpiler (TypescriptToLua]
  • Since my driver video was well received last time, here is another: Building an SD Card driver from scratch
    1 project | /r/javascript | 8 Feb 2022
    54:28 reminded me of TypeScriptToLua, so if you wanted to, then you could turn this into Lua :^)
  • Window.js is an open-source JavaScript runtime for desktop graphics programming
    9 projects | news.ycombinator.com | 10 Jan 2022
    One immediate comparison that springs to my mind is the Löve 2D engine [1], which is a tiny game engine written entirely around Lua scripting (so that Lua includes the full game run loop as well).

    Lua is a good scripting language, but it doesn't have the ubiquity of JS (and Löve doesn't have the ubiquitous deployment of the modern browser). Also, Lua doesn't have a static type ecosystem (though there are interesting projects like TypescriptToLua [2] exploring that space, but you can from the name they are following/lagging the JS ecosystem here).

    There probably is a need to package more browser games as "real" games and a lightweight Canvas-focused approach could find a nice like Löve, especially if it were easier, for instance, to maybe port to consoles for small/indie game teams than one of the web views or Electron. (Though certainly Microsoft already has a version of WebView2 running on the Xbox.)

    [1] https://love2d.org/

    [2] https://github.com/TypeScriptToLua/TypeScriptToLua

  • Your favorite mod just added something you've wanted for years. What is it?
    5 projects | /r/feedthebeast | 9 Jan 2022
    Not part of the mods, but using https://github.com/TypeScriptToLua/TypeScriptToLua is quite easy and works surprisingly well. You can find some of the type definitions for computercraft here: https://github.com/Eforen/cc-tweaked-types/tree/master/declarations
  • TypeScript to Lua Transpiler
    2 projects | news.ycombinator.com | 17 Aug 2021
  • LÖVR – An open source framework for rapidly building immersive 3D experiences
    11 projects | news.ycombinator.com | 5 Aug 2021
  • Neovim v0.5
    33 projects | news.ycombinator.com | 2 Jul 2021
  • Forking the typescript compiler and building on it?
    5 projects | /r/typescript | 14 Jun 2021
    It might be helpful to keep in mind: Typescript is a compiler that parses a Typescript AST and prints out whatever you want. So if your goal is to use it in a JS context, the only thing regulating what you do with it is that it outputs valid JS that can be interpreted by the various JS engines. There are projects like TypeScriptToLua which uses the TS compiler to print out Lua code.
  • How can I generate types using AST?
    3 projects | /r/typescript | 26 Feb 2021
    You can take a look at TypescriptToLua which transforms the TS AST into Lua code using the compiler API, however I think you're barking up the wrong tree. The TS compiler works on *it's own\* AST generated from parsed Typescript. You can see how they implement your own type here. What you have some structured data and want to turn it into a type definition. That's just some loops you write yourself over data you've hopefully structured in a sane way. Turn it into a string, write it to a file with the extension `.d.ts`. No libraries needed.

What are some alternatives?

When comparing moonscript and TypeScriptToLua you can also consider the following projects:

Yuescript - A Moonscript dialect compiles to Lua.

lua-languages - Languages that compile to Lua

nelua-lang - Minimal, efficient, statically-typed and meta-programmable systems programming language heavily inspired by Lua, which compiles to C and native code.

love - LÖVE is an awesome 2D game framework for Lua.

luau - A fast, small, safe, gradually typed embeddable scripting language derived from Lua

neovim-ui - Vaporware -- nothing to see here

TIC-80 - TIC-80 is a fantasy computer for making, playing and sharing tiny games.

TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

LuaJIT - Mirror of the LuaJIT git repository

ttypescript - Over TypeScript tool to use custom transformers in the tsconfig.json

nvim-lspconfig - Quickstart configs for Nvim LSP

squirrel - Official repository for the programming language Squirrel