News for hackers. Stuff that matters.
Re:Kotlin and linear programming by sevensor on Thursday January 25, 2018 @08:09PM (#16236269)
Adding to my other comment, my biggest dissatisfaction with this article is that all it did was show the quite excessively verbose problem setup, without actually showing an algorithm for integer linear programming. An interesting post would have explained how to implement branch and bound in Kotlin, not how to call somebody else's library. Needless to say, I'm not sold on Kotlin from reading this.
Re:Kotlin and linear programming by frankc on Thursday January 25, 2018 @08:59PM (#16236482)
I would disagree with this. In general, the algorithms are well known and only need to be implemented once. Doing problem modeling to solve real problems is where the action is for optimization.
Re:Kotlin and linear programming by sevensor on Thursday January 25, 2018 @09:16PM (#16236548)
That's fine, but this article also didn't have any real-world examples in it.
Re:Kotlin and linear programming by twic on Friday January 26, 2018 @07:55AM (#16238760)
> the algorithms are well known and only need to be implemented once

To an extent. The basic algorithms are well known (simplex, interior point), but there is a lot of scope for improvements - this is why the big commercial solvers can be orders of magnitude faster than the best open source ones. Still, even if the algorithms are not well-known, they do only need to be implemented once.

For integer programming, though, there can definitely be value in problem-specific heuristics for branch selection and rounding.

Re:Kotlin and linear programming by deepsun on Thursday January 25, 2018 @10:41PM (#16236878)
Also, I believe no one is doing linear programming without vectorized operations (SIMD) nowadays.

I know JVM optimizes small methods, so maybe their JIT optimizer does that automatically, but I'm not sure that optimizer is better that manually optimized code like in numpy.

Re:Kotlin and linear programming by MaxBarraclough on Friday January 26, 2018 @07:40AM (#16238682)
I suspect you're right. Java doesn't have the best track-record when it comes to SIMD.

Unlike .Net with System.Numerics.Vectors, they're not even interested in making a platform-independent SIMD library for manual optimisation. The JVM holds contempt for such real-world optimisations. I see that Intel have made one though - https://software.intel.com/en-us/articles/vector-api-develop...

At a glance, it looks like Oracle have dabbled with AVX in HotSpot, but aren't taking it very seriously. https://www.google.com/search?q="-XX%3AUseAVX"

Re:Kotlin and linear programming by agibsonccc on Friday January 26, 2018 @05:50AM (#16238247)
We see folks using our linalg library for this and deep learning: http://nd4j.org We maintain our own c++ and cuda stack underneath this as well. It also allow control of these native components from java. We implement everything from our own garbage collector for cpu and gpu to our own cuda kernels.
Re:Kotlin and linear programming by sevensor on Friday January 26, 2018 @08:30AM (#16238943)
Also note that integer linear programming like in the article is very different in practice from continuous linear programming. Relaxing to a continuous problem often doesn't help much.