<?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>Something Similar &#187; erlang</title>
	<atom:link href="http://somethingsimilar.com/category/erlang/feed/" rel="self" type="application/rss+xml" />
	<link>http://somethingsimilar.com</link>
	<description>Just like it.</description>
	<lastBuildDate>Tue, 08 Sep 2009 16:30:30 +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>Building CouchDb on Mac OS X</title>
		<link>http://somethingsimilar.com/2007/09/21/building-couchdb-on-mac-os-x/</link>
		<comments>http://somethingsimilar.com/2007/09/21/building-couchdb-on-mac-os-x/#comments</comments>
		<pubDate>Fri, 21 Sep 2007 17:50:00 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.somethingsimilar.com/wordpress/2007/09/21/building-couchdb-on-mac-os-x/</guid>
		<description><![CDATA[I, like Sam, &#42;really&#42; want to play with CouchDb. But I&#8217;m a MacOSX box that I barely understand after 3 months of ownership.  

Install MacPorts and run:

sudo port install erlang icu subversion


Add these two lines to your .bash_profile (or .profile if you&#8217;re running tcsh). 

export ERLANG_BIN_DIR=/opt/local/bin/
export ERLANG_INCLUDE_DIR=/opt/local/lib/erlang/usr/include/


Run those two commands in your current shell [...]]]></description>
			<content:encoded><![CDATA[<p>I, <a href="http://intertwingly.net/blog/2007/09/04/Building-CouchDB">like Sam</a>, &#42;<strong>really</strong>&#42; want to play with <a href="http://couchdb.org/CouchDB/CouchDBWeb.nsf/Home?OpenForm">CouchDb</a>. But I&#8217;m a MacOSX box that I barely understand after 3 months of ownership.  </p>

<p>Install <a href="http://www.macports.org/">MacPorts</a> and run:</p>

<pre><code>sudo port install erlang icu subversion
</code></pre>

<p>Add these two lines to your .bash_profile (or .profile if you&#8217;re running tcsh). </p>

<pre><code>export ERLANG_BIN_DIR=/opt/local/bin/
export ERLANG_INCLUDE_DIR=/opt/local/lib/erlang/usr/include/
</code></pre>

<p>Run those two commands in your current shell or open a new one. Now, back to the install.</p>

<pre><code>cd ~/projects
svn co http://couchdb.googlecode.com/svn/trunk couchdb
./build.sh | tee couchdb_svn_build.log
./build.sh --install=$HOME/sys | tee couchdb_svn_install.log
mv couchdb_svn_*.log ~/sys/log
</code></pre>

<p>Now, for convenience, we set up an easy way to start the CouchDb server.  This assumes that <code>$HOME/sys/bin</code> is in your <code>$PATH</code>.  Make a file called <code>couchdb</code> in <code>$HOME/sys/bin</code> containing:</p>

<pre><code>#!/bin/bash/
cd $HOME/sys/couchdb &amp;&amp; ./bin/startCouchDb.sh
</code></pre>

<p>Next, fix its permissions:</p>

<pre><code>chmod +x $HOME/sys/bin/couchdb
</code></pre>

<p>Then, start the server:</p>

<pre><code>couchdb
</code></pre>

<p>(I follow this up with a <code>ln $HOME/sys/bin/couchdb $HOME/sys/bin/db</code> but that might not be best for you.) Finally, follow the rest of <a href="http://intertwingly.net/blog/2007/09/04/Building-CouchDB">Sam&#8217;s post</a> to get a quick introduction to CouchDb.</p>

<p><strong>Bonus Round</strong>:  Ruby on top of CouchDb.</p>

<p>There are two Ruby gems for work on top of CouchDb, <a href="http://couchobject.rubyforge.org">couchobject</a> and <a href="https://rubyforge.org/projects/couchdb/">CouchDb-Ruby</a> but <code>couchobject</code> seems the most promising.  Why? Well, for one, its respository doesn&#8217;t include tests with syntax errors. And, two, it lets you write CouchDb views <a href="http://theexciter.com/articles/couchdb-views-in-ruby-instead-of-javascript">in Ruby</a>, which is fantastic.  </p>

<p>I haven&#8217;t gotten a chance to find its limitations, yet, but considering the deep magic involved and the 0.5.0 version number, I&#8217;m sure it has a few.</p>

<p>To get it, hit the site for the link to the tarball or grab the repository with:</p>

<pre><code>git clone git://repo.or.cz/couchobject.git
</code></pre>

<p>I&#8217;m terribly excited. Enjoy!</p>

<p><strong>Update</strong>: Now leaving Typo City.</p>
]]></content:encoded>
			<wfw:commentRss>http://somethingsimilar.com/2007/09/21/building-couchdb-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>erl_interface is Deprecated and I Hate the Erlang Docs</title>
		<link>http://somethingsimilar.com/2007/09/02/erl_interface-is-deprecated-and-i-hate-the-erlang-docs/</link>
		<comments>http://somethingsimilar.com/2007/09/02/erl_interface-is-deprecated-and-i-hate-the-erlang-docs/#comments</comments>
		<pubDate>Sun, 02 Sep 2007 09:21:29 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[erlang]]></category>

		<guid isPermaLink="false">http://www.somethingsimilar.com/wordpress/2007/09/02/erl_interface-is-deprecated-and-i-hate-the-erlang-docs/</guid>
		<description><![CDATA[I&#8217;ve been learning Erlang in fits and starts for a few months now, and trying to play with the C interface to it.  Unfortunately, it wasn&#8217;t until tonight that I learned that the best documented interface, erl_interface,  is deprecated in favor of ei.  (That link is not all of the ei documentation. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been learning <a href="http://erlang.org">Erlang</a> in fits and starts for a few months now, and trying to play with the <code>C</code> interface to it.  Unfortunately, it wasn&#8217;t until tonight that I learned that the best documented interface, <code>erl_interface</code>,  <a href="http://erlang.org/pipermail/erlang-questions/2003-August/009527.html">is deprecated</a> in favor of <a href="http://erlang.org/doc/man/ei.html"><code>ei</code></a>.  <small>(That link is not all of the <code>ei</code> documentation. See the end of this post).</small></p>

<p>Oh, but you&#8217;ll still have to include <code>erl_interface.h</code> in order to get your code to run since <code>ei</code> requires it. Be careful to put <code>-lerl_interface</code> before <code>-lei</code>.</p>

<p>And all of the docs about interoperability with <code>C</code> have you including both <code>ei.h</code> and <code>erl_interface.h</code> and make no mention of the relationship between them or the deprecation of <code>erl_interface</code>.  Hell, they barely mention <code>ei</code>, anyhow. </p>

<p>This is the kind of thing that makes languages on the verge of true popularity spin down until they find themselves in the graveyard of &#8220;interesting but irrevelant&#8221;.  There will be no fiery crash, no awe-inspiring fight to the death, no raging against the dying of the light.  Nothing more than the slow frost bite of a crumbling community. </p>

<p>I love what <a href="http://erlang.org">Erlang</a> can do, but if you&#8217;re going to make a language that proudly shows it roots in a <a href="http://www.erlang.se/publications/prac_appl_prolog.pdf">Prolog interpreter</a>, you&#8217;ve got to give the plebeians like me a chance.</p>

<p>Oh, and could we get a decent math library while we&#8217;re at it?  I shouldn&#8217;t have to break out to C just to work with matrices.  Combined with a quickly made <code>mnesia</code> database you could have some serious distributed work going.  </p>

<p>You would probably have to move to a more lightweight data structure than what <code>mnesia</code> gives, but what a great way to write a proof of concept!  Of course, you&#8217;ll first have to find documentation for <code>mnesia</code> that isn&#8217;t ages old.</p>

<p>Since the <code>mnesia</code> and <code>ei</code> documentation (along with everything else) is pretty much unGooglable in all of those frames, I suggest using the <a href="http://www.erlang.org/download.html">documentation tarball</a> (<a href="http://www.erlang.org/download/otp_doc_html_R11B-5.tar.gz">lastest release</a>). In the the current release, hit <code>./otp_doc_html_R11B-5/lib/erl_interface-3.5.5.3/doc/html/application_ei_frame.html</code> for <code>ei</code> and <code>./otp_doc_html_R11B-5/lib/mnesia-4.3.5/doc/index.html</code> for <code>mnesia</code>. </p>

<p>Blech. The things you do for love. </p>

<p>I&#8217;ll be writing up my experiences and some posts to help others with <code>ei</code> as I go along. Let&#8217;s hope I can be as productive as I am critical.</p>
]]></content:encoded>
			<wfw:commentRss>http://somethingsimilar.com/2007/09/02/erl_interface-is-deprecated-and-i-hate-the-erlang-docs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
