]> git.rkrishnan.org Git - functorrent.git/blob - README.md
more hlint cleanups
[functorrent.git] / README.md
1 # A command line BitTorrent client.
2
3 I started writing a BitTorrent client because it seemed like fun and I am learning Haskell and wanted to see if I can write something real with Haskell than just heat the room. It is turning out to be a lot of fun.
4
5 ### Building
6
7 You need to install [Stack](https://github.com/commercialhaskell/stack), either via
8 the OS package manager or via `cabal` (`cabal install stack`).
9
10     $ git clone https://github.com/vu3rdd/functorrent && cd functorrent
11     $ cabal install stack # or install stack by other means
12     $ stack build # binaries in $(pwd)/.stack-work/install/x86..../lts-2.16/7.8.4/bin/functorrent
13
14 ### Usage
15
16 If you invoke functorrent without any options, it expects the contents of a torrent file
17 to be given in stdin. So
18
19     $ cat ubuntu-14.10-desktop-amd64.iso.torrent | functorrent
20     [....]
21
22 Or one can explicitly specify the torrent file as input.
23
24     $ functorrent ubuntu-14.10-desktop-amd64.iso.torrent
25     [...]
26
27 ### Goals
28
29 - [Optimized for Fun](http://www.slideshare.net/autang/ofun-optimizing-for-fun).
30   (should have called it "funtorrent")
31 - Become more profient with Haskell.
32 - Implement something non-trivial with Haskell (crypto, file operations, network
33   operations, concurrency, bit twiddling, DHT).
34 - Follow the spec ([official spec](http://bittorrent.org/beps/bep_0003.html), [unofficial spec](https://wiki.theory.org/BitTorrentSpecification))
35 - Easy for newbies like me to read and understand alongside the spec.
36 - doctest and quickcheck tests.
37 - Follow Haskell Style Guide - https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
38
39 ### Current Status
40
41 - most of the peer wire protocol works.
42 - talks only to one peer at the moment.
43 - can download files. But needs every piece to be served by the peer it connected to.
44
45 ### WARNING
46
47 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.
48
49 ## TODO
50
51 *    Test suite.
52 *    Talk to multiple peers concurrently.
53 *    Piece download algorithms.
54 *    Multifile torrent support.
55 *    other advanced features of BitTorrent (like DHT).
56
57 ### Misc
58
59 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.