lua-users home
lua-l archive

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


To further elaborate on Steve's requests...

On Thu, Dec 11, 1997 at 05:29:53PM -0200, Steve Dekorte wrote:
> Is there any way to ask Lua for the source code of a function?
> If not, what's the best way to add this feature?

Steve and I have been talking about his work on a Graphical development
environment for Lua. (he's writing it under OpenStep) It would be
convinent to be able to access VM code bytes and source code. Accessing
the VM bytes is not difficult. However, the source is parsed and thrown
away. We were thinking about changing the parser so that it would store
the source code for function blocks as it parsed them, and attach them to
the object. Not all function objects would have source attached, but if
one did, then you wouldn't have to look any further for the source.

This is leading down the path to a more "smalltalk like" development
system where you work within an image, and make changes within the system,
and then "persist" out the whole system. The system can then be loaded in
back to it's original state. 

There are also a few problems with connections to the outside world. 
Whether it's an open file descriptor, or some C code holding a lua_ref to
something, re-creating this attachment when the image is reloaded can be
troublesome. 

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + jeske@chat.net