[stringtemplate-interest] visualizer mockup

Gerald Rosenberg gerald at certiv.net
Wed Nov 25 18:01:53 PST 2009


At 04:36 PM 11/25/2009, Barrie Treloar wrote:
>On Thu, Nov 26, 2009 at 5:52 AM, Terence Parr <parrt at cs.usfca.edu> wrote:
> >> Is this meant to be a static inspection of the template? i.e some
> >> meta-data about template generation - which either resides inside the
> >> template or perhaps in another source (file, socket stream, etc)
> >
> > I think we should collect all data like a flight data recorder 
> and then ship to the GUI.  Unlike AW, i doubt step by step eval is useful.
> >
> >> Or is this meant to be something dynamic so that as the template is
> >> generated you can see what is going on?
> >
> > static data but interactive
>
>So why can't the meta data be embedded into the template when debug is
>turned on?
>It will bloat the template but assuming the template output format
>support start/end comments then everything will be in one place.
>Failing that store it in a sibling metadata file like "template-name".meta
>
>No need for sockets or fancy trickery.

Sockets per se are easy - IME it is the marshalling and unmarshalling 
of data (your metadata) that is clumsy and error-prone.  PB and 
Thrift appear to provide a simple fix for that problem.  They also 
provide convenient cross-language bindings (tool can be implemented 
in Java, ST4 in Java, C#, Python, and etc.) which is a big 
win.  Thrift even looks like it hides the socket use.  You also get 
remote-system execution almost for free.

Writing and then reading the metadata from disk would still leave you 
with the marshalling and cross-language issues. 



More information about the stringtemplate-interest mailing list