lua-users home
lua-l archive

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


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 
     sh@first.gmd.de			    stephan@cs.tu-berlin.de
  Phone: ++49 30 6392 1870
--------------------------------------------------------------------------