<?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>Defective Semantics &#187; apple</title>
	<atom:link href="http://scarff.id.au/blog/tag/apple/feed/" rel="self" type="application/rss+xml" />
	<link>http://scarff.id.au</link>
	<description>Dean Scarff's perpetual struggle with technology, and other anecdotes</description>
	<lastBuildDate>Thu, 03 Nov 2011 22:39:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>exponent for Fan Control</title>
		<link>http://scarff.id.au/blog/2009/exponent-for-fan-control/</link>
		<comments>http://scarff.id.au/blog/2009/exponent-for-fan-control/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 04:07:14 +0000</pubDate>
		<dc:creator>Dean</dc:creator>
				<category><![CDATA[Programs]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[Fan Control]]></category>

		<guid isPermaLink="false">http://scarff.id.au/?p=181</guid>
		<description><![CDATA[<p>Here&#8217;s another patch for some third party software, this time for keeping your intel mac CPU cool.</p>
<p>I&#8217;ve been using Lobotomo&#8217;s Fan Control preference pane and daemon to control scud&#8217;s fan speeds since I installed OS X.</p>
<p>It&#8217;s useful because it means you can idle with quieter fans in a cool environment, but still have them rev up to max before you burn your fingers.  However, one thing that&#8217;s annoyed me for a while is that you only really control the floor and ceiling thresholds of a linear response curve.</p>
<p>In my experience (engineers or physicists can correct me), at a constant CPU load, there are multiple equilibrium temperature/fan-speed combinations, but they&#8217;re not collinear.  In the original Fan Control, the response curve is linear.  Taking a hint from gamma correction, I have patched Fan Control 1.2 to use an exponential curve.  Where <span class="math">T</span> is the temperature, the target fan&#8230; <a href="http://scarff.id.au/blog/2009/exponent-for-fan-control/" class="read_more">more</a></p>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s another patch for some third party software, this time for keeping your intel mac CPU cool.</p>
<p>I&#8217;ve been using <a href="http://www.lobotomo.com/products/FanControl/">Lobotomo&#8217;s Fan Control</a> preference pane and daemon to control scud&#8217;s fan speeds since I installed OS X.</p>
<p>It&#8217;s useful because it means you can idle with quieter fans in a cool environment, but still have them rev up to max before you burn your fingers.  However, one thing that&#8217;s annoyed me for a while is that you only really control the floor and ceiling thresholds of a linear response curve.</p>
<p>In my experience (engineers or physicists can correct me), at a constant CPU load, there are multiple equilibrium temperature/fan-speed combinations, but they&#8217;re not collinear.  In the original Fan Control, the response curve is linear.  Taking a hint from <a href="http://en.wikipedia.org/wiki/Gamma_correction">gamma correction</a>, I have patched Fan Control 1.2 to use an exponential curve.  Where <span class="math">T</span> is the temperature, the target fan speed  <span class="math">F</span> is governed by the equation:</p>
<p><img src="http://scarff.id.au/blog/wp-content/uploads/2009/01/fcgammaeqn.png" alt="F_b + (F_m - F_b) ((T - T_l)/(T_b - T_l))^γ" title="Fan Control gamma equation" width="339" height="80" class="size-full wp-image-182" /></p>
<p>I also reduced the minimum upper threshold temperature to 60˚C.</p>
<p>You can browse the source in <a href="/cgit/fancontrol.git">git</a> or download the binary <a href="/file/Fan_Control_1.2+exponent.pkg">installer</a>.  I&#8217;ve only tested on scud (running Leopard).  Feedback is welcome as comments here on the blog.</p>
<div id="attachment_191" class="wp-caption aligncenter" style="width: 310px"><a href="http://scarff.id.au/blog/wp-content/uploads/2009/01/fancontrolss.png"><img src="http://scarff.id.au/blog/wp-content/uploads/2009/01/fancontrolss-300x141.png" alt="Screenshot" title="Fan Control +exponent screenshot" width="300" height="141" class="size-medium wp-image-191" /></a><p class="wp-caption-text">exponential curve screenshot</p></div>
<p>Of course, there may be <a href="http://www.macdevcenter.com/pub/a/mac/2006/05/23/thermal-paste-question.html?page=2">more effective</a> measures to combat a hot macbook pro.</p>
]]></content:encoded>
			<wfw:commentRss>http://scarff.id.au/blog/2009/exponent-for-fan-control/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Decent terminal font</title>
		<link>http://scarff.id.au/blog/2008/decent-terminal-font/</link>
		<comments>http://scarff.id.au/blog/2008/decent-terminal-font/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 08:00:18 +0000</pubDate>
		<dc:creator>Dean</dc:creator>
				<category><![CDATA[Problems]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[jmk]]></category>
		<category><![CDATA[monaco]]></category>
		<category><![CDATA[neep-alt]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://scarff.id.au/?p=170</guid>
		<description><![CDATA[<p>I haven&#8217;t been able to find a good replacement for Monaco for use as a terminal font on OS X.</p>
<p>My personal favourite terminal font, neep alt isn&#8217;t readily useable from OS X.</p>
<p>None of the Proggy fonts are as clean as Monaco, although Proggy Tiny 11 comes close.</p>
<ul>
<li>lower-case &#8220;a&#8221; should be double-storey, so it doesn&#8217;t look anything like lower-case &#8220;o&#8221;</li>
<li>zero &#8220;0&#8243; should be slashed</li>
<li>lower-case &#8220;l&#8221; should have a serif on the bottom like lower-case &#8220;t&#8221;, and not look like numeral &#8220;1&#8243; or upper-case &#8220;I&#8221;.</li>
<li>upper-case &#8220;U&#8221; and &#8220;V&#8221; differ by at least 7 pixels</li>
<li>gentle curves rather than blocky rectangles, please</li>
</ul>
<p>It&#8217;s disappointing that Monaco can get so much right and get lower-case &#8220;a&#8221; wrong.  Still, if anyone wants to port neep alt to a format OS X and iTerm can handle (even if it&#8217;s only at 13pt semicondensed)&#8230;  I tried once with fontforge&#8230; <a href="http://scarff.id.au/blog/2008/decent-terminal-font/" class="read_more">more</a></p>]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t been able to find a good replacement for Monaco for use as a terminal font on OS X.</p>
<div id="attachment_171" class="wp-caption alignnone" style="width: 470px"><img src="http://scarff.id.au/blog/wp-content/uploads/2008/12/typo.png" alt="try figuring this one out with bleary eyes" title="typo" width="460" height="230" class="size-full wp-image-171" /><p class="wp-caption-text">try figuring this one out with bleary eyes</p></div>
<p>My personal favourite terminal font, <a href="http://www.jmknoble.net/fonts/">neep alt</a> isn&#8217;t readily useable from OS X.</p>
<p>None of the Proggy fonts are as clean as Monaco, although Proggy Tiny 11 comes close.</p>
<ul>
<li>lower-case &#8220;a&#8221; should be double-storey, so it doesn&#8217;t look anything like lower-case &#8220;o&#8221;</li>
<li>zero &#8220;0&#8243; should be slashed</li>
<li>lower-case &#8220;l&#8221; should have a serif on the bottom like lower-case &#8220;t&#8221;, and not look like numeral &#8220;1&#8243; or upper-case &#8220;I&#8221;.</li>
<li>upper-case &#8220;U&#8221; and &#8220;V&#8221; differ by at least 7 pixels</li>
<li>gentle curves rather than blocky rectangles, please</li>
</ul>
<p>It&#8217;s disappointing that Monaco can get so much right and get lower-case &#8220;a&#8221; wrong.  Still, if anyone wants to port neep alt to a format OS X and iTerm can handle (even if it&#8217;s only at 13pt semicondensed)&#8230;  I tried once with fontforge but it was pretty broken.</p>
]]></content:encoded>
			<wfw:commentRss>http://scarff.id.au/blog/2008/decent-terminal-font/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cocoa devs fail Data Structures &amp; Algorithms?</title>
		<link>http://scarff.id.au/blog/2008/cocoa-devs-fail-data-structures-algorithms/</link>
		<comments>http://scarff.id.au/blog/2008/cocoa-devs-fail-data-structures-algorithms/#comments</comments>
		<pubDate>Sat, 09 Feb 2008 12:40:35 +0000</pubDate>
		<dc:creator>Dean</dc:creator>
				<category><![CDATA[Problems]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[linked list]]></category>

		<guid isPermaLink="false">http://scarff.id.au/blog/2008/cocoa-devs-fail-data-structures-algorithms/</guid>
		<description><![CDATA[<p>I can&#8217;t find a linked-list class in Cocoa.  Yes, I do want to do middle-insertions, and I&#8217;d have a fine time amortising my sequential access to constant time.  Fine; it&#8217;s not like they&#8217;re hard to implement.</p>
<p>The scary thing is that when searching, I blindly fell into the pool of ignorance displayed in this circa-2004 Cocoa-dev thread.  To be fair, the OP was more concerned about iterator functionality than a list implementation, but most of the responses seemed oblivious to:</p>
<ul>
<li>The iterator design pattern</li>
<li>The time-complexity advantages of a linked-list implementation over arrays and deques (<code>NSArray</code>) and hashes and trees (<code>NSDictionary</code> and <code>NSSet</code>)</li>
</ul>
<p><span id="more-14"></span></p>
<p>Take Nicko van Someren&#8217;s insertion:</p>
<blockquote><p>Building a doubly-linked list requires the object to gain forward and backward pointers and the only way to do this in Objective-C is to subclass the things you want to list.  The problem is that the type system in</p></blockquote><p>&#8230; <a href="http://scarff.id.au/blog/2008/cocoa-devs-fail-data-structures-algorithms/" class="read_more">more</a></p>]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t find a linked-list class in Cocoa.  Yes, I do want to do middle-insertions, and I&#8217;d have a fine time amortising my sequential access to constant time.  Fine; it&#8217;s not like they&#8217;re hard to implement.</p>
<p>The scary thing is that when searching, I blindly fell into the pool of ignorance displayed in <a href="http://lists.apple.com/archives/Cocoa-dev/2004/Jul/msg01740.html">this circa-2004 Cocoa-dev thread</a>.  To be fair, the OP was more concerned about iterator functionality than a list implementation, but most of the responses seemed oblivious to:</p>
<ul>
<li>The iterator design pattern</li>
<li>The time-complexity advantages of a linked-list implementation over arrays and deques (<code>NSArray</code>) and hashes and trees (<code>NSDictionary</code> and <code>NSSet</code>)</li>
</ul>
<p><span id="more-14"></span></p>
<p>Take Nicko van Someren&#8217;s <a href="http://lists.apple.com/archives/Cocoa-dev/2004/Jul/msg01828.html">insertion</a>:</p>
<blockquote><p>Building a doubly-linked list requires the object to gain forward and backward pointers and the only way to do this in Objective-C is to subclass the things you want to list.  The problem is that the type system in Objective C is much more dynamic than in C++ and people are therefore far more inclined to write code that neither knows nor cares about the type of object that gets passed in. An initial reaction might be to build a linked list of some sort of node class and have each object in the list hang off a pointer in the node, but this does not really do what you need since it&#8217;s hard to work out which node refers to a particular object. So, all in all building code in Objective C to make generic lists of all subclasses of NSObject is a bit of a pain.</p></blockquote>
<p>WTF?  First of all, of course adding iterator functionality to member types is silly.  He seems to dismiss the second approach (list of nodes, with pointers to members) for an even sillier reason.  What does &#8220;it&#8217;s hard to work out which node refers to a particular object&#8221; mean?  He&#8217;s still hung up on members having inverse awareness of their container.  That&#8217;s what the iterator is for, damnit!</p>
<p>I think Pandaa <a href="http://lists.apple.com/archives/Cocoa-dev/2004/Jul/msg01824.html">said it well</a>:</p>
<blockquote><p>I strongly suggest everyone who contributed to this confusion read up on basic computer science.</p></blockquote>
<p>So I guess not all Cocoa developers are oblivious to DSA.</p>
]]></content:encoded>
			<wfw:commentRss>http://scarff.id.au/blog/2008/cocoa-devs-fail-data-structures-algorithms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

