Lua

From Things and Stuff Wiki
Revision as of 05:52, 19 February 2018 by Milk (talk | contribs)
Jump to navigation Jump to search


General

  • Lua - a powerful, fast, lightweight, embeddable scripting language. Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.



  • LuaRocks - the package manager for Lua modules. It allows you to create and install Lua modules as self-contained packages called rocks. You can download and install LuaRocks on Unix and Windows.
  • ULua - Universal Lua Distribution. More than 300 binary packages updated daily from Luarocks



  • Programming in Lua This book is a detailed and authoritative introduction to all aspects of Lua programming, by Lua's chief architect. Programming in Lua gives a solid base for any programmer who wants to use Lua. It covers all aspects of Lua—from the basics to its API with C—explaining how to make good use of its features and giving numerous code examples. The book is targeted at people with some programming background, but it does not assume any prior knowledge about Lua or other scripting languages.
  • Lua Unofficial FAQ (uFAQ)



os.time();

os.getenv()
  i.e. os.getenv( "HOME" ); ?? to confirm, hardcoded as no time atm.


  • LOOP - stands for Lua Object-Oriented Programming and is a set of packages for supporting different models of object-oriented programming in the Lua language. In fact, Lua is not an object-oriented language nor it was intended to be because one of the main goals of Lua is to remain simple and small. However, it provides facilities as syntactic sugar to support an object-oriented programming style. Additionally, the extension mechanisms of Lua can be used to implement most of the traditional object-oriented concepts commonly available in other languages. This lack of a standard object model avoids the use of a peculiar model instead of models customized for particular needs, like simplicity, flexibility or performance.


  • Luvit - implements the same async APIs as Node.js, but in Lua!


  • LuaJIT — a Just-In-Time Compiler for Lua.
  • Metalua is a language and a compiler which provide a complete macro system, similar in power to what's offfered by Lisp dialects or Template Haskell; manipulated programs can be seen as source code, as abstract syntax trees, or as an arbitrary mix thereof, whichever suits your task better.


  • Terra - a low-level system programming language that is embedded in and meta-programmed by the Lua programming language:


Tools

  • ZeroBrane Studio - a lightweight Lua IDE with code completion, syntax highlighting, live coding, code analyzer, and debugging support for Lua 5.1, Lua 5.2, Lua 5.3, LuaJIT, and other Lua engines.


MoonScript

  • MoonScript - a dynamic scripting language that compiles into Lua. It gives you the power of one of the fastest scripting languages combined with a rich set of features. MoonScript can either be compiled into Lua and run at a later time, or it can be dynamically compiled and run using the moonloader. It’s as simple as require "moonscript" in order to have Lua understand how to load and run any MoonScript file.


class Thing
  name: "unknown"

class Person extends Thing
  say_name: => print "Hello, I am #{@name}!"

with Person!
  .name = "MoonScript"
  \say_name!


Audio / MIDI

  • UVIScript - a domain-specific scripting language built on top of the Lua scripting language. It has been created in order to provide greater flexibility and inject artifical intelligence when generating and interpreting (MIDI) musical events.


Game

  • LÖVE - an *awesome* framework you can use to make 2D games in Lua. It's free, open-source, and works on Windows, Mac OS X, Linux, Android and iOS.


Embedded

  • eLua - eluaproject - Embedded power, driven by Lua. Quickly prototype and develop embedded software applications with the power of Lua and run them on a wide range of microcontroller architectures


Testing

  • busted- a unit testing framework with a focus on being easy to use. busted works with lua >= 5.1, moonscript, terra, and LuaJIT >= 2.0.0.