Skip to content

BinaryProvider/advent-of-code

 
 

Repository files navigation

Build Status Codacy Badge Maintainability Test Coverage codecov Coverage Status snyk: vulnerabilities Greenkeeper badge Last Commit on GitHub code style: prettier

2019 Progress 2018 Progress 2017 Progress 2016 Progress 2015 Progress

Join me on my private leaderboard! You can find my invitation code here.

2019 Progress

Day Part One Part Two
TypeScript Rust TypeScript Rust
Day 1 0.3ms 1.6μs* 0.39ms 3.6μs*
Day 2 0.25ms 2.2μs* 11ms 1ms*
Day 3 154ms 151ms
Day 4 62ms 77ms
Day 5 1.2ms 1.25ms
Day 6 526ms 35ms
Day 7 9.4ms 13.5ms
Day 8 2.3ms 3.26ms
Day 9 1.62ms 107ms
Day 10 61ms 64ms
Day 11 44ms 10ms
Day 12 3ms 89ms
Day 13 16ms 223ms
Day 14
Day 15
Day 16
Day 17
Day 18
Day 19
Day 20
Day 21
Day 22
Day 23
Day 24
Day 25

2018 Progress

Day Part One Part Two
TypeScript Rust TypeScript Rust
Day 1 0.9ms 13μs 10ms 12.2μs
Day 2 9ms 9.6ms
Day 3 265ms 234ms
Day 4 6ms 4ms
Day 5 15ms 🌟 326ms
Day 6 230ms 46ms
Day 7 1ms 24ms
Day 8 6ms 🌟 6ms
Day 9 9ms 274ms
Day 10 305ms 305ms
Day 11 165ms 63007ms
Day 12 0.8ms 11ms
Day 13 17ms 51ms
Day 14 9.6ms 900ms
Day 15
Day 16
Day 17
Day 18
Day 19
Day 20
Day 21
Day 22
Day 23
Day 24
Day 25

2017 Progress

Day Part One Part Two
TypeScript Rust TypeScript Rust
Day 1 0.9ms 51μs* 0.9ms 59μs*
Day 2
Day 3
Day 4
Day 5
Day 6
Day 7
Day 8
Day 9
Day 10
Day 11
Day 12
Day 13
Day 14
Day 15
Day 16
Day 17
Day 18
Day 19
Day 20
Day 21
Day 22
Day 23
Day 24
Day 25

2016 Progress

Day Part One Part Two
TypeScript Rust TypeScript Rust
Day 1 0.37ms 0.48ms
Day 2
Day 3
Day 4
Day 5
Day 6
Day 7
Day 8
Day 9
Day 10
Day 11
Day 12
Day 13
Day 14
Day 15
Day 16
Day 17
Day 18
Day 19
Day 20
Day 21
Day 22
Day 23
Day 24
Day 25

2015 Progress

Day Part One Part Two
TypeScript Rust TypeScript Rust
Day 1 0.5ms 6.2μs* 1.2ms 1.9μs*
Day 2 2ms 194μs* 2.4ms 196μs*
Day 3 2.6ms 231μs* 2.8ms 256μs*
Day 4 663ms 506ms 19s 14s
Day 5 13ms 193μs 21ms 4ms
Day 6
Day 7
Day 8
Day 9
Day 10
Day 11
Day 12
Day 13
Day 14
Day 15
Day 16
Day 17
Day 18
Day 19
Day 20
Day 21
Day 22
Day 23
Day 24
Day 25

* measured on [email protected]

All benchmarks are calculated with input parsing. I plan to refactor my solutions so I can bench without it.


TypeScript

  1. Install Node.js

  2. Open with VS Code

  3. Install the suggested extensions when prompted (Recommended)

  4. Install the required packages

    npm i

    Select Current TS File launch option. F5 runs the file you're focusing in debug mode.

Testing

There are tests on every task. You can run them with

npm test

With coverage report

npm run test:coverage

or if you installed the recommended mocha extension you can run them with that

Rust

  1. Install Rust

  2. Open with VS Code

  3. Install the suggested extensions when prompted (Recommended)

  4. Install the required crates

    cargo build

    Select Current Rust Cargo launch option. F5 runs the cargo you're focusing in debug mode.

    Set Rust to default to nightly

    rustup default nightly

Running individual days

cargo run -p aoc201601

Testing

Run in the cargo you'd like to test

cargo test

Or in the workspace cargo if you'd like to run all tests

cargo test --all

Benchmarking

Run a specific days benchmark

cargo bench -p aoc201501

Or in the workspace cargo if you'd like to run all benchmarks (Takes a while!)

cargo bench --all

Scaffolding

cargo run -p scaffold 2016 01

Notes

All times are measured on [email protected]

🌟 marks my favourites

If you have material-icon-theme installed copy the "material-icon-theme.folders.associations" and "material-icon-theme.files.associations" to your user settings to see the custom icons

Right now the CodeClimate and Codecov coverage reporters only report the Node test coverage and the Coverall reporter only the Rust results. This is because for Node nyc generates lcov reports and Tarpaulin generates cobertura.xml type reports. Once either Rust gets a native coverage reporter that will output lcov or Tarpaulin supports lcov, these two reports can't be merged.


Technologies (TypeScript)

JavaScript runtime

Package manager for Node

Typed superset of JavaScript

Reactive programming with observable streams

Behaviour driven testing framework

Assertion library

Code coverage tool

Technologies (Rust)

Systems programmin language

Benchmarking tool

Linter for rust

Recommendations

IDE for everything. Settings

Font with ligatures

Services

Continuous Integration solution

Code Quality monitoring

Maintainability and Coverage reports

Vulnerability detection

Dependency watcher

Badges to look cool

About

My solutions for Advent of Code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 71.7%
  • Rust 26.7%
  • Smarty 1.6%