diagrams 0.2.1, and future plans

First of all, I’ve just released version 0.2.1 of the Haskell diagrams library. This is a minor release which fixes a few bugs and adds a few new combinators, most notably a grid layout combinator contributed by Ganesh Sittampalam. For more information and a full list of the features new to 0.2.1, see the diagrams web page.

The real reason for the release, however, is to get existing new features out the door before gearing up for a planned major rewrite of the backend to use a constraint-solving layout engine. This will allow for much greater elegance and flexibility, as well as a number of features (such as arrows connecting different parts of the diagram) which would be difficult or impossible to implement in the current framework.

My ultimate vision is for the diagrams library to become a viable alternative to declarative drawing systems such as MetaPost and Asymptote, with the distinct advantages that it will be

  • purely declarative, and
  • an embedded DSL, providing the full power of Haskell and its ecosystem, as opposed to the ad-hoc specialized languages used by MetaPost and Asymptote.

If this sounds exciting to you, I hope you’ll join me, either by trying out diagrams for your projects and providing feedback, or by contributing some code. If you’re interested in helping with the rewrite itself, let me know; I also plan to set up a core/contrib model like that of xmonad, so there should also be plenty of opportunities for contributing independent add-on modules which enhance the core functionality.

About Brent

Assistant Professor of Computer Science at Hendrix College. Functional programmer, mathematician, teacher, pianist, follower of Jesus.
This entry was posted in haskell, projects and tagged , , , , , . Bookmark the permalink.

10 Responses to diagrams 0.2.1, and future plans

  1. paul says:

    Keep on the good work, this sounds very promising to me ! I’m tired of metapost obscure errors and sytax rules.

  2. Paul Liu says:

    Thanks for the great work! Would you consider supporting multiple rendering frontends (or backends? I never understood the use of such terms), so that the core diagram EDSL doesn’t commit itself to a particular implementation (such as Cario).

    I once thought about continuing the work of Antony Courtney’s Haven package, but never really had time to pick it up. I’d very much like to see a EDSL for functional vector graphics that does real-time rendering through hardware accelerated OpenGL pipeline.

    So can I add to the goal for diagram not only to be an alternative to MetaPost, but also to Powerpoint and Keynote?

    • Brent says:

      Yes, supporting multiple rendering methods is definitely something I’ve thought about before, and shouldn’t actually be too hard. But actually adding an OpenGL renderer will probably have to be done by someone else, so hopefully I’ll pick up some collaborators! =)

  3. Lenny222 says:

    I’d support separating the language from it’s rendering backends. Many nice Haskell packages are tied to Cairo, which is a pain to install, especially on a Mac.

    If you’d design for different backends, someone could create PDF diagrams using the pure Haskell HPDF library.

  4. Lenny222 says:


    i added a stub for “diagrams” on the Haskell wiki, including some of my thoughts for the rewrite:

    I hope you don’t mind and that you will add your thoughts too.


    • Brent says:

      Thanks! I don’t mind, although I think we do have slightly different ideas about where this is going. For example, I have no plans to support things like function or density plots; I think that’s a job for another library, or perhaps for a add-on module. It is too specialized to go in the core diagrams DSL.

      I’ll add more thoughts as I have them, although note that this may be a long process. =)

  5. Pingback: Collecting attributes « blog :: Brent -> [String]

  6. Paul Brauner says:


    I know you’re working hard on important stuff but do you plan to continue working on diagrams anytime soon? I’m really excited about that library!

    • Brent says:

      I do! I am really excited about it too. It can just be hard to find time to fit in “hobby” projects like this. But I have a bunch of deadlines at the end of this week/beginning of next week, and I hope to find some time to get back into it even next week.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s