[ANNOUNCE] Lua 4.0.1

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANNOUNCE] Lua 4.0.1

Luiz Henrique de Figueiredo
Lua 4.0.1 is now available for download at
	http://www.lua.org/ftp/lua-4.0.1.tar.gz

This is a full distribution which merges the modules in lua-4.0-update into
the original Lua 4.0 code. Only those modules have been touched. (A complete
list of updated modules is in UPDATE; diffs from the original code are in
DIFFS.) READMEs and other documentation still refer to Lua 4.0 (and this is
ok, since 4.0.1 is simply a bug-fix release). However, LUA_VERSION in lua.h
has been changed to 4.0.1 so that you know what you're running.

Lua 4.0.1 is now officially the current Lua version.
--lhf

Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE] Lua 4.0.1

Jay Carlson
On Thursday, July 4, 2002, at 01:43 PM, Luiz Henrique de Figueiredo wrote:

Lua 4.0.1 is now available for download at
	http://www.lua.org/ftp/lua-4.0.1.tar.gz

This is a full distribution which merges the modules in lua-4.0-update into the original Lua 4.0 code. Only those modules have been touched. (A complete list of updated modules is in UPDATE; diffs from the original code are in DIFFS.) READMEs and other documentation still refer to Lua 4.0 (and this is ok, since 4.0.1 is simply a bug-fix release). However, LUA_VERSION in lua.h
has been changed to 4.0.1 so that you know what you're running.

Lua 4.0.1 is now officially the current Lua version.

Thank you.  This is very helpful.

Jay


Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE] Lua 4.0.1

Enrico Colombini
In reply to this post by Luiz Henrique de Figueiredo
>Lua 4.0.1 is now available for download at
>	http://www.lua.org/ftp/lua-4.0.1.tar.gz

Thanks!
(it would probably be a good idea to update the link and description at
http://www.lua.org/download.html)

  Enrico


Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE] Lua 4.0.1

Reuben Thomas
In reply to this post by Luiz Henrique de Figueiredo
> This is a full distribution which merges the modules in lua-4.0-update into
> the original Lua 4.0 code. Only those modules have been touched. (A complete
> list of updated modules is in UPDATE; diffs from the original code are in
> DIFFS.) READMEs and other documentation still refer to Lua 4.0 (and this is
> ok, since 4.0.1 is simply a bug-fix release). However, LUA_VERSION in lua.h
> has been changed to 4.0.1 so that you know what you're running.

Presumably the V=4.0 in config should also be changed to V=4.0.1?

-- 
http://www.mupsych.org/~rrt/ | plagiarism, n.  the mind burgles


Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE] Lua 4.0.1

Reuben Thomas
> > This is a full distribution which merges the modules in lua-4.0-update into
> > the original Lua 4.0 code. Only those modules have been touched. (A complete
> > list of updated modules is in UPDATE; diffs from the original code are in
> > DIFFS.) READMEs and other documentation still refer to Lua 4.0 (and this is
> > ok, since 4.0.1 is simply a bug-fix release). However, LUA_VERSION in lua.h
> > has been changed to 4.0.1 so that you know what you're running.
>
> Presumably the V=4.0 in config should also be changed to V=4.0.1?

And you might as well updated the copyright line in lua.h to "1994-2002".

-- 
http://www.mupsych.org/~rrt/ | irrevocable, a.  expensive; see also lawyer


Reply | Threaded
Open this post in threaded view
|

some questions about lua

jason zhang
In reply to this post by Enrico Colombini
I'm a newbie to lua. And there are some questions:
1. What is the pronunciation of 'lua'?   I want to use
lua as the script of our game project and need to tell my teamate
what is lua.

2. I cannot surf  http://lua-users.org  Are there any mirror sites?

3. Where can I find the specification of lua5.0?  Or work version?
I cannot find it on www.lua.org

4. Could I execute the lua script step by step? For example, I have
the following script:
  man_go_forward( 100, 100, 100 );
  while( !button_pressed ){ man_wait() };
  man_talk( "some words" );
  man_fight();
I need some control or some delay between lines of script. I need to
execuate the script to some line, then engine code , then the script from
the last position .....
    Is it possible?

Thank you.
Jason Zhang
----- Original Message ----- 
From: "Enrico Colombini" <[hidden email]>
To: "Multiple recipients of list" <[hidden email]>
Sent: Friday, July 05, 2002 3:18 PM
Subject: Re: [ANNOUNCE] Lua 4.0.1


> >Lua 4.0.1 is now available for download at
> > http://www.lua.org/ftp/lua-4.0.1.tar.gz
> 
> Thanks!
> (it would probably be a good idea to update the link and description at
> http://www.lua.org/download.html)
> 
>   Enrico
> 
> 


Reply | Threaded
Open this post in threaded view
|

RE: some questions about lua

John Passaniti-4
A note to the Lua authors:

> 1. What is the pronunciation of 'lua'?

I assumed it was pronounced LOO-ah, but I don't speak Portuguese.  For fun,
maybe the Lua authors can get put up some audio samples of them saying
"Lua," kind of like when Linus Torvalds provided a sample of him saying
"Linux" (see http://www.linux.org/info/sounds/english.au).  For maximum fun
and confusion, have everyone pronounce it a different way.




Reply | Threaded
Open this post in threaded view
|

Re: some questions about lua

Thatcher Ulrich
In reply to this post by jason zhang
On Jul 07, 2002 at 02:57 +0800, jason zhang wrote:
> 
> 4. Could I execute the lua script step by step? For example, I have
> the following script:
>   man_go_forward( 100, 100, 100 );
>   while( !button_pressed ){ man_wait() };
>   man_talk( "some words" );
>   man_fight();
> I need some control or some delay between lines of script. I need to
> execuate the script to some line, then engine code , then the script from
> the last position .....
>     Is it possible?

This sounds like a job for the new coroutine features in 5.0-work0 --
you can put a "yield()" call in your scripts where you want to return
back to the engine, and the engine can call "lua_resume()" when it
wants to continue running the script from the spot where it yeild()ed.

In the example above, you could replace "man_wait()" with "yield()".

-- 
Thatcher Ulrich
http://tulrich.com

Reply | Threaded
Open this post in threaded view
|

Re: some questions about lua

Roberto Ierusalimschy
In reply to this post by John Passaniti-4
> > 1. What is the pronunciation of 'lua'?
> 
> I assumed it was pronounced LOO-ah, but I don't speak Portuguese.

That's how we pronounce it. Or, following the Webster pronunciation
symbols, as 'Lu - a  (|a| as a in ash, |u| as oo in foot)


>  For maximum fun and confusion, have everyone pronounce it a different
> way.

There is not much diversity in how we pronounce Lua; I think even people
from other Portuguese-speaking countries pronounce it the same way.

-- Roberto

Reply | Threaded
Open this post in threaded view
|

RE: some questions about lua

Benoit Germain
In reply to this post by jason zhang
Hello,

my .02EUR, just to be sure :-)

I might want man_talk() to block until a certain condition is met (say, the
sample is played). Do I have to
man_talk("some words")
until man_done_talking() do
	yield()
end

or is there (will there be) the possibility for C extensions to yield by
themselves, and write:
man_talk("some words")
and internally have the C implementation man_talk(L) call the sound
subsystem, and yield until the subsystem says the resource is played ? Of
course, the lua state could not resume the C extension at the exact point
where it yielded, but the function could check whether it was called
normally or because of a yield() being resumed ?

>From what I have understood so far, when a lua coroutine calls yield(), the
execution is to resume right after the yield point. resuming just before the
yield call (thus causing yield() to be the next statement being executed),
and having yield() continue execution when called because of a resume should
not change the current behaviour specification ?

This would produce much simpler and elegant scripts when a sequence of
lengthy actions is to be described, for example if several samples and/or
animations are to be played one after the other.
Oh well, thinking about it, I suppose one can always do

function Yielder(cfunction)
	local f = function (...)
		local yielded = 0
		until %cfunction(yielded,unpak(arg)) do
			yield()
			yielded=1
		end
	end
	return coroutine.create(f)
end

man_talk = Yielder(man_talk)

man_talk("some_words")


(or the syntactically correct equivalent, I haven't tested :-)

Cheers,

Benoit.



> -----Original Message-----
> From: Thatcher Ulrich [[hidden email]]
> Sent: lundi 8 juillet 2002 15:47
> To: Multiple recipients of list
> Subject: Re: some questions about lua
> 
> 
> On Jul 07, 2002 at 02:57 +0800, jason zhang wrote:
> > 
> > 4. Could I execute the lua script step by step? For example, I have
> > the following script:
> >   man_go_forward( 100, 100, 100 );
> >   while( !button_pressed ){ man_wait() };
> >   man_talk( "some words" );
> >   man_fight();
> > I need some control or some delay between lines of script. I need to
> > execuate the script to some line, then engine code , then 
> the script from
> > the last position .....
> >     Is it possible?
> 
> This sounds like a job for the new coroutine features in 5.0-work0 --
> you can put a "yield()" call in your scripts where you want to return
> back to the engine, and the engine can call "lua_resume()" when it
> wants to continue running the script from the spot where it yeild()ed.
> 
> In the example above, you could replace "man_wait()" with "yield()".
> 
> -- 
> Thatcher Ulrich
> http://tulrich.com
> 

Reply | Threaded
Open this post in threaded view
|

Re: some questions about lua

Thatcher Ulrich
On Jul 08, 2002 at 04:35 +0200, Benoit Germain wrote:
> Hello,
> 
> my .02EUR, just to be sure :-)
> 
> I might want man_talk() to block until a certain condition is met (say, the
> sample is played). Do I have to
> man_talk("some words")
> until man_done_talking() do
> 	yield()
> end
> 
> or is there (will there be) the possibility for C extensions to yield by
> themselves, and write:
> man_talk("some words")
> and internally have the C implementation man_talk(L) call the sound
> subsystem, and yield until the subsystem says the resource is played ? Of
> course, the lua state could not resume the C extension at the exact point
> where it yielded, but the function could check whether it was called
> normally or because of a yield() being resumed ?

You can do this in Lua with a small wrapper:

function man_talk(sample_name)
	local sound_channel = play_sound(sample_name)
	while is_playing(sound_channel) do
		yield()
	end
end

Similar in spirit to what you have below, but I think more
straightforward...

> Oh well, thinking about it, I suppose one can always do
> 
> function Yielder(cfunction)
> 	local f = function (...)
> 		local yielded = 0
> 		until %cfunction(yielded,unpak(arg)) do
> 			yield()
> 			yielded=1
> 		end
> 	end
> 	return coroutine.create(f)
> end
> 
> man_talk = Yielder(man_talk)
> 
> man_talk("some_words")

-- 
Thatcher Ulrich
http://tulrich.com