[erlang-questions] The Book, lib_chan and IRC Lite

Joe Armstrong erlang@REDACTED
Tue Aug 7 09:28:50 CEST 2007


This is very strange - Possible some software rot has set it, or the
distributed code
is corrupt - we'll have to try and get to the bottom of this.

Just to test, I downloaded *everything* from the prag site and tested
things. here's
what I did.

Download the code from the link on
http://www.pragmaticprogrammer.com/titles/jaerlang/code.html

unpacked the archive.

Then:

cd code
> make
... lots of output
$ cd socket_dist
$ make

mkdir -p /home/ejoearm/.erlang_config/
cp conf /home/ejoearm/.erlang_config/lib_chan.conf
make clean - clean up
To run the chat test program
  1) start two xterms
  2) in xterm one type -- make chat_server
  3) in xterm two type -- make chat_client
  Note: remember to type make in the directory above this
        before running make in this directory
To run the lib_chan test program
  1) start two xterms
  2) in xterm one type -- make server
  3) in xterm two type -- make client

You should get something like this - "ejoarm" is the value of my $HOME
environment
variable.

Then I just obey the instructions. start two xterms and do make
chat_server in one
and make chat_client in the other.

This worked for me just as in the book.

>From your mail I cannot see what you did.

Can you repeat what I've just done starting with a clean copy of the code,
and see if it works.

If it does not work I'll need to see *all* the output to figure out
what is going wrong.

With a little poking around we should be able to find out what's going wrong.

Cheers

/Joe Armstrong




On 8/4/07, Dmitrii 'Mamut' Dimandt <dmitriid@REDACTED> wrote:
>
>  I'm stupid and I am not afraid to admit it :)
>
>  I'm currently battling the IRC Lite from chapter 11 of "Programming
> Erlang". Whatever I do (copy paste, run make in the code directory obtained
> from the biik's site etc.) I get the following error when I run the example:
>
> lib_chan_mm: protocol error:{login,"general","joe"}
>  Does anyone else run into the same problem? Of course, I am going to dig
> deeper into the code and try and locate the error myself. But I was
> surprised to be bitten by this :(
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list