<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Pragmatic Forums | Posts in topic 'question about 'irc lite''</title>
    <link>/forums/27/topics/129.rss</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <item>
      <title>question about 'irc lite' posted by Joe Armstrong @ Sun, 04 Nov 2007 19:53:30 +0000</title>
      <description>&lt;p&gt;You&amp;#8217;re quite right &amp;#8211; the call to controller/2 is the key to understanding everything.&lt;br /&gt;I say this on page 194 &amp;#8211; but it probably wasn&amp;#8217;t clear enough. In retrospect I think the &lt;span class="caps"&gt;IRC&lt;/span&gt;&lt;br /&gt;code is a little tricky to follow &amp;#8211; the graphics detracts from the algorithm (thought it does&lt;br /&gt;give a hint as to how to make a &lt;span class="caps"&gt;GUI&lt;/span&gt; in Erlang).&lt;/p&gt;


	&lt;p&gt;There is a much simpler example in the difficult to find &amp;#8220;getting started&amp;#8221; document at &lt;br /&gt;the main Erlang web site &amp;#8211; this describes a form of instant messenger &amp;#8211; which is somewhat simpler than the &lt;span class="caps"&gt;IRC&lt;/span&gt; example.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.erlang.org/doc/getting_started/conc_prog.html#3"&gt;http://www.erlang.org/doc/getting_started/conc_prog.html#3&lt;/a&gt;.5&lt;/p&gt;


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


	&lt;p&gt;/Joe Armstrong&lt;/p&gt;</description>
      <pubDate>Sun, 04 Nov 2007 19:53:30 +0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:27:129:1905</guid>
      <author>Joe Armstrong</author>
      <link>http://forums.pragprog.com/forums/27/topics/129</link>
    </item>
    <item>
      <title>question about 'irc lite' posted by Ittay Dror @ Sat, 03 Nov 2007 09:27:12 +0000</title>
      <description>&lt;p&gt;Maybe I found the answer. Does the call &amp;#8216;controller(C, self())&amp;#8217; in chat_group.erl means that all messages from C will now be routed to the chat_group process (by lib_chan_mm)? If so, I think this function (controller) should be explained in the previous chapter. Also, I think the message diagram should define where each message goes (&amp;#8216;login&amp;#8217; goes to the chat_server process, &amp;#8216;relay&amp;#8217; goes to the group controller)&lt;/p&gt;


	&lt;p&gt;Another minor question is about server_loop&amp;#8217;s handling of the login message. When it receives it and there&amp;#8217;s no group controller, it creates one, but forgets about the message. So I assume this relies on the client&amp;#8217;s behavior of resending login messages until acknowledged? If so, I think this should be pointed out (and why? why not start the group controller and then send it the login message?&lt;/p&gt;


	&lt;p&gt;Thank you,&lt;br /&gt;Ittay&lt;/p&gt;</description>
      <pubDate>Sat, 03 Nov 2007 09:27:12 +0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:27:129:1897</guid>
      <author>Ittay Dror</author>
      <link>http://forums.pragprog.com/forums/27/topics/129</link>
    </item>
    <item>
      <title>question about 'irc lite' posted by Ittay Dror @ Sat, 03 Nov 2007 09:06:53 +0000</title>
      <description>&lt;p&gt;Hi,&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m reading the book and I enjoy it very much. Good book, excellent language!&lt;/p&gt;


	&lt;p&gt;However, I have a problem understanding the chat server example on chapter 11.&lt;/p&gt;


	&lt;p&gt;In the code I see that when a string is typed into Widget it is sent with &amp;#8216;lib_chan_mm:send(MM, {relay, Nick, Str})&amp;#8217;. I understand this is received by mod_chat_controller which then forward it with &amp;#8216;chat_server ! {mm, MM, Msg}&amp;#8217;. so Msg is &amp;#8216;{relay, Nick, Str}&amp;#8217;. But when I look at server_loop, I see it only handles login messages by forwarding them to the group controller. Other messages seem to just be printed to the console (&amp;#8216;Msg&amp;#8217; pattern in server_loop).&lt;/p&gt;


	&lt;p&gt;What have I missed?&lt;/p&gt;


	&lt;p&gt;Thank you,&lt;br /&gt;Ittay&lt;/p&gt;</description>
      <pubDate>Sat, 03 Nov 2007 09:06:53 +0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:27:129:1896</guid>
      <author>Ittay Dror</author>
      <link>http://forums.pragprog.com/forums/27/topics/129</link>
    </item>
  </channel>
</rss>
