soniakeys / meeus

Implementation of "Astronomical Algorithms" by Jean Meeus
MIT License
342 stars 56 forks source link

Porting to php? #12

Closed ultrablue closed 6 years ago

ultrablue commented 6 years ago

Hello:

I've been wanting to make a Meeusian php library for quite some time now, but I'm too lazy to type in all those factors by hand. :) It looks like your package is the only one that's really complete in any language?

So, I'm thinking about porting your code to php. Of course, I would respect the MIT license and ensure that you get credit for your hard work if I do so.

Do you have any thoughts, advice, etc. about this?

Thanks! Greg

soniakeys commented 6 years ago

Hello Greg,

I don't know php, but surely the project is reasonable. You should probably have a copy of the book. In fact, I'm sure many uses of my library would be challenging without a copy of the book at hand. I found the book very complete and consistent. The worked examples offer at least anecdotal tests for correctness of code. I tried hard to implement just what was in the book and not add to it or update anything. This led me to split off sexagesimal and units as separate packages. The sexagesimal formatting might be considered a bit of fluff but was useful for reproducing example results as literally as possible. For the units package also you might come up with something more idiomatic for php. It was a relatively late addition for me, but it helped the separation from the sexagesimal package and added some safety. Because it was a late addition you might find some places in my code where I still have plain float64s where a unit type might be clearer or safer. Have fun!

Sonia

On Sat, Nov 25, 2017 at 12:46 PM, Greg notifications@github.com wrote:

Hello:

I've been wanting to make a Meeusian php library for quite some time now, but I'm too lazy to type in all those factors by hand. :) It looks like your package is the only one that's really complete in any language?

So, I'm thinking about porting your code to php. Of course, I would respect the MIT license and ensure that you get credit for your hard work if I do so.

Do you have any thoughts, advice, etc. about this?

Thanks! Greg

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/soniakeys/meeus/issues/12, or mute the thread https://github.com/notifications/unsubscribe-auth/ABlXCzUnhFq_tKunjB6fI6qyc6ACrU5Bks5s6FJ1gaJpZM4QqgGY .

ultrablue commented 6 years ago

Hi, Sonia:

Thanks! I've had a copy of the book for quite some time now, but as I say, I've always been intimidated by all the factors involved in the algorithms.

I greatly appreciate your goal of wanting to respect the organization of the book, mainly because of the way that it builds upon itself as Mr. Meeus introduces new algorithms and concepts. Plus his unit tests are very helpful, as you know.

Thanks for your thoughtful response and advice!

Greg