summaryrefslogtreecommitdiff
path: root/doc/readme.html
diff options
context:
space:
mode:
authorLua Team <team@lua.org>2010-07-31 12:00:00 +0000
committerrepogen <>2010-07-31 12:00:00 +0000
commit90ac6291217c36341e777586e49968d4a914a32a (patch)
treeca7b024dd1f05e7bf3fdc45cdcb5b7cc3c62c769 /doc/readme.html
parentf970e1e83ed07bbcf8a20fc1a95f91a0a2aae620 (diff)
downloadlua-github-90ac6291217c36341e777586e49968d4a914a32a.tar.gz
Lua 5.2.0-work45.2.0-work4
Diffstat (limited to 'doc/readme.html')
-rw-r--r--doc/readme.html184
1 files changed, 84 insertions, 100 deletions
diff --git a/doc/readme.html b/doc/readme.html
index 076dd81f..9284427d 100644
--- a/doc/readme.html
+++ b/doc/readme.html
@@ -13,27 +13,12 @@ blockquote, .display {
margin-left: 0px ;
}
-.external {
- padding-right: 15px;
- background: transparent url(external.png) no-repeat center right;
-}
-
tt, kbd, code {
font-size: 120% ;
xcolor: black ;
xpadding: 4px ;
xbackground-color: #E0E0E0 ;
}
-
-kbd {
- color: black ;
- background-color: #E8E8E8 ;
-}
-
-.review {
- color: red ;
-}
-
</STYLE>
</HEAD>
@@ -42,14 +27,15 @@ kbd {
<HR>
<H1>
<A HREF="http://www.lua.org/"><IMG SRC="logo.gif" ALT="Lua" BORDER=0></A>
-Welcome to Lua 5.2
+Welcome to Lua 5.2 (work4)
</H1>
-<IMG SRC="alert.png" ALIGN="absbottom">
+<P>
+<IMG SRC="alert.png" ALIGN="absbottom" ALT="[!]">
<EM>This is a work version of Lua 5.2.
Everything may change in the final version.</EM>
-<P>
+<P>
<A HREF="#about">about</A>
&middot;
<A HREF="#install">installation</A>
@@ -60,10 +46,10 @@ Everything may change in the final version.</EM>
&middot;
<A HREF="contents.html">reference manual</A>
<HR>
-<P>
<H2><A NAME="about">About Lua</A></H2>
+<P>
Lua is a powerful, fast, lightweight, embeddable scripting language
developed by a
<A HREF="http://www.lua.org/authors.html">team</A>
@@ -73,8 +59,8 @@ the Pontifical Catholic University of Rio de Janeiro in Brazil.
Lua is
<A HREF="#license">free software</A>
used in many products and projects around the world.
-<P>
+<P>
Lua's
<A HREF="http://www.lua.org/">official web site</A>
provides complete information
@@ -90,36 +76,53 @@ especially the
which may differ slightly from the
<A HREF="contents.html">local copy</A>
distributed in this package.
-<P>
<H2><A NAME="install">Installing Lua</A></H2>
-Lua is distributed in source form.
+<P>
+Lua is distributed in
+<A HREF="ftp/">source</A>
+form.
You need to build it before using it.
-This should be straightforward
+Building Lua should be straightforward
because
Lua is implemented in pure ANSI C, and compiles unmodified in all known
platforms that have an ANSI C compiler.
Lua also compiles unmodified as C++.
-<P>
+<P>
The instructions below are for Unix-like platforms.
There are also
<A HREF="#other">instructions for other systems</A>.
See below for
<A HREF="#customization">customization options</A>.
+
<P>
+If you don't have the time or the inclination to compile Lua yourself,
+get a binary from
+<A HREF="http://lua-users.org/wiki/LuaBinaries">LuaBinaries</A>.
+Try also
+<A HREF="http://luaforwindows.luaforge.net/">Lua for Windows</A>,
+an easy-to-use distribution of Lua that includes many useful libraries.
+
+<!--
+<P>
+If you only want to try Lua,
+try the
+<A HREF="demo.html">live demo</A>.
+<P>
+-->
<H3>Building Lua</H3>
+<P>
In most Unix-like platforms, simply do "<KBD>make</KBD>" with a suitable target.
Here are the details.
-<P>
<OL>
<LI>
Open a terminal window and move to
-the top-level directory, which is named lua-5.2.
+the top-level directory, which is named lua-5.2.0.
The Makefile there controls both the build process and the installation process.
<P>
<LI>
@@ -143,29 +146,31 @@ luac (the compiler),
and liblua.a (the library).
<P>
<LI>
- If you want to check that Lua has been built correctly, do "<KBD>make test</KBD>"
- after building Lua. This will run the interpreter on a "hello world"
+ To check that Lua has been built correctly, do "<KBD>make test</KBD>"
+ after building Lua. This will run the interpreter on a simple "Hello world"
Lua program from the test directory.
You may want to try other example programs in that directory.
</OL>
-<P>
<H3>Installing Lua</H3>
+<P>
Once you have built Lua, you may want to install it in an official
place in your system. In this case, do "<KBD>make install</KBD>". The official
place and the way to install files are defined in Makefile. You'll
probably need the right permissions to install files.
-<P>
- If you want to build and install Lua in one step, do "<KBD>make xxx install</KBD>",
- where xxx is your platform name.
<P>
+ To build and install Lua in one step, do "<KBD>make xxx install</KBD>",
+ where xxx is your platform name.
- If you want to install Lua locally, then do "<KBD>make local</KBD>".
+<P>
+ To install Lua locally, then do "<KBD>make local</KBD>".
This will create a directory <TT>install</TT> with subdirectories
<TT>bin</TT>, <TT>include</TT>, <TT>lib</TT>, <TT>man</TT>,
- and install Lua there as follows:
-<P>
+ and install Lua as listed below.
+
+ To install Lua locally, but in some other directory, do
+ "<KBD>make install INSTALL_TOP=xxx</KBD>", where xxx is your chosen directory.
<DL CLASS="display">
<DT>
@@ -186,52 +191,48 @@ and liblua.a (the library).
lua.1 luac.1
</DL>
- These are the only directories you need for development.
-<P>
-
- There are man pages for
- <A HREF="lua.html">lua</A> and
- <A HREF="luac.html">luac</A>, in both nroff and html, and a
- <A HREF="contents.html">reference manual</A> in html in doc, some sample code in test, and some
- useful stuff in etc. You don't need these directories for development.
-<P>
-
- If you want to install Lua locally, but in some other directory, do
- "<KBD>make install INSTALL_TOP=xxx</KBD>", where xxx is your chosen directory.
<P>
+ These are the only directories you need for development.
+ If you only want to run Lua programs,
+ you only need the files in bin and man.
+ The files in include and lib are needed for
+ embedding Lua in C or C++ programs.
<H3><A NAME="customization">Customization</A></H3>
+<P>
Three kinds of things can be customized by editing a file:
<UL>
<LI> Where and how to install Lua &mdash; edit Makefile.
<LI> How to build Lua &mdash; edit src/Makefile.
<LI> Lua features &mdash; edit src/luaconf.h.
</UL>
-<P>
+<P>
You don't actually need to edit the Makefiles because you may set the
relevant variables in the command line when invoking make.
-<P>
+ Nevertheless, it's probably best to edit and save the Makefiles to
+ record the changes you need.
+<P>
On the other hand, if you need to customize some Lua features, you'll need
to edit src/luaconf.h before building and installing Lua.
The edited file will be the one installed, and
it will be used by any Lua clients that you build, to ensure consistency.
- (Further customization is possible by editing the Lua sources.)
-<P>
+ Further customization is available to experts by editing the Lua sources.
- We strongly recommend that you enable dynamic loading. This is done
- automatically for all platforms listed above that have this feature
- and also for Windows.
<P>
+ We strongly recommend that you enable dynamic loading in src/luaconf.h.
+ This is done automatically for all platforms listed above that have
+ this feature and also for Windows.
<H3><A NAME="other">Building Lua on other systems</A></H3>
+<P>
If you're not using the usual Unix tools, then the instructions for
building Lua depend on the compiler you use. You'll need to create
projects (or whatever your compiler uses) for building the library,
the interpreter, and the compiler, as follows:
-<P>
+
<DL CLASS="display">
<DT>
library:
@@ -239,8 +240,9 @@ library:
lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c
lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c
ltm.c lundump.c lvm.c lzio.c
-lauxlib.c lbaselib.c lbitlib.c ldblib.c liolib.c lmathlib.c loslib.c
-ltablib.c lstrlib.c loadlib.c linit.c
+lauxlib.c lbaselib.c lbitlib.c lcorolib.c ldblib.c liolib.c
+lmathlib.c loslib.c lstrlib.c ltablib.c loadlib.c linit.c
+
<DT>
interpreter:
<DD>
@@ -251,14 +253,7 @@ compiler:
library, luac.c print.c
</DL>
- If you use Visual Studio .NET, you can use <TT>etc/luavs.bat</TT> in its
- "Command Prompt".
-<P>
-
- If all you want is to build the Lua interpreter, you may put all .c files
- in a single project, except for luac.c and print.c. Or just use <TT>etc/one.c</TT>.
<P>
-
To use Lua as a library in your own programs you'll need to know how to
create and use libraries with your compiler. Moreover, to dynamically load
C libraries for Lua you'll need to know how to create dynamic libraries
@@ -268,38 +263,31 @@ compiler:
be linked statically into the host program and its symbols exported for
dynamic linking; src/Makefile does this for the Lua interpreter.
For Windows, we recommend that the Lua library be a DLL.
-<P>
+<P>
As mentioned above, you may edit src/luaconf.h to customize
some features before building Lua.
-<P>
-<H2><A NAME="changes">Changes since Lua 5.1</A></H2>
+<H2><A NAME="changes">Changes since Lua 5.2.0 (work3)</A></H2>
-<IMG SRC="alert.png" ALIGN="absbottom">
-<EM>Everything may change in the final version.</EM>
-<P>
-
-Here are the main changes since the previous work version:
<UL>
-<LI> new <CODE>_ENV</CODE> proposal
-<LI> generational collector (very experimental)
-<LI> light C functions
-
-<LI> order tag methods follow the same rules of other binary operators
-<LI> <CODE>lua_absindex</CODE>
-<LI> \0 in patterns
-<LI> empty statement
-<LI> options in <CODE>io.lines</CODE>
+<LI> <CODE>module</CODE> and <CODE>luaL_register</CODE> deprecated, replaced by <CODE>luaL_newlib</CODE> and <CODE>luaL_setfuncs</CODE>.
+<LI> new function <CODE>luaL_requiref</CODE>.
+<LI> caching of Lua closures for resue.
+<LI> version-specific environment variables (<CODE>LUA_PATH_5_2</CODE>, etc.).
+<LI> new class '%g' in patterns.
+<LI> <CODE>debug.getlocal</CODE> gets parameter names of inactive functions.
+<LI> new functions <CODE>lua_tonumberx</CODE> and <CODE>lua_tointegerx</CODE>.
</UL>
-<P>
-Here are the main changes in Lua since its last release.
+<H2><A NAME="changes">Changes since Lua 5.1</A></H2>
+
+<P>
+Here are the main changes introduced in Lua 5.2.
The
<A HREF="contents.html">reference manual</A>
lists the
-<A HREF="manual.html#7">incompatibilities</A> that had to be introduced.
-<P>
+<A HREF="manual.html#8">incompatibilities</A> that had to be introduced.
<H3>Language</H3>
<UL>
@@ -358,42 +346,40 @@ lists the
<LI> handling of non-string error messages in the standalone interpreter.
</UL>
-
<H2><A NAME="license">License</A></H2>
<A HREF="http://www.opensource.org/docs/definition.php">
-<IMG SRC="osi-certified-72x60.png" ALIGN="right" BORDER="0" ALT="[osi certified]" xSTYLE="padding: 40px ;" hspace="10">
+<IMG SRC="osi-certified-72x60.png" ALIGN="right" BORDER="0" ALT="[osi certified]" STYLE="padding-left: 30px ;">
</A>
+<P>
Lua is free software licensed under the terms of the
<A HREF="http://www.opensource.org/licenses/mit-license.html">MIT license</A>
-reproduced below,
-and
-can be used for any purpose, including commercial purposes,
+reproduced below;
+it can be used for any purpose, including commercial purposes,
at absolutely no cost without having to ask us.
The only requirement is that if you do use Lua,
then you should give us credit by including the appropriate copyright notice somewhere in your product or its documentation.
-For details and rationale, see
-<A HREF="http://www.lua.org/license.html" class="external">this</A>.
-<P>
+For details, see
+<A HREF="http://www.lua.org/license.html">this</A>.
<BLOCKQUOTE>
Copyright &copy; 1994&ndash;2010 Lua.org, PUC-Rio.
-<P>
+<P>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
-<P>
+<P>
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
-<P>
+<P>
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -401,17 +387,15 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-<P>
</BLOCKQUOTE>
-<P>
<HR>
<SMALL>
Last update:
-Tue May 18 13:59:06 BRT 2010
+Fri Jul 30 15:12:25 BRT 2010
</SMALL>
<!--
-Last change: revised for Lua 5.2.0 (work3)
+Last change: revised for Lua 5.2.0 (work4)
-->
</BODY>