Skip to content

Instantly share code, notes, and snippets.

@co-dan

co-dan/gsoc.md Secret

Last active December 16, 2015 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save co-dan/437e9694563c0c13dd8e to your computer and use it in GitHub Desktop.
Save co-dan/437e9694563c0c13dd8e to your computer and use it in GitHub Desktop.

interactive-diagrams and a paste site with the ability for dynamic rendering of diagrams

I want to build an active-diagrams library for compiling diagrams [1] code into active HTML + JS widgets. The diagrams are active in the sense that user can interact with them: for example, a result of type (Bool -> Diagram) should be compiled to a widget that renders a diagram depending on the state of the checkbox.

In addition, a pastebin site should be built, that can be used as an interactive scratchpad, where diagrams code can be automatically compiled and the graphical output shown along. This is useful for sharing graphical experiments, teaching beginners and so on. The rendered diagram, together with its interactive capabilities, should be easily embedded in third-party blogs, websites.

The library should be easy to embed into the third-party code and the paste site should be secure enough for public use.

Questions

  • What is the goal of the project you propose to do?

    The goal is to create a pastebin site with support for diagrams rendering and a general library for rendering diagrams to HTML widgets.

    The result library/site should be reasonably fast to use and safe to install.

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

    A pastebin site can be used as an interactive scratchpad for helping out people on IRC/Reddit/mailing lists, for creating runnable snippets, sharing experiments. Additional the produced library can be incorporated into Wolfgang [1] or School of Haskell [2]. Bloggers can use the interactive snippets in their tutorials/articles.

    [1] http://hdiff.luite.com/wolfgang/ [2] https://www.fpcomplete.com/

  • Can you give some more detailed design of what precisely you intend to achieve?

    1. Extend hpaste with something that compiles and renders diagram to an .svg or a .png;
    2. Allow only for safe code to be compiled (use mueval, allow verified libraries from Stackage), manage resources carefully (set a resource limit for each snippet, use only single GHC process constantly running in the background);
    3. Use GHCJS to compile diagram to a piece of code runnable on a client.
    4. Add different types of HTML widgets for functions. E.g.: (Double -> Diagram) would render into an input box + button, (Bool -> Diagram) would have a checkbox, etc;
  • What deliverables do you think are reasonable targets? Can you outline an approximate schedule of milestones?

    • During the community bonding period I would like to come to the agreement with my mentor on the issues of design choices, start working on the first prototype, set up all the infrastructure (repository, blog, web-site).

    • During the first stage (up to mid-term evaluation, July 29th) I plan on building the initial prototype, figure out most of the safety/resource management issues, make use of GHCJS to add an ability to create runnable snippets. Publish the first results, set up a prototype online for people to play with. Start working on widget support.

    • During the next stage (until the beginning of September) I would like to work on the second part of the project (adding widget support), integrating into Wolfgang.

    • From the beginning of September and until the "pencils down" (September 23) deadline I plan on polishing the documentation, fixing bugs, releasing the project libraries on hackage.

  • What relevant experience do you have? e.g. Have you coded anything in Haskell? Have you contributed to any other open source software? Been studying advanced courses in a related topic?

    • I have taken a course on functional programming
    • I have been mostly teaching myself Haskell (and FP) a lot, reading papers, lecture notes, following courses which put their material online (like Chalmers AFP course)
    • During the present school year in my university I have been working on a model checking tool in Haskell
  • In what ways do you envisage interacting with the wider Haskell community during your project? e.g. How would you seek help on something your mentor wasn't able to deal with? How will you get others interested in what you are doing?

    I would set up a blog where I would regularly write about new updates, project progress, encountered problems and solutions. I will be active on Haskell and Diagrams IRC channels. If my mentor is not being able to deal with some problem I will not hesitate to seek help on haskell-cafe mailing list or on reddit/stackoverflow. I also plan on rolling out a work-in-progress version of the project online for people to play with. The code for the project will be available on GitHub/BitBucket.

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

    I am keen on learning new things, full of motivation and always have been fascinated by functional programming in general and Haskell in particular.

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment