GSoC proposal

A few days ago I made a short proposal for a GSoC project: trac

I hope to explain a little bit better why a 3d user interface for hackage is desirable und how to do it. Chrome, Firefox and Webkit (Apple) now support WebGL meaning that the following pictures should roughly be possible inside a browser:

A picture from a motorola campaign

A picture produced by the company gamr7: http://www.gamr7.com (with modifications)

The second picture was modified to illustrate the potential of visualization. The yellow lines show code and dependencies. Similar things have been done by others (I had this idea on my own): codecity . I want to do this in a very general way. I was able to convince the advisor of my diploma thesis to let me do half of it about visualization of flow networks. This was hard but he finally agreed (maybe because Haskell programmers are rare and he had a plan to translate flow networks into Haskell). In the visualization part I layed foundations to make a visualization like the above. I use symmetry classes (based on the book “the symmetries of things” ) and a way to produce smallest deviations of symmetry.

In what ways will this project benefit the wider Haskell community?  

At the end of the 3 month period:

  • The visualization will let programmers quicker find a library they need (see changes, etc. ), because the visualization algorithm is like reversed pattern recognition to produce most recognizable shapes.
  • The code size, popularity, dependencies, whatever the community demands can be integrated or left away
  • A general way to extend or change the visualization

=> Haskell could have an impressive package repository.

The people who implement WebGL in Browsers (like Google) could have a poster child application

After GSoC:

  • A framework could emerge that lets you show visualizations near to the library, the code, the code-line. This allows more freedom than opening a separate graphics window. I.e. it could be helpful sometimes to see how example data is transformed by a function
  • A visualization of data structures could be on the channels of flow networks as a first step and help debugging programs. I personally would enjoy it if I could find the bug in the triangulation algorithm of one of my libraries. That is very hard with a command line
  • Having an alternative to bindings to UI-libraries

What deliverables do you think are reasonable targets? Can you outline an approximate schedule of milestones?

Milestone 1

  • Change Sourcegraph to parse all libraries (not only one), the result should be a big graph of all code
  • Experiment with a spring layout for the placement of libraries. The springs could be dependencies
  • Maybe somewhere in the hierarchy Graphviz could be used for the layout: Convert the graph with Graphviz and parse the annotated dot files with language-dot
  • A data structure is generated from various data sources and then transformed into a collada file with my library collada-output

Milestone 2

  • Use a WebGL engine to display the collada file. The problems here are most likely the picking, zooming and following of a link
  • Integration into Hackage2 as an optinal link
  • Helping to finish Hackage2
  • Documentation, everything I have forgot

Why do you think you would be the best person to tackle this project?

I did the relevant libraries to prepare this, among it a library that is a complete reprogramming of Freetype2 (as mentioned above it is hard to find algorithmic errors). Other people who did shape generation (also here in the Haskell community) haven’t considered symmetry as thorougly as me. Maybe Cabal and GHC are more important but this visualization project could in the long term help to understand Cabal and GHC and there is also a lot to do.

About these ads

8 Responses to GSoC proposal

  1. I’m more than willing to help any student out with using SourceGraph and graphviz; at the very least I’ve been intending of de-coupling the call-graph aspect of SourceGraph into its own library for a while now.

    May I ask though why you think it would be preferable to use language-dot rather than graphviz?

    • tillmannvogt says:

      Graphviz can produce various outputs. SourceGraph (when I examined it) produced html files with links to svg files. I mentioned language-dot because maybe xdot files (annotated dot) are easier for extraction of the exact positions of lines, curves, text etc. than to extract this data out of an SVG.

      • I meant my graphviz library if you’re only wanting to play with the Dot code (though SourceGraph does currently spit out .dot files as well).

        However, I think it would be best to split out the part of SourceGraph that creates the call-graph rather than re-trying to parse .dot files in.

        That said, I didn’t realise that xdot utilised new attributes; I might add them into graphviz itself for anyone that wants them.

      • tillmannvogt says:

        Looking at lanuage-dot it seems it doesn’t support xdot (error by me)

        Let me make it clearer what I need: I need is a graph (fgl) that contains drawing information. Citing the FAQ of your graphviz library: The ability to augment Dot and FGL graphs with positioning information by round-trip passing through Graphviz.
        Does this mean that the graph in fgl has the positionig information generated by Graphviz? I guess not so somehow either xdot or svg have to be parsed and this information has to be added to the fgl graph.

      • Yes, you can do so. Some work will be required (in that you’ll have to convert find the Pos Attribute and convert the Pos value it contains into the format that you want) but you can get the FGL graph, convert it to a Dot one, augment it and then convert it back into an FGL graph.

  2. Sam Martin says:

    “Use a WebGL engine to display the collada file”.

    Personally, I suggest ignoring the WebGL element of this proposal. It adds extra risk to your project for little benefit. Doing the visualisation in something like Processing would give you essentially the same results and for less work.

    However, for the output of the project to be really useful, the visualisation itself has to be useful. Other than RockScroll, I haven’t seen a visualisation of my code that actually helps me code (yet). This makes this more of a research project.

    • tillmannvogt says:

      Thanks for your comment.
      WebGL is the fastest way for others to judge if the visualization is useful. I also thought people from Google might like this. Some of the WebGL engines have collada-support, so it should work. Processing means programming in Java, which is boring.

      >Other than RockScroll, I haven’t seen a visualisation of my code that actually helps me code (yet). This makes this more of a research project.
      I am also not very convinced what others did in software visualization. But one thing that would be nice to have is a visual debugger to find errors in graphics algorithms (Seeing intermediate results). Opening a new graphics window in eclipse would seem to me like a bad solution. The preliminary work for this is shape generation and since debugging is to hard for 3 months I instead chose adding a new visualization to SourceGraph.

      • Sam Martin says:

        Not sure I’d agree that WebGL is the fastest and that Processing is boring, but hey. :)

        I’m a graphics programmer. In practice, I find your renderer is your best debugger – just get it to render the information you need. You can edit shaders, recompile and reload without recompiling, so iteration fast is good. Also, do check out PIX, which is a decent graphical pipeline debugger.

        That’s not to say that different/better visualisations wouldn’t be really kick ass. Just I’m not sure what they are.

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

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: