# Choosing packages

**URL:** <https://discourse.elm-lang.org/t/choosing-packages/6566>\
**Category:** Learn\
**Created:** [November 25, 2020, 2:38am UTC](https://discourse.elm-lang.org/t/choosing-packages/6566 "2020-11-25T02:38:53Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerith](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/jerith/32/114_2.png) [@jerith](https://discourse.elm-lang.org/u/jerith)\
**Post date:** [November 25, 2020, 2:38am UTC](https://discourse.elm-lang.org/t/choosing-packages/6566/1 "2020-11-25T02:38:53Z")

</div>

## An Example

I just read the following in the [`elm/time` docs](https://package.elm-lang.org/packages/elm/time/latest/):

> I think the community should make some packages that define `fromIso8601 : String -> Maybe Time.Posix` in Elm.

Okay, great. So I searched:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/2X/f/ff903cde45bfa027e8348e84e23abe31721417fe.png)

🤔

## General Questions

1. How are these sorted? Not by author name, package name, or version number AFAICT. By popularity (and if so, calculated how)? Randomly?

2. How do folks typically tackle the process of choosing which package best suits their needs? Picking amongst a half-dozen choices isn’t too daunting, I admit, but I worry that there is a nascent scalability problem here.

3. I note that two of these packages are clearly labeled as clones of `rtfeldman/elm-iso8601-date-strings` in order to make certain fixes available. I hadn’t encountered this before. Is this the way folks typically get around the problem of unmerged PRs? Again, I worry there is a nascent scalability problem here.

Interested to hear everyone’s thoughts – thanks!

---

<div class="post-metadata">

**Author:** ![dta](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/dta/32/1917_2.png) [@dta](https://discourse.elm-lang.org/u/dta)\
**Post date:** [November 25, 2020, 2:53am UTC](https://discourse.elm-lang.org/t/choosing-packages/6566/2 "2020-11-25T02:53:35Z")

</div>

1: I remember reading in an earlier discussion that they are sorted alphabetically, but that there are some exceptions who are special-cased to appear first.

3: Yes this is common, unfortunately.

---

<div class="post-metadata">

**Author:** ![DullBananas](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/dullbananas/32/3709_2.png) [@DullBananas](https://discourse.elm-lang.org/u/DullBananas)\
**Post date:** [November 25, 2020, 4:28am UTC](https://discourse.elm-lang.org/t/choosing-packages/6566/3 "2020-11-25T04:28:38Z")

</div>

there should be a way to hide forks

---

<div class="post-metadata">

**Author:** ![rupert](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/rupert/32/1775_2.png) [@rupert](https://discourse.elm-lang.org/u/rupert)\
**Post date:** [November 25, 2020, 9:17am UTC](https://discourse.elm-lang.org/t/choosing-packages/6566/4 "2020-11-25T09:17:03Z")

</div>

> [@dta](#):
>
> I remember reading in an earlier discussion that they are sorted alphabetically, but that there are some exceptions who are special-cased to appear first.

It is sorted alphabetically - but authors who have given talks at Elm conferences are promoted to be first in the list.

---

<div class="post-metadata">

**Author:** ![pd-andy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/pd-andy/32/4145_2.png) [@pd-andy](https://discourse.elm-lang.org/u/pd-andy)\
**Post date:** [November 25, 2020, 12:29pm UTC](https://discourse.elm-lang.org/t/choosing-packages/6566/5 "2020-11-25T12:29:53Z")

</div>

This seems… not ideal?

---

<div class="post-metadata">

**Author:** ![Lucas\_Payr](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/lucas_payr/32/4993_2.png) [@Lucas\_Payr](https://discourse.elm-lang.org/u/Lucas_Payr)\
**Post date:** [November 25, 2020, 1:01pm UTC](https://discourse.elm-lang.org/t/choosing-packages/6566/6 "2020-11-25T13:01:34Z")

</div>

1. There is definitely more to it than pure “nr of talks at conference”. I assume the first few packages are hand-picked (as they are the most used packages), that’s why when searching for “css”, elm-ui comes up before rtfeldman, even though mdgriffith has less conference appearances. As far as your example goes, this seams to pay of, as rtfeldman/elm-iso8601-date-strings would be the way to go.
2. I would first exclude all clones of existing packages (as they are often not maintained for long). Then I typically use the one with the better documentation, as that most often coaligns with a well thought through implementation.
3. Elm packages have a tendency to take their time till bugs are fixed. It’s often recommended cloning the package into the repository of your project and implement the fix yourself, until the original package releases the next update.

---

<div class="post-metadata">

**Author:** ![pdamoc](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/pdamoc/32/36_2.png) [@pdamoc](https://discourse.elm-lang.org/u/pdamoc)\
**Post date:** [November 25, 2020, 1:14pm UTC](https://discourse.elm-lang.org/t/choosing-packages/6566/7 "2020-11-25T13:14:33Z")

</div>

> [@Lucas\_Payr](#):
>
> There is definitely more to it than pure “nr of talks at conference”.

Not really. [Here is the code that generates the weights](https://github.com/elm/package.elm-lang.org/blob/master/src/backend/Memory.hs#L273-L350).

---

<div class="post-metadata">

**Author:** ![gampleman](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/gampleman/32/43_2.png) [@gampleman](https://discourse.elm-lang.org/u/gampleman)\
**Post date:** [November 25, 2020, 1:22pm UTC](https://discourse.elm-lang.org/t/choosing-packages/6566/8 "2020-11-25T13:22:00Z")

</div>

The more is that it’s the number of conference talks up to Elm Europe 2018, and `elm-explorations` gets a massive boost, `elm` gets a ridiculous boost.

---

<div class="post-metadata">

**Author:** ![jwoLondon](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/jwolondon/32/605_2.png) [@jwoLondon](https://discourse.elm-lang.org/u/jwoLondon)\
**Post date:** [November 29, 2020, 9:25pm UTC](https://discourse.elm-lang.org/t/choosing-packages/6566/9 "2020-11-29T21:25:00Z")

</div>

It would appear that only the GitHub username of the conference presenter is used, which seems rather odd. In the case of [elm-vega](https://package.elm-lang.org/packages/gicentre/elm-vega/latest/) and [elm-vegalite](https://package.elm-lang.org/packages/gicentre/elm-vegalite/latest/), Alex [Kachkaev](https://github.com/kachkaev) presented the work at [Elm Europe](https://youtu.be/K-yoLxnm95A), but we publish the packages under the group name [gicentre](https://github.com/gicentre), so there is no ‘boost’.

For us, it’s not a big issue as there are (currently) no forks of our package published, but there may be others who don’t use their personal GitHub names to publish.

---

<div class="post-metadata">

**Author:** ![dta](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/dta/32/1917_2.png) [@dta](https://discourse.elm-lang.org/u/dta)\
**Post date:** [November 29, 2020, 9:45pm UTC](https://discourse.elm-lang.org/t/choosing-packages/6566/10 "2020-11-29T21:45:20Z")

</div>

It seems like PageRank would be a good option for sorting the search results (although ideally we would also include application codebases in addition to library codebases as nodes, and I don’t think there’s a way to do that).

---

<div class="post-metadata">

**Author:** ![DullBananas](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/dullbananas/32/3709_2.png) [@DullBananas](https://discourse.elm-lang.org/u/DullBananas)\
**Post date:** [November 29, 2020, 9:51pm UTC](https://discourse.elm-lang.org/t/choosing-packages/6566/11 "2020-11-29T21:51:37Z")

</div>

maybe package.elm-ladg. off should allow ratings and reviews for packages

---

<div class="post-metadata">

**Author:** ![georgesboris](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/georgesboris/32/3598_2.png) [@georgesboris](https://discourse.elm-lang.org/u/georgesboris)\
**Post date:** [December 2, 2020, 2:36am UTC](https://discourse.elm-lang.org/t/choosing-packages/6566/12 "2020-12-02T02:36:35Z")

</div>

I second that - for reference Dart’s package manager has a pretty great setup for ranking/choosing package. Elm’s package mgmt could take a lot of ideas from that.

---

<div class="post-metadata">

**Author:** ![dmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/dmy/32/702_2.png) [@dmy](https://discourse.elm-lang.org/u/dmy)\
**Post date:** [December 8, 2020, 4:49pm UTC](https://discourse.elm-lang.org/t/choosing-packages/6566/13 "2020-12-08T16:49:13Z")

</div>

[https://elm.dmy.fr/](https://elm.dmy.fr/) (and [https://dark.elm.dmy.fr/](https://dark.elm.dmy.fr/), see [here](https://discourse.elm-lang.org/t/unofficial-mobile-friendly-package-website-exploration/5180) for context) sort packages by actual usage in other packages and open source elm applications on GitHub.

The same ranking is used in [elm-language-server](https://github.com/elm-tooling/elm-language-server/blob/master/src/providers/ranking.ts).

I have not updated the ranking since 6 months ago, but it should still be quite relevant for mature packages. I will likely update it again in the coming months.

Edit: the ranking is an experiment and an evolution of the one described [here](https://discourse.elm-lang.org/t/most-popular-packages-in-open-source-applications/4207).

---

<div class="post-metadata">

**Author:** ![dmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/dmy/32/702_2.png) [@dmy](https://discourse.elm-lang.org/u/dmy)\
**Post date:** [December 10, 2020, 8:48am UTC](https://discourse.elm-lang.org/t/choosing-packages/6566/14 "2020-12-10T08:48:43Z")

</div>

I have updated the ranking on [elm.dmy.fr](http://elm.dmy.fr) and [dark.elm.dmy.fr](http://dark.elm.dmy.fr) and made a PR in elm-language-server.

1225 packages have been evaluated from their use in 5724 Elm applications on GitHub and in the packages themselves.

1013 packages have been ranked.

Because packages unused in other applications or packages are still evaluated from the ranking of their author other packages, unranked packages are those unused in packages, applications and without other ranked package from the same author.

> <https://github.com/dmy/elm.dmy.fr/commit/249c6a0ef18a4d65c6507f523a0d8debbc5033f0?branch=249c6a0ef18a4d65c6507f523a0d8debbc5033f0&diff=split>

Feedback is very welcome.

Edit: I removed broken packages from the ranking (they are still listed at the end for now as I don’t filter them yet from the official server package list which is used)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)\
**Post date:** [December 20, 2020, 8:48am UTC](https://discourse.elm-lang.org/t/choosing-packages/6566/15 "2020-12-20T08:48:47Z")

</div>

Closed on December 20, 2020, 8:48am UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
