SM final tweaks (was Re: Trouble getting SqueakMap to work)

Avi Bryant avi at beta4.com
Wed Jan 28 23:02:44 UTC 2004


On Jan 28, 2004, at 2:32 PM, goran.krampe at bluefish.se wrote:

> So the idea is to... add this "speaking UUID" as a field in SMPackage?
> Which is generated when the package is registered I assume.
>
> First - this "speaking UUID" would still not make packages renameable.
> Secondly - since this is so, the extra number at the end is hardly
> necessary since SM actually enforces the package name to be unique!
>
> So actually - what does this mean? What would happen if we simply used
> the package name (haven't looked at your code) with tricky chars 
> removed
> as shown above and perhaps also changed into lowercase (are all
> filesystems case sensitive?) and truncated at 31 chars?
>
> Well, theoretically the removal of tricky chars/truncation etc could
> make two packages end up with the same name.

I think you're misunderstanding.  Let me rephrase (my understanding of) 
the proposal:

Currently, to generate a new unique ID for a package you use Squeak's 
UUID class, which basically gives you a large random number.
What if, instead, you used a derivation of the original package name 
(whatever it is first registered with), truncated and with tricky 
characters removed, and with some extra numbers at the end to ensure 
uniqueness?

This isn't a new field, or a new concept, or something that in any way 
changes any of the semantics of SM.  It's simply a new algorithm for 
generating the UUID for a package that happens to have the nice 
property that a human, looking at a UUID, may be able to guess which 
package it belongs to (although in some cases, especially after package 
renames, they may not be able to guess with 100% certainty).

This sounds like a pretty good idea to me.

Avi




More information about the Squeak-dev mailing list