Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Lua

From Simple English Wikipedia, the free encyclopedia
Lua
ParadigmMulti-paradigm:scripting,imperative (procedural, prototype-based,object-oriented),functional
Designed byRoberto Ierusalimschy[1]
Waldemar Celes[1]
Luiz Henrique de Figueiredo[1]
First appeared1993[2]
Stable release5.4.7[3] Edit this on Wikidata / 25 June 2024; 8 months ago (25 June 2024)
Typing disciplinedynamic, strong,duck
Implementation languageANSI C
OSCross-platform
LicenseMIT License[4]
Websitewww.lua.org
Majorimplementations
Lua,LuaJIT,LLVM-Lua,Lua AlchemyLuvit
Dialects
Metalua,Idle,GSL ShellLuau
Influenced by
C++, CLU, Modula,Scheme, SNOBOL
Influenced
Io, GameMonkey, Squirrel, Falcon, MiniD

Lua is anopen sourceprogramming language.[2] It was created in1993 by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes.[1] Lua is used for many different things, especially invideo games such asWorld of Warcraft,SimCity 4 andTransformice.[5] It is also used in the popular virtual world sharing websiteRoblox under a dialect called Luau.[6] In June 2010,Apple Inc. changed the terms of use for thesoftware development kit of itsiOSoperating system to allow the use of Lua.[7] This led to Lua being used to makeiPhoneapplications such asAngry Birds. In June 2011, Lua was ranked the tenth mostpopular programming language by the TIOBE Index.[8]

History

[change |change source]

Lua was created in 1993 by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes. They are members of the Computers Graphics Technology Group (Tecgraf) at the Pontifical Catholic University of Rio de Janerio.

From 1977 until 1992, Brazil had strong trade barriers for computer hardware and software; these barriers were called a market reserve. At the time, clients of Tecgraf could not afford software from abroad. They would have to go through a complicated process to prove their needs could not be met by Brazilian companies. This caused Tecgraf to implement its needed tools from scratch.[9][10]

Lua followed SOL (Simple Object Language) and DEL (data-entry language). They are computer languages that described and managed data. They had been independently developed at Tecgraf for two different projects. These projects were for engineering applications for the Petrobras company. Petrobras later wanted more power in SOL and DEL. They lacked functions to control flow.

Lua’s syntax for control flow was mostly borrowed from Modula. It also taken influence from other programming languages: CLU for multiple inputs and outputs from calling functions,C++ for local variables, and SNOBAL and AWK for associative arrays.LISP andScheme also influenced the focus on tables. These two languages used a single structure mechanism.[11]

Examples

[change |change source]

An exampleHello World program in Lua:

-- !/usr/bin/luaprint("Hello World!")

An example of setting a value, then printing it:

--!/usr/bin/luaa="Hello World!"print(a)

An example of a function, then using it:

--!/usr/bin/lualocalfunctionTestFunction()print("Hello World!")endTestFunction()

An example of a loop that prints each entry in the list in order:

--!/usr/bin/lualocallist={"Hey","my","name","is","Dan"}fori,vinpairs(list)doprint(v)end

References

[change |change source]
  1. 1.01.11.21.3Ierusalimschy, R.; Figueiredo, L. H.; Celes, W. (2007)."The evolution of Lua"(PDF).Proc. of ACM HOPL III. pp. 2–1–2–26.doi:10.1145/1238844.1238846.ISBN 978-1-59593-766-7.S2CID 475143.
  2. 2.02.1"Lua: About".Lua.org. Retrieved28 February 2011.
  3. "[ANN] Lua 5.4.7 now available". 25 June 2024. Retrieved27 June 2024.
  4. "Lua: license".Lua.org. Retrieved6 April 2011.
  5. "Lua Uses".lua-users wiki. Archived fromthe original on 24 November 2010. Retrieved16 February 2011.
  6. "Luau".Luau. Archived fromthe original on 2021-04-08. Retrieved2021-04-07.
  7. "Apple relaxes iOS SDK terms to allow Lua but block Flash".Appleinsider.com. 11 June 2010. Retrieved11 June 2011.
  8. "TIOBE Programming Community Index for June 2011". TIOBE Software. June 2011. Archived fromthe original on 2 July 2013. Retrieved11 June 2011.
  9. "The evolution of an extension language: a history of Lua". 2001. Retrieved2008-12-18.
  10. Ierusalimschy, R.; Figueiredo, L. H.; Celes, W. (2007)."The evolution of Lua"(PDF).Proceedings of the third ACM SIGPLAN conference on History of programming languages. pp. 2–1–2–26.doi:10.1145/1238844.1238846.ISBN 978-1-59593-766-7.S2CID 475143.[dead link]
  11. Figueiredo, L. H.; Ierusalimschy, R.; Celes, W. (December 1996)."Lua: an Extensible Embedded Language. A few metamechanisms replace a host of features".Dr. Dobb's Journal. Vol. 21, no. 12. pp. 26–33.

Other websites

[change |change source]


Thisshort article abouttechnology can be made longer. You can help Wikipedia byadding to it.
Retrieved from "https://simple.wikipedia.org/w/index.php?title=Lua&oldid=9416709"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp