CINXE.COM
Lua (programming language) - Wikipedia
<!doctype html> <html class="client-nojs skin-theme-clientpref-day mf-expand-sections-clientpref-0 mf-font-size-clientpref-small mw-mf-amc-clientpref-0" lang="en" dir="ltr"> <head> <base href="https://en.m.wikipedia.org/wiki/Lua_(programming_language)"> <meta charset="UTF-8"> <title>Lua (programming language) - Wikipedia</title> <script>(function(){var className="client-js skin-theme-clientpref-day mf-expand-sections-clientpref-0 mf-font-size-clientpref-small mw-mf-amc-clientpref-0";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"3be455b0-c078-4bcf-b48e-8b318fbfee1d","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Lua_(programming_language)","wgTitle":"Lua (programming language)","wgCurRevisionId":1259656367,"wgRevisionId":1259656367, "wgArticleId":46150,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Lua_(programming_language)","wgRelevantArticleId":46150,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFMode":"stable","wgMFAmc":false,"wgMFAmcOutreachActive":false,"wgMFAmcOutreachUserEligible":false,"wgMFLazyLoadImages":true,"wgMFEditNoticesFeatureConflict":false,"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgMFIsSupportedEditRequest":true, "wgMFScriptPath":"","wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":50000,"wgRelatedArticlesCompat":[],"wgEditSubmitButtonLabelPublish":true,"wgSectionTranslationMissingLanguages":[{"lang":"ace","autonym":"Acèh","dir":"ltr"},{"lang":"ady","autonym":"адыгабзэ","dir":"ltr"},{"lang":"alt","autonym":"алтай тил","dir":"ltr"},{"lang":"am","autonym":"አማርኛ","dir":"ltr"},{"lang":"ami","autonym":"Pangcah","dir":"ltr"},{"lang":"an","autonym":"aragonés","dir":"ltr"},{"lang":"ang","autonym":"Ænglisc","dir":"ltr"},{"lang":"ann","autonym":"Obolo","dir":"ltr"},{"lang":"anp","autonym":"अंगिका","dir":"ltr"},{"lang":"ary","autonym":"الدارجة","dir":"rtl"},{"lang":"arz","autonym":"مصرى","dir":"rtl"},{"lang":"as","autonym":"অসমীয়া","dir":"ltr"},{"lang":"ast","autonym":"asturianu","dir":"ltr"},{"lang":"av","autonym":"авар","dir":"ltr"},{"lang":"avk","autonym":"Kotava","dir":"ltr"},{"lang":"awa","autonym":"अवधी","dir": "ltr"},{"lang":"ay","autonym":"Aymar aru","dir":"ltr"},{"lang":"azb","autonym":"تۆرکجه","dir":"rtl"},{"lang":"ba","autonym":"башҡортса","dir":"ltr"},{"lang":"ban","autonym":"Basa Bali","dir":"ltr"},{"lang":"bar","autonym":"Boarisch","dir":"ltr"},{"lang":"bbc","autonym":"Batak Toba","dir":"ltr"},{"lang":"bcl","autonym":"Bikol Central","dir":"ltr"},{"lang":"bdr","autonym":"Bajau Sama","dir":"ltr"},{"lang":"bew","autonym":"Betawi","dir":"ltr"},{"lang":"bho","autonym":"भोजपुरी","dir":"ltr"},{"lang":"bi","autonym":"Bislama","dir":"ltr"},{"lang":"bjn","autonym":"Banjar","dir":"ltr"},{"lang":"blk","autonym":"ပအိုဝ်ႏဘာႏသာႏ","dir":"ltr"},{"lang":"bm","autonym":"bamanankan","dir":"ltr"},{"lang":"bo","autonym":"བོད་ཡིག","dir":"ltr"},{"lang":"bpy","autonym":"বিষ্ণুপ্রিয়া মণিপুরী","dir":"ltr"},{"lang":"br","autonym":"brezhoneg","dir":"ltr"},{"lang":"btm","autonym":"Batak Mandailing","dir": "ltr"},{"lang":"bug","autonym":"Basa Ugi","dir":"ltr"},{"lang":"cdo","autonym":"閩東語 / Mìng-dĕ̤ng-ngṳ̄","dir":"ltr"},{"lang":"ce","autonym":"нохчийн","dir":"ltr"},{"lang":"ceb","autonym":"Cebuano","dir":"ltr"},{"lang":"ch","autonym":"Chamoru","dir":"ltr"},{"lang":"chr","autonym":"ᏣᎳᎩ","dir":"ltr"},{"lang":"co","autonym":"corsu","dir":"ltr"},{"lang":"cr","autonym":"Nēhiyawēwin / ᓀᐦᐃᔭᐍᐏᐣ","dir":"ltr"},{"lang":"crh","autonym":"qırımtatarca","dir":"ltr"},{"lang":"cu","autonym":"словѣньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ","dir":"ltr"},{"lang":"cy","autonym":"Cymraeg","dir":"ltr"},{"lang":"dag","autonym":"dagbanli","dir":"ltr"},{"lang":"dga","autonym":"Dagaare","dir":"ltr"},{"lang":"din","autonym":"Thuɔŋjäŋ","dir":"ltr"},{"lang":"dsb","autonym":"dolnoserbski","dir":"ltr"},{"lang":"dtp","autonym":"Kadazandusun","dir":"ltr"},{"lang":"dv","autonym":"ދިވެހިބަސް","dir":"rtl"},{"lang":"dz","autonym":"ཇོང་ཁ","dir":"ltr"},{ "lang":"ee","autonym":"eʋegbe","dir":"ltr"},{"lang":"eml","autonym":"emiliàn e rumagnòl","dir":"ltr"},{"lang":"fat","autonym":"mfantse","dir":"ltr"},{"lang":"ff","autonym":"Fulfulde","dir":"ltr"},{"lang":"fj","autonym":"Na Vosa Vakaviti","dir":"ltr"},{"lang":"fo","autonym":"føroyskt","dir":"ltr"},{"lang":"fon","autonym":"fɔ̀ngbè","dir":"ltr"},{"lang":"frp","autonym":"arpetan","dir":"ltr"},{"lang":"frr","autonym":"Nordfriisk","dir":"ltr"},{"lang":"fur","autonym":"furlan","dir":"ltr"},{"lang":"fy","autonym":"Frysk","dir":"ltr"},{"lang":"gag","autonym":"Gagauz","dir":"ltr"},{"lang":"gan","autonym":"贛語","dir":"ltr"},{"lang":"gcr","autonym":"kriyòl gwiyannen","dir":"ltr"},{"lang":"glk","autonym":"گیلکی","dir":"rtl"},{"lang":"gn","autonym":"Avañe'ẽ","dir":"ltr"},{"lang":"gom","autonym":"गोंयची कोंकणी / Gõychi Konknni","dir":"ltr"},{"lang":"gor","autonym":"Bahasa Hulontalo","dir":"ltr"},{"lang":"gpe","autonym":"Ghanaian Pidgin","dir":"ltr"},{"lang" :"gu","autonym":"ગુજરાતી","dir":"ltr"},{"lang":"guc","autonym":"wayuunaiki","dir":"ltr"},{"lang":"gur","autonym":"farefare","dir":"ltr"},{"lang":"guw","autonym":"gungbe","dir":"ltr"},{"lang":"gv","autonym":"Gaelg","dir":"ltr"},{"lang":"ha","autonym":"Hausa","dir":"ltr"},{"lang":"hak","autonym":"客家語 / Hak-kâ-ngî","dir":"ltr"},{"lang":"haw","autonym":"Hawaiʻi","dir":"ltr"},{"lang":"hif","autonym":"Fiji Hindi","dir":"ltr"},{"lang":"hsb","autonym":"hornjoserbsce","dir":"ltr"},{"lang":"ht","autonym":"Kreyòl ayisyen","dir":"ltr"},{"lang":"hyw","autonym":"Արեւմտահայերէն","dir":"ltr"},{"lang":"iba","autonym":"Jaku Iban","dir":"ltr"},{"lang":"ie","autonym":"Interlingue","dir":"ltr"},{"lang":"ig","autonym":"Igbo","dir":"ltr"},{"lang":"igl","autonym":"Igala","dir":"ltr"},{"lang":"ilo","autonym":"Ilokano","dir":"ltr"},{"lang":"iu","autonym":"ᐃᓄᒃᑎᑐᑦ / inuktitut","dir":"ltr"},{"lang":"jam","autonym":"Patois","dir":"ltr"},{"lang":"jv","autonym":"Jawa" ,"dir":"ltr"},{"lang":"kaa","autonym":"Qaraqalpaqsha","dir":"ltr"},{"lang":"kab","autonym":"Taqbaylit","dir":"ltr"},{"lang":"kbd","autonym":"адыгэбзэ","dir":"ltr"},{"lang":"kbp","autonym":"Kabɩyɛ","dir":"ltr"},{"lang":"kcg","autonym":"Tyap","dir":"ltr"},{"lang":"kg","autonym":"Kongo","dir":"ltr"},{"lang":"kge","autonym":"Kumoring","dir":"ltr"},{"lang":"ki","autonym":"Gĩkũyũ","dir":"ltr"},{"lang":"kk","autonym":"қазақша","dir":"ltr"},{"lang":"kl","autonym":"kalaallisut","dir":"ltr"},{"lang":"kn","autonym":"ಕನ್ನಡ","dir":"ltr"},{"lang":"koi","autonym":"перем коми","dir":"ltr"},{"lang":"krc","autonym":"къарачай-малкъар","dir":"ltr"},{"lang":"ks","autonym":"कॉशुर / کٲشُر","dir":"rtl"},{"lang":"ku","autonym":"kurdî","dir":"ltr"},{"lang":"kus","autonym":"Kʋsaal","dir":"ltr"},{"lang":"kv","autonym":"коми","dir":"ltr"},{"lang":"kw","autonym":"kernowek","dir":"ltr"},{"lang":"ky","autonym":"кыргызча","dir":"ltr"},{ "lang":"lad","autonym":"Ladino","dir":"ltr"},{"lang":"lb","autonym":"Lëtzebuergesch","dir":"ltr"},{"lang":"lez","autonym":"лезги","dir":"ltr"},{"lang":"lg","autonym":"Luganda","dir":"ltr"},{"lang":"li","autonym":"Limburgs","dir":"ltr"},{"lang":"lij","autonym":"Ligure","dir":"ltr"},{"lang":"lld","autonym":"Ladin","dir":"ltr"},{"lang":"lmo","autonym":"lombard","dir":"ltr"},{"lang":"ln","autonym":"lingála","dir":"ltr"},{"lang":"lo","autonym":"ລາວ","dir":"ltr"},{"lang":"lt","autonym":"lietuvių","dir":"ltr"},{"lang":"ltg","autonym":"latgaļu","dir":"ltr"},{"lang":"mad","autonym":"Madhurâ","dir":"ltr"},{"lang":"mai","autonym":"मैथिली","dir":"ltr"},{"lang":"map-bms","autonym":"Basa Banyumasan","dir":"ltr"},{"lang":"mdf","autonym":"мокшень","dir":"ltr"},{"lang":"mg","autonym":"Malagasy","dir":"ltr"},{"lang":"mhr","autonym":"олык марий","dir":"ltr"},{"lang":"mi","autonym":"Māori","dir":"ltr"},{"lang":"min","autonym":"Minangkabau","dir":"ltr"},{"lang": "mk","autonym":"македонски","dir":"ltr"},{"lang":"mn","autonym":"монгол","dir":"ltr"},{"lang":"mni","autonym":"ꯃꯤꯇꯩ ꯂꯣꯟ","dir":"ltr"},{"lang":"mnw","autonym":"ဘာသာမန်","dir":"ltr"},{"lang":"mos","autonym":"moore","dir":"ltr"},{"lang":"mr","autonym":"मराठी","dir":"ltr"},{"lang":"mrj","autonym":"кырык мары","dir":"ltr"},{"lang":"mt","autonym":"Malti","dir":"ltr"},{"lang":"mwl","autonym":"Mirandés","dir":"ltr"},{"lang":"my","autonym":"မြန်မာဘာသာ","dir":"ltr"},{"lang":"myv","autonym":"эрзянь","dir":"ltr"},{"lang":"mzn","autonym":"مازِرونی","dir":"rtl"},{"lang":"nah","autonym":"Nāhuatl","dir":"ltr"},{"lang":"nan","autonym":"閩南語 / Bân-lâm-gú","dir":"ltr"},{"lang":"nap","autonym":"Napulitano","dir":"ltr"},{"lang":"nb","autonym":"norsk bokmål","dir":"ltr"},{"lang":"nds","autonym":"Plattdüütsch","dir":"ltr"},{"lang":"nds-nl","autonym":"Nedersaksies","dir":"ltr"},{"lang":"ne","autonym": "नेपाली","dir":"ltr"},{"lang":"new","autonym":"नेपाल भाषा","dir":"ltr"},{"lang":"nia","autonym":"Li Niha","dir":"ltr"},{"lang":"nn","autonym":"norsk nynorsk","dir":"ltr"},{"lang":"nqo","autonym":"ߒߞߏ","dir":"rtl"},{"lang":"nr","autonym":"isiNdebele seSewula","dir":"ltr"},{"lang":"nso","autonym":"Sesotho sa Leboa","dir":"ltr"},{"lang":"ny","autonym":"Chi-Chewa","dir":"ltr"},{"lang":"oc","autonym":"occitan","dir":"ltr"},{"lang":"om","autonym":"Oromoo","dir":"ltr"},{"lang":"os","autonym":"ирон","dir":"ltr"},{"lang":"pag","autonym":"Pangasinan","dir":"ltr"},{"lang":"pam","autonym":"Kapampangan","dir":"ltr"},{"lang":"pap","autonym":"Papiamentu","dir":"ltr"},{"lang":"pcd","autonym":"Picard","dir":"ltr"},{"lang":"pcm","autonym":"Naijá","dir":"ltr"},{"lang":"pdc","autonym":"Deitsch","dir":"ltr"},{"lang":"pms","autonym":"Piemontèis","dir":"ltr"},{"lang":"ps","autonym":"پښتو","dir":"rtl"},{"lang":"pwn","autonym":"pinayuanan","dir":"ltr"},{"lang":"rm", "autonym":"rumantsch","dir":"ltr"},{"lang":"rn","autonym":"ikirundi","dir":"ltr"},{"lang":"rsk","autonym":"руски","dir":"ltr"},{"lang":"rue","autonym":"русиньскый","dir":"ltr"},{"lang":"rup","autonym":"armãneashti","dir":"ltr"},{"lang":"rw","autonym":"Ikinyarwanda","dir":"ltr"},{"lang":"sa","autonym":"संस्कृतम्","dir":"ltr"},{"lang":"sah","autonym":"саха тыла","dir":"ltr"},{"lang":"sat","autonym":"ᱥᱟᱱᱛᱟᱲᱤ","dir":"ltr"},{"lang":"sc","autonym":"sardu","dir":"ltr"},{"lang":"scn","autonym":"sicilianu","dir":"ltr"},{"lang":"sco","autonym":"Scots","dir":"ltr"},{"lang":"sd","autonym":"سنڌي","dir":"rtl"},{"lang":"se","autonym":"davvisámegiella","dir":"ltr"},{"lang":"sg","autonym":"Sängö","dir":"ltr"},{"lang":"sgs","autonym":"žemaitėška","dir":"ltr"},{"lang":"sh","autonym":"srpskohrvatski / српскохрватски","dir":"ltr"},{"lang":"shi","autonym":"Taclḥit","dir":"ltr"},{"lang":"shn","autonym": "ၽႃႇသႃႇတႆး ","dir":"ltr"},{"lang":"skr","autonym":"سرائیکی","dir":"rtl"},{"lang":"sm","autonym":"Gagana Samoa","dir":"ltr"},{"lang":"smn","autonym":"anarâškielâ","dir":"ltr"},{"lang":"sn","autonym":"chiShona","dir":"ltr"},{"lang":"srn","autonym":"Sranantongo","dir":"ltr"},{"lang":"ss","autonym":"SiSwati","dir":"ltr"},{"lang":"st","autonym":"Sesotho","dir":"ltr"},{"lang":"stq","autonym":"Seeltersk","dir":"ltr"},{"lang":"su","autonym":"Sunda","dir":"ltr"},{"lang":"szl","autonym":"ślůnski","dir":"ltr"},{"lang":"tay","autonym":"Tayal","dir":"ltr"},{"lang":"tcy","autonym":"ತುಳು","dir":"ltr"},{"lang":"tdd","autonym":"ᥖᥭᥰ ᥖᥬᥲ ᥑᥨᥒᥰ","dir":"ltr"},{"lang":"te","autonym":"తెలుగు","dir":"ltr"},{"lang":"tet","autonym":"tetun","dir":"ltr"},{"lang":"ti","autonym":"ትግርኛ","dir":"ltr"},{"lang":"tk","autonym":"Türkmençe","dir":"ltr"},{"lang":"tl","autonym":"Tagalog","dir":"ltr"},{"lang":"tly","autonym":"tolışi","dir":"ltr"} ,{"lang":"tn","autonym":"Setswana","dir":"ltr"},{"lang":"to","autonym":"lea faka-Tonga","dir":"ltr"},{"lang":"tpi","autonym":"Tok Pisin","dir":"ltr"},{"lang":"trv","autonym":"Seediq","dir":"ltr"},{"lang":"ts","autonym":"Xitsonga","dir":"ltr"},{"lang":"tt","autonym":"татарча / tatarça","dir":"ltr"},{"lang":"tum","autonym":"chiTumbuka","dir":"ltr"},{"lang":"tw","autonym":"Twi","dir":"ltr"},{"lang":"ty","autonym":"reo tahiti","dir":"ltr"},{"lang":"tyv","autonym":"тыва дыл","dir":"ltr"},{"lang":"uz","autonym":"oʻzbekcha / ўзбекча","dir":"ltr"},{"lang":"ve","autonym":"Tshivenda","dir":"ltr"},{"lang":"vec","autonym":"vèneto","dir":"ltr"},{"lang":"vep","autonym":"vepsän kel’","dir":"ltr"},{"lang":"vls","autonym":"West-Vlams","dir":"ltr"},{"lang":"vo","autonym":"Volapük","dir":"ltr"},{"lang":"vro","autonym":"võro","dir":"ltr"},{"lang":"wa","autonym":"walon","dir":"ltr"},{"lang":"war","autonym":"Winaray","dir":"ltr"},{"lang":"wo","autonym":"Wolof","dir":"ltr"},{ "lang":"xal","autonym":"хальмг","dir":"ltr"},{"lang":"xh","autonym":"isiXhosa","dir":"ltr"},{"lang":"xmf","autonym":"მარგალური","dir":"ltr"},{"lang":"yi","autonym":"ייִדיש","dir":"rtl"},{"lang":"yo","autonym":"Yorùbá","dir":"ltr"},{"lang":"yue","autonym":"粵語","dir":"ltr"},{"lang":"za","autonym":"Vahcuengh","dir":"ltr"},{"lang":"zgh","autonym":"ⵜⴰⵎⴰⵣⵉⵖⵜ ⵜⴰⵏⴰⵡⴰⵢⵜ","dir":"ltr"},{"lang":"zu","autonym":"isiZulu","dir":"ltr"}],"wgSectionTranslationTargetLanguages":["ace","ady","alt","am","ami","an","ang","ann","anp","ar","ary","arz","as","ast","av","avk","awa","ay","az","azb","ba","ban","bar","bbc","bcl","bdr","be","bew","bg","bho","bi","bjn","blk","bm","bn","bo","bpy","br","bs","btm","bug","ca","cdo","ce","ceb","ch","chr","ckb","co","cr","crh","cs","cu","cy","da","dag","de","dga","din","diq","dsb","dtp","dv","dz","ee","el","eml","eo","es","et","eu","fa","fat","ff","fi","fj","fo","fon","fr","frp","frr","fur","fy","gag","gan" ,"gcr","gl","glk","gn","gom","gor","gpe","gu","guc","gur","guw","gv","ha","hak","haw","he","hi","hif","hr","hsb","ht","hu","hy","hyw","ia","iba","ie","ig","igl","ilo","io","is","it","iu","ja","jam","jv","ka","kaa","kab","kbd","kbp","kcg","kg","kge","ki","kk","kl","km","kn","ko","koi","krc","ks","ku","kus","kv","kw","ky","lad","lb","lez","lg","li","lij","lld","lmo","ln","lo","lt","ltg","lv","mad","mai","map-bms","mdf","mg","mhr","mi","min","mk","ml","mn","mni","mnw","mos","mr","mrj","ms","mt","mwl","my","myv","mzn","nah","nan","nap","nb","nds","nds-nl","ne","new","nia","nl","nn","nqo","nr","nso","ny","oc","om","or","os","pa","pag","pam","pap","pcd","pcm","pdc","pl","pms","pnb","ps","pt","pwn","qu","rm","rn","ro","rsk","rue","rup","rw","sa","sah","sat","sc","scn","sco","sd","se","sg","sgs","sh","shi","shn","si","sk","skr","sl","sm","smn","sn","so","sq","sr","srn","ss","st","stq","su","sv","sw","szl","ta","tay","tcy","tdd","te","tet","tg","th","ti","tk","tl","tly","tn","to","tpi","tr", "trv","ts","tt","tum","tw","ty","tyv","udm","ur","uz","ve","vec","vep","vi","vls","vo","vro","wa","war","wo","wuu","xal","xh","xmf","yi","yo","yue","za","zgh","zh","zu"],"isLanguageSearcherCXEntrypointEnabled":true,"mintEntrypointLanguages":["ace","ast","azb","bcl","bjn","bh","crh","ff","fon","ig","is","ki","ks","lmo","min","sat","ss","tn","vec"],"wgWikibaseItemId":"Q207316","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false,"wgMinervaPermissions":{"watchable":true,"watch":false},"wgMinervaFeatures":{"beta":false,"donate":true,"mobileOptionsLink":true,"categories":false,"pageIssues":true,"talkAtTop":true,"historyInPageActions":false,"overflowSubmenu":false,"tabsOnSpecials":true,"personalMenu":false,"mainMenuExpanded":false,"echo": true,"nightMode":true},"wgMinervaDownloadNamespaces":[0]};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.pygments":"ready","skins.minerva.styles":"ready","skins.minerva.content.styles.images":"ready","mediawiki.hlist":"ready","skins.minerva.codex.styles":"ready","skins.minerva.icons":"ready","skins.minerva.amc.styles":"ready","ext.wikimediamessages.styles":"ready","mobile.init.styles":"ready","ext.relatedArticles.styles":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","ext.pygments.view","site","mediawiki.page.ready","skins.minerva.scripts","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","ext.popups","mobile.init","ext.echo.centralauth","ext.relatedArticles.readMore.bootstrap", "ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.cx.eventlogging.campaigns","ext.cx.entrypoints.mffrequentlanguages","ext.cx.entrypoints.languagesearcher.init","mw.externalguidance.init","ext.checkUser.clientHints","ext.growthExperiments.SuggestedEditSession","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.cite.styles%7Cext.pygments%2CwikimediaBadges%7Cext.relatedArticles.styles%7Cext.wikimediamessages.styles%7Cmediawiki.hlist%7Cmobile.init.styles%7Cskins.minerva.amc.styles%7Cskins.minerva.codex.styles%7Cskins.minerva.content.styles.images%7Cskins.minerva.icons%2Cstyles%7Cwikibase.client.init&only=styles&skin=minerva"> <script async src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=minerva"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=minerva"> <meta name="generator" content="MediaWiki 1.44.0-wmf.5"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="theme-color" content="#eaecf0"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Lua-Logo.svg/1200px-Lua-Logo.svg.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="1200"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Lua-Logo.svg/800px-Lua-Logo.svg.png"> <meta property="og:image:width" content="800"> <meta property="og:image:height" content="800"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Lua-Logo.svg/640px-Lua-Logo.svg.png"> <meta property="og:image:width" content="640"> <meta property="og:image:height" content="640"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes, minimum-scale=0.25, maximum-scale=5.0"> <meta property="og:title" content="Lua (programming language) - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="manifest" href="/w/api.php?action=webapp-manifest"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Lua_(programming_language)&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/Lua_(programming_language)"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="dns-prefetch" href="//meta.wikimedia.org"> <link rel="dns-prefetch" href="//login.wikimedia.org"> <meta http-equiv="X-Translated-By" content="Google"> <meta http-equiv="X-Translated-To" content="en"> <script type="text/javascript" src="https://www.gstatic.com/_/translate_http/_/js/k=translate_http.tr.en_GB.omlEigW4xY8.O/am=DgY/d=1/rs=AN8SPfpjsL9kUWY0h-sp7Ilu7hZWGwEmeg/m=corsproxy" data-sourceurl="https://en.m.wikipedia.org/wiki/Lua_(programming_language)"></script> <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" rel="stylesheet"> <script type="text/javascript" src="https://www.gstatic.com/_/translate_http/_/js/k=translate_http.tr.en_GB.omlEigW4xY8.O/am=DgY/d=1/exm=corsproxy/ed=1/rs=AN8SPfpjsL9kUWY0h-sp7Ilu7hZWGwEmeg/m=phishing_protection" data-phishing-protection-enabled="false" data-forms-warning-enabled="true" data-source-url="https://en.m.wikipedia.org/wiki/Lua_(programming_language)"></script> <meta name="robots" content="none"> </head> <body class="mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Lua_programming_language rootpage-Lua_programming_language stable issues-group-B skin-minerva action-view skin--responsive mw-mf-amc-disabled mw-mf"> <script type="text/javascript" src="https://www.gstatic.com/_/translate_http/_/js/k=translate_http.tr.en_GB.omlEigW4xY8.O/am=DgY/d=1/exm=corsproxy,phishing_protection/ed=1/rs=AN8SPfpjsL9kUWY0h-sp7Ilu7hZWGwEmeg/m=navigationui" data-environment="prod" data-proxy-url="https://en-m-wikipedia-org.translate.goog" data-proxy-full-url="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" data-source-url="https://en.m.wikipedia.org/wiki/Lua_(programming_language)" data-source-language="auto" data-target-language="en" data-display-language="en-GB" data-detected-source-language="en" data-is-source-untranslated="false" data-source-untranslated-url="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://en.m.wikipedia.org/wiki/Lua_(programming_language)&anno=2" data-client="tr"></script> <div id="mw-mf-viewport"> <div id="mw-mf-page-center"><a class="mw-mf-page-center__mask" href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#"></a> <header class="header-container header-chrome"> <div class="minerva-header"> <nav class="navigation-drawer toggle-list view-border-box"><input type="checkbox" id="main-menu-input" class="toggle-list__checkbox" role="button" aria-haspopup="true" aria-expanded="false" aria-labelledby="mw-mf-main-menu-button"> <label role="button" for="main-menu-input" id="mw-mf-main-menu-button" aria-hidden="true" data-event-name="ui.mainmenu" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet toggle-list__toggle"> <span class="minerva-icon minerva-icon--menu"></span> <span></span> </label> <div id="mw-mf-page-left" class="menu view-border-box"> <ul id="p-navigation" class="toggle-list__list"> <li class="toggle-list-item "><a class="toggle-list-item__anchor menu__item--home" href="https://en-m-wikipedia-org.translate.goog/wiki/Main_Page?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" data-mw="interface"> <span class="minerva-icon minerva-icon--home"></span> <span class="toggle-list-item__label">Home</span> </a></li> <li class="toggle-list-item "><a class="toggle-list-item__anchor menu__item--random" href="https://en-m-wikipedia-org.translate.goog/wiki/Special:Random?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" data-mw="interface"> <span class="minerva-icon minerva-icon--die"></span> <span class="toggle-list-item__label">Random</span> </a></li> <li class="toggle-list-item skin-minerva-list-item-jsonly"><a class="toggle-list-item__anchor menu__item--nearby" href="https://en-m-wikipedia-org.translate.goog/wiki/Special:Nearby?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" data-event-name="menu.nearby" data-mw="interface"> <span class="minerva-icon minerva-icon--mapPin"></span> <span class="toggle-list-item__label">Nearby</span> </a></li> </ul> <ul id="p-personal" class="toggle-list__list"> <li class="toggle-list-item "><a class="toggle-list-item__anchor menu__item--login" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Special:UserLogin&returnto=Lua+(programming+language)&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" data-event-name="menu.login" data-mw="interface"> <span class="minerva-icon minerva-icon--logIn"></span> <span class="toggle-list-item__label">Log in</span> </a></li> </ul> <ul id="pt-preferences" class="toggle-list__list"> <li class="toggle-list-item skin-minerva-list-item-jsonly"><a class="toggle-list-item__anchor menu__item--settings" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Special:MobileOptions&returnto=Lua+(programming+language)&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" data-event-name="menu.settings" data-mw="interface"> <span class="minerva-icon minerva-icon--settings"></span> <span class="toggle-list-item__label">Settings</span> </a></li> </ul> <ul id="p-donation" class="toggle-list__list"> <li class="toggle-list-item "><a class="toggle-list-item__anchor menu__item--donate" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source%3Ddonate%26utm_medium%3Dsidebar%26utm_campaign%3DC13_en.wikipedia.org%26uselang%3Den%26wmf_key%3Dminerva" data-event-name="menu.donate" data-mw="interface"> <span class="minerva-icon minerva-icon--heart"></span> <span class="toggle-list-item__label">Donate</span> </a></li> </ul> <ul class="hlist"> <li class="toggle-list-item "><a class="toggle-list-item__anchor menu__item--about" href="https://en-m-wikipedia-org.translate.goog/wiki/Wikipedia:About?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" data-mw="interface"> <span class="toggle-list-item__label">About Wikipedia</span> </a></li> <li class="toggle-list-item "><a class="toggle-list-item__anchor menu__item--disclaimers" href="https://en-m-wikipedia-org.translate.goog/wiki/Wikipedia:General_disclaimer?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" data-mw="interface"> <span class="toggle-list-item__label">Disclaimers</span> </a></li> </ul> </div><label class="main-menu-mask" for="main-menu-input"></label> </nav> <div class="branding-box"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Main_Page?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB"> <span><img src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" alt="Wikipedia" width="120" height="18" style="width: 7.5em; height: 1.125em;"> </span> </a> </div> <form action="/w/index.php" method="get" class="minerva-search-form"> <div class="search-box"><input type="hidden" name="title" value="Special:Search"> <input class="search skin-minerva-search-trigger" id="searchInput" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f"> <span class="search-box-icon-overlay"><span class="minerva-icon minerva-icon--search"></span> </span> </div><button id="searchIcon" class="cdx-button cdx-button--size-large cdx-button--icon-only cdx-button--weight-quiet skin-minerva-search-trigger"> <span class="minerva-icon minerva-icon--search"></span> <span>Search</span> </button> </form> <nav class="minerva-user-navigation" aria-label="User navigation"> </nav> </div> </header> <main id="content" class="mw-body"> <div class="banner-container"> <div id="siteNotice"></div> </div> <div class="pre-content heading-holder"> <div class="page-heading"> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Lua (programming language)</span></h1> <div class="tagline"></div> </div> <ul id="p-associated-pages" class="minerva__tab-container"> <li class="minerva__tab selected"><a class="minerva__tab-text" href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" rel="" data-event-name="tabs.subject">Article</a></li> <li class="minerva__tab "><a class="minerva__tab-text" href="https://en-m-wikipedia-org.translate.goog/wiki/Talk:Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" rel="discussion" data-event-name="tabs.talk">Talk</a></li> </ul> <nav class="page-actions-menu"> <ul id="p-views" class="page-actions-menu__list"> <li id="language-selector" class="page-actions-menu__list-item"><a role="button" href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#p-lang" data-mw="interface" data-event-name="menu.languages" title="Language" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet language-selector"> <span class="minerva-icon minerva-icon--language"></span> <span>Language</span> </a></li> <li id="page-actions-watch" class="page-actions-menu__list-item"><a role="button" id="ca-watch" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Special:UserLogin&returnto=Lua+(programming+language)&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" data-event-name="menu.watch" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet menu__item--page-actions-watch"> <span class="minerva-icon minerva-icon--star"></span> <span>Watch</span> </a></li> <li id="page-actions-edit" class="page-actions-menu__list-item"><a role="button" id="ca-edit" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" data-event-name="menu.edit" data-mw="interface" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet edit-page menu__item--page-actions-edit"> <span class="minerva-icon minerva-icon--edit"></span> <span>Edit</span> </a></li> </ul> </nav><!-- version 1.0.2 (change every time you update a partial) --> <div id="mw-content-subtitle"></div> </div> <div id="bodyContent" class="content"> <div id="mw-content-text" class="mw-body-content"> <script>function mfTempOpenSection(id){var block=document.getElementById("mf-section-"+id);block.className+=" open-block";block.previousSibling.className+=" open-block";}</script> <div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"> <section class="mf-section-0" id="mf-section-0"> <p class="mw-empty-elt"></p> <style data-mw-deduplicate="TemplateStyles:r1257001546">.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}.mw-parser-output .infobox-3cols-child{margin:auto}.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){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 tr{display:table-row!important}body.skin--responsive .mw-parser-output .infobox-table th,body.skin--responsive .mw-parser-output .infobox-table td{padding-left:inherit;padding-right:inherit}}</style> <p><b>Lua</b> <span class="noexcerpt">(<span class="rt-commentedText nowrap"><span class="IPA nopopups noexcerpt" lang="en-fonipa"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Help:IPA/English?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Help:IPA/English">/<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>/</a></span></span> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Help:Pronunciation_respelling_key?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Help:Pronunciation respelling key"><i title="English pronunciation respelling"><span style="font-size:90%">LOO</span>-ə</i></a>; from <a href="https://en-m-wikipedia-org.translate.goog/wiki/Portuguese_language?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Portuguese language">Portuguese</a>: <i lang="pt"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://en.wiktionary.org/wiki/lua%23Portuguese" class="extiw" title="wikt:lua">lua</a></i> <span class="IPA nowrap" lang="pt-Latn-fonipa"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Help:IPA/Portuguese?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Help:IPA/Portuguese">[ˈlu(w)ɐ]</a></span> meaning <i><a href="https://en-m-wikipedia-org.translate.goog/wiki/Moon?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Moon">moon</a></i>)</span> is a <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lightweight_programming_language?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Lightweight programming language">lightweight</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/High-level_programming_language?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="High-level programming language">high-level</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Multi-paradigm_programming_language?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Multi-paradigm programming language">multi-paradigm</a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Programming_language?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Programming language">programming language</a> designed mainly for <a href="https://en-m-wikipedia-org.translate.goog/wiki/Scripting_language?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Scripting language">embedded use</a> in applications.<sup id="cite_ref-luaspe_3-0" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-luaspe-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> Lua is <a href="https://en-m-wikipedia-org.translate.goog/wiki/Cross-platform_software?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Cross-platform software">cross-platform software</a>, since the <a href="https://en-m-wikipedia-org.translate.goog/wiki/Interpreter_(computing)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Interpreter (computing)">interpreter</a> of <a href="https://en-m-wikipedia-org.translate.goog/wiki/Compiler?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Compiler">compiled</a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Bytecode?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Bytecode">bytecode</a> is written in <a href="https://en-m-wikipedia-org.translate.goog/wiki/ANSI_C?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="ANSI C">ANSI C</a>,<sup id="cite_ref-luaabout_4-0" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-luaabout-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> and Lua has a relatively simple C application programming interface (<a href="https://en-m-wikipedia-org.translate.goog/wiki/API?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="API">API</a>) to embed it into applications.<sup id="cite_ref-5" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup></p> <table class="infobox vevent"> <caption class="infobox-title summary"> Lua </caption> <tbody> <tr> <td colspan="2" class="infobox-image"><span typeof="mw:File"><a href="https://en-m-wikipedia-org.translate.goog/wiki/File:Lua-Logo.svg?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Lua-Logo.svg/128px-Lua-Logo.svg.png" decoding="async" width="128" height="128" class="mw-file-element" srcset="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Lua-Logo.svg/192px-Lua-Logo.svg.png 1.5x,https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Lua-Logo.svg/256px-Lua-Logo.svg.png 2x" data-file-width="947" data-file-height="947"></a></span></td> </tr> <tr> <td colspan="2" class="infobox-image"><span typeof="mw:File"><a href="https://en-m-wikipedia-org.translate.goog/wiki/File:Excerpt_of_Coordinates_module_in_Lua.png?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/d/d1/Excerpt_of_Coordinates_module_in_Lua.png/300px-Excerpt_of_Coordinates_module_in_Lua.png" decoding="async" width="300" height="166" class="mw-file-element" srcset="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://upload.wikimedia.org/wikipedia/commons/thumb/d/d1/Excerpt_of_Coordinates_module_in_Lua.png/450px-Excerpt_of_Coordinates_module_in_Lua.png 1.5x,https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://upload.wikimedia.org/wikipedia/commons/thumb/d/d1/Excerpt_of_Coordinates_module_in_Lua.png/600px-Excerpt_of_Coordinates_module_in_Lua.png 2x" data-file-width="640" data-file-height="354"></a></span> <div class="infobox-caption"> Screenshot of Lua code from a <a href="https://en-m-wikipedia-org.translate.goog/wiki/Wikipedia:Lua?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Wikipedia:Lua">Wikipedia Lua module</a> using the <a href="https://en-m-wikipedia-org.translate.goog/wiki/MediaWiki?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="MediaWiki">MediaWiki</a> <a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.mediawiki.org/wiki/Extension:Scribunto" class="extiw" title="mw:Extension:Scribunto">Scribunto</a> extension </div></td> </tr> <tr> <th scope="row" class="infobox-label"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Programming_paradigm?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Programming paradigm">Paradigm</a></th> <td class="infobox-data"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Multi-paradigm?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Multi-paradigm">Multi-paradigm</a>: <a href="https://en-m-wikipedia-org.translate.goog/wiki/Scripting_language?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Scripting language">scripting</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Imperative_programming?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Imperative programming">imperative</a> (<a href="https://en-m-wikipedia-org.translate.goog/wiki/Procedural_programming?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Procedural programming">procedural</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Prototype-based_programming?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Prototype-based programming">prototype-based</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Object-oriented_programming?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Object-oriented programming">object-oriented</a>), <a href="https://en-m-wikipedia-org.translate.goog/wiki/Functional_programming?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Functional programming">functional</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Metaprogramming?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Metaprogramming">meta</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Reflective_programming?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Reflective programming">reflective</a></td> </tr> <tr> <th scope="row" class="infobox-label"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Software_design?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Software design">Designed by</a></th> <td class="infobox-data"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Roberto_Ierusalimschy?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Roberto Ierusalimschy">Roberto Ierusalimschy</a><br> Waldemar Celes<br> Luiz Henrique de Figueiredo</td> </tr> <tr> <th scope="row" class="infobox-label">First appeared</th> <td class="infobox-data">1993<span class="noprint">; 31 years ago</span><span style="display:none"> (<span class="bday dtstart published updated">1993</span>)</span></td> </tr> <tr> <td colspan="2" class="infobox-full-data"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1257001546"></td> </tr> <tr> <th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Software_release_life_cycle?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Software release life cycle">Stable release</a></th> <td class="infobox-data"> <div style="margin:0px;"> 5.4.7<sup id="cite_ref-wikidata-a856f141bd953b6aacf5a1724577abc3018cbce1-v18_1-0" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-wikidata-a856f141bd953b6aacf5a1724577abc3018cbce1-v18-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> <span class="mw-valign-text-top" typeof="mw:File/Frameless"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.wikidata.org/wiki/Q207316?uselang%3Den%23P348" title="Edit this on Wikidata"><img alt="Edit this on Wikidata" src="//upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/10px-OOjs_UI_icon_edit-ltr-progressive.svg.png" decoding="async" width="10" height="10" class="mw-file-element" srcset="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/15px-OOjs_UI_icon_edit-ltr-progressive.svg.png 1.5x,https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/20px-OOjs_UI_icon_edit-ltr-progressive.svg.png 2x" data-file-width="20" data-file-height="20"></a></span> / 25 June 2024<span class="noprint">; 5 months ago</span><span style="display:none"> (<span class="bday dtstart published updated">25 June 2024</span>)</span> </div></td> </tr> <tr style="display:none"> <td colspan="2"></td> </tr> <tr> <th scope="row" class="infobox-label"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Type_system?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Type system">Typing discipline</a></th> <td class="infobox-data"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Dynamic_typing?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Dynamic typing">Dynamic</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Strong_and_weak_typing?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Strong and weak typing">strong</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Duck_typing?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Duck typing">duck</a></td> </tr> <tr> <th scope="row" class="infobox-label">Implementation language</th> <td class="infobox-data"><a href="https://en-m-wikipedia-org.translate.goog/wiki/ANSI_C?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="ANSI C">ANSI C</a></td> </tr> <tr> <th scope="row" class="infobox-label"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Operating_system?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Operating system">OS</a></th> <td class="infobox-data"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Cross-platform_software?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Cross-platform software">Cross-platform</a></td> </tr> <tr> <th scope="row" class="infobox-label"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Software_license?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Software license">License</a></th> <td class="infobox-data"><a href="https://en-m-wikipedia-org.translate.goog/wiki/MIT_License?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="MIT License">MIT</a></td> </tr> <tr> <th scope="row" class="infobox-label"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Filename_extension?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://lua.org">lua<wbr>.org</a></span> <span class="mw-valign-text-top noprint" typeof="mw:File/Frameless"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.wikidata.org/wiki/Q207316%23P856" title="Edit this at Wikidata"><img alt="Edit this at Wikidata" src="//upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/10px-OOjs_UI_icon_edit-ltr-progressive.svg.png" decoding="async" width="10" height="10" class="mw-file-element" srcset="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/15px-OOjs_UI_icon_edit-ltr-progressive.svg.png 1.5x,https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/20px-OOjs_UI_icon_edit-ltr-progressive.svg.png 2x" data-file-width="20" data-file-height="20"></a></span></td> </tr> <tr> <th colspan="2" class="infobox-header" style="background-color: #eee;">Major <a href="https://en-m-wikipedia-org.translate.goog/wiki/Programming_language_implementation?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Programming language implementation">implementations</a></th> </tr> <tr> <td colspan="2" class="infobox-full-data"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.lua.org/download.html">Lua</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/LuaJIT?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="LuaJIT">LuaJIT</a>, <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://eliasdaler.github.io/luavela/">LuaVela</a>, <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.moonsharp.org/">MoonSharp</a>,</td> </tr> <tr> <th colspan="2" class="infobox-header" style="background-color: #eee;"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Programming_language?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#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://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.nongnu.org/gsl-shell/">GSL Shell</a>, <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://luau-lang.org">Lua<i>u</i></a></td> </tr> <tr> <th colspan="2" class="infobox-header" style="background-color: #eee;">Influenced by</th> </tr> <tr> <td colspan="2" class="infobox-full-data"><a href="https://en-m-wikipedia-org.translate.goog/wiki/C%2B%2B?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="C++">C++</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/CLU_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="CLU (programming language)">CLU</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Modula?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Modula">Modula</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Scheme_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Scheme (programming language)">Scheme</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/SNOBOL?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="SNOBOL">SNOBOL</a></td> </tr> <tr> <th colspan="2" class="infobox-header" style="background-color: #eee;">Influenced</th> </tr> <tr> <td colspan="2" class="infobox-full-data"><a href="https://en-m-wikipedia-org.translate.goog/wiki/GameMonkey_Script?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="GameMonkey Script">GameMonkey</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Io_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Io (programming language)">Io</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/JavaScript?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="JavaScript">JavaScript</a><sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">[<i><a href="https://en-m-wikipedia-org.translate.goog/wiki/Wikipedia:Citation_needed?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (November 2022)">citation needed</span></a></i>]</sup>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Julia_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Julia (programming language)">Julia</a>, MiniD, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Red_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Red (programming language)">Red</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Ring_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Ring (programming language)">Ring</a>,<sup id="cite_ref-The_Ring_programming_language_and_other_languages_2-0" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-The_Ring_programming_language_and_other_languages-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Ruby_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Ruby (programming language)">Ruby</a>,<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">[<i><a href="https://en-m-wikipedia-org.translate.goog/wiki/Wikipedia:Citation_needed?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (November 2022)">citation needed</span></a></i>]</sup> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Squirrel_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Squirrel (programming language)">Squirrel</a>, MoonScript, <a href="https://en-m-wikipedia-org.translate.goog/wiki/C--?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="C--">C--</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Roblox_Studio?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Roblox Studio">Luau</a></td> </tr> </tbody> </table> <p>Lua originated in 1993 as a language for extending <a href="https://en-m-wikipedia-org.translate.goog/wiki/Application_software?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="https://en-m-wikipedia-org.translate.goog/wiki/Procedural_programming?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Procedural programming">procedural programming</a> languages, but more complicated or <a href="https://en-m-wikipedia-org.translate.goog/wiki/Domain-specific_language?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="https://en-m-wikipedia-org.translate.goog/wiki/Profiling_(computer_programming)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Profiling (computer programming)">speed</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Porting?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Porting">portability</a>, extensibility and ease-of-use in development.</p> <div id="toc" class="toc" role="navigation" aria-labelledby="mw-toc-heading"> <input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"> <div class="toctitle" lang="en" dir="ltr"> <h2 id="mw-toc-heading">Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span> </div> <ul> <li class="toclevel-1 tocsection-1"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#History"><span class="tocnumber">1</span> <span class="toctext">History</span></a></li> <li class="toclevel-1 tocsection-2"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Features"><span class="tocnumber">2</span> <span class="toctext">Features</span></a> <ul> <li class="toclevel-2 tocsection-3"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Syntax"><span class="tocnumber">2.1</span> <span class="toctext">Syntax</span></a></li> <li class="toclevel-2 tocsection-4"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Control_flow"><span class="tocnumber">2.2</span> <span class="toctext">Control flow</span></a></li> <li class="toclevel-2 tocsection-5"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Functions"><span class="tocnumber">2.3</span> <span class="toctext">Functions</span></a></li> <li class="toclevel-2 tocsection-6"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Tables"><span class="tocnumber">2.4</span> <span class="toctext">Tables</span></a></li> <li class="toclevel-2 tocsection-7"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Metatables"><span class="tocnumber">2.5</span> <span class="toctext">Metatables</span></a></li> <li class="toclevel-2 tocsection-8"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Object-oriented_programming"><span class="tocnumber">2.6</span> <span class="toctext">Object-oriented programming</span></a> <ul> <li class="toclevel-3 tocsection-9"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Inheritance"><span class="tocnumber">2.6.1</span> <span class="toctext">Inheritance</span></a></li> </ul></li> </ul></li> <li class="toclevel-1 tocsection-10"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Implementation"><span class="tocnumber">3</span> <span class="toctext">Implementation</span></a></li> <li class="toclevel-1 tocsection-11"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#C_API"><span class="tocnumber">4</span> <span class="toctext">C API</span></a> <ul> <li class="toclevel-2 tocsection-12"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Modules"><span class="tocnumber">4.1</span> <span class="toctext">Modules</span></a></li> </ul></li> <li class="toclevel-1 tocsection-13"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Applications"><span class="tocnumber">5</span> <span class="toctext">Applications</span></a></li> <li class="toclevel-1 tocsection-14"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Derived_languages"><span class="tocnumber">6</span> <span class="toctext">Derived languages</span></a> <ul> <li class="toclevel-2 tocsection-15"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Languages_that_compile_to_Lua"><span class="tocnumber">6.1</span> <span class="toctext">Languages that compile to Lua</span></a></li> <li class="toclevel-2 tocsection-16"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Dialects"><span class="tocnumber">6.2</span> <span class="toctext">Dialects</span></a></li> </ul></li> <li class="toclevel-1 tocsection-17"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#See_also"><span class="tocnumber">7</span> <span class="toctext">See also</span></a></li> <li class="toclevel-1 tocsection-18"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Notes"><span class="tocnumber">8</span> <span class="toctext">Notes</span></a></li> <li class="toclevel-1 tocsection-19"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#References"><span class="tocnumber">9</span> <span class="toctext">References</span></a></li> <li class="toclevel-1 tocsection-20"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Further_reading"><span class="tocnumber">10</span> <span class="toctext">Further reading</span></a></li> <li class="toclevel-1 tocsection-21"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#External_links"><span class="tocnumber">11</span> <span class="toctext">External links</span></a></li> </ul> </div> </section> <div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(1)"> <span class="indicator mf-icon mf-icon-expand mf-icon--small"></span> <h2 id="History">History</h2><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=1&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: History" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <section class="mf-section-1 collapsible-block" id="mf-section-1"> <p>Lua was created in 1993 by <a href="https://en-m-wikipedia-org.translate.goog/wiki/Roberto_Ierusalimschy?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Roberto Ierusalimschy">Roberto Ierusalimschy</a>, Luiz Henrique de Figueiredo and Waldemar Celes, members of the Computer Graphics Technology Group (Tecgraf) at the <a href="https://en-m-wikipedia-org.translate.goog/wiki/Pontifical_Catholic_University_of_Rio_de_Janeiro?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Pontifical Catholic University of Rio de Janeiro">Pontifical Catholic University of Rio de Janeiro</a>, in <a href="https://en-m-wikipedia-org.translate.goog/wiki/Brazil?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Brazil">Brazil</a>.</p> <p>From 1977 until 1992, Brazil had a policy of strong <a href="https://en-m-wikipedia-org.translate.goog/wiki/Trade_barrier?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Trade barrier">trade barriers</a> (called a market reserve) for <a href="https://en-m-wikipedia-org.translate.goog/wiki/Computer_hardware?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Computer hardware">computer hardware</a> and <a href="https://en-m-wikipedia-org.translate.goog/wiki/Software?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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_6-0" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-hopl2007-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup></p> <p>Lua's predecessors were the data-description/configuration languages <i>Simple Object Language</i> (SOL) and <i>data-entry language</i> (DEL).<sup id="cite_ref-luahist2001_7-0" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-luahist2001-7"><span class="cite-bracket">[</span>7<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="https://en-m-wikipedia-org.translate.goog/wiki/Petrobras?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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_6-1" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-hopl2007-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup></p> <style data-mw-deduplicate="TemplateStyles:r1244412712">.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}}</style> <blockquote class="templatequote"> <p>In 1993, the only real contender was <a href="https://en-m-wikipedia-org.translate.goog/wiki/Tcl?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Tcl">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="https://en-m-wikipedia-org.translate.goog/wiki/Lisp_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Lisp (programming language)">LISP</a> or <a href="https://en-m-wikipedia-org.translate.goog/wiki/Scheme_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Scheme (programming language)">Scheme</a> because of their unfriendly syntax. <a href="https://en-m-wikipedia-org.translate.goog/wiki/Python_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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 ... 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 <a href="https://en-m-wikipedia-org.translate.goog/wiki/Secure_Operations_Language?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Secure Operations Language">SOL</a> (hence the name Lua: <i>Sol</i> meaning "Sun" in Portuguese, and <i>Lua</i> meaning "Moon"). Lua <a href="https://en-m-wikipedia-org.translate.goog/wiki/Syntax_(programming_languages)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Syntax (programming languages)">syntax</a> for control structures was mostly borrowed from <a href="https://en-m-wikipedia-org.translate.goog/wiki/Modula?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Modula">Modula</a> (<code>if</code>, <code>while</code>, <code>repeat</code>/<code>until</code>), but also had taken influence from <a href="https://en-m-wikipedia-org.translate.goog/wiki/CLU_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="CLU (programming language)">CLU</a> (multiple assignments and multiple returns from function calls, as a simpler alternative to <a href="https://en-m-wikipedia-org.translate.goog/wiki/Call_by_reference?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Call by reference">reference parameters</a> or explicit <a href="https://en-m-wikipedia-org.translate.goog/wiki/Pointer_(computer_programming)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Pointer (computer programming)">pointers</a>), <a href="https://en-m-wikipedia-org.translate.goog/wiki/C%2B%2B?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="C++">C++</a> ("neat idea of allowing a <a href="https://en-m-wikipedia-org.translate.goog/wiki/Local_variable?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Local variable">local variable</a> to be declared only where we need it"<sup id="cite_ref-hopl2007_6-2" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-hopl2007-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup>), <a href="https://en-m-wikipedia-org.translate.goog/wiki/SNOBOL?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="SNOBOL">SNOBOL</a> and <a href="https://en-m-wikipedia-org.translate.goog/wiki/AWK?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="AWK">AWK</a> (<a href="https://en-m-wikipedia-org.translate.goog/wiki/Associative_array?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Associative array">associative arrays</a>). In an article published in <i><a href="https://en-m-wikipedia-org.translate.goog/wiki/Dr._Dobb%27s_Journal?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="https://en-m-wikipedia-org.translate.goog/wiki/List_(abstract_data_type)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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_8-0" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-ddj96-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup></p> <p>Lua <a href="https://en-m-wikipedia-org.translate.goog/wiki/Semantics?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Semantics">semantics</a> have been increasingly influenced by Scheme over time,<sup id="cite_ref-hopl2007_6-3" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-hopl2007-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> especially with the introduction of <a href="https://en-m-wikipedia-org.translate.goog/wiki/Anonymous_function?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Anonymous function">anonymous functions</a> and full <a href="https://en-m-wikipedia-org.translate.goog/wiki/Scope_(computer_science)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Lexical_scope_vs._dynamic_scope" 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="https://en-m-wikipedia-org.translate.goog/wiki/BSD_licenses?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="BSD licenses">BSD license</a>. From version 5.0 onwards, Lua has been licensed under the <a href="https://en-m-wikipedia-org.translate.goog/wiki/MIT_License?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="MIT License">MIT License</a>. Both are <a href="https://en-m-wikipedia-org.translate.goog/wiki/Permissive_free_software_licences?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Permissive free software licences">permissive free software licences</a> and are almost identical.</p> </section> <div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(2)"> <span class="indicator mf-icon mf-icon-expand mf-icon--small"></span> <h2 id="Features">Features</h2><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=2&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: Features" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <section class="mf-section-2 collapsible-block" id="mf-section-2"> <style data-mw-deduplicate="TemplateStyles:r1235681985">.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);display:flow-root}.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:720px){.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}}</style> <style data-mw-deduplicate="TemplateStyles:r1237033735">@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"]{background-color:white}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}</style> <div class="side-box side-box-right plainlinks sistersitebox"> <style data-mw-deduplicate="TemplateStyles:r1126788409">.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}</style> <div class="side-box-flex"> <div class="side-box-image"> <span class="noviewer" typeof="mw:File"><span> <noscript> <img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/40px-Wikibooks-logo-en-noslogan.svg.png" decoding="async" width="40" height="40" class="mw-file-element" data-file-width="400" data-file-height="400"> </noscript><span class="lazy-image-placeholder" style="width: 40px;height: 40px;" data-src="//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/40px-Wikibooks-logo-en-noslogan.svg.png" data-alt="" data-width="40" data-height="40" data-srcset="//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/60px-Wikibooks-logo-en-noslogan.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/80px-Wikibooks-logo-en-noslogan.svg.png 2x" data-class="mw-file-element"> </span></span></span> </div> <div class="side-box-text plainlist"> Wikibooks has a book on the topic of: <i><b><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://en.wikibooks.org/wiki/Lua_Programming" class="extiw" title="wikibooks:Lua Programming">Lua Programming</a></b></i> </div> </div> </div> <p>Lua is commonly described as a "<a href="https://en-m-wikipedia-org.translate.goog/wiki/Multi-paradigm_programming_language?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="https://en-m-wikipedia-org.translate.goog/wiki/Inheritance_(object-oriented_programming)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Inheritance (object-oriented programming)">inheritance</a>, but allows it to be implemented with <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Metatables">metatables</a>. Similarly, Lua allows programmers to implement <a href="https://en-m-wikipedia-org.translate.goog/wiki/Namespace?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Namespace">namespaces</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Class_(computer_programming)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Class (computer programming)">classes</a> and other related features using its single table implementation; <a href="https://en-m-wikipedia-org.translate.goog/wiki/First-class_function?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="First-class function">first-class functions</a> allow the employment of many techniques from <a href="https://en-m-wikipedia-org.translate.goog/wiki/Functional_programming?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Functional programming">functional programming</a> and full <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lexical_scoping?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Lexical scoping">lexical scoping</a> allows fine-grained <a href="https://en-m-wikipedia-org.translate.goog/wiki/Information_hiding?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Information hiding">information hiding</a> to enforce the <a href="https://en-m-wikipedia-org.translate.goog/wiki/Principle_of_least_privilege?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Principle of least privilege">principle of least privilege</a>.</p> <p>In general, Lua strives to provide simple, flexible <a href="https://en-m-wikipedia-org.translate.goog/wiki/Metaprogramming?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="https://en-m-wikipedia-org.translate.goog/wiki/Lightweight_programming_language?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Lightweight programming language">light</a>; the full reference <a href="https://en-m-wikipedia-org.translate.goog/wiki/Interpreter_(computing)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Interpreter (computing)">interpreter</a> is only about 247 <a href="https://en-m-wikipedia-org.translate.goog/wiki/Kilobyte?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Kilobyte">kB</a> compiled<sup id="cite_ref-luaabout_4-1" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-luaabout-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> and easily adaptable to a broad range of applications.</p> <p>As a <a href="https://en-m-wikipedia-org.translate.goog/wiki/Dynamically_typed?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Dynamically typed">dynamically typed</a> language intended for use as an extension language or <a href="https://en-m-wikipedia-org.translate.goog/wiki/Scripting_language?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="https://en-m-wikipedia-org.translate.goog/wiki/Boolean_data_type?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Boolean data type">Boolean</a> values, numbers (double-precision <a href="https://en-m-wikipedia-org.translate.goog/wiki/Floating_point?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Floating point">floating point</a> and <a href="https://en-m-wikipedia-org.translate.goog/wiki/64-bit_computing?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="64-bit computing">64-bit</a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Integer?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Integer">integers</a> by default) and <a href="https://en-m-wikipedia-org.translate.goog/wiki/String_(computer_science)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="String (computer science)">strings</a>. Typical data structures such as <a href="https://en-m-wikipedia-org.translate.goog/wiki/Array_data_structure?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Array data structure">arrays</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Set_(computer_science)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Set (computer science)">sets</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/List_(computing)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="List (computing)">lists</a> and <a href="https://en-m-wikipedia-org.translate.goog/wiki/Record_(computer_science)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="https://en-m-wikipedia-org.translate.goog/wiki/Associative_array?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Associative array">associative array</a>.</p> <p>Lua implements a small set of advanced features such as <a href="https://en-m-wikipedia-org.translate.goog/wiki/First-class_function?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="First-class function">first-class functions</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Garbage_collection_(computer_science)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Garbage collection (computer science)">garbage collection</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Closure_(computer_science)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Closure (computer science)">closures</a>, proper <a href="https://en-m-wikipedia-org.translate.goog/wiki/Tail_recursion?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Tail recursion">tail calls</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Type_conversion?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Type conversion">coercion</a> (automatic conversion between string and number values at run time), <a href="https://en-m-wikipedia-org.translate.goog/wiki/Coroutine?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Coroutine">coroutines</a> (cooperative multitasking) and <a href="https://en-m-wikipedia-org.translate.goog/wiki/Dynamic_loading?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Dynamic loading">dynamic module loading</a>.</p> <div class="mw-heading mw-heading3"> <h3 id="Syntax">Syntax</h3><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=3&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: Syntax" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>The classic <a href="https://en-m-wikipedia-org.translate.goog/wiki/%22Hello,_World!%22_program?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title=""Hello, World!" program">"Hello, World!" program</a> can be written as follows, with or without parentheses:<sup id="cite_ref-9" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-11" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-11"><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="s2">"Hello, World!"</span> </pre> </div> <p>A <a href="https://en-m-wikipedia-org.translate.goog/wiki/Comment_(computer_programming)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="https://en-m-wikipedia-org.translate.goog/wiki/Ada_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Ada (programming language)">Ada</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Eiffel_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Eiffel (programming language)">Eiffel</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Haskell?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Haskell">Haskell</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/SQL?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="SQL">SQL</a> and <a href="https://en-m-wikipedia-org.translate.goog/wiki/VHDL?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="https://en-m-wikipedia-org.translate.goog/wiki/Factorial?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="nf">factorial</span><span class="p">(</span><span class="n">n</span><span class="p">)</span> <span class="kd">local</span> <span class="n">x</span> <span class="o">=</span> <span class="mi">1</span> <span class="kr">for</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">2</span><span class="p">,</span> <span class="n">n</span> <span class="kr">do</span> <span class="n">x</span> <span class="o">=</span> <span class="n">x</span> <span class="o">*</span> <span class="n">i</span> <span class="kr">end</span> <span class="kr">return</span> <span class="n">x</span> <span class="kr">end</span> </pre> </div> <div class="mw-heading mw-heading3"> <h3 id="Control_flow">Control flow</h3><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=4&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: Control flow" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>Lua has one type of <a href="https://en-m-wikipedia-org.translate.goog/wiki/Conditional_(computer_programming)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Conditional (computer programming)">conditional</a> test: <code><a href="https://en-m-wikipedia-org.translate.goog/wiki/Conditional_(computer_programming)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#If%E2%80%93then(%E2%80%93else)" 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="n">condition</span> <span class="kr">then</span> <span class="c1">--statement body</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="n">condition</span> <span class="kr">then</span> <span class="c1">--statement body</span> <span class="kr">else</span> <span class="c1">--statement body</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="n">condition</span> <span class="kr">then</span> <span class="c1">--statement body</span> <span class="kr">elseif</span> <span class="n">condition</span> <span class="kr">then</span> <span class="c1">--statement body</span> <span class="kr">else</span> <span class="c1">-- optional</span> <span class="c1">--optional default statement body</span> <span class="kr">end</span> </pre> </div> <p>Lua has four types of conditional loops: the <a href="https://en-m-wikipedia-org.translate.goog/wiki/While_loop?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="While loop"><code>while</code> loop</a>, the <code>repeat</code> loop (similar to a <a href="https://en-m-wikipedia-org.translate.goog/wiki/Do_while_loop?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Do while loop"><code>do while</code> loop</a>), the numeric <a href="https://en-m-wikipedia-org.translate.goog/wiki/For_loop?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="n">condition</span> <span class="kr">do</span> <span class="c1">--statements</span> <span class="kr">end</span> <span class="kr">repeat</span> <span class="c1">--statements</span> <span class="kr">until</span> <span class="n">condition</span> <span class="kr">for</span> <span class="n">i</span> <span class="o">=</span> <span class="n">first</span><span class="p">,</span> <span class="n">last</span><span class="p">,</span> <span class="n">delta</span> <span class="kr">do</span> <span class="c1">--delta may be negative, allowing the for loop to count down or up</span> <span class="c1">--statements</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="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="kr">in</span> <span class="nb">pairs</span><span class="p">(</span><span class="nb">_G</span><span class="p">)</span> <span class="kr">do</span> <span class="nb">print</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span> <span class="kr">end</span> </pre> </div> <p>Loops can also be <a href="https://en-m-wikipedia-org.translate.goog/wiki/Nesting_(programming)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="n">grid</span> <span class="o">=</span> <span class="p">{</span> <span class="p">{</span> <span class="mi">11</span><span class="p">,</span> <span class="mi">12</span><span class="p">,</span> <span class="mi">13</span> <span class="p">},</span> <span class="p">{</span> <span class="mi">21</span><span class="p">,</span> <span class="mi">22</span><span class="p">,</span> <span class="mi">23</span> <span class="p">},</span> <span class="p">{</span> <span class="mi">31</span><span class="p">,</span> <span class="mi">32</span><span class="p">,</span> <span class="mi">33</span> <span class="p">}</span> <span class="p">}</span> <span class="kr">for</span> <span class="n">y</span><span class="p">,</span> <span class="n">row</span> <span class="kr">in</span> <span class="nb">pairs</span><span class="p">(</span><span class="n">grid</span><span class="p">)</span> <span class="kr">do</span> <span class="kr">for</span> <span class="n">x</span><span class="p">,</span> <span class="n">value</span> <span class="kr">in</span> <span class="nb">pairs</span><span class="p">(</span><span class="n">row</span><span class="p">)</span> <span class="kr">do</span> <span class="nb">print</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span> <span class="kr">end</span> <span class="kr">end</span> </pre> </div> <div class="mw-heading mw-heading3"> <h3 id="Functions">Functions</h3><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=5&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: Functions" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>Lua's treatment of functions as <a href="https://en-m-wikipedia-org.translate.goog/wiki/First-class_function?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="kd">local</span> <span class="n">oldprint</span> <span class="o">=</span> <span class="nb">print</span> <span class="c1">-- Store current print function as oldprint</span> <span class="kr">function</span> <span class="nf">print</span><span class="p">(</span><span class="n">s</span><span class="p">)</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="n">oldprint</span><span class="p">(</span><span class="n">s</span> <span class="o">==</span> <span class="s2">"foo"</span> <span class="ow">and</span> <span class="s2">"bar"</span> <span class="ow">or</span> <span class="n">s</span><span class="p">)</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="https://en-m-wikipedia-org.translate.goog/wiki/Scope_(programming)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#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="https://en-m-wikipedia-org.translate.goog/wiki/Closure_(computer_programming)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="nf">addto</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="c1">-- Return a new function that adds x to the argument</span> <span class="kr">return</span> <span class="kr">function</span><span class="p">(</span><span class="n">y</span><span class="p">)</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="kr">return</span> <span class="n">x</span> <span class="o">+</span> <span class="n">y</span> <span class="kr">end</span> <span class="kr">end</span> <span class="n">fourplus</span> <span class="o">=</span> <span class="n">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="n">fourplus</span><span class="p">(</span><span class="mi">3</span><span class="p">))</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="n">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><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=6&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: Tables" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>Tables are the most important data structures (and, by design, the only built-in <a href="https://en-m-wikipedia-org.translate.goog/wiki/Composite_data_type?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="https://en-m-wikipedia-org.translate.goog/wiki/Hash_table?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="n">a_table</span> <span class="o">=</span> <span class="p">{}</span> <span class="c1">-- Creates a new, empty table</span> </pre> </div> <p>Tables are always passed by reference (see <a href="https://en-m-wikipedia-org.translate.goog/wiki/Call_by_sharing?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="https://en-m-wikipedia-org.translate.goog/wiki/NaN?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="n">a_table</span> <span class="o">=</span> <span class="p">{</span><span class="n">x</span> <span class="o">=</span> <span class="mi">10</span><span class="p">}</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="n">a_table</span><span class="p">[</span><span class="s2">"x"</span><span class="p">])</span> <span class="c1">-- Prints the value associated with the string key, in this case 10.</span> <span class="n">b_table</span> <span class="o">=</span> <span class="n">a_table</span> <span class="n">b_table</span><span class="p">[</span><span class="s2">"x"</span><span class="p">]</span> <span class="o">=</span> <span class="mi">20</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="n">b_table</span><span class="p">[</span><span class="s2">"x"</span><span class="p">])</span> <span class="c1">-- Prints 20.</span> <span class="nb">print</span><span class="p">(</span><span class="n">a_table</span><span class="p">[</span><span class="s2">"x"</span><span class="p">])</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="https://en-m-wikipedia-org.translate.goog/wiki/Object_composition?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Object composition">structure</a> (or <a href="https://en-m-wikipedia-org.translate.goog/wiki/Record_(computer_science)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Record (computer science)">record</a>) by using <a href="https://en-m-wikipedia-org.translate.goog/wiki/String_(computer_science)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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-12" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#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="n">point</span> <span class="o">=</span> <span class="p">{</span> <span class="n">x</span> <span class="o">=</span> <span class="mi">10</span><span class="p">,</span> <span class="n">y</span> <span class="o">=</span> <span class="mi">20</span> <span class="p">}</span> <span class="c1">-- Create new table</span> <span class="nb">print</span><span class="p">(</span><span class="n">point</span><span class="p">[</span><span class="s2">"x"</span><span class="p">])</span> <span class="c1">-- Prints 10</span> <span class="nb">print</span><span class="p">(</span><span class="n">point</span><span class="p">.</span><span class="n">x</span><span class="p">)</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="n">Point</span> <span class="o">=</span> <span class="p">{}</span> <span class="n">Point</span><span class="p">.</span><span class="n">new</span> <span class="o">=</span> <span class="kr">function</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="kr">return</span> <span class="p">{</span><span class="n">x</span> <span class="o">=</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span> <span class="o">=</span> <span class="n">y</span><span class="p">}</span> <span class="c1">-- return {["x"] = x, ["y"] = y}</span> <span class="kr">end</span> <span class="n">Point</span><span class="p">.</span><span class="n">set_x</span> <span class="o">=</span> <span class="kr">function</span><span class="p">(</span><span class="n">point</span><span class="p">,</span> <span class="n">x</span><span class="p">)</span> <span class="n">point</span><span class="p">.</span><span class="n">x</span> <span class="o">=</span> <span class="n">x</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="https://en-m-wikipedia-org.translate.goog/wiki/Array_data_type?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="n">array</span> <span class="o">=</span> <span class="p">{</span> <span class="s2">"a"</span><span class="p">,</span> <span class="s2">"b"</span><span class="p">,</span> <span class="s2">"c"</span><span class="p">,</span> <span class="s2">"d"</span> <span class="p">}</span> <span class="c1">-- Indices are assigned automatically.</span> <span class="nb">print</span><span class="p">(</span><span class="n">array</span><span class="p">[</span><span class="mi">2</span><span class="p">])</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="n">array</span><span class="p">)</span> <span class="c1">-- Prints 4. # is the length operator for tables and strings.</span> <span class="n">array</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="s2">"z"</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="n">array</span><span class="p">)</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-13" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-13"><span class="cite-bracket">[</span>12<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="n">ExampleTable</span> <span class="o">=</span> <span class="p">{</span> <span class="p">{</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">},</span> <span class="p">{</span><span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</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="n">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="c1">-- Prints "3"</span> <span class="nb">print</span><span class="p">(</span><span class="n">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="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="nf">Point</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="c1">-- "Point" object constructor</span> <span class="kr">return</span> <span class="p">{</span> <span class="n">x</span> <span class="o">=</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span> <span class="o">=</span> <span class="n">y</span> <span class="p">}</span> <span class="c1">-- Creates and returns a new object (table)</span> <span class="kr">end</span> <span class="n">array</span> <span class="o">=</span> <span class="p">{</span> <span class="n">Point</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span> <span class="mi">20</span><span class="p">),</span> <span class="n">Point</span><span class="p">(</span><span class="mi">30</span><span class="p">,</span> <span class="mi">40</span><span class="p">),</span> <span class="n">Point</span><span class="p">(</span><span class="mi">50</span><span class="p">,</span> <span class="mi">60</span><span class="p">)</span> <span class="p">}</span> <span class="c1">-- Creates array of points</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="n">array</span><span class="p">[</span><span class="mi">2</span><span class="p">].</span><span class="n">y</span><span class="p">)</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_14-0" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-lobject_h_array-14"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup></p> <div class="mw-heading mw-heading3"> <h3 id="Metatables">Metatables</h3><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=7&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: Metatables" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>Extensible semantics is a key feature of Lua, and the <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Metatables">metatable</a> concept 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="https://en-m-wikipedia-org.translate.goog/wiki/Fibonacci_number?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Fibonacci number">Fibonacci number</a> using <a href="https://en-m-wikipedia-org.translate.goog/wiki/Dynamic_programming?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Dynamic programming">dynamic programming</a> and <a href="https://en-m-wikipedia-org.translate.goog/wiki/Memoization?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Memoization">memoization</a>.</p> <div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"> <pre><span></span><span class="n">fibs</span> <span class="o">=</span> <span class="p">{</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span> <span class="p">}</span> <span class="c1">-- Initial values for fibs[1] and fibs[2].</span> <span class="nb">setmetatable</span><span class="p">(</span><span class="n">fibs</span><span class="p">,</span> <span class="p">{</span> <span class="n">__index</span> <span class="o">=</span> <span class="kr">function</span><span class="p">(</span><span class="n">values</span><span class="p">,</span> <span class="n">n</span><span class="p">)</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="n">values</span><span class="p">[</span><span class="n">n</span><span class="p">]</span> <span class="o">=</span> <span class="n">values</span><span class="p">[</span><span class="n">n</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> <span class="o">+</span> <span class="n">values</span><span class="p">[</span><span class="n">n</span> <span class="o">-</span> <span class="mi">2</span><span class="p">]</span> <span class="c1">-- Calculate and memoize fibs[n].</span> <span class="kr">return</span> <span class="n">values</span><span class="p">[</span><span class="n">n</span><span class="p">]</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><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=8&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: Object-oriented programming" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>Although Lua does not have a built-in concept of <a href="https://en-m-wikipedia-org.translate.goog/wiki/Class_(computer_science)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Class (computer science)">classes</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Object-oriented_programming?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="https://en-m-wikipedia-org.translate.goog/wiki/Inheritance_(object-oriented_programming)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Inheritance (object-oriented programming)">Inheritance</a> (both single and multiple) can be implemented with <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#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="https://en-m-wikipedia-org.translate.goog/wiki/Prototype-based_programming?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Prototype-based programming">prototypes</a> are used, similar to <a href="https://en-m-wikipedia-org.translate.goog/wiki/Self_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Self (programming language)">Self</a> or <a href="https://en-m-wikipedia-org.translate.goog/wiki/JavaScript?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="JavaScript">JavaScript</a>. New objects are created either with a <a href="https://en-m-wikipedia-org.translate.goog/wiki/Factory_method_pattern?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="https://en-m-wikipedia-org.translate.goog/wiki/Vector_(geometry)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="n">Vector</span> <span class="o">=</span> <span class="p">{}</span> <span class="kd">local</span> <span class="n">VectorMeta</span> <span class="o">=</span> <span class="p">{</span> <span class="n">__index</span> <span class="o">=</span> <span class="n">Vector</span><span class="p">}</span> <span class="kr">function</span> <span class="nc">Vector</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span><span class="p">)</span> <span class="c1">-- The constructor</span> <span class="kr">return</span> <span class="nb">setmetatable</span><span class="p">({</span><span class="n">x</span> <span class="o">=</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span> <span class="o">=</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span> <span class="o">=</span> <span class="n">z</span><span class="p">},</span> <span class="n">VectorMeta</span><span class="p">)</span> <span class="kr">end</span> <span class="kr">function</span> <span class="nc">Vector</span><span class="p">.</span><span class="nf">magnitude</span><span class="p">(</span><span class="n">self</span><span class="p">)</span> <span class="c1">-- Another method</span> <span class="kr">return</span> <span class="nb">math.sqrt</span><span class="p">(</span><span class="n">self</span><span class="p">.</span><span class="n">x</span><span class="o">^</span><span class="mi">2</span> <span class="o">+</span> <span class="n">self</span><span class="p">.</span><span class="n">y</span><span class="o">^</span><span class="mi">2</span> <span class="o">+</span> <span class="n">self</span><span class="p">.</span><span class="n">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="n">vec</span> <span class="o">=</span> <span class="n">Vector</span><span class="p">.</span><span class="n">new</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> <span class="c1">-- Create a vector</span> <span class="nb">print</span><span class="p">(</span><span class="n">vec</span><span class="p">.</span><span class="n">magnitude</span><span class="p">(</span><span class="n">vec</span><span class="p">))</span> <span class="c1">-- Call a method (output: 1)</span> <span class="nb">print</span><span class="p">(</span><span class="n">vec</span><span class="p">.</span><span class="n">x</span><span class="p">)</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="n">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="n">vec</span></code> table. <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="n">vec</span><span class="p">.</span><span class="n">magnitude</span></code>, which is equivalent to <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="n">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="n">vec</span></code> table for the <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="n">magnitude</span></code> element. The <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="n">vec</span></code> table does not have a <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="n">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="n">Vector</span></code> table for the <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" style="" dir="ltr"><span class="n">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="n">vec</span></code> table.</p> <p>Lua provides some <a href="https://en-m-wikipedia-org.translate.goog/wiki/Syntactic_sugar?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Syntactic sugar">syntactic sugar</a> to facilitate object orientation. To declare <a href="https://en-m-wikipedia-org.translate.goog/wiki/Method_(computer_science)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="nc">table</span><span class="p">:</span><span class="nf">func</span><span class="p">(</span><span class="n">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="nc">table</span><span class="p">.</span><span class="nf">func</span><span class="p">(</span><span class="n">self</span><span class="p">,</span> <span class="n">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="n">object</span><span class="p">:</span><span class="n">func</span><span class="p">(</span><span class="n">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="n">object</span><span class="p">.</span><span class="n">func</span><span class="p">(</span><span class="n">object</span><span class="p">,</span> <span class="n">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="n">Vector</span> <span class="o">=</span> <span class="p">{}</span> <span class="n">Vector</span><span class="p">.</span><span class="n">__index</span> <span class="o">=</span> <span class="n">Vector</span> <span class="kr">function</span> <span class="nc">Vector</span><span class="p">:</span><span class="nf">new</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span><span class="p">)</span> <span class="c1">-- The constructor</span> <span class="c1">-- Since the function definition uses a colon, </span> <span class="c1">-- its first argument is "self" which refers</span> <span class="c1">-- to "Vector"</span> <span class="kr">return</span> <span class="nb">setmetatable</span><span class="p">({</span><span class="n">x</span> <span class="o">=</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span> <span class="o">=</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span> <span class="o">=</span> <span class="n">z</span><span class="p">},</span> <span class="n">self</span><span class="p">)</span> <span class="kr">end</span> <span class="kr">function</span> <span class="nc">Vector</span><span class="p">:</span><span class="nf">magnitude</span><span class="p">()</span> <span class="c1">-- Another method</span> <span class="c1">-- Reference the implicit object using self</span> <span class="kr">return</span> <span class="nb">math.sqrt</span><span class="p">(</span><span class="n">self</span><span class="p">.</span><span class="n">x</span><span class="o">^</span><span class="mi">2</span> <span class="o">+</span> <span class="n">self</span><span class="p">.</span><span class="n">y</span><span class="o">^</span><span class="mi">2</span> <span class="o">+</span> <span class="n">self</span><span class="p">.</span><span class="n">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="n">vec</span> <span class="o">=</span> <span class="n">Vector</span><span class="p">:</span><span class="n">new</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> <span class="c1">-- Create a vector</span> <span class="nb">print</span><span class="p">(</span><span class="n">vec</span><span class="p">:</span><span class="n">magnitude</span><span class="p">())</span> <span class="c1">-- Call a method (output: 1)</span> <span class="nb">print</span><span class="p">(</span><span class="n">vec</span><span class="p">.</span><span class="n">x</span><span class="p">)</span> <span class="c1">-- Access a member variable (output: 0)</span> </pre> </div> <div class="mw-heading mw-heading4"> <h4 id="Inheritance">Inheritance</h4><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=9&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: Inheritance" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>Lua supports using metatables to give Lua class inheritance.<sup id="cite_ref-15" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-15"><span class="cite-bracket">[</span>14<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="n">Vector</span> <span class="o">=</span> <span class="p">{}</span> <span class="n">Vector</span><span class="p">.</span><span class="n">__index</span> <span class="o">=</span> <span class="n">Vector</span> <span class="kr">function</span> <span class="nc">Vector</span><span class="p">:</span><span class="nf">new</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span><span class="p">)</span> <span class="c1">-- The constructor</span> <span class="c1">-- Here, self refers to whatever class's "new"</span> <span class="c1">-- method we call. In a derived class, self will</span> <span class="c1">-- be the derived class; in the Vector class, self</span> <span class="c1">-- will be Vector</span> <span class="kr">return</span> <span class="nb">setmetatable</span><span class="p">({</span><span class="n">x</span> <span class="o">=</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span> <span class="o">=</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span> <span class="o">=</span> <span class="n">z</span><span class="p">},</span> <span class="n">self</span><span class="p">)</span> <span class="kr">end</span> <span class="kr">function</span> <span class="nc">Vector</span><span class="p">:</span><span class="nf">magnitude</span><span class="p">()</span> <span class="c1">-- Another method</span> <span class="c1">-- Reference the implicit object using self</span> <span class="kr">return</span> <span class="nb">math.sqrt</span><span class="p">(</span><span class="n">self</span><span class="p">.</span><span class="n">x</span><span class="o">^</span><span class="mi">2</span> <span class="o">+</span> <span class="n">self</span><span class="p">.</span><span class="n">y</span><span class="o">^</span><span class="mi">2</span> <span class="o">+</span> <span class="n">self</span><span class="p">.</span><span class="n">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 class inheritance</span> <span class="kd">local</span> <span class="n">VectorMult</span> <span class="o">=</span> <span class="p">{}</span> <span class="n">VectorMult</span><span class="p">.</span><span class="n">__index</span> <span class="o">=</span> <span class="n">VectorMult</span> <span class="nb">setmetatable</span><span class="p">(</span><span class="n">VectorMult</span><span class="p">,</span> <span class="n">Vector</span><span class="p">)</span> <span class="c1">-- Make VectorMult a child of Vector</span> <span class="kr">function</span> <span class="nc">VectorMult</span><span class="p">:</span><span class="nf">multiply</span><span class="p">(</span><span class="n">value</span><span class="p">)</span> <span class="n">self</span><span class="p">.</span><span class="n">x</span> <span class="o">=</span> <span class="n">self</span><span class="p">.</span><span class="n">x</span> <span class="o">*</span> <span class="n">value</span> <span class="n">self</span><span class="p">.</span><span class="n">y</span> <span class="o">=</span> <span class="n">self</span><span class="p">.</span><span class="n">y</span> <span class="o">*</span> <span class="n">value</span> <span class="n">self</span><span class="p">.</span><span class="n">z</span> <span class="o">=</span> <span class="n">self</span><span class="p">.</span><span class="n">z</span> <span class="o">*</span> <span class="n">value</span> <span class="kr">return</span> <span class="n">self</span> <span class="kr">end</span> <span class="kd">local</span> <span class="n">vec</span> <span class="o">=</span> <span class="n">VectorMult</span><span class="p">:</span><span class="n">new</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> <span class="c1">-- Create a vector</span> <span class="nb">print</span><span class="p">(</span><span class="n">vec</span><span class="p">:</span><span class="n">magnitude</span><span class="p">())</span> <span class="c1">-- Call a method (output: 1)</span> <span class="nb">print</span><span class="p">(</span><span class="n">vec</span><span class="p">.</span><span class="n">y</span><span class="p">)</span> <span class="c1">-- Access a member variable (output: 1)</span> <span class="n">vec</span><span class="p">:</span><span class="n">multiply</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="c1">-- Multiply all components of vector by 2</span> <span class="nb">print</span><span class="p">(</span><span class="n">vec</span><span class="p">.</span><span class="n">y</span><span class="p">)</span> <span class="c1">-- Access member again (output: 2)</span> </pre> </div> <p>Lua also supports <a href="https://en-m-wikipedia-org.translate.goog/wiki/Multiple_inheritance?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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-16" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-16"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Operator_overloading?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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-17" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-17"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup></p> </section> <div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(3)"> <span class="indicator mf-icon mf-icon-expand mf-icon--small"></span> <h2 id="Implementation">Implementation</h2><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=10&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: Implementation" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <section class="mf-section-3 collapsible-block" id="mf-section-3"> <p>Lua programs are not <a href="https://en-m-wikipedia-org.translate.goog/wiki/Interpreter_(computing)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Interpreter (computing)">interpreted</a> directly from the textual Lua file, but are <a href="https://en-m-wikipedia-org.translate.goog/wiki/Compiler?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Compiler">compiled</a> into bytecode, which is then run on the Lua <a href="https://en-m-wikipedia-org.translate.goog/wiki/Virtual_machine?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Virtual machine">virtual machine</a> (VM). The compiling process is typically invisible to the user and is performed during <a href="https://en-m-wikipedia-org.translate.goog/wiki/Run_time_(program_lifecycle_phase)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Run time (program lifecycle phase)">run-time</a>, especially when a <a href="https://en-m-wikipedia-org.translate.goog/wiki/Just-in-time_compilation?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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_3-1" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-luaspe-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-luaabout_4-2" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-luaabout-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup></p> <p>Like most CPUs, and unlike most virtual machines (which are <a href="https://en-m-wikipedia-org.translate.goog/wiki/Stack_machine?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Stack machine">stack-based</a>), the Lua VM is <a href="https://en-m-wikipedia-org.translate.goog/wiki/Register_machine?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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_18-0" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-lua5impl-18"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Parrot_virtual_machine?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Parrot virtual machine">Parrot</a> and <a href="https://en-m-wikipedia-org.translate.goog/wiki/Android_(operating_system)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Android (operating system)">Android</a>'s <a href="https://en-m-wikipedia-org.translate.goog/wiki/Dalvik_(software)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Dalvik (software)">Dalvik</a> are two other well-known register-based VMs. PCScheme's VM was also register-based.<sup id="cite_ref-19" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-19"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup></p> <p>This example is the bytecode listing of the factorial function defined <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Factorial_example">above</a> (as shown by the <code>luac</code> 5.1 compiler):<sup id="cite_ref-luavm51instr_20-0" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-luavm51instr-20"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup></p> <pre>function <factorial.lua:1,7> (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> </section> <div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(4)"> <span class="indicator mf-icon mf-icon-expand mf-icon--small"></span> <h2 id="C_API">C API</h2><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=11&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: C API" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <section class="mf-section-4 collapsible-block" id="mf-section-4"> <p>Lua is intended to be embedded into other applications, and provides a <a href="https://en-m-wikipedia-org.translate.goog/wiki/C_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="C (programming language)">C</a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Application_Programming_Interface?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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_21-0" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-luarefman-21"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup> The Lua API's design eliminates the need for manual <a href="https://en-m-wikipedia-org.translate.goog/wiki/Reference_counting?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Reference counting">reference counting</a> (management) in C code, unlike <a href="https://en-m-wikipedia-org.translate.goog/wiki/Python_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="https://en-m-wikipedia-org.translate.goog/wiki/Preprocessor?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Preprocessor">preprocessor</a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Macro_(computer_science)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Macro (computer science)">macros</a> which assist with complex table operations.</p> <p>The Lua C API is <a href="https://en-m-wikipedia-org.translate.goog/wiki/Stack_(data_structure)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="https://en-m-wikipedia-org.translate.goog/wiki/Marshalling_(computer_science)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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"><stdio.h></span> <span class="cp">#include</span><span class="w"> </span><span class="cpf"><lua.h></span><span class="c1"> // Lua main library (lua_*)</span> <span class="cp">#include</span><span class="w"> </span><span class="cpf"><lauxlib.h></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_22-0" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-Changes_in_the_API,_Lua_5.2_manual-22"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup> is the globals table, <code>_G</code> from within Lua, which is the main <a href="https://en-m-wikipedia-org.translate.goog/wiki/Namespace?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=12&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: Modules" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>Besides standard library (core) modules it is possible to write extensions using the Lua API. Extension modules are <a href="https://en-m-wikipedia-org.translate.goog/wiki/Library_(computing)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#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_21-1" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-luarefman-21"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup> just like modules written in Lua itself, or with <code>package.loadlib</code>.<sup id="cite_ref-23" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-23"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup> When a C library is loaded via <a href="https://en-m-wikipedia-org.translate.goog/wiki/Foo?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="https://en-m-wikipedia-org.translate.goog/wiki/Package_management_system?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Package management system">package management system</a> named <a href="https://en-m-wikipedia-org.translate.goog/wiki/LuaRocks?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="LuaRocks">LuaRocks</a>,<sup id="cite_ref-24" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-24"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup> in the spirit of <a href="https://en-m-wikipedia-org.translate.goog/wiki/CPAN?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="CPAN">CPAN</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/RubyGems?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="RubyGems">RubyGems</a> and <a href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Python_eggs&action=edit&redlink=1&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="new" title="Python eggs (page does not exist)">Python eggs</a>. Prewritten Lua <a href="https://en-m-wikipedia-org.translate.goog/wiki/Language_binding?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Language binding">bindings</a> exist for most popular programming languages, including other scripting languages.<sup id="cite_ref-25" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-25"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup> For C++, there are a number of template-based approaches and some automatic binding generators.</p> </section> <div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(5)"> <span class="indicator mf-icon mf-icon-expand mf-icon--small"></span> <h2 id="Applications">Applications</h2><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=13&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: Applications" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <section class="mf-section-5 collapsible-block" id="mf-section-5"> <style data-mw-deduplicate="TemplateStyles:r1236090951">.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}}</style> <div role="note" class="hatnote navigation-not-searchable"> Main article: <a href="https://en-m-wikipedia-org.translate.goog/wiki/List_of_applications_using_Lua?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="List of applications using Lua">List of applications using Lua</a> </div> <p>In <a href="https://en-m-wikipedia-org.translate.goog/wiki/Video_game_development?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Video game development">video game development</a>, Lua is widely used as a <a href="https://en-m-wikipedia-org.translate.goog/wiki/Scripting_language?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Scripting language">scripting language</a>, mainly due to its perceived easiness to embed, fast execution, and short <a href="https://en-m-wikipedia-org.translate.goog/wiki/Learning_curve?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Learning curve">learning curve</a>.<sup id="cite_ref-26" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-26"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup> Notable games which use Lua include <i><a href="https://en-m-wikipedia-org.translate.goog/wiki/Roblox?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Roblox">Roblox</a></i>,<sup id="cite_ref-27" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-27"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup> <i><a href="https://en-m-wikipedia-org.translate.goog/wiki/Garry%27s_Mod?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Garry's Mod">Garry's Mod</a></i>, <i> <a href="https://en-m-wikipedia-org.translate.goog/wiki/World_of_Warcraft?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="World of Warcraft">World of Warcraft</a></i>, <i><a href="https://en-m-wikipedia-org.translate.goog/wiki/Payday_2?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Payday 2">Payday 2</a></i>, <i><a href="https://en-m-wikipedia-org.translate.goog/wiki/Phantasy_Star_Online_2?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Phantasy Star Online 2">Phantasy Star Online 2</a></i>, <i><a href="https://en-m-wikipedia-org.translate.goog/wiki/Dota_2?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Dota 2">Dota 2</a></i>, <i><a href="https://en-m-wikipedia-org.translate.goog/wiki/Crysis_(video_game)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Crysis (video game)">Crysis</a></i>,<sup id="cite_ref-28" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-28"><span class="cite-bracket">[</span>27<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="https://en-m-wikipedia-org.translate.goog/wiki/Minecraft?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Minecraft">Minecraft</a></i>. Also, Lua is used in non-video game software, such as <a href="https://en-m-wikipedia-org.translate.goog/wiki/Adobe_Lightroom?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Adobe Lightroom">Adobe Lightroom</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Moho_(software)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Moho (software)">Moho</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/IClone?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="IClone">iClone</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Aerospike_(database)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Aerospike (database)">Aerospike</a>, and some system software in <a href="https://en-m-wikipedia-org.translate.goog/wiki/FreeBSD?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="FreeBSD">FreeBSD</a> and <a href="https://en-m-wikipedia-org.translate.goog/wiki/NetBSD?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="NetBSD">NetBSD</a>, and used as a template scripting language on <a href="https://en-m-wikipedia-org.translate.goog/wiki/MediaWiki?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="MediaWiki">MediaWiki</a> using the Scribunto extension.<sup id="cite_ref-29" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-29"><span class="cite-bracket">[</span>28<span class="cite-bracket">]</span></a></sup></p> <p>In 2003, a poll conducted by GameDev.net showed Lua was the most popular scripting language for game programming.<sup id="cite_ref-30" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-30"><span class="cite-bracket">[</span>29<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="https://en-m-wikipedia-org.translate.goog/wiki/Game_Developer_(magazine)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Game Developer (magazine)">Game Developer</a></i> in the category Programming Tools.<sup id="cite_ref-31" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-31"><span class="cite-bracket">[</span>30<span class="cite-bracket">]</span></a></sup></p> <p>Many non-game applications also use Lua for extensibility, such as <a href="https://en-m-wikipedia-org.translate.goog/wiki/LuaTeX?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="LuaTeX">LuaTeX</a>, an implementation of the <a href="https://en-m-wikipedia-org.translate.goog/wiki/TeX?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="TeX">TeX</a> type-setting language, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Redis?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Redis">Redis</a>, a <a href="https://en-m-wikipedia-org.translate.goog/wiki/Key-value_database?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Key-value database">key-value database</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/ScyllaDB?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="ScyllaDB">ScyllaDB</a>, a <a href="https://en-m-wikipedia-org.translate.goog/wiki/Wide-column_store?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Wide-column store">wide-column store</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Neovim?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Neovim">Neovim</a>, a text editor, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Nginx?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Nginx">Nginx</a>, a <a href="https://en-m-wikipedia-org.translate.goog/wiki/Web_server?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Web server">web server</a>, and <a href="https://en-m-wikipedia-org.translate.goog/wiki/Wireshark?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Wireshark">Wireshark</a>, a network packet analyzer.</p> <p>Through the Scribunto extension, Lua is available as a server-side scripting language in the <a href="https://en-m-wikipedia-org.translate.goog/wiki/MediaWiki?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="MediaWiki">MediaWiki</a> software that runs <a href="https://en-m-wikipedia-org.translate.goog/wiki/Wikipedia?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Wikipedia">Wikipedia</a> and other wikis.<sup id="cite_ref-32" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-32"><span class="cite-bracket">[</span>31<span class="cite-bracket">]</span></a></sup> Among its uses are allowing the integration of data from <a href="https://en-m-wikipedia-org.translate.goog/wiki/Wikidata?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Wikidata">Wikidata</a> into articles,<sup id="cite_ref-33" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-33"><span class="cite-bracket">[</span>32<span class="cite-bracket">]</span></a></sup> and powering the <a href="https://en-m-wikipedia-org.translate.goog/wiki/Wikipedia:Automated_taxobox_system?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Wikipedia:Automated taxobox system">automated taxobox system</a>.</p> </section> <div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(6)"> <span class="indicator mf-icon mf-icon-expand mf-icon--small"></span> <h2 id="Derived_languages">Derived languages</h2><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=14&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: Derived languages" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <section class="mf-section-6 collapsible-block" id="mf-section-6"> <div class="mw-heading mw-heading3"> <h3 id="Languages_that_compile_to_Lua">Languages that compile to Lua</h3><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=15&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: Languages that compile to Lua" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <ul> <li>MoonScript is a <a href="https://en-m-wikipedia-org.translate.goog/wiki/Dynamic_programming_language?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Dynamic programming language">dynamic</a>, <a href="https://en-m-wikipedia-org.translate.goog/wiki/Whitespace_character?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Whitespace character">whitespace</a>-sensitive <a href="https://en-m-wikipedia-org.translate.goog/wiki/Scripting_language?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Scripting language">scripting language</a> inspired by <a href="https://en-m-wikipedia-org.translate.goog/wiki/CoffeeScript?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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="https://en-m-wikipedia-org.translate.goog/wiki/Line_break_(computing)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Line break (computing)">line breaks</a> and <a href="https://en-m-wikipedia-org.translate.goog/wiki/Indentation_style?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Indentation style">indentation style</a>.<sup id="cite_ref-34" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-34"><span class="cite-bracket">[</span>33<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-35" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-35"><span class="cite-bracket">[</span>34<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-:1_36-0" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-:1-36"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup> A notable use of MoonScript is the video game distribution website <a href="https://en-m-wikipedia-org.translate.goog/wiki/Itch.io?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Itch.io">Itch.io</a>.</li> <li><a href="https://en-m-wikipedia-org.translate.goog/wiki/Haxe?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Haxe">Haxe</a> supports compiling to some Lua targets, including Lua 5.1-5.3 and <a href="https://en-m-wikipedia-org.translate.goog/wiki/LuaJIT?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="LuaJIT">LuaJIT</a> 2.0 and 2.1.</li> <li>Fennel, a Lisp dialect that targets Lua.<sup id="cite_ref-:1_36-1" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-:1-36"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup></li> <li>Urn, a <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lisp_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Lisp (programming language)">Lisp</a> dialect built on Lua.<sup id="cite_ref-37" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-37"><span class="cite-bracket">[</span>36<span class="cite-bracket">]</span></a></sup></li> <li>Amulet, an <a href="https://en-m-wikipedia-org.translate.goog/wiki/ML_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="ML (programming language)">ML</a>-like <a href="https://en-m-wikipedia-org.translate.goog/wiki/Functional_programming?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Functional programming">functional programming</a> language, which compiler emits Lua files.<sup id="cite_ref-38" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#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><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=16&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: Dialects" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <ul> <li><a href="https://en-m-wikipedia-org.translate.goog/wiki/LuaJIT?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="LuaJIT">LuaJIT</a>, a just-in-time compiler of Lua 5.1.<sup id="cite_ref-39" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#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="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-40"><span class="cite-bracket">[</span>39<span class="cite-bracket">]</span></a></sup></li> <li><a href="https://en-m-wikipedia-org.translate.goog/wiki/Roblox?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Roblox_Studio" title="Roblox">Luau</a> developed by <a href="https://en-m-wikipedia-org.translate.goog/wiki/Roblox_Corporation?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Roblox Corporation">Roblox Corporation</a>, a derivative of Lua 5.1 with <a href="https://en-m-wikipedia-org.translate.goog/wiki/Gradual_typing?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Gradual typing">gradual typing</a>, additional features and a focus on performance.<sup id="cite_ref-41" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-41"><span class="cite-bracket">[</span>40<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-42" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-42"><span class="cite-bracket">[</span>41<span class="cite-bracket">]</span></a></sup></li> <li>Shine, a fork of <a href="https://en-m-wikipedia-org.translate.goog/wiki/LuaJIT?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="LuaJIT">LuaJIT</a> with many extensions, including a module system and a macro system.<sup id="cite_ref-43" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-43"><span class="cite-bracket">[</span>42<span class="cite-bracket">]</span></a></sup></li> <li>Glua, a modified version embedded into the game <a href="https://en-m-wikipedia-org.translate.goog/wiki/Garry%27s_Mod?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Garry's Mod">Garry's Mod</a> as its scripting language.<sup id="cite_ref-44" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-44"><span class="cite-bracket">[</span>43<span class="cite-bracket">]</span></a></sup></li> <li>Teal, a <a href="https://en-m-wikipedia-org.translate.goog/wiki/Type_system?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#Static_type_checking" title="Type system">statically typed</a> Lua dialect written in Lua.</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-45" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-45"><span class="cite-bracket">[</span>44<span class="cite-bracket">]</span></a></sup></p> </section> <div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(7)"> <span class="indicator mf-icon mf-icon-expand mf-icon--small"></span> <h2 id="See_also">See also</h2><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=17&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: See also" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <section class="mf-section-7 collapsible-block" id="mf-section-7"> <ul> <li><a href="https://en-m-wikipedia-org.translate.goog/wiki/Comparison_of_programming_languages?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Comparison of programming languages">Comparison of programming languages</a></li> </ul> </section> <div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(8)"> <span class="indicator mf-icon mf-icon-expand mf-icon--small"></span> <h2 id="Notes">Notes</h2><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=18&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: Notes" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <section class="mf-section-8 collapsible-block" id="mf-section-8"> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style> <div class="reflist reflist-lower-alpha"> <div class="mw-references-wrap"> <ol class="references"> <li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-11">^</a></b></span> <span class="reference-text">Syntactic sugar, a table construct or literal string following an identifier is a valid function call.<sup id="cite_ref-10" class="reference"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup></span></li> </ol> </div> </div> </section> <div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(9)"> <span class="indicator mf-icon mf-icon-expand mf-icon--small"></span> <h2 id="References">References</h2><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=19&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: References" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <section class="mf-section-9 collapsible-block" id="mf-section-9"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1239543626"> <div class="reflist"> <div class="mw-references-wrap mw-references-columns"> <ol class="references"> <li id="cite_note-wikidata-a856f141bd953b6aacf5a1724577abc3018cbce1-v18-1"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-wikidata-a856f141bd953b6aacf5a1724577abc3018cbce1-v18_1-0">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">.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("//upload.wikimedia.org/wikipedia/commons/6/65/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("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/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,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.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}}</style><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://groups.google.com/g/lua-l/c/dOrigcoQin8">"[ANN] Lua 5.4.7 now available"</a>. 25 June 2024<span class="reference-accessdate">. Retrieved <span class="nowrap">27 June</span> 2024</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=%5BANN%5D+Lua+5.4.7+now+available&rft.date=2024-06-25&rft_id=https%3A%2F%2Fgroups.google.com%2Fg%2Flua-l%2Fc%2FdOrigcoQin8&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-The_Ring_programming_language_and_other_languages-2"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-The_Ring_programming_language_and_other_languages_2-0">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRing_Team2017" class="citation web cs1">Ring Team (5 December 2017). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://web.archive.org/web/20181225175312/http://ring-lang.sourceforge.net/doc1.6/introduction.html%23ring-and-other-languages">"The Ring programming language and other languages"</a>. <i>ring-lang.net</i>. Archived from <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=http://ring-lang.sourceforge.net/doc1.6/introduction.html%23ring-and-other-languages">the original</a> on 25 December 2018<span class="reference-accessdate">. Retrieved <span class="nowrap">5 December</span> 2017</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=ring-lang.net&rft.atitle=The+Ring+programming+language+and+other+languages&rft.date=2017-12-05&rft.au=Ring+Team&rft_id=http%3A%2F%2Fring-lang.sourceforge.net%2Fdoc1.6%2Fintroduction.html%23ring-and-other-languages&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-luaspe-3"><span class="mw-cite-backlink">^ <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-luaspe_3-0"><sup><i><b>a</b></i></sup></a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-luaspe_3-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFIerusalimschyde_FigueiredoFilho1996" class="citation journal cs1">Ierusalimschy, Roberto; de Figueiredo, Luiz Henrique; Filho, Waldemar Celes (June 1996). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.lua.org/spe.html">"Lua—An Extensible Extension Language"</a>. <i>Software: Practice and Experience</i>. <b>26</b> (6): 635–652. <a href="https://en-m-wikipedia-org.translate.goog/wiki/Doi_(identifier)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://doi.org/10.1002%252F%2528SICI%25291097-024X%2528199606%252926%253A6%253C635%253A%253AAID-SPE26%253E3.0.CO%253B2-P">10.1002/(SICI)1097-024X(199606)26:6<635::AID-SPE26>3.0.CO;2-P</a>. <a href="https://en-m-wikipedia-org.translate.goog/wiki/S2CID_(identifier)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Software%3A+Practice+and+Experience&rft.atitle=Lua%E2%80%94An+Extensible+Extension+Language&rft.volume=26&rft.issue=6&rft.pages=635-652&rft.date=1996-06&rft_id=info%3Adoi%2F10.1002%2F%28SICI%291097-024X%28199606%2926%3A6%3C635%3A%3AAID-SPE26%3E3.0.CO%3B2-P&rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A61066194%23id-name%3DS2CID&rft.aulast=Ierusalimschy&rft.aufirst=Roberto&rft.au=de+Figueiredo%2C+Luiz+Henrique&rft.au=Filho%2C+Waldemar+Celes&rft_id=https%3A%2F%2Fwww.lua.org%2Fspe.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-luaabout-4"><span class="mw-cite-backlink">^ <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-luaabout_4-0"><sup><i><b>a</b></i></sup></a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-luaabout_4-1"><sup><i><b>b</b></i></sup></a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-luaabout_4-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.lua.org/about.html%23why">"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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=About+Lua&rft.pub=Lua.org&rft_id=https%3A%2F%2Fwww.lua.org%2Fabout.html%23why&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-5">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFTakhteyev2013" class="citation magazine cs1">Takhteyev, Yuri (21 April 2013). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.foreignaffairs.com/articles/139332/yuri-takhteyev/from-brazil-to-wikipedia?page%3D2">"From Brazil to Wikipedia"</a>. <i><a href="https://en-m-wikipedia-org.translate.goog/wiki/Foreign_Affairs?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Foreign+Affairs&rft.atitle=From+Brazil+to+Wikipedia&rft.date=2013-04-21&rft.aulast=Takhteyev&rft.aufirst=Yuri&rft_id=https%3A%2F%2Fwww.foreignaffairs.com%2Farticles%2F139332%2Fyuri-takhteyev%2Ffrom-brazil-to-wikipedia%3Fpage%3D2&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-hopl2007-6"><span class="mw-cite-backlink">^ <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-hopl2007_6-0"><sup><i><b>a</b></i></sup></a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-hopl2007_6-1"><sup><i><b>b</b></i></sup></a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-hopl2007_6-2"><sup><i><b>c</b></i></sup></a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-hopl2007_6-3"><sup><i><b>d</b></i></sup></a></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFIerusalimschyFigueiredoCeles2007" class="citation book cs1"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Roberto_Ierusalimschy?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Roberto Ierusalimschy">Ierusalimschy, R.</a>; Figueiredo, L. H.; Celes, W. (2007). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.acm.org/sigs/sigplan/hopl"><i>Proceedings of the third ACM SIGPLAN conference on History of programming languages</i></a>. pp. 2–1–2–26. <a href="https://en-m-wikipedia-org.translate.goog/wiki/Doi_(identifier)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://doi.org/10.1145%252F1238844.1238846">10.1145/1238844.1238846</a>. <a href="https://en-m-wikipedia-org.translate.goog/wiki/ISBN_(identifier)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Special:BookSources/978-1-59593-766-7?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Special:BookSources/978-1-59593-766-7"><bdi>978-1-59593-766-7</bdi></a>. <a href="https://en-m-wikipedia-org.translate.goog/wiki/S2CID_(identifier)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://api.semanticscholar.org/CorpusID:475143">475143</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.atitle=The+evolution+of+Lua&rft.btitle=Proceedings+of+the+third+ACM+SIGPLAN+conference+on+History+of+programming+languages&rft.pages=2-1-2-26&rft.date=2007&rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A475143%23id-name%3DS2CID&rft_id=info%3Adoi%2F10.1145%2F1238844.1238846&rft.isbn=978-1-59593-766-7&rft.aulast=Ierusalimschy&rft.aufirst=R.&rft.au=Figueiredo%2C+L.+H.&rft.au=Celes%2C+W.&rft_id=https%3A%2F%2Fwww.lua.org%2Fdoc%2Fhopl.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-luahist2001-7"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-luahist2001_7-0">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=The+evolution+of+an+extension+language%3A+a+history+of+Lua&rft.date=2001&rft_id=https%3A%2F%2Fwww.lua.org%2Fhistory.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span> </span></li> <li id="cite_note-ddj96-8"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-ddj96_8-0">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFFigueiredoIerusalimschyCeles1996" class="citation news cs1">Figueiredo, L. H.; Ierusalimschy, R.; Celes, W. (December 1996). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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. 21, no. 12. pp. 26–33.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Dr.+Dobb%27s+Journal&rft.atitle=Lua%3A+an+Extensible+Embedded+Language.+A+few+metamechanisms+replace+a+host+of+features&rft.volume=21&rft.issue=12&rft.pages=26-33&rft.date=1996-12&rft.aulast=Figueiredo&rft.aufirst=L.+H.&rft.au=Ierusalimschy%2C+R.&rft.au=Celes%2C+W.&rft_id=https%3A%2F%2Fwww.lua.org%2Fddj.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-9">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.lua.org/pil/1.html">"Programming in Lua : 1"</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Programming+in+Lua+%3A+1&rft_id=https%3A%2F%2Fwww.lua.org%2Fpil%2F1.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-10">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.lua.org/manual/5.0/manual.html%232.5.7">"Lua 5.0 Reference Manual, 2.5.7, Function Calls"</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Lua+5.0+Reference+Manual%2C+2.5.7%2C+Function+Calls&rft_id=https%3A%2F%2Fwww.lua.org%2Fmanual%2F5.0%2Fmanual.html%232.5.7&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-12">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.lua.org/manual/5.1/manual.html%232.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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Lua+5.1+Reference+Manual&rft.date=2014&rft_id=https%3A%2F%2Fwww.lua.org%2Fmanual%2F5.1%2Fmanual.html%232.3&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-13">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.lua.org/manual/5.1/manual.html%232.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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Lua+5.1+Reference+Manual&rft.date=2012&rft_id=https%3A%2F%2Fwww.lua.org%2Fmanual%2F5.1%2Fmanual.html%232.5.5&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-lobject_h_array-14"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-lobject_h_array_14-0">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.lua.org/source/5.1/lobject.h.html%23array">"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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Lua+5.1+Source+Code&rft.date=2006&rft_id=https%3A%2F%2Fwww.lua.org%2Fsource%2F5.1%2Flobject.h.html%23array&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-15">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRoberto_Ierusalimschy" class="citation book cs1">Roberto Ierusalimschy. <i>Programming in Lua, 4th Edition</i>. p. 165.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Programming+in+Lua%2C+4th+Edition&rft.pages=165&rft.au=Roberto+Ierusalimschy&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-16">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.lua.org/pil/16.3.html">"Programming in Lua : 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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Lua&rft.atitle=Programming+in+Lua+%3A+16.3&rft_id=https%3A%2F%2Fwww.lua.org%2Fpil%2F16.3.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-17">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=lua-users+wiki&rft.atitle=Metamethods+Tutorial&rft_id=http%3A%2F%2Flua-users.org%2Fwiki%2FMetamethodsTutorial&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-lua5impl-18"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-lua5impl_18-0">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFIerusalimschyFigueiredoCeles2005" class="citation journal cs1">Ierusalimschy, R.; Figueiredo, L. H.; Celes, W. (2005). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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): 1159–1176. <a href="https://en-m-wikipedia-org.translate.goog/wiki/Doi_(identifier)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://doi.org/10.3217%252Fjucs-011-07-1159">10.3217/jucs-011-07-1159</a></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=J.+Of+Universal+Comp.+Sci.&rft.atitle=The+implementation+of+Lua+5.0&rft.volume=11&rft.issue=7&rft.pages=1159-1176&rft.date=2005&rft_id=info%3Adoi%2F10.3217%2Fjucs-011-07-1159&rft.aulast=Ierusalimschy&rft.aufirst=R.&rft.au=Figueiredo%2C+L.+H.&rft.au=Celes%2C+W.&rft_id=http%3A%2F%2Fwww.jucs.org%2Fjucs_11_7%2Fthe_implementation_of_lua%2Fjucs_11_7_1159_1176_defigueiredo.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-19">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><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="https://en-m-wikipedia-org.translate.goog/wiki/ISBN_(identifier)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Special:BookSources/0-262-70040-9?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Special:BookSources/0-262-70040-9"><bdi>0-262-70040-9</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=PC+Scheme%3A+Users+Guide+and+Language+Reference+Manual%2C+Trade+Edition&rft.pub=MIP+Press&rft.date=1990&rft.isbn=0-262-70040-9&rft.au=Texas+Instruments&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-luavm51instr-20"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-luavm51instr_20-0">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFMan2006" class="citation web cs1">Man, Kein-Hong (2006). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=A+No-Frills+Introduction+to+Lua+5.1+VM+Instructions&rft.date=2006&rft.aulast=Man&rft.aufirst=Kein-Hong&rft_id=https%3A%2F%2Ftalk.pokitto.com%2Fuploads%2Fdefault%2Foriginal%2F2X%2F7%2F716c67a0b5b1636cbc4dc1fec232ca2536cb74d1.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-luarefman-21"><span class="mw-cite-backlink">^ <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-luarefman_21-0"><sup><i><b>a</b></i></sup></a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-luarefman_21-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Lua+5.2+Reference+Manual&rft.pub=Lua.org&rft_id=https%3A%2F%2Fwww.lua.org%2Fmanual%2F5.2%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-Changes_in_the_API,_Lua_5.2_manual-22"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-Changes_in_the_API,_Lua_5.2_manual_22-0">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><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://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.lua.org/manual/5.2/manual.html%238.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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Changes+in+the+API&rft.pub=Lua.org&rft.date=2011%2F2013&rft.aulast=Ierusalimschy&rft.aufirst=Roberto&rft.au=de+Figueiredo%2C+Luiz+Henrique&rft.au=Celes%2C+Waldemar&rft_id=https%3A%2F%2Fwww.lua.org%2Fmanual%2F5.2%2Fmanual.html%238.3&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span> <span class="cs1-visible-error citation-comment"><code class="cs1-code">{{<a href="https://en-m-wikipedia-org.translate.goog/wiki/Template:Cite_book?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Template:Cite book">cite book</a>}}</code>: </span><span class="cs1-visible-error citation-comment"><code class="cs1-code">|work=</code> ignored (<a href="https://en-m-wikipedia-org.translate.goog/wiki/Help:CS1_errors?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#periodical_ignored" title="Help:CS1 errors">help</a>)</span></span></li> <li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-23">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFIerusalimschyde_FigueiredoCeles" class="citation web cs1">Ierusalimschy, Roberto; de Figueiredo, Luiz Henrique; Celes, Waldemar. <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.lua.org/manual/5.4/manual.html%23pdf-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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Lua&rft.atitle=Lua+5.4+Reference+Manual&rft.aulast=Ierusalimschy&rft.aufirst=Roberto&rft.au=de+Figueiredo%2C+Luiz+Henrique&rft.au=Celes%2C+Waldemar&rft_id=https%3A%2F%2Fwww.lua.org%2Fmanual%2F5.4%2Fmanual.html%23pdf-package.loadlib&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-24"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-24">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=LuaRocks&rft.pub=luarocks.org&rft_id=https%3A%2F%2Fluarocks.org%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-25"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-25">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Binding+Code+To+Lua&rft.pub=Lua-users+wiki&rft_id=http%3A%2F%2Flua-users.org%2Fwiki%2FBindingCodeToLua&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-26"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-26">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Stack+Overflow&rft.atitle=Why+is+Lua+considered+a+game+language%3F&rft_id=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F38338%2Fwhy-is-lua-considered-a-game-language&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-27"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-27">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Luau&rft.atitle=Why+Luau%3F&rft_id=https%3A%2F%2Fluau-lang.org%2Fwhy.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-28"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-28">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://crymp.net/thread?id%3D347">"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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Introduction+to+Crysis+server-side+modding&rft_id=https%3A%2F%2Fcrymp.net%2Fthread%3Fid%3D347&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-29"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-29">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=wow.gamepedia.com&rft.atitle=Lua+Functions&rft_id=https%3A%2F%2Fwow.gamepedia.com%2FLua_functions&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-30"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-30">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://web.archive.org/web/20031207171619/http://gamedev.net/gdpolls/viewpoll.asp?ID%3D163">"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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Poll+Results&rft_id=https%3A%2F%2Fgamedev.net%2Fgdpolls%2Fviewpoll.asp%3FID%3D163&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span><span class="cs1-maint citation-comment"><code class="cs1-code">{{<a href="https://en-m-wikipedia-org.translate.goog/wiki/Template:Cite_web?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Template:Cite web">cite web</a>}}</code>: CS1 maint: bot: original URL status unknown (<a href="https://en-m-wikipedia-org.translate.goog/wiki/Category:CS1_maint:_bot:_original_URL_status_unknown?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Category:CS1 maint: bot: original URL status unknown">link</a>)</span></span></li> <li id="cite_note-31"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-31">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Front+Line+Award+Winners+Announced&rft_id=http%3A%2F%2Fwww.gdmag.com%2Fblog%2F2012%2F01%2Ffront-line-award-winners.php&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-32"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-32">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.mediawiki.org/wiki/Extension:Scribunto">"Extension:Scribunto - MediaWiki"</a>. <i>MediaWiki.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">21 February</span> 2019</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=MediaWiki.org&rft.atitle=Extension%3AScribunto+-+MediaWiki&rft_id=https%3A%2F%2Fwww.mediawiki.org%2Fwiki%2FExtension%3AScribunto&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-33"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-33">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.wikidata.org/wiki/Wikidata:Infobox_Tutorial">"Wikidata:Infobox Tutorial - Wikidata"</a>. <i>www.wikidata.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">21 December</span> 2018</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=www.wikidata.org&rft.atitle=Wikidata%3AInfobox+Tutorial+-+Wikidata&rft_id=https%3A%2F%2Fwww.wikidata.org%2Fwiki%2FWikidata%3AInfobox_Tutorial&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-34"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-34">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=moonscript.org&rft.atitle=Language+Guide+-+MoonScript+0.5.0&rft_id=https%3A%2F%2Fmoonscript.org%2Freference%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-35"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-35">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFleaf2020" class="citation web cs1">leaf (23 September 2020). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://github.com/leafo/moonscript">"leafo/moonscript"</a>. <i><a href="https://en-m-wikipedia-org.translate.goog/wiki/GitHub?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" 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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=GitHub&rft.atitle=leafo%2Fmoonscript&rft.date=2020-09-23&rft.au=leaf&rft_id=https%3A%2F%2Fgithub.com%2Fleafo%2Fmoonscript&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-:1-36"><span class="mw-cite-backlink">^ <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-:1_36-0"><sup><i><b>a</b></i></sup></a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-:1_36-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFGarzia" class="citation web cs1">Garzia, Andre Alves. <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=AndreGarzia.com&rft.atitle=Languages+that+compile+to+Lua&rft.aulast=Garzia&rft.aufirst=Andre+Alves&rft_id=https%3A%2F%2Fandregarzia.com%2F2020%2F06%2Flanguages-that-compile-to-lua.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-37"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-37">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=urn-lang.com&rft.atitle=Urn%3A+A+Lisp+implementation+for+Lua+%7C+Urn&rft_id=https%3A%2F%2Furn-lang.com%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-38"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-38">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=amulet.works&rft.atitle=Amulet+ML&rft_id=https%3A%2F%2Famulet.works%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-39"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-39">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://luajit.org/luajit.html">"LuaJIT"</a>. <i>LuaJIT</i>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=LuaJIT&rft.atitle=LuaJIT&rft_id=https%3A%2F%2Fluajit.org%2Fluajit.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-40"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-40">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://luajit.org/extensions.html">"Extensions"</a>. <i>LuaJIT</i>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=LuaJIT&rft.atitle=Extensions&rft_id=https%3A%2F%2Fluajit.org%2Fextensions.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-41"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-41">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Luau&rft.atitle=Why+Luau%3F&rft_id=https%3A%2F%2Fluau-lang.org%2Fwhy&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-42"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-42">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=http://ravilang.github.io/">"Ravi Programming Language"</a>. <i>GitHub</i>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=GitHub&rft.atitle=Ravi+Programming+Language&rft_id=http%3A%2F%2Fravilang.github.io%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-43"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-43">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFHundt2021" class="citation web cs1">Hundt, Richard (22 April 2021). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://github.com/richardhundt/shine">"richardhundt/shine"</a>. <i><a href="https://en-m-wikipedia-org.translate.goog/wiki/GitHub?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="GitHub">GitHub</a></i>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=GitHub&rft.atitle=richardhundt%2Fshine&rft.date=2021-04-22&rft.aulast=Hundt&rft.aufirst=Richard&rft_id=https%3A%2F%2Fgithub.com%2Frichardhundt%2Fshine&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-44"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-44">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://wiki.facepunch.com/gmod/">"Garry's Mod Wiki"</a>. <i>wiki.facepunch.com</i>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=wiki.facepunch.com&rft.atitle=Garry%27s+Mod+Wiki&rft_id=https%3A%2F%2Fwiki.facepunch.com%2Fgmod%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> <li id="cite_note-45"><span class="mw-cite-backlink"><b><a href="https://en-m-wikipedia-org.translate.goog/wiki/Lua_(programming_language)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB#cite_ref-45">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=lua-users.org&rft.atitle=Lua+Power+Patches&rft_id=http%3A%2F%2Flua-users.org%2Fwiki%2FLuaPowerPatches&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></span></li> </ol> </div> </div> </section> <div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(10)"> <span class="indicator mf-icon mf-icon-expand mf-icon--small"></span> <h2 id="Further_reading">Further reading</h2><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=20&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: Further reading" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <section class="mf-section-10 collapsible-block" id="mf-section-10"> <ul> <li> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFIerusalimschy2013" class="citation book cs1">Ierusalimschy, R. (2013). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.lua.org/pil/"><i>Programming in Lua</i></a> (3rd ed.). Lua.org. <a href="https://en-m-wikipedia-org.translate.goog/wiki/ISBN_(identifier)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Special:BookSources/978-85-903798-5-0?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Special:BookSources/978-85-903798-5-0"><bdi>978-85-903798-5-0</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Programming+in+Lua&rft.edition=3rd&rft.pub=Lua.org&rft.date=2013&rft.isbn=978-85-903798-5-0&rft.aulast=Ierusalimschy&rft.aufirst=R.&rft_id=https%3A%2F%2Fwww.lua.org%2Fpil%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span> (The 1st ed. is available <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.lua.org/pil/contents.html">online</a>.)</li> <li> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFGutschmidt2003" class="citation book cs1">Gutschmidt, T. (2003). <i>Game Programming with Python, Lua, and Ruby</i>. Course Technology PTR. <a href="https://en-m-wikipedia-org.translate.goog/wiki/ISBN_(identifier)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Special:BookSources/978-1-59200-077-7?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Special:BookSources/978-1-59200-077-7"><bdi>978-1-59200-077-7</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Game+Programming+with+Python%2C+Lua%2C+and+Ruby&rft.pub=Course+Technology+PTR&rft.date=2003&rft.isbn=978-1-59200-077-7&rft.aulast=Gutschmidt&rft.aufirst=T.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></li> <li> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFSchuytemaManyen2005" class="citation book cs1">Schuytema, P.; Manyen, M. (2005). <i>Game Development with Lua</i>. Charles River Media. <a href="https://en-m-wikipedia-org.translate.goog/wiki/ISBN_(identifier)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Special:BookSources/978-1-58450-404-7?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Special:BookSources/978-1-58450-404-7"><bdi>978-1-58450-404-7</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Game+Development+with+Lua&rft.pub=Charles+River+Media&rft.date=2005&rft.isbn=978-1-58450-404-7&rft.aulast=Schuytema&rft.aufirst=P.&rft.au=Manyen%2C+M.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></li> <li> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFJungBrown2007" class="citation book cs1">Jung, K.; Brown, A. (2007). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://web.archive.org/web/20180708015602/https://www.wrox.com/WileyCDA/WroxTitle/productCd-0470069171.html"><i>Beginning Lua Programming</i></a>. <a href="https://en-m-wikipedia-org.translate.goog/wiki/Wrox_Press?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Wrox Press">Wrox Press</a>. <a href="https://en-m-wikipedia-org.translate.goog/wiki/ISBN_(identifier)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Special:BookSources/978-0-470-06917-2?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Special:BookSources/978-0-470-06917-2"><bdi>978-0-470-06917-2</bdi></a>. Archived from <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Beginning+Lua+Programming&rft.pub=Wrox+Press&rft.date=2007&rft.isbn=978-0-470-06917-2&rft.aulast=Jung&rft.aufirst=K.&rft.au=Brown%2C+A.&rft_id=https%3A%2F%2Fwww.wrox.com%2FWileyCDA%2FWroxTitle%2FproductCd-0470069171.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></li> <li> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFFigueiredoCelesIerusalimschy2008" class="citation book cs1">Figueiredo, L. H.; Celes, W.; Ierusalimschy, R., eds. (2008). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.lua.org/gems/"><i>Lua Programming Gems</i></a>. Lua.org. <a href="https://en-m-wikipedia-org.translate.goog/wiki/ISBN_(identifier)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Special:BookSources/978-85-903798-4-3?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Special:BookSources/978-85-903798-4-3"><bdi>978-85-903798-4-3</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Lua+Programming+Gems&rft.pub=Lua.org&rft.date=2008&rft.isbn=978-85-903798-4-3&rft_id=https%3A%2F%2Fwww.lua.org%2Fgems%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></li> <li> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFTakhteyev2012" class="citation book cs1">Takhteyev, Yuri (2012). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://web.archive.org/web/20121102000628/http://codingplaces.net/"><i>Coding Places: Software Practice in a South American City</i></a>. <a href="https://en-m-wikipedia-org.translate.goog/wiki/The_MIT_Press?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="The MIT Press">The MIT Press</a>. <a href="https://en-m-wikipedia-org.translate.goog/wiki/ISBN_(identifier)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Special:BookSources/978-0-262-01807-4?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Special:BookSources/978-0-262-01807-4"><bdi>978-0-262-01807-4</bdi></a>. Archived from <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://codingplaces.net/">the original</a> on 2 November 2012.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Coding+Places%3A+Software+Practice+in+a+South+American+City&rft.pub=The+MIT+Press&rft.date=2012&rft.isbn=978-0-262-01807-4&rft.aulast=Takhteyev&rft.aufirst=Yuri&rft_id=https%3A%2F%2Fcodingplaces.net%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span> Chapters 6 and 7 are dedicated to Lua, while others look at software in Brazil more broadly.</li> <li> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFVarma2012" class="citation book cs1">Varma, Jayant (2012). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.amazon.com/exec/obidos/ASIN/1430246626/lua-docs-20"><i>Learn Lua for iOS Game Development</i></a>. <a href="https://en-m-wikipedia-org.translate.goog/wiki/Apress?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Apress">Apress</a>. <a href="https://en-m-wikipedia-org.translate.goog/wiki/ISBN_(identifier)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="https://en-m-wikipedia-org.translate.goog/wiki/Special:BookSources/978-1-4302-4662-6?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Special:BookSources/978-1-4302-4662-6"><bdi>978-1-4302-4662-6</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Learn+Lua+for+iOS+Game+Development&rft.pub=Apress&rft.date=2012&rft.isbn=978-1-4302-4662-6&rft.aulast=Varma&rft.aufirst=Jayant&rft_id=https%3A%2F%2Fwww.amazon.com%2Fexec%2Fobidos%2FASIN%2F1430246626%2Flua-docs-20&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></li> <li> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFMatheson,_Ash2003" class="citation web cs1">Matheson, Ash (29 April 2003). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=GameDev.net&rft.atitle=An+Introduction+to+Lua&rft.date=2003-04-29&rft.au=Matheson%2C+Ash&rft_id=https%3A%2F%2Fwww.gamedev.net%2Fpage%2Fresources%2F_%2Ftechnical%2Fgame-programming%2Fan-introduction-to-lua-r1932&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></li> <li> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFFieldhouse2006" class="citation web cs1">Fieldhouse, Keith (16 February 2006). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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="https://en-m-wikipedia-org.translate.goog/wiki/O%27Reilly_Media?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="O'Reilly Media">O'Reilly Media</a>. Archived from <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=ONLamp.com&rft.atitle=Introducing+Lua&rft.date=2006-02-16&rft.aulast=Fieldhouse&rft.aufirst=Keith&rft_id=http%3A%2F%2Fwww.onlamp.com%2Fpub%2Fa%2Fonlamp%2F2006%2F02%2F16%2Fintroducing-lua.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></li> <li> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFStreicher2006" class="citation web cs1">Streicher, Martin (28 April 2006). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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="https://en-m-wikipedia-org.translate.goog/wiki/IBM?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="IBM">IBM</a>. Archived from <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=developerWorks&rft.atitle=Embeddable+scripting+with+Lua&rft.date=2006-04-28&rft.aulast=Streicher&rft.aufirst=Martin&rft_id=https%3A%2F%2Fwww.ibm.com%2Fdeveloperworks%2Flinux%2Flibrary%2Fl-lua.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></li> <li> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFQuigley2007" class="citation journal cs1">Quigley, Joseph (1 June 2007). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.linuxjournal.com/article/9605">"A Look at Lua"</a>. <i><a href="https://en-m-wikipedia-org.translate.goog/wiki/Linux_Journal?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Linux Journal">Linux Journal</a></i>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Linux+Journal&rft.atitle=A+Look+at+Lua&rft.date=2007-06-01&rft.aulast=Quigley&rft.aufirst=Joseph&rft_id=https%3A%2F%2Fwww.linuxjournal.com%2Farticle%2F9605&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span></li> <li> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFHamilton2008" class="citation news cs1">Hamilton, Naomi (11 September 2008). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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="https://en-m-wikipedia-org.translate.goog/wiki/Computerworld?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Computerworld">Computerworld</a></i>. <a href="https://en-m-wikipedia-org.translate.goog/wiki/International_Data_Group?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="International Data Group">IDG</a>. Archived from <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=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&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Computerworld&rft.atitle=The+A-Z+of+Programming+Languages%3A+Lua&rft.date=2008-09-11&rft.aulast=Hamilton&rft.aufirst=Naomi&rft_id=https%3A%2F%2Fwww.computerworld.com.au%2Farticle%2F260022%2Fa-z_programming_languages_lua%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span> Interview with Roberto Ierusalimschy.</li> <li> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><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://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://doi.org/10.1145%252F1978862.1983083">"Passing a Language through the Eye of a Needle"</a>. <i><a href="https://en-m-wikipedia-org.translate.goog/wiki/ACM_Queue?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="ACM Queue">ACM Queue</a></i>. <b>9</b> (5): 20–29. <a href="https://en-m-wikipedia-org.translate.goog/wiki/Doi_(identifier)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://doi.org/10.1145%252F1978862.1983083">10.1145/1978862.1983083</a></span>. <a href="https://en-m-wikipedia-org.translate.goog/wiki/S2CID_(identifier)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://api.semanticscholar.org/CorpusID:19484689">19484689</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=ACM+Queue&rft.atitle=Passing+a+Language+through+the+Eye+of+a+Needle&rft.volume=9&rft.issue=5&rft.pages=20-29&rft.date=2011-05-12&rft_id=info%3Adoi%2F10.1145%2F1978862.1983083&rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A19484689%23id-name%3DS2CID&rft.aulast=Ierusalimschy&rft.aufirst=Roberto&rft.au=de+Figueiredo%2C+Luiz+Henrique&rft.au=Celes%2C+Waldemar&rft_id=https%3A%2F%2Fdoi.org%2F10.1145%252F1978862.1983083&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span> How the embeddability of Lua impacted its design.</li> <li> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFIerusalimschyde_FigueiredoCeles2018" class="citation journal cs1">Ierusalimschy, Roberto; de Figueiredo, Luiz Henrique; Celes, Waldemar (November 2018). <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://cacm.acm.org/magazines/2018/11/232214-a-look-at-the-design-of-lua">"A Look at the Design of Lua"</a>. <i><a href="https://en-m-wikipedia-org.translate.goog/wiki/Communications_of_the_ACM?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Communications of the ACM">Communications of the ACM</a></i>. <b>61</b> (11): 114–123. <a href="https://en-m-wikipedia-org.translate.goog/wiki/Doi_(identifier)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://doi.org/10.1145%252F3186277">10.1145/3186277</a>. <a href="https://en-m-wikipedia-org.translate.goog/wiki/S2CID_(identifier)?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://api.semanticscholar.org/CorpusID:53114923">53114923</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Communications+of+the+ACM&rft.atitle=A+Look+at+the+Design+of+Lua&rft.volume=61&rft.issue=11&rft.pages=114-123&rft.date=2018-11&rft_id=info%3Adoi%2F10.1145%2F3186277&rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A53114923%23id-name%3DS2CID&rft.aulast=Ierusalimschy&rft.aufirst=Roberto&rft.au=de+Figueiredo%2C+Luiz+Henrique&rft.au=Celes%2C+Waldemar&rft_id=https%3A%2F%2Fcacm.acm.org%2Fmagazines%2F2018%2F11%2F232214-a-look-at-the-design-of-lua&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALua+%28programming+language%29" class="Z3988"></span><sup class="noprint Inline-Template"><span style="white-space: nowrap;">[<i><a href="https://en-m-wikipedia-org.translate.goog/wiki/Wikipedia:Link_rot?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Wikipedia:Link rot"><span title=" Dead link tagged June 2020">permanent dead link</span></a></i><span style="visibility:hidden; color:transparent; padding-left:2px"></span>]</span></sup></li> <li><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.lua.org/papers.html">Lua papers and theses</a></li> </ul> </section> <div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(11)"> <span class="indicator mf-icon mf-icon-expand mf-icon--small"></span> <h2 id="External_links">External links</h2><span class="mw-editsection"> <a role="button" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=edit&section=21&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Edit section: External links" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <section class="mf-section-11 collapsible-block" id="mf-section-11"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1235681985"> <style data-mw-deduplicate="TemplateStyles:r1250146164">.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:217px;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:4px;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}}</style> <div role="navigation" aria-labelledby="sister-projects" class="side-box metadata side-box-right sister-box sistersitebox plainlinks"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1126788409"> <div class="side-box-abovebelow"><b>Lua</b> at Wikipedia's <a href="https://en-m-wikipedia-org.translate.goog/wiki/Wikipedia:Wikimedia_sister_projects?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Wikipedia:Wikimedia sister projects"><span id="sister-projects">sister projects</span></a> </div> <div class="side-box-flex"> <div class="side-box-text plainlist"> <ul> <li><span class="sister-logo"><span class="mw-valign-middle" typeof="mw:File"><span> <noscript> <img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/2/24/Wikinews-logo.svg/27px-Wikinews-logo.svg.png" decoding="async" width="27" height="15" class="mw-file-element" data-file-width="759" data-file-height="415"> </noscript><span class="lazy-image-placeholder" style="width: 27px;height: 15px;" data-src="//upload.wikimedia.org/wikipedia/commons/thumb/2/24/Wikinews-logo.svg/27px-Wikinews-logo.svg.png" data-alt="" data-width="27" data-height="15" data-srcset="//upload.wikimedia.org/wikipedia/commons/thumb/2/24/Wikinews-logo.svg/41px-Wikinews-logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/2/24/Wikinews-logo.svg/54px-Wikinews-logo.svg.png 2x" data-class="mw-file-element"> </span></span></span></span><span class="sister-link"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://en.wikinews.org/wiki/Special:Search/Lua_(programming_language)" class="extiw" title="n:Special:Search/Lua (programming language)">News</a> from Wikinews</span></li> <li><span class="sister-logo"><span class="mw-valign-middle" typeof="mw:File"><span> <noscript> <img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Wikibooks-logo.svg/27px-Wikibooks-logo.svg.png" decoding="async" width="27" height="27" class="mw-file-element" data-file-width="300" data-file-height="300"> </noscript><span class="lazy-image-placeholder" style="width: 27px;height: 27px;" data-src="//upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Wikibooks-logo.svg/27px-Wikibooks-logo.svg.png" data-alt="" data-width="27" data-height="27" data-srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Wikibooks-logo.svg/41px-Wikibooks-logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Wikibooks-logo.svg/54px-Wikibooks-logo.svg.png 2x" data-class="mw-file-element"> </span></span></span></span><span class="sister-link"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://en.wikibooks.org/wiki/Lua_Programming" class="extiw" title="b:Lua Programming">Textbooks</a> from Wikibooks</span></li> <li><span class="sister-logo"><span class="mw-valign-middle" typeof="mw:File"><span> <noscript> <img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Wikiversity_logo_2017.svg/27px-Wikiversity_logo_2017.svg.png" decoding="async" width="27" height="22" class="mw-file-element" data-file-width="626" data-file-height="512"> </noscript><span class="lazy-image-placeholder" style="width: 27px;height: 22px;" data-src="//upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Wikiversity_logo_2017.svg/27px-Wikiversity_logo_2017.svg.png" data-alt="" data-width="27" data-height="22" data-srcset="//upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Wikiversity_logo_2017.svg/41px-Wikiversity_logo_2017.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Wikiversity_logo_2017.svg/54px-Wikiversity_logo_2017.svg.png 2x" data-class="mw-file-element"> </span></span></span></span><span class="sister-link"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://en.wikiversity.org/wiki/Lua" class="extiw" title="v:Lua">Resources</a> from Wikiversity</span></li> </ul> </div> </div> </div> <ul> <li><span class="official-website"><span class="url"><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://lua.org">Official website</a></span></span> <span class="mw-valign-text-top" typeof="mw:File/Frameless"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://www.wikidata.org/wiki/Q207316%23P856" title="Edit this at Wikidata"> <noscript> <img alt="Edit this at Wikidata" src="//upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/10px-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"> </noscript><span class="lazy-image-placeholder" style="width: 10px;height: 10px;" data-src="//upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/10px-OOjs_UI_icon_edit-ltr-progressive.svg.png" data-alt="Edit this at Wikidata" data-width="10" data-height="10" data-srcset="//upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/15px-OOjs_UI_icon_edit-ltr-progressive.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/20px-OOjs_UI_icon_edit-ltr-progressive.svg.png 2x" data-class="mw-file-element"> </span></a></span></li> <li><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=http://lua-users.org/">Lua Users</a> <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://web.archive.org/web/20101216084624/http://lua-users.org/">Archived</a> 16 December 2010 at the <a href="https://en-m-wikipedia-org.translate.goog/wiki/Wayback_Machine?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Wayback Machine">Wayback Machine</a>, Community</li> <li><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://luaforum.com">Lua Forum</a> <a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://web.archive.org/web/20210928172635/https://www.luaforum.com/">Archived</a> 28 September 2021 at the <a href="https://en-m-wikipedia-org.translate.goog/wiki/Wayback_Machine?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Wayback Machine">Wayback Machine</a></li> <li><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://luadist.org">LuaDist</a></li> <li><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://luarocks.org/">Lua Rocks - Package manager</a></li> <li><a rel="nofollow" class="external text" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://web.archive.org/web/20070202005230/http://luaforge.net/">Projects in Lua</a></li> </ul> <div class="navbox-styles"> <style data-mw-deduplicate="TemplateStyles:r1129693374">.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:" · ";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 "}</style> <style data-mw-deduplicate="TemplateStyles:r1236075235">.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}.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}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.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}}</style> </div> <div class="navbox-styles"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236075235"> </div> <div class="navbox-styles"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236075235"> </div> <div class="navbox-styles"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236075235"> </div> <style data-mw-deduplicate="TemplateStyles:r1130092004">.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}</style> <div class="portal-bar noprint metadata noviewer portal-bar-bordered" role="navigation" aria-label="Portals"> <span class="portal-bar-header"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Wikipedia:Contents/Portals?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Wikipedia:Contents/Portals">Portals</a>:</span> <ul class="portal-bar-content"> <li class="portal-bar-item"><span class="nowrap"><span typeof="mw:File"><span> <noscript> <img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/3/31/Free_and_open-source_software_logo_%282009%29.svg/19px-Free_and_open-source_software_logo_%282009%29.svg.png" decoding="async" width="19" height="19" class="mw-file-element" data-file-width="512" data-file-height="512"> </noscript><span class="lazy-image-placeholder" style="width: 19px;height: 19px;" data-src="//upload.wikimedia.org/wikipedia/commons/thumb/3/31/Free_and_open-source_software_logo_%282009%29.svg/19px-Free_and_open-source_software_logo_%282009%29.svg.png" data-alt="" data-width="19" data-height="19" data-srcset="//upload.wikimedia.org/wikipedia/commons/thumb/3/31/Free_and_open-source_software_logo_%282009%29.svg/29px-Free_and_open-source_software_logo_%282009%29.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/3/31/Free_and_open-source_software_logo_%282009%29.svg/38px-Free_and_open-source_software_logo_%282009%29.svg.png 2x" data-class="mw-file-element"> </span></span></span> </span><a href="https://en-m-wikipedia-org.translate.goog/wiki/Portal:Free_and_open-source_software?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Portal:Free and open-source software">Free and open-source software</a></li> <li class="portal-bar-item"><span class="nowrap"><span typeof="mw:File"><a href="https://en-m-wikipedia-org.translate.goog/wiki/File:Octicons-terminal.svg?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" class="mw-file-description"> <noscript> <img alt="icon" src="//upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Octicons-terminal.svg/17px-Octicons-terminal.svg.png" decoding="async" width="17" height="19" class="mw-file-element" data-file-width="896" data-file-height="1024"> </noscript><span class="lazy-image-placeholder" style="width: 17px;height: 19px;" data-src="//upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Octicons-terminal.svg/17px-Octicons-terminal.svg.png" data-alt="icon" data-width="17" data-height="19" data-srcset="//upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Octicons-terminal.svg/25px-Octicons-terminal.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Octicons-terminal.svg/33px-Octicons-terminal.svg.png 2x" data-class="mw-file-element"> </span></a></span> </span><a href="https://en-m-wikipedia-org.translate.goog/wiki/Portal:Computer_programming?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB" title="Portal:Computer programming">Computer programming</a></li> </ul> </div><!-- NewPP limit report Parsed by mw‐web.codfw.main‐7fc47fc68d‐9mwzv Cached time: 20241128193212 Cache expiry: 188881 Reduced expiry: true Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 1.129 seconds Real time usage: 1.375 seconds Preprocessor visited node count: 5678/1000000 Post‐expand include size: 172146/2097152 bytes Template argument size: 11892/2097152 bytes Highest expansion depth: 21/100 Expensive parser function count: 55/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 256766/5000000 bytes Lua time usage: 0.725/10.000 seconds Lua memory usage: 30410463/52428800 bytes Number of Wikibase entities loaded: 1/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 1173.675 1 -total 24.61% 288.897 2 Template:Infobox 21.86% 256.620 1 Template:Infobox_programming_language 17.90% 210.038 2 Template:Reflist 14.21% 166.817 1 Template:Infobox_software/simple 13.19% 154.755 1 Template:Noexcerpt 11.68% 137.092 3 Template:Wikidata 11.56% 135.691 38 Template:Cite_web 10.85% 127.379 1 Template:Langx 10.14% 118.952 4 Template:Navbox --> <!-- Saved in parser cache with key enwiki:pcache:idhash:46150-0!canonical and timestamp 20241128193212 and revision id 1259656367. Rendering was triggered because: page-view --> </section> </div><!-- MobileFormatter took 0.035 seconds --><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --> <noscript> <img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1&useformat=mobile" alt="" width="1" height="1" style="border: none; position: absolute;"> </noscript> <div class="printfooter" data-nosnippet=""> Retrieved from "<a dir="ltr" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://en.wikipedia.org/w/index.php?title%3DLua_(programming_language)%26oldid%3D1259656367">https://en.wikipedia.org/w/index.php?title=Lua_(programming_language)&oldid=1259656367</a>" </div> </div> </div> <div class="post-content" id="page-secondary-actions"> </div> </main> <footer class="mw-footer minerva-footer" role="contentinfo"><a class="last-modified-bar" href="https://en-m-wikipedia-org.translate.goog/w/index.php?title=Lua_(programming_language)&action=history&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB"> <div class="post-content last-modified-bar__content"><span class="minerva-icon minerva-icon-size-medium minerva-icon--modified-history"></span> <span class="last-modified-bar__text modified-enhancement" data-user-name="Hedwig7s" data-user-gender="unknown" data-timestamp="1732616188"> <span>Last edited on 26 November 2024, at 10:16</span> </span> <span class="minerva-icon minerva-icon-size-small minerva-icon--expand"></span> </div></a> <div class="post-content footer-content"> <div id="mw-data-after-content"> <div class="read-more-container"></div> </div> <div id="p-lang"> <h4>Languages</h4> <section> <ul id="p-variants" class="minerva-languages"></ul> <ul class="minerva-languages"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://ar.wikipedia.org/wiki/%25D9%2584%25D9%2588%25D8%25A7_(%25D9%2584%25D8%25BA%25D8%25A9_%25D8%25A8%25D8%25B1%25D9%2585%25D8%25AC%25D8%25A9)" title="لوا (لغة برمجة) – Arabic" lang="ar" hreflang="ar" data-title="لوا (لغة برمجة)" data-language-autonym="العربية" data-language-local-name="Arabic" class="interlanguage-link-target"><span>العربية</span></a></li> <li class="interlanguage-link interwiki-az mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://az.wikipedia.org/wiki/Lua" title="Lua – Azerbaijani" lang="az" hreflang="az" data-title="Lua" data-language-autonym="Azərbaycanca" data-language-local-name="Azerbaijani" class="interlanguage-link-target"><span>Azərbaycanca</span></a></li> <li class="interlanguage-link interwiki-bn mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://bn.wikipedia.org/wiki/%25E0%25A6%25B2%25E0%25A7%2581%25E0%25A6%25AF%25E0%25A6%25BC%25E0%25A6%25BE_(%25E0%25A6%25AA%25E0%25A7%258D%25E0%25A6%25B0%25E0%25A7%258B%25E0%25A6%2597%25E0%25A7%258D%25E0%25A6%25B0%25E0%25A6%25BE%25E0%25A6%25AE%25E0%25A6%25BF%25E0%25A6%2582_%25E0%25A6%25AD%25E0%25A6%25BE%25E0%25A6%25B7%25E0%25A6%25BE)" title="লুয়া (প্রোগ্রামিং ভাষা) – Bangla" lang="bn" hreflang="bn" data-title="লুয়া (প্রোগ্রামিং ভাষা)" data-language-autonym="বাংলা" data-language-local-name="Bangla" class="interlanguage-link-target"><span>বাংলা</span></a></li> <li class="interlanguage-link interwiki-zh-min-nan mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://zh-min-nan.wikipedia.org/wiki/Lua" title="Lua – Minnan" lang="nan" hreflang="nan" data-title="Lua" data-language-autonym="閩南語 / Bân-lâm-gú" data-language-local-name="Minnan" class="interlanguage-link-target"><span>閩南語 / Bân-lâm-gú</span></a></li> <li class="interlanguage-link interwiki-be mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://be.wikipedia.org/wiki/Lua_(%25D0%25BC%25D0%25BE%25D0%25B2%25D0%25B0_%25D0%25BF%25D1%2580%25D0%25B0%25D0%25B3%25D1%2580%25D0%25B0%25D0%25BC%25D0%25B0%25D0%25B2%25D0%25B0%25D0%25BD%25D0%25BD%25D1%258F)" title="Lua (мова праграмавання) – Belarusian" lang="be" hreflang="be" data-title="Lua (мова праграмавання)" data-language-autonym="Беларуская" data-language-local-name="Belarusian" class="interlanguage-link-target"><span>Беларуская</span></a></li> <li class="interlanguage-link interwiki-be-x-old mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://be-tarask.wikipedia.org/wiki/Lua" title="Lua – Belarusian (Taraškievica orthography)" lang="be-tarask" hreflang="be-tarask" data-title="Lua" data-language-autonym="Беларуская (тарашкевіца)" data-language-local-name="Belarusian (Taraškievica orthography)" class="interlanguage-link-target"><span>Беларуская (тарашкевіца)</span></a></li> <li class="interlanguage-link interwiki-bg mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://bg.wikipedia.org/wiki/Lua" title="Lua – Bulgarian" lang="bg" hreflang="bg" data-title="Lua" data-language-autonym="Български" data-language-local-name="Bulgarian" class="interlanguage-link-target"><span>Български</span></a></li> <li class="interlanguage-link interwiki-bs mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://bs.wikipedia.org/wiki/Lua_(programski_jezik)" title="Lua (programski jezik) – Bosnian" lang="bs" hreflang="bs" data-title="Lua (programski jezik)" data-language-autonym="Bosanski" data-language-local-name="Bosnian" class="interlanguage-link-target"><span>Bosanski</span></a></li> <li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://ca.wikipedia.org/wiki/Lua" title="Lua – Catalan" lang="ca" hreflang="ca" data-title="Lua" data-language-autonym="Català" data-language-local-name="Catalan" class="interlanguage-link-target"><span>Català</span></a></li> <li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://cs.wikipedia.org/wiki/Lua" title="Lua – Czech" lang="cs" hreflang="cs" data-title="Lua" data-language-autonym="Čeština" data-language-local-name="Czech" class="interlanguage-link-target"><span>Čeština</span></a></li> <li class="interlanguage-link interwiki-da mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://da.wikipedia.org/wiki/Lua_(programmeringssprog)" title="Lua (programmeringssprog) – Danish" lang="da" hreflang="da" data-title="Lua (programmeringssprog)" data-language-autonym="Dansk" data-language-local-name="Danish" class="interlanguage-link-target"><span>Dansk</span></a></li> <li class="interlanguage-link interwiki-de mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://de.wikipedia.org/wiki/Lua" title="Lua – German" lang="de" hreflang="de" data-title="Lua" data-language-autonym="Deutsch" data-language-local-name="German" class="interlanguage-link-target"><span>Deutsch</span></a></li> <li class="interlanguage-link interwiki-et mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://et.wikipedia.org/wiki/Lua" title="Lua – Estonian" lang="et" hreflang="et" data-title="Lua" data-language-autonym="Eesti" data-language-local-name="Estonian" class="interlanguage-link-target"><span>Eesti</span></a></li> <li class="interlanguage-link interwiki-el mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://el.wikipedia.org/wiki/Lua" title="Lua – Greek" lang="el" hreflang="el" data-title="Lua" data-language-autonym="Ελληνικά" data-language-local-name="Greek" class="interlanguage-link-target"><span>Ελληνικά</span></a></li> <li class="interlanguage-link interwiki-es mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://es.wikipedia.org/wiki/Lua" title="Lua – Spanish" lang="es" hreflang="es" data-title="Lua" data-language-autonym="Español" data-language-local-name="Spanish" class="interlanguage-link-target"><span>Español</span></a></li> <li class="interlanguage-link interwiki-eo mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://eo.wikipedia.org/wiki/Lua" title="Lua – Esperanto" lang="eo" hreflang="eo" data-title="Lua" data-language-autonym="Esperanto" data-language-local-name="Esperanto" class="interlanguage-link-target"><span>Esperanto</span></a></li> <li class="interlanguage-link interwiki-eu mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://eu.wikipedia.org/wiki/Lua_(programazio_lengoaia)" title="Lua (programazio lengoaia) – Basque" lang="eu" hreflang="eu" data-title="Lua (programazio lengoaia)" data-language-autonym="Euskara" data-language-local-name="Basque" class="interlanguage-link-target"><span>Euskara</span></a></li> <li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://fa.wikipedia.org/wiki/%25D9%2584%25D9%2588%25D8%25A2_(%25D8%25B2%25D8%25A8%25D8%25A7%25D9%2586_%25D8%25A8%25D8%25B1%25D9%2586%25D8%25A7%25D9%2585%25D9%2587%25E2%2580%258C%25D9%2586%25D9%2588%25DB%258C%25D8%25B3%25DB%258C)" title="لوآ (زبان برنامهنویسی) – Persian" lang="fa" hreflang="fa" data-title="لوآ (زبان برنامهنویسی)" data-language-autonym="فارسی" data-language-local-name="Persian" class="interlanguage-link-target"><span>فارسی</span></a></li> <li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://fr.wikipedia.org/wiki/Lua" title="Lua – French" lang="fr" hreflang="fr" data-title="Lua" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li> <li class="interlanguage-link interwiki-gl mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://gl.wikipedia.org/wiki/Lua_(linguaxe_de_programaci%25C3%25B3n)" title="Lua (linguaxe de programación) – Galician" lang="gl" hreflang="gl" data-title="Lua (linguaxe de programación)" data-language-autonym="Galego" data-language-local-name="Galician" class="interlanguage-link-target"><span>Galego</span></a></li> <li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://ko.wikipedia.org/wiki/%25EB%25A3%25A8%25EC%2595%2584_(%25ED%2594%2584%25EB%25A1%259C%25EA%25B7%25B8%25EB%259E%2598%25EB%25B0%258D_%25EC%2596%25B8%25EC%2596%25B4)" title="루아 (프로그래밍 언어) – Korean" lang="ko" hreflang="ko" data-title="루아 (프로그래밍 언어)" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li> <li class="interlanguage-link interwiki-hy mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://hy.wikipedia.org/wiki/Lua_(%25D5%25AE%25D6%2580%25D5%25A1%25D5%25A3%25D6%2580%25D5%25A1%25D5%25BE%25D5%25B8%25D6%2580%25D5%25B4%25D5%25A1%25D5%25B6_%25D5%25AC%25D5%25A5%25D5%25A6%25D5%25B8%25D6%2582)" title="Lua (ծրագրավորման լեզու) – Armenian" lang="hy" hreflang="hy" data-title="Lua (ծրագրավորման լեզու)" data-language-autonym="Հայերեն" data-language-local-name="Armenian" class="interlanguage-link-target"><span>Հայերեն</span></a></li> <li class="interlanguage-link interwiki-hi mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://hi.wikipedia.org/wiki/%25E0%25A4%25B2%25E0%25A5%2581%25E0%25A4%2586_(%25E0%25A4%25AA%25E0%25A5%258D%25E0%25A4%25B0%25E0%25A5%258B%25E0%25A4%2597%25E0%25A5%258D%25E0%25A4%25B0%25E0%25A4%25BE%25E0%25A4%25AE%25E0%25A4%25A8_%25E0%25A4%25AD%25E0%25A4%25BE%25E0%25A4%25B7%25E0%25A4%25BE)" title="लुआ (प्रोग्रामन भाषा) – Hindi" lang="hi" hreflang="hi" data-title="लुआ (प्रोग्रामन भाषा)" data-language-autonym="हिन्दी" data-language-local-name="Hindi" class="interlanguage-link-target"><span>हिन्दी</span></a></li> <li class="interlanguage-link interwiki-hr mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://hr.wikipedia.org/wiki/Lua" title="Lua – Croatian" lang="hr" hreflang="hr" data-title="Lua" data-language-autonym="Hrvatski" data-language-local-name="Croatian" class="interlanguage-link-target"><span>Hrvatski</span></a></li> <li class="interlanguage-link interwiki-io mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://io.wikipedia.org/wiki/Lua_(programifo-linguo)" title="Lua (programifo-linguo) – Ido" lang="io" hreflang="io" data-title="Lua (programifo-linguo)" data-language-autonym="Ido" data-language-local-name="Ido" class="interlanguage-link-target"><span>Ido</span></a></li> <li class="interlanguage-link interwiki-id mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://id.wikipedia.org/wiki/Lua_(bahasa_pemrograman)" title="Lua (bahasa pemrograman) – Indonesian" lang="id" hreflang="id" data-title="Lua (bahasa pemrograman)" data-language-autonym="Bahasa Indonesia" data-language-local-name="Indonesian" class="interlanguage-link-target"><span>Bahasa Indonesia</span></a></li> <li class="interlanguage-link interwiki-ia mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://ia.wikipedia.org/wiki/Lua_(linguage_de_programmation)" title="Lua (linguage de programmation) – Interlingua" lang="ia" hreflang="ia" data-title="Lua (linguage de programmation)" data-language-autonym="Interlingua" data-language-local-name="Interlingua" class="interlanguage-link-target"><span>Interlingua</span></a></li> <li class="interlanguage-link interwiki-is mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://is.wikipedia.org/wiki/Lua_(forritunarm%25C3%25A1l)" title="Lua (forritunarmál) – Icelandic" lang="is" hreflang="is" data-title="Lua (forritunarmál)" data-language-autonym="Íslenska" data-language-local-name="Icelandic" class="interlanguage-link-target"><span>Íslenska</span></a></li> <li class="interlanguage-link interwiki-it mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://it.wikipedia.org/wiki/Lua" title="Lua – Italian" lang="it" hreflang="it" data-title="Lua" data-language-autonym="Italiano" data-language-local-name="Italian" class="interlanguage-link-target"><span>Italiano</span></a></li> <li class="interlanguage-link interwiki-he mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://he.wikipedia.org/wiki/%25D7%259C%25D7%2595%25D7%2590%25D7%2594_(%25D7%25A9%25D7%25A4%25D7%25AA_%25D7%25AA%25D7%259B%25D7%25A0%25D7%2595%25D7%25AA)" title="לואה (שפת תכנות) – Hebrew" lang="he" hreflang="he" data-title="לואה (שפת תכנות)" data-language-autonym="עברית" data-language-local-name="Hebrew" class="interlanguage-link-target"><span>עברית</span></a></li> <li class="interlanguage-link interwiki-ka mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://ka.wikipedia.org/wiki/%25E1%2583%259A%25E1%2583%25A3%25E1%2583%2590" title="ლუა – Georgian" lang="ka" hreflang="ka" data-title="ლუა" data-language-autonym="ქართული" data-language-local-name="Georgian" class="interlanguage-link-target"><span>ქართული</span></a></li> <li class="interlanguage-link interwiki-sw mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://sw.wikipedia.org/wiki/Lua" title="Lua – Swahili" lang="sw" hreflang="sw" data-title="Lua" data-language-autonym="Kiswahili" data-language-local-name="Swahili" class="interlanguage-link-target"><span>Kiswahili</span></a></li> <li class="interlanguage-link interwiki-la mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://la.wikipedia.org/wiki/Lua_(lingua_programmandi)" title="Lua (lingua programmandi) – Latin" lang="la" hreflang="la" data-title="Lua (lingua programmandi)" data-language-autonym="Latina" data-language-local-name="Latin" class="interlanguage-link-target"><span>Latina</span></a></li> <li class="interlanguage-link interwiki-lv mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://lv.wikipedia.org/wiki/Lua" title="Lua – Latvian" lang="lv" hreflang="lv" data-title="Lua" data-language-autonym="Latviešu" data-language-local-name="Latvian" class="interlanguage-link-target"><span>Latviešu</span></a></li> <li class="interlanguage-link interwiki-hu mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://hu.wikipedia.org/wiki/Lua_(programoz%25C3%25A1si_nyelv)" title="Lua (programozási nyelv) – Hungarian" lang="hu" hreflang="hu" data-title="Lua (programozási nyelv)" data-language-autonym="Magyar" data-language-local-name="Hungarian" class="interlanguage-link-target"><span>Magyar</span></a></li> <li class="interlanguage-link interwiki-ml mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://ml.wikipedia.org/wiki/%25E0%25B4%25B2%25E0%25B5%2582%25E0%25B4%2585_(%25E0%25B4%25AA%25E0%25B5%258D%25E0%25B4%25B0%25E0%25B5%258B%25E0%25B4%2597%25E0%25B5%258D%25E0%25B4%25B0%25E0%25B4%25BE%25E0%25B4%25AE%25E0%25B4%25BF%25E0%25B4%2582%25E0%25B4%2597%25E0%25B5%258D_%25E0%25B4%25AD%25E0%25B4%25BE%25E0%25B4%25B7)" title="ലൂഅ (പ്രോഗ്രാമിംഗ് ഭാഷ) – Malayalam" lang="ml" hreflang="ml" data-title="ലൂഅ (പ്രോഗ്രാമിംഗ് ഭാഷ)" data-language-autonym="മലയാളം" data-language-local-name="Malayalam" class="interlanguage-link-target"><span>മലയാളം</span></a></li> <li class="interlanguage-link interwiki-ms mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://ms.wikipedia.org/wiki/Lua_(bahasa_pengaturcaraan)" title="Lua (bahasa pengaturcaraan) – Malay" lang="ms" hreflang="ms" data-title="Lua (bahasa pengaturcaraan)" data-language-autonym="Bahasa Melayu" data-language-local-name="Malay" class="interlanguage-link-target"><span>Bahasa Melayu</span></a></li> <li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://nl.wikipedia.org/wiki/Lua_(programmeertaal)" title="Lua (programmeertaal) – Dutch" lang="nl" hreflang="nl" data-title="Lua (programmeertaal)" data-language-autonym="Nederlands" data-language-local-name="Dutch" class="interlanguage-link-target"><span>Nederlands</span></a></li> <li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://ja.wikipedia.org/wiki/Lua" title="Lua – Japanese" lang="ja" hreflang="ja" data-title="Lua" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li> <li class="interlanguage-link interwiki-no mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://no.wikipedia.org/wiki/Lua" title="Lua – Norwegian Bokmål" lang="nb" hreflang="nb" data-title="Lua" data-language-autonym="Norsk bokmål" data-language-local-name="Norwegian Bokmål" class="interlanguage-link-target"><span>Norsk bokmål</span></a></li> <li class="interlanguage-link interwiki-or mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://or.wikipedia.org/wiki/%25E0%25AC%25B2%25E0%25AD%2581%25E0%25AC%2586_(%25E0%25AC%25AA%25E0%25AD%258D%25E0%25AC%25B0%25E0%25AD%258B%25E0%25AC%2597%25E0%25AD%258D%25E0%25AC%25B0%25E0%25AC%25BE%25E0%25AC%25AE%25E0%25AC%25BF%25E0%25AC%2582_%25E0%25AC%25AD%25E0%25AC%25BE%25E0%25AC%25B7%25E0%25AC%25BE)" title="ଲୁଆ (ପ୍ରୋଗ୍ରାମିଂ ଭାଷା) – Odia" lang="or" hreflang="or" data-title="ଲୁଆ (ପ୍ରୋଗ୍ରାମିଂ ଭାଷା)" data-language-autonym="ଓଡ଼ିଆ" data-language-local-name="Odia" class="interlanguage-link-target"><span>ଓଡ଼ିଆ</span></a></li> <li class="interlanguage-link interwiki-pa mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://pa.wikipedia.org/wiki/%25E0%25A8%25B2%25E0%25A9%2582%25E0%25A8%2586_(%25E0%25A8%25AA%25E0%25A9%258D%25E0%25A8%25B0%25E0%25A9%258B%25E0%25A8%2597%25E0%25A8%25B0%25E0%25A8%25BE%25E0%25A8%25AE%25E0%25A8%25BF%25E0%25A9%25B0%25E0%25A8%2597_%25E0%25A8%25AD%25E0%25A8%25BE%25E0%25A8%25B8%25E0%25A8%25BC%25E0%25A8%25BE)" title="ਲੂਆ (ਪ੍ਰੋਗਰਾਮਿੰਗ ਭਾਸ਼ਾ) – Punjabi" lang="pa" hreflang="pa" data-title="ਲੂਆ (ਪ੍ਰੋਗਰਾਮਿੰਗ ਭਾਸ਼ਾ)" data-language-autonym="ਪੰਜਾਬੀ" data-language-local-name="Punjabi" class="interlanguage-link-target"><span>ਪੰਜਾਬੀ</span></a></li> <li class="interlanguage-link interwiki-pnb mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://pnb.wikipedia.org/wiki/%25D9%2584%25D9%2588%25D8%25A7_(%25D9%25BE%25D8%25B1%25D9%2588%25DA%25AF%25D8%25B1%25D8%25A7%25D9%2585%25D9%2586%25DA%25AF_%25D8%25B2%25D8%25A8%25D8%25A7%25D9%2586)" title="لوا (پروگرامنگ زبان) – Western Punjabi" lang="pnb" hreflang="pnb" data-title="لوا (پروگرامنگ زبان)" data-language-autonym="پنجابی" data-language-local-name="Western Punjabi" class="interlanguage-link-target"><span>پنجابی</span></a></li> <li class="interlanguage-link interwiki-km mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://km.wikipedia.org/wiki/%25E1%259E%2597%25E1%259E%25B6%25E1%259E%259F%25E1%259E%25B6%25E1%259E%2580%25E1%259E%2598%25E1%259F%2592%25E1%259E%2598%25E1%259E%259C%25E1%259E%25B7%25E1%259E%2592%25E1%259E%25B8_Lua" title="ភាសាកម្មវិធី Lua – Khmer" lang="km" hreflang="km" data-title="ភាសាកម្មវិធី Lua" data-language-autonym="ភាសាខ្មែរ" data-language-local-name="Khmer" class="interlanguage-link-target"><span>ភាសាខ្មែរ</span></a></li> <li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://pl.wikipedia.org/wiki/Lua" title="Lua – Polish" lang="pl" hreflang="pl" data-title="Lua" data-language-autonym="Polski" data-language-local-name="Polish" class="interlanguage-link-target"><span>Polski</span></a></li> <li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://pt.wikipedia.org/wiki/Lua_(linguagem_de_programa%25C3%25A7%25C3%25A3o)" title="Lua (linguagem de programação) – Portuguese" lang="pt" hreflang="pt" data-title="Lua (linguagem de programação)" data-language-autonym="Português" data-language-local-name="Portuguese" class="interlanguage-link-target"><span>Português</span></a></li> <li class="interlanguage-link interwiki-ro mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://ro.wikipedia.org/wiki/Lua_(limbaj_de_programare)" title="Lua (limbaj de programare) – Romanian" lang="ro" hreflang="ro" data-title="Lua (limbaj de programare)" data-language-autonym="Română" data-language-local-name="Romanian" class="interlanguage-link-target"><span>Română</span></a></li> <li class="interlanguage-link interwiki-qu mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://qu.wikipedia.org/wiki/Lua_(wakichiy_simi)" title="Lua (wakichiy simi) – Quechua" lang="qu" hreflang="qu" data-title="Lua (wakichiy simi)" data-language-autonym="Runa Simi" data-language-local-name="Quechua" class="interlanguage-link-target"><span>Runa Simi</span></a></li> <li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://ru.wikipedia.org/wiki/Lua" title="Lua – Russian" lang="ru" hreflang="ru" data-title="Lua" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li> <li class="interlanguage-link interwiki-sq mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://sq.wikipedia.org/wiki/Lua" title="Lua – Albanian" lang="sq" hreflang="sq" data-title="Lua" data-language-autonym="Shqip" data-language-local-name="Albanian" class="interlanguage-link-target"><span>Shqip</span></a></li> <li class="interlanguage-link interwiki-si mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://si.wikipedia.org/wiki/%25E0%25B6%25BD%25E0%25B7%2594%25E0%25B7%2580%25E0%25B7%258F_(%25E0%25B6%259A%25E0%25B7%258A%25E2%2580%258D%25E0%25B6%25BB%25E0%25B6%25B8%25E0%25B6%25BD%25E0%25B7%259A%25E0%25B6%259B%25E0%25B6%25B1_%25E0%25B6%25B7%25E0%25B7%258F%25E0%25B7%2582%25E0%25B7%258F%25E0%25B7%2580)" title="ලුවා (ක්රමලේඛන භාෂාව) – Sinhala" lang="si" hreflang="si" data-title="ලුවා (ක්රමලේඛන භාෂාව)" data-language-autonym="සිංහල" data-language-local-name="Sinhala" class="interlanguage-link-target"><span>සිංහල</span></a></li> <li class="interlanguage-link interwiki-simple mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://simple.wikipedia.org/wiki/Lua" title="Lua – Simple English" lang="en-simple" hreflang="en-simple" data-title="Lua" data-language-autonym="Simple English" data-language-local-name="Simple English" class="interlanguage-link-target"><span>Simple English</span></a></li> <li class="interlanguage-link interwiki-sk mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://sk.wikipedia.org/wiki/Lua" title="Lua – Slovak" lang="sk" hreflang="sk" data-title="Lua" data-language-autonym="Slovenčina" data-language-local-name="Slovak" class="interlanguage-link-target"><span>Slovenčina</span></a></li> <li class="interlanguage-link interwiki-sl mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://sl.wikipedia.org/wiki/Lua_(programski_jezik)" title="Lua (programski jezik) – Slovenian" lang="sl" hreflang="sl" data-title="Lua (programski jezik)" data-language-autonym="Slovenščina" data-language-local-name="Slovenian" class="interlanguage-link-target"><span>Slovenščina</span></a></li> <li class="interlanguage-link interwiki-so mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://so.wikipedia.org/wiki/Lua" title="Lua – Somali" lang="so" hreflang="so" data-title="Lua" data-language-autonym="Soomaaliga" data-language-local-name="Somali" class="interlanguage-link-target"><span>Soomaaliga</span></a></li> <li class="interlanguage-link interwiki-ckb mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://ckb.wikipedia.org/wiki/%25D9%2584%25D9%2588%25D8%25A7_(%25D8%25B2%25D9%2585%25D8%25A7%25D9%2586%25DB%258C_%25D9%25BE%25D8%25B1%25DB%2586%25DA%25AF%25D8%25B1%25D8%25A7%25D9%2585%25D8%25B3%25D8%25A7%25D8%25B2%25DB%258C)" title="لوا (زمانی پرۆگرامسازی) – Central Kurdish" lang="ckb" hreflang="ckb" data-title="لوا (زمانی پرۆگرامسازی)" data-language-autonym="کوردی" data-language-local-name="Central Kurdish" class="interlanguage-link-target"><span>کوردی</span></a></li> <li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://sr.wikipedia.org/wiki/Lua_(programski_jezik)" title="Lua (programski jezik) – Serbian" lang="sr" hreflang="sr" data-title="Lua (programski jezik)" data-language-autonym="Српски / srpski" data-language-local-name="Serbian" class="interlanguage-link-target"><span>Српски / srpski</span></a></li> <li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://fi.wikipedia.org/wiki/Lua" title="Lua – Finnish" lang="fi" hreflang="fi" data-title="Lua" data-language-autonym="Suomi" data-language-local-name="Finnish" class="interlanguage-link-target"><span>Suomi</span></a></li> <li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://sv.wikipedia.org/wiki/Lua" title="Lua – Swedish" lang="sv" hreflang="sv" data-title="Lua" data-language-autonym="Svenska" data-language-local-name="Swedish" class="interlanguage-link-target"><span>Svenska</span></a></li> <li class="interlanguage-link interwiki-ta mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://ta.wikipedia.org/wiki/%25E0%25AE%25B2%25E0%25AF%2582%25E0%25AE%25B5%25E0%25AE%25BE" title="லூவா – Tamil" lang="ta" hreflang="ta" data-title="லூவா" data-language-autonym="தமிழ்" data-language-local-name="Tamil" class="interlanguage-link-target"><span>தமிழ்</span></a></li> <li class="interlanguage-link interwiki-th mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://th.wikipedia.org/wiki/%25E0%25B8%25A0%25E0%25B8%25B2%25E0%25B8%25A9%25E0%25B8%25B2%25E0%25B8%25A5%25E0%25B8%25B9%25E0%25B8%25AD%25E0%25B8%25B2" title="ภาษาลูอา – Thai" lang="th" hreflang="th" data-title="ภาษาลูอา" data-language-autonym="ไทย" data-language-local-name="Thai" class="interlanguage-link-target"><span>ไทย</span></a></li> <li class="interlanguage-link interwiki-tg mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://tg.wikipedia.org/wiki/Lua" title="Lua – Tajik" lang="tg" hreflang="tg" data-title="Lua" data-language-autonym="Тоҷикӣ" data-language-local-name="Tajik" class="interlanguage-link-target"><span>Тоҷикӣ</span></a></li> <li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://tr.wikipedia.org/wiki/Lua" title="Lua – Turkish" lang="tr" hreflang="tr" data-title="Lua" data-language-autonym="Türkçe" data-language-local-name="Turkish" class="interlanguage-link-target"><span>Türkçe</span></a></li> <li class="interlanguage-link interwiki-udm mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://udm.wikipedia.org/wiki/Lua" title="Lua – Udmurt" lang="udm" hreflang="udm" data-title="Lua" data-language-autonym="Удмурт" data-language-local-name="Udmurt" class="interlanguage-link-target"><span>Удмурт</span></a></li> <li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://uk.wikipedia.org/wiki/Lua" title="Lua – Ukrainian" lang="uk" hreflang="uk" data-title="Lua" data-language-autonym="Українська" data-language-local-name="Ukrainian" class="interlanguage-link-target"><span>Українська</span></a></li> <li class="interlanguage-link interwiki-ur mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://ur.wikipedia.org/wiki/%25D9%2584%25D9%2588%25D8%25A7_(%25D9%25BE%25D8%25B1%25D9%2588%25DA%25AF%25D8%25B1%25D8%25A7%25D9%2585%25D9%2586%25DA%25AF_%25D8%25B2%25D8%25A8%25D8%25A7%25D9%2586)" title="لوا (پروگرامنگ زبان) – Urdu" lang="ur" hreflang="ur" data-title="لوا (پروگرامنگ زبان)" data-language-autonym="اردو" data-language-local-name="Urdu" class="interlanguage-link-target"><span>اردو</span></a></li> <li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://vi.wikipedia.org/wiki/Lua" title="Lua – Vietnamese" lang="vi" hreflang="vi" data-title="Lua" data-language-autonym="Tiếng Việt" data-language-local-name="Vietnamese" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li> <li class="interlanguage-link interwiki-wuu mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://wuu.wikipedia.org/wiki/Lua" title="Lua – Wu" lang="wuu" hreflang="wuu" data-title="Lua" data-language-autonym="吴语" data-language-local-name="Wu" class="interlanguage-link-target"><span>吴语</span></a></li> <li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://zh-yue.wikipedia.org/wiki/Lua" title="Lua – Cantonese" lang="yue" hreflang="yue" data-title="Lua" data-language-autonym="粵語" data-language-local-name="Cantonese" class="interlanguage-link-target"><span>粵語</span></a></li> <li class="interlanguage-link interwiki-diq mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://diq.wikipedia.org/wiki/Lua" title="Lua – Zazaki" lang="diq" hreflang="diq" data-title="Lua" data-language-autonym="Zazaki" data-language-local-name="Zazaki" class="interlanguage-link-target"><span>Zazaki</span></a></li> <li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://zh.wikipedia.org/wiki/Lua" title="Lua – Chinese" lang="zh" hreflang="zh" data-title="Lua" data-language-autonym="中文" data-language-local-name="Chinese" class="interlanguage-link-target"><span>中文</span></a></li> </ul> </section> </div> <div class="minerva-footer-logo"> <img src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" alt="Wikipedia" width="120" height="18" style="width: 7.5em; height: 1.125em;"> </div> <ul id="footer-info" class="footer-info hlist hlist-separated"> <li id="footer-info-lastmod">This page was last edited on 26 November 2024, at 10:16<span class="anonymous-show"> (UTC)</span>.</li> <li id="footer-info-copyright">Content is available under <a class="external" rel="nofollow" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://creativecommons.org/licenses/by-sa/4.0/deed.en">CC BY-SA 4.0</a> unless otherwise noted.</li> </ul> <ul id="footer-places" class="footer-places hlist hlist-separated"> <li id="footer-places-privacy"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Wikipedia:About?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="https://en-m-wikipedia-org.translate.goog/wiki/Wikipedia:General_disclaimer?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB">Disclaimers</a></li> <li id="footer-places-contact"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://stats.wikimedia.org/%23/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-terms-use"><a href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://foundation.m.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">Terms of Use</a></li> <li id="footer-places-desktop-toggle"><a id="mw-mf-display-toggle" href="https://translate.google.com/website?sl=auto&tl=en&hl=en-GB&u=https://en.wikipedia.org/w/index.php?title%3DLua_(programming_language)%26mobileaction%3Dtoggle_view_desktop" data-event-name="switch_to_desktop">Desktop</a></li> </ul> </div> </footer> </div> </div> <div class="mw-notification-area" data-mw="interface"></div><!-- v:8.3.1 --> <script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-78f4c97c5d-jhg65","wgBackendResponseTime":245,"wgPageParseReport":{"limitreport":{"cputime":"1.129","walltime":"1.375","ppvisitednodes":{"value":5678,"limit":1000000},"postexpandincludesize":{"value":172146,"limit":2097152},"templateargumentsize":{"value":11892,"limit":2097152},"expansiondepth":{"value":21,"limit":100},"expensivefunctioncount":{"value":55,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":256766,"limit":5000000},"entityaccesscount":{"value":1,"limit":400},"timingprofile":["100.00% 1173.675 1 -total"," 24.61% 288.897 2 Template:Infobox"," 21.86% 256.620 1 Template:Infobox_programming_language"," 17.90% 210.038 2 Template:Reflist"," 14.21% 166.817 1 Template:Infobox_software/simple"," 13.19% 154.755 1 Template:Noexcerpt"," 11.68% 137.092 3 Template:Wikidata"," 11.56% 135.691 38 Template:Cite_web"," 10.85% 127.379 1 Template:Langx"," 10.14% 118.952 4 Template:Navbox"]},"scribunto":{"limitreport-timeusage":{"value":"0.725","limit":"10.000"},"limitreport-memusage":{"value":30410463,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-7fc47fc68d-9mwzv","timestamp":"20241128193212","ttl":188881,"transientcontent":true}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Lua (programming language)","url":"https:\/\/en.wikipedia.org\/wiki\/Lua_(programming_language)","sameAs":"http:\/\/www.wikidata.org\/entity\/Q207316","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q207316","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2002-03-27T06:57:17Z","dateModified":"2024-11-26T10:16:28Z","image":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/c\/cf\/Lua-Logo.svg","headline":"lightweight programming language"}</script> <script>(window.NORLQ=window.NORLQ||[]).push(function(){var ns,i,p,img;ns=document.getElementsByTagName('noscript');for(i=0;i<ns.length;i++){p=ns[i].nextSibling;if(p&&p.className&&p.className.indexOf('lazy-image-placeholder')>-1){img=document.createElement('img');img.setAttribute('src',p.getAttribute('data-src'));img.setAttribute('width',p.getAttribute('data-width'));img.setAttribute('height',p.getAttribute('data-height'));img.setAttribute('alt',p.getAttribute('data-alt'));p.parentNode.replaceChild(img,p);}}});</script> <script>function gtElInit() {var lib = new google.translate.TranslateService();lib.translatePage('en', 'en', function () {});}</script> <script src="https://translate.google.com/translate_a/element.js?cb=gtElInit&hl=en-GB&client=wt" type="text/javascript"></script> </body> </html>