codetrotter_aoc_2019_solutions

Crates.iocodetrotter_aoc_2019_solutions
lib.rscodetrotter_aoc_2019_solutions
version0.9.0
sourcesrc
created_at2020-01-09 04:25:05.642455
updated_at2020-01-11 02:29:44.578788
descriptionAdvent of Code 2019 Solutions
homepage
repositoryhttps://github.com/ctsrc/aoc-2019
max_upload_size
id196817
size262,218
codetrotter (ctsrc)

documentation

README

Advent of Code 2019 Solutions

Crates.io

My solutions for Advent of Code 2019. You'll need the Rust toolchain to build from source – get it from the official site at https://rustup.rs. I am currently using Rust stable version 1.40.0 (cargo 1.40.0 bc8e4c8be 2019-11-22 + rustc 1.40.0 73528e339 2019-12-16).

See also: AoC'19 Puzzle Description HTML <article> Fragment to Markdown Converter.

Solved puzzles

Day Puzzle name Part 1 in Rust Part 2 in Rust Part 1 in Intcode Part 2 in Intcode
1 The Tyranny of the Rocket Equation Solved ⭐️ Solved ⭐️ Pending Pending
2 1202 Program Alarm Solved ⭐️ Solved ⭐️ Pending Pending
3 Crossed Wires Solved ⭐️ Solved ⭐️ Pending Pending
4 Secure Container Solved ⭐️ Solved ⭐️ Pending Pending
5 Sunny with a Chance of Asteroids Solved ⭐️ Solved ⭐️ Pending Pending
6 Universal Orbit Map Solved ⭐️ Solved ⭐️ Pending Pending
7 Amplification Circuit Solved ⭐️ Solved ⭐️ Pending Pending
8 Space Image Format Solved ⭐️ Solved ⭐️ Pending Pending
9 Sensor Boost Solved ⭐️ Solved ⭐️ Pending Pending
10 Pending Pending Pending Pending
11 Pending Pending Pending Pending
12 Pending Pending Pending Pending
13 Pending Pending Pending Pending
14 Pending Pending Pending Pending
15 Pending Pending Pending Pending
16 Pending Pending Pending Pending
17 Pending Pending Pending Pending
18 Pending Pending Pending Pending
19 Pending Pending Pending Pending
20 Pending Pending Pending Pending
21 Pending Pending Pending Pending
22 Pending Pending Pending Pending
23 Pending Pending Pending Pending
24 Pending Pending Pending Pending
25 Pending Pending Pending Pending

Docs

cargo doc --lib --no-deps --release --target-dir ../aoc-2019-docs/ --open

https://ctsrc.github.io/aoc-2019/doc/codetrotter_aoc_2019_solutions/

Running tests

cargo test

Clippy lints

cargo clean ; cargo clippy -- \
  -A clippy::suspicious_else_formatting \
  -A clippy::unreadable_literal \
  -A clippy::unnecessary_mut_passed

Then pick one of the things it complains about and look at all instances of only that.

For example:

touch src/lib.rs ; cargo clippy -- -A clippy::all -W clippy::trivially_copy_pass_by_ref

Running solutions

Running solution for highest day number solved

cargo run

Running solutions for all solved days with both parts

cargo run -- -a

Running solutions for selected days

Both parts of some day, for example day 3

cargo run -- days 3

Part one of some day, for example day 3 part 1

cargo run -- days 3.1

Part two of some day, for example day 3 part 2

cargo run -- days 3.2

Both parts of each of multiple days, for example days 1, 2 and 3

cargo run -- days 1 2 3

Selected parts of multiple days, for example day 3 part 1 and day 2 part 2 along with both parts of day 1.

cargo run -- days 3.1 2.2 1
Commit count: 0

cargo fmt