Re: [ANNOUNCE] Lua 3.0 -- an extensible extension language

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

Re: [ANNOUNCE] Lua 3.0 -- an extensible extension language

Stephan Herrmann
Hi,

Congratulations, after Lua 3.0 has been out for about two weeks, let me
say, it really is a neat tool! The addition of tag methods feels very
nice. Especially when integrating different kinds of userdata, but also 
for tables with different semantics it is a great advantage to be able, 
to define access to each kind really independently from any other. 
(Special thanks to Roberto :-)

How does tklua blend into this picture? (Hi Waldemar :-) Has anybody
experience on how it works in Lua 3.0 (of course it is compatible with 
Lua 2.5, but I'm not sure if the integration of tklua-Lua2.5 was not a bit to 
tight for this version shift??). Just asking, before I will invest effort on 
my own part. I figure, tklua is also a _very_ _good_ candidate for using tag 
methods. A matter of effort, I guess? What are the current plans?

The next question, I would like to raise, concerns some kind of contributions
shelf. There is a lot of things, that probably several people have already
solved seperately. More common solutions are still to come. Little things,
I would like to share, range from a "require"/"provide" style of
module concept over an elaborated OO-implementation upto ??? Is it worth
putting up a contrib directory on the ftp-servers, both for lua-code as well
as for C-modules, that integrate additional functionality into the interpreter?

Next my very technical question: is it possible/desirable to include
"==" into the set of events that can be bound to tag methods at least for
userdata? I have a library, which return different handles for the same object,
everytime asked. It is of course only a slight matter of syntax, whether I
still can write ref1 == ref2 to mean the obvious or whether I need to
go through the "gettable" tagmethod and bind a function to ref1:eq(ref2).

I'm extremely pleased to be able to bind "gc" differently for every tag.
Especially userdata, that refer to all kinds of "external" resources,
need this heavily. I was just wondering (no definitiv need yet, just curious),
whether the garbage collector can be triggered explicitely, when resource go
down. I forgot the calling scheme.

Ah, and now my question about the luac/dump/undump technology: is it 
possible (how??), to dump at runtime a single function as byte-code into
a -say- database, and during a later session retrieve this function and
install it via dostring()? I wouldn't be afraid to go through the C-API.
Looking (superficially) at some luac -u output, I got the impression, that
lua bytecode is modular in that it doesn't contain references accross
functions, is this right? 

That's all for today. I will keep trying Lua by all means! Until now it
didn't break :-)

Stephan

--------------------------------------------------------------------------
			  Stephan Herrmann
			  ----------------
	GMD-FIRST				   TU-Berlin
 Gesellschaft f. Mathematik			 FB Informatik
   u. Datenverarbeitung				Softwaretechnik 
     [hidden email]			    [hidden email]
  Phone: ++49 30 6392 1870
--------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE] Lua 3.0 -- an extensible extension language

Waldemar Celes-2
> How does tklua blend into this picture? (Hi Waldemar :-) Has anybody
> experience on how it works in Lua 3.0 (of course it is compatible with 
> Lua 2.5, but I'm not sure if the integration of tklua-Lua2.5 was not a bit to 
> tight for this version shift??). Just asking, before I will invest effort on 
> my own part. I figure, tklua is also a _very_ _good_ candidate for using tag 
> methods. A matter of effort, I guess? What are the current plans?

You are right. Tklua can be much better structured with lua3.0.
I haven't had time to work on it, though.
I spent some time porting tklua (with the OpenGL binding) to win95,
and I'm just waiting for a spare time to rewrite it using tag methods.
Unfortunately, I can't see a way to do it before the end of August.

-- Waldemar

--------------
Waldemar Celes
Program of Computer Graphics
Cornell University
580 Engineering Theory Center Building
Ithaca, NY -- 14853
e-mail: [hidden email]
home page: http://www.graphics.cornell.edu/~celes/

Reply | Threaded
Open this post in threaded view
|

RE: [ANNOUNCE] Lua 3.0 -- an extensible extension language

Bret Mogilefsky
In reply to this post by Stephan Herrmann
I don't have much to offer in return, but I'm very interested in seeing
how you implemented the require/provide module interface!  Could you
possibly send it to me?

Thanks in advance...

Bret

> -----Original Message-----
> From:	Stephan Herrmann [SMTP:[hidden email]]
> Sent:	Friday, July 18, 1997 1:32 PM
> To:	Bret Mogilefsky
> Subject:	Re: [ANNOUNCE] Lua 3.0 -- an extensible extension
> language
> 
> Hi,
> 
> Congratulations, after Lua 3.0 has been out for about two weeks, let
> me
> say, it really is a neat tool! The addition of tag methods feels very
> nice. Especially when integrating different kinds of userdata, but
> also 
> for tables with different semantics it is a great advantage to be
> able, 
> to define access to each kind really independently from any other. 
> (Special thanks to Roberto :-)
> 
> How does tklua blend into this picture? (Hi Waldemar :-) Has anybody
> experience on how it works in Lua 3.0 (of course it is compatible with
> 
> Lua 2.5, but I'm not sure if the integration of tklua-Lua2.5 was not a
> bit to 
> tight for this version shift??). Just asking, before I will invest
> effort on 
> my own part. I figure, tklua is also a _very_ _good_ candidate for
> using tag 
> methods. A matter of effort, I guess? What are the current plans?
> 
> The next question, I would like to raise, concerns some kind of
> contributions
> shelf. There is a lot of things, that probably several people have
> already
> solved seperately. More common solutions are still to come. Little
> things,
> I would like to share, range from a "require"/"provide" style of
> module concept over an elaborated OO-implementation upto ??? Is it
> worth
> putting up a contrib directory on the ftp-servers, both for lua-code
> as well
> as for C-modules, that integrate additional functionality into the
> interpreter?
> 
> Next my very technical question: is it possible/desirable to include
> "==" into the set of events that can be bound to tag methods at least
> for
> userdata? I have a library, which return different handles for the
> same object,
> everytime asked. It is of course only a slight matter of syntax,
> whether I
> still can write ref1 == ref2 to mean the obvious or whether I need to
> go through the "gettable" tagmethod and bind a function to
> ref1:eq(ref2).
> 
> I'm extremely pleased to be able to bind "gc" differently for every
> tag.
> Especially userdata, that refer to all kinds of "external" resources,
> need this heavily. I was just wondering (no definitiv need yet, just
> curious),
> whether the garbage collector can be triggered explicitely, when
> resource go
> down. I forgot the calling scheme.
> 
> Ah, and now my question about the luac/dump/undump technology: is it 
> possible (how??), to dump at runtime a single function as byte-code
> into
> a -say- database, and during a later session retrieve this function
> and
> install it via dostring()? I wouldn't be afraid to go through the
> C-API.
> Looking (superficially) at some luac -u output, I got the impression,
> that
> lua bytecode is modular in that it doesn't contain references accross
> functions, is this right? 
> 
> That's all for today. I will keep trying Lua by all means! Until now
> it
> didn't break :-)
> 
> Stephan
> 
> ----------------------------------------------------------------------
> ----
> 			  Stephan Herrmann
> 			  ----------------
> 	GMD-FIRST				   TU-Berlin
>  Gesellschaft f. Mathematik			 FB Informatik
>    u. Datenverarbeitung				Softwaretechnik 
>      [hidden email]			    [hidden email]
>   Phone: ++49 30 6392 1870
> ----------------------------------------------------------------------
> ----

Reply | Threaded
Open this post in threaded view
|

RE: [ANNOUNCE] Lua 3.0 -- an extensible extension language

Bret Mogilefsky
In reply to this post by Stephan Herrmann
I replied to the list by accident, I think... The way they send it out
it's hard to tell that it went through the listserver.

Bret

> -----Original Message-----
> From:	Stephen Shaw 
> Sent:	Friday, July 18, 1997 10:18 PM
> To:	Bret Mogilefsky
> Subject:	RE: [ANNOUNCE] Lua 3.0 -- an extensible extension
> language
> 
> Uhh... brett, I don't think you ment to send this to me....
> 
> -srs
> 
> 
> > -----Original Message-----
> > From:	Bret Mogilefsky 
> > Sent:	Friday, July 18, 1997 5:26 PM
> > To:	Stephen Shaw
> > Subject:	RE: [ANNOUNCE] Lua 3.0 -- an extensible extension
> > language
> > 
> > I don't have much to offer in return, but I'm very interested in
> > seeing
> > how you implemented the require/provide module interface!  Could you
> > possibly send it to me?
> > 
> > Thanks in advance...
> > 
> > Bret
> > 
> > > -----Original Message-----
> > > From:	Stephan Herrmann [SMTP:[hidden email]]
> > > Sent:	Friday, July 18, 1997 1:32 PM
> > > To:	Bret Mogilefsky
> > > Subject:	Re: [ANNOUNCE] Lua 3.0 -- an extensible extension
> > > language
> > > 
> > > Hi,
> > > 
> > > Congratulations, after Lua 3.0 has been out for about two weeks,
> let
> > > me
> > > say, it really is a neat tool! The addition of tag methods feels
> > very
> > > nice. Especially when integrating different kinds of userdata, but
> > > also 
> > > for tables with different semantics it is a great advantage to be
> > > able, 
> > > to define access to each kind really independently from any other.
> 
> > > (Special thanks to Roberto :-)
> > > 
> > > How does tklua blend into this picture? (Hi Waldemar :-) Has
> anybody
> > > experience on how it works in Lua 3.0 (of course it is compatible
> > with
> > > 
> > > Lua 2.5, but I'm not sure if the integration of tklua-Lua2.5 was
> not
> > a
> > > bit to 
> > > tight for this version shift??). Just asking, before I will invest
> > > effort on 
> > > my own part. I figure, tklua is also a _very_ _good_ candidate for
> > > using tag 
> > > methods. A matter of effort, I guess? What are the current plans?
> > > 
> > > The next question, I would like to raise, concerns some kind of
> > > contributions
> > > shelf. There is a lot of things, that probably several people have
> > > already
> > > solved seperately. More common solutions are still to come. Little
> > > things,
> > > I would like to share, range from a "require"/"provide" style of
> > > module concept over an elaborated OO-implementation upto ??? Is it
> > > worth
> > > putting up a contrib directory on the ftp-servers, both for
> lua-code
> > > as well
> > > as for C-modules, that integrate additional functionality into the
> > > interpreter?
> > > 
> > > Next my very technical question: is it possible/desirable to
> include
> > > "==" into the set of events that can be bound to tag methods at
> > least
> > > for
> > > userdata? I have a library, which return different handles for the
> > > same object,
> > > everytime asked. It is of course only a slight matter of syntax,
> > > whether I
> > > still can write ref1 == ref2 to mean the obvious or whether I need
> > to
> > > go through the "gettable" tagmethod and bind a function to
> > > ref1:eq(ref2).
> > > 
> > > I'm extremely pleased to be able to bind "gc" differently for
> every
> > > tag.
> > > Especially userdata, that refer to all kinds of "external"
> > resources,
> > > need this heavily. I was just wondering (no definitiv need yet,
> just
> > > curious),
> > > whether the garbage collector can be triggered explicitely, when
> > > resource go
> > > down. I forgot the calling scheme.
> > > 
> > > Ah, and now my question about the luac/dump/undump technology: is
> it
> > 
> > > possible (how??), to dump at runtime a single function as
> byte-code
> > > into
> > > a -say- database, and during a later session retrieve this
> function
> > > and
> > > install it via dostring()? I wouldn't be afraid to go through the
> > > C-API.
> > > Looking (superficially) at some luac -u output, I got the
> > impression,
> > > that
> > > lua bytecode is modular in that it doesn't contain references
> > accross
> > > functions, is this right? 
> > > 
> > > That's all for today. I will keep trying Lua by all means! Until
> now
> > > it
> > > didn't break :-)
> > > 
> > > Stephan
> > > 
> > >
> >
> ----------------------------------------------------------------------
> > > ----
> > > 			  Stephan Herrmann
> > > 			  ----------------
> > > 	GMD-FIRST				   TU-Berlin
> > >  Gesellschaft f. Mathematik			 FB Informatik
> > >    u. Datenverarbeitung				Softwaretechnik 
> > >      [hidden email]
> > [hidden email]
> > >   Phone: ++49 30 6392 1870
> > >
> >
> ----------------------------------------------------------------------
> > > ----

Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE] Lua 3.0 -- an extensible extension language

Roberto Ierusalimschy
In reply to this post by Stephan Herrmann
> Next my very technical question: is it possible/desirable to include
> "==" into the set of events that can be bound to tag methods at least for
> userdata?

We have discussed this point for a long time. The problem is table indexing:
We would like to assume that if "a==b" then t[a] is the same position of
t[b]. An aparent (and tempting) solution would be to keep the above
implication, that is, table indexing would also use the tag method '=='.
But suppose the program redefines the operation '==' for an index, what
would happen to the table?? (For instance, we have a~=b, and t[a]=1 and 
t[b]=2. But then we change equality so that now a==b. What would happen
to 't'?). Because of these strange behaviors, we have decided to keep
equality fixed (at least for now).


> I just learned a few new Hawaiian words today:
> [...]
> Lua - Toilet / Bathroom

We knew about that. It also means something in Vietnamit (just check the
newsgroup "soc.culture.vietnames"). And it also means something related
to marcial arts (check "rec.martial-arts"), etc. The problem is that it
is very difficult to find a short word without other (and sometimes negative)
meanings in all other languages on the earth. As most of you already know,
"Lua" means "moon" in Portuguese (similar to "luna" in Spanish), and in
our language it is a very beautiful word. We do appologize for any
other unintentional meaning :-)

-- Roberto