[Bese-devel] Re: Proposal (was: [Lispweb] [ANN] UnCommon Web 0.2 - learning to walk)
rm at fabula.de
rm at fabula.de
Tue Mar 2 18:34:54 UTC 2004
On Tue, Mar 02, 2004 at 07:17:14PM +0100, Marco Baringer wrote:
>
> I think it's an excellent idea (sorta goes against the whole "code in
> one place presentation elswhere" idea, but I'm still deciding about
> that).
Well, i just got tired ouf having to build a deeply nested plist
that mirrors the objects i want to render -- the code has to walk
the object structure to create the plist which is then walked by the
tal function.
> However, we'd need to define a tal enviroment api, would this
> cover everything you need:
>
> (defgeneric lookup-tal-variable (name enviroment)
> (:documentation "Return the value assciated with NAME (a
> symbol) in the enviroment ENVIROMENT."))
>
> (defgeneric extend-tal-enviroment (new-env old-env)
> (:documentation "Create a new enviroment with all the bindings
> in both NEW-ENV and OLD-ENV. If both enviroments bind the same
> names the bindings in NEW-ENV must shadow those in OLD-ENV."))
>
> (defgeneric add-binding (name value enviroment)
> (:documentation "Create a new enviroment which is like
> ENVIROMENT but also has VALUE bound to NAME."))
Ah, i see. So your code does in fact modify the environment.
I guess i would imagine a stack based environment object with a generic
'fetch-value (name)'. A lookup would would apply this method to all
objects on the stack until successfull.
>
> This should be enough to genericly implement DOLIST and INCLUDE which
> are, so far, the only tags i have which mess with the enviroment. It's
> been implemented in yaclml--dev--0.4--patch-5.
Good ;-) I'll check it out.
> Makes me wonder if cacheable/lazy enviroments would be a good idea.
In certain cases i'd think so.
>
> p.s. - Would it be dificult to write an araneida backend for ucw?
Gosh, i'm not the person to ask this, just an araneida beginner myself
(desperately lokking for documentation) :-) I would be fine to have one
but i'm affraid i'm way too busy right now to hack one myself.
Thank's
RalfD
> -
> Marco
> Ring the bells that still can ring.
> Forget the perfect offering.
> There is a crack in everything.
> That's how the light gets in.
> -Leonard Cohen
>
>
> _______________________________________________
> Lispweb mailing list
> Lispweb at red-bean.com
> http://www.red-bean.com/mailman/listinfo/lispweb
More information about the bese-devel
mailing list