Do we like using third party libraries?

147 views
Skip to first unread message

Ognjen Bubalo

unread,
Sep 26, 2013, 5:52:29 AM9/26/13
to cesiu...@googlegroups.com
Hi,

During my work on calculating oriented bounding boxes I started implementing the QR algorithm for finding eigenvectors, but also I wanted to check third party libs and I've found a great open library for such calculations and many others.

It is called NumericJS http://www.numericjs.com/. These are the calculations it can do: http://www.numericjs.com/documentation.html
It has point, vector and matrix calculations.

I would like to ask, if I can use this lib, or Cesium does not like to depend on third party libs?

Thank you!

Ogi

Christian Ledermann

unread,
Sep 26, 2013, 6:00:34 AM9/26/13
to cesiu...@googlegroups.com
Is the license compatible?
> --
> You received this message because you are subscribed to the Google Groups
> "cesium-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cesium-dev+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



--
Best Regards,

Christian Ledermann

Nairobi - Kenya
Mobile : +254 702978914

<*)))>{

If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.

1) Don’t drive species to extinction

2) Don’t destroy a habitat that species rely on.

3) Don’t change the climate in ways that will result in the above.

}<(((*>

Ognjen Bubalo

unread,
Sep 26, 2013, 6:22:18 AM9/26/13
to cesiu...@googlegroups.com

Patrick Cozzi

unread,
Sep 26, 2013, 2:27:40 PM9/26/13
to cesiu...@googlegroups.com
Hi Ogi,

Yes, we use third-party libraries.  There is a list of them in LICENSE.md.

As Chris mentioned, the license must be compatible with our Apache 2.0 license.  The most popular compatible licenses are MIT, BSD, and Apache.  GPL and its variants are not compatible.  From a license perspective, numeric is compatible with Cesium.

We use third-party licenses that:
* Provide capabilities we don't have the time and/or expertise to code ourselves.
* Are small and light.
* Are reasonably popular, tested, and maintained.
* Provide enough value that we are willing to add another third-party library whose integration needs to be maintained and has the potential to slightly count against us when folks evaluate Cesium (generally, less third-party is better).

numeric looks like a quality library, but it is quite large at 74 KB minified.  When not using AMD, Cesium.js is 1.2 MB minified, and we are always thinking about making it smaller, not larger.

Given this, I recommend
1) Using numeric as-is if we have other high-impact near-to-medium term uses for it.  I don't have any off the top of my head, but there may be some.  Or -
2) Using just the part of numeric that we need if it pulls out of the library easily.  This has the potential to create a maintain problem for us, but given the nature of this kind of code and its GitHub history, I suspect this code won't change often.  Also, this is allowed by their MIT license.  Or -
3) Use numeric as a guide for your own implementation.  If we use any parts of numeric, we will credit them and include their license.

(2) is probably the best path here.

Also - with your work in general - the community would love to see a pull request with some of your initial code.  It doesn't need to be big; just some foundations will do, but we like to get folks up to speed with integrating code into the main repo and practice transparency.  Dan can even setup a branch for you to pull into, instead of going into master.

Patrick

Ognjen Bubalo

unread,
Sep 26, 2013, 5:57:03 PM9/26/13
to cesiu...@googlegroups.com
Hi Patrick,

Thank you for the detailed information!

I will solve the problem using the lib, and later if it is ok I will pull out only the used parts.

Dan forked the Cesium repo for me already. I will create a pull request in a day or two.

Thank you,
Ogi

Ognjen Bubalo

unread,
Sep 27, 2013, 8:17:38 AM9/27/13
to cesiu...@googlegroups.com
Hi, 

Can you help in this please? I got stuck a little bit. I wanted to use numeric.js, so I added it to the ThirdParty folder. In my ObjectOrientedBoundingBox.js I added to the defines as '../ThirdParty/numeric', and as a function parameter numeric. The parameters are in the same order. 
After building and combining I find it in the Cesium.js, but not in Cesium unminified. When I start the server and check sandcastle I get an error that I should run combine because it cannot find numeric. 

What do I miss?

Thank you!

Ogi

Patrick Cozzi

unread,
Sep 27, 2013, 11:21:20 AM9/27/13
to cesiu...@googlegroups.com
Hi Ogi,

Dan is out today.  Did you put it in Source/ThirdParty?  Not ThirdParty?  It should be in Source/ThirdParty and copy the pattern of the other .js files like Tween.js.  Also try clearing your browsers cache.

What fork are you working in?  In general, when you need help, it will help us if we are able to see and build your code.

Patrick


--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/Bh4BolxlT80/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Ognjen Bubalo

unread,
Sep 27, 2013, 10:12:18 PM9/27/13
to cesiu...@googlegroups.com
Hi Patrick,

Yes it was in the right place. It took a while, but I found the solution. The numeric.js was not prepared for including. 
I enclosed it with define(function() { //code  }); and Cesium started working.

I pushed the initial commit in my own fork. Soon I will open a pull request on Dan's fork.

Thank you for your time,
Ogi 

Ognjen Bubalo

unread,
Sep 30, 2013, 6:15:45 AM9/30/13
to cesiu...@googlegroups.com
Unfortunately numericJS is in bad state. It took me a lot of hours to figure out that the problem is not on my side. NumericJS contains references because of some historical reason, to it's own functions which are renamed, removed (I checked it's git log), so I fixed some parts of numericJS, but I don't like this way. I will create a pull request with this hack and change it later.

Ogi

Patrick Cozzi

unread,
Sep 30, 2013, 8:17:21 AM9/30/13
to cesiu...@googlegroups.com
Ogi,

Sorry NumericJS is causing you problems.  Given what I saw about the library, I am very surprised to hear this.

You are welcome to open pull requests with hacks into Dan's fork or even into a branch in the main repo if Dan made one for merging, but we won't merge them into the master branch in the main repo until it is production quality.  In general, you should strive to open high-quality fine-grained pull requests so you can get prompt focused feedback and get into the rhythm of contributing code.

Patrick
Reply all
Reply to author
Forward
0 new messages