Fall 2011, David Matuszek
You didn't take the Prolog quiz. Or you took it and did really badly. Now you want to make up those points by doing some extra work.
Okay, but it isn't just another Prolog assignment. No, you have to write an Erlang program.
It isn't "Hello world!" but it's pretty simple. But there wouldn't be any point unless you learned something special about Erlang, right?
Write a little "chat" program. It's going to be a pretty useless one, because both ends of the "chat" will be on the same computer (though they don't have to be).
You need two processes. Each process reads lines from the user, and sends each line that it reads to the other process, which prints it out. As a user, you should be able to type lines into either process, and have the other process print it out. When you type 'quit' or 'goodbye' into either process, the entire program should shut down cleanly.
You can have more than two processes, if you like (or if you need to). Maybe you want a "master" process to
spawn the two chat processes.
Ideally, each process should have it's own window (we're talking DOS-style windows, no GUI stuff), so that you know which process is which. I'm not sure how difficult that is. If it's too hard, you can type things into one "master" process, and have that process send your text to one of the two "chat" processes (maybe start your input with
2 to say which chat process you want it to go to)?
The details are up to you to work out.
10 "quiz points" for a program that works and meets the requirements. However, if you also took the quiz, then quiz grade + program grade cannot exceed 10 points total.
Wednesday, September 28, before 6am. Zip and turn in to Blackboard a file containing your
If you don't have access to Blackboard, get the matter resolved beforehand. I do not, under any circumstances, accept assignments submitted by email.