Updating suse 9 1 to 9 2

(the first edition is available online) If you are coming to Lua from another programming language, then see the list of common gotchas.

C is very readable to someone who is used to reading C, but Lua is more readable for casual programmers. There is one important sense that Lua is the C of dynamic languages; it is small, fast, and only comes with the essential batteries.One scenario is that you already have big C/C /Java/C# (etc) applications and wish to let your users script those applications.Lua will only add about 150-170K, which gets you a modern extension language which understands your special needs (like sand boxing) and can be easily integrated with your code.There is a definite cost in optimising that program, both in programmer time and in code readability.If you don't know what the slow bits are, then you will waste time making your all your program ugly and maybe a little faster (which is why he says you will be unhappy.) So the first step is to use Lua Profiler the program and find the under-performing parts, which will be functions called very often and operations in inner loops. The equivalent in Lua of writing inner loops in Assembler is to factor out the heavy CPU-using code, write it as C, and use as an extension module.Lua Inspect provides real-time source code analysis for Lua using a [Sci TE](( TE.html) and a vim plugin; static output as HTML is supported.

176

Leave a Reply