- $ cabal sandbox init
- $ cabal install --only-dependencies --enable-tests
- $ cabal build # binaries in ./dist/built/functorrent/*
+ $ cabal install stack # or install stack by other means
+ $ stack build # binaries in $(pwd)/.stack-work/install/x86..../lts-2.16/7.8.4/bin/functorrent
+
+### Usage
- Become more profient with Haskell.
- Implement something non-trivial with Haskell (crypto, file operations, network
operations, concurrency, bit twiddling, DHT).
- Follow the spec ([official spec](http://bittorrent.org/beps/bep_0003.html), [unofficial spec](https://wiki.theory.org/BitTorrentSpecification))
- Become more profient with Haskell.
- Implement something non-trivial with Haskell (crypto, file operations, network
operations, concurrency, bit twiddling, DHT).
- Follow the spec ([official spec](http://bittorrent.org/beps/bep_0003.html), [unofficial spec](https://wiki.theory.org/BitTorrentSpecification))
- doctest and quickcheck tests.
- Follow Haskell Style Guide - https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
- doctest and quickcheck tests.
- Follow Haskell Style Guide - https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
-- can decode torrent files (bencoding)
-- talk to the tracker and get the peer list
-- the `main' program takes a torrent file (in the local file system) as input and
- prints the {ip,port} for each peer, after talking to the tracker.
+- most of the peer wire protocol works.
+- talks only to one peer at the moment.
+- can download files. But needs every piece to be served by the peer it connected to.
+
+### WARNING
+
+This client is not usable as your daily BitTorrent client yet. You may get corrupted files and end up wasting a lot of bandwidth. So, until we achieve some robustness, consider this as a programmer-friendly project to learn about a bunch of stuff.
-* Peer protocol.
-* Get the file download working in the simplest possible way.
-* Concurrency (threads per peer)
-* other advanced features of Bit Torrent (like DHT).
+* Talk to multiple peers concurrently.
+* Piece download algorithms.
+* Multifile torrent support.
+* other advanced features of BitTorrent (like DHT).
+
+### Misc
+
+The Bangalore Haskell group forked an early version of this code and started to develop it as a group. My code has diverged a lot from it. Both are calling it functorrent. Perhaps that needs to be fixed.