lua-users home
lua-l archive

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

> 	a) usable for people who aren't programmers (think engineering
> students). Lua looks like it might be ok here.

Yep, Lua is clearly a good choice for that (has been designed for that).

> 	b) fast enough to do simple arithmetic on enourmous data sets
> (2d image manipulation). it doesn't have to be real-time, but it
> shouldn't be in elephant time either. any opinions?

We do the same here. Image processing functions are programmed in
optimized ANSI C, which tends to get as fast as you get without touching

The Lua part of our library is merely calling high-level functions in
sequence. Performance-wise, there is no difference between a Lua script
and a C main(), provided you do no pixel manipulation in Lua of course.

> 	d) usable with huge data sets. i read a few messages about Lua's
> garbage collection system and images that give me doubts.. i want to
> create "image" objects that allocate data with Win32's GlobalAlloc
> function, and i need this memory to be released when the object goes
> out of scope. is Lua's GC going to complicate this?

You need to take care in your library to provide a destructor for every
large object you allocate, and then rely on Lua's GC to call the
destructor. Our library processes several gigabytes worth of images
without hiccup.

Hope it helps,