[Haskell-cafe] Re: ANN: diagrams 0.2

Brent Yorgey byorgey at seas.upenn.edu
Sat Jan 31 18:45:06 EST 2009

On Sat, Jan 31, 2009 at 06:23:29PM -0500, Braden Shepherdson wrote:
> Brent Yorgey wrote:
>> I am very pleased to announce the 0.2 release of the diagrams package,
> Would this make a handy plugin for gitit? I'm currently putting diagrams 
> together in xfig and saving them to my gitit tree while taking notes in 
> gitit, but being able to write diagrams code into gitit would be great.
> How easy or hard would this be to accomplish?

Well, the short answer is: I think diagrams would be very well-suited
to this, and the difficulty probably depends more on gitit than
diagrams.  Perhaps someone who knows more about gitit can speak to
this as well.

In theory, it should be easy to write a plugin which takes some
Haskell code defining a top-level binding 'dia' (or something similar)
of type Diagram, wraps it in some appropriate imports and an
appropriate one-line definition for main, then compiles and runs it in
a sandbox and sticks the generated image in the wiki output. The
devil's in the details, of course: you'd probably want to cache the
generated images indexed by a hash of the diagrams code that generated
them, to avoid recomputing the image every time the page loads.  And
there are probably other considerations I'm not thinking of.


More information about the Haskell-Cafe mailing list