Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've come to realize that putting everything into a container is the only viable way to share a python program.

I'll certainly checkout PEX, I think that distribution of a binary is likely the largest one for Python right now. Java solved it with a JAR file, static-compiled binaries for most compiled languages.

At Google PAR files have been quite a useful way to handle this for at least 18 years now, hope this can get reasonably solved everywhere.



Docker exists because running a Python program is so brutally difficult that packaging up half an OS is the only way to reliably run them.


I would say that it's not just a Python problem, Node.js or Ruby seems to have almost the same problems. I'd say Docker exists because packaging C/C++ dependencies is an impossible problem that hasn't been solved in 5 decades. The build tools absolutely suck.


It isn't just the build tools, Unix as the platform for Worse Is Better, has decided to never solve this problem. Docker solves the problem of a having an under powered broken dynamic linker.

Docker should have never been necessary.


> under powered broken dynamic linker.

In your mind what would a good dynamic linker look like?


> because packaging C/C++ dependencies is an impossible problem that hasn't been solved in 5 decades

C/C++ build systems suck. But deploying a C++ program is much much easier than Python. And Linux is waaaay worse than Windows for both building and deploying imho.


> Java solved it with a JAR file

JARs still require a JRE to run, and the runtime needs to be invoked. The equivalent would probably be a Python zipapp (which are just Python files zipped into a .pyz the interpreter can run).

Static binaries are one advantage that languages like Go and Rust have though, yeah.


You can bundle a JRE with a JAR to get a self contained executable.

Also don’t forget that many compiled languages depend on a particular libc so you’re not totally in the clear there.


A JRE + binary deployment weights in over 100 MB.

An ordinary compiled binary would be a fraction of that size, saving you time in provisioning and deployment.


Small price to pay if you have a JVM team already.

Most programmers (HN is a bubble) hate learning new languages.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: