<!DOCTYPE html>
<html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-0 vector-toc-not-available vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-0 skin-theme-clientpref-os vector-sticky-header-enabled" lang="en" dir="ltr"><head>
    <meta charset="UTF-8">
    <title>Lua</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" type="image/png" href="./_res_/favicon.png">
    <link rel="canonical" href="https://en.wikipedia.org/wiki/Lua"> <link href="./_mw_/ext.cite.styles.css" rel="stylesheet" type="text/css">
    <link href="./_mw_/ext.pygments.css" rel="stylesheet" type="text/css">
    <link href="./_mw_/ext.wikimediamessages.styles.css" rel="stylesheet" type="text/css">
    <link href="./_mw_/skins.vector.icons.css" rel="stylesheet" type="text/css">
    <link href="./_mw_/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
    <link href="./_mw_/skins.vector.styles.css" rel="stylesheet" type="text/css">
    <meta name="ResourceLoaderDynamicStyles" content="">
    
    <link rel="stylesheet" type="text/css" href="./_mw_/site.styles.css">
    <link rel="stylesheet" type="text/css" href="./_mw_/noscript.css">
    <link rel="stylesheet" type="text/css" href="./_res_/footer.css">
    <link rel="stylesheet" type="text/css" href="./_res_/vector-2022.css">
  </head>
  <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Lua rootpage-Lua skin-vector-2022 action-view">
    <div class="mw-page-container">
      <div class="mw-page-container-inner">
        <div class="mw-content-container">
          <main id="content" class="mw-body">
            <header class="mw-body-header vector-page-titlebar">
              <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Lua</span></h1>
            </header>
            <a id="top"></a>
            <div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
              <div id="contentSub">
                <div id="mw-content-subtitle"></div>
              </div>
              <div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1320445320">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}


/* end   https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">For other uses, see <a href="Lua_(disambiguation)" class="mw-disambig" title="Lua (disambiguation)">Lua (disambiguation)</a>.</div>
<style data-mw-deduplicate="TemplateStyles:r1316064257">
/* start https://en.wikipedia.org/ */


.mw-parser-output .infobox-subbox{padding:0;border:none;margin:-3px;width:auto;min-width:100%;font-size:100%;clear:none;float:none;background-color:transparent;color:inherit}.mw-parser-output .infobox-3cols-child{margin:-3px}.mw-parser-output .infobox .navbar{font-size:100%}@media screen{html.skin-theme-clientpref-night .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media(min-width:640px){body.skin--responsive .mw-parser-output .infobox-table{display:table!important}body.skin--responsive .mw-parser-output .infobox-table>caption{display:table-caption!important}body.skin--responsive .mw-parser-output .infobox-table>tbody{display:table-row-group}body.skin--responsive .mw-parser-output .infobox-table th,body.skin--responsive .mw-parser-output .infobox-table td{padding-left:inherit;padding-right:inherit}}


/* end   https://en.wikipedia.org/ */
</style><table class="infobox vevent"><tbody><tr><th colspan="2" class="infobox-above" style="background-color:#e0e0e0; color:inherit;">Lua</th></tr><tr><td colspan="2" class="infobox-image"><span typeof="mw:File"><img src="./_assets_/0c70a452f799bfe840676ee341124611/Lua-Logo.svg.png" decoding="async" width="121" height="121" class="mw-file-element" data-file-width="947" data-file-height="947" loading="lazy"></span></td></tr><tr><td colspan="2" class="infobox-image"><span typeof="mw:File"><img src="./_assets_/0c70a452f799bfe840676ee341124611/Excerpt_of_Coordinates_module_in_Lua.png" decoding="async" width="250" height="138" class="mw-file-element" data-file-width="640" data-file-height="354" loading="lazy"></span><div class="infobox-caption">Screenshot of Lua code from a Wikipedia Lua module using the <a href="MediaWiki" title="MediaWiki">MediaWiki</a> <a href="https://www.mediawiki.org/wiki/Extension:Scribunto" class="extiw external" title="mw:Extension:Scribunto">Scribunto</a> extension</div></td></tr><tr><th scope="row" class="infobox-label"><a href="Programming_paradigm" title="Programming paradigm">Paradigm</a></th><td class="infobox-data"><a href="Multi-paradigm" class="mw-redirect" title="Multi-paradigm">Multi-paradigm</a>: <a href="Scripting_language" title="Scripting language">scripting</a>, <a href="Imperative_programming" title="Imperative programming">imperative</a> (<a href="Procedural_programming" title="Procedural programming">procedural</a>, <a href="Prototype-based_programming" title="Prototype-based programming">prototype-based</a>, <a href="Object-oriented_programming" title="Object-oriented programming">object-oriented</a>), <a href="Functional_programming" title="Functional programming">functional</a>, <a href="Metaprogramming" title="Metaprogramming">meta</a>, <a href="Reflective_programming" title="Reflective programming">reflective</a></td></tr><tr><th scope="row" class="infobox-label"><a href="Software_design" title="Software design">Designed&nbsp;by</a></th><td class="infobox-data"><a href="Roberto_Ierusalimschy" title="Roberto Ierusalimschy">Roberto Ierusalimschy</a><br>Waldemar Celes<br>Luiz Henrique de Figueiredo</td></tr><tr><th scope="row" class="infobox-label">First&nbsp;appeared</th><td class="infobox-data">1993<span style="display:none">&nbsp;(<span class="bday dtstart published updated">1993</span>)</span></td></tr><tr><td colspan="2" class="infobox-full-data"></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Software_release_life_cycle" title="Software release life cycle">Stable release</a></th><td class="infobox-data"><div style="margin:0px;">5.5<sup id="cite_ref-wikidata-2c354affd7152198918c292630c9c4314aa68c15-v20_1-0" class="reference"><a href="#cite_note-wikidata-2c354affd7152198918c292630c9c4314aa68c15-v20-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>&nbsp;<span class="mw-valign-text-top" typeof="mw:File/Frameless"><a href="https://www.wikidata.org/wiki/Q207316?uselang=en#P348" title="Edit this on Wikidata" class="external"><img alt="Edit this on Wikidata" src="./_assets_/c8f24dc75f9c782269c846c9b17e400f/OOjs_UI_icon_edit-ltr-progressive.svg.png" decoding="async" width="10" height="10" class="mw-file-element" data-file-width="20" data-file-height="20" loading="lazy"></a></span>
   / 22 December 2025<span style="display:none">&nbsp;(<span class="bday dtstart published updated">22 December 2025</span>)</span></div></td></tr><tr style="display:none"><td colspan="2">
</td></tr><tr><th scope="row" class="infobox-label"><a href="Type_system" title="Type system">Typing discipline</a></th><td class="infobox-data"><a href="Dynamic_typing" class="mw-redirect" title="Dynamic typing">Dynamic</a>, <a href="Strong_and_weak_typing" class="mw-redirect" title="Strong and weak typing">strong</a>, <a href="Duck_typing" title="Duck typing">duck</a></td></tr><tr><th scope="row" class="infobox-label">Implementation language</th><td class="infobox-data"><a href="ANSI_C" title="ANSI C">ANSI C</a></td></tr><tr><th scope="row" class="infobox-label"><a href="Operating_system" title="Operating system">OS</a></th><td class="infobox-data"><a href="Cross-platform_software" title="Cross-platform software">Cross-platform</a></td></tr><tr><th scope="row" class="infobox-label"><a href="Software_license" title="Software license">License</a></th><td class="infobox-data"><a href="MIT_License" title="MIT License">MIT</a></td></tr><tr><th scope="row" class="infobox-label"><a href="Filename_extension" title="Filename extension">Filename extensions</a></th><td class="infobox-data"><code>.lua</code></td></tr><tr><th scope="row" class="infobox-label">Website</th><td class="infobox-data"><span class="url"><a rel="nofollow" class="external text" href="https://www.lua.org/">www<wbr>.lua<wbr>.org</a></span></td></tr><tr><th colspan="2" class="infobox-header" style="background-color: #EEEEEE; color:inherit;">Major <a href="Programming_language_implementation" class="mw-redirect" title="Programming language implementation">implementations</a></th></tr><tr><td colspan="2" class="infobox-full-data"><a rel="nofollow" class="external text" href="https://www.lua.org/download.html">Lua</a>, <a href="LuaJIT" title="LuaJIT">LuaJIT</a>, <a rel="nofollow" class="external text" href="https://github.com/luavela/luavela">LuaVela</a>, 
<a rel="nofollow" class="external text" href="https://www.moonsharp.org/">MoonSharp</a>,</td></tr><tr><th colspan="2" class="infobox-header" style="background-color: #EEEEEE; color:inherit;"><a href="Programming_language#Dialects,_flavors_and_implementations" title="Programming language">Dialects</a></th></tr><tr><td colspan="2" class="infobox-full-data"><a rel="nofollow" class="external text" href="https://www.nongnu.org/gsl-shell/">GSL Shell</a>, <a rel="nofollow" class="external text" href="https://luau.org">Lua<i>u</i></a></td></tr><tr><th colspan="2" class="infobox-header" style="background-color: #EEEEEE; color:inherit;">Influenced by</th></tr><tr><td colspan="2" class="infobox-full-data"><a href="C%2B%2B" title="C++">C++</a>, <a href="CLU_(programming_language)" title="CLU (programming language)">CLU</a>, <a href="Modula" title="Modula">Modula</a>, <a href="Scheme_(programming_language)" title="Scheme (programming language)">Scheme</a>, <a href="SNOBOL" title="SNOBOL">SNOBOL</a></td></tr><tr><th colspan="2" class="infobox-header" style="background-color: #EEEEEE; color:inherit;">Influenced</th></tr><tr><td colspan="2" class="infobox-full-data"><a href="GameMonkey_Script" title="GameMonkey Script">GameMonkey</a>, <a href="Io_(programming_language)" title="Io (programming language)">Io</a>, <a href="JavaScript" title="JavaScript">JavaScript</a>, <a href="Julia_(programming_language)" title="Julia (programming language)">Julia</a>, <a href="Red_(programming_language)" title="Red (programming language)">Red</a>,  <a href="Ruby_(programming_language)" title="Ruby (programming language)">Ruby</a>, <a href="Squirrel_(programming_language)" title="Squirrel (programming language)">Squirrel</a>, <a href="C--" title="C--">C--</a>, <a href="Roblox_Studio" class="mw-redirect" title="Roblox Studio">Luau</a>,</td></tr></tbody></table>
<p><b>Lua</b> <span class="noexcerpt">(<span class="rt-commentedText nowrap"><span class="IPA nopopups noexcerpt" lang="en-fonipa">/<span style="border-bottom:1px dotted"><span title="/ˈ/: primary stress follows">ˈ</span><span title="'l' in 'lie'">l</span><span title="/uː/: 'oo' in 'goose'">uː</span><span title="/ə/: 'a' in 'about'">ə</span></span>/</span></span> <i title="English pronunciation respelling"><span style="font-size:90%">LOO</span>-ə</i>; from <a href="Portuguese_language" title="Portuguese language">Portuguese</a>: <i lang="pt"><a href="https://en.wiktionary.org/wiki/lua#Portuguese" class="extiw external" title="wikt:lua">lua</a></i> <span class="IPA nowrap" lang="pt-Latn-fonipa">[ˈlu(w)ɐ]</span> meaning <i><a href="Moon" title="Moon">moon</a></i>)</span> is a <a href="Lightweight_programming_language" title="Lightweight programming language">lightweight</a>, <a href="High-level_programming_language" title="High-level programming language">high-level</a>, <a href="Multi-paradigm_programming_language" class="mw-redirect" title="Multi-paradigm programming language">multi-paradigm</a> <a href="Programming_language" title="Programming language">programming language</a> designed mainly for <a href="Scripting_language" title="Scripting language">embedded use</a> in applications.<sup id="cite_ref-luaspe_2-0" class="reference"><a href="#cite_note-luaspe-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> Lua is <a href="Cross-platform_software" title="Cross-platform software">cross-platform software</a>, since the <a href="Interpreter_(computing)" title="Interpreter (computing)">interpreter</a> of <a href="Compiler" title="Compiler">compiled</a> <a href="Bytecode" title="Bytecode">bytecode</a> is written in <a href="ANSI_C" title="ANSI C">ANSI C</a>,<sup id="cite_ref-luaabout_3-0" class="reference"><a href="#cite_note-luaabout-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> and Lua has a relatively simple C application programming interface (<a href="API" title="API">API</a>) to embed it into applications.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>
</p><p>Lua originated in 1993 as a language for extending <a href="Application_software" title="Application software">software applications</a> to meet the increasing demand for customization at the time. It provided the basic facilities of most <a href="Procedural_programming" title="Procedural programming">procedural programming</a> languages, but more complicated or <a href="Domain-specific_language" title="Domain-specific language">domain-specific</a> features were not included; rather, it included mechanisms for extending the language, allowing programmers to implement such features. As Lua was intended to be a general embeddable extension language, the designers of Lua focused on improving its <a href="Profiling_(computer_programming)" title="Profiling (computer programming)">speed</a>, <a href="Porting" title="Porting">portability</a>, extensibility and ease-of-use in development.
</p>

<div class="mw-heading mw-heading2"><h2 id="History">History</h2></div>
<p>Lua was created in 1993 by <a href="Roberto_Ierusalimschy" title="Roberto Ierusalimschy">Roberto Ierusalimschy</a>, Luiz Henrique de Figueiredo, and Waldemar Celes, members of the Computer Graphics Technology Group (<a href="Tecgraf" class="mw-redirect" title="Tecgraf">Tecgraf</a>) at the <a href="Pontifical_Catholic_University_of_Rio_de_Janeiro" title="Pontifical Catholic University of Rio de Janeiro">Pontifical Catholic University of Rio de Janeiro</a>, in <a href="Brazil" title="Brazil">Brazil</a>.
</p><p>From 1977 until 1992, Brazil had a policy of strong <a href="Trade_barrier" title="Trade barrier">trade barriers</a> (called a market reserve) for <a href="Computer_hardware" title="Computer hardware">computer hardware</a> and <a href="Software" title="Software">software</a>, believing that Brazil could and should produce its own hardware and software. In that climate, Tecgraf's clients could not afford, either politically or financially, to buy customized software from abroad; under the market reserve, clients would have to go through a complex bureaucratic process to prove their needs couldn't be met by Brazilian companies. Those reasons led Tecgraf to implement the basic tools it needed from scratch.<sup id="cite_ref-hopl2007_5-0" class="reference"><a href="#cite_note-hopl2007-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p><p>Lua's predecessors were the data-description and configuration languages Simple Object Language (SOL) and Data-Entry Language (DEL).<sup id="cite_ref-luahist2001_6-0" class="reference"><a href="#cite_note-luahist2001-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> They had been independently developed at Tecgraf in 1992–1993 to add some flexibility into two different projects (both were interactive graphical programs for engineering applications at <a href="Petrobras" title="Petrobras">Petrobras</a> company). There was a lack of any flow-control structures in SOL and DEL, and Petrobras felt a growing need to add full programming power to them.
</p><p>In <i>The Evolution of Lua</i>, the language's authors wrote:<sup id="cite_ref-hopl2007_5-1" class="reference"><a href="#cite_note-hopl2007-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p>
<style data-mw-deduplicate="TemplateStyles:r1244412712">
/* start https://en.wikipedia.org/ */


.mw-parser-output .templatequote{overflow:hidden;margin:1em 0;padding:0 32px}.mw-parser-output .templatequotecite{line-height:1.5em;text-align:left;margin-top:0}@media(min-width:500px){.mw-parser-output .templatequotecite{padding-left:1.6em}}


/* end   https://en.wikipedia.org/ */
</style><blockquote class="templatequote"><p>In 1993, the only real contender was <a href="Tcl_(programming_language)" title="Tcl (programming language)">Tcl</a>, which had been explicitly designed to be embedded into applications. However, Tcl had unfamiliar syntax, did not offer good support for data description, and ran only on Unix platforms. We did not consider <a href="Lisp_(programming_language)" title="Lisp (programming language)">LISP</a> or <a href="Scheme_(programming_language)" title="Scheme (programming language)">Scheme</a> because of their unfriendly syntax. <a href="Python_(programming_language)" title="Python (programming language)">Python</a> was still in its infancy. In the free, do-it-yourself atmosphere that then reigned in Tecgraf, it was quite natural that we should try to develop our own scripting language&nbsp;... Because many potential users of the language were not professional programmers, the language should avoid cryptic syntax and semantics. The implementation of the new language should be highly portable, because Tecgraf's clients had a very diverse collection of computer platforms. Finally, since we expected that other Tecgraf products would also need to embed a scripting language, the new language should follow the example of SOL and be provided as a library with a C API.</p></blockquote>
<p>Lua 1.0 was designed in such a way that its object constructors, being then slightly different from the current light and flexible style, incorporated the data-description syntax of  SOL  (hence the name Lua: <i>Sol</i> meaning "Sun" in Portuguese, and <i>Lua</i> meaning "Moon"). Lua <a href="Syntax_(programming_languages)" title="Syntax (programming languages)">syntax</a> for control structures was mostly borrowed from <a href="Modula" title="Modula">Modula</a> (<code>if</code>, <code>while</code>, <code>repeat</code>/<code>until</code>), but also had taken influence from <a href="CLU_(programming_language)" title="CLU (programming language)">CLU</a> (multiple assignments and multiple returns from function calls, as a simpler alternative to <a href="Call_by_reference" class="mw-redirect" title="Call by reference">reference parameters</a> or explicit <a href="Pointer_(computer_programming)" title="Pointer (computer programming)">pointers</a>), <a href="C%2B%2B" title="C++">C++</a> ("neat idea of allowing a <a href="Local_variable" title="Local variable">local variable</a> to be declared only where we need it"<sup id="cite_ref-hopl2007_5-2" class="reference"><a href="#cite_note-hopl2007-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>), <a href="SNOBOL" title="SNOBOL">SNOBOL</a> and <a href="AWK" title="AWK">AWK</a> (<a href="Associative_array" title="Associative array">associative arrays</a>). In an article published in <i><a href="Dr._Dobb's_Journal" title="Dr. Dobb's Journal">Dr. Dobb's Journal</a></i>, Lua's creators also state that LISP and Scheme with their single, ubiquitous data-structure mechanism (the <a href="List_(abstract_data_type)" title="List (abstract data type)">list</a>) were a major influence on their decision to develop the table as the primary data structure of Lua.<sup id="cite_ref-ddj96_7-0" class="reference"><a href="#cite_note-ddj96-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup>
</p><p>Lua <a href="Semantics" title="Semantics">semantics</a> have been increasingly influenced by Scheme over time,<sup id="cite_ref-hopl2007_5-3" class="reference"><a href="#cite_note-hopl2007-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> especially with the introduction of <a href="Anonymous_function" title="Anonymous function">anonymous functions</a> and full <a href="Scope_(computer_science)#Lexical_scope_vs._dynamic_scope" class="mw-redirect" title="Scope (computer science)">lexical scoping</a>. Several features were added in new Lua versions.
</p><p>Versions of Lua prior to version 5.0 were released under a license similar to the <a href="BSD_licenses" title="BSD licenses">BSD license</a>. From version 5.0 onwards, Lua has been licensed under the <a href="MIT_License" title="MIT License">MIT License</a>. Both are <a href="Permissive_free_software_licences" class="mw-redirect" title="Permissive free software licences">permissive free software licences</a> and are almost identical.
</p>
<div class="mw-heading mw-heading2"><h2 id="Features">Features</h2></div>
<p>Lua is commonly described as a "<a href="Multi-paradigm_programming_language" class="mw-redirect" title="Multi-paradigm programming language">multi-paradigm</a>" language, providing a small set of general features that can be extended to fit different problem types. Lua does not contain explicit support for <a href="Inheritance_(object-oriented_programming)" title="Inheritance (object-oriented programming)">inheritance</a>, but allows it to be implemented with <a href="#Metatables">metatables</a>. Similarly, Lua allows programmers to implement <a href="Namespace" title="Namespace">namespaces</a>, <a href="Class_(programming)" title="Class (programming)">classes</a> and other related features using its single table implementation; <a href="First-class_function" title="First-class function">first-class functions</a> allow the employment of many techniques from <a href="Functional_programming" title="Functional programming">functional programming</a> and full <a href="Lexical_scoping" class="mw-redirect" title="Lexical scoping">lexical scoping</a> allows fine-grained <a href="Information_hiding" title="Information hiding">information hiding</a> to enforce the <a href="Principle_of_least_privilege" title="Principle of least privilege">principle of least privilege</a>.
</p><p>In general, Lua strives to provide simple, flexible <a href="Metaprogramming" title="Metaprogramming">meta-features</a> that can be extended as needed, rather than supply a feature-set specific to one programming paradigm. As a result, the base language is <a href="Lightweight_programming_language" title="Lightweight programming language">light</a>; the full reference <a href="Interpreter_(computing)" title="Interpreter (computing)">interpreter</a> is only about 247&nbsp;<a href="Kilobyte" title="Kilobyte">kB</a> compiled<sup id="cite_ref-luaabout_3-1" class="reference"><a href="#cite_note-luaabout-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> and easily adaptable to a broad range of applications.
</p><p>As a <a href="Dynamically_typed" class="mw-redirect" title="Dynamically typed">dynamically typed</a> language intended for use as an extension language or <a href="Scripting_language" title="Scripting language">scripting language</a>, Lua is compact enough to fit on a variety of host platforms. It supports only a small number of atomic data structures such as <a href="Boolean_data_type" title="Boolean data type">Boolean</a> values, numbers (double-precision <a href="Floating_point" class="mw-redirect" title="Floating point">floating point</a> and <a href="64-bit_computing" title="64-bit computing">64-bit</a> <a href="Integer" title="Integer">integers</a> by default) and <a href="String_(computer_science)" title="String (computer science)">strings</a>. Typical data structures such as <a href="Array_data_structure" class="mw-redirect" title="Array data structure">arrays</a>, <a href="Set_(computer_science)" class="mw-redirect" title="Set (computer science)">sets</a>, <a href="List_(computing)" class="mw-redirect" title="List (computing)">lists</a> and <a href="Record_(computer_science)" title="Record (computer science)">records</a> can be represented using Lua's single native data structure, the table, which is essentially a heterogeneous <a href="Associative_array" title="Associative array">associative array</a>.
</p><p>Lua implements a small set of advanced features such as <a href="First-class_function" title="First-class function">first-class functions</a>, <a href="Garbage_collection_(computer_science)" title="Garbage collection (computer science)">garbage collection</a>, <a href="Closure_(computer_science)" class="mw-redirect" title="Closure (computer science)">closures</a>, proper <a href="Tail_recursion" class="mw-redirect" title="Tail recursion">tail calls</a>, <a href="Type_conversion" title="Type conversion">coercion</a> (automatic conversion between string and number values at run time), <a href="Coroutine" title="Coroutine">coroutines</a> (cooperative multitasking) and <a href="Dynamic_loading" title="Dynamic loading">dynamic module loading</a>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Syntax">Syntax</h3></div>
<p>The classic <a href="%22Hello%2C_World!%22_program" title="&quot;Hello, World!&quot; program">"Hello, World!" program</a> can be written as follows, with or without parentheses:<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>a<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="s2">"Hello, World!"</span><span class="p">)</span>
</pre></div>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="nb">print</span><span class="w"> </span><span class="s2">"Hello, World!"</span>
</pre></div>
<p>The declaration of a variable, without a value.
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kd">local</span><span class="w"> </span><span class="nv">variable</span>
</pre></div>
<p>The declaration of a variable with a value of 1000 (one thousand)
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kd">local</span><span class="w"> </span><span class="nv">students</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1000</span>
</pre></div>
<p>A <a href="Comment_(computer_programming)" title="Comment (computer programming)">comment</a> in Lua starts with a double-hyphen and runs to the end of the line, similar to <a href="Ada_(programming_language)" title="Ada (programming language)">Ada</a>, <a href="Eiffel_(programming_language)" title="Eiffel (programming language)">Eiffel</a>, <a href="Haskell" title="Haskell">Haskell</a>, <a href="SQL" title="SQL">SQL</a> and <a href="VHDL" title="VHDL">VHDL</a>. Multi-line strings and comments are marked with double square brackets.
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">-- Single line comment</span>
<span class="cm">--[[</span>
<span class="cm">Multi-line comment</span>
<span class="cm">--]]</span>
</pre></div>
<p><span class="anchor" id="Factorial_example"></span>The <a href="Factorial" title="Factorial">factorial</a> function is implemented in this example:
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kr">function</span><span class="w"> </span><span class="nf">factorial</span><span class="p">(</span><span class="nv">n</span><span class="p">)</span>
<span class="w">  </span><span class="kd">local</span><span class="w"> </span><span class="nv">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span>
<span class="w">  </span><span class="kr">for</span><span class="w"> </span><span class="nv">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="nv">n</span><span class="w"> </span><span class="kr">do</span>
<span class="w">    </span><span class="nv">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">x</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="nv">i</span>
<span class="w">  </span><span class="kr">end</span>
<span class="w">  </span><span class="kr">return</span><span class="w"> </span><span class="nv">x</span>
<span class="kr">end</span>
</pre></div>
<div class="mw-heading mw-heading3"><h3 id="Control_flow">Control flow</h3></div>
<p>Lua has one type of <a href="Conditional_(computer_programming)" title="Conditional (computer programming)">conditional</a> test: <code><a href="Conditional_(computer_programming)#If–then(–else)" title="Conditional (computer programming)">if then end</a></code> with optional <code>else</code> and <code>elseif then</code> execution control constructs.
</p><p>The generic <code>if then end</code> statement requires all three keywords:
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kr">if</span><span class="w"> </span><span class="nv">condition</span><span class="w"> </span><span class="kr">then</span>
<span class="w">	</span><span class="c1">--statement body</span>
<span class="kr">end</span>
</pre></div>
<p>An example of an <code>if</code> statement
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kr">if</span><span class="w"> </span><span class="nv">x</span><span class="w"> </span><span class="o">~=</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="kr">then</span>
<span class="w">	</span><span class="nb">print</span><span class="p">(</span><span class="nv">x</span><span class="p">)</span>
<span class="kr">end</span>
</pre></div>
<p>The <code>else</code> keyword may be added with an accompanying statement block to control execution when the <code>if</code> condition evaluates to <code>false</code>:
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kr">if</span><span class="w"> </span><span class="nv">condition</span><span class="w"> </span><span class="kr">then</span>
<span class="w">	</span><span class="c1">--statement body</span>
<span class="kr">else</span>
<span class="w">	</span><span class="c1">--statement body</span>
<span class="kr">end</span>
</pre></div>
<p>An example of an <code>if else</code> statement
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kr">if</span><span class="w"> </span><span class="nv">x</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="kr">then</span>
<span class="w">	</span><span class="nb">print</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>
<span class="kr">else</span>
<span class="w">	</span><span class="nb">print</span><span class="p">(</span><span class="nv">x</span><span class="p">)</span>
<span class="kr">end</span>
</pre></div>
<p>Execution may also be controlled according to multiple conditions using the <code>elseif then</code> keywords:
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kr">if</span><span class="w"> </span><span class="nv">condition</span><span class="w"> </span><span class="kr">then</span>
<span class="w">	</span><span class="c1">--statement body</span>
<span class="kr">elseif</span><span class="w"> </span><span class="nv">condition</span><span class="w"> </span><span class="kr">then</span>
<span class="w">	</span><span class="c1">--statement body</span>
<span class="kr">else</span><span class="w"> </span><span class="c1">-- optional</span>
<span class="w">	</span><span class="c1">--optional default statement body</span>
<span class="kr">end</span>
</pre></div>
<p>An example of an <code>if elseif else</code> statement
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kr">if</span><span class="w"> </span><span class="nv">x</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nv">y</span><span class="w"> </span><span class="kr">then</span>
<span class="w">	</span><span class="nb">print</span><span class="p">(</span><span class="s2">"x = y"</span><span class="p">)</span>
<span class="kr">elseif</span><span class="w"> </span><span class="nv">x</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nv">z</span><span class="w"> </span><span class="kr">then</span>
<span class="w">	</span><span class="nb">print</span><span class="p">(</span><span class="s2">"x = z"</span><span class="p">)</span>
<span class="kr">else</span><span class="w"> </span><span class="c1">-- optional</span>
<span class="w">	</span><span class="nb">print</span><span class="p">(</span><span class="s2">"x does not equal any other variable"</span><span class="p">)</span>
<span class="kr">end</span>
</pre></div>
<p>Lua has four types of conditional loops: the <a href="While_loop" class="mw-redirect" title="While loop"><code>while</code> loop</a>, the <code>repeat</code> loop (similar to a <a href="Do_while_loop" class="mw-redirect" title="Do while loop"><code>do while</code> loop</a>), the numeric <a href="For_loop" class="mw-redirect" title="For loop"><code>for</code> loop</a> and the generic <code>for</code> loop.
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">--condition = true</span>

<span class="kr">while</span><span class="w"> </span><span class="nv">condition</span><span class="w"> </span><span class="kr">do</span>
<span class="w">  </span><span class="c1">--statements</span>
<span class="kr">end</span>

<span class="kr">repeat</span>
<span class="w">  </span><span class="c1">--statements</span>
<span class="kr">until</span><span class="w"> </span><span class="nv">condition</span>

<span class="kr">for</span><span class="w"> </span><span class="nv">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">first</span><span class="p">,</span><span class="w"> </span><span class="nv">last</span><span class="p">,</span><span class="w"> </span><span class="nv">delta</span><span class="w"> </span><span class="kr">do</span><span class="w">  </span><span class="c1">--delta may be negative, allowing the for loop to count down or up</span>
<span class="w">  </span><span class="c1">--statements</span>
<span class="w">  </span><span class="c1">--example: print(i)</span>
<span class="kr">end</span>
</pre></div>
<p>This generic <code>for</code> loop would iterate over the table <code>_G</code> using the standard iterator function <code>pairs</code>, until it returns <code>nil</code>:
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kr">for</span><span class="w"> </span><span class="nv">key</span><span class="p">,</span><span class="w"> </span><span class="nv">value</span><span class="w"> </span><span class="kr">in</span><span class="w"> </span><span class="nb">pairs</span><span class="p">(</span><span class="nb">_G</span><span class="p">)</span><span class="w"> </span><span class="kr">do</span>
<span class="w">  </span><span class="nb">print</span><span class="p">(</span><span class="nv">key</span><span class="p">,</span><span class="w"> </span><span class="nv">value</span><span class="p">)</span>
<span class="kr">end</span>
</pre></div>
<p>Loops can also be <a href="Nesting_(programming)" class="mw-redirect" title="Nesting (programming)">nested</a> (put inside of another loop).
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kd">local</span><span class="w"> </span><span class="nv">grid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span>
<span class="w">  </span><span class="p">{</span><span class="w"> </span><span class="mi">11</span><span class="p">,</span><span class="w"> </span><span class="mi">12</span><span class="p">,</span><span class="w"> </span><span class="mi">13</span><span class="w"> </span><span class="p">},</span>
<span class="w">  </span><span class="p">{</span><span class="w"> </span><span class="mi">21</span><span class="p">,</span><span class="w"> </span><span class="mi">22</span><span class="p">,</span><span class="w"> </span><span class="mi">23</span><span class="w"> </span><span class="p">},</span>
<span class="w">  </span><span class="p">{</span><span class="w"> </span><span class="mi">31</span><span class="p">,</span><span class="w"> </span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="mi">33</span><span class="w"> </span><span class="p">}</span>
<span class="p">}</span>

<span class="kr">for</span><span class="w"> </span><span class="nv">y</span><span class="p">,</span><span class="w"> </span><span class="nv">row</span><span class="w"> </span><span class="kr">in</span><span class="w"> </span><span class="nb">pairs</span><span class="p">(</span><span class="nv">grid</span><span class="p">)</span><span class="w"> </span><span class="kr">do</span>
<span class="w">  </span><span class="kr">for</span><span class="w"> </span><span class="nv">x</span><span class="p">,</span><span class="w"> </span><span class="nv">value</span><span class="w"> </span><span class="kr">in</span><span class="w"> </span><span class="nb">pairs</span><span class="p">(</span><span class="nv">row</span><span class="p">)</span><span class="w"> </span><span class="kr">do</span>
<span class="w">    </span><span class="nb">print</span><span class="p">(</span><span class="nv">x</span><span class="p">,</span><span class="w"> </span><span class="nv">y</span><span class="p">,</span><span class="w"> </span><span class="nv">value</span><span class="p">)</span>
<span class="w">  </span><span class="kr">end</span>
<span class="kr">end</span>
</pre></div>
<div class="mw-heading mw-heading3"><h3 id="Functions">Functions</h3></div>
<p>Lua's treatment of functions as <a href="First-class_function" title="First-class function">first-class</a> values is shown in the following example, where the print function's behavior is modified:
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kr">do</span>
<span class="w">  </span><span class="kd">local</span><span class="w"> </span><span class="nv">oldprint</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">print</span>
<span class="w">  </span><span class="c1">-- Store current print function as oldprint</span>
<span class="w">  </span><span class="kr">function</span><span class="w"> </span><span class="nf">print</span><span class="p">(</span><span class="nv">s</span><span class="p">)</span>
<span class="w">    </span><span class="cm">--[[ Redefine print function. The usual print function can still be used</span>
<span class="cm">      through oldprint. The new one has only one argument.]]</span>
<span class="w">    </span><span class="nf">oldprint</span><span class="p">(</span><span class="nv">s</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="s2">"foo"</span><span class="w"> </span><span class="ow">and</span><span class="w"> </span><span class="s2">"bar"</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="nv">s</span><span class="p">)</span>
<span class="w">  </span><span class="kr">end</span>
<span class="kr">end</span>
</pre></div>
<p>Any future calls to <code>print</code> will now be routed through the new function, and because of Lua's <a href="Scope_(programming)#Lexical_scoping" class="mw-redirect" title="Scope (programming)">lexical scoping</a>, the old print function will only be accessible by the new, modified print.
</p><p>Lua also supports <a href="Closure_(computer_programming)" title="Closure (computer programming)">closures</a>, as demonstrated below:
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kr">function</span><span class="w"> </span><span class="nf">addto</span><span class="p">(</span><span class="nv">x</span><span class="p">)</span>
<span class="w">  </span><span class="c1">-- Return a new function that adds x to the argument</span>
<span class="w">  </span><span class="kr">return</span><span class="w"> </span><span class="kr">function</span><span class="p">(</span><span class="nv">y</span><span class="p">)</span>
<span class="w">    </span><span class="cm">--[[ When we refer to the variable x, which is outside the current</span>
<span class="cm">      scope and whose lifetime would be shorter than that of this anonymous</span>
<span class="cm">      function, Lua creates a closure.]]</span>
<span class="w">    </span><span class="kr">return</span><span class="w"> </span><span class="nv">x</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nv">y</span>
<span class="w">  </span><span class="kr">end</span>
<span class="kr">end</span>
<span class="nv">fourplus</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">addto</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="nf">fourplus</span><span class="p">(</span><span class="mi">3</span><span class="p">))</span><span class="w"> </span><span class="c1">-- Prints 7</span>

<span class="c1">--This can also be achieved by calling the function in the following way:</span>
<span class="nb">print</span><span class="p">(</span><span class="nf">addto</span><span class="p">(</span><span class="mi">4</span><span class="p">)(</span><span class="mi">3</span><span class="p">))</span>
<span class="cm">--[[ This is because we are calling the returned function from 'addto(4)' with the argument '3' directly.</span>
<span class="cm">  This also helps to reduce data cost and up performance if being called iteratively.]]</span>
</pre></div>
<p>A new closure for the variable <code>x</code> is created every time <code>addto</code> is called, so that each new anonymous function returned will always access its own <code>x</code> parameter. The closure is managed by Lua's garbage collector, just like any other object.
</p>
<div class="mw-heading mw-heading3"><h3 id="Tables">Tables</h3></div>
<p>Tables are the most important data structures (and, by design, the only built-in <a href="Composite_data_type" title="Composite data type">composite data type</a>) in Lua and are the foundation of all user-created types. They are associative arrays with addition of automatic numeric key and special syntax.
</p><p>A table is a set of key and data pairs, where the data is referenced by key; in other words, it is a <a href="Hash_table" title="Hash table">hashed</a> heterogeneous associative array.
</p><p>Tables are created using the <code>{}</code> constructor syntax.
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="nv">a_table</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{}</span><span class="w"> </span><span class="c1">-- Creates a new, empty table</span>
</pre></div>
<p>Tables are always passed by reference (see <a href="Call_by_sharing" class="mw-redirect" title="Call by sharing">Call by sharing</a>).
</p><p>A key (index) can be any value except <code>nil</code> and <a href="NaN" title="NaN">NaN</a>, including functions.
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="nv">a_table</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="nv">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">10</span><span class="p">}</span><span class="w">  </span><span class="c1">-- Creates a new table, with one entry mapping "x" to the number 10.</span>
<span class="nb">print</span><span class="p">(</span><span class="nv">a_table</span><span class="p">[</span><span class="s2">"x"</span><span class="p">])</span><span class="w"> </span><span class="c1">-- Prints the value associated with the string key, in this case 10.</span>
<span class="nv">b_table</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">a_table</span>
<span class="nv">b_table</span><span class="p">[</span><span class="s2">"x"</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">20</span><span class="w">   </span><span class="c1">-- The value in the table has been changed to 20.</span>
<span class="nb">print</span><span class="p">(</span><span class="nv">b_table</span><span class="p">[</span><span class="s2">"x"</span><span class="p">])</span><span class="w"> </span><span class="c1">-- Prints 20.</span>
<span class="nb">print</span><span class="p">(</span><span class="nv">a_table</span><span class="p">[</span><span class="s2">"x"</span><span class="p">])</span><span class="w"> </span><span class="c1">-- Also prints 20, because a_table and b_table both refer to the same table.</span>
</pre></div>
<p>A table is often used as <a href="Object_composition" title="Object composition">structure</a> (or <a href="Record_(computer_science)" title="Record (computer science)">record</a>) by using <a href="String_(computer_science)" title="String (computer science)">strings</a> as keys. Because such use is very common, Lua features a special syntax for accessing such fields.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="nv">point</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nv">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="nv">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">20</span><span class="w"> </span><span class="p">}</span><span class="w">   </span><span class="c1">-- Create new table</span>
<span class="nb">print</span><span class="p">(</span><span class="nv">point</span><span class="p">[</span><span class="s2">"x"</span><span class="p">])</span><span class="w">            </span><span class="c1">-- Prints 10</span>
<span class="nb">print</span><span class="p">(</span><span class="nv">point</span><span class="p">.</span><span class="py">x</span><span class="p">)</span><span class="w">               </span><span class="c1">-- Has exactly the same meaning as line above. The easier-to-read dot notation is just syntactic sugar.</span>
</pre></div>
<p>By using a table to store related functions, it can act as a namespace.
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="nv">Point</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{}</span>

<span class="nv">Point</span><span class="p">.</span><span class="py">new</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kr">function</span><span class="p">(</span><span class="nv">x</span><span class="p">,</span><span class="w"> </span><span class="nv">y</span><span class="p">)</span>
<span class="w">  </span><span class="kr">return</span><span class="w"> </span><span class="p">{</span><span class="nv">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">x</span><span class="p">,</span><span class="w"> </span><span class="nv">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">y</span><span class="p">}</span><span class="w">  </span><span class="c1">--  return {["x"] = x, ["y"] = y}</span>
<span class="kr">end</span>

<span class="nv">Point</span><span class="p">.</span><span class="py">set_x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kr">function</span><span class="p">(</span><span class="nv">point</span><span class="p">,</span><span class="w"> </span><span class="nv">x</span><span class="p">)</span>
<span class="w">  </span><span class="nv">point</span><span class="p">.</span><span class="py">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">x</span><span class="w">  </span><span class="c1">--  point["x"] = x;</span>
<span class="kr">end</span>
</pre></div>
<p>Tables are automatically assigned a numerical key, enabling them to be used as an <a href="Array_data_type" class="mw-redirect" title="Array data type">array data type</a>. The first automatic index is 1 rather than 0 as it is for many other programming languages (though an explicit index of 0 is allowed).
</p><p>A numeric key <code>1</code> is distinct from a string key <code>"1"</code>.
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="nv">array</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s2">"a"</span><span class="p">,</span><span class="w"> </span><span class="s2">"b"</span><span class="p">,</span><span class="w"> </span><span class="s2">"c"</span><span class="p">,</span><span class="w"> </span><span class="s2">"d"</span><span class="w"> </span><span class="p">}</span><span class="w">   </span><span class="c1">-- Indices are assigned automatically.</span>
<span class="nb">print</span><span class="p">(</span><span class="nv">array</span><span class="p">[</span><span class="mi">2</span><span class="p">])</span><span class="w">                  </span><span class="c1">-- Prints "b". Automatic indexing in Lua starts at 1.</span>
<span class="nb">print</span><span class="p">(</span><span class="o">#</span><span class="nv">array</span><span class="p">)</span><span class="w">                    </span><span class="c1">-- Prints 4.  # is the length operator for tables and strings.</span>
<span class="nv">array</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"z"</span><span class="w">                   </span><span class="c1">-- Zero is a legal index.</span>
<span class="nb">print</span><span class="p">(</span><span class="o">#</span><span class="nv">array</span><span class="p">)</span><span class="w">                    </span><span class="c1">-- Still prints 4, as Lua arrays are 1-based.</span>
</pre></div>
<p>The length of a table <code>t</code> is defined to be any integer index <code>n</code> such that <code>t[n]</code> is not <code>nil</code> and <code>t[n+1]</code> is <code>nil</code>; moreover, if <code>t[1]</code> is <code>nil</code>, <code>n</code> can be zero. For a regular array, with non-nil values from 1 to a given <code>n</code>, its length is exactly that <code>n</code>, the index of its last value. If the array has "holes" (that is, nil values between other non-nil values), then <code>#t</code> can be any of the indices that directly precedes a <code>nil</code> value (that is, it may consider any such nil value as the end of the array).<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="nv">ExampleTable</span><span class="w"> </span><span class="o">=</span>
<span class="p">{</span>
<span class="w">  </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="mi">4</span><span class="p">},</span>
<span class="w">  </span><span class="p">{</span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">,</span><span class="w"> </span><span class="mi">7</span><span class="p">,</span><span class="w"> </span><span class="mi">8</span><span class="p">}</span>
<span class="p">}</span>
<span class="nb">print</span><span class="p">(</span><span class="nv">ExampleTable</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="mi">3</span><span class="p">])</span><span class="w"> </span><span class="c1">-- Prints "3"</span>
<span class="nb">print</span><span class="p">(</span><span class="nv">ExampleTable</span><span class="p">[</span><span class="mi">2</span><span class="p">][</span><span class="mi">4</span><span class="p">])</span><span class="w"> </span><span class="c1">-- Prints "8"</span>
</pre></div>
<p>A table can be an array of objects.
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kr">function</span><span class="w"> </span><span class="nf">Point</span><span class="p">(</span><span class="nv">x</span><span class="p">,</span><span class="w"> </span><span class="nv">y</span><span class="p">)</span><span class="w">        </span><span class="c1">-- "Point" object constructor</span>
<span class="w">  </span><span class="kr">return</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nv">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">x</span><span class="p">,</span><span class="w"> </span><span class="nv">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">y</span><span class="w"> </span><span class="p">}</span><span class="w">   </span><span class="c1">-- Creates and returns a new object (table)</span>
<span class="kr">end</span>
<span class="nv">array</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nf">Point</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">),</span><span class="w"> </span><span class="nf">Point</span><span class="p">(</span><span class="mi">30</span><span class="p">,</span><span class="w"> </span><span class="mi">40</span><span class="p">),</span><span class="w"> </span><span class="nf">Point</span><span class="p">(</span><span class="mi">50</span><span class="p">,</span><span class="w"> </span><span class="mi">60</span><span class="p">)</span><span class="w"> </span><span class="p">}</span><span class="w">   </span><span class="c1">-- Creates array of points</span>
<span class="w">                        </span><span class="c1">-- array = { { x = 10, y = 20 }, { x = 30, y = 40 }, { x = 50, y = 60 } };</span>
<span class="nb">print</span><span class="p">(</span><span class="nv">array</span><span class="p">[</span><span class="mi">2</span><span class="p">].</span><span class="nv">y</span><span class="p">)</span><span class="w">                                         </span><span class="c1">-- Prints 40</span>
</pre></div>
<p>Using a hash map to emulate an array is normally slower than using an actual array; however, Lua tables are optimized for use as arrays to help avoid this issue.<sup id="cite_ref-lobject_h_array_13-0" class="reference"><a href="#cite_note-lobject_h_array-13"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Metatables">Metatables</h3></div>
<p>Extensible semantics is a key feature of Lua, and the metatable allows powerful customization of tables. The following example demonstrates an "infinite" table. For any <code>n</code>, <code>fibs[n]</code> will give the <code>n</code>-th <a href="Fibonacci_number" class="mw-redirect" title="Fibonacci number">Fibonacci number</a> using <a href="Dynamic_programming" title="Dynamic programming">dynamic programming</a> and <a href="Memoization" title="Memoization">memoization</a>.
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="nv">fibs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="p">}</span><span class="w">                                </span><span class="c1">-- Initial values for fibs[1] and fibs[2].</span>
<span class="nb">setmetatable</span><span class="p">(</span><span class="nv">fibs</span><span class="p">,</span><span class="w"> </span><span class="p">{</span>
<span class="w">  </span><span class="nv">__index</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kr">function</span><span class="p">(</span><span class="nv">values</span><span class="p">,</span><span class="w"> </span><span class="nv">n</span><span class="p">)</span><span class="w">                </span><span class="cm">--[[__index is a function predefined by Lua, </span>
<span class="cm">                                                   it is called if key "n" does not exist.]]</span>
<span class="w">    </span><span class="nv">values</span><span class="p">[</span><span class="nv">n</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">values</span><span class="p">[</span><span class="nv">n</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nv">values</span><span class="p">[</span><span class="nv">n</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">2</span><span class="p">]</span><span class="w">  </span><span class="c1">-- Calculate and memoize fibs[n].</span>
<span class="w">    </span><span class="kr">return</span><span class="w"> </span><span class="nv">values</span><span class="p">[</span><span class="nv">n</span><span class="p">]</span>
<span class="w">  </span><span class="kr">end</span>
<span class="p">})</span>
</pre></div>
<div class="mw-heading mw-heading3"><h3 id="Object-oriented_programming">Object-oriented programming</h3></div>
<p>Although Lua does not have a built-in concept of <a href="Class_(computer_science)" class="mw-redirect" title="Class (computer science)">classes</a>, <a href="Object-oriented_programming" title="Object-oriented programming">object-oriented programming</a> can be emulated using functions and tables. An object is formed by putting methods and fields in a table. <a href="Inheritance_(object-oriented_programming)" title="Inheritance (object-oriented programming)">Inheritance</a> (both single and multiple) can be implemented with <a href="#Metatables">metatables</a>, delegating nonexistent methods and fields to a parent object.
</p><p>There is no such concept as "class" with these techniques; rather, <a href="Prototype-based_programming" title="Prototype-based programming">prototypes</a> are used, similar to <a href="Self_(programming_language)" title="Self (programming language)">Self</a> or <a href="JavaScript" title="JavaScript">JavaScript</a>. New objects are created either with a <a href="Factory_method_pattern" title="Factory method pattern">factory method</a> (that constructs new objects from scratch) or by cloning an existing object.
</p><p>Creating a basic <a href="Vector_(geometry)" class="mw-redirect" title="Vector (geometry)">vector</a> object:
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kd">local</span><span class="w"> </span><span class="nv">Vector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{}</span>
<span class="kd">local</span><span class="w"> </span><span class="nv">VectorMeta</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nv">__index</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">Vector</span><span class="p">}</span>

<span class="kr">function</span><span class="w"> </span><span class="nc">Vector</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span><span class="nv">x</span><span class="p">,</span><span class="w"> </span><span class="nv">y</span><span class="p">,</span><span class="w"> </span><span class="nv">z</span><span class="p">)</span><span class="w">    </span><span class="c1">-- The constructor</span>
<span class="w">  </span><span class="kr">return</span><span class="w"> </span><span class="nb">setmetatable</span><span class="p">({</span><span class="nv">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">x</span><span class="p">,</span><span class="w"> </span><span class="nv">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">y</span><span class="p">,</span><span class="w"> </span><span class="nv">z</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">z</span><span class="p">},</span><span class="w"> </span><span class="nv">VectorMeta</span><span class="p">)</span>
<span class="kr">end</span>

<span class="kr">function</span><span class="w"> </span><span class="nc">Vector</span><span class="p">.</span><span class="nf">magnitude</span><span class="p">(</span><span class="nv">self</span><span class="p">)</span><span class="w">     </span><span class="c1">-- Another method</span>
<span class="w">  </span><span class="kr">return</span><span class="w"> </span><span class="nb">math.sqrt</span><span class="p">(</span><span class="nv">self</span><span class="p">.</span><span class="py">x</span><span class="o">^</span><span class="mi">2</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nv">self</span><span class="p">.</span><span class="py">y</span><span class="o">^</span><span class="mi">2</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nv">self</span><span class="p">.</span><span class="py">z</span><span class="o">^</span><span class="mi">2</span><span class="p">)</span>
<span class="kr">end</span>

<span class="kd">local</span><span class="w"> </span><span class="nv">vec</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">Vector</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="c1">-- Create a vector</span>
<span class="nb">print</span><span class="p">(</span><span class="nv">vec</span><span class="p">.</span><span class="nf">magnitude</span><span class="p">(</span><span class="nv">vec</span><span class="p">))</span><span class="w">       </span><span class="c1">-- Call a method (output: 1)</span>
<span class="nb">print</span><span class="p">(</span><span class="nv">vec</span><span class="p">.</span><span class="py">x</span><span class="p">)</span><span class="w">                    </span><span class="c1">-- Access a member variable (output: 0)</span>
</pre></div>
<p>Here, <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="nb">setmetatable</span></code> tells Lua to look for an element in the <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="nv">Vector</span></code> table if it is not present in the <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="nv">vec</span></code> table. <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="nv">vec</span><span class="p">.</span><span class="py">magnitude</span></code>, which is equivalent to <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="nv">vec</span><span class="p">[</span><span class="s2">"magnitude"</span><span class="p">]</span></code>, first looks in the <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="nv">vec</span></code> table for the <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="nv">magnitude</span></code> element. The <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="nv">vec</span></code> table does not have a <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="nv">magnitude</span></code> element, but its metatable delegates to the <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="nv">Vector</span></code> table for the <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="nv">magnitude</span></code> element when it's not found in the <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="nv">vec</span></code> table.
</p><p>Lua provides some <a href="Syntactic_sugar" title="Syntactic sugar">syntactic sugar</a> to facilitate object orientation. To declare <a href="Method_(computer_science)" class="mw-redirect" title="Method (computer science)">member functions</a> inside a prototype table, one can use <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="kr">function</span><span class="w"> </span><span class="nc">table</span><span class="p">:</span><span class="nf">func</span><span class="p">(</span><span class="nv">args</span><span class="p">)</span></code>, which is equivalent to <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="kr">function</span><span class="w"> </span><span class="nc">table</span><span class="p">.</span><span class="nf">func</span><span class="p">(</span><span class="nv">self</span><span class="p">,</span><span class="w"> </span><span class="nv">args</span><span class="p">)</span></code>. Calling class methods also makes use of the colon: <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="nv">object</span><span class="p">:</span><span class="nf">func</span><span class="p">(</span><span class="nv">args</span><span class="p">)</span></code> is equivalent to <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="nv">object</span><span class="p">.</span><span class="nf">func</span><span class="p">(</span><span class="nv">object</span><span class="p">,</span><span class="w"> </span><span class="nv">args</span><span class="p">)</span></code>.
</p><p>That in mind, here is a corresponding class with <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="p">:</span></code> syntactic sugar:
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kd">local</span><span class="w"> </span><span class="nv">Vector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{}</span>
<span class="nv">Vector</span><span class="p">.</span><span class="py">__index</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">Vector</span>

<span class="kr">function</span><span class="w"> </span><span class="nc">Vector</span><span class="p">:</span><span class="nf">new</span><span class="p">(</span><span class="nv">x</span><span class="p">,</span><span class="w"> </span><span class="nv">y</span><span class="p">,</span><span class="w"> </span><span class="nv">z</span><span class="p">)</span><span class="w">    </span><span class="c1">-- The constructor</span>
<span class="w">  </span><span class="c1">-- Since the function definition uses a colon, </span>
<span class="w">  </span><span class="c1">-- its first argument is "self" which refers</span>
<span class="w">  </span><span class="c1">-- to "Vector"</span>
<span class="w">  </span><span class="kr">return</span><span class="w"> </span><span class="nb">setmetatable</span><span class="p">({</span><span class="nv">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">x</span><span class="p">,</span><span class="w"> </span><span class="nv">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">y</span><span class="p">,</span><span class="w"> </span><span class="nv">z</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">z</span><span class="p">},</span><span class="w"> </span><span class="nv">self</span><span class="p">)</span>
<span class="kr">end</span>

<span class="kr">function</span><span class="w"> </span><span class="nc">Vector</span><span class="p">:</span><span class="nf">magnitude</span><span class="p">()</span><span class="w">     </span><span class="c1">-- Another method</span>
<span class="w">  </span><span class="c1">-- Reference the implicit object using self</span>
<span class="w">  </span><span class="kr">return</span><span class="w"> </span><span class="nb">math.sqrt</span><span class="p">(</span><span class="nv">self</span><span class="p">.</span><span class="py">x</span><span class="o">^</span><span class="mi">2</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nv">self</span><span class="p">.</span><span class="py">y</span><span class="o">^</span><span class="mi">2</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nv">self</span><span class="p">.</span><span class="py">z</span><span class="o">^</span><span class="mi">2</span><span class="p">)</span>
<span class="kr">end</span>

<span class="kd">local</span><span class="w"> </span><span class="nv">vec</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">Vector</span><span class="p">:</span><span class="nf">new</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="c1">-- Create a vector</span>
<span class="nb">print</span><span class="p">(</span><span class="nv">vec</span><span class="p">:</span><span class="nf">magnitude</span><span class="p">())</span><span class="w">          </span><span class="c1">-- Call a method (output: 1)</span>
<span class="nb">print</span><span class="p">(</span><span class="nv">vec</span><span class="p">.</span><span class="py">x</span><span class="p">)</span><span class="w">                    </span><span class="c1">-- Access a member variable (output: 0)</span>
</pre></div>
<div class="mw-heading mw-heading4"><h4 id="Inheritance">Inheritance</h4></div>
<p>It is possible to use metatables to mimic the behavior of class inheritance in Lua.<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup> In this example, we allow vectors to have their values multiplied by a constant in a derived class.
</p>
<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kd">local</span><span class="w"> </span><span class="nv">Vector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{}</span>
<span class="nv">Vector</span><span class="p">.</span><span class="py">__index</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">Vector</span>

<span class="kr">function</span><span class="w"> </span><span class="nc">Vector</span><span class="p">:</span><span class="nf">new</span><span class="p">(</span><span class="nv">x</span><span class="p">,</span><span class="w"> </span><span class="nv">y</span><span class="p">,</span><span class="w"> </span><span class="nv">z</span><span class="p">)</span><span class="w">    </span><span class="c1">-- The constructor</span>
<span class="w">  </span><span class="c1">-- Here, self refers to whatever class's "new"</span>
<span class="w">  </span><span class="c1">-- method we call.  In a derived class, self will</span>
<span class="w">  </span><span class="c1">-- be the derived class; in the Vector class, self</span>
<span class="w">  </span><span class="c1">-- will be Vector</span>
<span class="w">  </span><span class="kr">return</span><span class="w"> </span><span class="nb">setmetatable</span><span class="p">({</span><span class="nv">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">x</span><span class="p">,</span><span class="w"> </span><span class="nv">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">y</span><span class="p">,</span><span class="w"> </span><span class="nv">z</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">z</span><span class="p">},</span><span class="w"> </span><span class="nv">self</span><span class="p">)</span>
<span class="kr">end</span>

<span class="kr">function</span><span class="w"> </span><span class="nc">Vector</span><span class="p">:</span><span class="nf">magnitude</span><span class="p">()</span><span class="w">     </span><span class="c1">-- Another method</span>
<span class="w">  </span><span class="c1">-- Reference the implicit object using self</span>
<span class="w">  </span><span class="kr">return</span><span class="w"> </span><span class="nb">math.sqrt</span><span class="p">(</span><span class="nv">self</span><span class="p">.</span><span class="py">x</span><span class="o">^</span><span class="mi">2</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nv">self</span><span class="p">.</span><span class="py">y</span><span class="o">^</span><span class="mi">2</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nv">self</span><span class="p">.</span><span class="py">z</span><span class="o">^</span><span class="mi">2</span><span class="p">)</span>
<span class="kr">end</span>

<span class="c1">-- Example of pseudo class inheritance</span>
<span class="kd">local</span><span class="w"> </span><span class="nv">VectorMult</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{}</span>
<span class="nv">VectorMult</span><span class="p">.</span><span class="py">__index</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">VectorMult</span>
<span class="nb">setmetatable</span><span class="p">(</span><span class="nv">VectorMult</span><span class="p">,</span><span class="w"> </span><span class="nv">Vector</span><span class="p">)</span><span class="w"> </span><span class="c1">-- Make VectorMult a child of Vector</span>

<span class="kr">function</span><span class="w"> </span><span class="nc">VectorMult</span><span class="p">:</span><span class="nf">multiply</span><span class="p">(</span><span class="nv">value</span><span class="p">)</span><span class="w"> </span>
<span class="w">  </span><span class="nv">self</span><span class="p">.</span><span class="py">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">self</span><span class="p">.</span><span class="py">x</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="nv">value</span>
<span class="w">  </span><span class="nv">self</span><span class="p">.</span><span class="py">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">self</span><span class="p">.</span><span class="py">y</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="nv">value</span>
<span class="w">  </span><span class="nv">self</span><span class="p">.</span><span class="py">z</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">self</span><span class="p">.</span><span class="py">z</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="nv">value</span>
<span class="w">  </span><span class="kr">return</span><span class="w"> </span><span class="nv">self</span>
<span class="kr">end</span>

<span class="kd">local</span><span class="w"> </span><span class="nv">vec</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">VectorMult</span><span class="p">:</span><span class="nf">new</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="c1">-- Create a vector</span>
<span class="nb">print</span><span class="p">(</span><span class="nv">vec</span><span class="p">:</span><span class="nf">magnitude</span><span class="p">())</span><span class="w">          </span><span class="c1">-- Call a method (output: 1)</span>
<span class="nb">print</span><span class="p">(</span><span class="nv">vec</span><span class="p">.</span><span class="py">y</span><span class="p">)</span><span class="w">                    </span><span class="c1">-- Access a member variable (output: 1)</span>
<span class="nv">vec</span><span class="p">:</span><span class="nf">multiply</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span><span class="w">                 </span><span class="c1">-- Multiply all components of vector by 2</span>
<span class="nb">print</span><span class="p">(</span><span class="nv">vec</span><span class="p">.</span><span class="py">y</span><span class="p">)</span><span class="w">                    </span><span class="c1">-- Access member again (output: 2)</span>
</pre></div>
<p>It is also possible to implement <a href="Multiple_inheritance" title="Multiple inheritance">multiple inheritance</a>; <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">__index</code> can either be a function or a table.<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup> <a href="Operator_overloading" title="Operator overloading">Operator overloading</a> can also be done; Lua metatables can have elements such as <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">__add</code>, <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">__sub</code> and so on.<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Implementation">Implementation</h2></div>
<p>Lua programs are not <a href="Interpreter_(computing)" title="Interpreter (computing)">interpreted</a> directly from the textual Lua file, but are <a href="Compiler" title="Compiler">compiled</a> into bytecode, which is then run on the Lua <a href="Virtual_machine" title="Virtual machine">virtual machine</a> (VM). The compiling process is typically invisible to the user and is performed during <a href="Run_time_(program_lifecycle_phase)" class="mw-redirect" title="Run time (program lifecycle phase)">run-time</a>, especially when a <a href="Just-in-time_compilation" title="Just-in-time compilation">just-in-time compilation</a> (JIT) compiler is used, but it can be done offline to increase loading performance or reduce the memory footprint of the host environment by leaving out the compiler. Lua bytecode can also be produced and executed from within Lua, using the <code>dump</code> function from the string library and the <code>load/loadstring/loadfile</code> functions. Lua version 5.3.4 is implemented in approximately 24,000 lines of C code.<sup id="cite_ref-luaspe_2-1" class="reference"><a href="#cite_note-luaspe-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-luaabout_3-2" class="reference"><a href="#cite_note-luaabout-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p><p>Like most CPUs, and unlike most virtual machines (which are <a href="Stack_machine" title="Stack machine">stack-based</a>), the Lua VM is <a href="Register_machine" title="Register machine">register-based</a>, and therefore more closely resembles most hardware design. The register architecture both avoids excessive copying of values, and reduces the total number of instructions per function. The virtual machine of Lua 5 is one of the first register-based pure VMs to have a wide use.<sup id="cite_ref-lua5impl_17-0" class="reference"><a href="#cite_note-lua5impl-17"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup> <a href="Parrot_virtual_machine" title="Parrot virtual machine">Parrot</a> and <a href="Android_(operating_system)" title="Android (operating system)">Android</a>'s <a href="Dalvik_(software)" title="Dalvik (software)">Dalvik</a> are two other well-known register-based VMs. PCScheme's VM was also register-based.<sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup>
</p><p>This example is the bytecode listing of the factorial function defined <a href="#Factorial_example">above</a> (as shown by the <code>luac</code> 5.1 compiler):<sup id="cite_ref-luavm51instr_19-0" class="reference"><a href="#cite_note-luavm51instr-19"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup>
</p>
<pre>function &lt;factorial.lua:1,7&gt; (9 instructions, 36 bytes at 0x8063c60)
1 param, 6 slots, 0 upvalues, 6 locals, 2 constants, 0 functions
	1	[2]	LOADK    	1 -1	; 1
	2	[3]	LOADK    	2 -2	; 2
	3	[3]	MOVE     	3 0
	4	[3]	LOADK    	4 -1	; 1
	5	[3]	FORPREP  	2 1	; to 7
	6	[4]	MUL      	1 1 5
	7	[3]	FORLOOP  	2 -2	; to 6
	8	[6]	RETURN   	1 2
	9	[7]	RETURN   	0 1
</pre>
<div class="mw-heading mw-heading2"><h2 id="C_API">C API</h2></div>
<p>Lua is intended to be embedded into other applications, and provides a <a href="C_(programming_language)" title="C (programming language)">C</a> <a href="Application_Programming_Interface" class="mw-redirect" title="Application Programming Interface">API</a> for this purpose. The API is divided into two parts: the Lua core and the Lua auxiliary library.<sup id="cite_ref-luarefman_20-0" class="reference"><a href="#cite_note-luarefman-20"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup> The Lua API's design eliminates the need for manual <a href="Reference_counting" title="Reference counting">reference counting</a> (management) in C code, unlike <a href="Python_(programming_language)" title="Python (programming language)">Python</a>'s API. The API, like the language, is minimalist. Advanced functions are provided by the auxiliary library, which consists largely of <a href="Preprocessor" title="Preprocessor">preprocessor</a> <a href="Macro_(computer_science)" title="Macro (computer science)">macros</a> which assist with complex table operations.
</p><p>The Lua C API is <a href="Stack_(data_structure)" class="mw-redirect" title="Stack (data structure)">stack</a> based. Lua provides functions to push and pop most simple C data types (integers, floats, etc.) to and from the stack, and functions to manipulate tables through the stack. The Lua stack is somewhat different from a traditional stack; the stack can be indexed directly, for example. Negative indices indicate offsets from the top of the stack. For example, −1 is the top (most recently pushed value), while positive indices indicate offsets from the bottom (oldest value). <a href="Marshalling_(computer_science)" title="Marshalling (computer science)">Marshalling</a> data between C and Lua functions is also done using the stack. To call a Lua function, arguments are pushed onto the stack, and then the <code>lua_call</code> is used to call the actual function. When writing a C function to be directly called from Lua, the arguments are read from the stack.
</p><p>Here is an example of calling a Lua function from C:
</p>
<div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span></span><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;stdio.h&gt;</span>
<span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;lua.h&gt;</span><span class="c1"> // Lua main library (lua_*)</span>
<span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;lauxlib.h&gt;</span><span class="c1"> // Lua auxiliary library (luaL_*)</span>

<span class="kt">int</span><span class="w"> </span><span class="nf">main</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span>
<span class="p">{</span>
<span class="w">    </span><span class="c1">// create a Lua state</span>
<span class="w">    </span><span class="n">lua_State</span><span class="w"> </span><span class="o">*</span><span class="n">L</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">luaL_newstate</span><span class="p">();</span>

<span class="w">    </span><span class="c1">// load and execute a string</span>
<span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">luaL_dostring</span><span class="p">(</span><span class="n">L</span><span class="p">,</span><span class="w"> </span><span class="s">"function foo (x,y) return x+y end"</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
<span class="w">        </span><span class="n">lua_close</span><span class="p">(</span><span class="n">L</span><span class="p">);</span>
<span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span>
<span class="w">    </span><span class="p">}</span>

<span class="w">    </span><span class="c1">// push value of global "foo" (the function defined above)</span>
<span class="w">    </span><span class="c1">// to the stack, followed by integers 5 and 3</span>
<span class="w">    </span><span class="n">lua_getglobal</span><span class="p">(</span><span class="n">L</span><span class="p">,</span><span class="w"> </span><span class="s">"foo"</span><span class="p">);</span>
<span class="w">    </span><span class="n">lua_pushinteger</span><span class="p">(</span><span class="n">L</span><span class="p">,</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span>
<span class="w">    </span><span class="n">lua_pushinteger</span><span class="p">(</span><span class="n">L</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">);</span>
<span class="w">    </span><span class="n">lua_call</span><span class="p">(</span><span class="n">L</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span><span class="w"> </span><span class="c1">// call a function with two arguments and one return value</span>
<span class="w">    </span><span class="n">printf</span><span class="p">(</span><span class="s">"Result: %d</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">lua_tointeger</span><span class="p">(</span><span class="n">L</span><span class="p">,</span><span class="w"> </span><span class="mi">-1</span><span class="p">));</span><span class="w"> </span><span class="c1">// print integer value of item at stack top</span>
<span class="w">    </span><span class="n">lua_pop</span><span class="p">(</span><span class="n">L</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span><span class="w"> </span><span class="c1">// return stack to original state</span>
<span class="w">    </span><span class="n">lua_close</span><span class="p">(</span><span class="n">L</span><span class="p">);</span><span class="w"> </span><span class="c1">// close Lua state</span>
<span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
<p>Running this example gives:
</p>
<div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr"><pre><span></span><span class="gp">$ </span>cc<span class="w"> </span>-o<span class="w"> </span>example<span class="w"> </span>example.c<span class="w"> </span>-llua
<span class="gp">$ </span>./example
<span class="go">Result: 8</span>
</pre></div>
<p>The C API also provides some special tables, located at various "pseudo-indices" in the Lua stack. At <code>LUA_GLOBALSINDEX</code> prior to Lua 5.2<sup id="cite_ref-Changes_in_the_API,_Lua_5.2_manual_21-0" class="reference"><a href="#cite_note-Changes_in_the_API,_Lua_5.2_manual-21"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup> is the globals table, <code>_G</code> from within Lua, which is the main <a href="Namespace" title="Namespace">namespace</a>. There is also a registry located at <code>LUA_REGISTRYINDEX</code> where C programs can store Lua values for later retrieval.
</p>
<div class="mw-heading mw-heading3"><h3 id="Modules">Modules</h3></div>
<p>Besides standard library (core) modules it is possible to write extensions using the Lua API. Extension modules are <a href="Library_(computing)#Dynamic_linking" title="Library (computing)">shared objects</a> which can be used to extend the functions of the interpreter by providing native facilities to Lua scripts. Lua scripts may load extension modules using <code>require</code>,<sup id="cite_ref-luarefman_20-1" class="reference"><a href="#cite_note-luarefman-20"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup> just like modules written in Lua itself, or with <code>package.loadlib</code>.<sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup> When a C library is loaded via <a href="Foo" class="mw-redirect" title="Foo"><code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="nb">require</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">)</span></code></a> Lua will look for the function <code>luaopen_foo</code> and call it, which acts as any C function callable from Lua and generally returns a table filled with methods. A growing set of modules termed <i>rocks</i> are available through a <a href="Package_management_system" class="mw-redirect" title="Package management system">package management system</a> named <a href="LuaRocks" title="LuaRocks">LuaRocks</a>,<sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup> in the spirit of <a href="CPAN" title="CPAN">CPAN</a>, <a href="RubyGems" title="RubyGems">RubyGems</a> and Python eggs. Prewritten Lua <a href="Language_binding" title="Language binding">bindings</a> exist for most popular programming languages, including other scripting languages.<sup id="cite_ref-24" class="reference"><a href="#cite_note-24"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup> For C++, there are a number of template-based approaches and some automatic binding generators.
</p>
<div class="mw-heading mw-heading2"><h2 id="Applications">Applications</h2></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="List_of_applications_using_Lua" title="List of applications using Lua">List of applications using Lua</a></div>
<p>In <a href="Video_game_development" title="Video game development">video game development</a>, Lua is widely used as a <a href="Scripting_language" title="Scripting language">scripting language</a>, mainly due to its perceived ease of embedding, fast execution, and short <a href="Learning_curve" title="Learning curve">learning curve</a>.<sup id="cite_ref-25" class="reference"><a href="#cite_note-25"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup> Notable games which use Lua include <i><a href="Roblox" title="Roblox">Roblox</a></i>,<sup id="cite_ref-26" class="reference"><a href="#cite_note-26"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup> <i><a href="Garry's_Mod" title="Garry's Mod">Garry's Mod</a></i>, <i> <a href="World_of_Warcraft" title="World of Warcraft">World of Warcraft</a></i>, <i><a href="Payday_2" title="Payday 2">Payday 2</a></i>, <i><a href="Project_Zomboid" title="Project Zomboid">Project Zomboid</a></i>, <i><a href="Phantasy_Star_Online_2" title="Phantasy Star Online 2">Phantasy Star Online 2</a></i>, <i><a href="Dota_2" title="Dota 2">Dota 2</a></i>, <i><a href="Crysis_(video_game)" title="Crysis (video game)">Crysis</a></i>,<sup id="cite_ref-27" class="reference"><a href="#cite_note-27"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup> and many others. Some games that do not natively support Lua programming or scripting have this function added by mods, as ComputerCraft does for <i><a href="Minecraft" title="Minecraft">Minecraft</a></i>. Similarly, Lua API libraries, like Discordia, are used for platforms that do not natively support Lua.<sup id="cite_ref-28" class="reference"><a href="#cite_note-28"><span class="cite-bracket">[</span>27<span class="cite-bracket">]</span></a></sup> Lua is used in the open-source 2-dimensional game engine <a href="L%C3%96VE" class="mw-redirect" title="LÖVE">LÖVE</a>.<sup id="cite_ref-29" class="reference"><a href="#cite_note-29"><span class="cite-bracket">[</span>28<span class="cite-bracket">]</span></a></sup> Also, Lua is used in non-video game software, such as <a href="Adobe_Lightroom" title="Adobe Lightroom">Adobe Lightroom</a>, <a href="Moho_(software)" title="Moho (software)">Moho</a>, <a href="IClone" title="IClone">iClone</a>, <a href="Aerospike_(database)" title="Aerospike (database)">Aerospike</a>, and some system software in <a href="FreeBSD" title="FreeBSD">FreeBSD</a> and <a href="NetBSD" title="NetBSD">NetBSD</a>, and used as a template scripting language on <a href="MediaWiki" title="MediaWiki">MediaWiki</a> using the Scribunto extension.<sup id="cite_ref-30" class="reference"><a href="#cite_note-30"><span class="cite-bracket">[</span>29<span class="cite-bracket">]</span></a></sup>
</p><p>In 2003, a poll conducted by GameDev.net showed that Lua was the most popular scripting language for game programming.<sup id="cite_ref-31" class="reference"><a href="#cite_note-31"><span class="cite-bracket">[</span>30<span class="cite-bracket">]</span></a></sup> On 12 January 2012, Lua was announced as a winner of the Front Line Award 2011 from the magazine <i><a href="Game_Developer_(magazine)" title="Game Developer (magazine)">Game Developer</a></i> in the category Programming Tools.<sup id="cite_ref-32" class="reference"><a href="#cite_note-32"><span class="cite-bracket">[</span>31<span class="cite-bracket">]</span></a></sup>
</p><p>Many non-game applications also use Lua for extensibility, such as <a href="LuaTeX" title="LuaTeX">LuaTeX</a>, an implementation of the <a href="TeX" title="TeX">TeX</a> type-setting language; <a href="Redis" title="Redis">Redis</a>, a <a href="Key-value_database" class="mw-redirect" title="Key-value database">key-value database</a>; <a href="ScyllaDB" title="ScyllaDB">ScyllaDB</a>, a <a href="Wide-column_store" title="Wide-column store">wide-column store</a>, <a href="Neovim" title="Neovim">Neovim</a>, a text editor; <a href="Nginx" title="Nginx">Nginx</a>, a <a href="Web_server" title="Web server">web server</a>; <a href="Wireshark" title="Wireshark">Wireshark</a>, a network packet analyzer; Discordia, a <a href="Discord" title="Discord">Discord</a> API library; and <a href="Pure_Data" title="Pure Data">Pure Data</a>, a visual audio programming language (through the pdlua extension).
</p>
<div class="mw-heading mw-heading2"><h2 id="Derived_languages">Derived languages</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Languages_that_compile_to_Lua">Languages that compile to Lua</h3></div>
<ul><li>MoonScript is a <a href="Dynamic_programming_language" title="Dynamic programming language">dynamic</a>, <a href="Whitespace_character" title="Whitespace character">whitespace</a>-sensitive <a href="Scripting_language" title="Scripting language">scripting language</a> inspired by <a href="CoffeeScript" title="CoffeeScript">CoffeeScript</a>, which is compiled into Lua. This means that instead of using <code>do</code> and <code>end</code> (or <code>{</code> and <code>}</code>) to delimit sections of code it uses <a href="Line_break_(computing)" class="mw-redirect" title="Line break (computing)">line breaks</a> and <a href="Indentation_style" title="Indentation style">indentation style</a>.<sup id="cite_ref-33" class="reference"><a href="#cite_note-33"><span class="cite-bracket">[</span>32<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-34" class="reference"><a href="#cite_note-34"><span class="cite-bracket">[</span>33<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-:1_35-0" class="reference"><a href="#cite_note-:1-35"><span class="cite-bracket">[</span>34<span class="cite-bracket">]</span></a></sup> A notable use of MoonScript is the video game distribution website <a href="Itch.io" title="Itch.io">Itch.io</a>.</li>
<li><a href="Haxe" title="Haxe">Haxe</a> supports compiling to some Lua targets, including Lua 5.1–5.3 and <a href="LuaJIT" title="LuaJIT">LuaJIT</a> 2.0 and 2.1.</li>
<li>Fennel, a Lisp dialect that targets Lua.<sup id="cite_ref-:1_35-1" class="reference"><a href="#cite_note-:1-35"><span class="cite-bracket">[</span>34<span class="cite-bracket">]</span></a></sup></li>
<li>Urn, a <a href="Lisp_(programming_language)" title="Lisp (programming language)">Lisp</a> dialect built on Lua.<sup id="cite_ref-36" class="reference"><a href="#cite_note-36"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup></li>
<li>Amulet, an <a href="ML_(programming_language)" title="ML (programming language)">ML</a>-like <a href="Functional_programming" title="Functional programming">functional programming</a> language, which compiler emits Lua files.<sup id="cite_ref-37" class="reference"><a href="#cite_note-37"><span class="cite-bracket">[</span>36<span class="cite-bracket">]</span></a></sup></li>
<li>LunarML, Standard ML compiler that produces Lua/JavaScript<sup id="cite_ref-38" class="reference"><a href="#cite_note-38"><span class="cite-bracket">[</span>37<span class="cite-bracket">]</span></a></sup></li></ul>
<div class="mw-heading mw-heading3"><h3 id="Dialects">Dialects</h3></div>
<ul><li><a href="LuaJIT" title="LuaJIT">LuaJIT</a>, a just-in-time compiler of Lua 5.1.<sup id="cite_ref-39" class="reference"><a href="#cite_note-39"><span class="cite-bracket">[</span>38<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-40" class="reference"><a href="#cite_note-40"><span class="cite-bracket">[</span>39<span class="cite-bracket">]</span></a></sup></li>
<li><a href="Roblox#Roblox_Studio_and_game_design" title="Roblox">Luau</a> developed by <a href="Roblox_Corporation" title="Roblox Corporation">Roblox Corporation</a>, a derivative of and backwards-compatible with Lua 5.1 with <a href="Gradual_typing" title="Gradual typing">gradual typing</a>, additional features, and a focus on performance.<sup id="cite_ref-41" class="reference"><a href="#cite_note-41"><span class="cite-bracket">[</span>40<span class="cite-bracket">]</span></a></sup> Luau has improved sandboxing to allow for running untrusted code in embedded applications.<sup id="cite_ref-42" class="reference"><a href="#cite_note-42"><span class="cite-bracket">[</span>41<span class="cite-bracket">]</span></a></sup></li>
<li>Ravi, a JIT-enabled Lua 5.3 language with optional static typing. JIT is guided by type information.<sup id="cite_ref-43" class="reference"><a href="#cite_note-43"><span class="cite-bracket">[</span>42<span class="cite-bracket">]</span></a></sup></li>
<li>Shine, a fork of <a href="LuaJIT" title="LuaJIT">LuaJIT</a> with many extensions, including a module system and a macro system.<sup id="cite_ref-44" class="reference"><a href="#cite_note-44"><span class="cite-bracket">[</span>43<span class="cite-bracket">]</span></a></sup></li>
<li>Glua, a modified version embedded into the game <a href="Garry's_Mod" title="Garry's Mod">Garry's Mod</a> as its scripting language.<sup id="cite_ref-45" class="reference"><a href="#cite_note-45"><span class="cite-bracket">[</span>44<span class="cite-bracket">]</span></a></sup></li>
<li>Teal, a <a href="Type_system#Static_type_checking" title="Type system">statically typed</a> Lua dialect written in Lua.<sup id="cite_ref-46" class="reference"><a href="#cite_note-46"><span class="cite-bracket">[</span>45<span class="cite-bracket">]</span></a></sup></li>
<li><a href="PICO-8" title="PICO-8">PICO-8</a>, a "fantasy video game console", uses a subset of Lua known as PICO-8 Lua.</li>
<li>Pluto, a superset of Lua 5.4 offering enhanced syntax, libraries, and better developer experience, all while staying compatible with regular Lua.<sup id="cite_ref-47" class="reference"><a href="#cite_note-47"><span class="cite-bracket">[</span>46<span class="cite-bracket">]</span></a></sup></li></ul>
<p>In addition, the Lua users community provides some <i>power patches</i> on top of the reference C implementation.<sup id="cite_ref-48" class="reference"><a href="#cite_note-48"><span class="cite-bracket">[</span>47<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Comparison_of_programming_languages" title="Comparison of programming languages">Comparison of programming languages</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="Notes">Notes</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1327269900">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}body.skin-vector-2022 .mw-parser-output .reflist-columns-2{column-width:27em}body.skin-vector-2022 .mw-parser-output .reflist-columns-3{column-width:22.5em}.mw-parser-output .references[data-mw-group=upper-alpha]{list-style-type:upper-alpha}.mw-parser-output .references[data-mw-group=upper-roman]{list-style-type:upper-roman}.mw-parser-output .references[data-mw-group=lower-alpha]{list-style-type:lower-alpha}.mw-parser-output .references[data-mw-group=lower-greek]{list-style-type:lower-greek}.mw-parser-output .references[data-mw-group=lower-roman]{list-style-type:lower-roman}.mw-parser-output div.reflist-liststyle-upper-alpha .references{list-style-type:upper-alpha}.mw-parser-output div.reflist-liststyle-upper-roman .references{list-style-type:upper-roman}.mw-parser-output div.reflist-liststyle-lower-alpha .references{list-style-type:lower-alpha}.mw-parser-output div.reflist-liststyle-lower-greek .references{list-style-type:lower-greek}.mw-parser-output div.reflist-liststyle-lower-roman .references{list-style-type:lower-roman}


/* end   https://en.wikipedia.org/ */
</style><div>
<div class="mw-references-wrap"><ol class="references" data-mw-group="lower-alpha">
<li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><a href="Syntactic_sugar" title="Syntactic sugar">Syntactic sugar</a>, a table construct or literal string following an identifier is a valid function call.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup></span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<div>
<div class="mw-references-wrap mw-references-columns"><ol class="references">
<li id="cite_note-wikidata-2c354affd7152198918c292630c9c4314aa68c15-v20-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-wikidata-2c354affd7152198918c292630c9c4314aa68c15-v20_1-0">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1333433106">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./_mw_/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./_mw_/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./_mw_/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./_mw_/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#bf3c2c)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#bf3c2c)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end   https://en.wikipedia.org/ */
</style><cite class="citation web cs1"> <a rel="nofollow" class="external text" href="https://lua.org/versions.html#5.5">https://lua.org/versions.html#5.5</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft_id=https%3A%2F%2Flua.org%2Fversions.html%235.5&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span> <span class="cs1-visible-error citation-comment"><code class="cs1-code">{{cite web}}</code>: </span><span class="cs1-visible-error citation-comment">Missing or empty <code class="cs1-code">|title=</code> (help)</span></span>
</li>
<li id="cite_note-luaspe-2"><span class="mw-cite-backlink">^ <a href="#cite_ref-luaspe_2-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-luaspe_2-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFIerusalimschyde_FigueiredoFilho1996" class="citation journal cs1">Ierusalimschy, Roberto; de Figueiredo, Luiz Henrique; Filho, Waldemar Celes (June 1996). <span class="id-lock-subscription" title="Paid subscription required"><a rel="nofollow" class="external text" href="https://www.lua.org/spe.html">"Lua—An Extensible Extension Language"</a></span>. <i>Software: Practice and Experience</i>. <b>26</b> (6): <span class="nowrap">635–</span>652. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1002%2F%28SICI%291097-024X%28199606%2926%3A6%3C635%3A%3AAID-SPE26%3E3.0.CO%3B2-P">10.1002/(SICI)1097-024X(199606)26:6&lt;635::AID-SPE26&gt;3.0.CO;2-P</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:61066194">61066194</a><span class="reference-accessdate">. Retrieved <span class="nowrap">24 October</span> 2015</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Software%3A+Practice+and+Experience&amp;rft.atitle=Lua%E2%80%94An+Extensible+Extension+Language&amp;rft.volume=26&amp;rft.issue=6&amp;rft.pages=635-652&amp;rft.date=1996-06&amp;rft_id=info%3Adoi%2F10.1002%2F%28SICI%291097-024X%28199606%2926%3A6%3C635%3A%3AAID-SPE26%3E3.0.CO%3B2-P&amp;rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A61066194%23id-name%3DS2CID&amp;rft.aulast=Ierusalimschy&amp;rft.aufirst=Roberto&amp;rft.au=de+Figueiredo%2C+Luiz+Henrique&amp;rft.au=Filho%2C+Waldemar+Celes&amp;rft_id=https%3A%2F%2Fwww.lua.org%2Fspe.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-luaabout-3"><span class="mw-cite-backlink">^ <a href="#cite_ref-luaabout_3-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-luaabout_3-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-luaabout_3-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.lua.org/about.html#why">"About Lua"</a>. Lua.org<span class="reference-accessdate">. Retrieved <span class="nowrap">11 August</span> 2011</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=About+Lua&amp;rft.pub=Lua.org&amp;rft_id=https%3A%2F%2Fwww.lua.org%2Fabout.html%23why&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite id="CITEREFTakhteyev2013" class="citation magazine cs1">Takhteyev, Yuri (21 April 2013). <a rel="nofollow" class="external text" href="https://www.foreignaffairs.com/articles/139332/yuri-takhteyev/from-brazil-to-wikipedia?page=2">"From Brazil to Wikipedia"</a>. <i><a href="Foreign_Affairs" title="Foreign Affairs">Foreign Affairs</a></i><span class="reference-accessdate">. Retrieved <span class="nowrap">25 April</span> 2013</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Foreign+Affairs&amp;rft.atitle=From+Brazil+to+Wikipedia&amp;rft.date=2013-04-21&amp;rft.aulast=Takhteyev&amp;rft.aufirst=Yuri&amp;rft_id=https%3A%2F%2Fwww.foreignaffairs.com%2Farticles%2F139332%2Fyuri-takhteyev%2Ffrom-brazil-to-wikipedia%3Fpage%3D2&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-hopl2007-5"><span class="mw-cite-backlink">^ <a href="#cite_ref-hopl2007_5-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-hopl2007_5-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-hopl2007_5-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-hopl2007_5-3"><sup><i><b>d</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFIerusalimschyFigueiredoCeles2007" class="citation book cs1"><a href="Roberto_Ierusalimschy" title="Roberto Ierusalimschy">Ierusalimschy, R.</a>; Figueiredo, L. H.; Celes, W. (2007). <a rel="nofollow" class="external text" href="https://www.lua.org/doc/hopl.pdf">"The evolution of Lua"</a> <span class="cs1-format">(PDF)</span>. <a rel="nofollow" class="external text" href="https://www.acm.org/sigs/sigplan/hopl"><i>Proceedings of the third ACM SIGPLAN conference on History of programming languages</i></a>. pp.&nbsp;2–1–2–26. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F1238844.1238846">10.1145/1238844.1238846</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-1-59593-766-7</bdi>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:475143">475143</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.atitle=The+evolution+of+Lua&amp;rft.btitle=Proceedings+of+the+third+ACM+SIGPLAN+conference+on+History+of+programming+languages&amp;rft.pages=2-1-2-26&amp;rft.date=2007&amp;rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A475143%23id-name%3DS2CID&amp;rft_id=info%3Adoi%2F10.1145%2F1238844.1238846&amp;rft.isbn=978-1-59593-766-7&amp;rft.aulast=Ierusalimschy&amp;rft.aufirst=R.&amp;rft.au=Figueiredo%2C+L.+H.&amp;rft.au=Celes%2C+W.&amp;rft_id=https%3A%2F%2Fwww.lua.org%2Fdoc%2Fhopl.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-luahist2001-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-luahist2001_6-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.lua.org/history.html">"The evolution of an extension language: a history of Lua"</a>. 2001<span class="reference-accessdate">. Retrieved <span class="nowrap">18 December</span> 2008</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=The+evolution+of+an+extension+language%3A+a+history+of+Lua&amp;rft.date=2001&amp;rft_id=https%3A%2F%2Fwww.lua.org%2Fhistory.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span>
</span>
</li>
<li id="cite_note-ddj96-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-ddj96_7-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFFigueiredoIerusalimschyCeles1996" class="citation news cs1">Figueiredo, L. H.; Ierusalimschy, R.; Celes, W. (December 1996). <a rel="nofollow" class="external text" href="https://www.lua.org/ddj.html">"Lua: an Extensible Embedded Language. A few metamechanisms replace a host of features"</a>. <i>Dr. Dobb's Journal</i>. Vol.&nbsp;21, no.&nbsp;12. pp.&nbsp;<span class="nowrap">26–</span>33.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Dr.+Dobb%27s+Journal&amp;rft.atitle=Lua%3A+an+Extensible+Embedded+Language.+A+few+metamechanisms+replace+a+host+of+features&amp;rft.volume=21&amp;rft.issue=12&amp;rft.pages=26-33&amp;rft.date=1996-12&amp;rft.aulast=Figueiredo&amp;rft.aufirst=L.+H.&amp;rft.au=Ierusalimschy%2C+R.&amp;rft.au=Celes%2C+W.&amp;rft_id=https%3A%2F%2Fwww.lua.org%2Fddj.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.lua.org/pil/1.html">"Programming in Lua&nbsp;: 1"</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Programming+in+Lua+%3A+1&amp;rft_id=https%3A%2F%2Fwww.lua.org%2Fpil%2F1.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.lua.org/manual/5.0/manual.html#2.5.7">"Lua 5.0 Reference Manual, 2.5.7, Function Calls"</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Lua+5.0+Reference+Manual%2C+2.5.7%2C+Function+Calls&amp;rft_id=https%3A%2F%2Fwww.lua.org%2Fmanual%2F5.0%2Fmanual.html%232.5.7&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.lua.org/manual/5.1/manual.html#2.3">"Lua 5.1 Reference Manual"</a>. 2014<span class="reference-accessdate">. Retrieved <span class="nowrap">27 February</span> 2014</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Lua+5.1+Reference+Manual&amp;rft.date=2014&amp;rft_id=https%3A%2F%2Fwww.lua.org%2Fmanual%2F5.1%2Fmanual.html%232.3&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.lua.org/manual/5.1/manual.html#2.5.5">"Lua 5.1 Reference Manual"</a>. 2012<span class="reference-accessdate">. Retrieved <span class="nowrap">16 October</span> 2012</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Lua+5.1+Reference+Manual&amp;rft.date=2012&amp;rft_id=https%3A%2F%2Fwww.lua.org%2Fmanual%2F5.1%2Fmanual.html%232.5.5&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-lobject_h_array-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-lobject_h_array_13-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.lua.org/source/5.1/lobject.h.html#array">"Lua 5.1 Source Code"</a>. 2006<span class="reference-accessdate">. Retrieved <span class="nowrap">24 March</span> 2011</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Lua+5.1+Source+Code&amp;rft.date=2006&amp;rft_id=https%3A%2F%2Fwww.lua.org%2Fsource%2F5.1%2Flobject.h.html%23array&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><cite id="CITEREFRoberto_Ierusalimschy" class="citation book cs1">Roberto Ierusalimschy. <i>Programming in Lua, 4th Edition</i>. p.&nbsp;165.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Programming+in+Lua%2C+4th+Edition&amp;rft.pages=165&amp;rft.au=Roberto+Ierusalimschy&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.lua.org/pil/16.3.html">"Programming in Lua&nbsp;: 16.3"</a>. <i>Lua</i><span class="reference-accessdate">. Retrieved <span class="nowrap">16 September</span> 2021</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Lua&amp;rft.atitle=Programming+in+Lua+%3A+16.3&amp;rft_id=https%3A%2F%2Fwww.lua.org%2Fpil%2F16.3.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20210916182214/http://lua-users.org/wiki/MetamethodsTutorial">"Metamethods Tutorial"</a>. <i>lua-users wiki</i>. Archived from <a rel="nofollow" class="external text" href="http://lua-users.org/wiki/MetamethodsTutorial">the original</a> on 16 September 2021<span class="reference-accessdate">. Retrieved <span class="nowrap">16 September</span> 2021</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=lua-users+wiki&amp;rft.atitle=Metamethods+Tutorial&amp;rft_id=http%3A%2F%2Flua-users.org%2Fwiki%2FMetamethodsTutorial&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-lua5impl-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-lua5impl_17-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFIerusalimschyFigueiredoCeles2005" class="citation journal cs1">Ierusalimschy, R.; Figueiredo, L. H.; Celes, W. (2005). <a rel="nofollow" class="external text" href="http://www.jucs.org/jucs_11_7/the_implementation_of_lua/jucs_11_7_1159_1176_defigueiredo.html">"The implementation of Lua 5.0"</a>. <i>J. Of Universal Comp. Sci</i>. <b>11</b> (7): <span class="nowrap">1159–</span>1176. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.3217%2Fjucs-011-07-1159">10.3217/jucs-011-07-1159</a></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=J.+Of+Universal+Comp.+Sci.&amp;rft.atitle=The+implementation+of+Lua+5.0&amp;rft.volume=11&amp;rft.issue=7&amp;rft.pages=1159-1176&amp;rft.date=2005&amp;rft_id=info%3Adoi%2F10.3217%2Fjucs-011-07-1159&amp;rft.aulast=Ierusalimschy&amp;rft.aufirst=R.&amp;rft.au=Figueiredo%2C+L.+H.&amp;rft.au=Celes%2C+W.&amp;rft_id=http%3A%2F%2Fwww.jucs.org%2Fjucs_11_7%2Fthe_implementation_of_lua%2Fjucs_11_7_1159_1176_defigueiredo.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><cite id="CITEREFTexas_Instruments1990" class="citation book cs1">Texas Instruments (1990). <i>PC Scheme: Users Guide and Language Reference Manual, Trade Edition</i>. MIP Press. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-262-70040-9</bdi>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=PC+Scheme%3A+Users+Guide+and+Language+Reference+Manual%2C+Trade+Edition&amp;rft.pub=MIP+Press&amp;rft.date=1990&amp;rft.isbn=0-262-70040-9&amp;rft.au=Texas+Instruments&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-luavm51instr-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-luavm51instr_19-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFMan2006" class="citation web cs1">Man, Kein-Hong (2006). <a rel="nofollow" class="external text" href="https://talk.pokitto.com/uploads/default/original/2X/7/716c67a0b5b1636cbc4dc1fec232ca2536cb74d1.pdf">"A No-Frills Introduction to Lua 5.1 VM Instructions"</a> <span class="cs1-format">(PDF)</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=A+No-Frills+Introduction+to+Lua+5.1+VM+Instructions&amp;rft.date=2006&amp;rft.aulast=Man&amp;rft.aufirst=Kein-Hong&amp;rft_id=https%3A%2F%2Ftalk.pokitto.com%2Fuploads%2Fdefault%2Foriginal%2F2X%2F7%2F716c67a0b5b1636cbc4dc1fec232ca2536cb74d1.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-luarefman-20"><span class="mw-cite-backlink">^ <a href="#cite_ref-luarefman_20-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-luarefman_20-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.lua.org/manual/5.2/">"Lua 5.2 Reference Manual"</a>. Lua.org<span class="reference-accessdate">. Retrieved <span class="nowrap">23 October</span> 2012</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Lua+5.2+Reference+Manual&amp;rft.pub=Lua.org&amp;rft_id=https%3A%2F%2Fwww.lua.org%2Fmanual%2F5.2%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-Changes_in_the_API,_Lua_5.2_manual-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-Changes_in_the_API,_Lua_5.2_manual_21-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFIerusalimschyde_FigueiredoCeles2011–2013" class="citation book cs1">Ierusalimschy, Roberto; de Figueiredo, Luiz Henrique; Celes, Waldemar (2011–2013). <a rel="nofollow" class="external text" href="https://www.lua.org/manual/5.2/manual.html#8.3"><i>Changes in the API</i></a>. Lua.org<span class="reference-accessdate">. Retrieved <span class="nowrap">9 May</span> 2014</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Changes+in+the+API&amp;rft.pub=Lua.org&amp;rft.date=2011%2F2013&amp;rft.aulast=Ierusalimschy&amp;rft.aufirst=Roberto&amp;rft.au=de+Figueiredo%2C+Luiz+Henrique&amp;rft.au=Celes%2C+Waldemar&amp;rft_id=https%3A%2F%2Fwww.lua.org%2Fmanual%2F5.2%2Fmanual.html%238.3&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span> <span class="cs1-visible-error citation-comment"><code class="cs1-code">{{cite book}}</code>: </span><span class="cs1-visible-error citation-comment"><code class="cs1-code">|work=</code> ignored (help)</span></span>
</li>
<li id="cite_note-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-22">^</a></b></span> <span class="reference-text"><cite id="CITEREFIerusalimschyde_FigueiredoCeles" class="citation web cs1">Ierusalimschy, Roberto; de Figueiredo, Luiz Henrique; Celes, Waldemar. <a rel="nofollow" class="external text" href="https://www.lua.org/manual/5.4/manual.html#pdf-package.loadlib">"Lua 5.4 Reference Manual"</a>. <i>Lua</i><span class="reference-accessdate">. Retrieved <span class="nowrap">1 June</span> 2022</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Lua&amp;rft.atitle=Lua+5.4+Reference+Manual&amp;rft.aulast=Ierusalimschy&amp;rft.aufirst=Roberto&amp;rft.au=de+Figueiredo%2C+Luiz+Henrique&amp;rft.au=Celes%2C+Waldemar&amp;rft_id=https%3A%2F%2Fwww.lua.org%2Fmanual%2F5.4%2Fmanual.html%23pdf-package.loadlib&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-23">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://luarocks.org/">"LuaRocks"</a>. luarocks.org<span class="reference-accessdate">. Retrieved <span class="nowrap">24 May</span> 2009</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=LuaRocks&amp;rft.pub=luarocks.org&amp;rft_id=https%3A%2F%2Fluarocks.org%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-24">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20090727080345/http://lua-users.org/wiki/BindingCodeToLua">"Binding Code To Lua"</a>. Lua-users wiki. Archived from <a rel="nofollow" class="external text" href="http://lua-users.org/wiki/BindingCodeToLua">the original</a> on 27 July 2009<span class="reference-accessdate">. Retrieved <span class="nowrap">24 May</span> 2009</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Binding+Code+To+Lua&amp;rft.pub=Lua-users+wiki&amp;rft_id=http%3A%2F%2Flua-users.org%2Fwiki%2FBindingCodeToLua&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-25"><span class="mw-cite-backlink"><b><a href="#cite_ref-25">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20130820131611/http://stackoverflow.com/questions/38338/why-is-lua-considered-a-game-language">"Why is Lua considered a game language?"</a>. <i>Stack Overflow</i>. Archived from <a rel="nofollow" class="external text" href="https://stackoverflow.com/questions/38338/why-is-lua-considered-a-game-language">the original</a> on 20 August 2013<span class="reference-accessdate">. Retrieved <span class="nowrap">22 April</span> 2017</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Stack+Overflow&amp;rft.atitle=Why+is+Lua+considered+a+game+language%3F&amp;rft_id=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F38338%2Fwhy-is-lua-considered-a-game-language&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-26">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://luau-lang.org/why.html">"Why Lua<i>u</i>?"</a>. <i>Luau</i><span class="reference-accessdate">. Retrieved <span class="nowrap">23 March</span> 2022</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Luau&amp;rft.atitle=Why+Luau%3F&amp;rft_id=https%3A%2F%2Fluau-lang.org%2Fwhy.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-27"><span class="mw-cite-backlink"><b><a href="#cite_ref-27">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://crymp.net/thread?id=347">"Introduction to Crysis server-side modding"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">23 March</span> 2022</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Introduction+to+Crysis+server-side+modding&amp;rft_id=https%3A%2F%2Fcrymp.net%2Fthread%3Fid%3D347&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-28"><span class="mw-cite-backlink"><b><a href="#cite_ref-28">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/SinisterRectus/Discordia">"Discordia API"</a>. <i><a href="GitHub" title="GitHub">GitHub</a></i><span class="reference-accessdate">. Retrieved <span class="nowrap">2 July</span> 2025</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=GitHub&amp;rft.atitle=Discordia+API&amp;rft_id=https%3A%2F%2Fgithub.com%2FSinisterRectus%2FDiscordia&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-29"><span class="mw-cite-backlink"><b><a href="#cite_ref-29">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20250305202646/https://love2d.org/">"LOVE2D Game Engine"</a>. Archived from <a rel="nofollow" class="external text" href="https://love2d.org/">the original</a> on 5 March 2025<span class="reference-accessdate">. Retrieved <span class="nowrap">2 July</span> 2025</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=LOVE2D+Game+Engine&amp;rft_id=https%3A%2F%2Flove2d.org%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-30"><span class="mw-cite-backlink"><b><a href="#cite_ref-30">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://wow.gamepedia.com/Lua_functions">"Lua Functions"</a>. <i>wow.gamepedia.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">1 March</span> 2021</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=wow.gamepedia.com&amp;rft.atitle=Lua+Functions&amp;rft_id=https%3A%2F%2Fwow.gamepedia.com%2FLua_functions&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-31"><span class="mw-cite-backlink"><b><a href="#cite_ref-31">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20031207171619/http://gamedev.net/gdpolls/viewpoll.asp?ID=163">"Poll Results"</a>. Archived from the original on 7 December 2003<span class="reference-accessdate">. Retrieved <span class="nowrap">22 April</span> 2017</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Poll+Results&amp;rft_id=https%3A%2F%2Fgamedev.net%2Fgdpolls%2Fviewpoll.asp%3FID%3D163&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span><span class="cs1-maint citation-comment"><code class="cs1-code">{{cite web}}</code>:  CS1 maint: bot: original URL status unknown (link)</span></span>
</li>
<li id="cite_note-32"><span class="mw-cite-backlink"><b><a href="#cite_ref-32">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20130615013638/http://www.gdmag.com/blog/2012/01/front-line-award-winners.php">"Front Line Award Winners Announced"</a>. Archived from <a rel="nofollow" class="external text" href="http://www.gdmag.com/blog/2012/01/front-line-award-winners.php">the original</a> on 15 June 2013<span class="reference-accessdate">. Retrieved <span class="nowrap">22 April</span> 2017</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Front+Line+Award+Winners+Announced&amp;rft_id=http%3A%2F%2Fwww.gdmag.com%2Fblog%2F2012%2F01%2Ffront-line-award-winners.php&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-33"><span class="mw-cite-backlink"><b><a href="#cite_ref-33">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://moonscript.org/reference/">"Language Guide - MoonScript 0.5.0"</a>. <i>moonscript.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">25 September</span> 2020</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=moonscript.org&amp;rft.atitle=Language+Guide+-+MoonScript+0.5.0&amp;rft_id=https%3A%2F%2Fmoonscript.org%2Freference%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-34"><span class="mw-cite-backlink"><b><a href="#cite_ref-34">^</a></b></span> <span class="reference-text"><cite id="CITEREFleaf2020" class="citation web cs1">leaf (23 September 2020). <a rel="nofollow" class="external text" href="https://github.com/leafo/moonscript">"leafo/moonscript"</a>. <i><a href="GitHub" title="GitHub">GitHub</a></i><span class="reference-accessdate">. Retrieved <span class="nowrap">25 September</span> 2020</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=GitHub&amp;rft.atitle=leafo%2Fmoonscript&amp;rft.date=2020-09-23&amp;rft.au=leaf&amp;rft_id=https%3A%2F%2Fgithub.com%2Fleafo%2Fmoonscript&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-:1-35"><span class="mw-cite-backlink">^ <a href="#cite_ref-:1_35-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-:1_35-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFGarzia" class="citation web cs1">Garzia, Andre Alves. <a rel="nofollow" class="external text" href="https://andregarzia.com/2020/06/languages-that-compile-to-lua.html">"Languages that compile to Lua"</a>. <i>AndreGarzia.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">25 September</span> 2020</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=AndreGarzia.com&amp;rft.atitle=Languages+that+compile+to+Lua&amp;rft.aulast=Garzia&amp;rft.aufirst=Andre+Alves&amp;rft_id=https%3A%2F%2Fandregarzia.com%2F2020%2F06%2Flanguages-that-compile-to-lua.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-36"><span class="mw-cite-backlink"><b><a href="#cite_ref-36">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://urn-lang.com/">"Urn: A Lisp implementation for Lua | Urn"</a>. <i>urn-lang.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">12 January</span> 2021</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=urn-lang.com&amp;rft.atitle=Urn%3A+A+Lisp+implementation+for+Lua+%7C+Urn&amp;rft_id=https%3A%2F%2Furn-lang.com%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-37"><span class="mw-cite-backlink"><b><a href="#cite_ref-37">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://amulet.works/">"Amulet ML"</a>. <i>amulet.works</i><span class="reference-accessdate">. Retrieved <span class="nowrap">12 January</span> 2021</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=amulet.works&amp;rft.atitle=Amulet+ML&amp;rft_id=https%3A%2F%2Famulet.works%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-38"><span class="mw-cite-backlink"><b><a href="#cite_ref-38">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/minoki/LunarML">"LunarML, Standard ML compiler that produces Lua/JavaScript"</a>. <i><a href="GitHub" title="GitHub">GitHub</a></i>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=GitHub&amp;rft.atitle=LunarML%2C+Standard+ML+compiler+that+produces+Lua%2FJavaScript&amp;rft_id=https%3A%2F%2Fgithub.com%2Fminoki%2FLunarML&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-39"><span class="mw-cite-backlink"><b><a href="#cite_ref-39">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://luajit.org/luajit.html">"LuaJIT"</a>. <i>LuaJIT</i>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=LuaJIT&amp;rft.atitle=LuaJIT&amp;rft_id=https%3A%2F%2Fluajit.org%2Fluajit.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-40"><span class="mw-cite-backlink"><b><a href="#cite_ref-40">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://luajit.org/extensions.html">"Extensions"</a>. <i>LuaJIT</i>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=LuaJIT&amp;rft.atitle=Extensions&amp;rft_id=https%3A%2F%2Fluajit.org%2Fextensions.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-41"><span class="mw-cite-backlink"><b><a href="#cite_ref-41">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://luau-lang.org/why">"Why Luau?"</a>. <i>Luau</i><span class="reference-accessdate">. Retrieved <span class="nowrap">3 August</span> 2024</span>. <q>All of these motivated us to start reshaping Lua 5.1 that we started from into a new, derivative language that we call Luau. Our focus is on making the language more performant and feature-rich, and make it easier to write robust code through a combination of linting and type checking using a gradual type system.</q></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Luau&amp;rft.atitle=Why+Luau%3F&amp;rft_id=https%3A%2F%2Fluau-lang.org%2Fwhy&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-42"><span class="mw-cite-backlink"><b><a href="#cite_ref-42">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://luau.org/sandbox">"Sandboxing"</a>. <i>Luau</i><span class="reference-accessdate">. Retrieved <span class="nowrap">27 March</span> 2025</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Luau&amp;rft.atitle=Sandboxing&amp;rft_id=https%3A%2F%2Fluau.org%2Fsandbox&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-43"><span class="mw-cite-backlink"><b><a href="#cite_ref-43">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://ravilang.github.io/">"Ravi Programming Language"</a>. <i>GitHub</i>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=GitHub&amp;rft.atitle=Ravi+Programming+Language&amp;rft_id=http%3A%2F%2Fravilang.github.io%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-44"><span class="mw-cite-backlink"><b><a href="#cite_ref-44">^</a></b></span> <span class="reference-text"><cite id="CITEREFHundt2021" class="citation web cs1">Hundt, Richard (22 April 2021). <a rel="nofollow" class="external text" href="https://github.com/richardhundt/shine">"richardhundt/shine"</a>. <i><a href="GitHub" title="GitHub">GitHub</a></i>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=GitHub&amp;rft.atitle=richardhundt%2Fshine&amp;rft.date=2021-04-22&amp;rft.aulast=Hundt&amp;rft.aufirst=Richard&amp;rft_id=https%3A%2F%2Fgithub.com%2Frichardhundt%2Fshine&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-45"><span class="mw-cite-backlink"><b><a href="#cite_ref-45">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://wiki.facepunch.com/gmod/">"Garry's Mod Wiki"</a>. <i>wiki.facepunch.com</i>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=wiki.facepunch.com&amp;rft.atitle=Garry%27s+Mod+Wiki&amp;rft_id=https%3A%2F%2Fwiki.facepunch.com%2Fgmod%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-46"><span class="mw-cite-backlink"><b><a href="#cite_ref-46">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/teal-language/tl">"teal-language/tl"</a>. <i>Teal language</i>. 23 December 2024<span class="reference-accessdate">. Retrieved <span class="nowrap">23 December</span> 2024</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Teal+language&amp;rft.atitle=teal-language%2Ftl&amp;rft.date=2024-12-23&amp;rft_id=https%3A%2F%2Fgithub.com%2Fteal-language%2Ftl&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-47"><span class="mw-cite-backlink"><b><a href="#cite_ref-47">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://pluto-lang.org/docs/Introduction">"What is Pluto?"</a>. <i>Pluto</i><span class="reference-accessdate">. Retrieved <span class="nowrap">27 June</span> 2025</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Pluto&amp;rft.atitle=What+is+Pluto%3F&amp;rft_id=https%3A%2F%2Fpluto-lang.org%2Fdocs%2FIntroduction&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
<li id="cite_note-48"><span class="mw-cite-backlink"><b><a href="#cite_ref-48">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20210518114041/http://lua-users.org/wiki/LuaPowerPatches">"Lua Power Patches"</a>. <i>lua-users.org</i>. Archived from <a rel="nofollow" class="external text" href="http://lua-users.org/wiki/LuaPowerPatches">the original</a> on 18 May 2021<span class="reference-accessdate">. Retrieved <span class="nowrap">18 May</span> 2021</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=lua-users.org&amp;rft.atitle=Lua+Power+Patches&amp;rft_id=http%3A%2F%2Flua-users.org%2Fwiki%2FLuaPowerPatches&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="Further_reading">Further reading</h2></div>
<ul><li><cite id="CITEREFIerusalimschy2013" class="citation book cs1">Ierusalimschy, R. (2013). <a rel="nofollow" class="external text" href="https://www.lua.org/pil/"><i>Programming in Lua</i></a> (3rd&nbsp;ed.). Lua.org. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-85-903798-5-0</bdi>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Programming+in+Lua&amp;rft.edition=3rd&amp;rft.pub=Lua.org&amp;rft.date=2013&amp;rft.isbn=978-85-903798-5-0&amp;rft.aulast=Ierusalimschy&amp;rft.aufirst=R.&amp;rft_id=https%3A%2F%2Fwww.lua.org%2Fpil%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span> (The 1st ed. is available <a rel="nofollow" class="external text" href="https://www.lua.org/pil/contents.html">online</a>.)</li>
<li><cite id="CITEREFGutschmidt2003" class="citation book cs1">Gutschmidt, T. (2003). <i>Game Programming with Python, Lua, and Ruby</i>. Course Technology PTR. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-1-59200-077-7</bdi>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Game+Programming+with+Python%2C+Lua%2C+and+Ruby&amp;rft.pub=Course+Technology+PTR&amp;rft.date=2003&amp;rft.isbn=978-1-59200-077-7&amp;rft.aulast=Gutschmidt&amp;rft.aufirst=T.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></li>
<li><cite id="CITEREFSchuytemaManyen2005" class="citation book cs1">Schuytema, P.; Manyen, M. (2005). <i>Game Development with Lua</i>. Charles River Media. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-1-58450-404-7</bdi>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Game+Development+with+Lua&amp;rft.pub=Charles+River+Media&amp;rft.date=2005&amp;rft.isbn=978-1-58450-404-7&amp;rft.aulast=Schuytema&amp;rft.aufirst=P.&amp;rft.au=Manyen%2C+M.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></li>
<li><cite id="CITEREFJungBrown2007" class="citation book cs1">Jung, K.; Brown, A. (2007). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20180708015602/https://www.wrox.com/WileyCDA/WroxTitle/productCd-0470069171.html"><i>Beginning Lua Programming</i></a>. <a href="Wrox_Press" title="Wrox Press">Wrox Press</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-470-06917-2</bdi>. Archived from <a rel="nofollow" class="external text" href="https://www.wrox.com/WileyCDA/WroxTitle/productCd-0470069171.html">the original</a> on 8 July 2018<span class="reference-accessdate">. Retrieved <span class="nowrap">7 July</span> 2018</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Beginning+Lua+Programming&amp;rft.pub=Wrox+Press&amp;rft.date=2007&amp;rft.isbn=978-0-470-06917-2&amp;rft.aulast=Jung&amp;rft.aufirst=K.&amp;rft.au=Brown%2C+A.&amp;rft_id=https%3A%2F%2Fwww.wrox.com%2FWileyCDA%2FWroxTitle%2FproductCd-0470069171.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></li>
<li><cite id="CITEREFFigueiredoCelesIerusalimschy2008" class="citation book cs1">Figueiredo, L. H.; Celes, W.; Ierusalimschy, R., eds. (2008). <a rel="nofollow" class="external text" href="https://www.lua.org/gems/"><i>Lua Programming Gems</i></a>. Lua.org. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-85-903798-4-3</bdi>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Lua+Programming+Gems&amp;rft.pub=Lua.org&amp;rft.date=2008&amp;rft.isbn=978-85-903798-4-3&amp;rft_id=https%3A%2F%2Fwww.lua.org%2Fgems%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></li>
<li><cite id="CITEREFTakhteyev2012" class="citation book cs1">Takhteyev, Yuri (2012). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20121102000628/http://codingplaces.net/"><i>Coding Places: Software Practice in a South American City</i></a>. <a href="The_MIT_Press" class="mw-redirect" title="The MIT Press">The MIT Press</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-262-01807-4</bdi>. Archived from <a rel="nofollow" class="external text" href="https://codingplaces.net/">the original</a> on 2 November 2012.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Coding+Places%3A+Software+Practice+in+a+South+American+City&amp;rft.pub=The+MIT+Press&amp;rft.date=2012&amp;rft.isbn=978-0-262-01807-4&amp;rft.aulast=Takhteyev&amp;rft.aufirst=Yuri&amp;rft_id=https%3A%2F%2Fcodingplaces.net%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span> Chapters 6 and 7 are dedicated to Lua, while others look at software in Brazil more broadly.</li>
<li><cite id="CITEREFVarma2012" class="citation book cs1">Varma, Jayant (2012). <a rel="nofollow" class="external text" href="https://www.amazon.com/exec/obidos/ASIN/1430246626/lua-docs-20"><i>Learn Lua for iOS Game Development</i></a>. <a href="Apress" class="mw-redirect" title="Apress">Apress</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-1-4302-4662-6</bdi>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Learn+Lua+for+iOS+Game+Development&amp;rft.pub=Apress&amp;rft.date=2012&amp;rft.isbn=978-1-4302-4662-6&amp;rft.aulast=Varma&amp;rft.aufirst=Jayant&amp;rft_id=https%3A%2F%2Fwww.amazon.com%2Fexec%2Fobidos%2FASIN%2F1430246626%2Flua-docs-20&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></li>
<li><cite id="CITEREFMatheson,_Ash2003" class="citation web cs1">Matheson, Ash (29 April 2003). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20121218104442/http://www.gamedev.net/page/resources/_/technical/game-programming/an-introduction-to-lua-r1932">"An Introduction to Lua"</a>. <i>GameDev.net</i>. Archived from <a rel="nofollow" class="external text" href="https://www.gamedev.net/page/resources/_/technical/game-programming/an-introduction-to-lua-r1932">the original</a> on 18 December 2012<span class="reference-accessdate">. Retrieved <span class="nowrap">3 January</span> 2013</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=GameDev.net&amp;rft.atitle=An+Introduction+to+Lua&amp;rft.date=2003-04-29&amp;rft.au=Matheson%2C+Ash&amp;rft_id=https%3A%2F%2Fwww.gamedev.net%2Fpage%2Fresources%2F_%2Ftechnical%2Fgame-programming%2Fan-introduction-to-lua-r1932&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></li>
<li><cite id="CITEREFFieldhouse2006" class="citation web cs1">Fieldhouse, Keith (16 February 2006). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20060312124121/http://www.onlamp.com/pub/a/onlamp/2006/02/16/introducing-lua.html">"Introducing Lua"</a>. <i>ONLamp.com</i>. <a href="O'Reilly_Media" title="O'Reilly Media">O'Reilly Media</a>. Archived from <a rel="nofollow" class="external text" href="http://www.onlamp.com/pub/a/onlamp/2006/02/16/introducing-lua.html">the original</a> on 12 March 2006<span class="reference-accessdate">. Retrieved <span class="nowrap">28 February</span> 2006</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=ONLamp.com&amp;rft.atitle=Introducing+Lua&amp;rft.date=2006-02-16&amp;rft.aulast=Fieldhouse&amp;rft.aufirst=Keith&amp;rft_id=http%3A%2F%2Fwww.onlamp.com%2Fpub%2Fa%2Fonlamp%2F2006%2F02%2F16%2Fintroducing-lua.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></li>
<li><cite id="CITEREFStreicher2006" class="citation web cs1">Streicher, Martin (28 April 2006). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20090702111603/http://www.ibm.com/developerworks/linux/library/l-lua.html">"Embeddable scripting with Lua"</a>. <i>developerWorks</i>. <a href="IBM" title="IBM">IBM</a>. Archived from <a rel="nofollow" class="external text" href="https://www.ibm.com/developerworks/linux/library/l-lua.html">the original</a> on 2 July 2009<span class="reference-accessdate">. Retrieved <span class="nowrap">7 July</span> 2018</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=developerWorks&amp;rft.atitle=Embeddable+scripting+with+Lua&amp;rft.date=2006-04-28&amp;rft.aulast=Streicher&amp;rft.aufirst=Martin&amp;rft_id=https%3A%2F%2Fwww.ibm.com%2Fdeveloperworks%2Flinux%2Flibrary%2Fl-lua.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></li>
<li><cite id="CITEREFQuigley2007" class="citation journal cs1">Quigley, Joseph (1 June 2007). <a rel="nofollow" class="external text" href="https://www.linuxjournal.com/article/9605">"A Look at Lua"</a>. <i><a href="Linux_Journal" title="Linux Journal">Linux Journal</a></i>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Linux+Journal&amp;rft.atitle=A+Look+at+Lua&amp;rft.date=2007-06-01&amp;rft.aulast=Quigley&amp;rft.aufirst=Joseph&amp;rft_id=https%3A%2F%2Fwww.linuxjournal.com%2Farticle%2F9605&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></li>
<li><cite id="CITEREFHamilton2008" class="citation news cs1">Hamilton, Naomi (11 September 2008). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20180708020030/https://www.computerworld.com.au/article/260022/a-z_programming_languages_lua/">"The A-Z of Programming Languages: Lua"</a>. <i><a href="Computerworld" title="Computerworld">Computerworld</a></i>. <a href="International_Data_Group" class="mw-redirect" title="International Data Group">IDG</a>. Archived from <a rel="nofollow" class="external text" href="https://www.computerworld.com.au/article/260022/a-z_programming_languages_lua/">the original</a> on 8 July 2018<span class="reference-accessdate">. Retrieved <span class="nowrap">7 July</span> 2018</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Computerworld&amp;rft.atitle=The+A-Z+of+Programming+Languages%3A+Lua&amp;rft.date=2008-09-11&amp;rft.aulast=Hamilton&amp;rft.aufirst=Naomi&amp;rft_id=https%3A%2F%2Fwww.computerworld.com.au%2Farticle%2F260022%2Fa-z_programming_languages_lua%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span> Interview with Roberto Ierusalimschy.</li>
<li><cite id="CITEREFIerusalimschyde_FigueiredoCeles2011" class="citation journal cs1">Ierusalimschy, Roberto; de Figueiredo, Luiz Henrique; Celes, Waldemar (12 May 2011). <a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F1978862.1983083">"Passing a Language through the Eye of a Needle"</a>. <i><a href="ACM_Queue" title="ACM Queue">ACM Queue</a></i>. <b>9</b> (5): <span class="nowrap">20–</span>29. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F1978862.1983083">10.1145/1978862.1983083</a></span>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:19484689">19484689</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=ACM+Queue&amp;rft.atitle=Passing+a+Language+through+the+Eye+of+a+Needle&amp;rft.volume=9&amp;rft.issue=5&amp;rft.pages=20-29&amp;rft.date=2011-05-12&amp;rft_id=info%3Adoi%2F10.1145%2F1978862.1983083&amp;rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A19484689%23id-name%3DS2CID&amp;rft.aulast=Ierusalimschy&amp;rft.aufirst=Roberto&amp;rft.au=de+Figueiredo%2C+Luiz+Henrique&amp;rft.au=Celes%2C+Waldemar&amp;rft_id=https%3A%2F%2Fdoi.org%2F10.1145%252F1978862.1983083&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span> How the embeddability of Lua impacted its design.</li>
<li><cite id="CITEREFIerusalimschyde_FigueiredoCeles2018" class="citation journal cs1">Ierusalimschy, Roberto; de Figueiredo, Luiz Henrique; Celes, Waldemar (26 October 2018). <a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F3186277">"A look at the design of Lua"</a>. <i><a href="Communications_of_the_ACM" title="Communications of the ACM">Communications of the ACM</a></i>. <b>61</b> (11): <span class="nowrap">114–</span>123. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F3186277">10.1145/3186277</a></span>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:53114923">53114923</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Communications+of+the+ACM&amp;rft.atitle=A+look+at+the+design+of+Lua&amp;rft.volume=61&amp;rft.issue=11&amp;rft.pages=114-123&amp;rft.date=2018-10-26&amp;rft_id=info%3Adoi%2F10.1145%2F3186277&amp;rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A53114923%23id-name%3DS2CID&amp;rft.aulast=Ierusalimschy&amp;rft.aufirst=Roberto&amp;rft.au=de+Figueiredo%2C+Luiz+Henrique&amp;rft.au=Celes%2C+Waldemar&amp;rft_id=https%3A%2F%2Fdoi.org%2F10.1145%252F3186277&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua" class="Z3988"></span></li>
<li><a rel="nofollow" class="external text" href="https://www.lua.org/papers.html">Lua papers and theses</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1314755338">
/* start https://en.wikipedia.org/ */


.mw-parser-output .side-box{margin:4px 0;box-sizing:border-box;border:1px solid #aaa;font-size:88%;line-height:1.25em;background-color:var(--background-color-interactive-subtle,#f8f9fa);color:inherit;display:flow-root}.mw-parser-output .infobox .side-box{font-size:100%}.mw-parser-output .side-box-abovebelow,.mw-parser-output .side-box-text{padding:0.25em 0.9em}.mw-parser-output .side-box-image{padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .side-box-imageright{padding:2px 0.9em 2px 0;text-align:center}@media(min-width:500px){.mw-parser-output .side-box-flex{display:flex;align-items:center}.mw-parser-output .side-box-text{flex:1;min-width:0}}@media(min-width:640px){.mw-parser-output .side-box{width:238px}.mw-parser-output .side-box-right{clear:right;float:right;margin-left:1em}.mw-parser-output .side-box-left{margin-right:1em}}


/* end   https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1311551236">
/* start https://en.wikipedia.org/ */


@media print{body.ns-0 .mw-parser-output .sistersitebox{display:none!important}}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{filter:invert(1)brightness(55%)contrast(250%)hue-rotate(180deg)}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{filter:invert(1)brightness(55%)contrast(250%)hue-rotate(180deg)}}


/* end   https://en.wikipedia.org/ */
</style><div class="side-box side-box-right  sistersitebox"><style data-mw-deduplicate="TemplateStyles:r1126788409">
/* start https://en.wikipedia.org/ */


.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}


/* end   https://en.wikipedia.org/ */
</style>
<div class="side-box-flex">
<div class="side-box-image"><span class="noviewer" typeof="mw:File"><img alt="" src="./_assets_/0c70a452f799bfe840676ee341124611/Wikibooks-logo-en-noslogan.svg.png" decoding="async" width="40" height="40" class="mw-file-element" data-file-width="400" data-file-height="400" loading="lazy"></span></div>
<div class="side-box-text plainlist">Wikibooks has a book on the topic of: <i><b><a href="https://en.wikibooks.org/wiki/Lua_Programming" class="extiw external" title="wikibooks:Lua Programming">Lua Programming</a></b></i></div></div>
</div>
<style data-mw-deduplicate="TemplateStyles:r1307723979">
/* start https://en.wikipedia.org/ */


.mw-parser-output .sister-box .side-box-abovebelow{padding:0.75em 0;text-align:center}.mw-parser-output .sister-box .side-box-abovebelow>b{display:block}.mw-parser-output .sister-box .side-box-text>ul{border-top:1px solid #aaa;padding:0.75em 0;width:220px;margin:0 auto}.mw-parser-output .sister-box .side-box-text>ul>li{min-height:31px}.mw-parser-output .sister-logo{display:inline-block;width:31px;line-height:31px;vertical-align:middle;text-align:center}.mw-parser-output .sister-link{display:inline-block;margin-left:7px;width:182px;vertical-align:middle}@media print{body.ns-0 .mw-parser-output .sistersitebox{display:none!important}}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-v2.svg"]{background-color:white}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-v2.svg"]{background-color:white}}


/* end   https://en.wikipedia.org/ */
</style>
<ul><li><span class="official-website"><span class="url"><a rel="nofollow" class="external text" href="https://www.lua.org/">Official website</a></span></span> <span class="mw-valign-text-top" typeof="mw:File/Frameless"><a href="https://www.wikidata.org/wiki/Q207316#P856" title="Edit this at Wikidata" class="external"><img alt="Edit this at Wikidata" src="./_assets_/c8f24dc75f9c782269c846c9b17e400f/OOjs_UI_icon_edit-ltr-progressive.svg.png" decoding="async" width="10" height="10" class="mw-file-element" data-file-width="20" data-file-height="20" loading="lazy"></a></span></li>
<li><a rel="nofollow" class="external text" href="http://lua-users.org/">Lua Users</a> <a rel="nofollow" class="external text" href="https://web.archive.org/web/20101216084624/http://lua-users.org/">Archived</a> 16 December 2010 at the <a href="Wayback_Machine" title="Wayback Machine">Wayback Machine</a>, Community</li>
<li><a rel="nofollow" class="external text" href="https://luaforum.com">Lua Forum</a> <a rel="nofollow" class="external text" href="https://web.archive.org/web/20210928172635/https://www.luaforum.com/">Archived</a> 28 September 2021 at the <a href="Wayback_Machine" title="Wayback Machine">Wayback Machine</a></li>
<li><a rel="nofollow" class="external text" href="https://luadist.org">LuaDist</a></li>
<li><a rel="nofollow" class="external text" href="https://luarocks.org/">Lua Rocks - Package manager</a></li>
<li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20070202005230/http://luaforge.net/">Projects in Lua</a></li></ul>
<div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1333133064">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:"\a0 · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}


/* end   https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1314944253">
/* start https://en.wikipedia.org/ */


.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd;color:inherit}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf;color:inherit}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf;color:inherit}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff;color:inherit}.mw-parser-output .navbox-even{background-color:#f7f7f7;color:inherit}.mw-parser-output .navbox-odd{background-color:transparent;color:inherit}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}


/* end   https://en.wikipedia.org/ */
</style></div><div role="navigation" class="navbox" aria-labelledby="Lua_programming521" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><style data-mw-deduplicate="TemplateStyles:r1239400231">
/* start https://en.wikipedia.org/ */


.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}


/* end   https://en.wikipedia.org/ */
</style><div id="Lua_programming521" style="font-size:114%;margin:0 4em"><a class="mw-selflink selflink">Lua programming</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Porting" title="Porting">Ports</a>, <a href="Software_distribution" title="Software distribution">distributions</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Plua" title="Plua">Plua</a></li>
<li><a href="L%C3%96VE_(game_framework)" class="mw-redirect" title="LÖVE (game framework)">LÖVE</a></li>
<li><a href="Solar2D" title="Solar2D">Solar2D</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Package_manager" title="Package manager">Package manager</a></th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="LuaRocks" title="LuaRocks">LuaRocks</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Integrated_development_environment" title="Integrated development environment">IDEs</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Unknown_Worlds_Entertainment" title="Unknown Worlds Entertainment">Decoda</a></li>
<li><a href="SciTE" title="SciTE">SciTE</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Application_software" title="Application software">Applications</a>, <a href="Software_framework" title="Software framework">frameworks</a></th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="OpenResty" title="OpenResty">OpenResty</a></li>
<li><a href="Prosody_(software)" title="Prosody (software)">Prosody</a></li>
<li><a href="Torch_(machine_learning)" title="Torch (machine learning)">Torch</a></li>
<li><a href="Tarantool" title="Tarantool">Tarantool</a></li>
<li><a href="IUP_(software)" title="IUP (software)">IUP</a></li>
<li><a href="List_of_applications_using_Lua" title="List of applications using Lua">List of applications using Lua</a></li></ul>
</div></td></tr></tbody></table></div>
<div class="navbox-styles"></div><div role="navigation" class="navbox" aria-labelledby="Free_and_open-source_software4621" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Free_and_open-source_software4621" style="font-size:114%;margin:0 4em"><a href="Free_and_open-source_software" title="Free and open-source software">Free and open-source software</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">General</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Alternative_terms_for_free_software" title="Alternative terms for free software">Alternative terms for free software</a></li>
<li><a href="Comparison_of_open-source_and_closed-source_software" title="Comparison of open-source and closed-source software">Comparison of open-source and closed-source software</a></li>
<li><a href="Comparison_of_source-code-hosting_facilities" title="Comparison of source-code-hosting facilities">Comparison of source-code-hosting facilities</a></li>
<li><a href="Free_software" title="Free software">Free software</a></li>
<li><a href="List_of_free_software_project_directories" title="List of free software project directories">Free software project directories</a></li>
<li><a href="Gratis_versus_libre" title="Gratis versus libre">Gratis versus libre</a></li>
<li><a href="Long-term_support" title="Long-term support">Long-term support</a></li>
<li><a href="Open-source_software" title="Open-source software">Open-source software</a></li>
<li><a href="Open-source_software_development" title="Open-source software development">Open-source software development</a></li>
<li><a href="Outline_of_free_software" title="Outline of free software">Outline</a></li>
<li><a href="Timeline_of_free_and_open-source_software" title="Timeline of free and open-source software">Timeline</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="List_of_free_and_open-source_software_packages" title="List of free and open-source software packages">Software<br>packages</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Comparison_of_free_software_for_audio" title="Comparison of free software for audio">Audio</a></li>
<li><a href="List_of_open-source_bioinformatics_software" title="List of open-source bioinformatics software">Bioinformatics</a></li>
<li><a href="List_of_open-source_codecs" title="List of open-source codecs">Codecs</a></li>
<li><a href="Comparison_of_open-source_configuration_management_software" title="Comparison of open-source configuration management software">Configuration management</a></li>
<li><a href="Device_driver" title="Device driver">Drivers</a>
<ul><li><a href="Free_and_open-source_graphics_device_driver" title="Free and open-source graphics device driver">Graphics</a></li>
<li><a href="Comparison_of_open-source_wireless_drivers" title="Comparison of open-source wireless drivers">Wireless</a></li></ul></li>
<li><a href="List_of_open-source_health_software" title="List of open-source health software">Health</a></li>
<li><a href="List_of_open-source_software_for_mathematics" title="List of open-source software for mathematics">Mathematics</a></li>
<li><a href="List_of_office_suites" title="List of office suites">Office suites</a></li>
<li><a href="Comparison_of_open-source_operating_systems" title="Comparison of open-source operating systems">Operating systems</a></li>
<li><a href="List_of_open-source_routing_platforms" title="List of open-source routing platforms">Routing</a></li>
<li><a href="List_of_free_television_software" title="List of free television software">Television</a></li>
<li><a href="List_of_open-source_video_games" title="List of open-source video games">Video games</a></li>
<li><a href="List_of_free_and_open-source_web_applications" title="List of free and open-source web applications">Web applications</a>
<ul><li><a href="Comparison_of_shopping_cart_software" title="Comparison of shopping cart software">E-commerce</a></li></ul></li>
<li><a href="List_of_free_and_open-source_Android_applications" title="List of free and open-source Android applications">Android apps</a></li>
<li><a href="List_of_free_and_open-source_iOS_applications" title="List of free and open-source iOS applications">iOS apps</a></li>
<li><a href="List_of_commercial_open-source_applications_and_services" title="List of commercial open-source applications and services">Commercial</a></li>
<li><a href="List_of_formerly_proprietary_software" title="List of formerly proprietary software">Formerly proprietary</a></li>
<li><a href="List_of_formerly_free_and_open-source_software" class="mw-redirect" title="List of formerly free and open-source software">Formerly open-source</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Community_of_practice" title="Community of practice">Community</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Free_software_movement" title="Free software movement">Free software movement</a></li>
<li><a href="History_of_free_and_open-source_software" title="History of free and open-source software">History</a></li>
<li><a href="Open-source-software_movement" class="mw-redirect" title="Open-source-software movement">Open-source-software movement</a></li>
<li><a href="List_of_free-software_events" title="List of free-software events">Events</a></li>
<li><a href="Open-source_software_advocacy" title="Open-source software advocacy">Advocacy</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="List_of_free_and_open-source_software_organizations" title="List of free and open-source software organizations">Organisations</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Free_Software_Movement_of_India" title="Free Software Movement of India">Free Software Movement of India</a></li>
<li><a href="Free_Software_Foundation" title="Free Software Foundation">Free Software Foundation</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Free-software_license" title="Free-software license">Licenses</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Academic_Free_License" title="Academic Free License">AFL</a></li>
<li><a href="Apache_License" title="Apache License">Apache</a></li>
<li><a href="Apple_Public_Source_License" title="Apple Public Source License">APSL</a></li>
<li><a href="Artistic_License" title="Artistic License">Artistic</a></li>
<li><a href="Beerware" class="mw-redirect" title="Beerware">Beerware</a></li>
<li><a href="BSD_licenses" title="BSD licenses">BSD</a></li>
<li><a href="Creative_Commons_license" title="Creative Commons license">Creative Commons</a></li>
<li><a href="Common_Development_and_Distribution_License" title="Common Development and Distribution License">CDDL</a></li>
<li><a href="Eclipse_Public_License" title="Eclipse Public License">EPL</a></li>
<li><a href="Free_Software_Foundation" title="Free Software Foundation">Free Software Foundation</a>
<ul><li><a href="GNU_General_Public_License" title="GNU General Public License">GNU GPL</a></li>
<li><a href="GNU_Affero_General_Public_License" title="GNU Affero General Public License">GNU AGPL</a></li>
<li><a href="GNU_Lesser_General_Public_License" title="GNU Lesser General Public License">GNU LGPL</a></li></ul></li>
<li><a href="ISC_license" title="ISC license">ISC</a></li>
<li><a href="MIT_License" title="MIT License">MIT</a></li>
<li><a href="Mozilla_Public_License" title="Mozilla Public License">MPL</a></li>
<li><a href="Python_License" title="Python License">Python</a></li>
<li><a href="Python_Software_Foundation_License" title="Python Software Foundation License">Python Software Foundation License</a></li>
<li><a href="Shared_Source_Initiative" title="Shared Source Initiative">Shared Source Initiative</a></li>
<li><a href="Sleepycat_License" class="mw-redirect" title="Sleepycat License">Sleepycat</a></li>
<li><a href="Unlicense" title="Unlicense">Unlicense</a></li>
<li><a href="WTFPL" title="WTFPL">WTFPL</a></li>
<li><a href="Zlib_License" title="Zlib License">zlib</a></li></ul>
</div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th id="Types_and_standards397" scope="row" class="navbox-group" style="width:1%">Types and<br> standards</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Comparison_of_free_and_open-source_software_licenses" title="Comparison of free and open-source software licenses">Comparison of licenses</a></li>
<li><a href="Contributor_License_Agreement" class="mw-redirect" title="Contributor License Agreement">Contributor License Agreement</a></li>
<li><a href="Copyleft" title="Copyleft">Copyleft</a></li>
<li><a href="Debian_Free_Software_Guidelines" class="mw-redirect" title="Debian Free Software Guidelines">Debian Free Software Guidelines</a></li>
<li><a href="Definition_of_Free_Cultural_Works" title="Definition of Free Cultural Works">Definition of Free Cultural Works</a></li>
<li><a href="Free_license" title="Free license">Free license</a></li>
<li><a href="The_Free_Software_Definition" title="The Free Software Definition">The Free Software Definition</a></li>
<li><a href="The_Open_Source_Definition" title="The Open Source Definition">The Open Source Definition</a></li>
<li><a href="Open-source_license" title="Open-source license">Open-source license</a></li>
<li><a href="Permissive_software_license" title="Permissive software license">Permissive software license</a></li>
<li><a href="Public_domain" title="Public domain">Public domain</a></li></ul>
</div></td></tr></tbody></table><div>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Challenges</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Digital_rights_management" title="Digital rights management">Digital rights management</a></li>
<li><a href="License_proliferation" title="License proliferation">License proliferation</a></li>
<li><a href="Mozilla_software_rebranded_by_Debian" class="mw-redirect" title="Mozilla software rebranded by Debian">Mozilla software rebranding</a></li>
<li><a href="Proprietary_device_driver" class="mw-redirect" title="Proprietary device driver">Proprietary device drivers</a></li>
<li><a href="Proprietary_firmware" title="Proprietary firmware">Proprietary firmware</a></li>
<li><a href="Proprietary_software" title="Proprietary software">Proprietary software</a></li>
<li><a href="SCO%E2%80%93Linux_disputes" title="SCO–Linux disputes">SCO/Linux controversies</a></li>
<li><a href="Software_patents_and_free_software" title="Software patents and free software">Software patents</a></li>
<li><a href="Open-source_software_security" title="Open-source software security">Software security</a></li>
<li><a href="Tivoization" title="Tivoization">Tivoization</a></li>
<li><a href="Trusted_Computing" title="Trusted Computing">Trusted Computing</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Related <br>topics</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Fork_(software_development)" title="Fork (software development)">Forking</a></li>
<li><i><a href="GNU_Manifesto" title="GNU Manifesto">GNU Manifesto</a></i></li>
<li><a href="Microsoft_Open_Specification_Promise" title="Microsoft Open Specification Promise">Microsoft Open Specification Promise</a></li>
<li><a href="Open-core_model" title="Open-core model">Open-core model</a></li>
<li><a href="Open-source_hardware" title="Open-source hardware">Open-source hardware</a></li>
<li><a href="Shared_Source_Initiative" title="Shared Source Initiative">Shared Source Initiative</a></li>
<li><a href="Source-available_software" title="Source-available software">Source-available software</a></li>
<li><i><a href="The_Cathedral_and_the_Bazaar" title="The Cathedral and the Bazaar">The Cathedral and the Bazaar</a></i></li>
<li><i><a href="Revolution_OS" title="Revolution OS">Revolution OS</a></i></li></ul>
</div></td></tr><tr><td class="navbox-abovebelow" colspan="2" style="font-weight:bold"><div>
<ul><li><span class="noviewer" typeof="mw:File"><img alt="" src="./_assets_/c8f24dc75f9c782269c846c9b17e400f/Symbol_portal_class.svg.png" decoding="async" width="16" height="16" class="mw-file-element" data-file-width="180" data-file-height="185" loading="lazy"></span> <a href="Portal%3AFree_and_open-source_software" title="Portal:Free and open-source software">Portal</a></li>
<li><span class="noviewer" typeof="mw:File"><span title="Category"><img alt="" src="./_assets_/c8f24dc75f9c782269c846c9b17e400f/Symbol_category_class.svg.png" decoding="async" width="16" height="16" class="mw-file-element" data-file-width="180" data-file-height="185" loading="lazy"></span></span> Category</li></ul>
</div></td></tr></tbody></table></div>
<div class="navbox-styles"></div><div role="navigation" class="navbox" aria-labelledby="Programming_languages1932" style="padding:3px"><table class="nowraplinks hlist mw-collapsible expanded navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Programming_languages1932" style="font-size:114%;margin:0 4em"><a href="Programming_language" title="Programming language">Programming languages</a></div></th></tr><tr><td class="navbox-abovebelow" colspan="2"><div>
<ul><li><a href="Comparison_of_programming_languages" title="Comparison of programming languages">Comparison</a></li>
<li><a href="Timeline_of_programming_languages" title="Timeline of programming languages">Timeline</a></li>
<li><a href="History_of_programming_languages" title="History of programming languages">History</a></li></ul>
</div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Ada_(programming_language)" title="Ada (programming language)">Ada</a></li>
<li><a href="ALGOL" title="ALGOL">ALGOL</a>
<ul><li><a href="Simula" title="Simula">Simula</a></li></ul></li>
<li><a href="APL_(programming_language)" title="APL (programming language)">APL</a></li>
<li><a href="Assembly_language" title="Assembly language">Assembly</a></li>
<li><a href="BASIC" title="BASIC">BASIC</a>
<ul><li><a href="Visual_Basic" title="Visual Basic">Visual Basic</a>
<ul><li><a href="Visual_Basic_(classic)" title="Visual Basic (classic)">classic</a></li>
<li><a href="Visual_Basic_(.NET)" title="Visual Basic (.NET)">.NET</a></li></ul></li></ul></li>
<li><a href="C_(programming_language)" title="C (programming language)">C</a></li>
<li><a href="C%2B%2B" title="C++">C++</a></li>
<li><a href="C_Sharp_(programming_language)" title="C Sharp (programming language)">C#</a></li>
<li><a href="COBOL" title="COBOL">COBOL</a></li>
<li><a href="Erlang_(programming_language)" title="Erlang (programming language)">Erlang</a>
<ul><li><a href="Elixir_(programming_language)" title="Elixir (programming language)">Elixir</a></li></ul></li>
<li><a href="Forth_(programming_language)" title="Forth (programming language)">Forth</a></li>
<li><a href="Fortran" title="Fortran">Fortran</a></li>
<li><a href="Go_(programming_language)" title="Go (programming language)">Go</a></li>
<li><a href="Haskell" title="Haskell">Haskell</a></li>
<li><a href="Java_(programming_language)" title="Java (programming language)">Java</a></li>
<li><a href="JavaScript" title="JavaScript">JavaScript</a></li>
<li><a href="Julia_(programming_language)" title="Julia (programming language)">Julia</a></li>
<li><a href="Kotlin" title="Kotlin">Kotlin</a></li>
<li><a href="Lisp_(programming_language)" title="Lisp (programming language)">Lisp</a></li>
<li><a class="mw-selflink selflink">Lua</a></li>
<li><a href="MATLAB" title="MATLAB">MATLAB</a></li>
<li><a href="ML_(programming_language)" title="ML (programming language)">ML</a>
<ul><li><a href="Caml" title="Caml">Caml</a>
<ul><li><a href="OCaml" title="OCaml">OCaml</a></li></ul></li>
<li><a href="Standard_ML" title="Standard ML">Standard ML</a></li></ul></li>
<li><a href="Pascal_(programming_language)" title="Pascal (programming language)">Pascal</a>
<ul><li><a href="Object_Pascal" title="Object Pascal">Object Pascal</a></li></ul></li>
<li><a href="Perl" title="Perl">Perl </a>
<ul><li><a href="Raku_(programming_language)" title="Raku (programming language)">Raku</a></li></ul></li>
<li><a href="PHP" title="PHP">PHP</a></li>
<li><a href="Prolog" title="Prolog">Prolog</a></li>
<li><a href="Python_(programming_language)" title="Python (programming language)">Python</a></li>
<li><a href="R_(programming_language)" title="R (programming language)">R</a></li>
<li><a href="Ruby_(programming_language)" title="Ruby (programming language)">Ruby</a></li>
<li><a href="Rust_(programming_language)" title="Rust (programming language)">Rust</a></li>
<li><a href="SAS_language" title="SAS language">SAS</a></li>
<li><a href="SQL" title="SQL">SQL</a></li>
<li><a href="Scratch_(programming_language)" title="Scratch (programming language)">Scratch</a></li>
<li><a href="Shell_script" title="Shell script">Shell</a></li>
<li><a href="Smalltalk" title="Smalltalk">Smalltalk</a></li>
<li><a href="Swift_(programming_language)" title="Swift (programming language)">Swift</a></li>
<li><i><a href="List_of_programming_languages" title="List of programming languages">more...</a></i></li></ul>
</div></td></tr><tr><td class="navbox-abovebelow" colspan="2"><div>
<ul><li><span class="noviewer" typeof="mw:File"><span title="List-Class article"><img alt="" src="./_assets_/c8f24dc75f9c782269c846c9b17e400f/Symbol_list_class.svg.png" decoding="async" width="16" height="16" class="mw-file-element" data-file-width="180" data-file-height="185" loading="lazy"></span></span> <b>Lists:</b> <a href="List_of_programming_languages" title="List of programming languages">Alphabetical</a></li>
<li><a href="List_of_programming_languages_by_type" title="List of programming languages by type">Categorical</a></li>
<li><a href="Generational_list_of_programming_languages" title="Generational list of programming languages">Generational</a></li>
<li><a href="Non-English-based_programming_languages" title="Non-English-based programming languages">Non-English-based</a></li>
<li><span class="noviewer" typeof="mw:File"><span title="Category"><img alt="" src="./_assets_/c8f24dc75f9c782269c846c9b17e400f/Symbol_category_class.svg.png" decoding="async" width="16" height="16" class="mw-file-element" data-file-width="180" data-file-height="185" loading="lazy"></span></span> Category</li></ul>
</div></td></tr></tbody></table></div>
<div class="navbox-styles"></div><div role="navigation" class="navbox authority-control" aria-labelledby="Authority_control_databases_frameless&amp;#124;text-top&amp;#124;10px&amp;#124;alt=Edit_this_at_Wikidata&amp;#124;link=https&amp;#58;//www.wikidata.org/wiki/Q207316#identifiers&amp;#124;class=noprint&amp;#124;Edit_this_at_Wikidata916" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Authority_control_databases_frameless&amp;#124;text-top&amp;#124;10px&amp;#124;alt=Edit_this_at_Wikidata&amp;#124;link=https&amp;#58;//www.wikidata.org/wiki/Q207316#identifiers&amp;#124;class=noprint&amp;#124;Edit_this_at_Wikidata916" style="font-size:114%;margin:0 4em">Authority control databases </div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">International</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"><ul><li><span class="uid"><a rel="nofollow" class="external text" href="https://d-nb.info/gnd/7547043-3">GND</a></span></li></ul></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">National</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"><ul><li><span class="uid"><a rel="nofollow" class="external text" href="https://id.loc.gov/authorities/sh2004007514">United States</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://catalogue.bnf.fr/ark:/12148/cb166522948">France</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://data.bnf.fr/ark:/12148/cb166522948">BnF data</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://www.nli.org.il/en/authorities/987007563918605171">Israel</a></span></li></ul></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Other</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"><ul><li><span class="uid"><a rel="nofollow" class="external text" href="https://lux.collections.yale.edu/view/concept/97c8baf0-56c3-41ab-bc2a-73090d74ec3d">Yale LUX</a></span></li></ul></div></td></tr></tbody></table></div>
<style data-mw-deduplicate="TemplateStyles:r1130092004">
/* start https://en.wikipedia.org/ */


.mw-parser-output .portal-bar{font-size:88%;font-weight:bold;display:flex;justify-content:center;align-items:baseline}.mw-parser-output .portal-bar-bordered{padding:0 2em;background-color:#fdfdfd;border:1px solid #a2a9b1;clear:both;margin:1em auto 0}.mw-parser-output .portal-bar-related{font-size:100%;justify-content:flex-start}.mw-parser-output .portal-bar-unbordered{padding:0 1.7em;margin-left:0}.mw-parser-output .portal-bar-header{margin:0 1em 0 0.5em;flex:0 0 auto;min-height:24px}.mw-parser-output .portal-bar-content{display:flex;flex-flow:row wrap;flex:0 1 auto;padding:0.15em 0;column-gap:1em;align-items:baseline;margin:0;list-style:none}.mw-parser-output .portal-bar-content-related{margin:0;list-style:none}.mw-parser-output .portal-bar-item{display:inline-block;margin:0.15em 0.2em;min-height:24px;line-height:24px}@media screen and (max-width:768px){.mw-parser-output .portal-bar{font-size:88%;font-weight:bold;display:flex;flex-flow:column wrap;align-items:baseline}.mw-parser-output .portal-bar-header{text-align:center;flex:0;padding-left:0.5em;margin:0 auto}.mw-parser-output .portal-bar-related{font-size:100%;align-items:flex-start}.mw-parser-output .portal-bar-content{display:flex;flex-flow:row wrap;align-items:center;flex:0;column-gap:1em;border-top:1px solid #a2a9b1;margin:0 auto;list-style:none}.mw-parser-output .portal-bar-content-related{border-top:none;margin:0;list-style:none}}.mw-parser-output .navbox+link+.portal-bar,.mw-parser-output .navbox+style+.portal-bar,.mw-parser-output .navbox+link+.portal-bar-bordered,.mw-parser-output .navbox+style+.portal-bar-bordered,.mw-parser-output .sister-bar+link+.portal-bar,.mw-parser-output .sister-bar+style+.portal-bar,.mw-parser-output .portal-bar+.navbox-styles+.navbox,.mw-parser-output .portal-bar+.navbox-styles+.sister-bar{margin-top:-1px}


/* end   https://en.wikipedia.org/ */
</style></div><!--htdig_noindex--><div><div class="zim-footer">
    This article is issued from <a class="external text" title="Last edited on 2026-02-07" href="https://en.wikipedia.org/wiki/?title=Lua&amp;oldid=1337090864">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
            </div>
          </main>
        </div>
      </div>
    </div>
     <script src="./_webp_/webpHandler.js"></script>
  

</body></html>