[Haskell-cafe] darcs patch dependencies in dot format

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Wed May 16 11:50:54 CEST 2012


On 16 May 2012 19:43, wren ng thornton <wren at freegeek.org> wrote:
> On 5/12/12 8:52 AM, Sönke Hahn wrote:
>>
>> Any comments or suggestions?
>
>
> Cabalize it and release it on Hackage. But especially the cabalization part
> :)
>
> You should probably farm out the toDot rendering to one of the libraries
> that focuses on that[1], since they'll have focused on the efficiency
> issues--- or if they haven't, then you can contribute improvements there,
> helping everyone win. In particular, you're using Strings which is a
> notorious performance sink. Using Text or ByteStrings would be far better.
>
> Also, have you compared your transitive reduction to just outputting the
> whole graph and then using `tred`? The latter approach has the distinct
> downside of needing to serialize the whole graph; but it could still be a
> win unless you intend to implement similar algorithms yourself. The smart
> algorithms do *much* better than brute force.

I would like to point out that graphviz has a native implementation of
tred (well, analogous rather than exact re-implementation).

I also haven't joined this discussion before now, but some of the
reduction algorithms in Graphalyze [1] (as used in SourceGraph [2])
might be applicable, though I admit they're not the best possible
implementations

[1]: http://hackage.haskell.org/package/Graphalyze
[2]: http://hackage.haskell.org/package/SourceGraph

>
> And of course it'd be nice to be able to pass arguments to the program in
> order to filter and otherwise manipulate the resulting graph. A lot of that
> can be done by special programs which only know about the Dot language
> (e.g., tred), so you should only focus on things which aren't captured by
> the Dot language or are otherwise only knowable by querying Darcs.
>
>
> [1] Like graphviz or language-dot:
>
>    http://hackage.haskell.org/package/graphviz
>    http://hackage.haskell.org/package/language-dot
>
> Though it doesn't look like those are used by the various other foo2dot
> programs on Hackage:
>
>    http://hackage.haskell.org/package/hs2dot
>    http://hackage.haskell.org/package/prof2dot
>    http://hackage.haskell.org/package/scons2dot
>    http://hackage.haskell.org/package/vacuum-cairo
>    http://hackage.haskell.org/package/vacuum-opengl
>
> So perhaps there's some issue with those libraries...
>
> --
> Live well,
> ~wren
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe



-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
http://IvanMiljenovic.wordpress.com



More information about the Haskell-Cafe mailing list