<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Recent Posts in Erlang in Practice | Pragmatic Forums</title>
    <link>http://forums.pragprog.com/forums/73/posts</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <item>
      <title>setting up erlang enviorment posted by Francisco Pinochet @ Tue, 02 Dec 2008 02:48:07 -0000</title>
      <description>&lt;p&gt;I figured it out.&lt;/p&gt;


	&lt;p&gt;download Emacs for osx and install&lt;/p&gt;


	&lt;p&gt;go to your terminal type in vi ~/.emacs&lt;/p&gt;


	&lt;p&gt;Enter the following&lt;/p&gt;


	&lt;p&gt;;Erlang Mode&lt;br /&gt;(setq load-path (cons  &amp;#8221;/opt/erlang/lib/erlang/lib/tools-2.6.2/emacs/&amp;#8221; load-path)) &lt;br /&gt;(setq erlang-root-dir &amp;#8221;/opt/erlang&amp;#8221;)&lt;br /&gt;(setq exec-path (cons &amp;#8221;/opt/erlang/bin/&amp;#8221; exec-path))&lt;br /&gt;(require &amp;#8216;erlang-start)&lt;/p&gt;


	&lt;p&gt;Load up Emacs and you will see it works. It also worked on for Aquamacs&lt;/p&gt;</description>
      <pubDate>Tue, 02 Dec 2008 02:48:07 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:1494:6516</guid>
      <author>Francisco Pinochet</author>
      <link>http://forums.pragprog.com/forums/73/topics/1494</link>
    </item>
    <item>
      <title>setting up erlang enviorment posted by Francisco Pinochet @ Mon, 01 Dec 2008 21:59:02 -0000</title>
      <description>&lt;p&gt;I run &lt;span class="caps"&gt;OSX 10&lt;/span&gt;.5 and I installed Aquamacs a version of emacs. I setup the way Kevin did it in his blog and it is not working. At the moment I am programing in Eclipse with a erlang plug in. When it comes to node testing I cannot test this in eclipse because I cannot open more than one console window. I even did a video tutorial how to set this up aquamacs. Is there any other tutorials?&lt;/p&gt;</description>
      <pubDate>Mon, 01 Dec 2008 21:59:02 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:1494:6510</guid>
      <author>Francisco Pinochet</author>
      <link>http://forums.pragprog.com/forums/73/topics/1494</link>
    </item>
    <item>
      <title>global:send vs global:send_message posted by Francisco Pinochet @ Mon, 01 Dec 2008 21:55:20 -0000</title>
      <description>&lt;p&gt;I did not get any errors on episode 3. so is this code better?&lt;/p&gt;</description>
      <pubDate>Mon, 01 Dec 2008 21:55:20 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:513:6509</guid>
      <author>Francisco Pinochet</author>
      <link>http://forums.pragprog.com/forums/73/topics/513</link>
    </item>
    <item>
      <title>encryption posted by Francisco Pinochet @ Mon, 01 Dec 2008 15:59:47 -0000</title>
      <description>&lt;p&gt;I found something.. &lt;a href="http://diginux.blogspot.com/2006/10/adding-aes-encryption-to-erlang-chat.html"&gt;http://diginux.blogspot.com/2006/10/adding-aes-encryption-to-erlang-chat.html&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 01 Dec 2008 15:59:47 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:1466:6499</guid>
      <author>Francisco Pinochet</author>
      <link>http://forums.pragprog.com/forums/73/topics/1466</link>
    </item>
    <item>
      <title>encryption posted by Francisco Pinochet @ Thu, 27 Nov 2008 21:25:30 -0000</title>
      <description>&lt;p&gt;How would I add encryption?&lt;/p&gt;</description>
      <pubDate>Thu, 27 Nov 2008 21:25:30 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:1466:6415</guid>
      <author>Francisco Pinochet</author>
      <link>http://forums.pragprog.com/forums/73/topics/1466</link>
    </item>
    <item>
      <title>Episode 1 - exit() posted by Chris Bernard @ Fri, 21 Nov 2008 14:47:25 -0000</title>
      <description>&lt;p&gt;Well, almost.  To directly put the hurtin&amp;#8217; on a process and take it down immediately, no questions asked, what you need is:&lt;/p&gt;


	&lt;p&gt;exit(P1, kill).&lt;/p&gt;


	&lt;p&gt;If you use the &amp;#8216;normal&amp;#8217; flag for exit/2, erlang will ask the question, &amp;#8220;Is this process trapping exits? (process_flag=trap_exit) If so, erlang will add this signal to the process&amp;#8217; inbox; if not, erlang will do absolutely nothing at all.&lt;/p&gt;</description>
      <pubDate>Fri, 21 Nov 2008 14:47:25 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:1074:6250</guid>
      <author>Chris Bernard</author>
      <link>http://forums.pragprog.com/forums/73/topics/1074</link>
    </item>
    <item>
      <title>general notes posted by Justin Lolofie @ Thu, 13 Nov 2008 04:32:45 -0000</title>
      <description>&lt;p&gt;Here are a few suggestions from a complete Erlang beginner watching the Erlang in Practice screencasts.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;You are compiling in your editor. A beginner will have to notice the  c(...) stuff in your buffer; it might be worth a quick mention initially.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Move cursor away from the text I&amp;#8217;m supposed to be reading when not specifically pointing at something- it is distracting.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Give a few more seconds to important points (e.g. ?SERVER e2-15:15, anon &lt;br /&gt;fun e2-19:55)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Switch to a diagram when describing abstract concepts (e.g. single assignment variables in functional languages).&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Light text on white background is hard to see (e.g. light grey for double quoted text)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Be more verbose- Sometimes I&amp;#8217;m looking away from the screencast for 1-2 seconds; I know, maybe this isnt ideal, but it works for me- 98% of the time. It doesnt work when the author notices a syntax error and fixes it without saying anything at the precise 1-2 seconds I&amp;#8217;m looking at my own terminal. Not only do I miss the correction, but I dont know I missed something until the next time we compile.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Just adding in a &amp;#8220;oh, I need to change that semicolon to a coma&amp;#8221; would help. I know, it sounds a little exaggerated to say things that you are clearly doing- but the more cues people have the more likely they are to understand.&lt;/p&gt;


	&lt;p&gt;Anyway, I&amp;#8217;ve enjoyed them so far- keep up the good work! :&amp;gt;&lt;/p&gt;</description>
      <pubDate>Thu, 13 Nov 2008 04:32:45 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:1362:6026</guid>
      <author>Justin Lolofie</author>
      <link>http://forums.pragprog.com/forums/73/topics/1362</link>
    </item>
    <item>
      <title>trap_exit in episode 7 posted by Kevin Smith @ Mon, 03 Nov 2008 00:24:52 -0000</title>
      <description>&lt;p&gt;Yep. You are exactly correct.&lt;/p&gt;


	&lt;p&gt;I probably should&amp;#8217;ve highlighted that fact a bit more in the screencasts. Sorry if it was confusing.&lt;/p&gt;</description>
      <pubDate>Mon, 03 Nov 2008 00:24:52 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:1287:5809</guid>
      <author>Kevin Smith</author>
      <link>http://forums.pragprog.com/forums/73/topics/1287</link>
    </item>
    <item>
      <title>trap_exit in episode 7 posted by Dave Peticolas @ Sun, 02 Nov 2008 20:02:13 -0000</title>
      <description>&lt;p&gt;Ok, so strictly speaking, the servers here don&amp;#8217;t really need to set trap_exit, right? I didn&amp;#8217;t set them&lt;br /&gt;when I was following along and the supervisors all seemed to restart crashed processes just fine. As I&lt;br /&gt;understand it, setting the flag in a gen_server&amp;#8217;s init would set the flag for the gen_server process,&lt;br /&gt;not the supervisor process, so it wouldn&amp;#8217;t really affect the supervisor&amp;#8217;s ability to detect the&lt;br /&gt;gen_server crashing.&lt;/p&gt;</description>
      <pubDate>Sun, 02 Nov 2008 20:02:13 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:1287:5805</guid>
      <author>Dave Peticolas</author>
      <link>http://forums.pragprog.com/forums/73/topics/1287</link>
    </item>
    <item>
      <title>trap_exit in episode 7 posted by Kevin Smith @ Sun, 02 Nov 2008 19:39:11 -0000</title>
      <description>&lt;p&gt;The man page on the &amp;#8216;erlang&amp;#8217; module gives a clue:&lt;/p&gt;


	&lt;p&gt;&amp;#8220;When trap_exit is set to true, exit signals arriving to a process are converted to {&amp;#8216;EXIT&amp;#8217;, From, Reason} messages, which can be received as ordinary messages.&amp;#8221;&lt;/p&gt;


	&lt;p&gt;The transformation of an process exit event to an Erlang message is one way supervisors can do their jobs&amp;#8212;monitoring and restarting processes. In &amp;#8220;real&amp;#8221; code you&amp;#8217;d use trap_exit judiciously since there scenarios where you really want processes to exit and propagate their exit signals up the tree.&lt;/p&gt;


	&lt;p&gt;Another reason for trapping exits is the informative traces &lt;span class="caps"&gt;OTP&lt;/span&gt; provides when the process dies. Many times I&amp;#8217;ll enable trap_exit when I&amp;#8217;m prototyping or debugging code. Once I have the code working as I want I&amp;#8217;ll go back and remove all but a few of the trap_exit flags.&lt;/p&gt;</description>
      <pubDate>Sun, 02 Nov 2008 19:39:11 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:1287:5804</guid>
      <author>Kevin Smith</author>
      <link>http://forums.pragprog.com/forums/73/topics/1287</link>
    </item>
    <item>
      <title>trap_exit in episode 7 posted by Dave Peticolas @ Fri, 31 Oct 2008 02:52:00 -0000</title>
      <description>&lt;p&gt;Hi, I have a question about the setting of the trap_exit flag in episode 7. I&amp;#8217;m unclear&lt;br /&gt;on why that is needed. How does setting the flag on the gen_server process affect whether&lt;br /&gt;the supervisor will get notified when the gen_server dies?&lt;/p&gt;</description>
      <pubDate>Fri, 31 Oct 2008 02:52:00 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:1287:5760</guid>
      <author>Dave Peticolas</author>
      <link>http://forums.pragprog.com/forums/73/topics/1287</link>
    </item>
    <item>
      <title>Question about chat server functionality posted by Kevin Smith @ Sun, 12 Oct 2008 17:32:04 -0000</title>
      <description>&lt;p&gt;Hmmm. I went thru the steps you described using the code included in the source bundle and I get the error message after Joe is unregistered and I try to send him a message.&lt;/p&gt;</description>
      <pubDate>Sun, 12 Oct 2008 17:32:04 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:964:5209</guid>
      <author>Kevin Smith</author>
      <link>http://forums.pragprog.com/forums/73/topics/964</link>
    </item>
    <item>
      <title>Episode 1 - exit() posted by Kevin Smith @ Sun, 12 Oct 2008 17:22:51 -0000</title>
      <description>&lt;p&gt;Meh. This is a mistake on my part :( I called exit/1 when exit/2 should&amp;#8217;ve been used like so:&lt;/p&gt;


	&lt;p&gt;exit(P1, normal).&lt;/p&gt;


	&lt;p&gt;You can verify the processes are indeed dead by calling erlang:is_process_alive/1 with the process&amp;#8217; pid. Sorry about the confusion on that.&lt;/p&gt;</description>
      <pubDate>Sun, 12 Oct 2008 17:22:51 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:1074:5208</guid>
      <author>Kevin Smith</author>
      <link>http://forums.pragprog.com/forums/73/topics/1074</link>
    </item>
    <item>
      <title>Design question posted by Kevin Smith @ Sun, 12 Oct 2008 17:03:01 -0000</title>
      <description>&lt;p&gt;I think it does :)&lt;/p&gt;


	&lt;p&gt;One of the goals when I did the screencasts was to start with something simple which a) didn&amp;#8217;t require a lot of Erlang knowledge and b) would fit into a 30-40 min screencast. Sometimes, like with this client process example, I had to break things up over a couple of episodes to satisfy these criteria.&lt;/p&gt;</description>
      <pubDate>Sun, 12 Oct 2008 17:03:01 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:1116:5207</guid>
      <author>Kevin Smith</author>
      <link>http://forums.pragprog.com/forums/73/topics/1116</link>
    </item>
    <item>
      <title>Design question posted by Peter Whitfield @ Sun, 12 Oct 2008 10:10:10 -0000</title>
      <description>&lt;p&gt;Thanks Kevin,&lt;/p&gt;


	&lt;p&gt;Having gone on to listen to the third screencast, I realise that I was assuming there was already a Client process you could send a message to &amp;#8211; this clearly was not the case in episode 2.&lt;/p&gt;


	&lt;p&gt;Your refactoring in the start of Ep 3 effectively does what I was expecting by creating a separate process for each client and having the router send the appropriate process a message.&lt;/p&gt;


	&lt;p&gt;Hopefully this means I&amp;#8217;m starting to get my head around the concepts :-)&lt;/p&gt;


	&lt;p&gt;Cheers,&lt;/p&gt;


	&lt;p&gt;Pete&lt;/p&gt;</description>
      <pubDate>Sun, 12 Oct 2008 10:10:10 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:1116:5198</guid>
      <author>Peter Whitfield</author>
      <link>http://forums.pragprog.com/forums/73/topics/1116</link>
    </item>
    <item>
      <title>Episode 1 - exit() posted by Kevin Smith @ Sat, 11 Oct 2008 21:34:34 -0000</title>
      <description>&lt;p&gt;I&amp;#8217;ve gotten a bit behind on my replies&amp;#8212;apologies for taking so long to reply. I&amp;#8217;m not at my laptop right now so I can&amp;#8217;t review the code. I&amp;#8217;ll take a look later today and see what&amp;#8217;s going  on.&lt;/p&gt;</description>
      <pubDate>Sat, 11 Oct 2008 21:34:34 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:1074:5181</guid>
      <author>Kevin Smith</author>
      <link>http://forums.pragprog.com/forums/73/topics/1074</link>
    </item>
    <item>
      <title>Design question posted by Kevin Smith @ Sat, 11 Oct 2008 21:29:28 -0000</title>
      <description>&lt;p&gt;I&amp;#8217;ve gotten behind on replying to posts&amp;#8212;sorry for the delay. One thing to keep in mind is I wrote some of the code to illustrate a point which means it might be a little different than if you were writing the code &amp;#8220;for real&amp;#8221;.  I&amp;#8217;ll take a look at the code later today and come up with a more definitive reply.&lt;/p&gt;</description>
      <pubDate>Sat, 11 Oct 2008 21:29:28 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:1116:5180</guid>
      <author>Kevin Smith</author>
      <link>http://forums.pragprog.com/forums/73/topics/1116</link>
    </item>
    <item>
      <title>Design question posted by Peter Whitfield @ Sat, 11 Oct 2008 20:45:50 -0000</title>
      <description>&lt;p&gt;Perhaps to elaborate a little, I would have thought that it would be more appropriate to send a deliver_message message to the appropriate client process.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m hoping that someone can help explain why the function passing approach would be preferable over sending a message.&lt;/p&gt;


	&lt;p&gt;Thanks again,&lt;/p&gt;


	&lt;p&gt;Pete&lt;/p&gt;</description>
      <pubDate>Sat, 11 Oct 2008 20:45:50 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:1116:5179</guid>
      <author>Peter Whitfield</author>
      <link>http://forums.pragprog.com/forums/73/topics/1116</link>
    </item>
    <item>
      <title>Design question posted by Peter Whitfield @ Sat, 11 Oct 2008 12:11:49 -0000</title>
      <description>&lt;p&gt;Hi All,&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve just finished watching the first screencast and started on the second and I&amp;#8217;m a little confused about the design of the message_router. It seems strange to me that the router is at all concerned with the display of the message &amp;#8211; surely it should simply pass the message on to the intended client and let it worry about how to display the message.&lt;/p&gt;


	&lt;p&gt;Based on this thought, I don&amp;#8217;t really understand why it&amp;#8217;s a good idea to pass the message printing function from the client into the router.&lt;/p&gt;


	&lt;p&gt;Can anyone help me to understand this design decision?&lt;/p&gt;


	&lt;p&gt;Thanks!&lt;/p&gt;


	&lt;p&gt;Peter&lt;/p&gt;</description>
      <pubDate>Sat, 11 Oct 2008 12:11:49 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:1116:5168</guid>
      <author>Peter Whitfield</author>
      <link>http://forums.pragprog.com/forums/73/topics/1116</link>
    </item>
    <item>
      <title>Episode 1 - exit() posted by Stefan Arentz @ Thu, 09 Oct 2008 01:26:11 -0000</title>
      <description>&lt;p&gt;Around timestamp 17:45, the exit() call is used to stop two message router processes. I get the same output as Joe:&lt;/p&gt;


&lt;pre&gt;
56&amp;gt; exit(P1).
** exception exit: &amp;lt;0.778.0&amp;gt;
57&amp;gt; exit(P2).
** exception exit: &amp;lt;0.798.0&amp;gt;
&lt;/pre&gt;

	&lt;p&gt;(I named my processes slightly different)&lt;/p&gt;


	&lt;p&gt;But I noticed that these processes are actually still running. For example, this still works:&lt;/p&gt;


&lt;pre&gt;
59&amp;gt; chat_client:send_message(P1, P2, "Hello").
Received: "Hello" 
{send_chat_msg,&amp;lt;0.798.0&amp;gt;,"Hello"}
&lt;/pre&gt;

	&lt;p&gt;What is going on here. Does exit() actually work? Or was it not used in the right way?&lt;/p&gt;


	&lt;p&gt;S.&lt;/p&gt;</description>
      <pubDate>Thu, 09 Oct 2008 01:26:11 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:1074:5013</guid>
      <author>Stefan Arentz</author>
      <link>http://forums.pragprog.com/forums/73/topics/1074</link>
    </item>
    <item>
      <title>Episode 4: badarg posted by John Sutherland @ Wed, 24 Sep 2008 22:20:39 -0000</title>
      <description>&lt;p&gt;So much great info. Thanks again!&lt;/p&gt;</description>
      <pubDate>Wed, 24 Sep 2008 22:20:39 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:977:4658</guid>
      <author>John Sutherland</author>
      <link>http://forums.pragprog.com/forums/73/topics/977</link>
    </item>
    <item>
      <title>Episode 4: badarg posted by Kevin Smith @ Wed, 24 Sep 2008 18:20:12 -0000</title>
      <description>&lt;p&gt;This trips a lot of people up. Erlang nodes do not discover each other on a network. You have to point them at each other using net_adm:ping/1. Until you do that things like global name replication, mnesia replication, and distributed messages (among others) won&amp;#8217;t work.&lt;/p&gt;


	&lt;p&gt;This might seem like a pain but in practice its not so bad. When you have multiple nodes in a single cluster &lt;del&gt;- all nodes sharing the same Erlang cookie -&lt;/del&gt; a new node only has to ping one of them to know about all of them. The new node will receive a &amp;#8220;brain dump&amp;#8221; of cluster information from the node it pinged.&lt;/p&gt;


	&lt;p&gt;There is the nodefinder:http://code.google.com/p/nodefinder project which can automate this process entirely using several different discovery mechanisms.&lt;/p&gt;</description>
      <pubDate>Wed, 24 Sep 2008 18:20:12 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:977:4655</guid>
      <author>Kevin Smith</author>
      <link>http://forums.pragprog.com/forums/73/topics/977</link>
    </item>
    <item>
      <title>Episode 4: badarg posted by John Sutherland @ Wed, 24 Sep 2008 17:44:10 -0000</title>
      <description>&lt;p&gt;Thanks for your prompt reply Kevin, it seems to be working now.&lt;/p&gt;


	&lt;p&gt;I haven&amp;#8217;t changed the code, but if I don&amp;#8217;t ping foo from bar, &lt;code&gt;global:registered_names/0&lt;/code&gt; is empty, but after pinging contains what I would expect. Any insight on why that is?&lt;/p&gt;


	&lt;p&gt;Thanks again,&lt;br /&gt;John.&lt;/p&gt;</description>
      <pubDate>Wed, 24 Sep 2008 17:44:10 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:977:4654</guid>
      <author>John Sutherland</author>
      <link>http://forums.pragprog.com/forums/73/topics/977</link>
    </item>
    <item>
      <title>Episode 4: badarg posted by Kevin Smith @ Tue, 23 Sep 2008 20:56:01 -0000</title>
      <description>&lt;p&gt;Based on the error message, it looks like &amp;#8220;bar&amp;#8221; doesn&amp;#8217;t see message_router as a globally registered name. According to the docs for the global module:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;"If Name is not a globally registered name, the calling function
will exit with reason {badarg, {Name, Msg}}."&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;This looks suspiciously like your error. The only way I&amp;#8217;m able to recreate the error if I don&amp;#8217;t ping foo from bar before calling chat_client:register_nickname/1. I can suggest a couple of things to try:&lt;/p&gt;


	&lt;p&gt;1) Verify the output of global:registered_names/0 contains message_router in the list of global names before calling register_nick.&lt;/p&gt;


	&lt;p&gt;2) Verify both nodes are using the same code path. An easy way to do this is to start the nodes with the -pz option: &amp;#8220;erl -sname foo -setcookie erlang -pz ./ebin&amp;#8221;&lt;/p&gt;


	&lt;p&gt;If you&amp;#8217;ve done both of those, you can try sending a message directly to message_router via the global module: global:send(message_router, ignore_this) and see what happens. If you see the same error something is going wrong with global name replication between the two nodes.&lt;/p&gt;</description>
      <pubDate>Tue, 23 Sep 2008 20:56:01 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:977:4643</guid>
      <author>Kevin Smith</author>
      <link>http://forums.pragprog.com/forums/73/topics/977</link>
    </item>
    <item>
      <title>Episode 4: badarg posted by John Sutherland @ Tue, 23 Sep 2008 19:59:41 -0000</title>
      <description>&lt;p&gt;Hi Kevin,&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve been following along with your excellent screen-casts, but have come across a stumbling block.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve got pretty much everything working up to the end of Episode 4, bar one thing: chat_client:register_nickname/1 doesn&amp;#8217;t work from any other node (although it did work at the end of Ep3). The nodes can ping each other and global:registered_names returns what I would expect.&lt;/p&gt;


	&lt;p&gt;I thought this might be a problem with my code, but it also occurs with the downloaded code samples.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;(foo@Anberlin)5&amp;gt; chat_client:start_router().
yes
(foo@Anberlin)6&amp;gt; chat_client:register_nickname("John").
&amp;lt;0.65.0&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;pre&gt;&lt;code&gt;(bar@Anberlin)3&amp;gt; chat_client:register_nickname("John").
** exception exit: {badarg,{message_router,{register_nick,"John",&amp;lt;0.43.0&amp;gt;}}}
     in function  global:send/2&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Any thoughts?&lt;/p&gt;


	&lt;p&gt;Cheers,&lt;br /&gt;John.&lt;/p&gt;


	&lt;p&gt;PS. I&amp;#8217;m running Erlang 5.6.2 on &lt;span class="caps"&gt;OS X&lt;/span&gt;.&lt;/p&gt;</description>
      <pubDate>Tue, 23 Sep 2008 19:59:41 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:73:977:4642</guid>
      <author>John Sutherland</author>
      <link>http://forums.pragprog.com/forums/73/topics/977</link>
    </item>
  </channel>
</rss>
