Start the 3.0-alpha1 version

This commit is contained in:
James Roseborough
2012-07-12 14:45:08 +00:00
parent 6c67f4565a
commit 659a20a999
2 changed files with 42 additions and 32 deletions

View File

@@ -16,7 +16,7 @@
Getting Started with LuaJ
</h1>
James Roseborough, Ian Farmer, Version 2.0.3
James Roseborough, Ian Farmer, Version 3.0-alpha1
<p>
<small>
Copyright &copy; 2009-2012 Luaj.org.
@@ -49,7 +49,7 @@ Freely available under the terms of the
<h1>1 - <a name="1">Introduction</a></h1>
<h2>Goals of Luaj</h2>
Luaj is a lua interpreter based on the 5.1.x version of lua with the following goals in mind:
Luaj is a lua interpreter based on the 5.2.x version of lua with the following goals in mind:
<ul>
<li>Java-centric implementation of lua vm built to leverage standard Java features.
<li>Lightweight, high performance execution of lua.
@@ -58,20 +58,30 @@ Luaj is a lua interpreter based on the 5.1.x version of lua with the following g
<li>Dependable due to sufficient unit testing of vm and library features.
</ul>
<h2>Differences with 1.0</h2>
In addition to the basic goals of luaj, version 2.0 is aimed
at improving on the 1.0 vm in the following aspects.
<h2>Luaj version and Lua Versions</h2>
<h3>Luaj 3.0.x</h3>
Support for lua 5.2.x features:
<ul>
<li>_ENV environments model.
<li>yield from pcall or metatags.
<li>Bitwise operator library.
<li>Better coroutine-related garbage collection.
</ul>
It also includes miscellaneous improvements over luaj 2.0.x:
<ul>
<li>Garbage collection of orphaned threads.
</ul>
<h3>Luaj 2.0.x</h3>
Support for luaj 5.1.x features, plus:
<ul>
<li>Support for compiling lua source code into Java source code.
<li>Support for compiling lua bytecode directly into Java bytecode.
<li>Improved performance of of lua bytecode processing.
<li>Stackless vm design centered around dynamically typed objects.
<li>More alignment with C API (see <a href="names.csv">names.csv</a> for details)
<li>Improved class and package naming conventions.
<li>Improved unit tests of core classes.
<li>Improved quality due to major redesign and rewrite of core elements.
<li>More complete implementation including weak keys and values, and all metatags.
<li>Good alignment with C API (see <a href="names.csv">names.csv</a> for details)
<li>Implementation of weak keys and values, and all metatags.
</ul>
<h3>Luaj 1.0.x</h3>
Support for most luaj 5.1.x features.
<h2>Performance</h2>
Good performance is a major goal of luaj.
@@ -106,7 +116,7 @@ in comparison with the standard C distribution.
<td>16.794</td>
<td>11.274</td>
<td>Java</td>
<td>java -cp luaj-jse-2.0.3.jar;bcel-5.2.jar lua <b>-b</b> fannkuch.lua 10</td></tr>
<td>java -cp luaj-jse-3.0-alpha1.jar;bcel-5.2.jar lua <b>-b</b> fannkuch.lua 10</td></tr>
<tr valign="top">
<td></td>
<td></td>
@@ -116,7 +126,7 @@ in comparison with the standard C distribution.
<td>16.701</td>
<td>13.789</td>
<td></td>
<td>java -cp luaj-jse-2.0.3.jar lua <b>-j</b> fannkuch.lua 10</td></tr>
<td>java -cp luaj-jse-3.0-alpha1.jar lua <b>-j</b> fannkuch.lua 10</td></tr>
<tr valign="top">
<td></td>
<td></td>
@@ -126,7 +136,7 @@ in comparison with the standard C distribution.
<td>36.894</td>
<td>15.163</td>
<td></td>
<td>java -cp luaj-jse-2.0.3.jar lua -n fannkuch.lua 10</td></tr>
<td>java -cp luaj-jse-3.0-alpha1.jar lua -n fannkuch.lua 10</td></tr>
<tr valign="top">
<td>lua</td>
<td>5.1.4</td>
@@ -182,7 +192,7 @@ It is also faster than Java-lua implementations Jill, Kahlua, and Mochalua for a
From the main distribution directory line type:
<pre>
java -cp lib/luaj-jse-2.0.3.jar lua examples/lua/hello.lua
java -cp lib/luaj-jse-3.0-alpha1.jar lua examples/lua/hello.lua
</pre>
<p>
@@ -194,7 +204,7 @@ You should see the following output:
To see how luaj can be used to acccess most Java API's including swing, try:
<pre>
java -cp lib/luaj-jse-2.0.3.jar lua examples/lua/swingapp.lua
java -cp lib/luaj-jse-3.0-alpha1.jar lua examples/lua/swingapp.lua
</pre>
<h2>Compile lua source to lua bytecode</h2>
@@ -203,8 +213,8 @@ To see how luaj can be used to acccess most Java API's including swing, try:
From the main distribution directory line type:
<pre>
java -cp lib/luaj-jse-2.0.3.jar luac examples/lua/hello.lua
java -cp lib/luaj-jse-2.0.3.jar lua luac.out
java -cp lib/luaj-jse-3.0-alpha1.jar luac examples/lua/hello.lua
java -cp lib/luaj-jse-3.0-alpha1.jar lua luac.out
</pre>
<p>
@@ -216,9 +226,9 @@ The compiled output "luac.out" is lua bytecode and should run and produce the sa
Luaj can compile to lua source code to Java source code:
<pre>
java -cp lib/luaj-jse-2.0.3.jar lua2java -s examples/lua -d . hello.lua
javac -cp lib/luaj-jse-2.0.3.jar hello.java
java -cp &quot;lib/luaj-jse-2.0.3.jar;.&quot; lua -l hello
java -cp lib/luaj-jse-3.0-alpha1.jar lua2java -s examples/lua -d . hello.lua
javac -cp lib/luaj-jse-3.0-alpha1.jar hello.java
java -cp &quot;lib/luaj-jse-3.0-alpha1.jar;.&quot; lua -l hello
</pre>
<p>
@@ -229,7 +239,7 @@ There are no additional dependencies for compiling or running source-to-source c
<p>
Lua scripts can also be run directly in this mode without precompiling using the <em>lua</em> command with the <b><em>-j</em></b> option when run in JDK 1.5 or higher:
<pre>
java -cp lib/luaj-jse-2.0.3.jar lua -j examples/lua/hello.lua
java -cp lib/luaj-jse-3.0-alpha1.jar lua -j examples/lua/hello.lua
</pre>
<h2>Compile lua bytecode to java bytecode</h2>
@@ -239,8 +249,8 @@ Luaj can compile lua sources or binaries directly to java bytecode if the bcel l
<pre>
ant bcel-lib
java -cp &quot;lib/luaj-jse-2.0.3.jar;lib/bcel-5.2.jar&quot; luajc -s examples/lua -d . hello.lua
java -cp &quot;lib/luaj-jse-2.0.3.jar;.&quot; lua -l hello
java -cp &quot;lib/luaj-jse-3.0-alpha1.jar;lib/bcel-5.2.jar&quot; luajc -s examples/lua -d . hello.lua
java -cp &quot;lib/luaj-jse-3.0-alpha1.jar;.&quot; lua -l hello
</pre>
<p>
@@ -251,7 +261,7 @@ but the compiled classes must be in the class path at runtime, unless runtime ji
<p>
Lua scripts can also be run directly in this mode without precompiling using the <em>lua</em> command with the <b><em>-b</em></b> option and providing the <em>bcel</em> library in the class path:
<pre>
java -cp &quot;lib/luaj-jse-2.0.3.jar;lib/bcel-5.2.jar&quot; lua -b examples/lua/hello.lua
java -cp &quot;lib/luaj-jse-3.0-alpha1.jar;lib/bcel-5.2.jar&quot; lua -b examples/lua/hello.lua
</pre>
@@ -276,7 +286,7 @@ A simple example may be found in
</pre>
<p>
You must include the library <b>lib/luaj-jse-2.0.3.jar</b> in your class path.
You must include the library <b>lib/luaj-jse-3.0-alpha1.jar</b> in your class path.
<h2>Run a script in a MIDlet</h2>
@@ -303,7 +313,7 @@ A simple example may be found in
</pre>
<p>
You must include the library <b>lib/luaj-jme-2.0.3.jar</b> in your midlet jar.
You must include the library <b>lib/luaj-jme-3.0-alpha1.jar</b> in your midlet jar.
<p>
An ant script to build and run the midlet is in
@@ -331,7 +341,7 @@ The standard use of JSR-223 scripting engines may be used:
All standard aspects of script engines including compiled statements should be supported.
<p>
You must include the library <b>lib/luaj-jse-2.0.3.jar</b> in your class path.
You must include the library <b>lib/luaj-jse-3.0-alpha1.jar</b> in your class path.
<p>
A working example may be found in
@@ -343,7 +353,7 @@ To compile and run it using Java 1.6 or higher:
<pre>
javac examples/jse/ScriptEngineSample.java
java -cp &quot;lib/luaj-jse-2.0.3.jar;examples/jse&quot; ScriptEngineSample
java -cp &quot;lib/luaj-jse-3.0-alpha1.jar;examples/jse&quot; ScriptEngineSample
</pre>
<h2>Excluding the lua bytecode compiler</h2>
@@ -520,7 +530,7 @@ The following lua script will open a swing frame on Java SE:
See a longer sample in <em>examples/lua/swingapp.lua</em> for details, including a simple animation loop, rendering graphics, mouse and key handling, and image loading.
Or try running it using:
<pre>
java -cp lib/luaj-jse-2.0.3.jar lua examples/lua/swingapp.lua
java -cp lib/luaj-jse-3.0-alpha1.jar lua examples/lua/swingapp.lua
</pre>
<p>
@@ -748,7 +758,7 @@ and LuaForge:
<li>Enhance javadoc, put it <a href="docs/api/index.html">in distribution</a> and <a href="http://luaj.sourceforge.net/api/2.0/index.html">on line</a></li>
<li>Major refactor of luajava type coercion logic, improve method selection.</li>
<li>Add lib/luaj-sources-2.0.2.jar for easier integration into an IDE such as Netbeans </li>
<tr valign="top"><td>&nbsp;&nbsp;<b>2.0.3</b></td><td><ul>
<tr valign="top"><td>&nbsp;&nbsp;<b>3.0-alpha1</b></td><td><ul>
<li>Improve coroutine state logic including let unreferenced coroutines be garbage collected </li>
<li>Fix lua command vararg values passed into main script to match what is in global arg table </li>
<li>Add arithmetic metatag processing when left hand side is a number and right hand side has metatable </li>

View File

@@ -1 +1 @@
version: 2.0.3
version: 3.0-alpha1