Imprinting or not

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

Imprinting or not

Chris Cunnington
I follow the instructions in the alpha's Wormhole server. I have an
Other Browser that sees the contents of the micro image.

( Other, by the way, is the name of a class. Not the best of names, I
don't think. So the name of the browser as "Other Browser" is being
specific, because it is a browser that displays instances of Other. I
think Other instances are proxies of the contents of the mini image. Of
course, I may have this wrong. You can find a class in the alpha called
"Other", so I leave you to see if you draw the same conclusion I did.)

I can see the classes in the mini image. I want to change one. I want to
start hacking the mini image. How do I do that? I use the Other Browser
the same way I would any browser: change the code; and, save. That's the
method, I think, for "imprinting" the remote image.

I start small. I add a class comment to a class in the mini image. I
save. I highlight the code in the Wormhole server to snapshot the mini
image. I close everything down. Start everything up and see if the
comment is there. It is not. I have not imprinted.

But is that because I used a class comment and not actual code?

You will read that Spoon makes a deal about the two kinds of content in
a CompiledMethod: byte codes and literals. I finally looked up what a
literal is. A literal can be a number, a character, a string, a symbol,
or an array containing any of the previous four. Spoon, I think, when it
puts the compiled methods in the mini image replaces the literals with
"literal markers". Do the actual literals stay in the history image?

So, since my class comment is a string, and therefor a literal, perhaps
it was not shipped to the mini image. You will notice that the mini
image has no class comments whatsoever.

I don't think it went better with a piece of code. So making permanent
changes to the mini/remote image is something I haven't figured out yet.
I have yet to imprint.


Chris
_______________________________________________
Spoon mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/spoon
Reply | Threaded
Open this post in threaded view
|

Re: Imprinting or not

ccrraaiigg

Hi Chris--

> Other, by the way, is the name of a class. Not the best of names, I
> don't think.

     I meant that to be a reference to the phrase "self and other"; I
thought it was a fun pun. :)

> So the name of the browser as "Other Browser" is being
> specific, because it is a browser that displays instances of Other. I
> think Other instances are proxies of the contents of the mini image.

     Yeah, it's more of an "other-aware browser".

> I can see the classes in the mini image. I want to change one. I want
> to start hacking the mini image. How do I do that? I use the Other
> Browser the same way I would any browser: change the code; and, save.
> That's the method, I think, for "imprinting" the remote image.

     Yes, that's a way to imprint methods interactively.

> I start small. I add a class comment to a class in the mini image. I
> save. I highlight the code in the Wormhole server to snapshot the mini
> image. I close everything down. Start everything up and see if the
> comment is there. It is not. I have not imprinted.
>
> But is that because I used a class comment and not actual code?

     Yeah, that release doesn't imprint class comments yet, sorry.

> You will read that Spoon makes a deal about the two kinds of content
> in a CompiledMethod: byte codes and literals. I finally looked up
> what a literal is. A literal can be a number, a character, a string,
> a symbol, or an array containing any of the previous four. Spoon, I
> think, when it puts the compiled methods in the mini image replaces
> the literals with "literal markers". Do the actual literals stay in
> the history image?

     During imprinting, literal markers go over the network, and literal
markers are stored in the history memory. The subject memory uses the
literal markers to recreate the actual literals, and uses those literals
when recreating compiled methods.


-C

--
Craig Latta
www.netjam.org/resume
+31   6 2757 7177
+ 1 415  287 3547


_______________________________________________
Spoon mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/spoon