elm-community / guidelines

guidelines for *-extra contributors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Potentially continue imeckler/ratio as an elm-community package?

jvoigtlaender opened this issue · comments

See imeckler/ratio#5 (comment).

@elm-community/maintainers, @elm-community/packages

Update:

In a personal message, @newlandsvalley has agreed to serve as maintainer of the ratio package if it is moved to elm-community. He already has a fork in which he has worked on the package and made improvements, and ported to Elm 0.18: https://github.com/newlandsvalley/ratio

And @imeckler said he is happy to have his package be continued and maintained by elm-community.

So it seems that's a thing we should go for.

Now what are the concrete steps to take? I don't think we have documented anywhere how a package gets moved to elm-community (or have we?), but it's been done several times already. Off the top of my head, I guess the process is something like the following (but please anybody correct me, add steps, if required):

  • https://github.com/imeckler/ratio gets forked to elm-community
  • @newlandsvalley is given write permission to the new repository, and he adds himself to https://github.com/elm-community/Manifesto/blob/master/maintainers.md via a pull request
  • then he removes all tags from the elm-community/ratio repository
  • then he changes the version in elm-package.json to 1.0.0 and publishes the package, as is, for Elm 0.17
  • then he merges changes from his currently existing personal fork, including the updates for Elm 0.18, bumps the package version appropriately, and publishes again to the package site

Anything I missed?

@elm-community/maintainers, @elm-community/packages

Alternatively, create a new elm-community repo and push @newlandsvalley's repo up to it. This avoids the "forked from" designation, which may be good or bad. It avoids the need to delete tags and the possibility that the existing repo is messed up.

I think @jvoigtlaender's approach is the most conservative (e.g. by releasing a 0.17 package) but I'm not sure it's necessary.

Before I start, I would appreciate people's opinion on the following. In designing my fork, I was particularly concerned about allowing expressions that use a mixture of Rationals and Ints to have syntax which was as unobtrusive as possible - i.e. to mirror the underlying maths expression as closely as it could. I'm thinking of expressions such as:

   i * r + i / (i - r)

where i is an integer and r a rational. I came up with the pragmatic solution of using infix operators to manage this - see https://github.com/newlandsvalley/ratio/blob/master/src/Ratio/Infix.elm. This might be seen as an interim solution until typeclasses appear in Elm - but perhaps typeclasses will never appear - I have absolutely no idea.

Anyway, although I found them a little awkward, they were convenient (particularly when I was attempting to port a Haskell library to Elm), but @imeckler objected to them quite strongly. Should I include them in the community version or not?

I would definitely not recommend basing any decisions on the assumption that elm will introduce user-defined typeclasses someday!

A complaint I've heard even from veteran Lisp programmers is that writing arithmetic expressions without infix operators feels unnatural, so a rationals library seems like a default reasonable place to use custom operators - even if my global default is still to avoid them. 😉

I'd be curious to hear the specific objections!

See this thread - imeckler/ratio#3.

I've now already done the steps from further above, except:

In particular, http://package.elm-lang.org/packages/elm-community/ratio/1.0.0 exists and is equivalent to http://package.elm-lang.org/packages/imeckler/ratio/2.0.1. Continued work can start from that.

OK - many thanks, Janis. I should be able to start once I get back home on Friday.

This is now happening.

I've merged my latest 0.18 changes. I'll pause for a little while before bumping the version and publishing in case I've forgotten anything obvious or if anyone has the time ti look at it and make comments.