lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


RJP Computing wrote:
> This is mainly a bug fix release. Please test on non-administrator
> accounts let me know if there are any issues.

Ryan, this is good stuff. I finally got around to trying it out this
morning. The account I installed it in is an administrator account so
these comments do not address that concern. I will try to get to that
later this afternoon.

I took a few minutes to tidy up 'luaforwindows.txt'. I've attached my
modified version of it. Some highlights of changes:

(1) Typos ("feature's" should be "features", consistent use of 'Lua for
Windows', etc.).

(2) Removed trailing spaces on lines. The usage was mixed so I picked
what I thought was best (none).

(3) Removed tabs. Tabs were used in only two places. I think they're
more trouble than they're worth.

(4) Kept lines at less than 80 characters.

(5) Made 'lua' be 'Lua' whenever it referred to the language and not a
file name or file extension.

(6) I could not find this (section 3): 'A quick Lua tour is accessible
from Start/Program/Lua/QuickLuaTour.lua'. I did my best to replace those
 sentences. Take a look and tweak as you see fit (last sentence of
answer 3 and last sentence of section 5).

(7) I added a sentence explaining how to open the command prompt to the
first paragraph in section 3. I did not add a sentence to tell the user
how to cd into the proper directory.

(8) I added a caveat about using double-clicking in the next paragraph.
This, along with (7), may be too much for the novice, but I felt that
the flash-and-disappear behavior should be explained.

(9) Made the spacing of sections be consistent (two blank lines before
and one blank line after the -----).

Of course feel free to use or modify as you see fit. I hope this helps
the effort.

Doug

-- 
Innovative Concepts, Inc. www.innocon.com 703-893-2007 x220
===============================================================================
LuaforWindows.txt - *** early draft ***
===============================================================================
1. What is Lua?

2. What is Lua for Windows?

3. What comes with Lua for Windows?

4. Using Lua for Windows.
   4.1 Running Lua Programs.
   4.2 Editing Lua Programs.
   4.3 Debugging Lua Programs.
   4.4 Using Lua without commandline console.

5. Condensed Tour of Lua Programming Language.

6. Libraries included with Lua for Windows.

7. Learn more about Lua.

8. Acknowledgements

===============================================================================
===============================================================================


1. What is Lua?
---------------

Lua is a small, fast, interpreted scripting language. Lua's origins are as a 
configuration and data description language but as Lua has matured over the 
years it has blossomed into a complete standalone scripting language. Lua's 
unique features of extensibility, simplicity, efficiency and portability make 
it much more than just a scripting language. Because of these unique features 
Lua is widely used in games and embedded systems today.


2. What is Lua for Windows?
---------------------------

Lua for Windows is a self contained Lua programming environment for Windows.
Lua for Windows consists of the standard Lua Binaries (interpreter & tools) 
and a wide variety of libraries ready to use with Microsoft Windows. Lua for 
Windows is supported for Windows 2000, XP, 2003, Vista, & Windows 2008.


3. What comes with Lua for Windows?
-----------------------------------

Lua for Windows comes with 
        a Lua interpreter, 
        a variety of Lua libraries, 
        example Lua scripts, 
        documentation for Lua Programming langauge, 
        documentation for Lua libraries 
        instructional material on how to use Lua for Windows.

Type in lua.exe at command prompt to run Lua interpreter or double click any 
file with a .lua extension to have Lua interpreter run that Lua program. To
open the command prompt, use Start/Run... and enter "cmd" in the Open: area.

Examples can be accessed from Start/Programs/Lua/Lua Examples. The simpler
example scripts should be run from the command prompt because double-clicking
will cause them to run and finish before their output can be viewed.

Documentation is accessible from Start/Programs/Lua/Documentation.
Library documentation is stored in subdirectories from docs directory.

A quick tour is provided in section 5 below, "Condensed Tour of Lua
Programming Language." For more detailed instructional materials see "Learn
more about Lua" section below.


4. Using Lua for Windows.
-------------------------

   4.1  Running Lua Programs.
   
       From command line, goto directory containing lua script and type in
       name of Lua script at command prompt.
   
       From Explorer double click on .lua file and it will be run.
   
       From Start/All Programs/Lua/Programmers Notepad, edit lua script from 
       Programmers Notepad and press F5. Or press F4 to provide arguments to 
       script.
   
   4.2  Editing Lua Programs.
   
       From explorer or command line use any text editor you wish.

       From Start/All Programs/Lua/Programmers Notepad edit lua script from 
       Programmers Notepad and press F5. Or press F4 to provide arguments to 
       script.

   4.3  Debugging Lua Programs.

       From Start/All Programs/Lua/SciTE edit lua script.
       Press F5 to debug,
       Press F9 to toggle breakpoint.
       Press F10 to step over,
       Press F11 to step into.
       View output with Alt-O,
       View varibles with variables with Alt-V.
   
   4.4 Using Lua without commandline console. 
   
       wlua.exe is used to run lua scripts without a console. The
       IUP library examples have been rename to *.wlua and run without a
       console. From Start/Programs/Lua/Lua Examples goto iup\elem\iupmenu
       directory and double click on iupmenu.wlua to run a GUI app.
	   

5. Condensed Tour of Lua Programming Language.
----------------------------------------------

Lua is a simple yet powerful dynamically typed programming language. Lua is 
one of the fastest, if not fastest, interpreted scripting languages see
http://dada.perl.it/shootout/craps.html .

Lua has 8 basic types: nil, boolean, number,string, table, function, thread,
userdata.

Lua has 21 reserved keywords: and, break, do, else, elseif, end, false, for,
function, if, in, local, nil, not, or, repeat, return, then, true, until,
while.

Lua has 6 control structures: do end block statement, if statement,
while statement, repeat until statement, for statement and break statement.

Lua has garbage collection, closures, tail calls, coercion, coroutines, first
order functions, meta-mechanisms and loadable libraries.

Numbers are floating point values. Strings are non-mutable. Table is the basic
data structure used to represent complex data. Lua uses meta-mechanisms to
implement high level features like oject oriented programming allowing the
user to select how they need to do object/class structures. Don't worry; lots
of object/class samples exist.

Lua is a very powerfi; condensed scripting language. To see a series of
programming examples click on Start/All Programs/Lua/Programmers Notepad, then
click File/Open... and browse to C:\Program Files\Lua\5.1\examples. Select any
.lua file.


6. Libraries included with Lua for Windows.
-------------------------------------------

Alien: Provides access to functions in an unknown or new .dll.
IUP: Light Portable Graphical User Interface library.
LPeg:Ppattern-matching library based on Parsing Expression Grammars (PEGs).
Lua-GD: Image manipulation library based on Thomas Boutell's GD library.
LuaCOM: Enable use & implementation of Microsoft's Component Object Model.
LuaCURL:Interface to Internet browsing capabilities based on the cURL library.
Date: Date and Time library for Lua.
LuaDoc:Documentation tool for Lua source code.
LuaExpat:Lua interface to XML Expat parsing library.
LuaFileSystem:Access the directory structure and file attributes.
***MISSING DOCS*** LuaLogging: Logging features in Lua, based on log4j.
LuaProfiler:Time profiler designed to find bottlenecks in Lua programs.
***MISSING*** LuaSDL: Simple Directmedia layer interface for Lua.
LuaSocket:LUa interface to support HTTP,FTP,SMTP, MIME, URL & LTN12.
LuaSQL:Lua interface for PostgreSQL, ODBC, MySQL, SQLite, Oracle, and ADO dbms.
LuaUnit:Testing framework for Lua.
LuaZip:Read files from zip files.
MD5:Basic cryptographic facilities for Lua.
**MISSING*** Serial port lib: allows reading/writing serial ports.
w32: Enables calling Win32 API functions.


7. Learn more about Lua.
------------------------

Books:

   Programming in Lua, 2nd Edition by Robert Ierusalimschy
      This book is also referred to as the Blue PIL. The first
      edition is free online at http://www.lua.org/pil/.

   Lua Reference Manual, by R. Ierusalimschy, L. H. de Figueiredo, W. Celes
      Available online at http://www.lua.org/manual/5.1/.

   Beginning Lua Programming by Kurt Jung & Aarron Brown
      Covers many aspects of Lua programming & Lua libraries.

Web Sites:

    http://www.lua.org - Home for the Lua Programming Language.
    http://lua-users.org/wiki/TutorialDirectory - Lua tutorials.
    http://luaforge.net/ - Home for most Lua Libraries.
    http://en.wikipedia.org/wiki/Lua_(programming_language)


8. Acknowledgements
-------------------

Thanks to Ryan Pusztai for writing inno install scripts from which Lua for
Windows is created, and for gathering all the Lua libraries together.

Thanks to Steve Donovan for Lua'izing SciTE editor & and getting Lua debugging
into SciTE.

Special thanks to Roberto Ierusalimschy ,Luiz Henrique de Figueiredo,
and Waldemar Celes for creating the Lua programming language.

And a final special thanks to the individuals who created all of these great
Lua libraries; these libraries make Lua for Windows possible.