<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/1.5.2" -->
<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/"
>

<channel>
	<title>fdiv.net</title>
	<link>http://fdiv.net</link>
	<description>the floating point divide</description>
	<pubDate>Wed, 30 Jul 2008 17:51:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.2</generator>
	<language>en</language>

		<item>
		<title>Silicon Dioxide (SiO2)</title>
		<link>http://fdiv.net/2008/07/30/silicon-dioxide-sio2/</link>
		<comments>http://fdiv.net/2008/07/30/silicon-dioxide-sio2/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 17:50:33 +0000</pubDate>
		<dc:creator>cwright</dc:creator>
		
	<category>Social Story</category>
	<category>kineme</category>
	<category>Interactive Media</category>
	<category>Quartz Composer</category>
	<category>Apple</category>
	<category>Software Development</category>
	<category>Kosada</category>
		<guid>http://fdiv.net/2008/07/30/silicon-dioxide-sio2/</guid>
		<description><![CDATA[	In the wee small hours of this morning, Kineme Interactive Media released its first commercial product, QuartzCrystal.
	QuartzCrystal is an offline renderer that turns Quartz Compositions into portable QuickTime movies.  It supports 3rd party plugins, as well as patches that do not work in safe-mode-only environments (such as QuickTime Pro).  It also supports software [...]]]></description>
			<content:encoded><![CDATA[	<p><a href="http://kineme.net/product/QuartzCrystal"><img style="background: none;" align="right" alt="QuartzCrystal Logo" src="http://kineme.net/files/imagecache/product/files/QuartzCrystal-1.0.png" /></a>In the wee small hours of this morning, <a href="http://kineme.net/">Kineme Interactive Media</a> released its first commercial product, <a href="http://kineme.net/product/QuartzCrystal">QuartzCrystal</a>.</p>
	<p>QuartzCrystal is an offline renderer that turns Quartz Compositions into portable QuickTime movies.  It supports 3rd party plugins, as well as patches that do not work in safe-mode-only environments (such as QuickTime Pro).  It also supports software scene antialiasing, so if you have a Mac with plenty of RAM and a hard-core video card, you can make spectacularly beautiful renderings of your plugins, effects, and compositions.</p>
	<p>Beside QuartzCrystal, the only other product that renders and encodes compositions to movies is <a href="http://www.apple.com">Apple</a>&#8217;s own <a href="http://store.apple.com/us/product/D3380Z/A">QuickTime Pro</a>, which doesn&#8217;t support plugins, unsafe patches, or antialiasing.</p>
	<p><a href="http://kineme.net/product/QuartzCrystal"><img style="background: none;" alt="QuartzCrystal Main Window Screenshot" src="http://kineme.net/system/files/QuartzCrystal+Main+Window_1.png" /></a>
</p>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2008/07/30/silicon-dioxide-sio2/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>The Black Apple Strikes!</title>
		<link>http://fdiv.net/2008/07/16/the-black-apple-strikes/</link>
		<comments>http://fdiv.net/2008/07/16/the-black-apple-strikes/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 13:10:26 +0000</pubDate>
		<dc:creator>mradcliffe</dc:creator>
		
	<category>Social Story</category>
	<category>Apple</category>
		<guid>http://fdiv.net/2008/07/16/the-black-apple-strikes/</guid>
		<description><![CDATA[	It took a few minutes for cwright and smokris to realize what was different yesterday. Yes, the days had finally come. I had begun to shave my proverbial neckbeard.  More than year after and much like similar happenings, 7/15/08 is a day that shall live in infamy.
	I have an Apple product once again.  [...]]]></description>
			<content:encoded><![CDATA[	<p><img src="http://img.b33p.net/pub/9n_L7_jCotZ1qVHb871QfRUQwexsq_S0/thumbnail-256" align="right" width="256" height="192" alt="Matt Radcliffe and his Blackbook" />It took a few minutes for <a href="http://perpendiculo.us">cwright</a> and <a href="http://softpixel.com/~smokris">smokris</a> to realize what was different yesterday. Yes, the days had finally come. I had begun to <a href="http://fdiv.net/2007/05/12/project-hayate-prolonging-the-inevitable-part-1/">shave my proverbial neckbeard</a>.  More than year after and much like <a href="http://fdiv.net/2007/04/05/malus-sylvestris-migration-part-1">similar happenings</a>, 7/15/08 is a day that shall live in infamy.</p>
	<p>I have an Apple product once again.  黒林檎（くろりんご、kuroringo）is born! <a id="more-126"></a></p>
	<p>Two weeks ago I committed myself to purchase a macbook to replace my aging <a href="http://fdiv.net/2007/12/11/fail-the-self-replicating-network-connection/">IBM Thinkpad X31</a>.  The X31 had served me well for more then 4 years.  Over the past year I had debated what laptop would best fit my needs.  Although I quite liked the macbook I was put off by the increased weight.  I briefly considered the Macbook Air only to conclude that the decrease battery life was not worth my time.  In the end I decided to eat the weight and possible battery life restrictions of the macbook for the power and ease of <a href="http://apple.com/mac">OS X</a> (not including not being able to print to a Sharp copier).</p>
	<p>In any case after a false start whereupon <a href="http://apple.com">Apple</a> did not have a black macbook in stock despite listing it on their refurbished section. However I checked on 2008.07.09, and a sexy black 2.4ghz core 2 duo macbook was listed. I decided to go with regular shipping hoping it would arrive by the 11th.  Hah! The 15th rolled around, and FedEx delivered the laptop about an hour before my peers would arrive up north.</p>
	<p>So I concocted a devious plan to lure them into a false sense of security. I set this ebony beast of glory onto the port replicator of my X31, propped a Dell 5310n product info. sheet over the back, and then a white piece of paper over the keyboard.</p>
	<p>After a delicious lunch an Pizza Hut we returned. Chris was the first.  He passed right by, sat down, and opened his macbook. I sat down, turned on the power to the hear my blackbook chime for the first time.  Chris mentioned, &#8220;<i>Oh did you change your out-of-sleep sound to that</i>?&#8221; Mission accomplished.</p>
	<p>Steve walked in a little later. At this point I had taken no measures to disguise my macbook. His mind was pre-occupied with other matters, and he missed the white logo in a sea of black directly across from the office door. Over by the refrigerator I said, &#8220;Hey dude check it out&#8230;&#8221;</p>
	<p>After a few moments of shock or disbelief came the inevitable, &#8220;Woah&#8230;&#8221;</p>
	<p>They also missed the list of names that I had jotted down (descriptions added with my thoughts):</p>
	<ul>
	<li>obsidian: sharp, rock, sexy, and black</li>
	<li>fruitbat/okomori/ookoumori: sillier, but black and mobile.</li>
	<li>raven: meh&#8230;</li>
	<li>shikkoku: too phallus-y</li>
	<li>kuroringo: I had thought up kokuringo too with the same meaning, but see above.</li>
	<li>blacksheep: I liked this one along with obsidian.</li>
	<li>kurome: black eyes, meh&#8230;</li>
	</ul>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2008/07/16/the-black-apple-strikes/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Apple Mail Hack: Move Message To Sent Folder</title>
		<link>http://fdiv.net/2008/04/20/apple-mail-hack-move-message-to-sent-folder/</link>
		<comments>http://fdiv.net/2008/04/20/apple-mail-hack-move-message-to-sent-folder/#comments</comments>
		<pubDate>Sun, 20 Apr 2008 14:43:27 +0000</pubDate>
		<dc:creator>smokris</dc:creator>
		
	<category>Apple</category>
	<category>Not Apple</category>
	<category>Software Development</category>
		<guid>http://fdiv.net/2008/04/20/apple-mail-hack-move-message-to-sent-folder/</guid>
		<description><![CDATA[	In the year that has elapsed since I failed to explain why I was using PINE for email, I&#8217;ve switched to Apple Mail.  Don&#8217;t ask.
	Well, it&#8217;s been alright, but much to my regret the improved latency due to keystrokes only traveling around my local machine &#8212; instead of through the interweb and back as [...]]]></description>
			<content:encoded><![CDATA[	<p><img style="background-color: #808080" align="right" src="http://img.b33p.net/pub/bMIYbDwt8DlYjnZCp4wFZ7KxnbSr1o7L" alt="Apple Mail Icon" />In the year that has elapsed since I <a href="http://fdiv.net/2007/05/12/keybindings-in-macosx-terminal-app/">failed to explain</a> why I was using PINE for email, I&#8217;ve switched to <a href="http://www.apple.com/macosx/features/mail.html">Apple Mail</a>.  Don&#8217;t ask.</p>
	<p>Well, it&#8217;s been alright, but much to my regret the improved latency due to keystrokes only traveling around my local machine &#8212; instead of through the interweb and back as was the case with PINE on a remote machine &#8212; makes it almost justifiable.  Almost.<br />
<a id="more-124"></a></p>
	<p>Apple Mail makes it really easy to delete messages.  You just press the &#8220;Delete&#8221; button.  Poof.</p>
	<p>Apple Mail, however, makes it a lot more difficult to SAVE messages.  You have to go to the &#8220;Message&#8221; menu, then select &#8220;Move To&#8221;, then select the mailbox you want to save it in.  Or use the mouse to drag-and-drop it into your mailbox of choice.  But this is not acceptable as using the mouse depletes one&#8217;s indie cred even more than simply using a GUI mail client in the first place.</p>
	<p>So, armed with <a href="http://www.bazza.com/~eaganj/weblog/2008/02/16/demystifying-mailapp-plugins-for-leopard/">James Eagan&#8217;s article on writing mailbundles</a> I wrote a hack which adds a menu item, complete with keyboard shortcut, allowing the user to easily and quickly file one or more messages away in the &#8220;Sent&#8221; folder (*).  See here:</p>
	<p><img align="right" src="http://img.b33p.net/pub/9uPTamngrrI4UzA_STkwRLK0tdJ4o0Rn" alt="Move to Sent Menu Screenshot" /></p>
	<p>(*) Since switching to Apple Mail &#8212; and having access to its nifty and swift full-text search capabilities &#8212; I&#8217;ve abandoned the thousand-or-so individual folders in which I used to file things away.  Mail in my Inbox now goes to one of two destinations:  <i>Trash</i>, for spam and automatic notifications and other stuff I have no interest in ever looking at again, or <i>Sent</i>, for anything written by a human and on occasion important things written by computers.</p>
	<p>Download <a href="http://softpixel.com/~smokris/widgets/appleMail/MoveMessageToSentFolder-1.0.zip">MoveMessageToSentFolder-1.0.zip</a>.<br />
Leopard (Mac OS X 10.5) only.</p>
	<p>To install:</p>
	<ul>
	<li>Copy the mailbundle to <code>~/Library/Mail/Bundles</code>.  Create this folder if it doesn&#8217;t already exist.</li>
	<li>Open Terminal and run the following commands to enable mailbundle support:
	<pre>
defaults write com.apple.mail EnableBundles 1
defaults write com.apple.mail BundleCompatibilityVersion 3
</pre>
	</li>
	</ul>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2008/04/20/apple-mail-hack-move-message-to-sent-folder/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Some Crazy MacBook Pro Checkerboard Graphics Corruption / Crash</title>
		<link>http://fdiv.net/2008/02/15/some-crazy-macbook-pro-checkerboard-graphics-corruption-crash/</link>
		<comments>http://fdiv.net/2008/02/15/some-crazy-macbook-pro-checkerboard-graphics-corruption-crash/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 18:34:40 +0000</pubDate>
		<dc:creator>smokris</dc:creator>
		
	<category>Antisocial Story</category>
	<category>Yon Reptile Campaign</category>
	<category>Apple</category>
		<guid>http://fdiv.net/2008/02/15/some-crazy-macbook-pro-checkerboard-graphics-corruption-crash/</guid>
		<description><![CDATA[	Last summer Kosada purchased a MacBook Pro for the president of Yon Reptile Campaign.  It&#8217;s been a great improvement over the old Dell laptop he was formerly using, and, though he was initially worried about whether he&#8217;d be able to grasp the new UI, he seems to have picked it up quickly, and he [...]]]></description>
			<content:encoded><![CDATA[	<p><img align="right" src="http://img.b33p.net/pub/zE14cdTlco08Nid8arNNAJAUuDvmyWl3/thumbnail-256"/>Last summer <a href="http://kosada.com/">Kosada</a> purchased a MacBook Pro for the president of Yon Reptile Campaign.  It&#8217;s been a great improvement over the old Dell laptop he was formerly using, and, though he was initially worried about whether he&#8217;d be able to grasp the new UI, he seems to have picked it up quickly, and he reports that he&#8217;s been loving it.</p>
	<p>But this morning he called me with a rather odd problem:</p>
	<blockquote><p>&#8220;I hooked up my Treo and started syncing it, then walked away for a few minutes.  When I returned, the screen was covered with a bunch of squares, and I can&#8217;t do anything.&#8221;</blockquote>
<a id="more-119"></a></p>
	<p>He took a few photos with his cellphone camera and emailed them to me (click for full-size):<br />
<a target="_new" href="http://img.b33p.net/pub/8l3SZ4dJ8jbUXqjU4jB0O5RnfDph8_bV"><img src="http://img.b33p.net/pub/8l3SZ4dJ8jbUXqjU4jB0O5RnfDph8_bV/thumbnail-256"/></a><a target="_new" href="http://img.b33p.net/pub/bG1i2Tz8SJg39EoEtsm7_48rrHKin1wg"><img src="http://img.b33p.net/pub/bG1i2Tz8SJg39EoEtsm7_48rrHKin1wg/thumbnail-256"/></a><a target="_new" href="http://img.b33p.net/pub/zE14cdTlco08Nid8arNNAJAUuDvmyWl3"><img src="http://img.b33p.net/pub/zE14cdTlco08Nid8arNNAJAUuDvmyWl3/thumbnail-256"/></a></p>
	<p>(You can see bits of the menu-bar scattered around the screen, and it looks like <a href="http://www.markspace.com/missingsync_palmos.php">Missing Sync</a> had launched iPhoto.  Possibly related?)</p>
	<p>I talked him through a few tests.  He was able to see the mouse cursor and move the mouse, but clicking didn&#8217;t cause any apparent response.  He could activate Dashboard &#8212; Dashboard itself looked fine, and the checkerboard showed through in the background.  He then tapped the power button, and the &#8220;Are you sure you want to shut down your computer now?&#8221; dialog appeared, but it was scrambled and the buttons didn&#8217;t work.</p>
	<p>I instructed him to power it off by holding the power button down.  Since rebooting, it&#8217;s been working fine.</p>
	<p><em>*Confused.*</em></p>
	<p>I googled it a bit but wasn&#8217;t able to find any clear reports of this happening to other people.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2008/02/15/some-crazy-macbook-pro-checkerboard-graphics-corruption-crash/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Is Smaller Better?</title>
		<link>http://fdiv.net/2008/02/03/is-smaller-better/</link>
		<comments>http://fdiv.net/2008/02/03/is-smaller-better/#comments</comments>
		<pubDate>Mon, 04 Feb 2008 03:39:07 +0000</pubDate>
		<dc:creator>mradcliffe</dc:creator>
		
	<category>Social Story</category>
	<category>Antisocial Story</category>
	<category>Apple</category>
	<category>Not Apple</category>
		<guid>http://fdiv.net/2008/02/03/is-smaller-better/</guid>
		<description><![CDATA[	
	In the past couple of months I thought about spending some money on either a Nintendo Wii or a multi-purpose media box (not to mention my anxiety over buying an unmodifiable blackbook).  Over the past 3 years I&#8217;ve looked at smaller cases as &#8220;better&#8221;.  Before that it was always the full tower case [...]]]></description>
			<content:encoded><![CDATA[	<div style="float: right; padding: 5px;"><img src="http://softpixel.com/~mradcliffe/images/epia_ex.png" border="0" alt="Epia EX small"/></div>
	<p>In the past couple of months I thought about spending some money on either a <a href="http://wii.nintendo.com">Nintendo Wii</a> or a multi-purpose media box (not to mention my anxiety over buying an unmodifiable <a href="http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore.woa/wa/RSLID?ncto=MacBook&#038;aa=6E1BC8D9&#038;mco=6E1BC8D9">blackbook</a>).  Over the past 3 years I&#8217;ve looked at smaller cases as &#8220;better&#8221;.  Before that it was always the full tower case that provided more room and ease-of-use.  In this vein I&#8217;ve been looking at the world of <a href="http://en.wikipedia.org/wiki/Mini_itx">mini-itx</a> for the past several months.</p>
	<p>VIA created the mini-itx specification for itself, but since its creation other companies started creating motherboards with this spec and recently so has <a href="http://www.intel.com">Intel</a>.  The spec allows for a low-power consumption CPU, which is great for point-of-sales machines, thin clients, and more.  The other use of mini-itx, popular amongst personal users, is as a <a href="http://en.wikipedia.org/wiki/Htpc">Home Theater PC</a> (HTPC) or media center.</p>
	<p><a id="more-116"></a></p>
	<div style="float: left; padding: 5px;"><img src="http://softpixel.com/~mradcliffe/images/xbmc.png"/></div>
	<p>There are several solutions available in this market.  By far the most popular media box in the past few years has been a Microsoft product, the <a href="http://www.xbox.com">XBox</a>.  You can slap on an open source GPL media player onto the xbox - <a href="http://www.xboxmediacenter.com">XBox Media Center</a> (XBMC).  This was great as a video, audio, and game machine for dvds, mpeg4 (xvid), and various audio formats.</p>
	<div style="float: right; padding: 5px;"><img src="http://softpixel.com/~mradcliffe/images/appletv.png"/></div>
	<p>Alternatively <a href="http://www.apple.com">Apple</a> sells the <a href="http://www.apple.com/appletv/">Apple TV</a>, which not only plays movies, but can connect to your shared ITunes library.  However as with many things Apple (and not-Apple) it has limited uses even with the <a href="http://www.engadget.com/2007/03/23/apple-tv-reportedly-hacked-for-xvid-support/">hack</a> to allow xvid and DivX support.  <i>Author&#8217;s Note: I first wrote this before Mac World Expo January 2008.</i></p>
	<p>The two products mentioned above are limited by their age.  Both are not powerful enough to decode h.264 matroska encapsulated video or HDMI video input.  This is the problem.  Would I be able to build a mini-itx machine capable of doing what these once-awesome products do not?  My requirement was pretty simple.  I&#8217;ve dealt with TV Tuners and HDTV before, and I&#8217;m not interested in building a true &#8220;HTPC&#8221; or personal video recorder (PVR).  That ship has sailed.  Not to mention all the hullaboo about DRM in bluray/hd-dvd, hd capable monitors, video cards, etc&#8230;</p>
	<p>After investigating hardware articles and reviews of the boards on <a href="http://www.mini-itx.com">mini-itx.com</a> I narrowed down my search to the <a href="http://www.via.com.tw/en/products/mainboards/motherboards.jsp?motherboard_id=450">VIA Epia EX 15000G</a>.  This newer board offered a &#8220;fast&#8221; 1.8ghz VIA C7 processor.  A PCI slot would take care of a wireless card as I wouldn&#8217;t be dragging cat5 down from the router upstairs to the TV.  It seemed to offer everything that I was looking for.  It even had an on-board graphics chip with a mpeg2/mpeg4 hardware decoder though underpowered in 3d acceleration!</p>
	<p>The VIA Epia boards are also highly compatible in linux so that&#8217;s a plus.  I delved deeper.  I wanted to make sure that this board would suffice.  After all I&#8217;ve never touched a processor other than AMD or Intel.</p>
	<p>However I&#8217;m afraid to say that the Unichrome Pro II mpeg2/mpeg4 hardware decoder is not usable at the current time.  There have been <a href="http://forums.viaarena.com/messageview.aspx?catid=32&#038;threadid=77918&#038;highlight_key=y&#038;keyword1=h.264">numerous</a> <a href="http://forums.viaarena.com/messageview.aspx?catid=32&#038;threadid=69894&#038;highlight_key=y&#038;keyword1=h264">complaints</a> that hardware decoding doesn&#8217;t work for .mkv files and even in Windows!  Surprisingly the only h.264 playback possible was in <a href="http://www.kernel.org">linux</a> with the now seemingly defunct <a href="http://sourceforge.net/projects/vemp">Via enhanced MPlayer</a>.</p>
	<p>This was the nail in the coffin.  I&#8217;m not going to buy a board because it *may* work in linux with the supposed mpeg4 hw decoding support (and not at all in Windows).  What does this leave us with?  Software decoding?  The C7 processor is not powerful enough to decode 720p let alone 1080p content.</p>
	<p>The cost of this machine and project will significantly increase switching from a mini-itx C7 processor board to perhaps an intel mini-itx core 2 duo mobile board or switch to micro-atx (about $150-$200 increase in budget with a core 2 duo mobile or desktop).</p>
	<p>The smallest really isn&#8217;t better.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2008/02/03/is-smaller-better/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Mac OS Xodus</title>
		<link>http://fdiv.net/2007/12/27/mac-os-xodus/</link>
		<comments>http://fdiv.net/2007/12/27/mac-os-xodus/#comments</comments>
		<pubDate>Thu, 27 Dec 2007 15:50:13 +0000</pubDate>
		<dc:creator>cwright</dc:creator>
		
	<category>Social Story</category>
	<category>Apple</category>
		<guid>http://fdiv.net/2007/12/27/mac-os-xodus/</guid>
		<description><![CDATA[	(First, yes I do realize the &#8216;X&#8217; in &#8216;OS X&#8217; is pronounced &#8220;ten&#8221; not &#8220;ecks.&#8221;  I simply like the portmanteau.)
	With the release of Leopard, I discovered the need to migrate my existing Tiger system onto an external drive.  I needed it to be bootable, and I wanted to have a little discontinuity as [...]]]></description>
			<content:encoded><![CDATA[	<p><img src="http://img.b33p.net/pub/dvRi9P44hDYzijx82Phrp-MkV4z_UMHk/thumbnail-256" align="right" /><em>(First, yes I do realize the &#8216;X&#8217; in &#8216;OS X&#8217; is pronounced &#8220;ten&#8221; not &#8220;ecks.&#8221;  I simply like the portmanteau.)</em></p>
	<p>With the release of Leopard, I discovered the need to migrate my existing Tiger system onto an external drive.  I needed it to be bootable, and I wanted to have a little discontinuity as possible.  Apple generally makes this pretty easy, but it&#8217;s still a bit involved.  I write this article from my migrated system, currently booting Tiger off of a USB drive.<a id="more-112"></a></p>
	<p>The mechanical process of getting an installation working on a USB drive is fairly well-documented by now.  I&#8217;ve had much success following Evgeny Myatin&#8217;s tutorial, found <a href="http://www.digit-life.com/articles2/td/mac-flash.html">here</a>.  However, like many similar articles, it has one major weakness:  It attacks the problem with the assumption that you&#8217;re trying to squeeze OS X on to some microscopic medium.  Because of this, it skips many steps to produce a full-featured system when such a constraint is not in effect.  Since I chose a 250GB harddrive as my target, I had no such enforced limit.</p>
	<p>After following the above directions, here&#8217;s a list of things I did to flesh out my system to get it back to normal.</p>
	<p>0.  Before anything, I copied my internal drive&#8217;s <code>/Applications</code> folder to my new bootable one.  This filled in most of the applications that I need.  It also filled in <code>/Applications/Utilities</code>, which comes in handy in short order.</p>
	<p>1.  SystemUIServer crashed incessantly for some reason right after installation.  This meant no clock, no spotlight, and no networking (setting it in System Preferences didn&#8217;t work).  It also meant no Menu Meters and no Synergy.  Using <code>Console.app</code> (from <code>/Applications/Utilities</code>), I was able to find that dyld was having problems finding a symbol in <code>/System/Library/PrivateFrameworks/ICANotifications.framework</code>.  I don&#8217;t recommend tinkering with stuff in System too often, but the fix here was pretty simple:  copy my old framework into the new place.  Actually, I just copied the file inside the framework, but I imagine copying the whole thing is cleaner.  This immediately (literally) stopped the crashing without a reboot.  The clock and spotlight popped into place, as did the airport icon, the battery icon, and the bluetooth icon.  Nice</p>
	<p>2.  I installed the Developer tools from the Mac OS X install DVD.  I don&#8217;t trust simply copying <code>/Developer</code>, since that&#8217;s only part of the package.</p>
	<p>3.  I booted into my old installation again, and copied <code>/Users/cwright/</code> to the new installation.  I suspected that this would cause unimaginable problems, but it actually didn&#8217;t.  I took a long time (it&#8217;s over 25GB), but everything appears to be undisturbed.  iTunes worked without a blink, as did Firefox, Xcode, Adium, and other frequently used programs.  Menu Meters and Growl even worked without reinstalling them.  This still impresses me, honestly, especially after doing user migrations on Windows 2000/XP earlier this year.</p>
	<p>4.  With my new settings in place, I noticed that I had no desktop background.  Copy <code>/Library/Desktop Pictures/</code> to restore them</p>
	<p>5.  No screen savers either.  Copy <code>/System/Library/Screen Savers/</code></p>
	<p>6. Fink had a hard time installing.  Apparently <code>/usr/bin</code> was pretty sparse.  Copied that (this is extremely dangerous.  At first, I just copied programs that weren&#8217;t present, but I got tired of that after a while).</p>
	<p>7. <code>/usr/share/misc/</code> was missing some programs too (showing up in console).  Copied the absent utilities.</p>
	<p>After the above tweaks, everything seems to be working fine.  There&#8217;s probably a more official way to get this (and any other missing parts) put in place by default, but this can help in a pinch.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2007/12/27/mac-os-xodus/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Zero Grams of Trans Fat Binaries</title>
		<link>http://fdiv.net/2007/12/19/zero-grams-of-trans-fat-binaries/</link>
		<comments>http://fdiv.net/2007/12/19/zero-grams-of-trans-fat-binaries/#comments</comments>
		<pubDate>Wed, 19 Dec 2007 05:36:15 +0000</pubDate>
		<dc:creator>cwright</dc:creator>
		
	<category>Antisocial Story</category>
	<category>Apple</category>
	<category>Not Apple</category>
	<category>Software Development</category>
	<category>Kosada</category>
		<guid>http://fdiv.net/2007/12/19/zero-grams-of-trans-fat-binaries/</guid>
		<description><![CDATA[	People like their applications to work.  Even better, they like them to work, even when things change.  For the WinTel world, this isn&#8217;t a big deal (Vista aside ;), because the underlying CPU architecture hasn&#8217;t really changed, from a program&#8217;s point of view, in the past two decades.  Unless you have a [...]]]></description>
			<content:encoded><![CDATA[	<p><img align="right" src="http://img.b33p.net/pub/ywiHvPcTv8ZWhWv6nf-AHhne2GUlkx99/png-indexed-64" alt="tons of xcode build targets" />People like their applications to work.  Even better, they like them to work, even when things change.  For the WinTel world, this isn&#8217;t a big deal (Vista aside ;), because the underlying CPU architecture hasn&#8217;t really changed, from a program&#8217;s point of view, in the past two decades.  Unless you have a weird program that&#8217;s designed for AMD&#8217;s 3DNow! instruction set and you switch to an Intel CPU, or perhaps an application designed for a more esoteric old SIMD architecture, your application should run just fine (as long as your Operating System is ok with it).</p>
	<p>Mac OS X doesn&#8217;t have the luxury of working on the same underlying CPU though, so things need to be handled a little bit differently.  The solution Apple came up with was <a id="more-115"></a>the idea of a &#8220;Fat&#8221; binary, sometimes called a &#8220;Universal Binary&#8221;.  In other words, instead of a single program being contained in a program file, the program file can contain several programs for different architectures.  For example:</p>
	<pre class="code">
cwright@phendrana:~>file /bin/ls
/bin/ls: Mach-O universal binary with 2 architectures
/bin/ls (for architecture i386):	Mach-O executable i386
/bin/ls (for architecture ppc7400):	Mach-O executable ppc
</pre>
	<p>or an even more convoluted example:</p>
	<pre class="code">
cwright@phendrana:~>file GLTools
GLTools: Mach-O universal binary with 4 architectures
GLTools (for architecture ppc7400):	Mach-O bundle ppc
GLTools (for architecture i386):	Mach-O bundle i386
GLTools (for architecture ppc64):	Mach-O 64-bit bundle ppc64
GLTools (for architecture x86_64):	Mach-O 64-bit bundle x86_64
</pre>
	<p>This increases file size considerably (4x in the last example), but it provides you with the cool side effect of being able to drop the exact same program onto a PowerPC Mac, and have it operate identically &#8212; as long as you&#8217;re properly handling architectural differences such as <a href="http://en.wikipedia.org/wiki/Endianness">endianness</a>.  Overall, this is a pretty slick solution, and with the exception of a few small tweaks, I doubt I could have come up with a better idea.  (The small tweaks, in case you&#8217;re wondering, would be shared data segments across the binaries inside, such that non-code stuff only needs to be included once, instead of 4 times.  This doesn&#8217;t work well when the data contains code though, so you&#8217;d need to have flags to control how it operates).</p>
	<p>One of many problems rears its ugly head though when developing such portable applications:  Linking with static and dynamic libraries.</p>
	<p>Out of the box, OS X ships with many libraries that are all appropriately compiled to support all the above architectures, so you never notice this problem when compiling against standard included libraries.  However, if you stray off the beaten path, and use another library, you&#8217;re destined for trouble.  Open Source libraries, especially the ones whose build system depends on the monstrosity that is <a href="http://en.wikipedia.org/wiki/Autoconf">AutoConf</a> (<code>./configure</code> scripts and all that), are surprisingly difficult to get working.  In part, because they&#8217;re not designed to be built for multiple architectures in parallel, and in part because AutoConf is infuriatingly worthless when it comes to documentation.</p>
	<p>Of course, since I&#8217;m writing all of this, I&#8217;m obviously in the middle of such a battle :)</p>
	<p>By default, I run configure like this: </p>
	<pre class="code">
CFLAGS=\"-Os -fomit-frame-pointer\" ./configure [options]
</pre>
	<p>where options is stuff like <code>--enable-shared</code> and other library stuff.  On occasion (only 85% of the time), I also have to override other environment variables because parts like <code>pkg-config</code> don&#8217;t work, because other libraries don&#8217;t install properly, and a whole host of other problems.  I really can&#8217;t believe I actually <i>liked</i> dealing with this crap when I used linux&#8230;  but I digress.</p>
	<p>So first off, I think &#8220;Hey, I can add some magic to the CFLAGS parameter, and it&#8217;ll just compile!&#8221; &#8230; hahaha &#8230; I wish.  Here&#8217;s what happens:</p>
	<pre class="code">
cwright@phendrana:~/Desktop/Recent Source Stuff/libSomeLib-X.Y.Z>CFLAGS=\"-Os -fomit-frame-pointer -arch i386 -arch ppc -arch x86_64 -arch ppc64\" ./configure --enable-shared
</pre>
	<p>Configure does its thing, and then says it&#8217;s done and you&#8217;re ready to build.  It&#8217;s lying, of course:</p>
	<pre class="code">
cwright@phendrana:~/Desktop/Recent Source Stuff/libSomeLib-X.Y.Z>make
make  all-recursive
Making all in libSomeLib
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I..    -Os -fomit-frame-pointer -arch i386 -arch ppc -arch x86_64 -arch ppc64 -MT io.lo -MD -MP -MF .deps/io.Tpo -c -o io.lo io.c
 gcc -DHAVE_CONFIG_H -I. -I.. -I.. -Os -fomit-frame-pointer -arch i386 -arch ppc -arch x86_64 -arch ppc64 -MT io.lo -MD -MP -MF .deps/io.Tpo -c io.c  -fno-common -DPIC -o .libs/io.o
gcc-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
make[2]: *** [io.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
</pre>
	<p>So, -M options aren&#8217;t allowed to have multiple arch flags, says gcc.  I do some spelunking to find out exactly what these flags do, and find that they&#8217;re for creating Makefile dependencies.  But wait a minute, isn&#8217;t that Configure&#8217;s job?  Man these build tools are awesome. &#8230;  (technically speaking, it <i>is</i> Make&#8217;s job to make this stuff.  There just isn&#8217;t a hook to add architecture support anywhere else without completely re-engineering the build system.)</p>
	<p>Next up, I read some Apple documentation to see how they go about doing it (for stuff like OpenSSL, etc.).  They recommend making a new XCode project, and then making a <a href="http://developer.apple.com/opensource/images/AllTargets.cropped.jpg">zillion build targets</a>, taped together with some <a href="http://developer.apple.com/opensource/images/BuildPPCScript.cropped.jpg">shell scripts</a>.  To be honest, it doesn&#8217;t seem very Apple-like.  If I&#8217;m going to be dealing with shell scripts, I&#8217;ll just do it myself in Terminal.</p>
	<p>The second attempt consists of duplicating the source tree into 4 directories, one for each architecture.  Then, my plan goes, I&#8217;ll use <code>lipo</code> to glue them all together into a fat binary, and I&#8217;ll be on my way.</p>
	<p>I run configure in each directory tree, careful to include only one <code>-arch</code> parameter in each one.  I issue make in the i386, ppc, and x86_64 trees without issue, and start to think a bit smugly to myself that I&#8217;ve defeated this silly monster.  But then, another Configure Dragon charges.</p>
	<pre class="code">
cwright@phendrana:~/Desktop/Recent Source Stuff/libSomeLib-X.Y.Z-ppc64>CFLAGS=\"-Os -fomit-frame-pointer -arch ppc64\" ./configure --enable-shared
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/bin/sh: /Users/cwright/Desktop/Recent: No such file or directory
configure: WARNING: `missing' script is too old or missing
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
</pre>
	<p>Of course, whenever configure tells you to check &#8220;config.log&#8221; for more details, it&#8217;s about as informative as reading a <a href="http://www.thecybersource.com/images/bsod.jpg">Blue Screen</a>.  Also, note the 4th or 5th line, which shows a lack of quoted paths.  That looks safe&#8230;</p>
	<p>The problem, according to configure, is that it &#8220;cannot run C compiled programs,&#8221; which is actually accurate for this case:  Rosette doesn&#8217;t translate ppc64 binaries to x86.  However, gcc can compile such programs, so we know we can do it.  Configure suggests using the &#8220;-<nop />-host&#8221; command.</p>
	<p>Running configure with -<nop />-help reveals how -<nop />-host is supposed to be used.  It&#8217;ll look like this, I suppose:  &#8220;-<nop />-host=ppc64&#8243;.</p>
	<p>It issues this warning, but continues to do its thing:</p>
	<pre class="code">
configure: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org.
</pre>
	<p>I hope that&#8217;s ok.. ?</p>
	<p>I run make, and it builds, and finishes.  A bit earlier than the others.  In the .libs directory, there&#8217;s no .dylib, which is what &#8211;enable-shared is supposed to create.  So, I look at the output from previous builds, and copy the line it inexplicably skips.  It&#8217;s a pretty long, but simple gcc line that takes all the .o&#8217;s and makes them into a .dylib.  No idea why it skipped over that one&#8230;</p>
	<p>And at last, we&#8217;re able to build our fat binary using lipo.  Hurray for portable cross-platform build tools!
</p>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2007/12/19/zero-grams-of-trans-fat-binaries/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>iPhoto-Thunderbird Bridge</title>
		<link>http://fdiv.net/2007/08/22/iphoto-thunderbird-bridge/</link>
		<comments>http://fdiv.net/2007/08/22/iphoto-thunderbird-bridge/#comments</comments>
		<pubDate>Wed, 22 Aug 2007 11:59:11 +0000</pubDate>
		<dc:creator>cwright</dc:creator>
		
	<category>softpixel</category>
	<category>Apple</category>
	<category>Not Apple</category>
	<category>Software Development</category>
	<category>Photography</category>
	<category>Kosada</category>
		<guid>http://fdiv.net/2007/08/22/iphoto-thunderbird-bridge/</guid>
		<description><![CDATA[	For years, iPhoto users have been stuck using a limited number of email clients to send their photos easily.  This was mostly remedied by the iPhoto Mailer Patcher, but it left out non-applescript aware applications because, after all, iPhoto uses applescript to interface with them.  One of the more notable omissions is Thunderbird.
	Finally, [...]]]></description>
			<content:encoded><![CDATA[	<p><img align="right" alt="iPhoto logo" src="http://img.b33p.net/pub/HK0-oPRuL9-u_9Wz5KxycaakqUdEXdfI" />For years, iPhoto users have been stuck using a limited number of email clients to send their photos easily.  This was mostly remedied by the <a href="http://homepage.mac.com/jacksim/software/imp403.html">iPhoto Mailer Patcher</a>, but it left out non-applescript aware applications because, after all, iPhoto uses applescript to interface with them.  One of the more notable omissions is Thunderbird.</p>
	<p>Finally, this void has also been filled, via the <a href="http://softpixel.com/~cwright/programming/iPhoto/">iPhoto Thunderbird Bridge</a>.  It&#8217;s still quite primitive, but all the basics are there for iPhoto-Thunderbird integration.</p>
	<p>If you&#8217;re an iPhoto/Thunderbird user, give it a whirl.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2007/08/22/iphoto-thunderbird-bridge/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Leaky NSSpeechSynthesizer</title>
		<link>http://fdiv.net/2007/07/23/leaky-nsspeechsynthesizer/</link>
		<comments>http://fdiv.net/2007/07/23/leaky-nsspeechsynthesizer/#comments</comments>
		<pubDate>Mon, 23 Jul 2007 22:34:24 +0000</pubDate>
		<dc:creator>cwright</dc:creator>
		
	<category>Antisocial Story</category>
	<category>Apple</category>
	<category>Not Apple</category>
	<category>Software Development</category>
		<guid>http://fdiv.net/2007/07/23/leaky-nsspeechsynthesizer/</guid>
		<description><![CDATA[	NSSpeechSynthesizer, the Cocoa class responsible for giving applications a voice under OS X, is leaky.  Creating and destroying thousands of instances of this class slowly consumes all the available memory in a system, leading to degrading performance and eventual application instability.
	The disappointing part is that this bug was first noticed almost two years ago. [...]]]></description>
			<content:encoded><![CDATA[	<p>NSSpeechSynthesizer, the Cocoa class responsible for giving applications a voice under OS X, is leaky.  Creating and destroying thousands of instances of this class slowly consumes all the available memory in a system, leading to degrading performance and eventual application instability.</p>
	<p>The disappointing part is that this bug was <a href="http://www.cocoabuilder.com/archive/message/cocoa/2005/12/20/152921">first noticed</a> almost two years ago.  <a id="more-106"></a>While the extent isn&#8217;t nearly as bad, it&#8217;s still not clean.</p>
	<p>This bug came up in our Speech Synthesizer patch for Quartz Composer, featured at <a href="http://kineme.net/QuartzComposerPatches/SpeechSynthesisPatch">kineme</a>.  After much testing, profiling, and refactoring, a splendidly small demonstration program emerged.</p>
	<pre class="code">
#import &lt;Cocoa/Cocoa.h&gt;
	
int main()
{
        while(1)
        {
                NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
                NSSpeechSynthesizer *speech = [[NSSpeechSynthesizer alloc] init];
                [speech release];
                [pool release];
        }
	
        return 0;
}
</pre>
	<p>This program endlessly allocates an NSAutoreleasePool, used for memory management,  and then an NSSpeechSynthesizer object.  After creating them, it destroys them.  Destroying the synthesizer object should free any associated memory with the object, and releasing the pool should free up any odds and ends left over, just in case.</p>
	<p>Reality paints a much more disappointing picture:</p>
	<pre class="code">cwright@phendrana:~/projects/SpeechTest>./rapid
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Segmentation fault
</pre>
	<p>It starts off looking ok.  It spins for about 15 seconds or so, but then trouble strikes.  As you an see, the class starts to have difficulty mapping a voice file (this is only mentioned once in all of Google&#8217;s wisdom, with no useful insight as to what it means), and eventually the inevitable crash occurs.</p>
	<p>smokris tried this on his MacBook Pro..  Same thing there:</p>
	<pre class="code">
smokris@etu 6 ~/Desktop -> time ./a.out
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Speech Synthesis can't map voice file (12)
Segmentation fault
	
real    0m4.479s
user    0m0.286s
sys     0m0.153s
</pre>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2007/07/23/leaky-nsspeechsynthesizer/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>NSURLConnection&#8217;s sendSynchronousRequest enforces minimum 30 second timeout?</title>
		<link>http://fdiv.net/2007/07/10/nsurlconnection-sendsynchronousrequest-enforces-minimum-30-second-timeout/</link>
		<comments>http://fdiv.net/2007/07/10/nsurlconnection-sendsynchronousrequest-enforces-minimum-30-second-timeout/#comments</comments>
		<pubDate>Tue, 10 Jul 2007 21:47:58 +0000</pubDate>
		<dc:creator>smokris</dc:creator>
		
	<category>Apple</category>
	<category>Software Development</category>
		<guid>http://fdiv.net/2007/07/10/nsurlconnection-sendsynchronousrequest-enforces-minimum-30-second-timeout/</guid>
		<description><![CDATA[	While writing the new Image Downloader (Blocking) QC patch for CoreMelt, I ran into what appears to be a bug in Mac OS X&#8217;s NSURLConnection framework &#8212;  if you construct an NSURLRequest and specify a timeout of less than 30 seconds, it&#8217;s ignored when you perform a [NSURLConnection sendSynchronousRequest:returningResponse:error:].  The request takes at [...]]]></description>
			<content:encoded><![CDATA[	<p>While writing the new <a href="http://kineme.net/QuartzComposerPatches/ImageDownloaderBlockingPatch">Image Downloader (Blocking) QC patch</a> for <a href="http://coremelt.com/">CoreMelt</a>, I ran into what appears to be a bug in Mac OS X&#8217;s NSURLConnection framework &#8212;  if you construct an NSURLRequest and specify a timeout of less than 30 seconds, it&#8217;s ignored when you perform a <code>[NSURLConnection sendSynchronousRequest:returningResponse:error:]</code>.  The request takes at least 30 seconds to time out, contrary to what the documentation suggests..</p>
	<p>Steps to Reproduce:<a id="more-105"></a></p>
	<ol>
	<li>Construct an NSURL with an http-based url pointing to a server that is currently offline.</li>
	<li>Execute the following code block:<br />
	<pre class="code">
NSLog(@&quot;begin&quot;);
NSURLRequest *request=[NSURLRequest
    requestWithURL:url
    cachePolicy:NSURLRequestReloadIgnoringCacheData
    timeoutInterval:5.0];
NSData *data=[NSURLConnection
    sendSynchronousRequest:request
    returningResponse:&#038;response
    error:&#038;error];
NSLog(@&quot;end&quot;);</pre>
</li>
	<li>Compare the timestamps of &#8220;begin&#8221; and &#8220;end&#8221;.  though they should presumably differ by 5 seconds, they actually differ by exactly 30 seconds.</li>
	</ol>
	<p>Any ideas?
</p>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/2007/07/10/nsurlconnection-sendsynchronousrequest-enforces-minimum-30-second-timeout/feed/</wfw:commentRSS>
	</item>
	</channel>
</rss>
