Working
codes for free
About Lua
(Lua 4) Integral calculator
(Lua 5) SimpleMathLib implementation
Lua coding
What for all this?
Lua in game engines
Lua
1 - Introduction
Lua is an extension programming language designed to support general procedural programming with data description facilities. Lua is intended to be used as a powerful, light-weight configuration language for any program that needs one. Lua is implemented as a library, written in C.
Being an extension language, Lua has no notion of a ``main'' program: it only works embedded in a host client, called the embedding program or simply the host. This host program can invoke functions to execute a piece of Lua code, can write and read Lua variables, and can register C functions to be called by Lua code. Through the use of C functions, Lua can be augmented to cope with a wide range of different domains, thus creating customized programming languages sharing a syntactical framework.
Lua is free software, and is provided as usual with no guarantees, as stated in its copyright notice. The implementation described in this manual is available at Lua's official web site, www.lua.org.
Copyright © 2002 Tecgraf, PUC-Rio. All rights reserved.
Lua 4.
This is small example of how to use Lua as standalone interpretator
actualy I wrote this for examenation purpose in case of my study
at Ashdod Colegue.
The task to calculate integral of xexfrom 1 to 2
Hand book describe it like
and it solved as
Methods Coded in Lua 4.1
Placed in different *.lua files
Main Module
Simpson Approximation Method
Trapezoid Method
Monte Carlo(Luck) Method
Polinom Of Taylor Series Method
Lua 5.
Utillities functions Module
This is another example of how to use Lua as standalone interpretator
to calaculate gaussian solvation ,matrixes operations and some kinds of simlexes.
First of all we must (or may be not but I desided to do) implement the
basic type for any operation-and my best choise 'Fractioned number' because 'Pivote problem'.
I wrote useful class that breaking any number into three fractions and put
it together into structure like Q*R/D(Qotient,Remainder,Divider).
Actualy any number can be described as Z=Q*D+R(Z=m/n) when D=n<>0
Class definition Module
Fraction Class definition Module
Main Module for Gauss
...
...
...
Will be continued!!! :)
Verry Useful coding in Lua
Actualy it is wiki class that using metatables
Types such Vector,Point e.t.c definition
Object class example that using metatables
Extension class that using metatables
App main window definition using metatables
Start script for host application
To controll flow of host programm ...
To controll flow of script driven engines ...
...
Ok.
Verry good solution-ToLua ,but I not going to discuss here about.
Another fast powerfull and cheap,even for large projects,solution-Luna style wrapper.
...
Will be continued!!! :)
Will be continued!!!