<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Object IDs and Fixnums</title>
	<atom:link href="http://www.sarahmei.com/blog/2009/04/21/object-ids-and-fixnums/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sarahmei.com/blog/2009/04/21/object-ids-and-fixnums/</link>
	<description></description>
	<lastBuildDate>Thu, 29 Jul 2010 22:31:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jeff Read</title>
		<link>http://www.sarahmei.com/blog/2009/04/21/object-ids-and-fixnums/comment-page-1/#comment-197</link>
		<dc:creator>Jeff Read</dc:creator>
		<pubDate>Sat, 13 Mar 2010 22:37:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.sarahmei.com/blog/?p=3#comment-197</guid>
		<description>Sorry, above I meant &quot;the last two or four bits, depending on machine-word size&quot;.</description>
		<content:encoded><![CDATA[<p>Sorry, above I meant &#8220;the last two or four bits, depending on machine-word size&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Read</title>
		<link>http://www.sarahmei.com/blog/2009/04/21/object-ids-and-fixnums/comment-page-1/#comment-196</link>
		<dc:creator>Jeff Read</dc:creator>
		<pubDate>Sat, 13 Mar 2010 22:35:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.sarahmei.com/blog/?p=3#comment-196</guid>
		<description>Hi,

Congratulations on discovering some Ruby internals. There&#039;s a certain peculiar joy that comes from hacking around the innards of your favorite runtime, seeing how it all works under the hood. :)

If Ruby is anything like Lisp (from whose tradition the names &quot;fixnum&quot; and &quot;bignum&quot; come), then the object id employs tag bits to determine the type of an object; and the rightmost bit is such a tag bit to represent small integer constants (fixnums). Various other tag bits would mark an object as true, false, nil, or a character constant.

Furthermore, odds are pretty good that once you mask the tag bits that identify it as an aggregate object, the object ids of various other objects in the Ruby system indeed become pointers; because such objects are usually aligned to machine-word boundaries, it becomes useful to assume that the last four bits of the pointed-to address are zero, and use those bits as tag bits.

Again, I don&#039;t know that much about Ruby; I&#039;m only extrapolating from what I&#039;ve learned from Lisp. Nevertheless I hope I&#039;ve opened up new avenues of exploration. :)</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Congratulations on discovering some Ruby internals. There&#8217;s a certain peculiar joy that comes from hacking around the innards of your favorite runtime, seeing how it all works under the hood. <img src='http://www.sarahmei.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If Ruby is anything like Lisp (from whose tradition the names &#8220;fixnum&#8221; and &#8220;bignum&#8221; come), then the object id employs tag bits to determine the type of an object; and the rightmost bit is such a tag bit to represent small integer constants (fixnums). Various other tag bits would mark an object as true, false, nil, or a character constant.</p>
<p>Furthermore, odds are pretty good that once you mask the tag bits that identify it as an aggregate object, the object ids of various other objects in the Ruby system indeed become pointers; because such objects are usually aligned to machine-word boundaries, it becomes useful to assume that the last four bits of the pointed-to address are zero, and use those bits as tag bits.</p>
<p>Again, I don&#8217;t know that much about Ruby; I&#8217;m only extrapolating from what I&#8217;ve learned from Lisp. Nevertheless I hope I&#8217;ve opened up new avenues of exploration. <img src='http://www.sarahmei.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: My</title>
		<link>http://www.sarahmei.com/blog/2009/04/21/object-ids-and-fixnums/comment-page-1/#comment-169</link>
		<dc:creator>My</dc:creator>
		<pubDate>Thu, 14 Jan 2010 19:48:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.sarahmei.com/blog/?p=3#comment-169</guid>
		<description>&lt;strong&gt;Title...&lt;/strong&gt;

Very interesting post. I would like to link back to it....</description>
		<content:encoded><![CDATA[<p><strong>Title&#8230;</strong></p>
<p>Very interesting post. I would like to link back to it&#8230;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
