<?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/"
	>

<channel>
	<title>seandenigris.com</title>
	<atom:link href="http://seandenigris.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://seandenigris.com/blog</link>
	<description>Enriching the human experience, especially through technology</description>
	<lastBuildDate>Mon, 13 Feb 2012 00:06:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Soundflower on Lion</title>
		<link>http://seandenigris.com/blog/?p=954</link>
		<comments>http://seandenigris.com/blog/?p=954#comments</comments>
		<pubDate>Mon, 13 Feb 2012 00:06:15 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=954</guid>
		<description><![CDATA[As per Soundflower issue #67: sudo chmod -R g-w /System/Library/Extensions/Soundflower.kext sudo kextload /System/Library/Extensions/Soundflower.kext And Soundflower will be working in Lion &#8211; no restart required! Tweet This Post]]></description>
			<content:encoded><![CDATA[<p>As per <a href="http://code.google.com/p/soundflower/issues/detail?id=67">Soundflower issue #67</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #660033;">-R</span> g-w <span style="color: #000000; font-weight: bold;">/</span>System<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Extensions<span style="color: #000000; font-weight: bold;">/</span>Soundflower.kext
<span style="color: #c20cb9; font-weight: bold;">sudo</span> kextload <span style="color: #000000; font-weight: bold;">/</span>System<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Extensions<span style="color: #000000; font-weight: bold;">/</span>Soundflower.kext</pre></div></div>

<p>And Soundflower will be working in Lion &#8211; no restart required!</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Soundflower+on+Lion+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D954" title="Post to Twitter"><img class="nothumb" src="http://seandenigris.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Soundflower+on+Lion+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D954" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&#038;p=954</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Squeak VM: Compiling for Xcode</title>
		<link>http://seandenigris.com/blog/?p=945</link>
		<comments>http://seandenigris.com/blog/?p=945#comments</comments>
		<pubDate>Wed, 11 Jan 2012 17:17:32 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[VM]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=945</guid>
		<description><![CDATA[When compiling the VM for Xcode, one has to switch back and forth from the image to the command line. To make things easier, here&#8217;s a little script that: empties the build directory generates the sources and cmake info Configures with cmake Opens the project in Xcode First, load PipeableOSProcess via: Gofer it squeaksource: 'MetacelloRepository'; [...]]]></description>
			<content:encoded><![CDATA[<p>When compiling the VM for Xcode, one has to switch back and forth from the image to the command line. To make things easier, here&#8217;s a little script that:</p>
<ol>
<li>empties the build directory</li>
<li>generates the sources and cmake info</li>
<li>Configures with cmake</li>
<li>Opens the project in Xcode</li>
</ol>
<p>First, load PipeableOSProcess via:</p>

<div class="wp_syntax"><div class="code"><pre class="smalltalk" style="font-family:monospace;"><span style="color: #0000ff;">Gofer</span> it
	squeaksource: <span style="color: #7f0000;">'MetacelloRepository'</span>;
	squeaksource: <span style="color: #7f0000;">'CommandShell'</span>;
	package: <span style="color: #7f0000;">'ConfigurationOfOSProcess'</span>;
	package: <span style="color: #7f0000;">'CommandShell-Piping'</span>;
	load.
<span style="">&#40;</span><span style="color: #0000ff;">Smalltalk</span> at: <span style="color: #7f0000;">#ConfigurationOfOSProcess</span><span style="">&#41;</span> load.</pre></div></div>

<p>Then, execute this script (also available as <a href="https://gist.github.com/1595669">a gist</a>) whenever you want a fresh Xcode project:</p>

<div class="wp_syntax"><div class="code"><pre class="smalltalk" style="font-family:monospace;"><span style="color: #0000ff;">PipeableOSProcess</span> waitForCommand: <span style="color: #7f0000;">'/usr/bin/osascript -e &quot;tell application \&quot;Xcode\&quot; to quit&quot;'</span>.
&nbsp;
<span style="color: #00007f;">buildDir</span> <span style="color: #000066; font-weight:bold;">:=</span> <span style="color: #0000ff;">FileDirectory</span> on: <span style="color: #7f0000;">'/Developer/cogvm/cog/build/'</span>.
<span style="color: #00007f;">buildDir</span> entries do: <span style="">&#91;</span>:<span style="color: #00007f;">e</span> | e name <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #7f0000;">'vmVersionInfo.h'</span> ifFalse: <span style="">&#91;</span> 
		<span style="color: #00007f;">e</span> isDirectory
			ifTrue: <span style="">&#91;</span> <span style="color: #00007f;">e</span> asFileDirectory recursiveDelete <span style="">&#93;</span>
			ifFalse: <span style="">&#91;</span> <span style="color: #00007f;">e</span> delete <span style="">&#93;</span> <span style="">&#93;</span> <span style="">&#93;</span>.
&nbsp;
<span style="color: #0000ff;">StackCocoaIOSConfig</span> new
  addExternalPlugins: <span style="color: #7f0000;">#<span style="">&#40;</span> <span style="color: #0000ff;">FT2Plugin</span> <span style="">&#41;</span></span>;
generateForDebug;
  generateSources; generate.
&nbsp;
<span style="color: #0000ff;">PipeableOSProcess</span> waitForCommand: <span style="color: #7f0000;">'cd /Developer/cogvm/cog/build/; /opt/local/bin/cmake -G Xcode'</span>.
<span style="color: #0000ff;">PipeableOSProcess</span> waitForCommand: <span style="color: #7f0000;">'open /Developer/cogvm/cog/build/StackVM.xcodeproj'</span>.</pre></div></div>

<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Squeak+VM%3A+Compiling+for+Xcode+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D945" title="Post to Twitter"><img class="nothumb" src="http://seandenigris.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Squeak+VM%3A+Compiling+for+Xcode+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D945" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&#038;p=945</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting gcc 4.2 to work with Xcode 4.2</title>
		<link>http://seandenigris.com/blog/?p=931</link>
		<comments>http://seandenigris.com/blog/?p=931#comments</comments>
		<pubDate>Wed, 11 Jan 2012 15:54:07 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=931</guid>
		<description><![CDATA[Apparently, gcc 4.2 is no longer installed with Xcode (as of Xcode 4.2). Unfortunately, older projects may need to be compiled with gcc. There is some scattered information online about how to get gcc 4.2 with Xcode 4.2, but they seem complex and error-prone (e.g. install Xcode 4.1, then upgrade to 4.2). UPDATE: Here are [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ask.metafilter.com/200231/How-to-install-gcc-42-on-a-macbook-with-Xcode-42">Apparently, gcc 4.2 is no longer installed with Xcode (as of Xcode 4.2)</a>. Unfortunately, older projects may need to be compiled with gcc. There is some scattered information online about how to get gcc 4.2 with Xcode 4.2, but they seem complex and error-prone (e.g. install Xcode 4.1, then upgrade to 4.2).</p>
<p><strong>UPDATE:</strong> Here are some situations you might find yourself in:</p>
<ul>
<li>Upgrading from Snow Leopard to Lion &#8211; it seems that gcc et al will be moved to a different location. See <a href="http://superuser.com/questions/313107/does-updating-to-os-x-lion-delete-gcc">here</a> for a fix.</li>
<li>Upgrading to Xcode 4.2 &#8211; gcc 4.2 should still be on your machine; you just have to tell Xcode 4.2 to list it as an option (in which case, skip to step #2 below)</li>
<li>Installing Xcode 4.2 with no previous version &#8211; no gcc 4.2 at all; follow instructions below.</li>
</ul>
<p>Here&#8217;s an easy way to get gcc 4.2 working [1]:<br />
1) <strong>Install gcc 4.2. via Mac Ports</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> apple-gcc42</pre></div></div>

<p>2) <strong>Tweak Xcode so that gcc 4.2 appears as a compiler option</strong>, by editing the Xcode 4.2 GCC 4.2.xcspec file to get gcc 4.2 to show in the list of compiler options:</p>
<ul>
<li>Open the xcspec file for editing:</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #ff0000;">&quot;/Developer/Library/Xcode/PrivatePlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/GCC 4.2.xcplugin/Contents/Resources/GCC 4.2.xcspec&quot;</span></pre></div></div>

<ul>
<li>Change lines 41 and 42 from this:</li>
</ul>
<blockquote><p>ShowInCompilerSelectionPopup = NO;<br />
IsNoLongerSupported = YES;</p></blockquote>
<p style="padding-left: 30px;">To This:</p>
<blockquote><p>ShowInCompilerSelectionPopup = YES;<br />
IsNoLongerSupported = NO;</p></blockquote>
<ul>
<li> Link the gcc 4.2 binary to the location that Xcode expects</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gcc-apple-<span style="color: #000000;">4.2</span> <span style="color: #000000; font-weight: bold;">/</span>Developer<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gcc-<span style="color: #000000;">4.2</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>g++-apple-<span style="color: #000000;">4.2</span> <span style="color: #000000; font-weight: bold;">/</span>Developer<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>g++-<span style="color: #000000;">4.2</span></pre></div></div>

<p>[1] Adapted from <a href="http://stackoverflow.com/questions/7786302/how-to-use-gcc-4-2-with-xcode-4-2/8593831">this Stack Overflow thread</a></p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Getting+gcc+4.2+to+work+with+Xcode+4.2+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D931" title="Post to Twitter"><img class="nothumb" src="http://seandenigris.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Getting+gcc+4.2+to+work+with+Xcode+4.2+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D931" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&#038;p=931</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Programming Language Rankings</title>
		<link>http://seandenigris.com/blog/?p=911</link>
		<comments>http://seandenigris.com/blog/?p=911#comments</comments>
		<pubDate>Tue, 10 Jan 2012 18:31:58 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Smalltalk]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=911</guid>
		<description><![CDATA[The Tiobe index is total rubbish. But it&#8217;s worse than useless. It&#8217;s actually harmful. As Tyler Cowen mentioned in his TED Talk, &#8220;Be suspicious of stories&#8221;, feeling like you know what&#8217;s going on is way worse than admitting you don&#8217;t have a clue: The most dangerous people are those that have been taught some financial [...]]]></description>
			<content:encoded><![CDATA[<p>The Tiobe index is total rubbish. But it&#8217;s worse than useless. It&#8217;s actually harmful. As Tyler Cowen mentioned in <a href="http://www.ted.com/talks/tyler_cowen_be_suspicious_of_stories.html">his TED Talk, &#8220;Be suspicious of stories&#8221;</a>, feeling like you know what&#8217;s going on is way worse than admitting you don&#8217;t have a clue:</p>
<blockquote><p>The most dangerous people are those that have been taught some financial literacy</p></blockquote>
<p><a href="http://www.timop.com/"><img class="alignleft" title="Chicken Bones" src="http://www.deviantart.com/download/119756278/Chicken_bones_1_by_tpenttil.jpg" alt="" width="327" height="218" /></a>Undoubtedly, there are people out there choosing careers and technologies based on the information age&#8217;s &#8220;divining by chicken bones&#8221;.  Tiobe is based on search engine hits for goodness sake. In the uber-democratic-everyone&#8217;s-a-technical-blogger web, of what is &#8220;talking about a language&#8221; a good indicator? Here is a primary one: that the language and its tools are not sufficient to support development. In other words, the Niobe Index (i.e. search engine results) is inversely proportional to language quality, as seen below:</p>
<p><img class="alignnone" title="I_{n} \approx \frac{1}{Q_{l}}" src="http://latex.codecogs.com/gif.latex?I_{n} \approx \frac{1}{Q_{l}}" alt="" width="62" height="41" /><br />
Since the equation above is obviously scientific (because it seems &#8220;mathy&#8221; and nerdy), it must be true. Furthermore (another great smart-people word), if one believes in (yes, like Santa Claus) the Niobe index (which can only be believed because it superficially seems scientific), one must believe my equation, which creates a paradox (another great science-y term).</p>
<p>In a live, open, dynamic environment (like Smalltalk*), the programmer has at their fingertips most of the things they would otherwise be force to search the internet for, which is <a href="http://astares.blogspot.com/2006/07/stupid-metrics.html">succinctly described by Torsten Bergmann</a>. Also, working in a low level language, like C++ (e.g. manual memory management), guarantees search engine love. <a href="http://seandenigris.com/blog/?p=31">I used to need a Safari Books membership</a> just to make sure I didn&#8217;t shoot myself in the foot.</p>
<p>Further reading:</p>
<ul>
<li><a href="http://blog.timbunce.org/2008/04/12/tiobe-or-not-tiobe-lies-damned-lies-and-statistics/">TIOBE or not TIOBE – “Lies, damned lies, and statistics”</a></li>
<li><a href="http://blog.timbunce.org/2009/05/17/tiobe-index-is-being-gamed/">TIOBE Index is being gamed</a></li>
</ul>
<p>* I am not pushing Smalltalk. In fact, I can&#8217;t wait until someone invents something better (hint, cough; <a href="http://vpri.org/">VPRI</a>).</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Programming+Language+Rankings+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D911" title="Post to Twitter"><img class="nothumb" src="http://seandenigris.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Programming+Language+Rankings+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D911" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&#038;p=911</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cocoa Smalltalk App</title>
		<link>http://seandenigris.com/blog/?p=907</link>
		<comments>http://seandenigris.com/blog/?p=907#comments</comments>
		<pubDate>Wed, 21 Dec 2011 03:36:31 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Pharo]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Smalltalk]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=907</guid>
		<description><![CDATA[For a while, I&#8217;ve been thinking about using MacRuby for native UIs and multiple windows in Pharo on the Mac. I uploaded a proof of concept to https://github.com/seandenigris/PharoMacRubyTest . It has a simple Cocoa UI that uses http to get a value (the current time) from a running Pharo image and displays it in a text field. [...]]]></description>
			<content:encoded><![CDATA[<p>For a while, I&#8217;ve been thinking about using MacRuby for native UIs and multiple windows in Pharo on the Mac. I uploaded a proof of concept to <a href="https://github.com/seandenigris/PharoMacRubyTest" rel="nofollow" target="_top">https://github.com/seandenigris/PharoMacRubyTest</a> . It has a simple Cocoa UI that uses http to get a value (the current time) from a running Pharo image and displays it in a text field. See <a href="http://forum.world.st/MacRuby-Cocoa-UIs-td4220336.html" target="_blank">the discussion</a> on the Pharo mailing list.</p>
<iframe src="http://player.vimeo.com/video/34095659??title=0&byline=0&portrait=0" width="604" height="370" frameborder="0" marginwidth="0" marginheight="0"></iframe>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Cocoa+Smalltalk+App+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D907" title="Post to Twitter"><img class="nothumb" src="http://seandenigris.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Cocoa+Smalltalk+App+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D907" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&#038;p=907</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MacRuby outlets don&#8217;t appear in Interface Builder (fixed)</title>
		<link>http://seandenigris.com/blog/?p=903</link>
		<comments>http://seandenigris.com/blog/?p=903#comments</comments>
		<pubDate>Tue, 20 Dec 2011 22:53:21 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=903</guid>
		<description><![CDATA[Xcode 4.1 had a bug where IB did not recognize outlets in MacRuby classes. It is corrected in Xcode 4.2. However, if you upgrade to 4.2, you must then reinstall MacRuby for MacRuby outlets to start working again. See this StackOverflow thread for the more information. Tweet This Post]]></description>
			<content:encoded><![CDATA[<p>Xcode 4.1 had a bug where IB did not recognize outlets in MacRuby classes. It is corrected in Xcode 4.2. However, if you upgrade to 4.2, you must then reinstall MacRuby for MacRuby outlets to start working again.</p>
<p>See <a href="http://stackoverflow.com/questions/4581667/interface-builder-not-seeing-outlets-with-macruby/8582980" target="_blank">this StackOverflow thread</a> for the more information.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=MacRuby+outlets+don%E2%80%99t+appear+in+Interface+Builder+%28fixed%29+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D903" title="Post to Twitter"><img class="nothumb" src="http://seandenigris.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=MacRuby+outlets+don%E2%80%99t+appear+in+Interface+Builder+%28fixed%29+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D903" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&#038;p=903</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vi Bindings Rock</title>
		<link>http://seandenigris.com/blog/?p=897</link>
		<comments>http://seandenigris.com/blog/?p=897#comments</comments>
		<pubDate>Tue, 20 Dec 2011 19:24:26 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=897</guid>
		<description><![CDATA[This is just a small example, but multiply it by the number of text editing and command line operations you do in a lifetime. After executing the following on the command line: HandBrakeCLI -e x264 -q 20 -f mp4 -m --main-feature -i /Volumes/DVD_01 -o /path/to/DVD_01.mp4 I needed to do the same for DVD_02. With vi [...]]]></description>
			<content:encoded><![CDATA[<p>This is just a small example, but multiply it by the number of text editing and command line operations you do in a lifetime. </p>
<p>After executing the following on the command line:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">HandBrakeCLI <span style="color: #660033;">-e</span> x264 <span style="color: #660033;">-q</span> <span style="color: #000000;">20</span> <span style="color: #660033;">-f</span> mp4 <span style="color: #660033;">-m</span> <span style="color: #660033;">--main-feature</span> <span style="color: #660033;">-i</span> <span style="color: #000000; font-weight: bold;">/</span>Volumes<span style="color: #000000; font-weight: bold;">/</span>DVD_01 <span style="color: #660033;">-o</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>DVD_01.mp4</pre></div></div>

<p>I needed to do the same for DVD_02.</p>
<p>With vi bindings, I pressed [Esc], [Shift]+[f], [1], [r], [2], [;], [.], and the command was transformed into:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">HandBrakeCLI <span style="color: #660033;">-e</span> x264 <span style="color: #660033;">-q</span> <span style="color: #000000;">20</span> <span style="color: #660033;">-f</span> mp4 <span style="color: #660033;">-m</span> <span style="color: #660033;">--main-feature</span> <span style="color: #660033;">-i</span> <span style="color: #000000; font-weight: bold;">/</span>Volumes<span style="color: #000000; font-weight: bold;">/</span>DVD_02 <span style="color: #660033;">-o</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>DVD_02.mp4</pre></div></div>

<p>Woot! How else would you do this? Copy and paste into a text editor? Hold down the back arrow&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..? The investment in learning vi pays off in countless small ways over a lifetime of programming.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=vi+Bindings+Rock+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D897" title="Post to Twitter"><img class="nothumb" src="http://seandenigris.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=vi+Bindings+Rock+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D897" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&#038;p=897</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Metacello Toolbox</title>
		<link>http://seandenigris.com/blog/?p=844</link>
		<comments>http://seandenigris.com/blog/?p=844#comments</comments>
		<pubDate>Tue, 06 Dec 2011 18:01:13 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[Pharo]]></category>
		<category><![CDATA[Smalltalk]]></category>
		<category><![CDATA[Squeak]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=844</guid>
		<description><![CDATA[Metacello Is Cool Metacello is a great project that manages your Smalltalk project&#8217;s dependencies on: other projects Smalltalk platforms (e.g. Squeak 4.2 vs. Pharo 1.2) Overcoming the mess that package loading has historically been (imagine trying to guess which version to use of each package of multiple interoperating projects while the platform evolves beneath you!), [...]]]></description>
			<content:encoded><![CDATA[<h3>Metacello Is Cool</h3>
<p><a href="http://code.google.com/p/metacello/" target="_blank">Metacello</a> is a great project that manages your Smalltalk project&#8217;s dependencies on:</p>
<ol>
<li>other projects</li>
<li>Smalltalk platforms (e.g. Squeak 4.2 vs. Pharo 1.2)</li>
</ol>
<p>Overcoming the mess that package loading has historically been (imagine trying to guess which version to use of each package of multiple interoperating projects while the platform evolves beneath you!), it lets you say the programmatic equivalent of:</p>
<blockquote><p>Before loading my project, you must load the current stable version of the OSProcess project. Then, for my first package: if this is Pharo1.2, load version X; if Squeak 4.2, load version Y&#8230;</p>
</blockquote>
<h3>But We Need Tools!</h3>
<p>Writing configurations by hand can be a drag. But fear not! Dale and Co. have created an API to facilitate your workflow. It is described in detail in the <a href="https://gforge.inria.fr/frs/download.php/28462/Metacello.pdf">draft chapter</a> of <a href="http://pharobyexample.org/">Pharo By Example 2</a>. Here&#8217;s a walkthrough of my first experience using it&#8230;</p>
<h4>Describing Project Structure</h4>

<div class="wp_syntax"><div class="code"><pre class="smalltalk" style="font-family:monospace;"><span style="color: #0000ff;">MetacelloToolBox</span>
    createBaseline: <span style="color: #7f0000;">'1.0-baseline'</span>
    for: <span style="color: #7f0000;">'SimpleApplescript'</span> <span style="color: #007f00; font-style: italic;">&quot;Project name&quot;</span>
    repository: <span style="color: #7f0000;">'http://squeaksource.com/SPDPlayground'</span>
    requiredProjects: <span style="color: #000066; font-weight:bold;">#</span><span style="">&#40;</span><span style="color: #7f0000;">'OSProcess'</span><span style="">&#41;</span>
    packages: <span style="color: #000066; font-weight:bold;">#</span><span style="">&#40;</span><span style="color: #7f0000;">'CommandShell-Piping'</span> <span style="color: #7f0000;">'SimpleApplescript'</span><span style="">&#41;</span>
    dependencies: <span style="">&#123;</span>
        <span style="">&#40;</span><span style="color: #7f0000;">'SimpleApplescript'</span> -&gt; <span style="color: #000066; font-weight:bold;">#</span><span style="">&#40;</span><span style="color: #7f0000;">'CommandShell-Piping'</span><span style="">&#41;</span><span style="">&#41;</span>.
        <span style="">&#40;</span><span style="color: #7f0000;">'CommandShell-Piping'</span> -&gt; <span style="color: #000066; font-weight:bold;">#</span><span style="">&#40;</span><span style="color: #7f0000;">'OSProcess'</span><span style="">&#41;</span><span style="">&#41;</span> <span style="">&#125;</span>
    groups: <span style="">&#123;</span> <span style="">&#40;</span><span style="color: #7f0000;">'default'</span> -&gt; <span style="color: #000066; font-weight:bold;">#</span><span style="">&#40;</span><span style="color: #7f0000;">'SimpleApplescript'</span><span style="">&#41;</span><span style="">&#41;</span> <span style="">&#125;</span>.</pre></div></div>

<p>As good Smalltalk code, it does just what it says &#8211; describes the project and its dependencies &#8211; namely, that the SimpleApplescript package depends on CommandShell-Piping, which in turn depends on OSProcess. Usually, it would not be our responsibility to describe dependencies of an external package like CommandShell-Piping, but CommandShell currently has no Metacello configuration of its own, so we step in (although creating one would be cleaner <img src='http://seandenigris.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ). Here&#8217;s the method it generated:</p>

<div class="wp_syntax"><div class="code"><pre class="smalltalk" style="font-family:monospace;">baseline10: <span style="color: #00007f;">spec</span>
    &lt;version: <span style="color: #7f0000;">'1.0-baseline'</span>&gt;
&nbsp;
    spec for: <span style="color: #000066; font-weight:bold;">#</span><span style="color: #7f0000;">'common'</span> do: <span style="">&#91;</span>
        <span style="color: #00007f;">spec</span> blessing: <span style="color: #000066; font-weight:bold;">#</span><span style="color: #7f0000;">'baseline'</span>.
        <span style="color: #00007f;">spec</span> repository: <span style="color: #7f0000;">'http://squeaksource.com/SPDPlayground'</span>.
        <span style="color: #00007f;">spec</span> project: <span style="color: #7f0000;">'OSProcess'</span> with: <span style="">&#91;</span>
            <span style="color: #00007f;">spec</span>
                className: <span style="color: #7f0000;">'ConfigurationOfOSProcess'</span>;
                versionString: <span style="color: #000066; font-weight:bold;">#</span><span style="color: #7f0000;">'stable'</span>;
                repository: <span style="color: #7f0000;">'http://www.squeaksource.com/MetacelloRepository'</span> <span style="">&#93;</span>.
        <span style="color: #00007f;">spec</span>
            package: <span style="color: #7f0000;">'CommandShell-Piping'</span> with: <span style="">&#91;</span>
                <span style="color: #00007f;">spec</span> requires: <span style="color: #000066; font-weight:bold;">#</span><span style="">&#40;</span><span style="color: #7f0000;">'OSProcess'</span> <span style="">&#41;</span>. <span style="">&#93;</span>;
            package: <span style="color: #7f0000;">'SimpleApplescript'</span> with: <span style="">&#91;</span>
                <span style="color: #00007f;">spec</span> requires: <span style="color: #000066; font-weight:bold;">#</span><span style="">&#40;</span><span style="color: #7f0000;">'CommandShell-Piping'</span> <span style="">&#41;</span>. <span style="">&#93;</span>;
            package: <span style="color: #7f0000;">'SimpleApplescript-Specifications'</span> with: <span style="">&#91;</span>
                <span style="color: #00007f;">spec</span> requires: <span style="color: #000066; font-weight:bold;">#</span><span style="">&#40;</span><span style="color: #7f0000;">'SimpleApplescript'</span> <span style="">&#41;</span>. <span style="">&#93;</span>.
        <span style="color: #00007f;">spec</span> group: <span style="color: #7f0000;">'default'</span> with: <span style="color: #000066; font-weight:bold;">#</span><span style="">&#40;</span><span style="color: #7f0000;">'SimpleApplescript'</span> <span style="color: #7f0000;">'SimpleApplescript-Specifications'</span> <span style="">&#41;</span>. <span style="">&#93;</span>.</pre></div></div>

<p>Now there was one thing I was unable to specify above. Because CommandShell-Piping is an external package, we need to tell Metacello where to find it (see how quickly things get complicated without Metacello). So I added a line to the generated baseline above:</p>

<div class="wp_syntax"><div class="code"><pre class="smalltalk" style="font-family:monospace;">package: <span style="color: #7f0000;">'CommandShell-Piping'</span> with: <span style="">&#91;</span>
    <span style="color: #00007f;">spec</span>
        repository: <span style="color: #7f0000;">'http://www.squeaksource.com/CommandShell'</span>; <span style="color: #007f00; font-style: italic;">&quot;added manually&quot;</span>
        requires: <span style="color: #000066; font-weight:bold;">#</span><span style="">&#40;</span><span style="color: #7f0000;">'OSProcess'</span> <span style="">&#41;</span>. <span style="">&#93;</span>;</pre></div></div>

<h4><span style="font-weight: normal;">Version Snapshot</span></h4>

<div class="wp_syntax"><div class="code"><pre class="smalltalk" style="font-family:monospace;"><span style="color: #0000ff;">MetacelloToolBox</span>
    createDevelopment: <span style="color: #7f0000;">'1.0'</span>
    for: <span style="color: #7f0000;">'SimpleApplescript'</span>
    importFromBaseline: <span style="color: #7f0000;">'1.0-baseline'</span>
    description: <span style="color: #7f0000;">'initial development version'</span>.</pre></div></div>

<p>Here, we just did something amazingly cool. Metacello walked through our project&#8217;s packages and dependencies and created a version with:</p>
<ul>
<li>the current versions of each package</li>
<li>the appropriate version of each external project (e.g. stable, bleedingEdge)</li>
</ul>
<p>Here&#8217;s the method it generated:</p>

<div class="wp_syntax"><div class="code"><pre class="smalltalk" style="font-family:monospace;">version10: <span style="color: #00007f;">spec</span>
    &lt;version: <span style="color: #7f0000;">'1.0'</span> imports: <span style="color: #000066; font-weight:bold;">#</span><span style="">&#40;</span><span style="color: #7f0000;">'1.0-baseline'</span> <span style="">&#41;</span>&gt;
&nbsp;
    spec for: <span style="color: #000066; font-weight:bold;">#</span><span style="color: #7f0000;">'common'</span> do: <span style="">&#91;</span>
        <span style="color: #00007f;">spec</span> blessing: <span style="color: #000066; font-weight:bold;">#</span><span style="color: #7f0000;">'release'</span>.
        <span style="color: #00007f;">spec</span> description: <span style="color: #7f0000;">'initial development version'</span>.
        <span style="color: #00007f;">spec</span> author: <span style="color: #7f0000;">'SeanDeNigris'</span>.
        <span style="color: #00007f;">spec</span> timestamp: <span style="color: #7f0000;">'12/6/2011 10:38'</span>.
        <span style="color: #00007f;">spec</span> project: <span style="color: #7f0000;">'OSProcess'</span> with: <span style="color: #000066; font-weight:bold;">#</span><span style="color: #7f0000;">'stable'</span>.
        <span style="color: #00007f;">spec</span>
            package: <span style="color: #7f0000;">'CommandShell-Piping'</span> with: <span style="color: #7f0000;">'CommandShell-Piping-dtl.10'</span>;
            package: <span style="color: #7f0000;">'SimpleApplescript'</span> with: <span style="color: #7f0000;">'SimpleApplescript-SeanDeNigris.1'</span>. <span style="">&#93;</span>.</pre></div></div>

<h4>Validation</h4>
<p>PBE2 advises us to validate our configurations after editing. It&#8217;s easy to do, just printIt the following, which will return a collection of problems, if any:</p>

<div class="wp_syntax"><div class="code"><pre class="smalltalk" style="font-family:monospace;"><span style="color: #0000ff;">MetacelloToolBox</span> validateConfiguration: <span style="color: #0000ff;">ConfigurationOfSimpleApplescript</span>.</pre></div></div>

<h4>A configuration is Born</h4>
<p>Now we have a functioning configuration. We will commit it so we can start testing it on the different platforms we support:</p>

<div class="wp_syntax"><div class="code"><pre class="smalltalk" style="font-family:monospace;"><span style="color: #0000ff;">Gofer</span> new
    url: <span style="color: #7f0000;">'http://squeaksource.com/SPDPlayground'</span>;
    package: <span style="color: #7f0000;">'ConfigurationOfSimpleApplescript'</span>;
    commit: <span style="color: #7f0000;">'Initial version of configuration'</span>.</pre></div></div>

<h4>Release into the Wild</h4>
<p>Once we are satisfied that our configuration is correct for all supported platforms (beyond the scope of this post, see <a href="https://gforge.inria.fr/frs/download.php/28462/Metacello.pdf">the PBE2 draft chapter</a>), we promote our current development version (the one we created a few steps ago) to released status:</p>

<div class="wp_syntax"><div class="code"><pre class="smalltalk" style="font-family:monospace;"><span style="color: #0000ff;">MetacelloToolBox</span>
    releaseDevelopmentVersionIn: <span style="color: #0000ff;">ConfigurationOfSimpleApplescript</span>
    description: <span style="color: #7f0000;">'- release version 1.0'</span>. <span style="color: #007f00; font-style: italic;">&quot;this will be the commit comment&quot;</span></pre></div></div>

<h4>Sharing</h4>
<p>So the community can easily find our configuration, we copy it to <a href="http://www.squeaksource.com/MetacelloRepository">http://www.squeaksource.com/MetacelloRepository</a> (note that this location may change in the future as the community is rapidly evolving best practices for Metacello):</p>

<div class="wp_syntax"><div class="code"><pre class="smalltalk" style="font-family:monospace;"><span style="color: #0000ff;">MetacelloToolBox</span>
    copyConfiguration: <span style="color: #0000ff;">ConfigurationOfSimpleApplescript</span>
    to: <span style="color: #7f0000;">'http://www.squeaksource.com/MetacelloRepository'</span>.</pre></div></div>

<h4>Conclusion</h4>
<p>Metacello solved a great need in the Squeak/Pharo ecosystem, and its tool support is making it easy and fun to use.</p>
<p>Here&#8217;s <a href="https://gist.github.com/1438930">a github gist of the code above</a> that you can customize to create your own configuration. Have fun!</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Metacello+Toolbox+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D844" title="Post to Twitter"><img class="nothumb" src="http://seandenigris.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Metacello+Toolbox+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D844" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&#038;p=844</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Run Applescript on new email</title>
		<link>http://seandenigris.com/blog/?p=835</link>
		<comments>http://seandenigris.com/blog/?p=835#comments</comments>
		<pubDate>Tue, 26 Jul 2011 22:41:38 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[Applescript]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=835</guid>
		<description><![CDATA[I&#8217;m still experimenting, but so far I found two strategies: Enable Folder Actions and attach a script to the folder in ~/Library/Mail/ which hold the inbox&#8217;s messages Create a rule general enough to reply to all messages (e.g. account = my_email_account) The rule approach seems to fire a bit quicker than the Folder Actions, so [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m still experimenting, but so far I found two strategies:</p>
<ul>
<li>Enable <em>Folder Actions</em> and attach a script to the folder in ~/Library/Mail/ which hold the inbox&#8217;s messages</li>
<li>Create a rule general enough to reply to all messages (e.g. account = my_email_account)</li>
</ul>
<p>The rule approach seems to fire a bit quicker than the <em>Folder Actions</em>, so I&#8217;m going with that for the moment.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Run+Applescript+on+new+email+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D835" title="Post to Twitter"><img class="nothumb" src="http://seandenigris.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Run+Applescript+on+new+email+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D835" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&#038;p=835</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smalltalk Simple Image-based Persistence</title>
		<link>http://seandenigris.com/blog/?p=815</link>
		<comments>http://seandenigris.com/blog/?p=815#comments</comments>
		<pubDate>Mon, 30 May 2011 11:39:39 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Smalltalk]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=815</guid>
		<description><![CDATA[In an enlightening blog post, Ramon Leon explains that most applications are designed for small businesses with small amounts of data. Therefore most applications will never have to scale (i.e. become the next Twitter), so a relational database is overkill. However, persisting by simply saving the image is slow and error-prone. Based on these ideas, he suggests a simple [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://onsmalltalk.com/simple-image-based-persistence-in-squeak/">an enlightening blog post</a>, Ramon Leon explains that most applications are designed for small businesses with small amounts of data. Therefore <strong>most applications will never have to scale</strong> (i.e. become the next Twitter), so <strong>a relational database is overkill</strong>. However, persisting by simply saving the image is slow and error-prone.</p>
<p>Based on these ideas, he suggests a simple (one class) framework which saves only your model. The idea is to use it as long as you can get away with, which may be forever.</p>
<p>I packaged the code from the post, added a few tests, and put it <a href="http://www.squeaksource.com/SimplePersistence">on SqueakSource as SimplePersistence</a>.</p>
<p>It&#8217;s really easy to give your application persistence (see SPFileDatabase&#8217;s class comment). The three steps are:</p>
<ol>
<li>Subclass SPFileDatabase</li>
<li>On the class-sode of the subclass, implement
<ul>
<li>#repositories &#8211; returns a collection of objects to be saved</li>
<li>#restoreRepositories: &#8211; gets passed back the collection.</li>
</ul>
</li>
</ol>
<p>That&#8217;s it! Now, whenever you want to save, call class&gt;&gt;saveRepository or class&gt;&gt;takeSnapshot (background save).</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Smalltalk+Simple+Image-based+Persistence+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D815" title="Post to Twitter"><img class="nothumb" src="http://seandenigris.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Smalltalk+Simple+Image-based+Persistence+http%3A%2F%2Fseandenigris.com%2Fblog%2F%3Fp%3D815" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&#038;p=815</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

