My solutions to the 2022 Advent of Code challenge. I'm not competing on any leaderboards this year, but I do plan to complete both parts of all days. As usual, I'm also prioritizing readable code over compact or "magic" solutions. Feedback and questions are welcome!
- From Rider IDE:
- select one of the included run configurations and click "Run" or "Debug".
- From a terminal:
- Open a terminal and navigate to the solution root.
- Execute
dotnet run --configuration Release --project Main -- <command> [options]- Supported commands:
list <what>- list data from internal registries.whatspecifies what data to return and can be one of these options:solutions [day] [part]- list available solutions.dayandpartboth default toall.inputs [day] [part] [variant]- list registered input files for a solution.day,part, andvariantall default toall.
run [day] [part] [variant] [options]- run one or more solutions.dayandpartboth default toall.variantdefaults to null, which means no variants will be selected. Supports options:[--input {id | name | type}]- select a registered input file to use. Uselist inputsto show all options. Applies to all selected days/parts.[--custom-input path_to_input]- specify an custom, external input file to use. Applies to all selected days/parts.
bench [day] [part] [variant] [options]- benchmark one or more solutions. Supports same options and defaults asrun, and additionally supports:[--min-warmup-time time_in_ms]- set the minimum time (in milliseconds) to run warmup rounds (default 2000ms).[--min-warmup-rounds num_rounds]- set the minimum number of warmup rounds (default 10).[--min-sample-time time_in_ms]- set the minimum time (in milliseconds) to run sampling (benchmark) rounds (default 10000ms).[--min-sample-rounds num_rounds]- set the minimum number of sampling (benchmark) rounds (default 10).[--no-warmup]- skip warmup rounds entirely. Useful when using an external profiler.
--help [command]- show help.--version- show project version.
- Options:
--vebose- Show verbose / debug output. Defaults to off.
- Parameters:
day- should be inDay##format. Can also be the stringallto select all days.part- should be inPart#format. Can also be the stringallto select all parts.variant- format is day/part-specific. Can also be the stringallto select all variants.path_to_input- if set, overrides the input file. Path is resolved relative to the current working directory.command- if set, shows detailed help about a specific command.
- Supported commands:
- Dotnet 6 is required to run the solutions.
- Project files are included for JetBrains Rider, but the solution should work in Visual Studio or with the dotnet command line.
- Solutions should run on any supported .NET platform.