optimatika / ojAlgo

oj! Algorithms
http://ojalgo.org
MIT License
461 stars 208 forks source link

Proposal for "okAlgo" project #43

Closed thomasnield closed 6 years ago

thomasnield commented 6 years ago

Hey there,

I've been playing with this library a lot and I love it. I have been using it heavily with Kotlin, and I have already been saving some extension functions and DSL's I have found useful.

Would it be okay if I start an "okAlgo" project that provides Kotlin idiomatic extensions to ojAlgo? We can put it under the "optimatika" domain or my own, whichever you like better...

I did something similar with Apache Commons Math with Kotlin-Statistics, which has been successful.

https://github.com/thomasnield/kotlin-statistics

apete commented 6 years ago

Hi, and thanks for asking,

ojAlgo is programmed in Java, but I'd like to think it's "for the JVM". I'm open to discuss any changes, additions or collaborations that would make it easier to use with other languages.

The short answer to your question is yes, you can do that. Details regarding where to put the project (and what to name it) is another question. Don't know what I prefer (yet). The one thing I do wish is that as much as possible of features and good ideas make it to the core library which is "ojAlgo".

thomasnield commented 6 years ago

Okay cool, I'll follow up on this shortly.

thomasnield commented 6 years ago

I shared ojAlgo at KotlinConf today. It really excited a lot of people, and JetBrains didn't even upload the recording yet to YouTube.

https://twitter.com/thomasnield9727/status/926289719717007360

apete commented 6 years ago

I believe that's the first time anyone demonstrated ojAlgo in a presentation.

I'd like to know more about what you had planned for "okAlgo". You certainly don't need anyones permission to start an open source project with a dependency on another library...

Are you aware that there is an ojAlgo and Commons Math integration project?

https://github.com/optimatika/ojAlgo-extensions/tree/master/ojAlgo-commons-math3

thomasnield commented 6 years ago

@apete I used ojAlgo for my main demo, and I think some Android devs are going to start playing with it : )

I did notice that utility to convert Apache Commons Math. Another library I played with and found interesting is ND4J.

What I basically have in mind for "okAlgo" is to put Kotlin DSL's around ojAlgo to add some syntactic sugar. TornadoFX did that for JavaFX, and Anko did that for Android UI's.

I have to get ready to fly early tomorrow back to Dallas, but here is some pseudo-code of what usage might look like. I need to think about it more.

model { 
     val x = variable("x") { 
           range = 0..10
     }
     val y = variable("y") { 
          range = 0..20
     }

     expression { 
           lower = 20.0
           set(x, 2)
           set(y, 1)
     }
}
thomasnield commented 6 years ago

I haven't forgotten this. Just getting my bearings after a busy year. I'll start putting something together this weekend.

apete commented 6 years ago

Have you thought about creating a “Kotlin for Data Science” project and merge what you’ve done with ojAlgo and Apache Commons Math?

On 8 Nov 2017, at 17:19, Thomas Nield notifications@github.com wrote:

I haven't forgotten this. Just getting my bearings after a busy year. I'll start putting something together this weekend.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub, or mute the thread.

thomasnield commented 6 years ago

@apete that has crossed my mind. I've got a Kotlin-Statistics which has somewhat become that purpose, but I'm concerned it's going to become too many things if I make it an ojAlgo interface as well. Right now it focuses on statistical operations and binning/slicing.

https://github.com/thomasnield/kotlin-statistics

I may just come up with an okAlgo project on my own domain, and if it turns out to be useful, I can donate it to optimatika and maintain it here.

apete commented 6 years ago

Sounds good. I’ll close this issue then.