Hacker News new | ask | show | jobs
by binaryautomata 3969 days ago
I agree to a certain extent. The JVM/Maven pom appoach seems to work the most reliably across architectures, which is nice.

Python is a friggin' nightmare by comparison. Some trivial low-complexity operations can take insane amounts of elbow grease due to missing/outdated libs.

1 comments

I think clojure/lein really shows off the power of Maven/Ivy for managing packages. But I'm not sure how well that works for c++/c-extensions?

Pip does a remarkable job of magically getting and compiling missing c/c++ libraries, and works great in tandem with virtualenv.

To this day I have not found a good way to distribute compiled JNI binaries. You can either consider them completely separate from your Java code and package them separately, or you can put them into your JAR and then do some horrible hacks of unpacking the JAR at runtime, detecting the architecture and loading the library from the temporary directory. This is really something that should be built into the standard package formats/tools.
Use https://github.com/fommil/jniloader - it's still the horrible hack under the hood, but it standardizes it all for you.