Have any of you ever looked at source code for ojA...
# mathematics
t
Have any of you ever looked at source code for ojAlgo? I think Anders did some pretty interesting approaches in both the implementation and external API, and trying to keep it up-to-date with modern Java idioms. It's therefore a complete contrast of approach to NumPy. Since it's pure Java, part of me wishes to port it to Kotlin just to see how it would turn out. https://github.com/optimatika/ojAlgo
a
I had a very brief look. Quite a lot of code there (most of which is boilerplate) and very complicated type system. It is also monolithic so I can't see real advantages over commons-math. I think we should think modular and follow pragmatic approach of kotlin development. Meaning not to try to do everything at once, but create a good basis and then implement those features that are really needed in separate blocks.
t
@altavir For ojAlgo I'm mostly focusing on the core linear algebra stuff (although the neural network and solver API's are quite nice). I think the reason for all the boilerplate (besides it being Java) is because he makes a heck of an efficient and optimized implementation. Anders claims it is the fastest on the JVM. http://www.ojalgo.org/
a
Did not found any benchmarks. It is very close to the thing I've done. But it is hard to compare.
t
a
Ok, it is interesting, I will further look into implementation.
k
I did look at ojalgo on your recommendation @thomasnield. I still had planned writing an ojalgo wrapper in koma to get JVM performance. I think a pure kotlin port sounds like an awesome idea as well, since it could potentially allow that performance to exist on other backends (e.g. javascript).
t
@kyonifer yeah... I think that's why I never fully abandoned ojAlgo for Koma because I found its pure Java implementation something to learn from. It's been around since 1997 but Anders has dogfooded it heavily for his work since, and therefore kept it updated and overhauled as needed. It's always been in the back of my mind to create a pure Kotlin implementation inspired by ojAlgo (no C-based BLAS backends). It has robust support for rational number matrices and complex numbers. And yeah it's a little hard on the eyes to look at the implementation, but only because Anders optimized the hell out of it.