Code Monkey home page Code Monkey logo

advent2020's Introduction

Advent of Code 2020

These are my Advent of Code 2020 solutions. I try to focus on making clean and documented Haskell solutions to each puzzle.

We'll be chatting about AoC on IRC all December. You can find AoC discussion on freenode's ##adventofcode and #haskell (webchat)

Building

I recommend installing ghc with ghcup.

$ curl https://get-ghcup.haskell.org -sSf | sh

I'm using GHC 8.10.2 this year

$ ghcup install 8.10.2
$ ghcup set     8.10.2

cabal-install-3 is the best way to get things built

$ cabal update
$ cabal build

Running solutions

All the solutions take an optional command line argument that can be an input file name or - to read the input from stdin.

$ cabal run Day01
...
494475
267520550

Common libraries used

  • containers - Almost all of the solutions will benefit from having access to Map and Set types from this package.
  • megaparsec - Each problem features a simple text-file format input. Parser combinators make it easy to define the simple parser needed to consume these inputs.
  • doctest - Having checked examples in the documentation makes it easier to understand what code does and easy to add unit tests.

advent2020's People

Contributors

glguy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.