<?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>srsly &#187; mac os x</title>
	<atom:link href="http://srsly.me/tag/mac-os-x/feed/" rel="self" type="application/rss+xml" />
	<link>http://srsly.me</link>
	<description></description>
	<lastBuildDate>Thu, 27 May 2010 02:37:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Why did Apple drop ZFS?</title>
		<link>http://srsly.me/2009/09/09/why-did-apple-drop-zfs/</link>
		<comments>http://srsly.me/2009/09/09/why-did-apple-drop-zfs/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 06:59:46 +0000</pubDate>
		<dc:creator>Joseph Jaramillo</dc:creator>
				<category><![CDATA[Linked List]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[snow leopard]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://srsly.me/?p=381</guid>
		<description><![CDATA[Good stuff:
&#8220;The ZFS team has produced a game-changing file system/volume manager. The chance to get it into the hands of 10s of millions of Mac users – and to influence Redmond’s file system strategy – seem to this outsider an opportunity of a lifetime.
If the ZFS engineering team opposed this – and I’d love to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://storagemojo.com/2009/08/31/why-did-apple-drop-zfs/">Good stuff</a>:</p>
<blockquote><p>&#8220;The ZFS team has produced a game-changing file system/volume manager. The chance to get it into the hands of 10s of millions of Mac users – and to influence Redmond’s file system strategy – seem to this outsider an opportunity of a lifetime.</p>
<p>If the ZFS engineering team opposed this – and I’d love to hear their take – I encourage them to reconsider. Marketers often ask the question &#8216;would you prefer 100% of nothing or 40% of something huge?&#8217;&#8221;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://srsly.me/2009/09/09/why-did-apple-drop-zfs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>memcached on Mac OS X 10.5 Leopard</title>
		<link>http://srsly.me/2009/03/10/memcached-on-mac-os-x-10-5-leopard/</link>
		<comments>http://srsly.me/2009/03/10/memcached-on-mac-os-x-10-5-leopard/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 03:41:41 +0000</pubDate>
		<dc:creator>Joseph Jaramillo</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[memcached]]></category>

		<guid isPermaLink="false">http://srsly.me/?p=140</guid>
		<description><![CDATA[I attempted to install memcached via MacPorts earlier today, and ran into a problem with the MD5 and SHA1 hashes.
$ sudo port install memcached
--&#62;  Fetching memcached
---&#62;  Attempting to fetch memcached-1.2.6.tar.gz from http://www.danga.com/memcached/dist/
---&#62;  Verifying checksum(s) for memcached
Error: Checksum (md5) mismatch for memcached-1.2.6.tar.gz
Error: Checksum (sha1) mismatch for memcached-1.2.6.tar.gz
Error: Target org.macports.checksum returned: Unable to verify [...]]]></description>
			<content:encoded><![CDATA[<p>I attempted to install <a href="http://www.danga.com/memcached/" target="_blank">memcached</a> via MacPorts earlier today, and ran into a problem with the MD5 and SHA1 hashes.</p>
<pre class="brush: plain">$ sudo port install memcached
--&gt;  Fetching memcached
---&gt;  Attempting to fetch memcached-1.2.6.tar.gz from http://www.danga.com/memcached/dist/
---&gt;  Verifying checksum(s) for memcached
Error: Checksum (md5) mismatch for memcached-1.2.6.tar.gz
Error: Checksum (sha1) mismatch for memcached-1.2.6.tar.gz
Error: Target org.macports.checksum returned: Unable to verify file checksums
Error: Status 1 encountered during processing.</pre>
<p>After pulling down the file directly from the memcached web site, I discovered that tar wouldn&#8217;t extract it.</p>
<pre class="brush: plain">$ tar zxvf memcached-1.2.6.tar.gz

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors</pre>
<p>No matter; we&#8217;ll do it the hard way.  These are the steps I followed to install memcached on my Mac.  The only assumptions I&#8217;m consciously making are that you use MacPorts and git.</p>
<p>1.  Install libevent through MacPorts:</p>
<pre class="brush: plain">$ sudo port install libevent</pre>
<p>2.  Clone the memcached git repository:</p>
<pre class="brush: plain">$ git clone http://consoleninja.net/code/memcached/memcached.git/</pre>
<p>3. Configure memcached:</p>
<pre class="brush: plain">$ cd memcached
$ ./autogen.sh
$ ./configure --prefix=/usr/local --with-libevent=/opt/local</pre>
<p>4.  Make and install:</p>
<pre class="brush: plain">$ make
$ sudo make install</pre>
<p>If everything went according to plan, you&#8217;re good to go.  Start it up:</p>
<pre class="brush: plain">$ memcached -vv</pre>
<p>That last line starts up a memcached server running on the default port 11211.  The -vv option tells memcached to use its most verbose output.  You should have seen output similar to the following:</p>
<pre class="brush: plain">slab class   1: chunk size     88 perslab 11915
slab class   2: chunk size    112 perslab  9362
slab class   3: chunk size    144 perslab  7281
slab class   4: chunk size    184 perslab  5698
slab class   5: chunk size    232 perslab  4519
slab class   6: chunk size    296 perslab  3542
slab class   7: chunk size    376 perslab  2788
slab class   8: chunk size    472 perslab  2221
slab class   9: chunk size    592 perslab  1771
slab class  10: chunk size    744 perslab  1409
slab class  11: chunk size    936 perslab  1120
slab class  12: chunk size   1176 perslab   891
slab class  13: chunk size   1472 perslab   712
slab class  14: chunk size   1840 perslab   569
slab class  15: chunk size   2304 perslab   455
slab class  16: chunk size   2880 perslab   364
slab class  17: chunk size   3600 perslab   291
slab class  18: chunk size   4504 perslab   232
slab class  19: chunk size   5632 perslab   186
slab class  20: chunk size   7040 perslab   148
slab class  21: chunk size   8800 perslab   119
slab class  22: chunk size  11000 perslab    95
slab class  23: chunk size  13752 perslab    76
slab class  24: chunk size  17192 perslab    60
slab class  25: chunk size  21496 perslab    48
slab class  26: chunk size  26872 perslab    39
slab class  27: chunk size  33592 perslab    31
slab class  28: chunk size  41992 perslab    24
slab class  29: chunk size  52496 perslab    19
slab class  30: chunk size  65624 perslab    15
slab class  31: chunk size  82032 perslab    12
slab class  32: chunk size 102544 perslab    10
slab class  33: chunk size 128184 perslab     8
slab class  34: chunk size 160232 perslab     6
slab class  35: chunk size 200296 perslab     5
slab class  36: chunk size 250376 perslab     4
slab class  37: chunk size 312976 perslab     3
slab class  38: chunk size 391224 perslab     2
slab class  39: chunk size 489032 perslab     2
&lt;4 server listening
&lt;5 server listening
&lt;6 send buffer was 9216, now 7456540
&lt;6 server listening (udp)</pre>
<p>We can easily test that it&#8217;s working.  Leave memcached running in the Terminal, and open a new tab.  Then telnet in like so:</p>
<pre class="brush: plain">$ telnet 127.0.0.1 11211</pre>
<p>If you see the following, you&#8217;re in:</p>
<pre class="brush: plain">Trying ::1...
Connected to localhost.
Escape character is &#039;^]&#039;.</pre>
<p>If we switch back to memcached, we see:</p>
<pre class="brush: plain">&lt;7 new client connection</pre>
<p>In the future, you can launch memcached with the -d option for it to run as a daemon.  If you&#8217;d like memcached to start up automatically, you can set up a launchd plist for the purpose.  The following is a slightly modified version of this <a href="http://gorn.ch/archive/2008/03/13/start-memcached-with-launchd.html" target="_blank">example</a>:</p>
<pre class="brush: xml">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
&lt;plist version=&quot;1.0&quot;&gt;
&lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;memcached&lt;/string&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;/usr/local/bin/memcached&lt;/string&gt;
        &lt;string&gt;-l&lt;/string&gt;
        &lt;string&gt;127.0.0.1&lt;/string&gt;
        &lt;string&gt;-u&lt;/string&gt;
        &lt;string&gt;nobody&lt;/string&gt;
        &lt;string&gt;-d&lt;/string&gt;
        &lt;string&gt;-m&lt;/string&gt;
        &lt;string&gt;64&lt;/string&gt;
        &lt;string&gt;-p&lt;/string&gt;
        &lt;string&gt;11211&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;RunAtLoad&lt;/key&gt;
    &lt;true/&gt;
    &lt;key&gt;StandardOutPath&lt;/key&gt;
    &lt;string&gt;/dev/null&lt;/string&gt;
    &lt;key&gt;StandardErrorPath&lt;/key&gt;
    &lt;string&gt;/dev/null&lt;/string&gt;
&lt;/dict&gt;
&lt;/plist&gt;</pre>
<p>This file is saved in ~/Library/LaunchAgents/memcached.plist, and will tell Leopard to launch memcached on startup.  It will run as a daemon listening to 127.0.0.1 on port 11211 with a maximum memory size of 64MB.  This is exactly the same as running the following command line:</p>
<pre class="brush: plain">$ memcached -l 127.0.0.1 -u nobody -d -m 64 -p 11211</pre>
]]></content:encoded>
			<wfw:commentRss>http://srsly.me/2009/03/10/memcached-on-mac-os-x-10-5-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
