<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Verdana","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">This wisdom deserves to be stored somewhere under the heading &#8220;Age of Objects&#8221; ;-)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">Hans<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Mariano Martinez Peck [mailto:marianopeck@gmail.com]
<br>
<b>Sent:</b> maandag 5 november 2012 14:04<br>
<b>To:</b> Bert Freudenberg<br>
<b>Cc:</b> The general-purpose Squeak developers list<br>
<b>Subject:</b> Re: [squeak-dev] About a object life<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">On Mon, Nov 5, 2012 at 1:28 PM, Bert Freudenberg &lt;<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>&gt; wrote:<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">On 2012-11-03, at 22:45, Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>&gt; wrote:<br>
<br>
&gt; On Sat, Nov 3, 2012 at 3:26 PM, Edgar J. De Cleene &lt;<a href="mailto:edgardec2005@gmail.com">edgardec2005@gmail.com</a>&gt; wrote:<br>
&gt;&gt; Folks:<br>
&gt;&gt;<br>
&gt;&gt; I wish know how old a object is.<br>
&gt;&gt;<br>
&gt; The VM can know if an object is in the young or old area. You could modify the VM and make a primitive that answers this (#isYoung: anOop).<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">What's wrong with the existing primitiveIsYoung? ;)<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Sorry, I though we only had #isYoung: &nbsp;and I forgot we also had the primitiveIsYoung and even the image side message :)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt">SmalltalkImage current isYoung: true<br>
==&gt; false<br>
<br>
SmalltalkImage current isYoung: Object new<br>
==&gt; true<br>
<br>
<br>
Also, since our GC does not change the order of objects when compacting, you can tell if an object is older than another by enumerating all objects. The oldest ones are of course nil, false, and true (more than 30 years old now):<o:p></o:p></p>
</blockquote>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">This is very interesting!!!&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks Bert.&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt">(1 to: 20) inject: self someObject into: [:obj :i |<br>
&nbsp; &nbsp; &nbsp; &nbsp; Transcript show: i; space; show: (obj printString contractTo: 60); cr.<br>
&nbsp; &nbsp; &nbsp; &nbsp; obj nextObject]<br>
==&gt;<br>
1 nil<br>
2 false<br>
3 true<br>
4 #Processor-&gt;a ProcessorScheduler<br>
5 #(#&#43; 1 #- 1 #&lt; 1 #&gt; 1 #&lt;= 1 #... 1 #new 0 #new: 1 #x 0 #y 0)<br>
6 {Character value: 0 . Charact...$ú . $û . $ü . $ý . $þ . $ÿ}<br>
7 {CompiledMethod . nil . Array...nil . nil . nil . nil . nil}<br>
8 #Transcript-&gt;a TranscriptStream ' '<br>
9 #SourceFiles-&gt;an ExpandedSour...s/Work/Frank/frank.changes')<br>
10 #Display-&gt;DisplayScreen(1920x1200x32)<br>
11 #Sensor-&gt;an EventSensor<br>
12 $'<br>
13 $,<br>
14 $-<br>
15 $.<br>
16 $0<br>
17 $;<br>
18 $=<br>
19 $[<br>
20 $_<br>
<span style="color:#888888"><br>
<br>
<span class="hoenzb">- Bert -</span><br>
<br>
</span><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">-- <br>
Mariano<br>
<a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><o:p></o:p></p>
</div>
</div>
</body>
</html>