Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/agilous/2022-advent-of-code

My solutions for the 2022 Advent of Code
https://github.com/agilous/2022-advent-of-code

advent-of-code advent-of-code-2022

Last synced: 9 days ago
JSON representation

My solutions for the 2022 Advent of Code

Awesome Lists containing this project

README

        

# Advent of Code 2022
My solutions for the [2022 Advent of Code](https://adventofcode.com/2022)
Challenge. [Here](https://github.com/topics/advent-of-code-2022?l=ruby) are
other Ruby based submissions. Also, I'm beginning to investigate
[Rust](https://github.com/topics/advent-of-code-2022?l=rust).

**Current Benchmarks**
```
user system total real
day01 0.000837 0.000038 0.000875 ( 0.001062)
day02 0.005289 0.000170 0.005459 ( 0.005628)
day03 0.001741 0.000049 0.001790 ( 0.001946)
day04 0.008749 0.000155 0.008904 ( 0.008929)
day05 0.002622 0.000000 0.002622 ( 0.002613)
day06 0.004572 0.000067 0.004639 ( 0.004829)
day07 0.193970 0.001291 0.195261 ( 0.195449)
day08 0.051589 0.000315 0.051904 ( 0.052588)
```

## Requirements
* Ruby 3.1.2
* A recent version of git

## Setup
With the requirements above run the following in a terminal:
```shell
git clone [email protected]:agilous/2022-advent-of-code.git
cd 2022-advent-of-code
./bin/setup
```

## Usage
Substituting the desired day (01-25) for 'XX' below, in a terminal run:
```shell
irb -r ./day_XX/day_XX.rb
```
In the resulting irb session run:
```ruby
DayXX.new.solution
```

## Benchmarks
In a terminal run:
```shell
./bin/benchmark
```

## Testing
In a terminal run:
```shell
./bin/test
```