This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Servlet based implementation of brl.


On 08/17/2009 07:00 AM, Bruce Lewis wrote:
I'm comfortable with moving gnu.brl into gnu.kawa.brl.

Or perhaps vice versa. More BRL code probably references gnu.brl than gnu.kawa.brl.

Also, gnu.brl is more similar to what I've some for other
languages (like gnu.xquery.*), and make less-verbose
sub-packages (like gnu.brl.util).

Give than you already control gnu.brl, I'm fine
with whatever you prefer.

I think of BRL as an extension of Scheme, so it would make sense to
share a namespace if that's practical.

The namespace of pre-defined names is clearly different. Kawa does support a shared (multi-language) user environment. The idea is that use user-context has its own user Environment. By default this is per-thread, which means per-CallContext. but it is possible to set the user Environment of a CallContext, and thus multiple threads can share a user Environment, or you can explicitly switch user Environments. Each user Environment is backed up by the "global Environment", which normally is a shared instance of BuiltinEnvironment, which indirects to the per-language builtin Environment.

See gnu.mapping.CallContext.getEnvironment and
gnu.expr.BuiltinEnvironment.  The Environment.global is
normally the BuiltinEnvironment.instance.

So a shared user Environment should be fine even if we mix
multiple Languages.

In BRL 2 each page had its own scope.  You could define variables in
individual pages without worrying about whether a global variable had
the same name.  Does it work the same way in the Kawa servlet's
module-based system?

The Kawa servlet interface could do with some TLC. (One of my goals is to add support for the com.sun.net.httpserver in Java 6.) I had plans to dig into this - but after release Kawa 1.10, and after spending some more time on performance issues. But if if you have some changes you'd like I'll certainly consider them. -- --Per Bothner per@bothner.com http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]