SqueakMap Package Loader

squeak-dev at lists.squeakfoundation.org squeak-dev at lists.squeakfoundation.org
Fri Oct 25 08:57:30 UTC 2002


Hi Chris and all!

"Norton, Chris" <chrisn at Kronos.com> wrote:
> Hi Göran.
> 
> Since I am a complete newbie to SqueakMap, perhaps my trials & tribulations
> will be of some help to you.

Definitely! (I also posted a reply on Ned's reply with more info, read
that too as I will not repeat myself)

> Henceforth, some feedback on SqueakMap.  :-)

Hit us.

> Using a nearly virgin 3.2 image (on Windows NT 4.0), I created a fresh
> project, opened a workspace and I was able to successfully install SqueakMap
> via Göran's do-it.
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> ChangeSorter newChangesFromStream:
> ('http://anakin.bluefish.se:8000/gohu/uploads/11/squeakmap-021023RC1.cs.gz'
> asUrl retrieveContents content unzipped readStream)
>  named: 'squeakmap-021023RC1'
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> *  During the installation, I OK'd the selection of the 2nd server (Daniel
> has already explained that little tidbit).

Yes, I have now for RC2 removed the inform dialog, it will print on
Transcript instead.

> *  During the installation, I OK'd the installation of the 'SM Package
> Loader'.
> 
> The first thing I noticed (in my stock image) is that the 'SM Package
> Loader' system window looks like an albino and it was hard to read (white
> window w/ white borders, etc.), so I immediately changed its window color
> into something pleasing to my eyes.  :-)

This is... You changed it's window color? How? With code? Ok.
There is a fix for this waiting in Daniel's inbox. It is the same fix I
have done for SMBrowser and also Ned's ArchiveViewer in fact - perhaps
you have noticed that it too is an albino.

> The next thing I noticed is that the stock Squeak image can't display
> Göran's name properly.  Apparently we need to add 'ö' to the standard font
> set.  With so many European Squeakers, I was rather surprised to see this.
> 
> OK.  So now I'm looking at this browser, which I have enlarged to fill my
> screen.  It has 11 items in the list on the upper left.  The box on the
> upper right seems to be display-only, as none of my 3 mouse buttons do
> anything there.  So what do I do now?
> 
> I clicked on one of the items in the list: Shared Streams (->1.0).  In the
> large pane at the bottom, I see lots of information that is all sorta
> jumbled together; it makes my eyes tired (OK, I was already tired, but...).

True - I haven't had time to make it pretty. But I think Ned's latest
.cs in my inbox does that...

> Perhaps a bit of fun with fonts & colors could clear this pane up a bit.
> Looking over the details, I see two URLs (Homepage & Download).  Wouldn't it
> be nice if these were a different color and/or underlined, as they are in
> all of my web browsers?

They will be clickable in RC2, fixed.

> Perhaps there should be a line above the word 'Description:' to separate
> this important bit of information.  Well, I think you get the idea, so I
> won't belabor the point any further.
> 
> OK, so I'm back to wondering what the heck I can do with this tool.  I tried
> right mouse clicking over the description pane and didn't even get an edit
> menu, though I *can* type in that window.  Hmm.  What does that mean?
> 
> Right mouse clicking in the upper left pane yields more satisfying fruit.
> In the menu that pops up, I see help so I immediately chose it.  This opens
> up another menu with a large heading (the help text) and a single selection
> (OK).  This reminds me of the many UI items that are missing in Squeak,
> namely a general help mechanism (like Windows and other OSs have), dialogs
> that support such basic uses as OK, Cancel, ...  There are many such simple
> tools that are missing in Squeak.  I simply must put this on my list of
> items I'm willing to pay for.
> 
> * There is a spelling error in the 'help' text (pacakges).

Daniel has been notified.

> Moving back to the popup, I now see that if I let my mouse hover for a bit,
> I get some balloon help.  This is nice.
> 
> I see the option for setting the download directory and I wonder what will
> be downloaded.  Because I'm insatiably curious, I opened up a Windows
> Explorer and looked at my Squeak directory.  Curious.  A subdirectory called
> 'sm' was created, presumably by me when I installed this tool.  In that
> directory, I see two files squeakmap.1.log and squeakmap.2.log.  These files
> are odd.  The first file only contains the following:

Ok, now you are really digging! :-)
Yes, the "sm" directory get's created upon first access to "SMSqueakMap
default".
"SMSqueakMap default" gives you the singleton domain model for
SqueakMap.
If it is nil it get's created and it will then created the "sm"
directory and open up a log-file there.

So the SMSqueakMap sole singleton instance logs all it's changes in that
file! Aha. So it is "image crash proof".

> '24 October 2002' asDate!
> 
> That seems like a bug to me. 

Nope, do an alt-m on: createNewLogWithInitialContent:

Then you will see that SqueakMap stores the log creation date first in
the file.

> The second file also starts out with that

The reason you have two is that first when the client side map is
created empty in your image it will create a logfile to log all state
changes in. And then when you fire up SMLoader it (always) tries to
update the map over the net before opening the window so that the shown
information is absolutely fresh.

Your map will then say to the server "Hey, update me - my last known
transaction number is... 0" (since it is empty).
The server says, "Oops dude, that was a long time ago - I don't have all
transactions stored that far back, so I will give you the full map
instead". Ok, says your map and it will then take the chance to create a
new fresh log. This is why you suddenly have two logs. A bit of a bug
actually - but harmless.

The next time you fire up SM Loader (or press "update from net") your
map will say "Hey, master! Update me - my last known transaction number
is 281". And the server will answer "Ok, mine is 323. I will then send
you the last 323-281=42 transaction entries from my logfile. Here you
go, I also gzipped them." And you map goes "Thanks! Let's eval these
guys and stuff them down into my logfile.".

Anyway it's only the logfile with the highest number that is used - the
others are old logs. I haven't added some form of "delete old log files"
yet - if for some reason the one with the highest number get's corrupted
you can use the old ones too.

SqueakMap will also create a new "compressed" log file every 6 months
and start from fresh. It's a bit technical but just say "Tell me more"
and I will explain it in detail.

> line, but it is followed by a 17 pages (using MS Word) of data that looks
> like this:
> 
> (self newCategoryWithId: '82f328ab-175d-40b4-a363-bc0287dabd77')
> 	created: 3206703836
> 	updated:3206703836
> 	name: 'Development tools'
> 	summary: 'Add-on development tools for Squeak.'
> 	url: ''
> 	mandatory: false
> 	parentId: nil!
> 
> This seems, to me, to be some sort of temporary data file.  I can only
> presume that it was downloaded from http://anakin.bluefish.se or perhaps it
> was created when the 'SM Package Loader' was installed?  I don't know.
> Maybe it is the result of my request to 'update map from the net'?

Well, it is not temporary at all - this is where your catalog "lives".
Well, the image has a model of course in synch, but the point is that if
the image goes BOOM, SqueakMap will recover from the logfile.

In fact - you could have multiple images in the same directory using
SqueakMap. They will then share the same "sm" directory and thus
logfile. But your client SqueakMap only writes to the logfile when
loading updates from the master. And it opens/closes each time. This
means that your images can coexists as long as you don't try to update
simultaneously. Of course, I should add a check for file access there...

And when I come to think of it this currently will get confusing because
if image A loads updates then image B must load those transactions from
the file to get in synch... Oops. It doesn't do that today. Hmmm, need
to add that. (But you can do a "SMSqueakMap default reloadLog" manually,
which will clear the image map content and load it in full from the
newest logfile)

> Getting back to the download directory, I change mine to the new 'sm'
> directory, because I don't know what will happen when I start downloading
> and I really don't want to mess up my squeak directory (I use it with other,
> less virginal images, after all).

Good point. That should perhaps be default. Currently the downloading
mechanism is a bit primitive.
It doesn't try to handle filename conflicts between packages and it
doesn't remember if a file has been downloaded etc.
Room for quite a few improvements there. For example, if you first do a
"download" and then an "install" the install will still start by
downloading again... ;-)

> OK.  Before I start downloading, I'm going to look at the other menu
> options.  I've figured out what the four last options are -- the balloons
> helped me with this part, though I would prefer to see the word 'display' in
> the menu before each of these items.

I have asked Daniel to also change them to... check box menu items.
Because I think they are filters that can be combined.
Currently it is quite confusing because of this.

> *  How come some of the packages don't have information in the upper right
> pane?

[SNIP of stuff answered in other post]

> * As was noted by others, right-mouse-clicking in the 2 empty panes in the
> SMSqueakMapBrowser reaps a walkback.

Fixed in my dev version.

> * I clicked on Entertainment>>Games>>Classic and then clicked the 'install'
> button -- this resulted in a walkback.

Ok, will fix. Obviously "install" doesn't check for a valid selected
package.
Not that the buttons are for the package list below and not the category
lists above.
Hmmm.

> * I clicked on Class Libraries>>Refactoring Browser and then clicked
> 'install' -- this brought my computer to a virtual standstill.  After a
> while, I saw a progress meter.  Finally, I got a satisfactory message (an OK
> 'menu').  

Daniel (and I in SMSqueakMapBrowser) will add a Cursor wait while
downloading...

> * One thing that is missing from SqueakMap is a 'ReadMe' after something
> gets loaded.  In the case of the Refactory Browser, I expected a window to
> pop up and give me some basic instructions on what to do next.  Perhaps this
> could be improved upon.
> 
> After poking around in a Browser, I found the RefactoringBrowser class.
> There was no comment (!!!), but there was a class method that I ran
> (RefactoringBrowser openBrowser) which resulted in a RefactoringBrowser --
> it looks curiously like a regular Browser; I had expected it to at least
> have its own color.
> 
> The oil has been spent and I've got to go get some dinner now (its 8:40p and
> I've long since passed the hunger stage).

Thanks for the fishing trip, Chris! Lots of good things caught.

> Thanks for the nice tools Göran & Daniel!  I hope this e-mail will help you
> with your feature.

Definitely.

> Cheers,
> 
> ---==> Chris

Cheers, Göran



More information about the Squeak-dev mailing list