r/haskell • • Feb 20 '15

Haskell Google Summer of Code Proposal Brainstorming

Haskell.org has applied to be a mentoring organization to the Google Summer of Code. We've been a participating mentoring organization in the Summer of Code since 2006. While we won't know for a couple of weeks if Google has accepted us into the program, it is probably a good idea for us to get our house in order.

We have a Trac full of suggested Google Summer of Code proposals both current and from years past, but it could use a whole lot of eyeballs and an infusion of fresh ideas:

https://ghc.haskell.org/trac/summer-of-code/report/1

If you have a proposal that you think a student could make a good dent in over the course of a summer, especially one with broad impact on the community, please feel free to submit it to the Trac, or just discuss it here.

If you are a potential student, please feel free to skim the proposals for ideas, or put forth ones of your own.

If you are a potential mentor, please feel free to comment on proposals that interest you, put forth ideas looking for students and express your interest, to help us pair up potential students with potential mentors.

Ultimately, the project proposals that are submitted to Google for the summer of code get written by students, but if we can give a good sense of direction for what the community wants out of the summer, we can improve the quality of proposals, and we can recruit good mentors to work with good students on good projects.

Resources:

  • We have a wiki on https://ghc.haskell.org/trac/summer-of-code/ It is, of course, a Wiki, so if you see something out of order, take a whack at fixing it.
  • We have an active #haskell-gsoc channel on irc.freenode.net that we run throughout the summer. Potential mentors and students alike are welcome.
  • We're also adding a haskell-gsoc mailing list this year. I've created a mailing list through Google Groups: https://groups.google.com/forum/#!forum/haskell-gsoc and we've forwarded gsoc@haskell.org there. We'll continue to post general announcements on the progress of the summer of code to the main Haskell mailing list as usual, but this gives us a shared forum for students and mentors alike to talk and may serve as a better venue for longer term conversations than the #haskell-gsoc channel.
  • Many of our best proposals in years have come from lists of project suggestions that others have blogged about. Many of our best students decided to join the summer of code based on these posts. The Trac isn't the only source of information on interesting projects, and I'd encourage folks to continue posting their ideas.
  • The Google Summer of Code website itself is at https://www.google-melange.com/gsoc/homepage/google/gsoc2015 and has the schedule for the year, etc. You can register on the site today, but you can't yet join the organization as a mentor or apply as a student.
  • And of course, by all means feel free to use this space to help connect projects with mentors and students.

Thank you,

-Edward Kmett

78 Upvotes

103 comments sorted by

26

u/tel Feb 20 '15

I'd love it if Luite could pick out some jobs to move GHCJs forward.

11

u/edwardkmett Feb 20 '15

Agreed. We fed 3 slots into ghcjs last year.

11

u/luite2 Feb 23 '15

Much of the recent work on GHCJS revolves around the major codegen update I'm working on. I'm not quite sure yet what kind of codegen projects would be suitable for GSoC, since it's all still in quite early stage. The basics for source map support are in the new version, but completing it would probably not fill a whole project. The new codegen opens up many possibilities of new optimizations

One of the most requested features these days is a REPL, and the basics are already in place with the incremental code linking/loading for Template Haskell. I could make a proof of concept for setting up the session and showing simple results, the project would then involve building the complete user interface (terminal and browser), with all the commands we know from GHCi.

There's also always a need for better infrastructure. Our travis-ci setup often runs out of memory compiling ghcjs or one of its dependencies, we don't have windows tests or tests that actually run in a browser. A good test setup that also builds test suites for popular packages and the ghcjs-examples repository. Bonus points for keeping track of memory consumption and cpu time.

Wrt libraries, there's still no production quality library for incremental DOM rendering, but experience has taught us that writing this kind of library from scratch is not ideally suited for a GSoC project. If someone were to do a project improving for example ocharles' Francium or bootheads oHm library, I'd be happy to provide support and make sure the compiler itself is up to the task. If someone wants to write a library (or bindings) from scratch, they'd best start early so that we have something concrete to go by when discussing the proposals.

Anyone with a project idea (or feature request) that's not on this list, feel free to contact me or leave a reply here.

7

u/angerman Feb 25 '15

Only a marginally related topic, is bringing the Out-Of-Process Template Haskell compilation pipeline to GHC, which would enable TH for cross compilation (Raspberry Pi, Android, iOS, ...). I did some initial work on this last year, but had no time yet this year to go further with it. I should be able to pursue this more aggressively again in Q2/2015.

Subtasks could include:

  • extracting the communication logic into a common library that can be used in GHCJS and GHC
  • build a ghc <-> subprocess communication through pipes similar to what GHCJS does. 1
  • enable TH in stage1 ghc (I've got some incomplete patches for 7.8 for this)
  • improve the tooling.

I'd happily offer some guidance and assistance.


    GHC (Host) <-> runnerProcess (Host) <-> runner (Target)

where the the Host is the machine building the Target being the machine to be deployed to.

I did experiment with extending a stage1 compiler to accept TH code with the goal of using the plugin interface, such that the runnerProcess would not need to be a separate process, but could live within ghc as plugin. But I could not get this completely working yet. Hence I think the initially by Luite proposed plugin free approach with a subprocess might be easier to get working.

6

u/luite2 Mar 02 '15

I'd be happy to assist getting Out-of-Process TH into GHC proper (rather than the current API Hook that has some limitations) for a GSoC project and port GHCJS to use it (as well as stage1 and profiled GHC builds).

→ More replies (1)
→ More replies (1)

10

u/gilmi Feb 20 '15

I think Haskell can really benefit from a simple and easy to use GUI framework. Maybe something that incorporates FRP?

Good luck to all participants. Have fun!

30

u/edwardkmett Feb 20 '15

My main concern on this front is that we've pretty much thrown at least one student every other year at this problem, but I can't actually point to any tangible gains that we've really made on this front from GSoC.

A year or two back we had a student start such a project, but fairly early on we realized their goals were way out of scope, and refocused them on improving Ian-Woo Kim's fficxx bindings, and we made headway through that: https://github.com/wavewave/fficxx

We've also had a pretty bad track record of success where "student designed libraries" are concerned in general.

So I think something that was less ambitious and focused on a narrower domain, and/or contributions to an existing codebase, might have a better chance of success than yet another greenfield GUI framework.

3

u/gilmi Feb 20 '15

I understand. thanks for the reaponse!

3

u/sclv Feb 20 '15

A proposal on wx bindings or wx widgets libs or the like is a good candidate there.

I would also be happy to see continued improvements to gtk2hs for that matter.

→ More replies (2)

3

u/agocorona Mar 06 '15 edited Mar 07 '15

Ops I did not see this.

I paste here my idea about a fully composable GUI layer on top of an already existent GUI framework :

I'm after the creation of the first truly composable GUI toolkit ever. where widgets can be combined by means of monadic, applicative, alternative and monoidal combinators.

I would mentor anyone interested in or outside of GSOC. Perhaps it is too late and this is too little detailed, but the project can be achieved in a month work and would show how Haskell can solve a longstanding problem: the non composability of GUIs. That achievement could attract much attention from the software industry.

The idea start from well tested stuff. It has been tested in the Web browser as a layer on top of Haste.DOM. The Javascript Document Object Model of the Web browser has a similar architecture and interface than a GUI toolkit.

The idea is to translate hplayground, the Haskell package that implement composable widgets as a thin layer over Haste.DOM in the Web Browser and put it on top of a Haskell GUI Toolkit such is GTK, FLTK or QT.

the hplayground widgets can be composed like formelts, but instead of generating HTML, generate instead a Haste.DOM computation. When executed, this DOM produces the rendering of the widgets. The same mechanism can be used to generate the rendering of the widgets under a GUI toolkit. The widgets will reshape themselves while compute anything else like any other monadic/applicative computation. Events will execute only the portion of the computation that is in its scope. The result will be the possibility of more dynamic interfaces with much less code. and, at last, full composability of applications and libraries with GUI interfaces.

9

u/tomejaguar Feb 20 '15

I'm working on one of them, inspired by Facebook React Native. Happy to discuss it with potential students!

4

u/oiuhoihiuhioh Feb 20 '15

Not a student, but do you have some details on it? I was pondering making a textbox/button/label GUI test above reactive-banana, and I'm interested in other project.

4

u/tomejaguar Feb 20 '15

Basic outline here. I'll make a post on Reddit when there's something fit for public consumption

http://www.reddit.com/r/haskell/comments/2wii6n/haskell_google_summer_of_code_proposal/corqnqp

2

u/gelisam Feb 20 '15

I was about to start a similar project. May I join yours instead?

7

u/tomejaguar Feb 20 '15

I would be delighted! It would good to collaborate. I haven't got anything quite fit for public consumption yet but let me work on something during the weekend and get back to you.

I'll give you a quick summary of the high-level API behind my idea.

  • A widget has some value of type s representing its current state
  • The behaviour of the widget is controlled by a value of type s -> Doc e s g
  • When the widget state is fed to this function

    • it produces an element of type g which is intended to be displayed on the screen
    • the g can raise an event of type e
    • any event that the g produces can be handled to return a new widget state of type s
  • We feed the new widget state back into the function to continue the loop

As you might expect Doc is a Bifunctor (meaning you can fmap over the s and g parameters) and indeed a Biapplicative. The latter means that you can combine widgets

Doc e s g -> Doc e s' g' -> Doc e (s, s') (g, g')

Here's an explicit example, fairly close to the reactive-banana CRUD example: http://apfelmus.nfshost.com/blog/2012/03/29-frp-three-principles-bidirectional-gui/Reactive-banana-CRUD1.png

This is actually code for a React-like HTML/Javascript target, but the WX Widgets target would be exactly the same. We store the state of our crud app in the Filter type. It contains the data of what names are available to be selected in fAvailable. The filter text box state is in fFilter and the text editing and selecting widget state is combined in fTextSelect.

data Filter = Filter { _fAvailable  :: R.Radio DT.Text DT.Text
                     , _fFilter     :: T.TextEntry
                     , _fTextSelect :: TS.TextSelect Int }
              deriving Show
$(L.makeLenses ''Filter)

We also have a type for the events the filter can raise.

data FilterEvent = FilterEvent T.TextEntryEvent
                 | EditorEvent T.TextEntryEvent
                 | SelectEvent (S.SelectEvent Int)
$(L.makePrisms ''FilterEvent)

filterA is an example of how to create a widget. We make our filter widget out of a "static" value that is not displayed ("static" is maybe not the best name for this term. It can change, but it cannot emit events) a text entry widget for the filter text box (that emits FilterEvents) and a combined text box/selection widget (that emits either EditorEvents or SelectEvents).

filterA :: Filter -> Doc FilterEvent Filter [H.Element]
filterA (Filter available textFilter textSelect) =
  ((Filter, _ -> (++))
   `contains` (static available `emitting` absurd)
   `also` (T.textEntryC textFilter `emitting` FilterEvent)
   `also` (TS.textSelectC textSelect
               `emitting` either EditorEvent SelectEvent))

Because the underlying state is explicit we can manipulate it in response to events very easily. When we received an EditorEvent we update the "available" state to what the text field was edited to. When we receive a FilterEvent we update the selection to contain only elements that meet the filter criteria. When we receive a SelectEvent we update the "available" state to reflect the selection. (This example uses some nice lens syntax, but it doesn't have to if you are allergic.)

filterC :: Filter -> Doc FilterEvent Filter [H.Element]
filterC = handle _EditorEvent
          (_ -> do
              c <- L.use (fTextSelect.TS.tsText.T.tText)
              fAvailable.R.chosen .= c)

          . handle _FilterEvent
          (_ -> do
              f <- L.use fFilter
              a <- L.use fAvailable
              fTextSelect.TS.tsSelect .= availableForSelection f a)

          . handle (_SelectEvent.S.cEvent)
          (\i -> fAvailable %= R.chooseIndex i)

          . filterA
→ More replies (8)

1

u/agocorona Mar 06 '15

See my idea in this thread of a fully composable GUI layer on top of an already existent GUI framework

→ More replies (7)

10

u/wdanilo Feb 21 '15 edited Feb 21 '15

I've got 3 ideas, that would be worth to work on:

  1. Better Cabal - Cabal is great and Cabal is pure love, but sometimes Cabal can be pain in the * when working with complex dependencies. Allowing installing sub-packages in different versions would be a life-saver
  2. Better OpenGL support. Currently OpenGL support is very poor. On top of a good binding we could create complex interfaces and even a haskell based GUI library. I would personally love to contribute / create such library also - but the OpenGL support is crutial.
  3. There is a new flow-based language allowing advanced visual programming - based on Haskell and it's called Luna. It's made by an startup I'm working in (flowbox.io) and is used to create special effects for movies. I think if its development would gain some external attention, we would open-source it :)

11

u/edwardkmett Feb 21 '15

Regarding #2, I would happily work with a student who wanted to improve the new gl package.

At a lower level of abstraction, but flashier level of visibility, I also actually had a student approach me about working on an editor for quine, which might be another way to help boost visibility of Haskell, by showing we can do "real" realtime gaming and graphics.

1

u/bigstumpy Mar 12 '15

What is the difference between gl and OpenGLRaw?

2

u/edwardkmett Mar 12 '15 edited Mar 12 '15

OpenGLRaw 1.5 was limited to supporting OpenGL 3.2 and a handful of extensions.

There was OpenGLRawgen at the time, but it spit out an OpenGLRaw that had subtle differences, so it mostly wasn't used.

I needed to write a bunch of code that worked with OpenGL 4.1 rendering OpenGLRaw rather completely useless to me, so I took some code that Gabríel Arthúr Pétursson had written that autogenerated bindings based on the xml specification from Khronos, mashed it up with some ideas from OpenGLRaw and spat out gl, which binds all of OpenGL 1.0 - 4.5 as well as the mobile profiles, and all extensions that ever existed by every vendor. Along the way we went and figured out how to autogenerate some decent documentation.

Since then, gl kickstarted development on OpenGLRaw, which adopted the same approach as gl to autogenerate the modules.

Now that OpenGLRaw has adopted the gl approach the line is starting to blur.

Differences at this time:

  • gl uses shorter module names, because otherwise we run into build problems on Windows. (Apparently having 780 module names that are all long kicks us over command line lengths on windows!) OpenGLRaw keeps the old names.
  • As far as I can tell, gl supports more extensions. This may just be that OpenGLRaw figures out how to shoehorn a couple hundred more of them into fewer modules. It may be that they have to support fewer modules to build on windows: I haven't checked. They build ~520 modules though.
  • gl is automatically lifted into MonadIO. This actually sounds like it'll change in the next release of OpenGL / OpenGLRaw in response to our work on common StateVar package for quine/sdl2/OpenGL based on my foreign-var package, which is now shipped as StateVar 1.1.
  • gl uses pattern synonyms or all the #define's in the OpenGL specification. This lets you use them in both argument and pattern position and ensures that all the names are googleable. This limits gl to modern GHCs (7.8+) but rather greatly improves the performance of pattern matching on GLenums and the convenience of writing code with them.

So what is the difference? As you can see, as OpenGLRaw gradually copies all the things gl brought to the table, the differences are less and less prominent.

At the time of the release of gl the differences were as between night and day.

2

u/bigstumpy Mar 12 '15

Thanks for the response, I'll try porting my 3d vis library to gl and see how it goes. Have you considered merging the gl project with OpenGLRaw?

→ More replies (2)

2

u/semanticistZombie Feb 24 '15

Allowing installing sub-packages in different versions would be a life-saver

What does that mean? Can you elaborate?

→ More replies (1)

2

u/codygman Feb 24 '15

Have you seen the gl package /u/ekmett mentioned? I've heard it's one of the most complete OpenGL bindings there are.

2

u/fridofrido Feb 27 '15

What are your problems with the OpenGL support? I think Haskell's OpenGL support is excellent, it is OpenGL itself whose design is very poor (and in particular, not a good fit for a functional language).

1

u/[deleted] Mar 02 '15

Open sourcing shouldn't be incentive based. It's a philosophical choice.

2

u/bss03 Mar 02 '15

Everything is incentive-based. But, that warm feeling of satisfaction working on / releasing an open-source project that long ago flickered out at work might not be enough incensive for everyone. There's an incentive-reward exchange protocol for that case.

3

u/wdanilo Mar 05 '15

How about HASKELL JVM backend? :D

4

u/edwardkmett Mar 05 '15

That sounds like something that is a fair bit bigger than a single student summer project.

20

u/tomejaguar Feb 20 '15

Opaleye's code generator could be improved, firstly to make queries easier for humans to read and secondly to provide optimizations. That could be an interesting project for someone. I'm also working on an idea for a in memory relational algebra and data processing API based on Opaleye's if anyone's interested in that.

5

u/[deleted] Feb 20 '15

That sounds super interesting actually. I know someone who would love that sort of thing (I'll tell him to take a look).

15

u/paf31 Feb 27 '15

The PureScript community has no shortage of fun projects, and we have developers able and willing to mentor any interested students. Any contributions will have a very real impact on development of production PureScript code.

The community has been voting on project ideas, and I've moved some of the best over to the wiki here.

11

u/sclv Feb 22 '15

hscolour for Haddock with both hover-over-types and click-to-follow-definition functionality, as discussed here: http://www.reddit.com/r/haskell/comments/2wni22/looking_for_hscolour_with_gotodefinition/

10

u/tonyday567 Feb 23 '15

I would nominate Haddock support for Markdown as a tractable project having the biggest bang for the community buck. This is not to be confused with a concept of replacing or rengineering haddock functionality to use markdown syntax which has well documented flaws.

What I mean is the addition of functionality that would allow comment sections to be marked as Markdown, subsequently processed separately by haddock as such (for example, by passing through pandoc) and otherwise not interfering with haddock methods.

The major benefit of this is to enable the integration of blogging, documentation and library documentation. At the moment, quality explanations of libraries are often found in haykll blogs and written in markdown. Inclusion of these in code bases via haddock involves complete rewrites including formatting, loss of functionality like tables and so on (the list is large).

2

u/acow Feb 26 '15

I would really like to see another run at improving haddock. I think the last effort veered off from the popular desire to improve haddock into something very specific that got stuck. Your suggestion of marking individual blocks as markdown sounds good, and it’s just a small step to a file-wide toggle.

3

u/sclv Feb 26 '15

So an idea I had would be to just let Haddock also process markdown-only documentation files and include them in the documentation index -- such files wouldn't be interleaved with types, signatures, etc. although perhaps Haddock could insert smart hyperlinks to them.

So we don't even need file-wide toggles or block-level toggles. Instead, we have our .hs files with haddock comments, and then also accompanying markdown .md files for manuals, etc. This also eliminates the silliness of "documentation only" modules.

10

u/ocharles Feb 23 '15

I'd love to see (and mentor!) work on Hackage. I think there's a lot of scope for improvement there - UI, features, discoverability, the list goes on! I'm sure plenty of ideas from our lovely competition could be stolenW"inspiration" almost directly for Hackage :)

7

u/jkarni Mar 03 '15

One thing I've always wanted is a little dropdown that displays the current version of the package documentation that one is reading, and allows one to switch between versions without having to go to the index or fiddle with urls.

ReadTheDocs is an example [0], but of course there are many others.

Doesn't really involve writing Haskell, though.

[0] http://docs.python-requests.org/en/latest/api/ , bottom right, as an arbitrary example.

4

u/sclv Feb 23 '15

One element of Hackage I'd very much like to see work on is discoverability -- better search, tagging, a "reverse deps" counter that doesn't eat all our memory, etc. Part of that would be maybe letting people add search columns for things like # of uploads, existence of test suites, whether build reports are green and deps are compatible with various platforms, etc.

I know star ratings and comments are considered unreliable and untrustworthy for a number of reasons, but if there were a decent approach to them I'd be keen. Perhaps if we included voting on comments? And maybe not star ratings but just "I recommend this" as something somebody could choose to thumbs up (like twitter favs or facebook likes), then that could help?

4

u/ocharles Feb 23 '15

I think +1s are a great metric - they are basically a people-who-downloaded-this-and-liked-it-enough-to-mention-it counter. Often, when I'm trying to find a library for something, this metric is good enough for me to get going and avoid going down the wrong path.

On the subject of stealing ideas though, I consider the MetaCPAN project a shining example of good metadata. See the sidebar for Catalyst - sparklines, inline issue counters, build machine reports, ratings, +1 aggregates, and even a direct link to IRC. There's a lot we could learn from, right there!

3

u/hailmattyhall Feb 24 '15

Slightly off topic - not a GSoC question.

Are their any easy bugs to fix or enhancements that a beginner to the project could cut their teeth on? There's an issue tag but there are only two and they both seem to have ground to a halt a bit. That seems to be true of a lot of the issues :/

Cheers

10

u/jberryman Feb 24 '15 edited Mar 05 '15

I've been using (the excellent) criterion a ton and have a small wishlist of things easily doable in a summer. Mainly around making the reports better, in order from most to least important to me:

  • Replace bar graphs in overview with filled version of the KDE contour plots shown in details section. Or at least error bars, but those I think would be strictly less useful. Maybe one could toggle between different representations.
  • allow dynamic showing/hiding/filtering in summary, so that if you get a really slow benchmark you can hide it and have the scale re-adjust to the others
  • EDIT to add: Consider whether it makes sense, and possibly implement #77
  • In the KDE plot, use the gray vertical lines to indicate scale by e.g. marking a line every mean / 20 or something. So a KDE plot with lots of vertical gray lines close together indicates we're "zoomed out" and the timings have quite a spread. As is the gray lines don't serve much function (you can mouseover parts of the plot to get a sample)
  • Often I'm testing several different benchmarks against several different alternate implementations. It would be nice to be able to toggle between grouping by benchmark (so that we can compare implementations), and grouping by implementation.
  • fixing some layout issues (e.g. keys overlapping graphs)
  • figure out a way to lighten the dependencies

19

u/sclv Feb 20 '15

Just jotting a note before I forget -- there are some module system and related proposals for ghc that should be in the reach of an advanced student, though they would need some buy-in. For the most part, they would be able to be done without touching most of the core tricky bits of the compiler, which I think makes them tractable.

import Data.Map (Map) qualified as M

The above shouldn't steal syntax and could both bring in the Map type unqualified and the remainder of the module qualified.

Qualified Module Export as detailed here: https://wiki.haskell.org/GHC/QualifiedModuleExport

Nested module organization as detailed here: http://osdir.com/ml/glasgow-haskell-users@haskell.org/2012-01/msg00171.html

A generalized "class constraint warning system" allow warnings such as this https://ghc.haskell.org/trac/ghc/ticket/8004 to be accomplished purely in userland.

4

u/acow Feb 25 '15

A variation of this import syntax that I’d like is to drop the word qualified. If you want the less common usage of aliasing an import without qualifying it, you could say unqualified or aliased.

This would optimize the common usage to

import Data.Map (Map) as M

4

u/sclv Feb 25 '15

The problem is that this can change existing meanings of things. My proposal pays a bit more cost to ensure we don't break any existing code.

→ More replies (1)

6

u/pkmxtw Feb 20 '15 edited Feb 20 '15
import Data.Map (Map) qualified as M

Can we also steal Scala's import syntax?

import Prelude (fromIntegral => fi, (.) => _, id => _, _)

would be so nice.

3

u/heisenbug Mar 10 '15

Better use the PatternGuards-like syntax:

import Prelude (fi <- fromIntegral, reveal <- show)

0

u/[deleted] Feb 20 '15

[deleted] — view deleted comment

10

u/tomejaguar Feb 20 '15

Does this do the same as

import Data.Map (Map)
import qualified Data.Map as M

10

u/sclv Feb 20 '15

thats the idea

2

u/akurilin Feb 21 '15

Didn't know you could do that, huh!

9

u/oiuhoihiuhioh Feb 20 '15

Recently OCaml got a tool to generate pattern from type information: merlin's destruct command. I know that some other languages possess this kind of tool (Idris, Agda? not sure).

Having this available in ghc-mod (or somewhere else) would be a HUGE helper when writing Haskell code. I cannot state enough how the day to day use of this feature is pleasant and usefull.

8

u/NiftyIon Feb 22 '15

Not sure if this is the sort of thing GSOC is meant for, but if anyone is interested in improving interactive coding in Haskell in IHaskell (useful for graphics, interactive data analysis, etc), I would be happy to help. I've mentored people working on small projects related to IHaskell / contributions to IHaskell, which went well. If anyone is interested, let me know!

Potential ideas include:

  • Working on IHaskell proper. This can include some pretty cool things, like perhaps trying to use GHC's type holes to implement context and type driven completion.
  • Working on integrating libraries into the IHaskell ecosystem. Some are fairly easy to integrate, but some are more challenging (and potentially require upstream changes); I personally would like to see diagrams animation support, gloss as a WebGL code generator, and threepenny-gui as a GUI framework integrated into IHaskell.
  • Using IHaskell as a library; this can include implementing a more powerful hint replacement or writing a kernel for another language such as Idris.

16

u/sclv Feb 23 '15

I've mentioned this before, but http://cloud.sagemath.com, which offers sage and ipython notebooks for free also offers terminals, and ghc in those terminals. William Stein, whose site it is, has indicated that if someone were to help him set up IHaskell in SageMathCloud, he would be happy to do so.

I like the goals of the SMC project and the IHaskell project both, and together I think it would be huge for IHaskell, since it would remove all the setup cost and hosting cost for sharing, just as it does for IPython notebooks. So I think that would be a very doable SOC project, with a significant immediate payoff :-)

7

u/agocorona Mar 06 '15 edited Mar 06 '15

I'm after the creation of the first truly composable GUI toolkit ever. where widgets can be combined by means of monadic, applicative, alternative and monoidal combinators.

I would mentor anyone interested in or outside of GSOC. Perhaps it is too late and this is too little detailed, but the project can be achieved in a month work and would show how Haskell can solve a longstanding problem: the non composability of GUIs. That achievement could attract much attention from the software industry.

The idea start from well tested stuff. It has been tested in the Web browser as a layer on top of Haste.DOM.

The Javascript Document Object Model of the Web browser has a similar architecture and interface that a GUI toolkit.

The idea is to translate hplayground, the Haskell package that implement composable widgets in the Web Browser on top of a Haskell GUI Toolkit such is GTK or FLTK.

the hplayground widgets can be composed like formelts, but instead of generating HTML, generate instead a Haste.DOM computation. When executed, this DOM produces the rendering of the widgets. The same mechanism can be used to generate the rendering of the widgets under a GUI toolkit. The widgets will reshape themselves while compute anything else like any monadic/applicative computation. Events will execute only the portion of the computation that is in its scope. The result will be the possibility of more dynamic interfaces with much less code. and, at last, full composability of applications and libraries with GUI interfaces.

6

u/Kaligule Feb 20 '15

The most interesting ongoing thin in the Haskell World is Diagramms (in my opinion). The developers there do wonders all the time and I think it would be great to boost the project a bit. https://wiki.haskell.org/Diagrams/GSoC

6

u/heisenbug Feb 25 '15

I have just added Silly representation tricks. The idea is to observe certain data-type shapes (constructor arities/strictness) and find an efficient machine-memory representation for them. E.g. lists with a certain number of heads could be laid out by GC to occupy a C-array-like layout in memory. Clearly this necessitates the introduction of administrative constructors with specific pointer-tagging schemes.

5

u/LGFish Feb 24 '15 edited Feb 24 '15

I think haskell community really need a more powerful emacs mode (or IDE).

With the purely functional and fully typed behaviour of haskell it is easier to create a fancy automatic code generator with type holes and all good stuff and it is possible to create a lambda calculus wrapper to show the user that ´fmap id = id´ for example and to give the user a better intuition about his functions. Something like this Bret Victor's talk "Inventing on principle" would also be very helpful.

This would really increase the level of programming in haskell.

2

u/hdgarrood Mar 05 '15

Did you see Chris Done's blog post about this? http://chrisdone.com/posts/haskell-wishlist

1

u/LGFish Mar 05 '15

The whole idea is the creation of a Haskell evironment where we can use all this useful tools (for example equational resoning, stepper, etc). Of course, maybe this is an easy step before the creation of the tools themselves.

5

u/jkarni Mar 02 '15

There's a project servant is going to have to tackle at some point that might be of just the right size, and is (in my opinion) very interesting. It involves automatically rewriting a type into a canonical, trie form, so that:

type API = "b" :> Get ()
         :<|> "a" :> "b" :> Get ()
         :<|> "a  :> "c" :> Get ()

becomes

type API' = "a" :> ("b" :> Get ()
                 :<|> "c"  :> Get ())
         :<|> "b" :> Get ()

And also rewriting the term-level in lock-step. The most obvious advantage is log n routing, which we get pretty much immediately from that, but there are also other things - automatic HATEOAS support, for instance, and API versioning checks that can tell whether a change is a backwards-compatible addition to an API.

3

u/paf31 Mar 02 '15

I would love to see this feature implemented, especially if this could be used to improve the structure of the output of servant-docs.

5

u/thomie Mar 02 '15

base could use some more attention. There are about 50 open bug reports (some are for other core libraries).

  • Pro: everyone benefits
  • Con: requires a lot of design discussion and library proposals

8

u/cartazio Feb 22 '15 edited Mar 14 '15

I've a bunch of neat projects i could help a student do if they want to spend the summer doing a lot off FFI work, particularly on my blas/lapack binding (adding better coverage of Lapack and related libraries with a NICE ux could easily easily eat up a summer).

[edit to answer sclv's points]

some of the tasks include but aren't limited to

projects related to hblas

  • rounding out the blas API while also adding some docs so that people dont need to to read the docs in the original fortran codes. Per se theres a few other blas bindings on hackage in various states of quality, but hblas tries very very hard to a) be zero config install on all the most common platforms b) not have any configure or dist time code gen
  • adding a decent coverage of basic lapack operations with a decent UX. This alone could eat up a good chunk of a summer. its not hard, but its not easy either.
  • another project would be to write a haskell binding for blis, which is a more modern approach to blas. This be a bit saner project than working on the high level lapack binding, but a bit more work than helping finish up the blas in hblas.

I'll probably have some projects i could scope out in the larger numerical haskell sphere figured out later this spring (though sadly after gsoc timelines), but these FFI heavy projects are ones which have clear scope, and where if the right student (as a warm up) gave me some good patches for hblas, I think we could be reasonable confident of a successful summer that starts off focusing on those projects.

[further edit] For the right student, I'm more than happy to talk out mentoring anything in the mathematical computation/randomness/high performance computing/compilers space. That said, the student needs to really convince me that they know how to deliver :)

4

u/sclv Feb 23 '15

could you spell out the projects a bit more -- maybe one sentence or a sentence fragment each?

2

u/[deleted] Feb 27 '15

I'm interested in contributing to the numerical haskell tooling after the GSOC timeline. I unfortunately cannot join the program this year as I'm working. Apart from linear algebra tools, what else do you have in mind? Any statistical packages à la scikit or HLearn?

I started a "typesafe" linear algebra library in C++, but I'm not sure about what sort of requirements you have in terms of performance for the Haskell one. How does hblas compare to existing projects like hmatrix? Can you please detail some of the issues with the API and performance?

1

u/cartazio Feb 28 '15

Hello! Excellent questions!

  1. yes, statistics, machine learning, optimization, etc are all in the roadmap. I hope to have some first pieces across all of numerical computing over the course of the spring. (still navigating some work related matters to make it all in the clear). So in sure, pretty much everything eventually :)
  2. HBlas is meant specifically to be a fully featured BLAS and LAPACK ffi binding with a nice type safe (and imperative) UX. My main use case for HBlas is to benchmark and test my analogous Numerical Haskell (haskell) routines (and when applicable use whichever is more performant).

hmatrix does not expose the full generality of the imperative blas and lapack routines (let alone doing so in a human friendly way). It also uses the unsafe ffi calling convention unconditionally, which is very dangerous when you have any interactive component to an application doing blas/lapack computations. Also theres a HUGE amount of very useful lapack features hmatrix doesnt expose.

thats a short version of the right answer, but i hope that helps.

1

u/[deleted] Feb 28 '15

Ah, I see. I could definitely take a look later today, especially at hblas. That's an interesting long term goal, and I'm sure many people would find it very useful. I'll dig through the existing code. If there's any resources you think may be useful, feel free to PM me.

→ More replies (1)

6

u/Peaker Feb 25 '15

A LANGUAGE pragma to allow "do", "case", etc. to appear as non-infix function arguments would be great:

{-# LANGUAGE SyntaxArguments #-}
main = forever do
  ...

This would allow us to avoid a big chunk of $ noise in code.

2

u/geggo98 Mar 03 '15

Native remote function calls would be nice: Send a (partially) applied function over the network, let it run there and get the result back, in a type safe manner. One could use it to make applications more robust by splitting them up in several processes (and probably distribute them on multiple machines). This could become a major building block for even better reactive frameworks.

An implementation could be quite simple: Enhance the runtime in a way that allows to inspect any runtime value (including partially applied functions) and bring it to a common "flat" representation and vice versa.

2

u/jkarni Mar 03 '15

I doubt an implementation could be simple! You can't serialize arbitrary functions in haskell, and I think the reasons are quite involved.

by the way, have you taken a look at the static pointers that's being introduced in GHC 7.10? They allow for a limited form of this.

1

u/geggo98 Mar 03 '15

I don't think it would be too hard. My idea is: let the compiler store the abstract syntax trees during compilation. For each function call, an function gets the real parameters and the AST that lead to that invocation (parameters substituted with the according ASTs). Normal functions will evaluate the parameters, the serialization functions only the AST.

Of course such a scheme might get a slight performance hit (i.e. it will be as slow as molasses). So an optimization would be to remove most of the unneeded ASTs.

Perhaps this could be made slick enough, so the runtime penalty becomes tolerable.

1

u/bss03 Mar 03 '15

An implementation could be quite simple

This should do it, but I'm not sure the implementation (and integration into the GHC runtime) would be "simple".

2

u/geggo98 Mar 03 '15

To solve "Cabal hell" it would be really nice to get "origin dependent name spaces", similar to Java class loader / OSGi. In Java, if the same class is loaded through two different class loaders, the resulting types belong to different name spaces and hence are considered different types. So if two modules use the a common base class, two scenarios can occur:

  1. They use the same version of the base class. In both cases the base class can be loaded through a common class loader. The resulting type is the same, the two modules can freely exchange values of that type.
  2. They use different versions, hence must use different class loaders. The resulting types are different, values cannot be exchanged.

With OSGi, Java can check the resulting types at compile time.

With such a system, cabal could easily hold one module in different versions. Even in one application, multiple versions of the same module can co-exist, as long as they don't directly exchange values. Version problems become type problems and can be checked at compile time.

3

u/bss03 Mar 03 '15

We actually already do this. It's just the origin dependent namespace is normally hidden. Right now, it only shows up in compile-time errors like "Couldn't match expected type S8.ByteString with actual type bytestring-0.10.0.2:Data.ByteString.Internal.ByteString".

IIRC, there was some problems with getting GHC to actually compile against two versions of the same name, but I think they may have already been addressed. Cabal has supported multiple version of the same package for a while, and it currently growing (or recently grew) support for multiple flavors of the same version of the same package -- i.e. semigroups-0.16.1 compiled against base-4.6.0.1 and semigroups-0.16.1 compiled against base-4.7.0.2 -- by further appending some hash value to the send of the package identifier.

If there's not a lot of work left, finishing it might be a good GSoC, yes. These changes feed into the larger body of work needed to implement backpack, IIRC.

2

u/raphaelj Mar 07 '15

STM with persistence.

STM are amazing but you can't as of today use any kind of IO inside a transaction. This is because we consider every IO to be non-revocable.

There is however well known techniques whose can be used to do revocable persistence on disk.

We could build a such library on an existing transactional persistence framework (about any existing database).

This kind of library exists in Scala, for example : http://activate-framework.org/

2

u/ozhank Mar 22 '15

Fully functional toxcore to protect everyone's privacy and avoid snoopers. And a cli interface to it.

3

u/kaukau Mar 03 '15 edited Mar 03 '15

Nomyx is a unique game where the players can modify the rules of the game, while playing it.
The game could be seen as a platform where beginners in Haskell could learn the language while playing an actual multiplayer game. Experts on the other hand could participate in great matches that show their Haskell skills.

For this GSoC, the design space of the DSL need to be explored to make it easier to learn and use. Ideally, even non-Haskellers should be able to create some basic rules.

2

u/arianvp Feb 20 '15

Improving error messages of the elm compiler might be a fun subject.