<?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>Hyperextended Metaphor &#187; osx</title>
	<atom:link href="http://innocuous.org/articles/tag/osx/feed/" rel="self" type="application/rss+xml" />
	<link>http://innocuous.org</link>
	<description>Richard Tibbetts on Various Topics</description>
	<lastBuildDate>Sat, 12 Feb 2011 14:19:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Non-Destructive Process Inspection on OSX: Blog Post Recovery</title>
		<link>http://innocuous.org/articles/2010/08/29/non-destructive-process-inspection-on-osx-blog-post-recovery/</link>
		<comments>http://innocuous.org/articles/2010/08/29/non-destructive-process-inspection-on-osx-blog-post-recovery/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 02:13:28 +0000</pubDate>
		<dc:creator>tibbetts</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://innocuous.org/articles/2010/08/29/non-destructive-process-inspection-on-osx-blog-post-recovery/</guid>
		<description><![CDATA[Moments ago I was writing a different blog post, about home renovation. Unfortunately just as I posted it a bug in ecto, the aging client I still use to edit blog posts, caused the complete loss of the text with no backup copies. Because messing about with system tools is more fun than rewriting that [...]]]></description>
			<content:encoded><![CDATA[<p>Moments ago I was writing a different blog post, about home renovation. Unfortunately just as I posted it a bug in ecto, the aging client I still use to edit blog posts, caused the complete loss of the text with no backup copies. Because messing about with system tools is more fun than rewriting that blog post, I present instead a brief howto for creating a core dump on OSX without killing a process, and inspecting that core dump to attempt to recover your data.</p>
<p>As many of my readers probably already know, a core dump is an image of the contents of a programs memory. Generally core dumps are created when a program fails in a particularly catastrophic way, such as a segmentation fault. Core dumps help programmers find out what lead to the failure. Usually it&#8217;s easy to get a core dump, you just do a <i>kill -11</i> of the process ID, faking a segfault. This takes down the program and writes a core dump.</p>
<p>Unfortunately since core dumps aren&#8217;t useful to non programmers, the environment on OSX by default does not make them, even when there are segmentation faults. One can change this for a given shell or process or login session using the <i>ulimit</i> command or the associated syscalls, but Murphy was with me today and so ecto was not running with such a setting. It is possible to change the setting of a running process by connecting with a debugger like <i>gdb</i> and making the right syscall, but that felt a little risky, since if I messed it up the process would be gone, whether I got a core dump or not.</p>
<p>Instead, let&#8217;s figure out how to not kill the process at all, doing the work of taking the memory snapshot ourselves. This should be possible with modern process inspection APIs. The book you want for this is <a href="http://www.amazon.com/exec/obidos/ASIN/0321278542/innocuousorg-20/ref=nosim/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.amazon.com');">Mac OSX Internals</a>. I have a copy, and was all set to begin some deep <a href="http://en.wiktionary.org/wiki/yak_shaving" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wiktionary.org');">yak shaving</a> figuring all this out. However, the book saw me coming, and already laid out an example in detail, called <a href="http://osxbook.com/book/bonus/chapter8/core/" onclick="javascript:pageTracker._trackPageview('/outbound/article/osxbook.com');">Process Photography</a>.</p>
<p>So, if you want to know a lot more about making your own core dump utility, you can read that post. Or if you are still with me because you just want to know how to recover a blog post, then go there and download <a href="http://osxbook.com/book/bonus/chapter8/core/download/gcore-1.3.tar.gz" onclick="javascript:pageTracker._trackPageview('/outbound/article/osxbook.com');" title="gcore-1.3.tar.gz">gcore-1.3.tar.gz</a> at the end of the post. Untar it and compile your <i>gcore</i> utility. Now you can create a core dump by running <i>gcore -c ecto.core PID</i>. If your experience is like mine, this will generate a 1.3 gigabyte core file, because modern programs are not shy about using memory, virtual and otherwise.</p>
<p>Now, this 1.3 gigabyte core file contains everything from program text and mmaped files to active memory to freed memory that hasn&#8217;t been reused yet. It&#8217;s a vast expanse of stuff you don&#8217;t need, must of it binary. Luckily, most programs will just store textual content as ASCII or UTF8. Assuming you were writing English, then the <i>strings</i> utility will be sufficient to find your text. So you can run <i>strings ecto.core &gt; ecto.strings</i>. This will generate another large file (64 megs this time, not 1.3 gigs) with just the ascii string data from your programs memory. Still a lot to wade through, so I use <i>grep -i</i> to look for uncommon words in my post, and <i>less</i> to be able to page around the file quickly.</p>
<p>I wish that the story had a happy ending, but after all that I found that the ecto memory space contained a dozen copies of my post, but all of them were the truncated version that it had posted on my blog, rather than the actual text I wrote. So you will have to wait until next week (or at least tomorrow) to learn what I had to say about house renovation.</p>
]]></content:encoded>
			<wfw:commentRss>http://innocuous.org/articles/2010/08/29/non-destructive-process-inspection-on-osx-blog-post-recovery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switching to OSX, productivity and development tools</title>
		<link>http://innocuous.org/articles/2007/03/25/switching-to-osx-productivity-and-development-tools/</link>
		<comments>http://innocuous.org/articles/2007/03/25/switching-to-osx-productivity-and-development-tools/#comments</comments>
		<pubDate>Sun, 25 Mar 2007 23:11:02 +0000</pubDate>
		<dc:creator>tibbetts</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://new.innocuous.org/index.php/2007/03/25/switching-to-osx-productivity-and-development-tools/</guid>
		<description><![CDATA[ Two weeks ago I got a new laptop from work. After extensive hemming and hawing, I went with an Apple MacBook (the black one, cause it looks hotter^Wmore professional). Previous to this I had been running Ubuntu on a Thinkpad T40 bought around the founding of StreamBase. My goal for the change was to [...]]]></description>
			<content:encoded><![CDATA[<p> Two weeks ago I got a new laptop from work. After extensive hemming and hawing, I went with an <a href="http://www.apple.com/macbook/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.apple.com');">Apple MacBook</a> (the black one, cause it looks hotter^Wmore professional). Previous to this I had been running Ubuntu on a Thinkpad T40 bought around the founding of StreamBase. My goal for the change was to have a laptop that would &#8220;just work&#8221;, and to stop having to administer my personal machine. I was last on a Mac when I was in grad school.</p>
<p>As far as that goal goes, I think the switch has been a rousing success. In non-development activities (eg, web, email, calendar, documents) it has been a significant improvement. The tools I&#8217;m finding myself using include:</p>
<ul>
<li><a href="http://www.mozilla.com/en-US/firefox/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mozilla.com');">Firefox</a> &#8211; Safari just isn&#8217;t good enough, and on the Intel processor Firefox is plenty fast</li>
<li>Terminal.app &#8211; In preference to X11.app and xterm, because it is better integrated with everything else</li>
<li>Mail.app (aka Apple Mail) &#8211; Because as part of the switch I&#8217;m going to stop hacking my mail client and see how the other 90% of the population lives. Thus far, using a less featureful mail client has been a success for spending less time with email thanks to unsubscribing from things.</li>
<li><a href="http://www.adiumx.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.adiumx.com');">Adium</a> &#8211; This is the best graphical IM client I&#8217;ve ever seen.</li>
<li>iCal &#8211; The Apple calendaring tool is adequate, though I think I may end up switching to something with Exchange support, as work moves in that direction.</li>
<li>iTunes &#8211; Of course, this is a huge improvement over anything on Linux, particularly for synching with my iPod.</li>
<li><a href="http://www.microsoft.com/mac/products/office2004/office2004.aspx?pid=office2004" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.microsoft.com');">Microsoft Office</a> &#8211; I&#8217;d considered other alternatives, but the MacBook came with office preinstalled, and once I had it easily available (instead of in VMware) I couldn&#8217;t say no.</li>
<li><a href="http://www.newsgator.com/NGOLProduct.aspx?ProdID=NetNewsWire" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.newsgator.com');">NetNewsWire Lite </a>- A feed reader that is much better than bloglines. I haven&#8217;t done much with the NewsGator integration, which might be interesting. And I haven&#8217;t seen a reason to buy the non-lite version.</li>
<li><a href="http://www.omnigroup.com/applications/omnigraffle/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.omnigroup.com');">OmniGraffle</a> &#8211; This is the best diagramming program I&#8217;ve ever used. Vastly better than anything on Linux, and much better than Visio.</li>
<li><a href="http://www.parallels.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.parallels.com');">Parallels Desktop</a> &#8211; Much nicer than VMware workstation on Linux. Well polished, and the <a href="http://www.parallels.com/products/coherence/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.parallels.com');">Coherence</a> feature is pretty hot.</li>
<li><a href="http://desktopmanager.berlios.de/" onclick="javascript:pageTracker._trackPageview('/outbound/article/desktopmanager.berlios.de');">Desktop Manager </a>- Free tool to implement virtual desktops. Does everything I want in this space.</li>
<li><a href="http://quicksilver.blacktree.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/quicksilver.blacktree.com');">Quicksilver</a> &#8211; This is basically a graphical commandl ine for the mac, accessible from anywhere. It&#8217;s very nice. Like <a href="http://www.gnu.org/software/screen/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.gnu.org');">screen</a>, you have to try it to learn how much it will change your life.</li>
<li><a href="http://docs.blacktree.com/visor/visor" onclick="javascript:pageTracker._trackPageview('/outbound/article/docs.blacktree.com');">Visor</a> &#8211; This is a cute hack that makes a Terminal only a keystroke away at any time. It&#8217;s a good complement to Quicksilver.</li>
<li><a href="http://www.indev.ca/MailActOn.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.indev.ca');">MailActOn</a> &#8211; This is a little tool that lets you define keybindings in Mail.app, mostly to refile mail into folders with a few keystrokes.</li>
<li><a href="http://macromates.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/macromates.com');">TextMate</a> &#8211; This is trying to replace emacs in my life. It&#8217;s a more mac-oriented text editor, with a pretty good feature set and good support for my emacs finger macros. But I may end up going back to emacs.</li>
<li><a href="http://ecto.kung-foo.tv/" onclick="javascript:pageTracker._trackPageview('/outbound/article/ecto.kung-foo.tv');">Ecto</a> &#8211; This is my latest addition. It&#8217;s a blogging client that I&#8217;m using to write this post. I&#8217;m not sure I&#8217;m in love with it enough to pay for it, though it is a bit nicer than <a href="http://performancing.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/performancing.com');">Performancing</a>, the Firefox plugin I had been using.</li>
</ul>
<p>That&#8217;s about it for productivity tools. On development tools, I haven&#8217;t had to install very much:</p>
<ul>
<li>Apple developer tools &#8211; This comes on the standard install media, and gets you gcc, autoconf, and all the other things you would expect.</li>
<li><a href="http://www.phil.uu.nl/~xges/ssh/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.phil.uu.nl');">SSH Agent</a> &#8211; This is a version of the standard ssh-agent which integrates with the account management on OSX, so that you can use the agent from any application/shell in your login.</li>
<li><a href="http://homepage.mac.com/hiirem/svkbuilds.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/homepage.mac.com');">SVK and Subversion</a> &#8211; These are special builds for OSX, they seem to work well.</li>
<li><a href="http://www.eclipse.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.eclipse.org');">Eclipse</a> &#8211; Standard Eclipse is available for OSX</li>
<li><a href="http://www.macports.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.macports.org');">MacPorts</a> &#8211; This is a package system for getting various free tools. I currently only use it to get Cocoa Emacs.</li>
</ul>
<p>So, that&#8217;s the enumeration of tools that I am using. Hopefully this is helpful to people. I may follow up on this with other posts about my experiences on OSX.</p>
<p>I will also shortly make a non-tools post.</p>
]]></content:encoded>
			<wfw:commentRss>http://innocuous.org/articles/2007/03/25/switching-to-osx-productivity-and-development-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

