X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=README.md;h=2e4886ca28d1928ef768353217ce845fb803e444;hb=e1edd01d136082aa14fbd9b53c12344efc447466;hp=fe9e6b51a1e16eb60dd19303dbce20725216fe2c;hpb=98fb1acf36bb318266a95284760866faff505765;p=advent-of-code-16.git diff --git a/README.md b/README.md index fe9e6b5..2e4886c 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,8 @@ --- title: "Advent of Code 2016" -output: - html_document: - css: modest.css +output: html_document +css: modest.css --- - - -# Advent of Code 2016 - Code to solve the [Advent of Code](http://adventofcode.com/2016/) puzzles. This year, I'm trying to use the puzzles as a prompt to learn [Haskell](https://wiki.haskell.org/Haskell). [Learn you a Haskell](http://learnyouahaskell.com/chapters), [Introduction to Haskell 98](https://www.haskell.org/tutorial/index.html), and [Hackage](https://hackage.haskell.org/) are good resources. @@ -18,9 +13,17 @@ $ sudo aptitude install haskell-platform ``` ). +I'm also using some extra libraries. Before installing, run `cabal update` then set `library-profiling: True` in `~/.cabal/config` . Then install the packages with +``` +$ cabal install MissingH +$ cabal install parsec-numbers +$ cabal install cryptonite +$ cabal install pqueue +``` + Compile the code with ``` -ghc -o advent01 advent01.hs +ghc --make advent01.hs ``` then run it as @@ -28,4 +31,17 @@ then run it as advent01 ``` -(Using the [Modest styles](https://github.com/markdowncss/modest).) \ No newline at end of file +If you're profiling, compile and run with +``` +ghc -O2 --make advent01.hs -prof -auto-all -caf-all -fforce-recomp -rstopts +time ./advent01 +RTS -p -hy +``` + +and create the profile picture with `h2ps advent01.hp` . + +Build this readme file wth +``` +pandoc -s README.md > README.html +``` + +(Using the [Modest style](https://github.com/markdowncss/modest).) \ No newline at end of file