Folks,
Since I was tired to hack plain text files when trying to port some stuff to Squeak I've put a FileContentsBrowser on the UIUC server. The idea is that while the class browser is a great tool it can currently not be used to give us a "structured view" on a (syntactically correct) Smalltalk source code file. That's exactly what the FileContentsBrowser is doing. It just scans the file and you can browse the classes and methods of this file _without_ having to actually install it.
I found it very helpful when porting stuff even though it's very simple at the moment (you cannot modify anything). Also, I like it much more to review changes than the current change list. Another reason I put this onto the server is the recent discussion about where to put applications such that people are aware of it. One could easily think of adding some ftp support to it such that you can browse the contents of any application on any ftp server around the world.
Just try it! Andreas
Cool!
Since I was tired to hack plain text files when trying to port some stuff to Squeak I've put a FileContentsBrowser on the UIUC server. The idea is that while the class browser is a great tool it can currently not be used to give us a "structured view" on a (syntactically correct) Smalltalk source code file. That's exactly what the FileContentsBrowser is doing. It just scans the file and you can browse the classes and methods of this file _without_ having to actually install it.
I found it very helpful when porting stuff even though it's very simple at the moment (you cannot modify anything). Also, I like it much more to review changes than the current change list. Another reason I put this onto the server is the recent discussion about where to put applications such that people are aware of it. One could easily think of adding some ftp support to it such that you can browse the contents of any application on any ftp server around the world.
Just try it! Andreas
Folks,
I've just uploaded a version 0.2 of the FileContentsBrowser to UIUC (will probably take a day or two to show up). I've also added a page on Ward's site at
http://c2.com:8080/FileContentsBrowser
The new version now supports fileIn/fileOut of classes/categories/methods. It also shows differences to existing implementations. It's really helpful if you have to deal with stuff where you're not entirely sure if it will install without problems (I have successfully browsed T-gen / HotDraw / SmallWalker ports for VisualWorks). More information is on the above page.
Andreas
Andreas --
This really looks cool!
Thanks and cheers,
Alan
-----
At 2:56 AM +0200 4/4/98, Andreas Raab wrote:
Folks,
I've just uploaded a version 0.2 of the FileContentsBrowser to UIUC (will probably take a day or two to show up). I've also added a page on Ward's site at
http://c2.com:8080/FileContentsBrowser
The new version now supports fileIn/fileOut of classes/categories/methods. It also shows differences to existing implementations. It's really helpful if you have to deal with stuff where you're not entirely sure if it will install without problems (I have successfully browsed T-gen / HotDraw / SmallWalker ports for VisualWorks). More information is on the above page.
Andreas
Linear algebra is your friend - Trigonometry is your enemy. +===== Andreas Raab ============= (raab@isg.cs.uni-magdeburg.de) =====+ I Department of Simulation and Graphics Phone: +49 391 671 8065 I I University of Magdeburg, Germany Fax: +49 391 671 1164 I +=============< http://isgwww.cs.uni-magdeburg.de/~raab >=============+
I tried to run my image from another computer on the network (with the VM copied to this other computer). It works OK, except that sources and changes files are not available: Squeak looks for these files on the machine where the VM is (more or less hard-coded by appending imagename.changes to "SystemDictionary vmFile"). Wouldn't it be reasonable to take the location of the image file as the default location to look for changes and sources files, instead of the location of the VM? How hard would it be to change to current setting?
Hans Baveco Institute for Forestry and Nature Research Wageningen The Netherlands
BAVECO wrote:
I tried to run my image from another computer on the network (with the VM copied to this other computer). It works OK, except that sources and changes files are not available: Squeak looks for these files on the machine where the VM is (more or less hard-coded by appending imagename.changes to "SystemDictionary vmFile"). Wouldn't it be reasonable to take the location of the image file as the default location to look for changes and sources files, instead of the location of the VM? How hard would it be to change to current setting?
Take a look in VisualWorks 3.0 at PortableFilename and LogicalFilename. We were faced with the problem of moving an image between machines when it has loaded an arbitrary number of parcels, each with its own source file. Some parcel sources might be in the same directory as the image, but most would be loaded from "standard" locations. By naming sources via symbolic names (environment variables or registruy entries) one can set the values of these variables appropriately on each system you move the image to and hence one doesn't have to change names.
An example would be the standard source file whose filename is '$(VISUALWORKS)\image\visual.sou' asLogicalFileSpecification
These filenames have worked-out extremely well. Since VW3.0 I've not had to adjust the name of a single source file, and a number of my images have 10 or so associated source files.
P.S. Since we haven't released on PowerMac yet I'd be interested in knowing how those of you who use macs think such variables would be maintained on the mac. On Unix we use the shell/process environment; on Windows NT/'95 we use the registry backed-up by the environment. _______________,,,^..^,,,_______________ Eliot
BAVECO writes:
I tried to run my image from another computer on the network (with the VM copied to this other computer). It works OK, except that sources and changes files are not available: Squeak looks for these files on the machine where the VM is (more or less hard-coded by appending imagename.changes to "SystemDictionary vmFile"). Wouldn't it be reasonable to take the location of the image file as the default location to look for changes and sources files, instead of the location of the VM? How hard would it be to change to current setting?
This is actually how it works, at least on Unix:
$ mkdir empty $ cd empty/ $ ls $ type Squeak Squeak is hashed (/b3/home/lex/bin/Squeak) $ Squeak /home/lex/squeak/lex.image
There is no warning about missing changes files, so it seems okay (I don't know how to check for what exact changes file is being used).
I will point out, though, that we had some trouble here with Windows NT sometimes changing long filenames into mangled 8.3 filenames. Something to do with SMB filesystems perhaps. We ended up having people copy things over to a local drive and running from there. Are you running off a network drive?
Lex
As suggested by Reinier van Loon, I changed some methods in SystemDictionary, with the result that sources and changes files are now looked for in the same dictionary as the image file (methods sourcesName and changesName). Opening the image with a VM on another platform now works better, as the sources file is now found (with readonly access). However, the changes file (with write-access) can not be opened: more precisely, the primitive (in StandardFileStream) primOpen: fileName writable: true returns nil, while the file definitely does exist. I vaguely remember a thread about this behavior. Is this a bug with a workaround, or am I doing something wrong?
Hans
BAVECO writes:
I tried to run my image from another computer on the network (with the VM copied to this other computer). It works OK, except that sources and
changes
files are not available: Squeak looks for these files on the machine where
the
VM is (more or less hard-coded by appending imagename.changes to "SystemDictionary vmFile"). Wouldn't it be reasonable to take the location
of
the image file as the default location to look for changes and sources
files,
instead of the location of the VM? How hard would it be to change to current setting?
This is actually how it works, at least on Unix:
$ mkdir empty $ cd empty/ $ ls $ type Squeak Squeak is hashed (/b3/home/lex/bin/Squeak) $ Squeak /home/lex/squeak/lex.image
There is no warning about missing changes files, so it seems okay (I don't know how to check for what exact changes file is being used).
I will point out, though, that we had some trouble here with Windows NT sometimes changing long filenames into mangled 8.3 filenames. Something to do with SMB filesystems perhaps. We ended up having people copy things over to a local drive and running from there. Are you running off a network drive?
Lex
squeak-dev@lists.squeakfoundation.org