GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Teque5/AdventOfCode: My Advent of Code Solutions

BranchesTags
Open more actions menu

Latest commit

 

History

156 Commits
156 Commits

Folders and files

NameName
Last commit message
Last commit date
2022
2022
 
 
2023
2023
 
 
2024
2024
 
 
2025
2025
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 

Repository files navigation

Advent of Code

This is repository holds my solutions to the Advent of Code puzzles.

Using

  1. export AOC_SESSION=D34DBEEF before running to get input dynamically from AoC server. How to get session cookie.
  2. cd YYYY; cargo run 4 runs just Day04.rs
  3. cargo run all runs all days
  4. cargo run --release all for fastest benchmark
  5. cargo test --doc runs all tests
  6. AOC_RENDER=1 cargo run all to render visualizations (if implemented)

Annual Thoughts

  • 2025: Rust & more visualizations
  • 2024: Rustaceans assemble! Focusing on faster solutions this year. Caching in rust feels quite clumsy compared to python's @lru_cache decorator.
  • 2023: Going with rust again!
  • 2022: Using this as an opportunity to learn rust. I did use python on some of the puzzles where I was racing against colleagues. :D

Visualizations

2025 Day04: Printing Department

2025 Day04: Printing Department

2025 Day03: Lobby

2025 Day03: Lobby

2025 Day01: Secret Entrance

2025 Day01: Secret Entrance

2024 Day18: RAM Run

2024 Day14: RAM Run

2024 Day14: Restroom Redoubt

2024 Day14: Restroom Redoubt

2022 Day15: Beacon Exclusion Zone

2022 Day15: Beacon Exclusion Zone

Most Useful Crates

Serde

use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug)]
struct Part {
    x: usize,
    m: usize,
    a: usize,
    s: usize,
}
// then later
let json_line: &str = "{x=787,m=2655,a=1222,s=2876}";
let some_part: Part = serde_json::from_str(&json_line).unwrap();
// and it adds the debug print so you can
println!("{:?}", some_part)

ProgressBar

let max = 777u64;
use indicatif::{ProgressBar, ProgressStyle};
let progress = ProgressBar::new(max);
progress.set_style(
    ProgressStyle::with_template(
        "{bar:40.cyan/blue} {pos:>9}/{len:9} [{eta} left] {msg}",
    ).unwrap(),
);
progress.set_message("finding repeating sequence...");
for idx in 0..max {
    // do something
    progress.set_position(idx as u64);
}
progress.finish_with_message("Done");

Rayon

use rayon::prelude::*;
use std::sync::atomic::{AtomicUsize, Ordering};
acc = AtomicUsize::new(0);
lines.par_iter().for_each(|line| {
    // do something
    acc.fetch_add(1, Ordering::Relaxed);
})
let final_acc = acc.load(Ordering::Relaxed);

Requirements

  • libssl needed for aoc input fetch
  • ffmpeg needed for animated GIFs (2024 day14)
apt install libssl-dev ffmpeg

About

My Advent of Code Solutions

Topics

advent-of-codeadventofcode

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.