View Full Version : Lua
darkone
05-30-2005, 11:47 AM
I have just finished evaluating lua (http://www.lua.org) , and it seems to be perfect replacement for both cookies and hardcoded protocol specific commands.
Lua compiles code to platform independent bytecode like java/php & tcl , but is much less bloated and far more optimized, and therefore it's able to provide outstanding performance. Following script executes in 0.0000046seconds (10000 executions in 46msecs):
a = 1
b = 2
c = a+b
a = b
c = a
FTPServerTools
05-31-2005, 03:28 AM
YES YES YES!! :) Lua is often used in game development due to it's speed and the easy extendability. A good choice, even tho you could use a delphi alike language too. I hope you'll use it as dll tho, that would make adding a new lua version even easier. I've played with it as well for other projects.
esmandil
05-31-2005, 05:48 AM
Yes, Lua seems like a nice language.
I am not sure if it isn't *too* small, though -- there are a couple of nice features it doesn't have in order to remain that small (while I am not an expert on Lua by any means, ObjectOrientation and Unicode come to mind).
Ever thought about Python? Embedding Python is a bit trickier than embedding Lua, but it is almost as fast and has a number of cool features of its own (like a support for running multiple interpreters).
FTPServerTools
05-31-2005, 08:35 AM
Hmm I didnt know python could be bytecode compiled. Anyway lua can be easily extended and then there is also java (snooorrrreee) or .NET (zoooom) or there is a bleaming fast delphi alike language called innerfuse pascal/remobjects pascal with source code. But lua is made to run on just about anything so I guess this would be easier.
darkone
05-31-2005, 08:46 AM
Lua does actually support modules that provide objecet oriented classes. Afaik you can't however create new classes directly from lua code.
Lua supports running multiple interpreters simultanously - and it's actually designed to do this. Also there's no use of TLS values. which makes it possible to cache interpreters in a global pool. Pooling interpreters is impossible on many scripting languages such as php and tcl (not sure about python).
Lua is only meant to be used in situatins where performance is critical - such as command replies. In non-performance critical areas you will be able to call tcl or php directly, and through lua.
esmandil
05-31-2005, 09:27 AM
Pooling interpreters is impossible on many scripting languages such as php and tcl (not sure about python).
I *think* it is possible in Python as well, AFAIK mod_python for Apache uses it. But I may be wrong.
Sounds like you have already made your mind, though ;)
vBulletin® v3.8.11 Alpha 3, Copyright ©2000-2024, vBulletin Solutions, Inc.