3 [![Join the chat at https://gitter.im/vu3rdd/functorrent](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vu3rdd/functorrent?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5 [![Build Status](https://travis-ci.org/vu3rdd/functorrent.svg?branch=master)](https://travis-ci.org/vu3rdd/functorrent)
9 Functorrent can be build with [Cabal](https://www.haskell.org/cabal/) sandbox or
10 [Nix](https://nixos.org/nix/).
14 Sandboxes give you per project independent containers, just like Python's
18 $ git clone https://github.com/vu3rdd/functorrent && cd functorrent
20 $ cabal install --only-dependencies --enable-tests
21 $ cabal build # binaries in ./dist/built/functorrent/*
25 ``$ nix-shell``` at the root of the source code repo should drop you into a
26 shell which has all the package dependencies installed.
31 [nix-shell] $ cabal configure && cabal build
35 - Become more profient with Haskell.
36 - Implement something non-trivial with Haskell (crypto, file operations, network
37 operations, concurrency, bit twiddling, DHT).
38 - Follow the spec - https://wiki.theory.org/BitTorrentSpecification
39 - Easy for newbies like me to read and understand along side the spec.
40 - doctest and quickcheck tests.
41 - Follow Haskell Style Guide - https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
45 - can decode torrent files (bencoding)
46 - talk to the tracker and get the peer list
47 - the `main' program takes a torrent file (in the local file system) as input and
48 prints the {ip,port} for each peer, after talking to the tracker.
54 * Get the file download working in the simplest possible way.
55 * Concurrency (threads per peer)
56 * other advanced features of Bit Torrent (like DHT).