<div dir="ltr">Everyone, stop acting like a bunch of Java programmers and get back to work!</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 12, 2018 at 4:58 PM, Joe Armstrong <span dir="ltr"><<a href="mailto:erlang@gmail.com" target="_blank">erlang@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Feb 12, 2018 at 10:06 PM, Vlad Dumitrescu <<a href="mailto:vladdu55@gmail.com">vladdu55@gmail.com</a>> wrote:<br>
><br>
> On Mon, Feb 12, 2018 at 9:06 PM, Jesper Louis Andersen<br>
> <<a href="mailto:jesper.louis.andersen@gmail.com">jesper.louis.andersen@gmail.<wbr>com</a>> wrote:<br>
>><br>
>> On Mon, Feb 12, 2018 at 6:58 PM Joe Armstrong <<a href="mailto:erlang@gmail.com">erlang@gmail.com</a>> wrote:<br>
>>><br>
>>><br>
>>> I have said on many occasions that code should be named by the SHA1<br>
>>> checksum of<br>
>>> the content - as far as I know this would not offend people - apart<br>
>>> from those who thought the name could be a tad simpler.<br>
>>><br>
>><br>
>> I might have said this before, but here goes:<br>
>> Using a cryptographic checksum for a package and then pointing the name to<br>
>> the checksum would have saved Node.js npm package manager a lot of headaches<br>
>> when people remove, rename or otherwise destroy packages.<br>
>> It also allows you to comply with legal requests with a sunset period. As<br>
>> in "I hear you, and the name will be given to you. But we give people 6<br>
>> months time to upgrade before we remove the old checksummed packages".<br>
>> I'm interested in why someone did not try this yet. Or if one tried, why<br>
>> it didn't work out. It seems very obvious to build a<br>
>> content-addressable-store for your packages.<br>
><br>
><br>
> I'm not sure I understand this completely. Using the checksum of a package<br>
> as identifier is IMHO only useful if it is used in the dependencies list of<br>
> other packages. If the deps list uses names (and people will use names<br>
> anyway, not checksums), then the problem remains that in case a package is<br>
> renamed and another one reuses the name, we don't know to which one a<br>
> reference points.<br>
<br>
</span>The dependency list should be a list of checksums and NOT a list of<br>
names - this list of<br>
checksums has itself a checksum (the "true" name of the package).<br>
<br>
A human readable name is just an alias to a checksum - two different<br>
human readable names<br>
are the "same" if they are aliases to the same checksum.<br>
<br>
Basically files should be named by their checksums - for fairly<br>
obvious reasons of<br>
convenience tools should hide or reveal these names when necessary or<br>
appropriate.<br>
<br>
For a given content the checksum is unique.<br>
<br>
To handle renamings you just need a lookup table of<br>
<br>
      {Name, Time, Checksum} tuples that tracks changes to the name of<br>
the checksum over time<br>
<br>
Should be easy (Famous last words rule applies here)<br>
<br>
Cheers<br>
<span class="HOEnZb"><font color="#888888"><br>
/Joe<br>
</font></span><span class="im HOEnZb"><br>
<br>
<br>
<br>
><br>
> Anyway, <a href="http://hex.pm" rel="noreferrer" target="_blank">hex.pm</a> has a field named "checksum" and it is that value that is<br>
> stored in rebar.lock. So the hash key is there, but I don't see how it is<br>
> useful except for tools.<br>
><br>
> best regards,<br>
> Vlad<br>
><br>
</span><div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br></div>