Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could we use Apache Commons Numbers instead of types like RationalNumber? #254

Closed
keilw opened this issue Aug 23, 2019 · 9 comments
Closed

Comments

@keilw
Copy link
Member

keilw commented Aug 23, 2019

While Apache Commons Numbers has not released its 1.0 version and there is a bit of slow activity in recent months, it seems Fraction or BigFraction in particular covers most of what RationalNumber does here. Could we use it and (where contributors like @andi-huber were happy to help) maybe offer improvements or actual code contribution to the Commons Numbers project instead?

@keilw
Copy link
Member Author

keilw commented Sep 2, 2019

I'm afraid this is too early for OC1, there is no official release of Commons Numbers as of now.

@teobais
Copy link
Member

teobais commented Sep 2, 2019

Wow, I was again in a rush and read "has not released any newer version after 1.0" instead; I should stop checking issues in the middle of the night 😂

Cool, reverted everything!

@keilw
Copy link
Member Author

keilw commented Sep 2, 2019

For the really daring who know a bit about OpenJDK you could have a look at this branch https://github.com/unitsofmeasurement/indriya/tree/multi_release_jar and #25 if you like at OC1.

@frothga
Copy link

frothga commented Apr 3, 2020

If Apache Commons Numbers is lightweight and self-contained, that's great. But please avoid bloating any final distribution that depends on UoM. IE: please weigh the number of additional jars and added megabytes of payload against the benefit.

@keilw
Copy link
Member Author

keilw commented Apr 4, 2020

It's still in snapshot, so don't worry about it. Not sure, how active it is because even the last 1.0-SNAPSHOT binaries are unavailable at Apache, so while there is a lot of activity and it seems a beta-1 is in the making soon, let's wait till a binary was released either to download at Apache or a Maven repository. Commons CVS 1 is just 35kB in JAR size, Commons Math 3 over 2MB, I would not seriously consider a JAR that is much bigger than Indriya itself which is currently around 250kB. With at least a few dependencies like uom-lib-common also just around 25kB at the moment.

@andi-huber
Copy link
Member

Should there ever be a release of Apache Commons Numbers, we could provide a new (optional) maven artifact that provides just another NumberSystem implementation that integrates with Apache Commons Numbers.

This would not bloat UoM dependencies, while giving people the freedom of choice on which NumberSystem they prefer to use.

@keilw
Copy link
Member Author

keilw commented Apr 4, 2020

We could do this via some SPI mechanism yes, that's a good idea. AFAIR at least NumberSystem is already part of the Indriya SPI.

@keilw
Copy link
Member Author

keilw commented Apr 4, 2020

I am currently working on Eclipse UOMo to get versions 0.8 and 1.0 out soon. Hoping 1.0 might graduate it from the Incubator. The focus in 0.8 is UCUM also because that is very important for HL7 and medical research (including Corona) but for 1.0 I also hope to add ICU and ICU4J because that is very big under Eclipse. And build a "bridge" from our UoM extension module "Unicode CLDC" to ICU4J but as a separate module or bundle, because ICU4J is roughly 20 MB in size ;-)

@keilw
Copy link
Member Author

keilw commented May 13, 2020

The Commons Number project released a 1.0.0-beta1 to MavenCentral, so it could also be used for experiments if we consider using it.

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

4 participants