lua-users home
lua-l archive

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


On 2009-11-06, Jerome Vuarand <jerome.vuarand@gmail.com> wrote:
> As Steve suggested changes to the language are welcome. I personnally
>  asked for the exact same feature as what you need (ie. multiple values
>  in the [] operator forwarded to the metamethods) some time ago, you
>  can probably find it in the list archive. It would be nice to have a
>  simple patch for Lua itself, which could hopefully be integrated in a
>  future official version. But using appropriate tools will be much much
>  easier than that, unless you actually enjoy compiler programming in C.

I also do believe that m[i,j]=val syntax is long overdue in Lua/LuaJIT.
With LuaJIT-2 Lua is becoming a serious contender for scientific
numeric work. In some of my unofficial tests in scalar operations
LuaJIT-1 beats Matlab 1 to 50 in tight loops. (LuaJIT-2 will do even
better).

Inability to do m[i,j]=val as __newindex(m,i,j,val) makes it very
difficult to design a decent  interface to BLAS/LAPACK libraries for
matrix operations which is a MUST for any serious scientific numeric
simulations.

Question for Mike Pall: How difficult is it to put this feature into LuaJIT-2 ??
(If I am not mistaken LuaJIT is not bound by VM bytecode compatibility
to Lua interpreter)

--Leo--