How to choose a library as a beginner?

As a Haskell beginner, I find it hard to choose a library from Hackage. For example, right now I’m looking for a library that helps me with handling HTTP requests. There are 5 packages tagged http and 1741 packages tagged web. Now how do I proceed? Sorting by DLs should give a hint, I guess. Anybody interested in sharing their thoughts on how to choose a library as a beginner?

4 Likes

Good question! I have never been too impressed with package tagging in the Haskell ecosystem and I do not think many developers rely on it for discoverability purposes.

«Package search» is start; more than «# of downloads» and «ratings», I like to keep an eye on reverse dependencies, a reliable metric.

If I do not even know what to search, I go to a famous package that I know has the functionality I am looking for and check its dependencies. E.g. one day I needed «restart program when a file is changed» library; I knew ghcid did it, so I looked on the package page to find fsnotify.

3 Likes

Here’s a reddit discussion specifically about HTTP request libraries: https://old.reddit.com/r/haskell/comments/6ra2sv/which_libraries_should_i_use_for_writing_a_simple/

2 Likes

Sometimes you might find https://github.com/Gabriel439/post-rfc/blob/master/sotu.md and http://dev.stephendiehl.com/hask useful.

2 Likes

The most important thing is that you can use it.
Read the READMEs, haddock, or any other documents of them at first and confirm that you can use.
Then, check if the package specifies the differences with its competitors.

See also: http://www.haskellforall.com/2018/05/how-i-evaluate-haskell-packages.html

1 Like

Thanks a lot for all your replies. It will take me some time to digest all the information. :wink:

@f-a I was looking for the reverse dependencies metric, but could not find it on Hackage. Thanks for the link.

2 Likes