Can someone explain SmartRefStream?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Can someone explain SmartRefStream?

Jerome Peace
Can someone explain SmartRefStream?




Hi all,

Can someone please explain how smart reference stream
works and what knowledge is useful in getting it to do
ones bidding?

Context: I save my work as projects. Usually I am
working in the latest test pilot alpha but
occasionally I switch to other images such as OPLC and
Squeak-dev image.

Then if I work on the project some more and store it
out. I find I will not be able to read the project
back into the test pilot alpha image. This is true
even if the changes to the project are essentially
null. And across some images true even for an empty
project.

Often the stream reader will ask me for a modern class
to replace the name of one I have in the image or some
such. Which of course confuses me and leaves me
guessing.

There are conversion methods and even files that can
be read in to help some conversions.

What does a newbie squeaker need to know to get
SmartRefStream to do their bidding?

User story: When I have a project needing to be saved
across images. I go out to a page and a repository.
Read what is known about the conversion of projects
from one image to another. Select from a downloadable
library of helpful conversion tools each documented as
to context in which it is useful.
Create conversion files for what isn't covered. And
then have the ability to convert projects round trip.

And a knowledge of what to close, delete, eliminate
from my project before I save it to help avoid
conversion difficulties.

Expectation: Partial progess counts.  Even if this
would be an overwhelming task to do all at once, the
low hanging fruit would be a good start.  In
particular we should thing in terms of squeak-basic
and Damien's squeak-dev and squeak-web. Also in terms
of gettng squeak.org squeak and squeakland/olpc squeak
more reconciled than they are now.

Baby step question one: Can the various squeaks read
each others "Empty" projects?

Baby step question zero: From this post I hope to
receive information that will put this effort further
along. Can you please help?

Cheers and happy new year.

Yours in curiosity and service, --Jeorme Peace


      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page.
http://www.yahoo.com/r/hs

Reply | Threaded
Open this post in threaded view
|

Re: Can someone explain SmartRefStream?

Bert Freudenberg
On Jan 4, 2008, at 4:26 , Jerome Peace wrote:

> I find I will not be able to read the project
> back into the test pilot alpha image. This is true
> even if the changes to the project are essentially
> null. And across some images true even for an empty
> project.

Projects are only meant to be "forward compatible", that is, newer  
images will be able to read older projects, but older images may not  
be able to read projects saved from newer images. If something  
changes, a newer image would take care of providing "conversion  
methods" that will transform the objects found in older projects to  
their current equivalent.

> Often the stream reader will ask me for a modern class
> to replace the name of one I have in the image or some
> such. Which of course confuses me and leaves me
> guessing.

Projects do not store classes, only instances (except for scripted  
etoys objects). Thus if a class is not found and no conversion method  
was provided, it cannot be read.

>
> User story: When I have a project needing to be saved
> across images. I go out to a page and a repository.
> Read what is known about the conversion of projects
> from one image to another. Select from a downloadable
> library of helpful conversion tools each documented as
> to context in which it is useful.
> Create conversion files for what isn't covered. And
> then have the ability to convert projects round trip.

Well, that is an extension of what projects where meant to be.  
They're not designed as a transport vehicle to move objects from one  
image to another, but basically meant to be loaded by the same image,  
or a direct descendent of it.

One thing that might work much better for certain applications is the  
new "high-level" project saving code. It is in the OLPC image but not  
yet enabled by default. Instead of simply serializing the object tree  
it writes a high-level description (like, "there is a green circle  
over here and a text there") that is not dependent on the actual  
implementation - we intend to move to that project format because it  
would allow to move content over even to the next system.

> Baby step question one: Can the various squeaks read
> each others "Empty" projects?

You'ld have to test. But there are no empty projects. A project is  
basically the whole tree of objects rooted in the project instance.  
To avoid saving out too much, I think a project is actually deep-
copied and pruned prior to saving.

- Bert -