## Building
-Functorrent can be build with [Cabal](https://www.haskell.org/cabal/) sandbox or
+Functorrent can be build with [Stack](https://github.com/commercialhaskell/stack) or
[Nix](https://nixos.org/nix/).
-### Cabal sandbox
+### Stack
Sandboxes give you per project independent containers, just like Python's
virtualenv.
$ git clone https://github.com/vu3rdd/functorrent && cd functorrent
- $ 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
### Building with Nix
[...]
[nix-shell] $ cabal configure && cabal build
+### Usage
+
+If you invoke functorrent without any options, it expects the contents of a torrent file
+to be given in stdin. So
+
+$ cat ubuntu-14.10-desktop-amd64.iso.torrent | functorrent
+[....]
+
+Or one can explicitly specify the torrent file as input.
+
+$ functorrent ubuntu-14.10-desktop-amd64.iso.torrent
+[...]
+
## Goals
- [Optimized for Fun](http://www.slideshare.net/autang/ofun-optimizing-for-fun).
- 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))
-- Easy for newbies like me to read and understand along side the spec.
+- Easy for newbies like me to read and understand alongside the spec.
- doctest and quickcheck tests.
- Follow Haskell Style Guide - https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md