Giter Site home page Giter Site logo

aoc23's Introduction

Advent of Code 2023

About Language: Rust License: MIT Days completed Stars

This is the third year in a row I (plan to) use rust to solve Advent of Code. But I must warn you: I haven't programmed a lot over the past year, so I am likely not in the best shape (School has been rough - I need a break) - expect the worst.

Just like last year, I am lazy and currently setting this project up in a hurry (In class, actually) just so I have the basic framework once the event starts. So this project is literally a cleaned-up copy of my solutions for the previous year, which in term are a cleaned up version of my Advent of Code 2021 solutions.
The Following therefore still contains screenshots of the 2021 binary. The usage is the same, but the name is aoc23 instead of aoc21

Later on, maybe even before AoC starts, I'll clean this up more, maybe create a crate out of the framework so I don't have to copy each year over and over again.

Usage

There are multiple ways to run my solutions, the easiest and most comfortable one is the auto command:
It automatically downloads your input. For this it requires you to provide your Advent of Code session id, which you can find in the websites cookies after logging in.
Simply provide the session token by setting the AOC_SESSION environment variable or using the -s argument:
AOC_SESSION=XXXMYSESSION ./aoc23 [DAY] auto or ./aoc23 [DAY] auto -s XXXMYSESSION.
In this example, the environment variable for the AoC session is set using export AOC_SESSION=XXXMYSESSION, so I can run the command without specifying the session token again:
auto command in action

If you don't want to automatically download the input, you can also use the run command, which uses a locally stored file or the stdin input:
./aoc23 [DAY] run -f my_input.txt:
run command in action

If you just want to run the day's example, simply use the test command, as this project already includes the examples: ./aoc23 [DAY] test:
test command in action

Compiling

This project uses Cargo, so compiling is pretty easy:
cargo build --release
The resulting binary can be found at ./targets/release/aoc22. You can also directly run the project using cargo run --release [arguments for aoc23]
the --release option is not required, but it results in better performance.

Check out other AoC23 solutions

Repository Language

This list is not complete yet, as the event has not started yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.