Home

Awesome

A collection of various practical Haskell bits.

Motivation

It happens to all of us.

Once in a while you stumble upon a problem that seems way too familiar. You remember that you've either solved it before or saw it in a blog post somewhere.

You start browsing through Reddit, old projects and bookmarks, searching aggressively for that single line of code or function that you just need to copy-paste or at least take a glimpse at to remember what it was about. It's just one "bit" that you need.

Practical Haskell Bits is an initiative to contain as many of these as possible and become the go-to place for real-world patterns, snippets and popular library examples.

Bits should be aimed towards everyone in the community, regardless of their level of experience or understanding.

No example is too trivial!

The Haskell community is often criticized for focusing on things that are way too complicated to outsiders (and frankly, most "intermediate" Haskellers as well) and pushing away beginners. This is true and in order to attract more people and have them become productive, we need to address it.

Not everyone can figure out how to use a library by reading the source code.

Some people will struggle with "basic" things such as parsing JSON or setting up a web server. It's exactly these people that will not have the confidence to ask a question because seemingly everyone is busy looking at examples of compiler optimizations changing asymptotic complexity.

What defines a Practical Haskell Bit?

A Practical Haskell Bit is a mini-project that:

A Practical Haskell Bit is not:

Examples and non-examples:

Good Practical Haskell Bit candidates:

One might argue that for examples using specific libraries, we should just focus on updating the documentation. I support that 100%, but there are multiple points of view.

Better documentation only helps only if you're already aware of the library in question.

It's easy to underestimate how many people haven't heard about QuickCheck, katip or even servant. Containing and organizing all examples in a single repository makes them "contagious". You come for 1 thing, but find out a few others.

Bad Practical Haskell Bit candidates:

Contributing

Contributions of any kind are welcome.