[Haskell-cafe] What library package fulfills these requirements?

Claus Reinke claus.reinke at talk21.com
Fri Oct 28 18:51:54 CEST 2011


> I am planning to give a workshop on FP using Haskell. 
> The audience will be programmers with quite a bit of 
> experience with conventional languages like Java and 
> .net . I want to give them some feeling about FP. And 
> hopefully, they will become interested so they want more...

My recommendations: 

- don't go for advanced coding styles or wow applications

- don't just walk through finished code, show how
    Haskell allows you to work with code (understanding
    and changing code, types as machine-checked 
    documentation, effect control, abstracting out ideas 
    for reuse, ..)

    you could:
    - show how to find relevant pieces of code in a large
        project, how to understand the piece, and how
        problematic interactions may be limited, compared 
        to Java-like languages

    - build up working code from empty (risky, but some
        Scala introductions have used this, and managed to
        give listeners the impression that they "get" what
        they see, and that they might be able to reproduce it)

    - take working code, then refactor it; for instance, start
        with "simple" code not too different from what an
        imperative coder might write, then start factoring
        out reusable patterns (when you get to factoring out
        control structures, you can go beyond what is easy
        in Java, and you can motivate introducing some of
        the more fancy Haskell idioms, in context)

    Don't be afraid of things going wrong, but have a script,
    know your tools: your audience will be interested to see 
    what you do when the unexpected happens (debugging
    support, source navigation, ...). As usual, have a fallback,
    to rescue the talk if you cannot fix things on the spot.

- it helps to know your audience: the advantages of Haskell
    over Java are different from those over Javascript; .Net
    coders might have different needs again (libraries; might
    prefer F# or something else that runs on the platform)

- complex apps or advanced coding patterns might wow 
    the audience (didn't think that was possible), but will 
    they try to reproduce that (will they even get the idea?)?

- simple everyday tasks solved in simple coding patterns
    might not wow in themselves, but make it easier to 
    follow the language differences, and can be built on

- try for a steady pace through the whole presentation
    (too many Haskell talks start great, then either take off
    and leave the audience behind, or lose pace and direction
    as the speaker tries to fill the time)

If the authors agree, it might be good to take an existing
talk and try to adapt/improve it. Would be good to work
toward one set of slides that can give a starting point for
such talks: a general set that one can point to, and sets of
modifications that tune the general set to different audiences.

There are lots of introduction to Haskell talks/slides on 
the web, btw., including these hands-on ones:

http://bos.github.com/strange-loop-2011/slides/slides.html 

(google for alternatives, but being on github, with an easy
HTML interface, allows for collaborative improvements)

My main recommendation again: don't just show working
code, show how to work with code.

Claus

> I am wondering what package is suitable to be used as 
> an example too? It needs to fulfill at least the following 
> requirements:
> + I have to be able to explain the purpose of the software 
>    in no more than 1 or 2 minutes
> + There should be parts of the code that can be easily 
>    linked to the purpose /use of the package
> + These code parts must show the 'prettiness' of Haskell
> + It would be nice if there is something GUI-like to demo, 
>   which runs under windows.
> + I prefer not to use some kind of a compiler as an example.
 



More information about the Haskell-Cafe mailing list