<?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: Simulate Out Of The Bochs</title>
	<atom:link href="http://www.mirandabanda.org/cogblog/2008/12/12/simulate-out-of-the-bochs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mirandabanda.org/cogblog/2008/12/12/simulate-out-of-the-bochs/</link>
	<description>Speeding Up Croquet and Squeak with a new open-source VM from Teleplace</description>
	<lastBuildDate>Tue, 27 Jul 2010 17:32:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Eliot Miranda</title>
		<link>http://www.mirandabanda.org/cogblog/2008/12/12/simulate-out-of-the-bochs/comment-page-1/#comment-3961</link>
		<dc:creator>Eliot Miranda</dc:creator>
		<pubDate>Wed, 31 Dec 2008 03:09:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.mirandabanda.org/cogblog/?p=15#comment-3961</guid>
		<description>Pete,

    Ouch ^2.  Yes I am lucky.  At least know that I&#039;m hugely grateful to be able to follow the ST dream.  But well spotted that Unicode makes things more complicated.  Yes, most current Smalltalk implementations are Unicode savvy, and in fact Squeak&#039;s String&gt;&gt;asLowercase implementation looks like

&lt;code&gt;&lt;pre&gt;asLowercase
	&quot;Answer a String made up from the receiver whose characters are all 
	lowercase.&quot;

	^ self copy asString translateToLowercase

translateToLowercase
	&quot;Translate all characters to lowercase, in place&quot;

	self translateWith: LowercasingTable&lt;/pre&gt;&lt;/code&gt;
Which looks a little over-complicated to me.  But its not my problem :)

Somebody give Pete a job ... doing Smalltalk!</description>
		<content:encoded><![CDATA[<p>Pete,</p>
<p>    Ouch ^2.  Yes I am lucky.  At least know that I&#8217;m hugely grateful to be able to follow the ST dream.  But well spotted that Unicode makes things more complicated.  Yes, most current Smalltalk implementations are Unicode savvy, and in fact Squeak&#8217;s String&gt;&gt;asLowercase implementation looks like</p>
<p><code>
<pre>asLowercase
	"Answer a String made up from the receiver whose characters are all
	lowercase."

	^ self copy asString translateToLowercase

translateToLowercase
	"Translate all characters to lowercase, in place"

	self translateWith: LowercasingTable</pre>
<p></code><br />
Which looks a little over-complicated to me.  But its not my problem <img src='http://www.mirandabanda.org/cogblog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Somebody give Pete a job &#8230; doing Smalltalk!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete Cockerell</title>
		<link>http://www.mirandabanda.org/cogblog/2008/12/12/simulate-out-of-the-bochs/comment-page-1/#comment-3960</link>
		<dc:creator>Pete Cockerell</dc:creator>
		<pubDate>Tue, 30 Dec 2008 21:04:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.mirandabanda.org/cogblog/?p=15#comment-3960</guid>
		<description>Thanks, Eliot :) Of course, you&#039;re one of the lucky ones, still being able to pursue the ST dream, while most of us have to think down to the level of C or (in my case) Java on a daily basis. Your example got me wondering, though: are current ST implementations Unicode-aware? Writing Character#asLowerCase would be quite interesting in a Unicode world...

Sorry, bit off-topic!</description>
		<content:encoded><![CDATA[<p>Thanks, Eliot <img src='http://www.mirandabanda.org/cogblog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Of course, you&#8217;re one of the lucky ones, still being able to pursue the ST dream, while most of us have to think down to the level of C or (in my case) Java on a daily basis. Your example got me wondering, though: are current ST implementations Unicode-aware? Writing Character#asLowerCase would be quite interesting in a Unicode world&#8230;</p>
<p>Sorry, bit off-topic!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.mirandabanda.org/cogblog/2008/12/12/simulate-out-of-the-bochs/comment-page-1/#comment-3959</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 30 Dec 2008 20:08:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.mirandabanda.org/cogblog/?p=15#comment-3959</guid>
		<description>Pete,

    &lt;blush&gt;Ouch!&lt;/blush&gt;.  Forgive me, I wasn&#039;t thinking about the C, only about the Smalltalk output.  But I shouldn&#039;t be displaying bad examples all the same.

But this is interesting.  The equivalent Smalltalk code is simply
    aString asLowercase
but in C I had to write a function to do it.  There was no strtolower function to hand in the C library, a library routine that would be tried and tested and free of errors.  The Smalltalk code is something as simple as
    &lt;code&gt;&lt;pre&gt;asLowercase
        ^self collect: [:c&#124; c asLowercase]&lt;/pre&gt;&lt;/code&gt;
whereas the C code has - count &#039;em - 9 lines!
So C forces one to write more code, providing much more opportunity for mistakes, and makes it far harder to debug and correct (low level debuggers, no edit-and-continue).

I make mistakes.  I&#039;m currently working on a JIT written in Smalltalk that will be transliterated into C.  Were I in C I would be making snail-like progress but in Smalltalk I feel like I&#039;m flying along.  Programming systems should be designed for humans, with all their failings.  I put down my O(n^2) blunder to the paucity of the C development ecosystem and yet another example of why trying to implement a faster Smalltalk VM makes sense :)

That said, next time I&#039;ll be sure to write

&lt;code&gt;&lt;pre&gt;char *
lower(char *s)
{
    int i = strlen(s);
    buf[i] = 0;
    while (--i &gt;= 0)
        buf[i] = tolower(s[i]);
    return buf;
}&lt;/pre&gt;&lt;/code&gt;

;)</description>
		<content:encoded><![CDATA[<p>Pete,</p>
<p>    <blush>Ouch!</blush>.  Forgive me, I wasn&#8217;t thinking about the C, only about the Smalltalk output.  But I shouldn&#8217;t be displaying bad examples all the same.</p>
<p>But this is interesting.  The equivalent Smalltalk code is simply<br />
    aString asLowercase<br />
but in C I had to write a function to do it.  There was no strtolower function to hand in the C library, a library routine that would be tried and tested and free of errors.  The Smalltalk code is something as simple as<br />
    <code>
<pre>asLowercase
        ^self collect: [:c| c asLowercase]</pre>
<p></code><br />
whereas the C code has &#8211; count &#8216;em &#8211; 9 lines!<br />
So C forces one to write more code, providing much more opportunity for mistakes, and makes it far harder to debug and correct (low level debuggers, no edit-and-continue).</p>
<p>I make mistakes.  I&#8217;m currently working on a JIT written in Smalltalk that will be transliterated into C.  Were I in C I would be making snail-like progress but in Smalltalk I feel like I&#8217;m flying along.  Programming systems should be designed for humans, with all their failings.  I put down my O(n^2) blunder to the paucity of the C development ecosystem and yet another example of why trying to implement a faster Smalltalk VM makes sense <img src='http://www.mirandabanda.org/cogblog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>That said, next time I&#8217;ll be sure to write</p>
<p><code>
<pre>char *
lower(char *s)
{
    int i = strlen(s);
    buf[i] = 0;
    while (--i >= 0)
        buf[i] = tolower(s[i]);
    return buf;
}</pre>
<p></code></p>
<p> <img src='http://www.mirandabanda.org/cogblog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
