<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Mad Marmot: Tag Erlang</title>
    <link>http://www.lukeludwig.com/blog/articles/tag/erlang</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>A blog about programming, ruby, rails, and my crazy outdoor pursuits</description>
    <item>
      <title>Erlang - The Next Great Programming Language?</title>
      <description>&lt;p&gt;&lt;a href="http://www.erlang.org/"&gt;Erlang&lt;/a&gt; - The Next Great Programming Language? I don&amp;#39;t think so. I probably shouldn&amp;#39;t be doing this. At least not yet. I just don&amp;#39;t know enough about Erlang to make any predictions. I haven&amp;#39;t written any Erlang code myself. This will change shortly, as the &lt;a href="http://pragmaticprogrammer.com/titles/jaerlang/index.html"&gt;book&lt;/a&gt; is on its way. I guess I am impatient. And curious to see if my opinion will change.&lt;/p&gt;&lt;p&gt;All signs seem to point to Erlang being the next great programming language. It has momentum, it has hype, it even has the &lt;a href="http://pragmaticprogrammer.com/titles/jaerlang/index.html"&gt;Pragmatic Programmers&lt;/a&gt; on its side. And like Ruby, it has a killer app -- parallel processing. Ruby&amp;#39;s killer app is Rails of course, which greatly eases the burden in developing web applications. Ruby is the latest great programming language. For the past 3-4 years Ruby (and Rails) is the language that everyone has been talking about, the language that all the talented programmers want to learn in their spare time. Before Ruby, Python may have stood for a short time on the latest great programming language podium. Python never quite had the killer app that Ruby does with Rails, but it still shocked the world (well, the world of nerds anyway) with its pseudocode look and its use of whitespace. Before Python there was Java, and before Java C++, and before C++ there was C. I wasn&amp;#39;t programming at the time, but yes people I believe if you could travel back in time there was a point where C was the latest cool programming language that all the cool kids (aka major nerds) had to try out.&lt;/p&gt;&lt;p&gt;And now Erlang? Certainly it seems like all the cool kids are sneaking off to become Erlang experts during their lunch break. Which is the beginning of how the next great programming language comes to be. Due to its killer app, parallel processing, Erlang is impossible to ignore. Multi-core computers are now a reality, with more cores coming out every year. Intel could have &lt;a href="http://www.engadget.com/2006/07/10/intel-goes-multi-core-crazy-for-keifer-server-line/"&gt;32 cores by 2010&lt;/a&gt;. The tides have turned and the software world now lags behind the hardware world. In the past we always had software programs that would consume the available processor time or eat up all the RAM. But now, with 32 cores just around the corner, very few software programs will be able to take advantage of this. Unless Erlang becomes the next great programming language, and quickly. &lt;/p&gt;

&lt;p&gt;Parallel-processing comes built-in to Erlang. Whereas conventional programming languages use a concurrency-model with shared state, Erlang uses a message-passing concurrency model where the only way for &amp;quot;threads&amp;quot; to exchange state is via asynchronous messages. The shared state concurrency model causes a host of problems, most of which fall under two categories: race conditions and deadlocks. These problems are extremely frustrating to fix and it can be very difficult to prove their absence. Edward A. Lee has written an excellent paper on &lt;em&gt;&lt;a href="http://www.google.com/url?sa=t&amp;amp;ct=res&amp;amp;cd=1&amp;amp;url=http%3A%2F%2Fwww.eecs.berkeley.edu%2FPubs%2FTechRpts%2F2006%2FEECS-2006-1.pdf&amp;amp;ei=afAER-nWG5aSiwHYlMWeBQ&amp;amp;usg=AFQjCNFKbD8gsVjP71jOd1-cFbUiGK96Cw&amp;amp;sig2=yAxX3buosNNTyr_ZFBuUOg"&gt;The Problem With Threads&lt;/a&gt;,&lt;/em&gt; where he basically says that the dominant shared state concurrency model in use today is not the way to go. He argues that &lt;em&gt;&amp;quot;Nondeterminism should be explicitly and judiciously introduced where needed, rather than removed where not needed&amp;quot;&lt;/em&gt;. I don&amp;#39;t know if Erlang is quite what Edward A. Lee was envisioning, but right now it is the best we have. Along with Erlang&amp;#39;s asynchronous message-passing concurrency model, it automatically distributes the multiple &amp;quot;threads&amp;quot; (which are really processes) across cores, which essentially means an Erlang program running on a 32 core machine can run 32 times faster than on a single core, assuming there are no other bottlenecks such as disk to slow it down. &lt;/p&gt;&lt;p&gt;Why don&amp;#39;t I think Erlang will be the next great programming language? It is too radically different. It is too functional.&amp;nbsp;No real variables? No mutable state? My simple-minded brain understands the importance of no-shared state between &amp;quot;threads&amp;quot;, but with Erlang I can&amp;#39;t even change the value of &lt;em&gt;foo&lt;/em&gt;? And has a functional programming language ever become popular with the masses? Everyone knows that Lisp is more powerful than other languages, but no one cares. &lt;/p&gt;&lt;p&gt;Erlang is simply too different. In &lt;em&gt;&lt;a href="http://ejohnson.blogs.com/software/2004/11/i_find_c_intere.html"&gt;C++ - The Forgotten Trojan Horse&lt;/a&gt;&lt;/em&gt;, Eric Johnson reminds us how C++ took over the world. C++ extended C in a manner that allowed developers to gradually transist into the world of C++. Eric Johnson writes that &lt;em&gt;&amp;quot;Too often we developers think of great change as requiring discrete, atomic, massive events that stand out as a fork in the road&amp;quot;&lt;/em&gt;. In reality, great change in the programming world is gradual, not all at once. Scott Berkun in his &lt;em&gt;&lt;a href="http://www.amazon.com/Myths-Innovation-Scott-Berkun/dp/0596527055"&gt;The Myths of Innovation&lt;/a&gt;&lt;/em&gt;, points out that Compatibility is one of the main factors in how quickly innovations spread. Scott writes &lt;em&gt;&amp;quot;How much effort is required to transition from the current thing to the innovation? If this cost is greater than the relative advantage, most people won&amp;#39;t try the innovation&amp;quot;&lt;/em&gt;.&amp;nbsp;&lt;/p&gt;&lt;p&gt;But Erlang has the momentum and the hype and in the next few years I am sure most of the cool kids will bring it around the block for a spin to see what it can do. The best hackers have probably done this already and most likely they realized that Erlang is too different. What the world needs now is a language like Erlang with its asynchronous message-passing concurrency model and its automatic parallelization across cores, but without its functional nature and without its lack of real variables. People can only take so much change at a time, and switching from a shared-state to a message-passing concurrency model is a rather large change by itself. I expect that before long a new language will appear to steal the glory. Or maybe an existing language (Ruby anyone?) will be extended to include the more important concepts underlying Erlang. As Scott Berkun points out in &lt;em&gt;&lt;a href="http://www.amazon.com/Myths-Innovation-Scott-Berkun/dp/0596527055"&gt;The Myths of Innovation&lt;/a&gt;&lt;/em&gt;, the best ideas do not always win. &lt;/p&gt;</description>
      <pubDate>Thu, 04 Oct 2007 08:13:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:57c108bc-4866-4411-a3b2-ce14425ad3e0</guid>
      <author>Luke Ludwig</author>
      <link>http://www.lukeludwig.com/blog/articles/2007/10/04/erlang-the-next-great-programming-language</link>
      <category>Programming</category>
      <category>Erlang</category>
    </item>
  </channel>
</rss>
