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

Tangent: I noticed more and more projects advertising a single executable as a way of distributing their apps. I don't want to judge, it's just another way of doing it, but I'm curious: is this a trend and what led to it? I feel like I missed something.


Single executable files are very nice because you don't need to run `apt install <14 dependencies>` to try a piece of software, you just try it and if you don't like it, you delete it without any cruft left on your system.

Go and Rust are two languages whose compilers produce statically-linked executables and they are growing in popularity, so you should expect to see more and more of these kinds of programs. And as these programs become more spread, I expect that other languages (either existing or new) will make it easier for developers to distribute their projects as single files.


Slight off-topic, but I wanted to address the above concern.

APT, DNF, and many other package managers have an "autoremove" command that will uninstall unused dependencies. So if you did "apt-get -y install $PACKAGE && apt-get -y remove $PACKAGE && apt-get autoremove", you won't have any of $PACKAGE's dependencies hanging around after.


True. The scenario I was thinking of was `./configure && make && sudo make install` and iterating on all the missing dependencies that the configure script flags.


Seems like a trend to me, enabled in part by tool chains like Go’s which make it easy. I like them because using/deploying is simple: put the file somewhere and run it. No apt get runtime library config etc etc to worry about.


“I tend to think the drawbacks of dynamic linking outweigh the advantages for many (most?) applications.” – John Carmack

http://harmful.cat-v.org/software/dynamic-linking/


n.b. John Carmack is a game programmer.


this feels like the natural evolution if container based deployment. people have gotten focused on a “single thing that works everywhere” to the point that we are back to having binaries include all dependencies instead of making it clear what the host system needs.


if I had to guess: things like Docker, K8s, and Lambda. All of them make installing sprawling apps with tons of dependencies really troublesome at best. A single executable with almost no dependencies really simplifies that problem.


Go doesn't support shared libraries. The community likes it...




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

Search: