4 ms·
Python imports modules dynamically so even if we embedded python in Go, all the deployment woes of Python would still be around. Its kind of a fundamental probl
by zaptheimpaler 7y ago
Python imports modules dynamically so even if we embedded python in Go, all the deployment woes of Python would still be around. Its kind of a fundamental problem with dynamically linked libraries and python being an interpreted language.
- zzzcpan 7y agoThere isn't any fundamental problem, it's just about tooling. Interpreted languages typically do this by packing all the necessary modules into an executable binary together with an interpreter and preloading or faking import function to load them from memory. Dynamically linked libraries usually can be recompiled and relinked statically, sometimes you may need to fake dlopen() and add a namespace to functions as some people try to prevent static linking, and if recompiling is not a possibility, approaches like elf statifier [1] can be taken. It's too bad shipping a single self contained binary doesn't have a first class support in most languages as if deployment is somebody else's problem. But nothing actually prevents it. [1] http://statifier.sourceforge.net/statifier/background.html http://statifier.sourceforge.net/statifier/background.html