<?xml version='1.0' encoding='UTF-8' ?>
<rss version="2.0" xml:base="http://www.cincomsmalltalk.com/master/" xmlns:admin="http://webns.net/mvcb/" xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:icbm="http://postneo.com/icbm" xmlns:includedComments="http://www.laudably.com/rss2-comments" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:media="http://search.yahoo.com/mrss/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
	<channel>
		<title>Cincom Smalltalk Blogs</title>
		<link>http://www.cincomsmalltalk.com/master/blogView</link>
		<description>Cincom Smalltalk Blogs</description>
		<webMaster>jrobertson@cincom.com</webMaster>
		<lastBuildDate>Tue, 09 Feb 2010 16:49:34 GMT</lastBuildDate>
		<image>
			<url>/images/cst_small.jpg</url>
			<title>Cincom Smalltalk Blogs</title>
			<link>http://www.cincomsmalltalk.commaster//blog/blogView</link>
			<height>50</height>
			<width>81</width>
		</image>
		<admin:generatorAgent rdf:resource="/CincomSmalltalkWiki/CSTBlogModule"></admin:generatorAgent>
		<admin:errorReportsTo rdf:resource="mailto:jrobertson@cincom.com"></admin:errorReportsTo>
		<dc:language>en-us</dc:language>
		<dc:creator>James A. Robertson</dc:creator>
		<dc:rights>Copyright 2007 Cincom Systems, Inc.</dc:rights>
		<dc:date>2010-02-09T16:49:34-05:00</dc:date>
		<icbm:latitude>39.214103</icbm:latitude>
		<icbm:longitude>-76.878807</icbm:longitude>
		<item>
			<title>[Smalltalk Tidbits, Industry Rants] Smalltalk Daily 02/09/10: Detecting Stack Overflows</title>
			<link>http://www.cincomsmalltalk.com/blog/blogView?showComments=true&amp;printTitle=Smalltalk_Daily_02/09/10:_Detecting_Stack_Overflows&amp;entry=3443164819</link>
			<category>smalltalkDaily</category>
			<pubDate>Tue, 09 Feb 2010 10:40:19 GMT</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">

<p>Today's <a href="http://smalltalk-daily.cincomsmalltalk.com">Smalltalk Daily</a> looks at how you can detect stack overflows (typically caused by infinite loops) in your Smalltalk code. To watch, click on the viewer below:</p>

<p>
<script type="text/javascript"><!--
	QT_WritePoster_XHTML('Click to Play', '/casts/stDaily/2010/smalltalk_daily-02-09-10-poster.jpg',
		'/casts/stDaily/2010/smalltalk_daily-02-09-10.mov',
		'640', '496', '',
		'controller', 'true',
		'autoplay', 'true',
		'bgcolor', 'black',
		'scale', 'aspect');
//-->
</script>
<noscript>
<object width="640" height="496" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
	<param name="src" value="/casts/stDaily/2010/smalltalk_daily-02-09-10-poster.jpg" />
	<param name="href" value="/casts/stDaily/2010/smalltalk_daily-02-09-10.mov" />
	<param name="target" value="myself" />
	<param name="controller" value="false" />
	<param name="autoplay" value="false" />
	<param name="scale" value="aspect" />
	<embed width="640" height="496" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"
		src="/casts/stDaily/2010/smalltalk_daily-02-09-10-poster.jpg"
		href="/casts/stDaily/2010/smalltalk_daily-02-09-10.mov"
		target="myself"
		controller="false"
		autoplay="false"
		scale="aspect">
	</embed>
</object>
</noscript>

</p>

<p>If you have trouble viewing that directly, you can <a href="http://www.cincomsmalltalk.com/casts/stDaily/2010/smalltalk_daily-02-09-10-lg.mp4">click here</a> to download the video directly</p>



<p>You can also watch it on YouTube:</p>

<p>
<object width="400" height="300"><param name="movie" value="http://www.youtube.com/v/zA03ocHh9sA&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/zA03ocHh9sA&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" height="300"></embed></object>
</p>



<!-- technorati tags start --><p style="text-align:right;font-size:10px;">Technorati Tags: 
<a href="http://www.technorati.com/tag/smalltalk" rel="tag">smalltalk</a>, <a href="http://www.technorati.com/tag/stack overflow" rel="tag">stack overflow</a></p><!-- technorati tags end -->
</div>]]></description>
			<guid isPermaLink="false">3443164819</guid>
			<includedComments:comment-collection>
				<includedComments:comment>
					<includedComments:guid>blogView?showComments=true&amp;printTitle=Smalltalk_Daily_02/09/10:_Detecting_Stack_Overflows&amp;entry=3443164819</includedComments:guid>
					<includedComments:puid>blogView?showComments=true&amp;printTitle=Smalltalk_Daily_02/09/10:_Detecting_Stack_Overflows&amp;entry=3443164819</includedComments:puid>
					<includedComments:author>Steffen</includedComments:author>
					<includedComments:pubDate>2010-02-09T11:10:06-05:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;Audio is broken!&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>Re: Smalltalk Daily 02/09/10: Detecting Stack Overflows</includedComments:title>
				</includedComments:comment>
				<includedComments:comment>
					<includedComments:guid>blogView?showComments=true&amp;printTitle=Smalltalk_Daily_02/09/10:_Detecting_Stack_Overflows&amp;entry=3443164819</includedComments:guid>
					<includedComments:puid>blogView?showComments=true&amp;printTitle=Smalltalk_Daily_02/09/10:_Detecting_Stack_Overflows&amp;entry=3443164819</includedComments:puid>
					<includedComments:author>James Robertson</includedComments:author>
					<includedComments:pubDate>2010-02-09T15:19:40-05:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;Sorry about that, the audio is now fixed&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>Re: Smalltalk Daily 02/09/10: Detecting Stack Overflows</includedComments:title>
				</includedComments:comment>
			</includedComments:comment-collection>
			<enclosure length="5764347" type="application/octet-stream" url="http://www.cincomsmalltalk.com/casts/stDaily/2010/smalltalk_daily-02-09-10-iPhone.m4v"></enclosure>
			<itunes:explicit>no</itunes:explicit>
			<itunes:author>James Robertson</itunes:author>
			<itunes:subtitle>Detecting Stack Overflows</itunes:subtitle>
			<itunes:summary>How to detect stack overflows in your Smalltalk code</itunes:summary>
			<itunes:duration>2:12</itunes:duration>
			<itunes:keywords>smalltalk, dynamic, stack overflow</itunes:keywords>
			<media:group>
				<media:rating>nonadult</media:rating>
				<media:credit role="author">James Robertson</media:credit>
				<media:title>Detecting Stack Overflows</media:title>
				<media:content duration="2:12" fileSize="5764347" type="application/octet-stream" url="http://www.cincomsmalltalk.com/casts/stDaily/2010/smalltalk_daily-02-09-10-iPhone.m4v"></media:content>
			</media:group>
			<wfw:comment>http://www.cincomsmalltalk.com/blog/servlet/CommentAPIServlet?guid=3443164819</wfw:comment>
		</item>
		<item>
			<title>[Smalltalk Tidbits, Industry Rants] Mechanical Engineering and Unit Testing</title>
			<link>http://www.cincomsmalltalk.com/blog/blogView?showComments=true&amp;printTitle=Mechanical_Engineering_and_Unit_Testing&amp;entry=3443159796</link>
			<category>smalltalk</category>
			<pubDate>Tue, 09 Feb 2010 09:16:36 GMT</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">

<p><a href="http://www.cincomsmalltalk.com/userblogs/travis/blogView?showComments=true&amp;printTitle=A_Mechanical_Engineers_Thoughts_about_Unit_testing&amp;entry=3443138169">Travis</a> has some thoughts on unit testing.  Good stuff, worth reading.</p>

<!-- technorati tags start --><p style="text-align:right;font-size:10px;">Technorati Tags: 
<a href="http://www.technorati.com/tag/testing" rel="tag">testing</a></p><!-- technorati tags end -->
</div>]]></description>
			<guid isPermaLink="false">3443159796</guid>
			<includedComments:comment-collection></includedComments:comment-collection>
			<wfw:comment>http://www.cincomsmalltalk.com/blog/servlet/CommentAPIServlet?guid=3443159796</wfw:comment>
		</item>
		<item>
			<title>[Objology] A Mechanical Engineer's Thoughts about Unit testing</title>
			<link>http://www.cincomsmalltalk.com/userblogs/travis/blogView?showComments=true&amp;printTitle=A_Mechanical_Engineers_Thoughts_about_Unit_testing&amp;entry=3443138169</link>
			<category>Testing</category>
			<pubDate>Tue, 09 Feb 2010 03:16:09 GMT</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p><h3><i>"An idea, like a ghost, must be spoken to a little before it will explain itself." -%A0Charles Dickens</i></h3>



Sometimes, we do things in our programming practices that just seem right. But we may struggle to figure out how to illustrate why it feels right to colleagues and peers. We have a vague idea, and some of the words involved, but a succinct explanation evades us. This post, is an attempt to shed a little light on some of the principles I follow in regards to "unit testing." Some of this fell into place, just days ago, though I've been doing this a certain way for 12 years now.

<p>

Back in the 50's, there was a sort of revolution that took place in the manufacturing world. Quality was the issue. Leading role was played by E. W. Demming. Some of the plot themes were things like process control, quality control, statistical process control, shewart charts, kanban cards, etc. It was a big hit in Japan initially, and would eventually make its way over to the States and other places. As a Mechanical Engineering student, I had this stuff pounded into my head through long years of college.

<p>

One of the things that struck me about these ideas (ideas that would eventually be caught up in and respun as "lean or agile" manufacturing practices) was a subtle shift in quality testing. Many factories convinced themselves that they had quality because they did testing. Classic manufacturing testing philosophy, said that you assembled the gadget, and at the end of the factory, you ran the assembled device thru a screen of tests. If it passed these tests you shipped it. In this era, the bolt vendors could be pretty lax in their tolerances; assembly personal at the plant would take up the slack, pairing bigger bolts with bigger washers and smaller bolts with smaller washes. As long as the machine at the end performed it's function nominally, it was good enough. Of course, when the device came under stress, this variety led to failures and subpar performance.

<p>

Demming and crew, felt that this was pointless to catch defective products that late in the cycle. It was wasteful. So they pushed testing and quality control back into the process. They advocated tolerances on the component parts, rather than the unit as a whole. The basic idea is that if you tighten up the quality on the parts that compose your device, your device ends up the better. In fact, if you had a controlled process, and high quality inputs, then you could confidently ship higher quality products while actually reducing end testing. In years to come, those that made the change to this mentality survived, those that did not, mostly failed.

<p>

It's instructive to me, that while both methods advocated and adhered to "testing", the Demming approach and application of testing was the one that produced better results.

<p>

Since the "splashdown" of XP in 1998 and the following furor of Unit Testing in Software, I've witnessed similar parallels in the application of testing software. Everyone claims they do it. When <a href="http://kentreis.wordpress.com/">Ken Treis</a> and I came home from OOPSLA 98, we determined we'd try this. We put together a version of a Wiki server for VisualWorks, and we used workspace scripts to make test that we got the right http responses when we sent different kinds of queries against our server. And having done that, we went right on writing software the way we always had. It didn't really matter how we architected the code as long as it passed these high level tests. Of course, we kept discovering all kinds of edge cases. Though I was well versed in the Demming school of thought about testing the components, rather than the end product, I missed the potential corollary.

<p>

It wasn't until Camp Smalltalk 2000, when Ken had the chance to work with Ron Jeffries, that we got a chance to see it done right. Ken saw, and quickly shared with me, what a real unit test looked like. The light bulb went off for us. This would change the way we developed our algorithms <i>at a component level.</i> I've been a happy unit tester since. I am firmly entrenched in the belief that unit testing is to software what component testing is to manufacturing. Usually, it takes the form of having a particular test class for each meaningful class in your system. There are of course adaptations, but more often than not, I find that the adaptations are rationalizations that allow people to test in the "old school" style while telling themselves they're doing it differently and making a real difference.

<p>

In manufacturing, the point is to reliable reproduce and accepted design. In software, we don't do that. The ability to reproduce our software designs, is not in question. The creative part of what we do, is to create algorithms, of various sizes and shapes, of varying complexities. When we write unit tests for the components (or objects) of our algorithms, we're embracing the same set of principles that drove the quality revolution. Try it out. Don't write so many tests for the overall features of your system. Try writing tests for your components. One to one.
</p></div>]]></description>
			<guid isPermaLink="false">3443138169</guid>
			<includedComments:comment-collection>
				<includedComments:comment>
					<includedComments:guid>blogView?showComments=true&amp;printTitle=A_Mechanical_Engineers_Thoughts_about_Unit_testing&amp;entry=3443138169</includedComments:guid>
					<includedComments:puid>blogView?showComments=true&amp;printTitle=A_Mechanical_Engineers_Thoughts_about_Unit_testing&amp;entry=3443138169</includedComments:puid>
					<includedComments:author>anonymous</includedComments:author>
					<includedComments:pubDate>2010-02-09T12:14:22-05:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;"assembly personal at the plant would take up the slack, pairing bigger bolts with bigger washers and smaller bolts with smaller washes. As long as the machine at the end performed it's function nominally, it was good enough. Of course, when the device came under stress, this variety led to failures and subpar performance."&lt;/p&gt;&lt;p&gt;As I learned from a mechanical engineering magazine a few years back, this is in fact how Japanese car-makers have been operating for decades.  They are more concerned with quality of the overall product and not the parts.  American and German car makers thought they were doing what you are describing but that's wrong.&lt;/p&gt;&lt;p&gt;A good analogy is when you lay flooring.  You don't cut all the pieces up front.  You cut most of them and then cut the pieces at the ends to fit.  No matter how good your tolerances are you cannot be as successful any other way.&lt;/p&gt;&lt;p&gt;You are propagating a myth.&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>Re: A Mechanical Engineer's Thoughts about Unit testing</includedComments:title>
				</includedComments:comment>
				<includedComments:comment>
					<includedComments:guid>blogView?showComments=true&amp;printTitle=A_Mechanical_Engineers_Thoughts_about_Unit_testing&amp;entry=3443138169</includedComments:guid>
					<includedComments:puid>blogView?showComments=true&amp;printTitle=A_Mechanical_Engineers_Thoughts_about_Unit_testing&amp;entry=3443138169</includedComments:puid>
					<includedComments:author>Andy Bower</includedComments:author>
					<includedComments:pubDate>2010-02-09T13:00:24-05:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;That's not a good analogy. If you had an accurate set of test templates and cut your floor pieces to match within a certain tolerance then you *would* be able to work this way. However, typically you don't have these templates or the means to ensure the level of accuracy you might need so floor layers do work as you say.&lt;/p&gt;&lt;p&gt;However, with software and most mechanical components one does have accurate templates (i.e. go/no-go tests) and this is a better way of working.&lt;/p&gt;&lt;p&gt;Interestingly, it was in Camp Smalltalk 2000 where the light bulb went on for me also. At that gathering we were given the code and the unit tests for a Smalltalk re-factoring engine and browser with the aim of porting it to Dolphin Smalltalk. We had no idea how it worked or, indeed, much idea about re-factoring itself and yet within one week we had the basic engine working, simply by going through and getting each unit test to pass and fixing problems locally. This would not have been possible if the tests had only been applied to the extremities, i.e. testing whether the re-factoring browser worked from an end user perspective.&lt;/p&gt;&lt;p&gt;Count me +1 for Unit Testing.&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>Re: A Mechanical Engineer's Thoughts about Unit testing</includedComments:title>
				</includedComments:comment>
			</includedComments:comment-collection>
			<wfw:comment>http://www.cincomsmalltalk.com/userblogs/travis/servlet/CommentAPIServlet?guid=3443138169</wfw:comment>
		</item>
		<item>
			<title>[David Buck - Blog] Smalltalk at EDC</title>
			<link>http://www.cincomsmalltalk.com/userblogs/buck/blogView?showComments=true&amp;printTitle=Smalltalk_at_EDC&amp;entry=3442684647</link>
			<category>OCSTUG</category>
			<pubDate>Wed, 03 Feb 2010 21:17:27 GMT</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p><span style="font-size: medium;"><strong>Smalltalk at EDC</strong></span> <br /> Igor Dmytryk <br /> The core trading platform used by the Treasury group at Export Development Canada is written in Smalltalk. The system has been under constant development for over 10 years. The talk will demo the system and cover aspects of our development methodology, testing and future plans. RSVP required. <br /> <br /> Location: Meet at main lobby of EDC <br /> 151 O'Connor, Ottawa <br /> Wednesday, Feb 10th, 2010 at 6:00pm <br /> <br /> <strong>RSVP is mandatory for this event so Igor can make arrangements with security</strong></p>

<p>Please RSVP to <a href="mailto:david@simberon.com">david@simberon.com</a> if you plan to attend.</p>

<p>%FEFF</p>
</div>]]></description>
			<guid isPermaLink="false">3442684647</guid>
			<includedComments:comment-collection></includedComments:comment-collection>
			<wfw:comment>http://www.cincomsmalltalk.com/userblogs/buck/servlet/CommentAPIServlet?guid=3442684647</wfw:comment>
		</item>
		<item>
			<title>[Smalltalk and my misinterpretations of life] Unoriginal ideas about objects, closures and hashes.</title>
			<link>http://www.cincomsmalltalk.com/userblogs/mls/blogView?showComments=true&amp;printTitle=Unoriginal_ideas_about_objects,_closures_and_hashes.&amp;entry=3442438018</link>
			<category>programming</category>
			<pubDate>Mon, 01 Feb 2010 00:46:58 GMT</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p>The following is not original, not in the slightest, but I thought it's worth re-iterating because sometimes these ideas come back around and talking about them can help them be realized in a context suitable for someones project.</p>
<p>I was having a discussion over dinner about the nature of objects and closures and how they are essentially the same thing. Patrick Logan brought up a cute old joke about a student and his master. The student excitedly exclaimed to his master, "Master! Closure are more powerful than objects!".. to which the master replied, "You fool, objects are more powerful than closures, go away and study." Many moons later, the student returns, "Master, you were right, objects are more powerful than closures," to which the master replied, "You fool, closures are more powerful than objects."</p>
<p>They're one in the same, but let's keep the analogy going for a moment. When I write the following code: <i>concept</i> I'm binding a name in to a local execution space. When I write the following code: <i>x[concept] = "Foo"</i> I'm binding a ma,e om to a space called x. It can be said therefore that a Dictionary or Hash object is the same as an execution space (or stack frame, if you so care). One is usually immutable or completely untouchable to the programmer (in smalltalk, you can modify the stack however you like) and the other is a common staple of programming (the key+value pairs).</p>
<p>Objects, too, bind names to a space, which is the object itself. In that way, a Dictionary or Hash is the same as an Object. In fact, some languages such as Javascript go so far as to make them the same thing. In Smalltalk, they are not the same thing - this is a pragmatic choice based on the technology of its era where it was possible to make Smalltalk run very fast by knowing ahead of time the shape of an Object rather than compiling shape information in to objects at runtime. Self did not even attempt to unbind this (you still had to declare your slots before you could use them), but Javascript did.</p>
<p>So that means that a Hash is an Object. We know that a Hash is a Closure and in this case we can also say that an Object is a Closure. In fact, if we decide performance isn't necessary then a Stack Frame is a Closure + Code Position, a Closure is an Object + Executable Code and an Object is key+value pairs. Calling a method means duplicating your closures hash, adding in the new parameters, pushing that hash on to the stack and jumping to the method. Hey now, don't jump out of your chair just yet: I did say this is if you're okay with dropping performance.</p>
<p>What this gains us is a uniquely simple system that contains only two data structures: Hash and Closure. The stack frame is inherit in the execution machinery plus the execution stack, however if you wish to do continuation passing style, you'd add the third structure which you'd call Continuation which includes the execution position within the executable code. The beauty of the continuation passing style is that you can do away with the stack completely, because the Continuation gives you a pointer to the closure to continue from.</p>
<p>The only thing we'd need to decide on is how we dispatch. In Javascript, any entry in your closure is something you can call, by referring to it symbolically followed by (), eg: myMethod(). This is a direct hashed name look up, in which case you're going to look in the current execution space's hash for something to look up and then execute; failure to find the named thing results in an exception.</p>
<p>In languages like clojure you can specify the matching rules for a function beyond just its name, so you can delve in to the structure of the parameters to the function you're calling and decide if the function matches. This is incredibly powerful because the predicates for a function can be bound to an entirely different execution space (the one at compile time) than the runtime, which means you never end up falling down the rabbit hole.</p>
<p>So given how simple this system is and the number of times I've referred to javascript, just how is it that javascript falls apart here? Well, for one, the stack frame doesn't exist to the programmer, continuations don't exist to the programmer and while functions are indeed closures, you cannot influence them that way - they have a prototype object you can access but this will apply to objects created from the function, which is sort of a cludge to allow fast dispatch by having light-weight classes called prototypes.</p>
<p>I think perhaps the better way is for the compiler to recognize constructs where frames are created as a result of calling a function and make it a template that can be memcpy'd easily. Of course, you'd also want the compiler to recognize function call arguments that, while technically are part of the closure, may never 'escape' that short execution path - these can be put on the stack as indexed accesses instead of named lookups. You'd have to be careful never to be caught out by the programmer of course.</p>
<p>The runtime environment, if smart, could also identify functions that access structures regularly and compile specialized versions of the functions that have indexed access to named things in the hash and make a light-weight variant of that hash that places some values in those same indexes. The consequence of this is that the programmer gets to think in terms of objects and closures but often those objects will never exist.</p>
<p>Concurrent starts to get interesting at this point too, because a closure is local and its data is local, always-copy is easy to implement especially if the closure is irregularly shaped, it is easy to copy the data to ship it off to another context guilt free of any kind of collision, erlang style. In fact, if the act of calling a function is to take a copy of the closure and add the new parameters to it and a copy of the closure means a copy of its data, then you've achieved another object-oriented tenant, which is encapsulation.I'm not sure how practical this would be as one of the advantages of a closure is to modify the state of things you can see within your scope that may not be directly local to you.</p>
<p>Smalltalk does not share the environment from the calling method because its environment is always bound to the object the method is installed on. You never compile functions inside functions like that in Smalltalk. You do compile blocks inside methods and in this case the behave exactly like functions/closures in javascript. That same behavior of "bound to an object" is achieved in javascript by using the prototype object of a function. When you send 'new' to a function in Javascript, you create a new object which is effectively like saying you're creating a new execution space which will have absolutely no conflicts with your current execution space.</p>
<p>Of course, I'm twisting everything around, back to front, trying to dispel the mystique of object oriented programming. I'm deliberately voiding the OO concepts just to see what is and is not real. When we program in the way described above, we lose polymorphism, but if we have flexible dispatch mechanics then we can achieve polymorphism by reusing common names but discriminating by types - however, we really have no types, so our discrimination has to be much more evolved and it would be easy to make a function that was too liberal in what it accepted. This is definitely an advantage of a typed system - it's easy to determine just what it is you'll be calling at compile time rather than runtime.</p>
<p>What about other primitive types? arrays? strings? those sorts of things.. well arrays and strings are efficient hashes, where the indexing system directly corresponds to the memory layout (actually, that's a lie, if you ever want to implement a UTF8 string you'll understand what I mean). So clearly the mechanism for looking up something must be programmable, otherwise how would you ever make structures that looked (in memory) different to a basic key+value hash.</p>
<p>The answer is in the closure. Since a closure has executable code already, it has to have some known structure: the hash and the executable code are two slots that must be recognizable. Two more pieces of information it must have for this entire scheme to work: getter and setter. In Javascript terms these would be [] and []= and in Smalltalk terms these would be instVarAt: and instVarAt:put:, except that these two methods will be called at runtime to do lookup within the hash. So it is clear that the hash must have the ability to modify itself, our data structures now look like this:</p>
<p>Hash {<br />
void *data,<br />
Closure *getter /*void *(*getter)(void *symbol)*/,<br />
Closure *setter /*void *(*setter)(void *symbol, void*data)*/<br />
}</p>
<p>Closure {<br />
Hash *hash,<br />
void*(*function)(...)<br />
}</p>
<p>These are the generics of course, the compiler (or runtime optimizer) might create other more interesting structures on the fly to aid in making fast running code. Whenever you have a generic you can make something concrete. But we now have the ability for the programmer to create new kinds of Hash such that we could implement a basic ascii String as:</p>
<p>function AsciiString {<br />
string = {};<br />
data = string.data;<br />
string.getter= function(offset) { return memory[data + offset]; }<br />
string.setter= function(offset, value) { return memory[data + offset] = value; }<br />
return string;<br />
}</p>
<p>It's key to be able to write primitive data structures using generic data structures in such a way that they can eventually become self optimizing. In this case, we can create an AsciiString if we have functions available to use for using system memory at the data pointer. The default getter and setter functions would do a key lookup, so they would be more involved, but could also be implemented in terms of the same language (however, they are redundant). The only primitive here is the getter and setter for the memory object, which would either actually be a primitive in the virtual machine or be assembly code that has been compiled (preferably).</p>
<p>There are still a few other loose ends here, such as how you deal with atoms themselves - eg: the Closure, or even just a simple int32. Solving all those bits and pieces to create a full language wasn't my goal here, my goal was to unify some of the core concepts that we use in many programming languages. I hope that I have done so:</p>
<p>Hash, Object, Closure, Stack Frame, Continuation: they are all connected.</p>

</div>]]></description>
			<guid isPermaLink="false">3442438018</guid>
			<includedComments:comment-collection></includedComments:comment-collection>
			<wfw:comment>http://www.cincomsmalltalk.com/userblogs/mls/servlet/CommentAPIServlet?guid=3442438018</wfw:comment>
		</item>
		<item>
			<title>[[|] Less is More] Thoughts on the new iPad</title>
			<link>http://www.cincomsmalltalk.com/userblogs/arden/blogView?showComments=true&amp;printTitle=Thoughts_on_the_new_iPad&amp;entry=3442303856</link>
			<category>general</category>
			<pubDate>Sat, 30 Jan 2010 11:30:56 GMT</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p>Apple&rsquo;s announcement of the new iPad was of interest to me.&nbsp;</p>

<p>There were mentions of Alan Kay (father of Smalltalk) and the iPad&rsquo;s similarities to the dynabook.&nbsp; The idea of the dynabook must seem pretty unimpressive by todays standards, but the dynabook idea was introduced in 1969 &ndash; put in chronological context I always find that extremely impressive.&nbsp; And of course Smalltalk was created as the language to help the dynabook achieve its lofty goals.&nbsp; Smalltalk we know has been a massive influence on modern computing.</p>

<p>What is a bit disappointing is the amount of criticism the iPad has received.&nbsp; I understand it I think &ndash; The bar was set so high with expectations and the success of the iPhone and iPod touch, that they would have needed to do something incredibly innovative in order to not get a collective yawn.&nbsp;</p>

<p>So in most ways the iPad is a big iPod touch &ndash; that&rsquo;s a good thing I think.&nbsp; I have an iPod Touch, and for around the office or home, I like it even better than my iPhone, because of its slimmer form factor.&nbsp; A larger iTouch would be ideal for reading ebooks or online papers, reading email, etc &ndash; the touch is a bit small for extensive reading.&nbsp; I like that is was not priced too high, making it available to more folks.&nbsp; &nbsp;&nbsp;For browsing web pages with a touch interface in a portable device, it seems best in class.&nbsp;</p>

<p>As my blog title states &ldquo;Less is More&rdquo; and I think the iPad meets this criteria spot on. The iPAd was an obvious and smart first release, that can be built on and improved with more experience and feedback with the device.</p>
</div>]]></description>
			<guid isPermaLink="false">3442303856</guid>
			<includedComments:comment-collection>
				<includedComments:comment>
					<includedComments:guid>http://www.cincomsmalltalk.com/userblogs/arden/blogView?showComments=true&amp;printTitle=Thoughts_on_the_new_iPad&amp;entry=3442303856</includedComments:guid>
					<includedComments:puid>http://www.cincomsmalltalk.com/userblogs/arden/blogView?showComments=true&amp;printTitle=Thoughts_on_the_new_iPad&amp;entry=3442303856</includedComments:puid>
					<includedComments:author>Carl Gundel</includedComments:author>
					<includedComments:pubDate>2010-01-30T14:39:22-05:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;There are two glaring omissions for the iPad in my opinion.  It needs a stylus and a handwriting recognizer.  Apple has no excuse for leaving this out.  Also, an SD card slot or at least a mini USB port so I can plug in my digital camera.&lt;/p&gt;&lt;p&gt;Why should I need a computer to enjoy the iPad?&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>Re: Thoughts on the new iPad</includedComments:title>
				</includedComments:comment>
				<includedComments:comment>
					<includedComments:guid>http://www.cincomsmalltalk.com/userblogs/arden/blogView?showComments=true&amp;printTitle=Thoughts_on_the_new_iPad&amp;entry=3442303856</includedComments:guid>
					<includedComments:puid>http://www.cincomsmalltalk.com/userblogs/arden/blogView?showComments=true&amp;printTitle=Thoughts_on_the_new_iPad&amp;entry=3442303856</includedComments:puid>
					<includedComments:author>james Robertson</includedComments:author>
					<includedComments:pubDate>2010-01-30T15:40:28-05:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;They explicitly don't want to include a stylus - it's an extra thing to keep track of, and is easily lost.  As with the iPhone, the idea is that your fingers are enough.  The missing ports thing is somewhat infuriating, but see Engadget - they had a post last week about the dongle game you'll get to play there :)&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>Re: Thoughts on the new iPad</includedComments:title>
				</includedComments:comment>
				<includedComments:comment>
					<includedComments:guid>http://www.cincomsmalltalk.com/userblogs/arden/blogView?showComments=true&amp;printTitle=Thoughts_on_the_new_iPad&amp;entry=3442303856</includedComments:guid>
					<includedComments:puid>http://www.cincomsmalltalk.com/userblogs/arden/blogView?showComments=true&amp;printTitle=Thoughts_on_the_new_iPad&amp;entry=3442303856</includedComments:puid>
					<includedComments:author>Arden</includedComments:author>
					<includedComments:pubDate>2010-01-30T16:49:55-05:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;I can see where some might find a stylus useful, but a minority I think.  Plus there is a "been there, done that" (Newton) factor to consider.  I think writing is slow, typing much faster, speech recognition faster still. The downside with speech is privacy (or lack of).  If the computer could read lips, that could solve it.  The ultimate would be thinking something and it appearing.  Someday I'm sure they will reach that goal! :-)&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>Re: Thoughts on the new iPad</includedComments:title>
				</includedComments:comment>
				<includedComments:comment>
					<includedComments:guid>http://www.cincomsmalltalk.com/userblogs/arden/blogView?showComments=true&amp;printTitle=Thoughts_on_the_new_iPad&amp;entry=3442303856</includedComments:guid>
					<includedComments:puid>http://www.cincomsmalltalk.com/userblogs/arden/blogView?showComments=true&amp;printTitle=Thoughts_on_the_new_iPad&amp;entry=3442303856</includedComments:puid>
					<includedComments:author>anonymous</includedComments:author>
					<includedComments:pubDate>2010-02-01T05:08:14-05:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;"The ultimate would be thinking something and it appearing. Someday I'm sure they will reach that goal!"&lt;/p&gt;&lt;p&gt;might be harder than you would expect; the problem would be controlling WHAT you think ... (or what you want others to think you (think you (think))), and what they want to know about what you think (you think (you think)) and what you want to let them know about how you think (!).&lt;/p&gt;&lt;p&gt;Yeh, it'll come around about the time they legalize hard drugs, I expect!&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>Re: Thoughts on the new iPad</includedComments:title>
				</includedComments:comment>
			</includedComments:comment-collection>
			<wfw:comment>http://www.cincomsmalltalk.com/userblogs/arden/servlet/CommentAPIServlet?guid=3442303856</wfw:comment>
		</item>
	</channel>
</rss>
