Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mitchellwrosen/haskell-chat-server-example
https://github.com/mitchellwrosen/haskell-chat-server-example
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mitchellwrosen/haskell-chat-server-example
- Owner: mitchellwrosen
- License: other
- Created: 2014-03-28T04:29:43.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2020-02-01T23:16:06.000Z (almost 5 years ago)
- Last Synced: 2024-10-03T15:17:07.387Z (3 months ago)
- Language: Haskell
- Size: 9.77 KB
- Stars: 15
- Watchers: 5
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is an extended version of the chat server from Simon Marlow's
[Parallel and Concurrent Programming in Haskell](http://chimera.labs.oreilly.com/books/1230000000929). I added support
for multiple chat channels, and re-implemented ```broadcast``` using a broadcast channel, to avoid a transaction
involving an unbounded number of ```TChan```s (as suggested in the chapter recap). Hopefully someone finds this code
useful.You can buy the book at the link above, or read it online for free. Here's the relevant section:
[link](http://chimera.labs.oreilly.com/books/1230000000929/ch12.html#sec_chat).For noobs:
```
git clone [email protected]:mitchellwrosen/haskell-chat-server-example.git
cd haskell-chat-server-example
cabal sandbox init
cabal update
cabal install --only-dependencies
cabal run
(in another terminal)
nc localhost 44444
```