Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Lua

Name: Anonymous 2009-12-01 15:45

So what do you think of Lua?
I'm considering it for my X3 inspired(cloned) game as a scripting language for all the entities, and co-routines emulate the "@" operator of X3 scripting language perfectly.
I just hope I can integrate it to my code without much trouble.

Name: Anonymous 2009-12-01 17:11

>>3
Slow? Hilarious.

http://shootout.alioth.debian.org/u64/benchmark.php?test=all&lang=lua&lang2=v8&box=1
Better than JavaScript v8 in some problem domains. Lua trashes TraceMonkey much worse on these same tests.

http://shootout.alioth.debian.org/u64/benchmark.php?test=all&lang=lua&lang2=python&box=1
Generally beats FIOC.

http://shootout.alioth.debian.org/u64/benchmark.php?test=all&lang=lua&lang2=jruby&box=1
http://shootout.alioth.debian.org/u64/benchmark.php?test=all&lang=lua&lang2=ruby&box=1
JRuby, Ruby. Completely wasted.

You can compile Lua as well to increase performance and obfuscate your code. If you want to FUD, that's fine, but the language speaks for itself in terms of performance.

>>5
Hello, Alberto.

>>1
Lua is a good embeddable scripting language. It's perfect for C and it can be used with C++. It's extremely lightweight and it is fast. You can expose as much or as little as you would like to Lua if you use another library such as LuaBind, I think it is.

That is to say, you can expose an API or you can expose direct object access to Lua. Exposing an API can get a little confusing if you use tables. Getting data from a table and putting data into a table generally ends up confusing. Functors can help ease this complexity once you figure it out. Exposing direct object access is really confusing and fraught with peril if you don't use a library.

The syntax takes some getting used to, but there's a comprehensive manual available for when you hit snags. I wouldn't use anything other than Lua for C or C++ projects, personally.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List