3 ms·
What's an example of an immutable, append-only repository of dependencies? That _sounds_ intriguing but I don't follow.
by thinkingkong 7y ago
What's an example of an immutable, append-only repository of dependencies? That _sounds_ intriguing but I don't follow.
- all2 7y agoMaybe like C's `include`s? Where (I think) the code is in-lined without modification? The include is immutable (unless there are macros). Append only sounds like the included code should be evaluated after other code in a given file (so main defs would take precedent over included defs? Or main defs would be over-written by included defs... I guess it depends on compiler/evaluator implementation. The more I type here, the more I realize how much I don't know about this stuff...
- dragonwriter 7y agoI don't know of any perfect examples, but the idea is one where once a version of a library is posted, that version can no longer be deleted or modified, only later versions added. Legal and practical constraints would probably mean any real system would be at best an approximation of this ideal, but a big part of he leftpad problem is that NPM at the time didn't even try to approximate it (the response also underlined an NPM policy existing at the time that was useful in that context but dangerous in general, in that NPM generally allowed others to claim the name of abandoned projects.)
- thinkingkong 7y agoSo like the first use of a shared ledger ever for binary packages?
- smilliken 7y agonixpkgs works like this when you pin to a specific git commit. It's effectively like vendoring all of your dependencies into your source control system, but without the overhead of storing everything locally (instead just storing hashes of dependencies).