lua-users home
lua-l archive

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

> It's all want, want, want with you Cuthbert! Lua doesn't have ints! The
> default is double, which covers floats, ints, 32bit unsigned ints (so
> you can do 32 bit colour). Light userdata was added to replace C
> pointers cast to numbers and passed round inside Lua IIRC.

That's me :-)  actually I've compiled Lua to deal with just floats right

It sounds like this passing of C pointers to Lua is more of a hack than my
humble vector type ;-)

> Yep, for the gaming industry, but what about the mathematicians who want
> complex numbers and arbitrary precision integer math. Lua is easily
> extensible to cope with these types. Python has both afore mentioned
> types as built in types. Your job then is to *remove* them when you want
> to embed Python in your game. I sat on a round table at GDC and a
> programmer there was explaining how after stripping down Python you're
> still left with a 500kb+ library. Lua is probably a 1/5th of this
> including compiler, and a hell of a lot faster.

Yep, that's why I'm still here... with my wants ;-)

> Now, I had this idea about statically compiling Lua scripts and
> converting them into C++ for the release version, but having the nice
> fast data/script driven development speed. If you were to do this you
> would get a nice speed advantage and the C++ could then give you
> hardware vector access. Since Lua is a dynamic language there are a
> whole heap of issues with this (e.g. functions are first class objects,
> environments etc. - it would have been easier with Lua 4!) but you'd be
> closer to the advantages you mention. It was just an idea  :-/

Its not really speed I'm after though, its convenience.. have a read of my
(just posted) mail regarding the real problem implementing vectors as a