lua-users home
lua-l archive

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

On Mon, Feb 8, 2010 at 4:11 PM, Doug Rogers
<> wrote:
> That's on my list of things to try - and perhaps splitting the two uses
> of the FILTER call, as indicated in another thread. I installed the
> token filter patch a number of times and I even began tweaking it, but
> never finished the task.

Well, we have the same thing on our lists ;)  The way I was thinking,
was to provide a simple Lua API, one for registering the module
callback (the first use of "FILTER") and within that callback another
function for registering the actual filter. This has two big
advantages (a) global FILTER is no longer used and (b) you can decide
in the first callback whether you wish to filter that particular
module. So it is then easy & efficient to only filter code loaded with
loadstring, etc.

It occurred to me that people might also want to register C filters,
which would be more efficient.

Although in my experience, token filtering with Lua is suprisingly
fast, and would only be noticeable with really big projects.

> And there are many of my own mostly-finished libraries and wrappers that
> should be placed on LuaForge. But there's always home maintenance and
> putting the kids through school, oh, and work. *sigh* So much fun, so
> little time...

Yes, sigh, that's a common problem!  My queue has more puts than gets.

steve d.

PS. I'll do a prototype sometime this week