4 ms·
The article author points out several problems in the open source world. The first is that it's too hard to converge things that have diverged. I pointed out a
by Animats 12y ago
The article author points out several problems in the open source world.
The first is that it's too hard to converge things that have diverged. I pointed out an example in a Python library recently - the code for parsing ISO standard date/time stamps exists in at least 11 different versions, most of them with known, but different, bugs. I've had an issue open for two years to get a single usable version into the standard Python library.
Some of this is a tooling problem. Few source control systems allow sharing a file between different projects. (Microsoft SourceSafe is a rare exception.) So code reuse implies a fork. As the author points out, this sort of thing has resulted in a huge number of slightly different copies of standard functions.
Github is helping a little; enough projects now use Github that it's the repository of choice for open source, and Git supports pull requests from outsiders. On some projects, some of the time, they eventually get merged into the master. So at least there's some machinery for convergence. But a library has to be a project of its own for this to work. That's worth working on. A program which scanned Github for common code and proposed code merges would be useful.
Build tools remain a problem. "./configure" is rather dated, of course. The new approach is for each language has their own packaging/build system. These tend to be kind of mysterious, with opaque caching and dependency systems that almost work. It still seems to be necessary to rebuild everything occasionally, because the dependency system isn't airtight. (It could be, if it used hashes and information about what the compiler/linker/etc actually looked at to track dependencies. Usually, though, user created makefiles or manifest files are required. We've thus progressed, in 30 years, only from "make clean; make" to "cargo update; cargo build".
The interest in shared libraries is perhaps misplaced. A shared library saves memory only when 1) there are several different programs on the same machine using the same library, and 2) a significant fraction of the library code is in use. For libraries above the level of "libc", this is unlikely. Two copies of the same program on UNIX/Linux share their code space even for static libraries. Invoking a shared library not only pulls the whole thing in, it may run the initialization code for everything in the library. This is a great way to make your program start slowly. Ask yourself "is there really a win in making this a shared library?"
Shared libraries which are really big shared objects with state are, in the Linux/UNIX world, mostly a workaround for inadequate support for message passing and middleware. Linux/UNIX still sucks at programs calling programs with performance comparable to subroutine calls. (It can be done; see QNX. When done on Linux, there tend to be too many layers involved, with the overhead of inter-machine communication for a local inter-process call.)
- tempodox 12y ago> Few source control systems allow sharing a file between different projects... You can use `svn:externals` in Subversion to achieve something like that. Is there a similar thing in git?
- Animats 12y agoThat's borrowing, not sharing. The project borrowed from has no idea there's someone else using their file. So they will feel free to change it without informing others. "Who tells whom what to do?" - Lenin
- tempodox 12y agoNo Subversion repository has any idea how many checkouts there are. So not even the original repository has any idea by how many parties its files are being used (except you use explicit locking, maybe). Each checkout, external or not, can change a file and commit the change. So is it possible at all to tell “borrowing” from “sharing”? What SCM would do that? Besides, “informing others” of changes is, of course, one of the central functionalities of an SCM. You will be informed about changes in files “borrowed” by others. So what's the difference to “sharing” again?