Using other languages

This page summarizes the projects mentioned and recommended in the original post on /r/ComputerCraft

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • cc-tstl-template

    Template project for ComputerCraft programs written in TypeScript.

  • There's many different languages that can compile to Lua: - TypeScript is probably the most well-known and most compatible language for Lua. The TypeScriptToLua compiler lets you compile TypeScript code into Lua with a mostly 1:1 conversion. You can use the @jackmacwindows/craftos-types and @jackmacwindows/cc-types NPM packages to add typing declarations for CraftOS APIs and modules. Alternatively, use my template repo for a more ready-to-go setup. - Haxe was built with compilation to Lua in mind, and so you can write code for it and have it run just fine in CC. There's some declarations for it available online, and I also have my own typing set for it (which I should really upload somewhere - DM me if you want it for now). - C# can also compile to Lua, but it's a bit tough to get working right in CC, as it has a huge default library and abuses the global table in a way that CC has trouble with. However, it's possible to use, and I've gotten it working in the past (unfortunately, I don't know how anymore). - Urn is a Lisp dialect that was built by two CC devs and was designed to run in CC. However, I wouldn't recommend it unless you're good with functional programming.

  • Yuescript

    A Moonscript dialect compiles to Lua.

  • 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.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • tl

    The compiler for Teal, a typed dialect of Lua

  • 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.

  • urn

    Yet another Lisp variant which compiles to Lua

  • There's many different languages that can compile to Lua: - TypeScript is probably the most well-known and most compatible language for Lua. The TypeScriptToLua compiler lets you compile TypeScript code into Lua with a mostly 1:1 conversion. You can use the @jackmacwindows/craftos-types and @jackmacwindows/cc-types NPM packages to add typing declarations for CraftOS APIs and modules. Alternatively, use my template repo for a more ready-to-go setup. - Haxe was built with compilation to Lua in mind, and so you can write code for it and have it run just fine in CC. There's some declarations for it available online, and I also have my own typing set for it (which I should really upload somewhere - DM me if you want it for now). - C# can also compile to Lua, but it's a bit tough to get working right in CC, as it has a huge default library and abuses the global table in a way that CC has trouble with. However, it's possible to use, and I've gotten it working in the past (unfortunately, I don't know how anymore). - Urn is a Lisp dialect that was built by two CC devs and was designed to run in CC. However, I wouldn't recommend it unless you're good with functional programming.

  • lua-languages

    Languages that compile to Lua

  • There's a complete list of languages that compile to Lua available here: https://github.com/hengestone/lua-languages

  • moonscript

    :crescent_moon: A language that compiles to Lua

  • 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.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts