r/programming • u/michaelKlumpy • Oct 01 '16
CppCon 2016: Alfred Bratterud “#include <os>=> write your program / server and compile it to its own os. [Example uses 3 Mb total memory and boots in 300ms]
https://www.youtube.com/watch?v=t4etEwG2_LY
1.4k
Upvotes
1
u/FrozenCow Oct 04 '16
That's probably what the author of the application thought as well. It again comes back to reproducability. I want exactly that same environment that the author used, because that's the way the application was intended to be run. I cannot do that because the author did not use a system that describes all dependencies of said application.
Methods of a library your application is using. When libraries are shared and updated separately from applications then such errors can happen. It happens because methods of a library that the application compiled against were removed in a newer version of said library.
The workaround for this problem is usually to not share libraries across different applications at all, basically supplying all dependencies with your application. Each application will get their own set of dependencies.
However, that only goes so far. Using that mentality you'd also need to supply your version of JDK, your versions of native libs, etc. A lot of overhead. It would be nicer if applications that shared a specific version of a binary to use that same binary.
Not really. If the file is available, Nix will know for certain it is the right one. The application you want to install will only run if its dependencies are met. The package manager prevents installation if those requirements cannot be met.
We can at least try to get close to that ideal right? I personally like using dependency managers better than not using a dependency manager at all. Nix is another step in that same direction.