<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Erlang, Termite and a Blog</title>
	<atom:link href="http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/</link>
	<description>random thoughts on programming and programming languages</description>
	<pubDate>Sat, 19 Jul 2008 03:07:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
		<item>
		<title>By: indian</title>
		<link>http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-30688</link>
		<dc:creator>indian</dc:creator>
		<pubDate>Mon, 18 Feb 2008 10:40:01 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-30688</guid>
		<description>in his soon-to-be-published book, joe armstrong proposes the following exercise:.
how about testing against a lua version.
Erlang, Termite and a Blog « programming musings
« three questionsa personal note »erlang, termite and a blog</description>
		<content:encoded><![CDATA[<p>in his soon-to-be-published book, joe armstrong proposes the following exercise:.<br />
how about testing against a lua version.<br />
Erlang, Termite and a Blog « programming musings<br />
« three questionsa personal note »erlang, termite and a blog</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iWantToKeepAnon</title>
		<link>http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-23249</link>
		<dc:creator>iWantToKeepAnon</dc:creator>
		<pubDate>Fri, 03 Aug 2007 21:27:51 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-23249</guid>
		<description>@Evoreal Team,

Care to back that up w/ code?  It is certainly possible, even likely.  But you need to do it w/ processes (not threads).  And you need to define message passing.  Using shared memory or mapped memory probably doesn't count.  TCP/IP is probably a must using ASN.1 or UBF over XML is prefered.

Write us up some code and show us the results!  Then show us the number of lines of code you wrote including the ASN.1 or UBF functions.  Then compare the time and effort it took.  Take the ratio of you LOCs vs. 31 in ring.erl.

Turing proved that any problem solved in 1 language can be solved in another (or something like that) ... but it doesn't mean you *should* solve certain problems in YOUR language.  There is a freedom of choice.</description>
		<content:encoded><![CDATA[<p>@Evoreal Team,</p>
<p>Care to back that up w/ code?  It is certainly possible, even likely.  But you need to do it w/ processes (not threads).  And you need to define message passing.  Using shared memory or mapped memory probably doesn&#8217;t count.  TCP/IP is probably a must using ASN.1 or UBF over XML is prefered.</p>
<p>Write us up some code and show us the results!  Then show us the number of lines of code you wrote including the ASN.1 or UBF functions.  Then compare the time and effort it took.  Take the ratio of you LOCs vs. 31 in ring.erl.</p>
<p>Turing proved that any problem solved in 1 language can be solved in another (or something like that) &#8230; but it doesn&#8217;t mean you *should* solve certain problems in YOUR language.  There is a freedom of choice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Evoreal Team</title>
		<link>http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-19009</link>
		<dc:creator>Evoreal Team</dc:creator>
		<pubDate>Sun, 03 Jun 2007 15:36:34 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-19009</guid>
		<description>C++ is faster !</description>
		<content:encoded><![CDATA[<p>C++ is faster !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2007-05-16 &#171; Bloggitation</title>
		<link>http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-16948</link>
		<dc:creator>links for 2007-05-16 &#171; Bloggitation</dc:creator>
		<pubDate>Wed, 16 May 2007 00:28:44 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-16948</guid>
		<description>[...] Erlang, Termite and a Blog (tags: erlang programming scheme) [...]</description>
		<content:encoded><![CDATA[<p>[...] Erlang, Termite and a Blog (tags: erlang programming scheme) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Top Posts &#171; WordPress.com</title>
		<link>http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-16944</link>
		<dc:creator>Top Posts &#171; WordPress.com</dc:creator>
		<pubDate>Tue, 15 May 2007 23:58:36 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-16944</guid>
		<description>[...] Erlang, Termite and a Blog In his soon-to-be-published book, Joe Armstrong proposes the following exercise: [...]</description>
		<content:encoded><![CDATA[<p>[...] Erlang, Termite and a Blog In his soon-to-be-published book, Joe Armstrong proposes the following exercise: [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jao</title>
		<link>http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-16938</link>
		<dc:creator>jao</dc:creator>
		<pubDate>Tue, 15 May 2007 21:20:44 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-16938</guid>
		<description>Me: FWIW, the tests above ran on a Core Duo, and both Erlang and Gambit (both interpreted and compiled) are using both CPUs (I've checked).</description>
		<content:encoded><![CDATA[<p>Me: FWIW, the tests above ran on a Core Duo, and both Erlang and Gambit (both interpreted and compiled) are using both CPUs (I&#8217;ve checked).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Me</title>
		<link>http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-16933</link>
		<dc:creator>Me</dc:creator>
		<pubDate>Tue, 15 May 2007 21:00:22 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-16933</guid>
		<description>Ok, and so you don't cheat, do this with multiple CPUs or on multiple machines, so the message actually has to leave the process (OS process, not Erlang process).  I'd like to know how the numbers are in that case.

Otherwise, it's not really fair towards platforms that use OS threads, because OS threads have clear disadvantages, but allow sharing the load over multiple CPUs.</description>
		<content:encoded><![CDATA[<p>Ok, and so you don&#8217;t cheat, do this with multiple CPUs or on multiple machines, so the message actually has to leave the process (OS process, not Erlang process).  I&#8217;d like to know how the numbers are in that case.</p>
<p>Otherwise, it&#8217;s not really fair towards platforms that use OS threads, because OS threads have clear disadvantages, but allow sharing the load over multiple CPUs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jao</title>
		<link>http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-16931</link>
		<dc:creator>jao</dc:creator>
		<pubDate>Tue, 15 May 2007 20:40:58 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-16931</guid>
		<description>schemeway: maybe i'm missing something, but adding your suggested declaration to the top of the file and recompiling has virtually no effect on the run times...</description>
		<content:encoded><![CDATA[<p>schemeway: maybe i&#8217;m missing something, but adding your suggested declaration to the top of the file and recompiling has virtually no effect on the run times&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Kavanagh</title>
		<link>http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-16922</link>
		<dc:creator>Ben Kavanagh</dc:creator>
		<pubDate>Tue, 15 May 2007 17:19:09 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-16922</guid>
		<description>Here is a slightly different implementation. Where a master node sends one message and the message traverses M times without having to manage each round. I think it's more in the spirit of the problem definition. 

-module(ring).
-export([go/2]).
 
go(N, M) -&#62;
    FPid = spawn(fun() -&#62; initfirst() end),
    SPid = spawn(fun() -&#62; initrest(N, 2, M, FPid) end),
    register(master, self()),
    FPid ! {start, SPid, M, hello},
    wait_done(FPid).

wait_done(FPid) -&#62;
    receive 
	{finished, FPid} -&#62; unregister(master)
    end.
    
initfirst() -&#62;    
    receive 
	{start, NextP, M, Msg} -&#62;
	    NextP ! {Msg},
	    loop(M, NextP, self())
    end.

initrest(N, N, M, FPid) -&#62; loop (M, FPid, FPid);
initrest(N, J, M, FPid) -&#62; 
    NextId = spawn(fun()-&#62;initrest(N, J+1, M, FPid) end),
    loop (M, NextId, FPid).
    
loop(M, NextP, FPid) when M &#62; 0 -&#62;
    receive 
	{Msg} -&#62;
	    NextP!{Msg}
    end,
    loop(M-1, NextP, FPid);
loop(0, _, FPid) when FPid == self() -&#62;  master!{finished, self()};
loop(0, _, _) -&#62; true.</description>
		<content:encoded><![CDATA[<p>Here is a slightly different implementation. Where a master node sends one message and the message traverses M times without having to manage each round. I think it&#8217;s more in the spirit of the problem definition. </p>
<p>-module(ring).<br />
-export([go/2]).</p>
<p>go(N, M) -&gt;<br />
    FPid = spawn(fun() -&gt; initfirst() end),<br />
    SPid = spawn(fun() -&gt; initrest(N, 2, M, FPid) end),<br />
    register(master, self()),<br />
    FPid ! {start, SPid, M, hello},<br />
    wait_done(FPid).</p>
<p>wait_done(FPid) -&gt;<br />
    receive<br />
	{finished, FPid} -&gt; unregister(master)<br />
    end.</p>
<p>initfirst() -&gt;<br />
    receive<br />
	{start, NextP, M, Msg} -&gt;<br />
	    NextP ! {Msg},<br />
	    loop(M, NextP, self())<br />
    end.</p>
<p>initrest(N, N, M, FPid) -&gt; loop (M, FPid, FPid);<br />
initrest(N, J, M, FPid) -&gt;<br />
    NextId = spawn(fun()-&gt;initrest(N, J+1, M, FPid) end),<br />
    loop (M, NextId, FPid).</p>
<p>loop(M, NextP, FPid) when M &gt; 0 -&gt;<br />
    receive<br />
	{Msg} -&gt;<br />
	    NextP!{Msg}<br />
    end,<br />
    loop(M-1, NextP, FPid);<br />
loop(0, _, FPid) when FPid == self() -&gt;  master!{finished, self()};<br />
loop(0, _, _) -&gt; true.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kimmy</title>
		<link>http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-16912</link>
		<dc:creator>Kimmy</dc:creator>
		<pubDate>Tue, 15 May 2007 14:04:53 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2007/05/14/erlang-termite-and-a-blog/#comment-16912</guid>
		<description>How about testing against a Lua version?</description>
		<content:encoded><![CDATA[<p>How about testing against a Lua version?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
