<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>programming musings &#187; Objective C</title>
	<atom:link href="http://programming-musings.org/category/objective-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://programming-musings.org</link>
	<description>random thoughts on programming and programming languages</description>
	<lastBuildDate>Tue, 03 Jan 2012 13:43:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='programming-musings.org' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>programming musings &#187; Objective C</title>
		<link>http://programming-musings.org</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://programming-musings.org/osd.xml" title="programming musings" />
	<atom:link rel='hub' href='http://programming-musings.org/?pushpress=hub'/>
		<item>
		<title>Common Lisp on the spotlight</title>
		<link>http://programming-musings.org/2007/01/07/common-lisp-on-the-spotlight/</link>
		<comments>http://programming-musings.org/2007/01/07/common-lisp-on-the-spotlight/#comments</comments>
		<pubDate>Sun, 07 Jan 2007 22:36:52 +0000</pubDate>
		<dc:creator>jao</dc:creator>
				<category><![CDATA[Common Lisp]]></category>
		<category><![CDATA[Objective C]]></category>

		<guid isPermaLink="false">http://jaortega.wordpress.com/2007/01/07/common-lisp-on-the-spotlight/</guid>
		<description><![CDATA[If you&#8217;re an OS X user you already now about Spotlight, the file metadata indexer that comes with Tiger. I&#8217;m not a heavy user of Spotlight, but today i&#8217;ve made a discovery that may change this a bit: John &#8220;Lemonodor&#8221; Wiseman&#8217;s Lisp Metadata Importer, a plug-in that makes Spotlight aware of Common Lisp constructs in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programming-musings.org&amp;blog=59048&amp;post=122&amp;subd=jaortega&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re an OS X user you already now about Spotlight, the file metadata  indexer that comes with Tiger. I&#8217;m not a heavy user of Spotlight, but today i&#8217;ve made a discovery that may change this a bit: John &#8220;<a href="http://lemonodor.com/">Lemonodor</a>&#8221; Wiseman&#8217;s <a href="http://lemonodor.com/archives/001232.html">Lisp Metadata Importer</a>, a plug-in that makes Spotlight aware of Common Lisp constructs in your files.</p>
<p>John wrote a nice howto in the above page, complete with screenshots like this one showing a search for Lisp definitions:</p>
<p align="center">
<img src="http://jaortega.files.wordpress.com/2007/01/images-lisp-spotlight-importer-find-3.png?w=400&#038;h=201" height="201" width="400" border="0" align="middle" hspace="4" vspace="4" alt="Searching Lisp contents in Finder" />
</p>
<p>and here you can see Pathfinder showing the Lisp metadata associated to one of my files:</p>
<p align="center">
<img src="http://jaortega.files.wordpress.com/2007/01/200701072317.png?w=400&#038;h=327" height="327" width="400" border="0" align="middle" hspace="4" vspace="4" alt="Lisp and Spotlight" />
</p>
<p>Nifty. Although i think that the possibility of using <a href="http://developer.apple.com/documentation/Carbon/Conceptual/SpotlightQuery/index.html">the command line interface for querying Spotlight metadata</a> is even more interesting&#8230; i&#8217;m already thinking of writing some Elisp to perform queries within Emacs with Spotlight&#8217;s <a href="http://www.macdevcenter.com/lpt/a/6403/">mdfind</a> as a backend (albeit admittedly Slime makes those scripts less useful than one would think!).</p>
<p>One can also use <a href="http://lemonodor.com/misc-gems/Lisp%20Metadata%20Importer%200.0.2.dmg">John&#8217;s importer&#8217;s source code</a> as the basis for new plug-ins supporting other languages (Scheme comes to (my) mind, stay tuned!). There&#8217;re already importers for <a href="http://toxicsoftware.com/blog/python_metadata_importer_101_released/">Python</a> and <a href="http://www.apple.com/downloads/macosx/spotlight/rubyimporter.html">Ruby</a>, but it&#8217;s quite easy to write your own if those are not your cup of tea (and learn a bit of Objective-C in the process).</p>
<p>Happy searching!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jaortega.wordpress.com/122/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jaortega.wordpress.com/122/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jaortega.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jaortega.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jaortega.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jaortega.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jaortega.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jaortega.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jaortega.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jaortega.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jaortega.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jaortega.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jaortega.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jaortega.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jaortega.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jaortega.wordpress.com/122/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programming-musings.org&amp;blog=59048&amp;post=122&amp;subd=jaortega&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://programming-musings.org/2007/01/07/common-lisp-on-the-spotlight/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7c022bc33898f25040a60cc441561c25?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jaortega</media:title>
		</media:content>

		<media:content url="http://jaortega.files.wordpress.com/2007/01/images-lisp-spotlight-importer-find-3.png" medium="image">
			<media:title type="html">Searching Lisp contents in Finder</media:title>
		</media:content>

		<media:content url="http://jaortega.files.wordpress.com/2007/01/200701072317.png" medium="image">
			<media:title type="html">Lisp and Spotlight</media:title>
		</media:content>
	</item>
		<item>
		<title>The object oriented cake</title>
		<link>http://programming-musings.org/2006/10/13/the-object-oriented-cake/</link>
		<comments>http://programming-musings.org/2006/10/13/the-object-oriented-cake/#comments</comments>
		<pubDate>Fri, 13 Oct 2006 22:21:26 +0000</pubDate>
		<dc:creator>jao</dc:creator>
				<category><![CDATA[History]]></category>
		<category><![CDATA[Objective C]]></category>

		<guid isPermaLink="false">http://jaortega.wordpress.com/2006/10/13/the-object-oriented-cake/</guid>
		<description><![CDATA[While writing my latest post on NeXT, i remembered one of my favorite videos on programming ever: the 1992 demo presentation of NeXTSTEP 3 by, whom else, Steve Jobs. If you haven&#8217;t seen it yet, please take a look below, and keep repeating yourself that this was 1992, and that that machine had a clock [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programming-musings.org&amp;blog=59048&amp;post=110&amp;subd=jaortega&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src="http://jaortega.files.wordpress.com/2006/10/aboutnext_splash.jpg?w=90&#038;h=111" height="111" width="90" border="0" align="left" hspace="1" vspace="1" alt="Aboutnext Splash" />While writing my latest post on NeXT, i remembered one of my favorite videos on programming ever: the 1992 demo presentation of NeXTSTEP 3 by, whom else, Steve Jobs. If you haven&#8217;t seen it yet, please take a look below, and keep repeating yourself that this was 1992, and that <a href="http://www.levenez.com/NeXTSTEP/NeXTcube.html">that machine</a> had a clock under 50 MHz! One wonders what on Earth have we been doing during the last fourteen years. </p>
<p>I was about to write a brief overview of the amazing things demoed by Jobs, but the fine guys and gals of <a href="http://www.rixstep.com/0/index.shtml">Rixstep</a> have already done it for me: <a href="http://www.rixstep.com/1/1/20060814,00.shtml">The object oriented cake</a> is a guided tour for those of you lacking 35 minutes to see the movie. But i bet you&#8217;ll see it anyway after reading that article. More than once!</p>
<span style="text-align:center; display: block;"><a href="http://programming-musings.org/2006/10/13/the-object-oriented-cake/"><img src="http://img.youtube.com/vi/j02b8Fuz73A/2.jpg" alt="" /></a></span>
<p>All these wonders where made using Objective-C. One would say that there&#8217;s something to OOP. Definitely, but there&#8217;s more than objects at play: Objective-C is a dynamical language, with a living runtime and powerful reflection capabilities. Despite its C-syntax (almost any C snippet is also an Objective-C snippet), its spirit is far closer to Smalltalk, and the right way to use Objective-C is to use it as a dynamically typed language. I&#8217;m convinced that these language traits were key to make the marvellous NeXSTEP system a thriving reality.</p>
<p>For the really curious among you, <a href="http://www.osnews.com/story.php?news_id=4042">here</a>&#8216;s a bit more about the platform; and one can also take a look at the<a href="http://www.channelu.com/NeXT/NeXTStep/3.3/nd/index.html"> NeXTstep 3.3 developer documentation</a>.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jaortega.wordpress.com/110/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jaortega.wordpress.com/110/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jaortega.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jaortega.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jaortega.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jaortega.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jaortega.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jaortega.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jaortega.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jaortega.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jaortega.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jaortega.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jaortega.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jaortega.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jaortega.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jaortega.wordpress.com/110/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programming-musings.org&amp;blog=59048&amp;post=110&amp;subd=jaortega&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://programming-musings.org/2006/10/13/the-object-oriented-cake/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7c022bc33898f25040a60cc441561c25?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jaortega</media:title>
		</media:content>

		<media:content url="http://jaortega.files.wordpress.com/2006/10/aboutnext_splash.jpg" medium="image">
			<media:title type="html">Aboutnext Splash</media:title>
		</media:content>
	</item>
		<item>
		<title>The Beginning of NeXT</title>
		<link>http://programming-musings.org/2006/10/09/the-beginning-of-next/</link>
		<comments>http://programming-musings.org/2006/10/09/the-beginning-of-next/#comments</comments>
		<pubDate>Mon, 09 Oct 2006 20:51:55 +0000</pubDate>
		<dc:creator>jao</dc:creator>
				<category><![CDATA[Objective C]]></category>

		<guid isPermaLink="false">http://jaortega.wordpress.com/2006/10/09/the-beginning-of-next/</guid>
		<description><![CDATA[I&#8217;ve got a soft spot for the software engineers at NeXT Computer and their OpenSTEP frameworks. Via OSNews.com, i&#8217;ve discovered this couple of short videos on how it all started, featuring a pretty young looking Steve Jobs. Those were times!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programming-musings.org&amp;blog=59048&amp;post=104&amp;subd=jaortega&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got a soft spot for the software engineers at <a href="http://www.simson.net/ref/NeXT/">NeXT Computer</a> and their <a href="http://rixstep.com/2/0/index.shtml">OpenSTEP frameworks</a>. Via <a href="http://www.osnews.com/story.php?news_id=16112">OSNews.com</a>, i&#8217;ve discovered this couple of short videos on how it all started, featuring a pretty young looking Steve Jobs.</p>
<span style="text-align:center; display: block;"><a href="http://programming-musings.org/2006/10/09/the-beginning-of-next/"><img src="http://img.youtube.com/vi/rdPxKDJzt7Q/2.jpg" alt="" /></a></span>
<span style="text-align:center; display: block;"><a href="http://programming-musings.org/2006/10/09/the-beginning-of-next/"><img src="http://img.youtube.com/vi/efnKLV7wSNk/2.jpg" alt="" /></a></span>
<p>Those were times!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jaortega.wordpress.com/104/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jaortega.wordpress.com/104/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jaortega.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jaortega.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jaortega.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jaortega.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jaortega.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jaortega.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jaortega.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jaortega.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jaortega.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jaortega.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jaortega.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jaortega.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jaortega.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jaortega.wordpress.com/104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programming-musings.org&amp;blog=59048&amp;post=104&amp;subd=jaortega&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://programming-musings.org/2006/10/09/the-beginning-of-next/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7c022bc33898f25040a60cc441561c25?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jaortega</media:title>
		</media:content>
	</item>
		<item>
		<title>Full of stars</title>
		<link>http://programming-musings.org/2006/02/25/full-of-stars/</link>
		<comments>http://programming-musings.org/2006/02/25/full-of-stars/#comments</comments>
		<pubDate>Sat, 25 Feb 2006 22:59:32 +0000</pubDate>
		<dc:creator>jao</dc:creator>
				<category><![CDATA[Objective C]]></category>

		<guid isPermaLink="false">http://jaortega.wordpress.com/2006/02/25/full-of-stars/</guid>
		<description><![CDATA[Last january, Gna! Hotspot ran a very interesting interview with Étoilé&#8217;s main developers (David Chisnall, Jesse Ross, Nicolas Roard, Quentin Mathé and Yen-Ju Chen). These guys are not happy with current desktop environments, and have decided to build their own on top of GNUstep, which is in turn inspired by NeXT/OpenStep, the origin of Mac [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programming-musings.org&amp;blog=59048&amp;post=66&amp;subd=jaortega&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Last january, Gna! Hotspot ran a <a href="http://download.gna.org/admin/hotspot/hotspot8.html">very interesting interview</a> with Étoilé&#8217;s main developers (<a href="http://www.cs.swan.ac.uk/~csdavec/">David Chisnall</a>, <a href="http://www.jesseross.com/">Jesse Ross</a>, <a href="http://cs.swansea.ac.uk/~csnicolas/">Nicolas Roard</a>, Quentin Mathé and Yen-Ju Chen). These guys are <a href="http://dromasoftware.com/etoile/mediawiki/index.php?title=Detailed_Goal">not happy with current desktop environments</a>, and have decided to build their own on top of <a href="http://www.webexpo.org/users/yjchen/GNUstep.html">GNUstep</a>, which is in turn inspired by NeXT/OpenStep, the origin of Mac OS X. In fact, their peeves go far beyond the UI layer, and cover the whole Unix architecture (see, for instance, David&#8217;s <a href="http://www.informit.com/articles/article.asp?p=424451&amp;rl=1">Ten things I hate about Unix</a>). </p>
<p>Instead of just complaining and telling everybody how his or her environment sucks, they have rolled up their sleeves and produced actual code: the <a href="http://www.dromasoftware.com/etoile/mediawiki/index.php?title=Main_Page">Étoilé project</a> is the umbrella for a series of <a href="http://www.dromasoftware.com/etoile/mediawiki/index.php?title=Frameworks_Suite">libraries and frameworks</a> aimed at fulfilling their vision. </p>
<p>The nice thing about Cocoa/GNUstep is that they are probably the only production-ready libraries written in a dynamic language, namely, Objective-C. Although <a href="http://rentzsch.com/papers/loveHateObjC">it is not as good</a> as Smalltalk (on which it is inspired) or any Lisp, Objective-C is a far, far better option than the usual C or C++ used by other mainstream toolkits. Of course, one could try to improve instead current support for <em>really nice</em> languages (see my <a href="http://jaortega.wordpress.com/tag/objective-c/">Objective-C related</a> posts), but an interesting way of doing that could be building on top of these projects. As mentioned in the interview, the Étoilé developers are all for dynamic languages, and, if you look carefully at their <a href="http://www.xdev.org/etoile/">Making Computers Suck Less</a> presentation, you&#8217;ll notice that they&#8217;re already planning support for Smalltalk or Ruby. Their <a href="http://dromasoftware.com/etoile/mediawiki/index.php?title=Precognitive_FAQ">proposed architecture</a> is also interesting in other ways reminiscent of dynamic environments like Smalltalk&#8217;s or prototype based systems, including the everything (as in up to the user level) is a manipulable object idea, or orthogonal persistence.</p>
<p>The <a href="http://www.dromasoftware.com/etoile/mediawiki/index.php?title=Latest_Release_Notes">later release</a> includes, among others, the following goodies:</p>
<ul>
<li><a href="http://www.dromasoftware.com/etoile/mediawiki/index.php?title=Camaelon">Camaelon</a> is a theme engine that goes a long way into disproving the GNUstep default ugliness.
<li><a href="http://www.dromasoftware.com/etoile/mediawiki/index.php?title=LuceneKit">LuceneKit</a> is a class-to-class port of <a href="http://lucene.apache.org/java/">Lucene</a> (a high-performance, full-featured text search engine library in Java) in GNUstep.
<li><a href="http://www.dromasoftware.com/etoile/mediawiki/index.php?title=OgreKit">OgreKit</a> is a port of the <a href="http://www8.ocn.ne.jp/~sonoisa/OgreKit/">Cocoa regular expression engine</a> of the same name.
<li>SQLiteClient is a SQLClient/SQLite port from SQLClient library in GNUstep/devl-libs. It uses sqlite3 library and is supposed to work only on Mac OS X for portability of Etoile.
<li>UnitKit is a unit test framework for Objective-C, again based <a href="http://www.unitkit.org/">on a Cocoa project</a>.
</ul>
<p>All in all, a pretty interesting project. And, if you like reading about your fellow programmers toilings, don&#8217;t miss the <a href="http://www.dromasoftware.com/etoile/blog/">Étoilé blog</a>, where their developers give details about their daily efforts.</p>
<p><!-- technorati tags start -->
<p>Tags: <a href="http://www.technorati.com/tag/cocoa" rel="tag">cocoa</a>, <a href="http://www.technorati.com/tag/gnustep" rel="tag">gnustep</a>, <a href="http://www.technorati.com/tag/objective-c" rel="tag">objective-c</a>, <a href="http://www.technorati.com/tag/smalltalk" rel="tag">smalltalk</a></p>
<p><!-- technorati tags end --></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jaortega.wordpress.com/66/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jaortega.wordpress.com/66/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jaortega.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jaortega.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jaortega.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jaortega.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jaortega.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jaortega.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jaortega.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jaortega.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jaortega.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jaortega.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jaortega.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jaortega.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jaortega.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jaortega.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programming-musings.org&amp;blog=59048&amp;post=66&amp;subd=jaortega&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://programming-musings.org/2006/02/25/full-of-stars/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7c022bc33898f25040a60cc441561c25?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jaortega</media:title>
		</media:content>
	</item>
		<item>
		<title>Driving iTunes with Scheme, with a fold tutorial and a Haskell book</title>
		<link>http://programming-musings.org/2006/02/18/driving-itunes-with-scheme-with-a-fold-tutorial-and-a-haskell-book/</link>
		<comments>http://programming-musings.org/2006/02/18/driving-itunes-with-scheme-with-a-fold-tutorial-and-a-haskell-book/#comments</comments>
		<pubDate>Sat, 18 Feb 2006 01:30:18 +0000</pubDate>
		<dc:creator>jao</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Haskell]]></category>
		<category><![CDATA[Objective C]]></category>
		<category><![CDATA[Scheme]]></category>

		<guid isPermaLink="false">http://jaortega.wordpress.com/2006/02/18/driving-itunes-with-scheme-with-a-fold-tutorial-and-a-haskell-book/</guid>
		<description><![CDATA[In this pretty detailed tutorial, Jim Ursetto puts his Cocoa/Chicken bridge to work. Jim noticed that some of his music files were forgotten by iTunes, and wanted to reimport them without losing any metadata. His article documents my attempt to do just that by building an application in Chicken Scheme, using the bindings to Objective-C [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programming-musings.org&amp;blog=59048&amp;post=64&amp;subd=jaortega&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this <a href="http://3e8.org/zb/cocoa/manipulating-itunes-plist.html">pretty detailed tutorial</a>, <a href="http://3e8.org/">Jim Ursetto</a> puts his Cocoa/Chicken bridge to work. Jim noticed that some of his music files were forgotten by iTunes, and wanted to reimport them without losing any metadata. His article</p>
<blockquote><p>
documents my attempt to do just that by building an application in Chicken Scheme, using the bindings to Objective-C and Cocoa provided by the objc egg. It&#8217;s targeted at the intermediate Scheme programmer, who may have some experience with Cocoa. It may also be useful to a beginner looking for examples of an interactive development process, and to a non-Scheme user for the same reason.
</p></blockquote>
<p>Jim has taken the time to document also the program&#8217;s design and coding processes, so you&#8217;ll not only learn about Cocoa or how to use the Scheme bridge, but also about property lists parsing, symlink creation or exception handling. In addtion, you will have the chance of looking over a fellow programmer shoulder having fun for a while.</p>
<p><img src="http://jaortega.files.wordpress.com/2006/02/smallcover.jpg?w=780&#038;h=150" height="150" border="0" align="left" hspace="4" vspace="4" alt="Programming in Haskell" />It&#8217;s a long read, but a very good one. And just in case you don&#8217;t get to the end, don&#8217;t miss Jim&#8217;s last recommended reading: <a href="http://www.cs.nott.ac.uk/~gmh/fold.pdf">a tutorial on the expressiveness and universality of fold</a>, by <a href="http://www.cs.nott.ac.uk/~gmh/">Graham Hutton</a>. Graham, by the way, happens to be a Haskell and functional programming erudite and professor, so you may be interested in <a href="http://www.cs.nott.ac.uk/~gmh/#bibliography">his publications</a>, including the forthcoming book <a href="http://www.cs.nott.ac.uk/~gmh/book.html">Programming in Haskell</a>, whose first five chapters are available in PDF <a href="http://www.cs.nott.ac.uk/~gmh/preview.pdf">here</a>.</p>
<p><!-- technorati tags start -->
<p>Tags: <a href="http://www.technorati.com/tag/books" rel="tag">books</a>, <a href="http://www.technorati.com/tag/cocoa" rel="tag">cocoa</a>, <a href="http://www.technorati.com/tag/haskell" rel="tag">haskell</a>, <a href="http://www.technorati.com/tag/objective-c" rel="tag">objective-c</a>, <a href="http://www.technorati.com/tag/osx" rel="tag">osx</a>, <a href="http://www.technorati.com/tag/scheme" rel="tag">scheme</a></p>
<p><!-- technorati tags end --></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jaortega.wordpress.com/64/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jaortega.wordpress.com/64/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jaortega.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jaortega.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jaortega.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jaortega.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jaortega.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jaortega.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jaortega.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jaortega.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jaortega.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jaortega.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jaortega.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jaortega.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jaortega.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jaortega.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programming-musings.org&amp;blog=59048&amp;post=64&amp;subd=jaortega&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://programming-musings.org/2006/02/18/driving-itunes-with-scheme-with-a-fold-tutorial-and-a-haskell-book/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7c022bc33898f25040a60cc441561c25?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jaortega</media:title>
		</media:content>

		<media:content url="http://jaortega.files.wordpress.com/2006/02/smallcover.jpg" medium="image">
			<media:title type="html">Programming in Haskell</media:title>
		</media:content>
	</item>
		<item>
		<title>Programmers love writing (and mocking) tests</title>
		<link>http://programming-musings.org/2006/01/25/programmers-love-writing-and-mocking-tests/</link>
		<comments>http://programming-musings.org/2006/01/25/programmers-love-writing-and-mocking-tests/#comments</comments>
		<pubDate>Wed, 25 Jan 2006 03:21:24 +0000</pubDate>
		<dc:creator>jao</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Common Lisp]]></category>
		<category><![CDATA[Emacs]]></category>
		<category><![CDATA[Essays]]></category>
		<category><![CDATA[Lisp]]></category>
		<category><![CDATA[Objective C]]></category>
		<category><![CDATA[Scheme]]></category>
		<category><![CDATA[Smalltalk]]></category>

		<guid isPermaLink="false">http://jaortega.wordpress.com/2006/01/25/programmers-love-writing-and-mocking-tests/</guid>
		<description><![CDATA[Aggressive unit testing (also known, by those willing to earn some easy money, by the buzzword test-driven development) is about the only practice from XP that i embraced happily in my days as a dot com employee (it was around 2000, and i was working for one of those companies that got lots of funding [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programming-musings.org&amp;blog=59048&amp;post=46&amp;subd=jaortega&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Aggressive unit testing (also known, <a href="http://www.amazon.com/gp/product/0321146530/">by those willing to earn some easy money</a>, by the buzzword <em>test-driven development</em>) is about the only practice from XP that i embraced happily in my days as a <em>dot com</em> employee (it was around 2000, and i was working for <a href="http://www.isoco.com">one of those companies</a> that got lots of funding from avid but hopelessly candid investors to do&#8230; well, to do basically nothing). </p>
<p>Those were my long gone Java days, and i got <a href="http://junit.sourceforge.net/doc/testinfected/testing.htm">test infected</a> all the way down. That writing tests is a good practice is hardly news for any decent programmer, but what i specially liked about putting the stress on writing <em>lots</em> of tests was discovering how conductive the practice is for continuous code rewriting (count that as the second, and last, extreme practice i like). I had yet to discover the real pleasures of bottom-up development in REPL-enabled languages, but even in Java my <em>modus operandi</em> consisted basically in starting with concrete code (sometimes even a mere implementation detail) and make the application grow up from there. Of course, some brainstorming and off-the-envelop diagramming was involved, but the real design, in my experience, only appears after fighting for a while with real code. The first shot is never the right one, nor the second, for that matter. The <em>correct</em> design surfaces gradually, and i know i&#8217;ve got it right when unexpected extensions to the initially planned functionality just fit in smoothly, as if they had been foresighted (as an aside, i feel the same about good maths: everything finds its place in a natural way). When you work like that, you&#8217;re always rewriting code, and having unit tests at hand provides a reassuring feeling of not being throwing the baby with the bath during your rewriting frenzies. </p>
<p>Of course, there&#8217;s also a buzzword-compliant name for such rewritings (refactoring), and you can expend a few bucks to <a href="http://www.amazon.com/gp/product/0201485672/">read some trivialities</a> about all that. (Mind you, the two books i just despised have been widely acclaimed, even by people whose opinion i respect, so maybe i&#8217;m being unfair here&#8212;in my defense, i must say i&#8217;ve read (and paid) both of them, so, at least, my opinion has cost me money.)</p>
<p><a href="http://jaortega.files.wordpress.com/2006/01/sunit.png"><img src="http://jaortega.files.wordpress.com/2006/01/sunit-tm.jpg?w=138&#038;h=100" height="100" width="138" border="0" align="left" hspace="10" vspace="10" alt="Sunit in Squeak" /></a>Anyway, books or not, the idea behind the <a href="http://junit.sourceforge.net/">JUnit</a> movement is quite simple: write tests for every bit of working code you have, or, if you&#8217;re to stand by the TDD tenets (which i tend <em>not</em> to do), for every bit of code you <em>plan</em> to write. As is often the case, the Java guys where not inventing something really new: their libraries are a rip-off of the framework <a href="http://www.xprogramming.com/testfram.htm">proposed by Kent Beck</a> for Smalltalk. Under the <a href="http://sunit.sourceforge.net/">SUnit</a> moniker, you&#8217;ll find it in every single Smalltalk implementation these days. A key ingredient to these frameworks&#8217; success is, from my point of view, their simplicity: you have a base test class from which to inherit basic functionality, and extend it to provide testing methods. Languages with a minimum of reflection power will discover and invoke those methods for you. Add some form of test runner, and childish talk about an always green bar, and you&#8217;ve got it. The screenshot on the left shows the new SUnit Test Runner in one of my Squeak 3.9 images, but you&#8217;ll get a better glimpse of how writing unit tests in Squeak feels like by seeing <a href="http://www.iam.unibe.ch/~ducasse/Videos/SqueakOriginalMov/120-TestingSimpleCounter.mov">this</a>, or <a href="http://www.iam.unibe.ch/~ducasse/Videos/SqueakOriginalMov/121-OpeningTestRunner.mov">this</a>, or <a href="http://www.iam.unibe.ch/~ducasse/Videos/SqueakOriginalMov/122-OtherTests.mov">even this</a> video from <a href="http://www.iam.unibe.ch/~ducasse/">Stéphane Ducasse</a>&#8216;s <a href="http://www.iam.unibe.ch/~ducasse/Videos/SqueakOriginalMov/">collection</a>.</p>
<p>Of course, you don&#8217;t need to use an object-oriented language to have a unit testing framework. Functional languages like Lisp provide even simpler alternatives: you get rid of base classes, exchanging them by a set of testing procedures. The key feature is not a graphical test runner (which, as any graphical tool, gets in the way of unattended execution: think of running your tests suites as part of your daily build), but a simple, as in as minimal as possible, library providing the excuse to write your tests. Test frameworks are not rocket science, and you can buy one as cheap as it gets: for instance, in C, i&#8217;m fond of <a href="http://www.jera.com/techinfo/jtns/jtn002.html">MinUnit</a>, a mere three-liner:</p>
<pre>
/* file: minunit.h */
#define mu_assert(message, test) do { if (!(test)) return message;  \
                                    } while (0)

#define mu_run_test(test) do { char *message = test(); tests_run++; \
                               if (message) return message; } while (0)

extern int tests_run;
</pre>
<p>(Let me mention in passing, for all of you non-minimalistic C aficionados, the latest and greatest (?) in C unit testing: <a href="http://www.onlamp.com/lpt/a/6419">libtap</a>) Add to this a couple of Emacs skeletons and an appropriate script and you&#8217;re well in your way towards automated unit testing. From here, you can get fancier and add support for test suites,  reporting in a variety of formats, and so on; but, in my experience, these facilities are, at best, trivial to implement and, at worst, of dubious utility. It&#8217;s the quality and exhaustiveness of the tests <em>you</em> write what matters.</p>
<p>Lisp languages have many frameworks available. The nice guys of the <a href="http://www.lispniks.com/cl-gardeners/">CL Gardeners project</a> have compiled a <a href="http://wiki.alu.org:80/Test_Frameworks">commented list of unit testing libraries for Common Lisp</a>. In Scheme you get (of course) as many testing frameworks as implementations. <a href="http://www.upl.cs.wisc.edu/~psilord/">Peter Keller</a> has written an R5RS compliant library that <a href="http://www.call-with-current-continuation.org/eggs/test-infrastructure.html">you can steal from Chicken</a>. Noel Welsh&#8217;s SchemeUnit comes embedded into PLT, and the Emacs templates are already <a href="http://list.cs.brown.edu/pipermail/plt-scheme/2005-September/009738.html">written for you</a> (or, if you mileage varies and you&#8217;re fond of DrScheme, you can have <a href="http://www.plt-scheme.org/software/drscheme/tour/tour-Z-H-10.html#node_chap_9">a stylized version of the green bar</a> too). Personally, i don&#8217;t use PLT, and find Peter&#8217;s implementation a bit cumbersome (meaning: too many features that i don&#8217;t use and clutter the interface). Thus, my recommendation goes to <a href="http://www.neilvandyke.org/">Neil van Dyke</a> of <a href="http://www.neilvandyke.org/quack/">quack</a>&#8216;s fame&#8217;s <a href="http://www.neilvandyke.org/testeez/">Testeez</a>. Testeez is an R5RS (i.e., portable), lightweight framework that is as simple as possible. Actually, it&#8217;s <em>simpler</em> than possible, at least in my book. In my opinion, when a test succeeds it should write <em>nothing</em> to the standard (or error) output. Just like the old good unix tools do. I only want verbosity when things go awry; otherwise, i have better things to read (this kind of behaviour also makes writing automation and reporting scripts easier). So, as a matter of fact, I use a hacked version of Testeez which has customizable verbosity levels. It&#8217;s the same version that we use in Spells, and you can get it <a href="http://rottyforge.yi.org/darcs/testeez/testeez.scm">here</a>. Also of interest are Per Bothner&#8217;s SRFI-64, <a href="http://srfi.schemers.org/srfi-64/srfi-64.html">A Scheme API for test suites</a> and Sebastian Egner&#8217;s SRFI-78, <a href="http://srfi.schemers.org/srfi-78/srfi-78.txt">Lightweight testing</a> (both including reference implementations).</p>
<p>Lisp testing frameworks abound for a reason: they&#8217;re extremely useful, yet easy to implement. As a consequence, they&#8217;re good candidates as non-trivial learning projects. A nice example can be found in Peter Seibel&#8217;s <a href="http://www.gigamonkeys.com/book/">Practical Common Lisp</a> (your next book if you&#8217;re interested in Common Lisp), which introduces macro programming by <a href="http://www.gigamonkeys.com/book/practical-building-a-unit-test-framework.html">implementing a decent testing library</a>. In the Scheme camp, Noel discusses the ups and downs of DSL creation in an article describing, among other things, the <a href="http://library.readscheme.org/servlets/cite.ss?pattern=schematics-sw2002">SchemeUnit implementation</a>. A worth reading, even for non-beginners.</p>
<p>Once you settle on a test framework and start writing unit tests, it&#8217;s only a question of (short) time before you&#8217;re faced with an interesting problem, namely, to really write <em>unit</em> tests. That is, you&#8217;re interested in testing your functions or classes in isolation, without relying on the correctness of other modules you&#8217;ve written. But of course, your code under test will use other modules, and you&#8217;ll have to write <em>stubs</em>: fake implementations of those external procedures that return pre-cooked results. In Lisp languages, which allow easy procedure re-definition, it&#8217;s usually easy to be done with that. People get fancier, though, specially in object-oriented, dynamic languages, by using mock objects. The subject has spawn <a href="http://www.mockobjects.com/MocksObjectsPaper.html">its own literature</a> and, although i tend to think they&#8217;re unduly complicating a simple problem, reading a bit about mockology may serve you to discover the kind of things that can be done when one has a reflective run-time available. Smalltalk is, again, a case in point, as Sean Mallory shows in <a href="http://www.cincomsmalltalk.com/userblogs/malby/blogView?showComments=true&amp;entry=3293316866">his stunningly simple implementation</a> of Mock Objects. Tim Mackinnon gets fancier with his <a href="http://www.macta.f2s.com/Thoughts/smock.html">SMock library</a>, and has coauthored a very interesting article entitled <a href="http://www.macta.f2s.com/Thoughts/Papers/pra25-MockRoles.pdf">Mock Roles, Not Objects</a>, where mock objects are defined and refined:</p>
<blockquote><p>
a technique for identifying types in a system based on the roles that objects play. In [9] we introduced the concept of Mock Objects as a technique to support Test-Driven Development. We stated that it encouraged better structured tests and, more importantly, improved domain code by preserving encapsulation, reducing dependencies and clarifying the interactions between classes. [...] we have refined and adjusted the technique based on our experience since then. In particular, we now understand that the most important benefit of Mock Objects is what we originally called interface discovery [...]
</p></blockquote>
<p><a href="http://www.macta.f2s.com/Thoughts/SMock%20and%20TDD%20in%20action.htm">An accompanying flash demo</a> shows SMock in action inside Dolphin Smalltalk. The demo is very well done and i really recommend taking a look at it, not only to learn to use Mock Objects, but also as a new example of the kind of magic tricks allowed by Smalltalk environments. Albeit not as fanciful, Objective-C offers good reflective features, which are nicely exploited in <a href="http://www.mulle-kybernetik.com/software/OCMock/">OCMock</a>, a library which, besides taking advantage of Objective-C&#8217;s dynamic nature, makes use of the <a href="http://www.cocoadev.com/index.pl?TrampolineObject">trampoline pattern</a> (close to the heart of every compiler implementer) &#8220;so that you can define expectations and stubs using the same syntax that you use to call methods&#8221;. Again, a good chance to learn new, powerful dynamic programming techniques.</p>
<p>As you can see, writing tests can be, a bit unexpectedly, actually fun.</p>
<p><!-- technorati tags start -->
<p>Tags: <a href="http://www.technorati.com/tag/elisp" rel="tag">elisp</a>, <a href="http://www.technorati.com/tag/emacs" rel="tag">emacs</a>, <a href="http://www.technorati.com/tag/lisp" rel="tag">lisp</a>, <a href="http://www.technorati.com/tag/objective-c" rel="tag">objective-c</a>, <a href="http://www.technorati.com/tag/scheme" rel="tag">scheme</a>, <a href="http://www.technorati.com/tag/smalltalk" rel="tag">smalltalk</a>, <a href="http://www.technorati.com/tag/squeak" rel="tag">squeak</a></p>
<p><!-- technorati tags end --></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jaortega.wordpress.com/46/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jaortega.wordpress.com/46/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jaortega.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jaortega.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jaortega.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jaortega.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jaortega.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jaortega.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jaortega.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jaortega.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jaortega.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jaortega.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jaortega.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jaortega.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jaortega.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jaortega.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programming-musings.org&amp;blog=59048&amp;post=46&amp;subd=jaortega&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://programming-musings.org/2006/01/25/programmers-love-writing-and-mocking-tests/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
<enclosure url="http://www.iam.unibe.ch/~ducasse/Videos/SqueakOriginalMov/120-TestingSimpleCounter.mov" length="1475297" type="video/quicktime" />
<enclosure url="http://www.iam.unibe.ch/~ducasse/Videos/SqueakOriginalMov/121-OpeningTestRunner.mov" length="675477" type="video/quicktime" />
<enclosure url="http://www.iam.unibe.ch/~ducasse/Videos/SqueakOriginalMov/122-OtherTests.mov" length="395271" type="video/quicktime" />
	
		<media:content url="http://1.gravatar.com/avatar/7c022bc33898f25040a60cc441561c25?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jaortega</media:title>
		</media:content>

		<media:content url="http://jaortega.files.wordpress.com/2006/01/sunit-tm.jpg" medium="image">
			<media:title type="html">Sunit in Squeak</media:title>
		</media:content>
	</item>
		<item>
		<title>Dynamic OS X Programming</title>
		<link>http://programming-musings.org/2006/01/10/dynamic-os-x-programming/</link>
		<comments>http://programming-musings.org/2006/01/10/dynamic-os-x-programming/#comments</comments>
		<pubDate>Tue, 10 Jan 2006 22:10:35 +0000</pubDate>
		<dc:creator>jao</dc:creator>
				<category><![CDATA[Lisp]]></category>
		<category><![CDATA[Objective C]]></category>
		<category><![CDATA[Scheme]]></category>
		<category><![CDATA[Smalltalk]]></category>

		<guid isPermaLink="false">http://jaortega.wordpress.com/2006/01/10/dynamic-os-x-programming/</guid>
		<description><![CDATA[I am very fond of Mac OS X&#8217;s graphical interface. As a GNU/Linux or FreeBSD user, i despise GUIs and usually work in a mostly text-based ambient powered by Emacs running inside a urxvt terminal. Things change dramatically when i enter OS X. There i discovered that it is not that i dislike GUIs, but [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programming-musings.org&amp;blog=59048&amp;post=27&amp;subd=jaortega&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am very fond of Mac OS X&#8217;s graphical interface. As a GNU/Linux or FreeBSD user, i despise GUIs and usually work in a mostly text-based ambient powered by Emacs running inside a urxvt terminal. Things change dramatically when i enter OS X. There i discovered that it is not that i dislike GUIs, but that i dislike ugly GUIs (although the jury is still out on where i&#8217;m more productive).</p>
<p>Thus, OS X is the only environment where i feel like programming a GUI. From a programmer&#8217;s viewpoint things also start out better: one can go native and avoid C and C++. Cocoa&#8217;s native language is Objective-C, which happens to be a dynamic language. That is, one has a runtime where possibly dynamic objects live, good (but not great) reflective capabilities and a meta layer that let&#8217;s you, for instance, access class and metaclass objects. And all that at runtime. That allows (besides the fun of programming) funny tricks, like the ability to interact with running applications from the outside, in what constitutes an incredibly flexible plug-in system.</p>
<p>Probably the description above rang a bell: Smalltalk. Objective-C is a scaled down Smalltalk in many ways. The good news is that you can have the real thing: <a href="http://www.fscript.org/">F-script</a> is a Smalltalk dialect specifically designed to script Cocoa applications. It let&#8217;s you inspect any running Cocoa application, and manipulate the objects it contains in <em>real time</em>, so to speak. <a href="http://www.fscript.org/images/screenshots/objectBrowser3.jpg"><img src="http://jaortega.files.wordpress.com/http://www.fscript.org/images/screenshots/objectBrowser3.jpg/objectBrowser3_vignette.jpg?w=220&#038;h=151" height="151" width="220" border="1" align="right" hspace="20" vspace="20" alt="F-Script Object browser" /></a> As any decent Smalltalk, it comes with a powerful object browser, which you can admire in all its beauty below. Moreover, F-script <a href="http://www.macdevcenter.com/pub/a/mac/2002/07/12/embed_fscript.html">can be embedded in your Cocoa application</a>, acting as an excellent extension language, way more cool than Apple&#8217;s default scripting language. A beautiful application taking full advantage of these abilities is <a href="http://homepage.mac.com/tblanchard/ObjectiveCLIPS/">ObjectiveCLIPS</a>,  a powerful rule-based development environment for Cocoa.</p>
<p>But still, to my knowledge, you cannot program a whole application in F-Script and, besides, Smalltalk is all very well, but it&#8217;s not Lisp. Support for Lisp in the Cocoa world is not as good, but shows promise. First, there&#8217;s <a href="http://www.openmcl.org/">OpenMCL</a>, an excellent Common Lisp implementation for the Mac and Unix systems that comes with <a href="http://www.openmcl.org/Doc/Using-OpenMCL-with-Mac-OS-X_003b-the-Darwin-Kernel_003b-and-the-Cocoa-GUI-API.html#Using-OpenMCL-with-Mac-OS-X_003b-the-Darwin-Kernel_003b-and-the-Cocoa-GUI-API">a Cocoa bridge</a>. It includes <a href="http://lemonodor.com/archives/000165.html">a demo Cocoa IDE</a> to get you started, and people have gone as far as <a href="http://www.glaurungchess.com/">creating games using it</a>.</p>
<p>Until recently, poor Schemers were left in the cold. Enter Chicken and its <a href="http://call-with-current-continuation.org/eggs/objc.html">Objective-C egg</a>. Support is still rudimentary, but there&#8217;s already <a href="http://3e8.org/zb/cocoa/creating-a-cocoa-app.html">a nice tutorial on writing a currency converter</a>, the default Cocoa <em>Hello World</em> app. </p>
<p>Probably, it&#8217;s still too hard to write a well-integrated Cocoa application using Lisp, but i think it&#8217;s just a matter of time. Happy hacking!</p>
<p>Tags: <a href="http://www.technorati.com/tag/lisp" rel="tag">lisp</a>, <a href="http://www.technorati.com/tag/osx" rel="tag">osx</a>, <a href="http://www.technorati.com/tag/objective-c" rel="tag">objective-c</a>, <a href="http://www.technorati.com/tag/scheme" rel="tag">scheme</a>, <a href="http://www.technorati.com/tag/smalltalk" rel="tag">smalltalk</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jaortega.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jaortega.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jaortega.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jaortega.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jaortega.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jaortega.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jaortega.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jaortega.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jaortega.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jaortega.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jaortega.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jaortega.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jaortega.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jaortega.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jaortega.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jaortega.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programming-musings.org&amp;blog=59048&amp;post=27&amp;subd=jaortega&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://programming-musings.org/2006/01/10/dynamic-os-x-programming/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7c022bc33898f25040a60cc441561c25?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jaortega</media:title>
		</media:content>

		<media:content url="http://jaortega.files.wordpress.com/http://www.fscript.org/images/screenshots/objectBrowser3.jpg/objectBrowser3_vignette.jpg" medium="image">
			<media:title type="html">F-Script Object browser</media:title>
		</media:content>
	</item>
		<item>
		<title>Protothreads</title>
		<link>http://programming-musings.org/2006/01/05/protothreads/</link>
		<comments>http://programming-musings.org/2006/01/05/protothreads/#comments</comments>
		<pubDate>Thu, 05 Jan 2006 22:11:44 +0000</pubDate>
		<dc:creator>jao</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Objective C]]></category>

		<guid isPermaLink="false">http://jaortega.wordpress.com/2006/01/05/protothreads/</guid>
		<description><![CDATA[Protothreads are extremely lightweight stackless threads designed for severely memory constrained systems, such as small embedded systems or wireless sensor network nodes. Protothreads provide linear code execution for event-driven systems implemented in C. Protothreads can be used with or without an underlying operating system. An interesting library for those of us programming embedded systems. And [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programming-musings.org&amp;blog=59048&amp;post=9&amp;subd=jaortega&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sics.se/~adam/pt/index.html">Protothreads</a> are extremely lightweight stackless threads designed for severely memory constrained systems, such as small embedded systems or wireless sensor network nodes. Protothreads provide linear code execution for event-driven systems implemented in C. Protothreads can be used with or without an underlying operating system.</p>
<p>An interesting library for those of us programming embedded systems. And maybe to others as well: i knew of Protothreads via a <a href="http://www.frameworklabs.de/protothreads.html">Cocoa/Objective-C implementation</a>.</p>
<p>Tags: <a rel="tag" href="http://technorati.com/tag/c">c</a> <a rel="tag" href="http://technorati.com/tag/objective-c">objective-c</a> <a rel="tag" href="http://technorati.com/tag/concurrency">concurrency</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jaortega.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jaortega.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jaortega.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jaortega.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jaortega.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jaortega.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jaortega.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jaortega.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jaortega.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jaortega.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jaortega.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jaortega.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jaortega.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jaortega.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jaortega.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jaortega.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programming-musings.org&amp;blog=59048&amp;post=9&amp;subd=jaortega&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://programming-musings.org/2006/01/05/protothreads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7c022bc33898f25040a60cc441561c25?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">jaortega</media:title>
		</media:content>
	</item>
	</channel>
</rss>
