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

goran.krampe at bluefish.se goran.krampe at bluefish.se
Wed Jan 28 22:32:55 UTC 2004


Martin Wirblat <sql.mawi at t-link.de> wrote:
> goran.krampe at bluefish.se wrote:
> 
> >I know. But you didn't succeed. :) Two issues with using package 
> >names: 
> 
> I have not given up yet :)
> 
> >1. The names can then not change. At least not without problems.
> >2. The names can contain "tricky chars". Spaces, lower/upper case,
> >slashes etc. And guess what happens with those in filenames? :-) And
> >yeah, the package names would be limited to 31 chars.
> >
> 
> The attachment has a method  String>>asAlphaNumeric:mergeUID: with 
> which one can convert arbitrary names to a string with fixed size, 
> guaranteed to be unique and without "tricky chars". 
> 
> Something like a 'speaking UUID'. 
> 
> Example:
> 
> 'Crop SketchMorphs and Grab Screen Rect to JPG' asAlphaNumeric: 31 
> mergeUID: 10  	'CropSketchMorphsAndG_iOw94jquN6'
> 
> 'Monticello' asAlphaNumeric: 31 mergeUID: 10    
> 	'Monticello_kp6aV2l0IZK9uBULGOeG'

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. On the other hand, we could
enforce that to not happen when registering packages - and urge the user
to change the package name entered.

And what if a package is renamed? Well, we will get a cache miss and a
few downloads extra + and an orphaned directory which we could of course
have some code sweep up.

Ok, I will let this hang a while - would be grateful for feedback about
it.

regards, Göran



More information about the Squeak-dev mailing list