<?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>Tranquilapps Blog</title>
	<atom:link href="http://tranquilapps.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://tranquilapps.wordpress.com</link>
	<description>Quality words about quality software. Maybe.</description>
	<lastBuildDate>Thu, 23 Apr 2009 15:00:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='tranquilapps.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/cdc36619977d2c7a1842225167f678ed?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Tranquilapps Blog</title>
		<link>http://tranquilapps.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://tranquilapps.wordpress.com/osd.xml" title="Tranquilapps Blog" />
	<atom:link rel='hub' href='http://tranquilapps.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Tranquil Checkers 1.0 Released!</title>
		<link>http://tranquilapps.wordpress.com/2009/04/23/tranquil-checkers-10-released/</link>
		<comments>http://tranquilapps.wordpress.com/2009/04/23/tranquil-checkers-10-released/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 14:59:48 +0000</pubDate>
		<dc:creator>Sam Warmuth</dc:creator>
				<category><![CDATA[musings]]></category>

		<guid isPermaLink="false">http://tranquilapps.wordpress.com/?p=89</guid>
		<description><![CDATA[I finally released the 1.0 version of tranquil checkers. You can grab it (all platforms) at tranquilapps.com. I&#8217;ve got a lot of studying to do for a differential equations test this afternoon, but I&#8217;m going to post a full update about this later.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tranquilapps.wordpress.com&amp;blog=7173794&amp;post=89&amp;subd=tranquilapps&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I finally released the 1.0 version of tranquil checkers. You can grab it (all platforms) at <a href="http://www.tranquilapps.com">tranquilapps.com</a>. I&#8217;ve got a lot of studying to do for a differential equations test this afternoon, but I&#8217;m going to post a full update about this later.<br />
<img src="http://harpastum.googlepages.com/TCScreen.png" alt="Screenshot" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tranquilapps.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tranquilapps.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tranquilapps.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tranquilapps.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tranquilapps.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tranquilapps.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tranquilapps.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tranquilapps.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tranquilapps.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tranquilapps.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tranquilapps.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tranquilapps.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tranquilapps.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tranquilapps.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tranquilapps.wordpress.com&amp;blog=7173794&amp;post=89&amp;subd=tranquilapps&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tranquilapps.wordpress.com/2009/04/23/tranquil-checkers-10-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb9b01bd3f65603f3314b71b868a3703?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Sam Warmuth</media:title>
		</media:content>

		<media:content url="http://harpastum.googlepages.com/TCScreen.png" medium="image">
			<media:title type="html">Screenshot</media:title>
		</media:content>
	</item>
		<item>
		<title>A Lack of SelfControl</title>
		<link>http://tranquilapps.wordpress.com/2009/03/31/a-lack-of-selfcontrol/</link>
		<comments>http://tranquilapps.wordpress.com/2009/03/31/a-lack-of-selfcontrol/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 00:45:58 +0000</pubDate>
		<dc:creator>Sam Warmuth</dc:creator>
				<category><![CDATA[musings]]></category>

		<guid isPermaLink="false">http://tranquilapps.wordpress.com/?p=29</guid>
		<description><![CDATA[I see the reasoning behind not allowing the user to renege on his/her commitment to actually getting work done, but there's no way this little app was going to tell _me_ what to do. 

Two minutes and a git repository later, I'm elbow deep in source code, looking around...<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tranquilapps.wordpress.com&amp;blog=7173794&amp;post=29&amp;subd=tranquilapps&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-thumbnail wp-image-37" title="SelfControl" src="http://tranquilapps.files.wordpress.com/2009/03/selfcontrol1.gif?w=150&#038;h=150" alt="SelfControl" width="150" height="150" /></p>
<p>Just read a <a href="http://blog.wired.com/business/2009/03/distracted-self.html">Wired piece</a> about a new mac app called <a href="http://visitsteve.com/work/selfcontrol/">SelfControl</a>. In a nutshell, it allows you to blacklist specific domains (and IPs) for a given time, allowing you to remove the distractions that keep you from your actual work (that&#8217;s the plan at least).</p>
<p>It&#8217;s a fun little app, with an interesting premise. While I was skimming its website this sentence caught my eye:</p>
<blockquote><p>&#8220;Once started, it can not be undone by the application or by restarting the computer – you must wait for the timer to run out.&#8221;</p></blockquote>
<p>Now, I see the reasoning behind not allowing the user to renege on his/her commitment to actually get work done, but there&#8217;s no way this little app was going to tell <em>me</em> what to do.</p>
<p>Ok, ok, I admit that&#8217;s a little over the top. The app isn&#8217;t meant to be fort Knox (it&#8217;s open source), and the developer&#8217;s goal was to make the casual user keep a promise to themselves. But at the same time, my interest was piqued. (From here on, some things get a bit technical. I encourage you to keep reading, but if you just want the solution you can skip down to the bottom. I won&#8217;t tell anyone.)</p>
<p>I looked around on Activity Monitor, but couldn&#8217;t find a daemon that was keeping me down. Dead end. </p>
<p>Two minutes and a git repository later, I&#8217;m elbow deep in source code, looking around. My eye gets drawn to <code>IPFirewall.m</code>.</p>
<p>The first declaration: <code>NSString* const kIPFirewallExecutablePath = @"/sbin/ipfw";</code></p>
<p>Very suspicious. As I had no idea what ipfw was at that point, I decided to investigate. A quick <code>man</code> revealed that ipfw was an &#8221;IP firewall and traffic shaper control program.&#8221; Bingo.</p>
<p>Salient points from the man file:</p>
<blockquote><p>An ipfw configuration, or ruleset, is made of a list of rules numbered</p>
<p>from 1 to 65535.  Packets are passed to ipfw from a number of different</p>
<p>places in the protocol stack (depending on the source and destination of</p>
<p>the packet, it is possible that ipfw is invoked multiple times on the</p>
<p>same packet).  The packet passed to the firewall is compared against each</p>
<p>of the rules in the firewall ruleset.  When a match is found, the action</p>
<p>corresponding to the matching rule is performed.</p>
<p>&#8230;</p>
<p>Rules can be added with the add command; deleted individually or in</p>
<p>groups with the delete command, and globally (except those in set 31)</p>
<p>with the flush command; displayed, optionally with the content of the</p>
<p>counters, using the show and list commands.  Finally, counters can be</p>
<p>reset with the zero and resetlog commands.</p></blockquote>
<p>Sounds easy enough. I added YCombinator.com (174.132.225.106) to my SelfControl blacklist, and pushed the start button. My attempt to reach YC returned the expected &#8220;Safari can’t connect to the server&#8221; message.  Back in Terminal, I gave <code>sudo ipfw list</code>(list all current ipfw rules) a shot:</p>
<blockquote><p>02500 count ip from any to any // BEGIN SELFCONTROL BLOCK</p>
<p>02501 deny ip from me to 174.132.225.106</p>
<p>02502 count ip from any to any // END SELFCONTROL BLOCK</p>
<p>65535 allow ip from any to any</p></blockquote>
<p>Looks easy enough, especially since Mr. Lambert was able to comment the block of rules that SelfControl is using (which could be helpful if you&#8217;ve got more ipfw rules than I do). I tried entering <code>sudo ipfw delete 2501</code>, and again attempted to connect to <a href="http://ycombinator.com">YCombinator.com</a>. Success!</p>
<p>But was there any way to remove all of the rules? I went back into the app, and dug around in the source code a bit. Again I quickly found what I was looking for (kudos to Mr. Lambert for the clear code):</p>
<blockquote><p><code></p>
<p> - (int)clearSelfControlBlockRuleSet {</p>
<p>NSArray* args = [NSArray arrayWithObjects:</p>
<p>@"delete",</p>
<p>@"set",</p>
<p>[NSString stringWithFormat: @"%d", kIPFirewallRuleSetNumber],</p>
<p>nil];</p>
<p>NSTask* task = [NSTask launchedTaskWithLaunchPath:kIPFirewallExecutablePath</p>
<p>arguments:args];</p>
<p>[task waitUntilExit];</p>
<p>int status = [task terminationStatus];</p>
<p>return status;<br />
}</code> </p></blockquote>
<p>For those not completely fluent in code, the above method is the one SelfControl uses to remove the access blocks. It basically removes a set (a group of rules) from the ipfw list. Specifically, it removes the set at the index <code> kIPFirewallRuleSetNumber</code>.</p>
<p>A quick check to see what <code>kIPFirewallRuleSetNumber</code> was set to (19) and I was ready to go.</p>
<p>Without further ado, I present the simple command to resume your time-wasting ways (Note: You must enter your administrator password when you&#8217;re asked for this to work):</p>
<blockquote><p>sudo ipfw delete set 19</p></blockquote>
<p>Yup, it&#8217;s that easy. There goes my productivity again.</p>
<p><code>UPDATE:</code> Uh oh. As Charlie Stigler pointed out, there&#8217;s a problem with this approach. Turns out SelfControl will reactivate the ipfw blocking after a time. Petard pointed to a better solution, which is to find the SelfControl helper and remove it. The command is then<br />
<code>sudo /Library/PrivilegedHelperTools/org.eyebeam.SelfControl `id -u` --remove</code><br />
This resets the app quite nicely.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tranquilapps.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tranquilapps.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tranquilapps.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tranquilapps.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tranquilapps.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tranquilapps.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tranquilapps.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tranquilapps.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tranquilapps.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tranquilapps.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tranquilapps.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tranquilapps.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tranquilapps.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tranquilapps.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tranquilapps.wordpress.com&amp;blog=7173794&amp;post=29&amp;subd=tranquilapps&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tranquilapps.wordpress.com/2009/03/31/a-lack-of-selfcontrol/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb9b01bd3f65603f3314b71b868a3703?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Sam Warmuth</media:title>
		</media:content>

		<media:content url="http://tranquilapps.files.wordpress.com/2009/03/selfcontrol1.gif?w=150" medium="image">
			<media:title type="html">SelfControl</media:title>
		</media:content>
	</item>
		<item>
		<title>Genetic Algorithms</title>
		<link>http://tranquilapps.wordpress.com/2009/03/31/genetic-algorithms/</link>
		<comments>http://tranquilapps.wordpress.com/2009/03/31/genetic-algorithms/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 15:36:28 +0000</pubDate>
		<dc:creator>Sam Warmuth</dc:creator>
				<category><![CDATA[musings]]></category>
		<category><![CDATA[genetic algorithms]]></category>

		<guid isPermaLink="false">http://tranquilapps.wordpress.com/?p=13</guid>
		<description><![CDATA[I have very little understanding of genetic algorithms, other than their ability to produce some rockin&#8217; pictures of the Mona Lisa and Lena. The plan, therefore, is to build a genetic algorithm to determine the optimum Fourier series of a given signal. I realize that this is easily calculated, and a giant waste of cycles, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tranquilapps.wordpress.com&amp;blog=7173794&amp;post=13&amp;subd=tranquilapps&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have very little understanding of genetic algorithms, other than their ability to produce some rockin&#8217; pictures of the Mona Lisa and Lena.</p>
<p>The plan, therefore, is to build a genetic algorithm to determine the optimum <a href="http://en.wikipedia.org/wiki/Fourier_series">Fourier series</a> of a given signal. I realize that this is easily calculated, and a giant waste of cycles, but I figure the best starting place is an easily verifiable solution.</p>
<p>I&#8217;m also interested in seeing if my optimum solution will exhibit the <a href="http://en.wikipedia.org/wiki/Gibbs_phenomenon">Gibb&#8217;s phenomenon</a>, or some other type of artifact.</p>
<p>Wish me luck.</p>
<p>______________</p>
<p>Listen to this post: <span style='text-align:left;display:block;'><p><object type='application/x-shockwave-flash' data='http://s0.wp.com/wp-content/plugins/audio-player/player.swf' width='290' height='24' id='audioplayer1'><param name='movie' value='http://s0.wp.com/wp-content/plugins/audio-player/player.swf' /><param name='FlashVars' value='&amp;bg=0xf8f8f8&amp;leftbg=0xeeeeee&amp;lefticon=0x666666&amp;rightbg=0xcccccc&amp;rightbghover=0x999999&amp;righticon=0x666666&amp;righticonhover=0xffffff&amp;text=0x666666&amp;slider=0x666666&amp;track=0xFFFFFF&amp;border=0x666666&amp;loader=0x9FFFB8&amp;soundFile=http%3A%2F%2Fharpastum.googlepages.com%2FGeneticAlgorithms.mp3' /><param name='quality' value='high' /><param name='menu' value='false' /><param name='bgcolor' value='#FFFFFF' /><param name='wmode' value='opaque' /></object></p></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tranquilapps.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tranquilapps.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tranquilapps.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tranquilapps.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tranquilapps.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tranquilapps.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tranquilapps.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tranquilapps.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tranquilapps.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tranquilapps.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tranquilapps.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tranquilapps.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tranquilapps.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tranquilapps.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tranquilapps.wordpress.com&amp;blog=7173794&amp;post=13&amp;subd=tranquilapps&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tranquilapps.wordpress.com/2009/03/31/genetic-algorithms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb9b01bd3f65603f3314b71b868a3703?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Sam Warmuth</media:title>
		</media:content>
	</item>
	</channel>
</rss>
