<?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>Erik Howard&#187; Erlang Archives  | Erik Howard</title>
	<atom:link href="http://www.erikhoward.net/category/erlang/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.erikhoward.net</link>
	<description>Cloud Computing, SaaS, and Web Development Blog</description>
	<lastBuildDate>Tue, 06 Apr 2010 00:07:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Installing Erlang on Ubuntu</title>
		<link>http://www.erikhoward.net/installing-erlang-ubuntu/</link>
		<comments>http://www.erikhoward.net/installing-erlang-ubuntu/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 05:00:52 +0000</pubDate>
		<dc:creator>Erik Howard</dc:creator>
				<category><![CDATA[Erlang]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.erikhoward.net/?p=75</guid>
		<description><![CDATA[Lets rewind to about a month ago. As I usually do, I skipped past the README files and installed Erlang with apt-get. Ten seconds later, I had Erlang up and running on my Ubuntu development VM. Like a bad teenage horror movie, I&#8217;m sure you can see where this is going. Fast forward to present [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Lets rewind to about a month ago. As I usually do, I skipped past the README files and installed Erlang with apt-get. Ten seconds later, I had Erlang up and running on my Ubuntu development VM. Like a bad teenage horror movie, I&#8217;m sure you can see where this is going.</p>
<p>Fast forward to present day. I was running into another serious compiler error with Erlang. A few of the Erlang web frameworks were refusing to compile &#8211; again. As usual, the error message being thrown by Erlang was as cryptic as Aramaic spoken with a lisp. Nothing turned up in Google about the error. I even hopped on the #erlang channel on IRC hopping to get a few pointers.</p>
<p>No one had a direct answer, but I did get a clue. One person mentioned that Erlang is very good telling you vary far in advance if there will be any breaking changes in future releases. I also found out that I was using an Alpha release. Not good, not good at all.</p>
<p>So armed with this new information and a few hunches, I un-installed Erlang (again) and download the last <a href="http://erlang.org/download.html">stable</a> release &#8211; R12B-5 at the time of this article. Here&#8217;s what I did.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> libncurses5 libncurses5-dev
<span style="color: #c20cb9; font-weight: bold;">tar</span> xvzf otp_src_R12B-5.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> otp_src_R12B-<span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">/</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>I had to install libncurses5 and libncurses5-dev since it wasn&#8217;t installed on my Ubuntu development VM.</p>
<p>After building Erlang from source, I went back to compile my code and everything worked. Erlang is definitely death by 1,000 cuts. It&#8217;s enough to make a grown man cry.</p>
<p align="left"><a rel="nofollow" class="tt" href="http://twitter.com/home/?status=Installing+Erlang+on+Ubuntu+http://bit.ly/au2TXm" title="Post to Twitter"><img class="nothumb" src="http://www.erikhoward.net/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a></p>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.erikhoward.net/installing-erlang-ubuntu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Erlang Debugging and UTF-16</title>
		<link>http://www.erikhoward.net/erlang-debugging-utf16/</link>
		<comments>http://www.erikhoward.net/erlang-debugging-utf16/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 21:51:02 +0000</pubDate>
		<dc:creator>Erik Howard</dc:creator>
				<category><![CDATA[Erlang]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://www.erikhoward.net/?p=72</guid>
		<description><![CDATA[I&#8217;ve been teaching myself Erlang.  It&#8217;s a great Functional Programming language. I&#8217;ve also dabbled a little with Scala. Besides wanting to learn a new computer language, I&#8217;ve also wanted to port some of my high-traffic Ruby On Rails sites into Erlang. Erlang will be able to handle 3x-4x the traffic using less resources. Less EC2 [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-73" title="Erlang" src="http://www.erikhoward.net/wp-content/uploads/2009/04/erlang.gif" alt="Erlang" width="114" height="96" /></p>
<p>I&#8217;ve been teaching myself <a href="http://www.erlang.org">Erlang</a>.  It&#8217;s a great <a href="http://en.wikipedia.org/wiki/Functional_programming">Functional Programming</a> language. I&#8217;ve also dabbled a little with Scala.</p>
<p>Besides wanting to learn a new computer language, I&#8217;ve also wanted to port some of my high-traffic Ruby On Rails sites into Erlang. Erlang will be able to handle 3x-4x the traffic using less resources. Less EC2 instances up and running means more money in my pocket.</p>
<p>While playing around with <a href="http://code.google.com/p/mochiweb/">mochiweb</a> I ran into a compile error that didn&#8217;t make sense. At least it didn&#8217;t make sense to my limited knowledge of Erlang. The error was this:</p>
<p><code>Eshell V5.5.5  (abort with ^G)<br />
1&gt; c("mochijson2.erl").<br />
./mochijson2.erl:38: illegal atom<br />
./mochijson2.erl:2615: no module definition<br />
error</code></p>
<p>I opened up the file and went to the offending line-numbers and could not find anything out of the ordinary. After a little Googling, I found a <a href="http://erlang.org/pipermail/erlang-questions/2008-September/038444.html">post</a> on the Erlang-Questions mailing list from someone who had the same error as I did.</p>
<p>Turns out that there was nothing wrong with the file other than being encoded as UTF-16, which Erlang does not like at all. It would have been nice if the compiler threw an error saying that your source file is in the wrong encoding. Illegal atom / no module definition just doesn&#8217;t cut it for me.</p>
<p>Cryptic error messages have been my biggest stumbling block with learning Erlang. I take two steps forward, then one epic step backwards. So the moral of the story is to make sure that all of your Erlang files are encoded using Latin-1 (ISO-8859-1) and not UTF-16.</p>
<p align="left"><a rel="nofollow" class="tt" href="http://twitter.com/home/?status=Erlang+Debugging+and+UTF-16+http://bit.ly/bFa6qr" title="Post to Twitter"><img class="nothumb" src="http://www.erikhoward.net/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a></p>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.erikhoward.net/erlang-debugging-utf16/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
