You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Jason van Zyl <jv...@periapt.com> on 2000/09/25 00:00:47 UTC

Licensing question

Hey,

JPython uses JavaCC for it's interpreting but it
also uses a visitor to compile the jpython script
down to bytecode. It has various other tools as
well. This is probably the closest thing I've seen
to to a tool that could be directly used for
Velocity. It's a CNRI license which probably isn't
compatible, so I was thinking I might ask the author
of JPython if we could work something out. Any
suggestions? I don't actually know how useful
it will be, but it's a compiler using a visitor
generated by JJTree the same tools used by
Velocity.

jvz.

-- 

Jason van Zyl
jvanzyl@periapt.com


Re: caching

Posted by "Daniel L. Rall" <dl...@finemaltcoding.com>.
Jason van Zyl wrote:
> 
> On Sun, 24 Sep 2000, Daniel L. Rall wrote:
> 
> > Jason van Zyl wrote:
> > >
> > > On Sun, 24 Sep 2000, Jon Stevens wrote:
> > > > Also, I still don't understand how you can't just get a reference to the
> > > > root of the parsed tree and simply serialize it to disk.
> > >
> > > I think that is totally possible as well. I was just looking
> > > the the JPython source and it just hit home. Serializing
> > > an optimized AST will probably going tohappen long before the
> > > compiling phase does.
> >
> > I hope we keep the parsed AST in memory until Velocity needs to restart
> > or shutdown, *then* write to disk.
> 
> I was talking more along the lines of deployment, having a
> bunch of serialized/compiled templates in the webapp that
> get picked up when the webapp starts. But we could definitely
> employ the serialization to prevent having to parse a whole
> set of templates again on startup.

Yummy.  Sounds like a good thing to deploy in a WAR.
-- 

Daniel Rall <dl...@finemaltcoding.com>

Re: caching

Posted by Jason van Zyl <jv...@periapt.com>.
On Sun, 24 Sep 2000, Daniel L. Rall wrote:

> Jason van Zyl wrote:
> > 
> > On Sun, 24 Sep 2000, Jon Stevens wrote:
> > > Also, I still don't understand how you can't just get a reference to the
> > > root of the parsed tree and simply serialize it to disk.
> > 
> > I think that is totally possible as well. I was just looking
> > the the JPython source and it just hit home. Serializing
> > an optimized AST will probably going tohappen long before the
> > compiling phase does.
> 
> I hope we keep the parsed AST in memory until Velocity needs to restart
> or shutdown, *then* write to disk.

I was talking more along the lines of deployment, having a
bunch of serialized/compiled templates in the webapp that
get picked up when the webapp starts. But we could definitely
employ the serialization to prevent having to parse a whole
set of templates again on startup.

jvz.
 
-- 

Jason van Zyl
jvanzyl@periapt.com


caching

Posted by "Daniel L. Rall" <dl...@finemaltcoding.com>.
Jason van Zyl wrote:
> 
> On Sun, 24 Sep 2000, Jon Stevens wrote:
> > Also, I still don't understand how you can't just get a reference to the
> > root of the parsed tree and simply serialize it to disk.
> 
> I think that is totally possible as well. I was just looking
> the the JPython source and it just hit home. Serializing
> an optimized AST will probably going tohappen long before the
> compiling phase does.

I hope we keep the parsed AST in memory until Velocity needs to restart
or shutdown, *then* write to disk.
-- 

Daniel Rall <dl...@finemaltcoding.com>

Re: Licensing question

Posted by Jason van Zyl <jv...@periapt.com>.
On Sun, 24 Sep 2000, Jon Stevens wrote:

> on 9/24/2000 3:00 PM, "Jason van Zyl" <jv...@periapt.com> wrote:
> 
> > JPython uses JavaCC for it's interpreting but it
> > also uses a visitor to compile the jpython script
> > down to bytecode. It has various other tools as
> > well. This is probably the closest thing I've seen
> > to to a tool that could be directly used for
> > Velocity. It's a CNRI license which probably isn't
> > compatible, so I was thinking I might ask the author
> > of JPython if we could work something out. Any
> > suggestions? I don't actually know how useful
> > it will be, but it's a compiler using a visitor
> > generated by JJTree the same tools used by
> > Velocity.
> 
> Talk to the author.
> 
> Also, I still don't understand how you can't just get a reference to the
> root of the parsed tree and simply serialize it to disk.

I think that is totally possible as well. I was just looking
the the JPython source and it just hit home. Serializing
an optimized AST will probably going tohappen long before the
compiling phase does.

jvz.

-- 

Jason van Zyl
jvanzyl@periapt.com


Re: Licensing question

Posted by Jon Stevens <jo...@latchkey.com>.
on 9/24/2000 3:00 PM, "Jason van Zyl" <jv...@periapt.com> wrote:

> JPython uses JavaCC for it's interpreting but it
> also uses a visitor to compile the jpython script
> down to bytecode. It has various other tools as
> well. This is probably the closest thing I've seen
> to to a tool that could be directly used for
> Velocity. It's a CNRI license which probably isn't
> compatible, so I was thinking I might ask the author
> of JPython if we could work something out. Any
> suggestions? I don't actually know how useful
> it will be, but it's a compiler using a visitor
> generated by JJTree the same tools used by
> Velocity.

Talk to the author.

Also, I still don't understand how you can't just get a reference to the
root of the parsed tree and simply serialize it to disk.

-jon

-- 
http://scarab.tigris.org/    | http://noodle.tigris.org/
http://java.apache.org/      | http://java.apache.org/turbine/
http://www.working-dogs.com/ | http://jakarta.apache.org/velocity/
http://www.collab.net/       | http://www.sourcexchange.com/