lua-users home
lua-l archive

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


Hi All,
I am newbie at Lua.Can u suggest a good starting point for the
language?I am comfortable with C,C++(as for the system coding).

Thanks n Regards
Dibya Prakash

On 7/23/05, lua-request@bazar2.conectiva.com.br
<lua-request@bazar2.conectiva.com.br> wrote:
> Send Lua mailing list submissions to
>        lua@bazar2.conectiva.com.br
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://bazar2.conectiva.com.br/mailman/listinfo/lua
> or, via email, send a message with subject or body 'help' to
>        lua-request@bazar2.conectiva.com.br
> 
> You can reach the person managing the list at
>        lua-owner@bazar2.conectiva.com.br
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Lua digest..."
> 
> 
> Today's Topics:
> 
>   1. Lua v San Jose Grand Prix (Mark Hamburg)
>   2. Calling the same function over and over again from C
>      (Framework Studios: Hugo)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Fri, 22 Jul 2005 18:24:07 -0700
> From: Mark Hamburg <mhamburg@adobe.com>
> Subject: Lua v San Jose Grand Prix
> To: Lua list <lua@bazar2.conectiva.com.br>
> Message-ID: <BF06EA47.385FB%mhamburg@adobe.com>
> Content-Type: text/plain; charset=US-ASCII
> 
> For those of you attending the workshop next week, a heads up. Next Friday
> is the start of the San Jose Grand Prix. If we'd known, we probably would
> have picked other dates, but we didn't. As a result, downtown San Jose has
> barricades up all over the place including on the street running past
> Adobe's headquarters. Everything should be fine Wednesday and Thursday, but
> now you know what's going on and hopefully won't be shocked.
> 
> Mark
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Sat, 23 Jul 2005 13:30:44 +0200
> From: "Framework Studios: Hugo" <hugo@framework-studios.com>
> Subject: Calling the same function over and over again from C
> To: "Lua list" <lua@bazar2.conectiva.com.br>
> Message-ID: <KJENJBFDOKPBFNOOCCCLMEHLCBAA.hugo@framework-studios.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hi all!
> 
> I was just wondering if there is a way to speed-up calling the same function
> over and over again from C++ to LUA.
> 
> My point is, let's say we want to call the function "PerFrame()" (just for
> sake of argument), it would be something like:
> 
>    lua_pushstring(VM, "PerFrame");
>    lua_gettable(VM, LUA_GLOBALSINDEX);
>    lua_call(VM, 0, 0);
> 
> The first two lines are to seek a pointer to the actual function on the
> stack. It seems rather slow to have to convert the string to function every
> call. Is there a way to simply get whatever is on the stack (eg. a function)
> and push it onto the stack later on?
> 
> I'm thinking something like this:
> 
> Only one time we do:
> 
>    lua_pushstring(VM, "PerFrame");
>    lua_gettable(VM, LUA_GLOBALSINDEX);
> 
> followed by something like:
> 
>    PerFrameFunction = lua_getfromstack(VM, 1);    // so I made up
> "lua_getfromstack" here...
> 
> ...and per-frame we do something like:
> 
>    lua_pushtostack(VM, PerFrameFunction);
>    lua_call(VM, 0, 0);
> 
> It would be nice to be able to do the same for a function in a table whilst
> reserving 'self'.
> 
> Did I miss how to do this or isn't it possible (yet? :) with LUA?
> 
>        Thanks,
>                    Hugo
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://bazar2.conectiva.com.br/mailman/private/lua/attachments/20050723/faea8583/attachment-0001.htm
> 
> End of Lua Digest, Vol 118, Issue 6
> ***********************************
>