Newbie questions: Changesets, changes and the image
drrboylan at earthlink.net
Sun Dec 1 03:32:19 UTC 2002
I've been asking enough questions that perhaps I should answer one! My answers are not authoritative.
The webmail I'm using appears to be doing a poor job of quoting. Sorry about that; my answers are interspersed with the relevant questions.
From: Derek Brans <brans at nerdonawire.com>
Sent: 11/30/02 05:53 PM
To: squeak-dev at lists.squeakfoundation.org
Subject: Newbie questions: Changesets, changes and the image
> Could someone tell me the proper way to produce a changeset (ie, suppose
I'd been working on the image and I want to take some of the changes I
made and bundle them into a changeset).
If you are working on a project then all your work will go into the project's changeset. In general, all your work is going into some changeset. So you may just be able to file it out. If you select changes | simple change sorter you should be looking at your current change set. Right click to file the thing out.
If that's not exactly what you want, try the dual change sorter. Use it to create a change set, and then populate it with stuff from the other change sets.
Here is a bunch of random changeset questions.
What is a change sorter?
A tool for looking at a change set. It looks to me as if the change sorter suppresses some of the info in the change sets, such as doIts, showing only code changes.
What is a change?
A small, atomic operation: (re)definition of method, deletion of method, recategorization of something, class def or removal, or a do it (when you highlight some code and select do it). It is recorded via some text.
can a mouse movement be a
What about a do-it?
Yes, some changes are do-its. Change sets record (at least) two different kinds of doits. Some are code definiton, conceptually very similar to method definitions. The definition of a class is recorded in a doit. doit is just an executable code fragment. The second kind is a doit that you do interactively.
See changes | recently logged changes for more of a log of all your do-it's. This is actually a way to slice off the top of your image's .changes file.
When an object is created, is that a change?
Not directly, though the action that created it is recorded as a change (again, class definition or execution of code fragment).
Can the entire state of an image be defined in a changeset?
No. An image is a complete set of objects and their states. Changesets basically focus on code. Positions of windows, any kind of data you have entered, text and notes in the workspace or elsewhere are unlikely to be in the change set. Your current execution context isn't there either.
Which parts cannot be?
What are the different parts of an image state (eg, source code, live
objects, Contexts, System Dictionaries, classes, proto-stuff)? How
does each part behave (is source code made up of live objects?)?
That's a little wide open for me. Your list is not a bad one (don't forget Processes and the Scheduler).
If you look under the hood, there are lots of objects involved in source code. The text you type in is a text or string type object. As it is evaluated it leads to the creation of other objects, such as classes and method objects, which include the compiled byte-codes for the methods and, in some systems (not sure if squeak currently has it) the actual machine code. Unless you are curious, there is no reason to attend to this machinery.
Is there such a thing as data that is not executable?
Sure. Numbers and text are simple examples, although some text might be possible to evaluate and execute.
Or is everything a method call? No. However, everything that happens in the image happens because of method calls and it would, in principle, be possible to create an entire image from a script of such calls. The actual smalltalk changes mechanism does not attempt such a complete record of activity, however.
Newbie minds want to know. Thank you so much,
More information about the Squeak-dev