Hello there!
I am a really good Java programmer who is aspiring to learn Smalltalk, using Squeak.
The current version of Squeak that I am running is: Squeak 3.86Beta6
I am running this implementation on Mac OS X Tiger...
Several questions:
1. I installed Squeak in my hard drive at this location:
/Developer/Smalltalk/Squeak3.8-MacOS-Full
Using the book, entitled, "Squeak - A Quick Trip to ObjectLand"
( http://www.amazon.com/gp/reader/0201731142/ref=sib_dp_pt/ 104-5386346-0518331#reader-link ),
I started creating projects based on the material in Chapters 2 & 3...
When trying to save the ObjectLand.image file (after several mock projects) in the "World Menu" using both menu items, "save" and "save as...", I noticed that it saved the following files in my Squeak root directory ( /Developer/Smalltalk/Squeak3.8-MacOS-Full/ ):
ObjectLand.1.changes ObjectLand.1.image ObjectLand.changes ObjectLand.image ObjectLand_segs
Also noticed that it created a new directory (which is empty, by the way) right under the Squeak root directory called:
ObjectLand_seqs
Also noticed another directory under my Squeak root directory, called, Squeaklets, containing the following files:
New Changes.001.pr New Changes.002.pr New Changes.003.pr New Changes.004.pr New Changes.005 New Changes.006 New Changes.gif resourceCache.map
Can anyone tell me what these prospective directories + these files (including the extensions: images, .changes, .pr., & .map) mean?
2. When I tried to save new files in a brand new directory (some other location than Squeak root), using the following menu items "save project on file..." and "load project on file...", (belonging in the "World Menu") to:
/Developer/DevProjects/SqueakProjects/ObjectLand
I noticed the following files:
New Changes.001.pr New Changes.002.pr New Changes.003.pr New Changes.004.pr New Changes.gif
Why did it not save it as ObjectLand001.pr instead of "New Changes"? What are these .pr files and .gif files? Why can't I save everything (including .st files) in a directory, other than, the Squeak root directory?
3. Why do the "save" and "save as..." actions save to Squeak root instead of the location I specified the "save project on file..."?
Sorry if this seems confusing, I just figured there would be an easier way to set up a project along with its file system structure....
Also, sorry, if these seem like such basic questions (I've only been using this lovely environment for two days, now!)
Many, many thanks!
-Unnsse
untz wrote:
Hello there!
I am a really good Java programmer who is aspiring to learn Smalltalk, using Squeak.
Nice switch :-)
The current version of Squeak that I am running is: Squeak 3.86Beta6
I am running this implementation on Mac OS X Tiger...
Several questions:
- I installed Squeak in my hard drive at this location:
/Developer/Smalltalk/Squeak3.8-MacOS-Full
Using the book, entitled, "Squeak - A Quick Trip to ObjectLand"
( http://www.amazon.com/gp/reader/0201731142/ref=sib_dp_pt/104-5386346-0518331... ),
I started creating projects based on the material in Chapters 2 & 3...
When trying to save the ObjectLand.image file (after several mock projects) in the "World Menu" using both menu items, "save" and "save as...", I noticed that it saved the following files in my Squeak root directory ( /Developer/Smalltalk/Squeak3.8-MacOS-Full/ ):
ObjectLand.1.changes ObjectLand.1.image ObjectLand.changes ObjectLand.image ObjectLand_segs
Also noticed that it created a new directory (which is empty, by the way) right under the Squeak root directory called:
ObjectLand_seqs
Also noticed another directory under my Squeak root directory, called, Squeaklets, containing the following files:
New Changes.001.pr New Changes.002.pr New Changes.003.pr New Changes.004.pr New Changes.005 New Changes.006 New Changes.gif resourceCache.map
Can anyone tell me what these prospective directories + these files (including the extensions: images, .changes, .pr., & .map) mean?
image is the Squeak system. changes are the code changes you made to that image. pr is a project map i'm not sure what is...
- When I tried to save new files in a brand new directory (some other
location than Squeak root), using the following menu items "save project on file..." and "load project on file...", (belonging in the "World Menu") to:
/Developer/DevProjects/SqueakProjects/ObjectLand
I noticed the following files:
New Changes.001.pr New Changes.002.pr New Changes.003.pr New Changes.004.pr New Changes.gif
Why did it not save it as ObjectLand001.pr instead of "New Changes"? What are these .pr files and .gif filesWhy can't I save everything (including .st files) in a directory, other than, the Squeak root directory?
Check the security settings. (open the Preferences panel and click on security) Some images have been set to only save on secure folders.
- Why do the "save" and "save as..." actions save to Squeak root
instead of the location I specified the "save project on file..."?
Sorry if this seems confusing, I just figured there would be an easier way to set up a project along with its file system structure....
Also, sorry, if these seem like such basic questions (I've only been using this lovely environment for two days, now!)
Many, many thanks!
-Unnsse
karl
Karl,
Thanks for the help.... A few issues:
Karl wrote:
Check the security settings. (open the Preferences panel and click on security) Some images have been set to only save on secure folders.
When I clicked on security the following menu items were displayed:
-automaticKeyGeneration -eToyLoginEnabled -securityChecksEnabled -showSecurityStatus (on) -startInUntrustedDirectory -warnAboutInsecureContent (on)
There was nothing that specified setting the folder or secure folders for that matter....
Does this mean that all images are placed in the Squeak root directory?
What is an image, by the way? Is it the actual virtual machine or is it synonymous with Java .class files that get loaded by a ClassLoader, in a JVM?
Why aren't images placed along with the .pr files (do the .pr files contain images)?
Kindest regards,
Unnsse
On Oct 23, 2005, at 11:55 AM, karl wrote:
untz wrote:
Hello there!
I am a really good Java programmer who is aspiring to learn Smalltalk, using Squeak.
Nice switch :-)
The current version of Squeak that I am running is: Squeak 3.86Beta6
I am running this implementation on Mac OS X Tiger...
Several questions:
- I installed Squeak in my hard drive at this location:
/Developer/Smalltalk/Squeak3.8-MacOS-Full
Using the book, entitled, "Squeak - A Quick Trip to ObjectLand" ( http://www.amazon.com/gp/reader/0201731142/ref=sib_dp_pt/ 104-5386346-0518331#reader-link ),
I started creating projects based on the material in Chapters 2 & 3...
When trying to save the ObjectLand.image file (after several mock projects) in the "World Menu" using both menu items, "save" and "save as...", I noticed that it saved the following files in my Squeak root directory ( /Developer/Smalltalk/Squeak3.8-MacOS-Full/ ):
ObjectLand.1.changes ObjectLand.1.image ObjectLand.changes ObjectLand.image ObjectLand_segs
Also noticed that it created a new directory (which is empty, by the way) right under the Squeak root directory called: ObjectLand_seqs
Also noticed another directory under my Squeak root directory, called, Squeaklets, containing the following files:
New Changes.001.pr New Changes.002.pr New Changes.003.pr New Changes.004.pr New Changes.005 New Changes.006 New Changes.gif resourceCache.map Can anyone tell me what these prospective directories + these files (including the extensions: images, .changes, .pr., & .map) mean?
image is the Squeak system. changes are the code changes you made to that image. pr is a project map i'm not sure what is...
- When I tried to save new files in a brand new directory (some
other location than Squeak root), using the following menu items "save project on file..." and "load project on file...", (belonging in the "World Menu") to:
/Developer/DevProjects/SqueakProjects/ObjectLand
I noticed the following files:
New Changes.001.pr New Changes.002.pr New Changes.003.pr New Changes.004.pr New Changes.gif Why did it not save it as ObjectLand001.pr instead of "New Changes"? What are these .pr files and .gif filesWhy can't I save everything (including .st files) in a directory, other than, the Squeak root directory?
Check the security settings. (open the Preferences panel and click on security) Some images have been set to only save on secure folders.
- Why do the "save" and "save as..." actions save to Squeak root
instead of the location I specified the "save project on file..."?
Sorry if this seems confusing, I just figured there would be an easier way to set up a project along with its file system structure....
Also, sorry, if these seem like such basic questions (I've only been using this lovely environment for two days, now!)
Many, many thanks!
-Unnsse
karl
On 23-Oct-05, at 5:01 PM, untz wrote:
What is an image, by the way? Is it the actual virtual machine or is it synonymous with Java .class files that get loaded by a ClassLoader, in a JVM?
An image (or sometimes you'll see us call them snapshots) is a memory dump of all the live objects you have. A small header contains a few important bootstrap values but apart from that it's just bits written out of your RAM. when we load an image we use those bootstrap values to work out what if any pointer correcting is need to make all the loaded objects work in what might be a different machine on a different OS, whether some byte-endian correction is needed and .. .well that's about it. Then the stack frame (or Context as we call them) that was last active - the one that called the code to save the snapshot - is reactivated and the life of the objects just continues as if nothing happened.
No class loader - whatever that is - no .class files, no portability issues, no compiling, no fuss. If I save an image on my ARM powered RISC OS machine (little-endian, memory addresses done in a weird way) and email it to you to load on your OSX machine (big endian, memory handled in a really weird way) there is no messing around for you to worry about. Just run it. Oh, actually you might just possibly need to set the filetype if email screws it up.
I've never understood why you would do it any other way.
tim
Hello again!
Ok... From what everyone is telling me, I am starting to envision an 'image' as something which is synomynous with Java jar files and VC++ DLLs, and C# Assemblies... Please correct me if I am wrong.
Thanks for all the great advice! This community rocks!
Many, many thanks,
Unnsse
On Oct 23, 2005, at 7:38 PM, Jecel Assumpcao Jr wrote:
Unnsse wrote on Date: Sun, 23 Oct 2005 17:01:50 -0700
What is an image, by the way? Is it the actual virtual machine or is it synonymous with Java .class files that get loaded by a ClassLoader, in a JVM?
There really isn't anything like it on the Java side. It is like the "core" files that Unix generates when a task runs into some serious error or receives a certain signal. You can restart the program from that point later on (in a debugger for the case of an error). Or think of the "sleep mode" in most laptops. Other languages that normally work this way are Forth and APL and it is a popular option for Lisp.
The problem with images is that they are self contained and isolated worlds. So if you have one and I have one it isn't easy to move stuff from one to the other.
Why aren't images placed along with the .pr files (do the .pr files contain images)?
Project files are an attempt to attack the problem I mentioned above. They contain a small fraction of an image that can be saved separately from the rest and then loaded into an entirely different image. The great advantage is that they can include an arbitrary set of objects so it is easy to send some drawing you have made or some sound you recorded.
Most people on this list don't use projects (which the eToys people love) but prefer more limited alternatives that are closer to traditional systems (code only).
The oldest system was just pointing to some class or group of classes in a browser and selecting "file out" from the menu to generate a .st file.
From another image you can select this file and do "file in".
After that the change set system was created which grouped code into logical units other than classes. Normally you would start out with a new, empty change set and then just work normally with all new code getting recorded there. You can save it as a .cs file (with the same format as a .st one) and then install it or file it in some other image.
These are all source code formats and some experiments were done with binary formats (other Smalltalks have them, like Parcels in VisualWorks for example) but I suppose there is not much this would get you that projects don't do better. There is also the options of combining one or more change sets into a single zip file for convenience.
Currently, the most popular option is Monticello which keeps track of packages and versions.
A better option is to skip files entirely and instead have live images talking to each other and negotiating transfer of objects between them, which is where Craig's Spoon project is going. So if you think images are strange, you haven't seen anything yet ;-)
-- Jecel
Kind of but not quite.
The image file is a memory snapshot of the virtual machine's view of the world, we do a full garbage collection, some housekeeping and tell the operating system to write this (what 20MB) chunk of memory to disk.
Think more of when you Hibernate a windows machine and it tells you it's writing the contents of memory to disk. Or perhaps a core dump if that makes more sense to you.
As Tim said when you restart we look at the image file, allocate (what 20MB) of memory (well perhaps virtual memory map 512 or 1024mb), ask the operating system read in the 20MB, then check machine endiness issues, including floating point number reorder in the virtual machine, and a do a bit of housekeeping (maybe swizzle memory address). Once we think we have a rational VM address space we start processing bytecodes from the point we stopped, which is right after the point we told it to snapshot.
Go see SmalltalkImage>>snapshot:andQuit:embeded:
note the snapshotPrimitive and the quitPrimitive message send.
Then once the virtual machine starts ups various classes run startup logic to do things like handle issues about resources that are not preserved across a snapshot, such as finding and re-opening the source and changes file.
On 23-Oct-05, at 7:29 PM, untz wrote:
Hello again!
Ok... From what everyone is telling me, I am starting to envision an 'image' as something which is synomynous with Java jar files and VC++ DLLs, and C# Assemblies... Please correct me if I am wrong.
Thanks for all the great advice! This community rocks!
Many, many thanks,
Unnsse
On Oct 23, 2005, at 7:38 PM, Jecel Assumpcao Jr wrote:
Unnsse wrote on Date: Sun, 23 Oct 2005 17:01:50 -0700
What is an image, by the way? Is it the actual virtual machine or is it synonymous with Java .class files that get loaded by a ClassLoader, in a JVM?
There really isn't anything like it on the Java side. It is like the "core" files that Unix generates when a task runs into some serious error or receives a certain signal. You can restart the program from that point later on (in a debugger for the case of an error). Or think of the "sleep mode" in most laptops. Other languages that normally work this way are Forth and APL and it is a popular option for Lisp.
The problem with images is that they are self contained and isolated worlds. So if you have one and I have one it isn't easy to move stuff from one to the other.
Why aren't images placed along with the .pr files (do the .pr files contain images)?
Project files are an attempt to attack the problem I mentioned above. They contain a small fraction of an image that can be saved separately from the rest and then loaded into an entirely different image. The great advantage is that they can include an arbitrary set of objects so it is easy to send some drawing you have made or some sound you recorded.
Most people on this list don't use projects (which the eToys people love) but prefer more limited alternatives that are closer to traditional systems (code only).
The oldest system was just pointing to some class or group of classes in a browser and selecting "file out" from the menu to generate a .st file.
From another image you can select this file and do "file in".
After that the change set system was created which grouped code into logical units other than classes. Normally you would start out with a new, empty change set and then just work normally with all new code getting recorded there. You can save it as a .cs file (with the same format as a .st one) and then install it or file it in some other image.
These are all source code formats and some experiments were done with binary formats (other Smalltalks have them, like Parcels in VisualWorks for example) but I suppose there is not much this would get you that projects don't do better. There is also the options of combining one or more change sets into a single zip file for convenience.
Currently, the most popular option is Monticello which keeps track of packages and versions.
A better option is to skip files entirely and instead have live images talking to each other and negotiating transfer of objects between them, which is where Craig's Spoon project is going. So if you think images are strange, you haven't seen anything yet ;-)
-- Jecel
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
Nope. You are getting off to the wrong foot. Think of the virtual image is a little, one-person, object database.
A .jar file is just .class files ZIPped. A Squeak Archive (.sar) is the Squeak equivalent.
When Jecel said there isn't anything like it on the Java side, he meant it. There are certainly lots of little databases in Java land, but the "core Java platform" doesn't have a little, one person, object database, so it isn't part of everyday life for all Java developers and it isn't woven into how people test, develop, distribute, and update code. In Smalltalk, the image is presumed (all major Smalltalks have an image), so the development tools leverage the image.
--David
untz wrote:
Hello again!
Ok... From what everyone is telling me, I am starting to envision an 'image' as something which is synomynous with Java jar files and VC++ DLLs, and C# Assemblies... Please correct me if I am wrong.
On Oct 23, 2005, at 7:38 PM, Jecel Assumpcao Jr wrote:
There really isn't anything like it on the Java side. It is like the "core" files that Unix generates when a task runs into some serious error or receives a certain signal. You can restart the program from that point later on (in a debugger for the case of an error). Or think of the "sleep mode" in most laptops.
How do I load a previous image into Squeak, when I tried to open one using the file menu item and even the file list menu item, it opened up a new window (inside Squeak) displaying archaic code...
Everytime, I run Squeak, it seems to start in its original state... Do I need to open the .pr files or image files ... I understand how to use .st files but I want to know how to save projects / images to a particular directory and then open up the latest one when I launch Squeak or open up any project or image (at my own will) when I boot up Squeak.
Thanks again!
On Oct 23, 2005, at 9:40 PM, David Mitchell wrote:
Nope. You are getting off to the wrong foot. Think of the virtual image is a little, one-person, object database.
A .jar file is just .class files ZIPped. A Squeak Archive (.sar) is the Squeak equivalent.
When Jecel said there isn't anything like it on the Java side, he meant it. There are certainly lots of little databases in Java land, but the "core Java platform" doesn't have a little, one person, object database, so it isn't part of everyday life for all Java developers and it isn't woven into how people test, develop, distribute, and update code. In Smalltalk, the image is presumed (all major Smalltalks have an image), so the development tools leverage the image.
--David
untz wrote:
Hello again!
Ok... From what everyone is telling me, I am starting to envision an 'image' as something which is synomynous with Java jar files and VC++ DLLs, and C# Assemblies... Please correct me if I am wrong.
On Oct 23, 2005, at 7:38 PM, Jecel Assumpcao Jr wrote:
There really isn't anything like it on the Java side. It is like the "core" files that Unix generates when a task runs into some serious error or receives a certain signal. You can restart the program from that point later on (in a debugger for the case of an error). Or think of the "sleep mode" in most laptops.
Hello untz,
u> How do I load a previous image into Squeak, when I tried to open one u> using the file menu item and even the file list menu item, u> it opened up a new window (inside Squeak) displaying archaic code...
in Win you drag the image onto squeak.exe or give the image name as a parameter to squeak. There is no such thing as loading an image into squeak. (Though I guess there is a simulator for the Virtual machine which would do just this at slooooow speed :-) I guess there is a Mac way to link an image to squeak so squeak starts the selected image on click.
If you just start squeak it gives you a selection of image files (starting in its home directory) if it finds more than one image. So maybe, as your images are in different subdirs squeak only finds one image and uses that automatically.
To stretch the example again: When you open a hibernized laptop you don't start windows (or MacOS iirc) and then load the saved image but a small bootstrapper just copies your OS and running programs into ram.
That small bootstrapper is squeak.exe (in win, never used a mac). The image is the hibernation file.
Cheers,
Herbert mailto:herbertkoenig@gmx.net
To run an image, open it with the virtual machine (e.g. squeak.exe on Win), not within a running Squeak. Remember that images are similar to memory snapshots. (analogous to what's written on the hard disk during "Suspend to Disk" on an ACPI computer). Consequently opening an image in Squeak means opening the file and see what it contains (the archaic code) - just like opening it with any other editor.
Hope this helps a bit... Steffen
Thanks for all the helpful information, gentlemen...
On Mac OS X Tiger, the equivalent of win32 executable (.exe) is .app, therefore the Squeak 3.8.6Beta6.app is the virtual machine.
Ok, I got the hang of it now... Now what are the .pr files for and how does one use them instead of .st files and .image files?
Do people pause / resume there work in Smalltalk loading the .pr files or the .image files or the .st files (it does seem that the .st files only contain one small source listing)....
Many, many thanks!
Kindest regards,
Unnsse
On Oct 24, 2005, at 12:56 AM, Steffen Märcker wrote:
To run an image, open it with the virtual machine (e.g. squeak.exe on Win), not within a running Squeak. Remember that images are similar to memory snapshots. (analogous to what's written on the hard disk during "Suspend to Disk" on an ACPI computer). Consequently opening an image in Squeak means opening the file and see what it contains (the archaic code) - just like opening it with any other editor.
Hope this helps a bit... Steffen
-- Erstellt mit M2, Operas revolutionärem E-Mail-Modul: http:// www.opera.com/m2/
In most popular OO languages, objects are but a runtime artifact. The program only contains blue-prints for objects, every time you run the program, it creates all objects from scratch. In contrast, in Smalltalk, you create the objects you need only once, and then work with them continuously. "Saving an image" really only freezes the object memory at one point in time and dumps it to the disk. This image contains *everything* - your objects and the "system" objects. That's why you cannot "load one image into another" - you would have two instances of True or False or class Object etc.
So to take only *some* objects from one image to another, you cannot use the whole image, but just a part of it. This is called an "image segment", which can be saved to disk and reloaded in a different image. The problem is how to actually determine *which* objects to include in that segment. If you imagine all objects in the image as nodes in a graph connected by references as edges, you would need to find a subgraph which could be stored. That's what projects are - a way to identify a group of objects that make up a working whole, driven by the UI. In a sense, you can think of a project as an "application" running on "Squeak" as the operating system. You create a new project, which looks like an empty desktop, then create your objects (open Morphic windows etc) and save it (which creates an image segment that is dumped to disk). You might want to read the comment of class Project, which describes this in more detail.
A problem why this project mechanism has not been adopted even by most of the squeak.org crowd (in contrast to the squeakland.org folks) is that it was not developed for code you create in the Smalltalk browser. Projects distinguish between system classes (defined in a browser) and user classes (defined by writing scripts). User classes are included automatically in a project, system classes are not. To bridge that gap, you can manually choose to include code (the code in the current changeset) when saving a project. This code is attached in textual form before the image segment, which makes it vastly more inefficient than the code in user classes, because it has to be compiled when loading.
Nowadays we actually *do* have the means of distinguishing code provided by the system and that written by the user in a browser - namely by using packages, which did not exist when the project mechanism was conceived. So we could now extend the idea of projects to "larger" applications involving both live objects and larger chunks of costume code, but AFAIK nobody has done any real work in that direction, yet. Maybe the "modules" team will come up with something along these lines.
- Bert -
Am 24.10.2005 um 11:17 schrieb untz:
Thanks for all the helpful information, gentlemen...
On Mac OS X Tiger, the equivalent of win32 executable (.exe) is .app, therefore the Squeak 3.8.6Beta6.app is the virtual machine.
Ok, I got the hang of it now... Now what are the .pr files for and how does one use them instead of .st files and .image files?
Do people pause / resume there work in Smalltalk loading the .pr files or the .image files or the .st files (it does seem that the .st files only contain one small source listing)....
Many, many thanks!
Kindest regards,
Unnsse
On Oct 24, 2005, at 12:56 AM, Steffen Märcker wrote:
To run an image, open it with the virtual machine (e.g. squeak.exe on Win), not within a running Squeak. Remember that images are similar to memory snapshots. (analogous to what's written on the hard disk during "Suspend to Disk" on an ACPI computer). Consequently opening an image in Squeak means opening the file and see what it contains (the archaic code) - just like opening it with any other editor.
Hope this helps a bit... Steffen
-- Erstellt mit M2, Operas revolutionärem E-Mail-Modul: http:// www.opera.com/m2/
Hi,
Nowadays we actually *do* have the means of distinguishing code provided by the system and that written by the user in a browser - namely by using packages, which did not exist when the project mechanism was conceived. So we could now extend the idea of projects to "larger" applications involving both live objects and larger chunks of costume code, but AFAIK nobody has done any real work in that direction, yet. Maybe the "modules" team will come up with something along these lines.
Sounds to me a little bit like removing objects not needed by a specific application from the image. Perhaps we should have a closer look at VisualWorks RuntimePackager. Any comments?
bye, Steffen
Bert Freudenberg wrote:
Nowadays we actually *do* have the means of distinguishing code provided by the system and that written by the user in a browser - namely by using packages, which did not exist when the project mechanism was conceived. So we could now extend the idea of projects to "larger" applications involving both live objects and larger chunks of costume code, but AFAIK nobody has done any real work in that direction, yet. Maybe the "modules" team will come up with something along these lines.
This would be a nice extension of the image segments. I personally use projects quite often and like the convenience of bringing both live objects and code over to other images. An even better mechanism would rock! Karl
Hi Bert--
...we could now extend the idea of projects to "larger" applications involving both live objects and larger chunks of costume code, but AFAIK nobody has done any real work in that direction, yet.
I have. Spoon object memories synchronize themselves by negotiating directly, using remote messages. Any object in any memory can send any message with any parameters to any object in any other memory. Each parameter can be any object in any memory. Each memory can be on the local machine or elsewhere on the network.
So you can, for example, install compiled methods directly without having to recompile source code, transfer initial values for class variables without running class "initialize" methods, etc. I'm using these sorts of abilities to make a change management system called Naiad ("Name And Identity Are Distinct").
I'm preparing the 1 alpha 9 release of Spoon currently.
-C
Am 24.10.2005 um 23:23 schrieb Craig Latta:
Hi Bert--
...we could now extend the idea of projects to "larger" applications involving both live objects and larger chunks of costume code, but AFAIK nobody has done any real work in that direction, yet.
I have. Spoon object memories synchronize themselves by
negotiating directly, using remote messages. Any object in any memory can send any message with any parameters to any object in any other memory. Each parameter can be any object in any memory. Each memory can be on the local machine or elsewhere on the network.
So you can, for example, install compiled methods directly
without having to recompile source code, transfer initial values for class variables without running class "initialize" methods, etc. I'm using these sorts of abilities to make a change management system called Naiad ("Name And Identity Are Distinct").
I'm preparing the 1 alpha 9 release of Spoon currently.
Oh, that's right of course. But I actually meant extending projects with better functionality for Smalltalk programmers, an incremental change rather than the revolution you're preparing :)
- Bert -
Unnsse wrote on Date: Sun, 23 Oct 2005 17:01:50 -0700
What is an image, by the way? Is it the actual virtual machine or is it synonymous with Java .class files that get loaded by a ClassLoader, in a JVM?
There really isn't anything like it on the Java side. It is like the "core" files that Unix generates when a task runs into some serious error or receives a certain signal. You can restart the program from that point later on (in a debugger for the case of an error). Or think of the "sleep mode" in most laptops. Other languages that normally work this way are Forth and APL and it is a popular option for Lisp.
The problem with images is that they are self contained and isolated worlds. So if you have one and I have one it isn't easy to move stuff from one to the other.
Why aren't images placed along with the .pr files (do the .pr files contain images)?
Project files are an attempt to attack the problem I mentioned above. They contain a small fraction of an image that can be saved separately from the rest and then loaded into an entirely different image. The great advantage is that they can include an arbitrary set of objects so it is easy to send some drawing you have made or some sound you recorded.
Most people on this list don't use projects (which the eToys people love) but prefer more limited alternatives that are closer to traditional systems (code only).
The oldest system was just pointing to some class or group of classes in a browser and selecting "file out" from the menu to generate a .st file.
From another image you can select this file and do "file in".
After that the change set system was created which grouped code into logical units other than classes. Normally you would start out with a new, empty change set and then just work normally with all new code getting recorded there. You can save it as a .cs file (with the same format as a .st one) and then install it or file it in some other image.
These are all source code formats and some experiments were done with binary formats (other Smalltalks have them, like Parcels in VisualWorks for example) but I suppose there is not much this would get you that projects don't do better. There is also the options of combining one or more change sets into a single zip file for convenience.
Currently, the most popular option is Monticello which keeps track of packages and versions.
A better option is to skip files entirely and instead have live images talking to each other and negotiating transfer of objects between them, which is where Craig's Spoon project is going. So if you think images are strange, you haven't seen anything yet ;-)
-- Jecel
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
untz wrote:
Hello there!
I am a really good Java programmer who is aspiring to learn Smalltalk, using Squeak.
The current version of Squeak that I am running is: Squeak 3.86Beta6
I am running this implementation on Mac OS X Tiger...
Several questions:
- I installed Squeak in my hard drive at this location:
/Developer/Smalltalk/Squeak3.8-MacOS-Full
Using the book, entitled, "Squeak - A Quick Trip to ObjectLand"
( http://www.amazon.com/gp/reader/0201731142/ref=sib_dp_pt/104-5386346-0518331... ),
I started creating projects based on the material in Chapters 2 & 3...
When trying to save the ObjectLand.image file (after several mock projects) in the "World Menu" using both menu items, "save" and "save as...", I noticed that it saved the following files in my Squeak root directory ( /Developer/Smalltalk/Squeak3.8-MacOS-Full/ ):
ObjectLand.1.changes ObjectLand.1.image ObjectLand.changes ObjectLand.image ObjectLand_segs
Also noticed that it created a new directory (which is empty, by the way) right under the Squeak root directory called:
ObjectLand_seqs
Also noticed another directory under my Squeak root directory, called, Squeaklets, containing the following files:
New Changes.001.pr New Changes.002.pr New Changes.003.pr New Changes.004.pr New Changes.005 New Changes.006 New Changes.gif resourceCache.map
Can anyone tell me what these prospective directories + these files (including the extensions: images, .changes, .pr., & .map) mean?
- When I tried to save new files in a brand new directory (some other
location than Squeak root), using the following menu items "save project on file..." and "load project on file...", (belonging in the "World Menu") to:
/Developer/DevProjects/SqueakProjects/ObjectLand
I noticed the following files:
New Changes.001.pr New Changes.002.pr New Changes.003.pr New Changes.004.pr New Changes.gif
Why did it not save it as ObjectLand001.pr instead of "New Changes"? What are these .pr files and .gif files? Why can't I save everything (including .st files) in a directory, other than, the Squeak root directory?
- Why do the "save" and "save as..." actions save to Squeak root
instead of the location I specified the "save project on file..."?
Sorry if this seems confusing, I just figured there would be an easier way to set up a project along with its file system structure....
Also, sorry, if these seem like such basic questions (I've only been using this lovely environment for two days, now!)
Many, many thanks!
-Unnsse
Hi,
I would like to recommend you to read "section 4 = Using Squeak" in
http://www.iam.unibe.ch/~ducasse/FreeBooks/GuzdialBookDrafts/TourSqueak-Ch2....
Once I liked it and considered it useful.
Best regards - -- Matej Ko?ík
squeak-dev@lists.squeakfoundation.org