mheob / advent-of-code-2023

My personal template for Advent of Code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸŽ„ Advent of Code Template

  • Bun & TypeScript
  • Automatic day setup
  • Puzzle input automatically fetched
  • Performance metrics

This template is strongly inspired by the template from matijaoe.
Thanks for your inspiration!

Setup

Ensure bun is installed:

bun -v

if not installed, run this:

curl -fsSL https://bun.sh/install | bash

Install dependencies:

bun install

Set up a new day:

bun setup 1

Run day solutions:

bun day 1

For automatic puzzle input retrieval, define .env file with session cookie from adventofcode.com:

SESSION=
YEAR=2023

Structure

Generated day structure:

import { parseLines, readInput } from 'io';

const input = await readInput('day-01');

export const part1 = () => {
	const lines = parseLines(input);
	// TODO: add your code goes here
	return lines.length;
};

bun day <day-num> output:

πŸ•―οΈ Your result for day <DAY>:
🌲 Part One: 70698 (1.11 ms)
πŸŽ„ Part Two: 140471 (383.5 Β΅s)

Days

⭐ / ❌

Day Part 1 Part 2 Solution Advent of Code link
01 ⭐ ⭐ Link Day 01
02 ⭐ ⭐ Link Day 02
03 ⭐ ⭐ Link Day 03
04 ⭐ ⭐ Link Day 04
05 ⭐ ⭐ Link Day 05
06 ⭐ ⭐ Link Day 06
07 ⭐ ⭐ Link Day 07
08 ⭐ ⭐ Link Day 08
09 ⭐ ⭐ Link Day 09
10 ⭐ ⭐ Link Day 10
11 ⭐ ⭐ Link Day 11
12 ⭐ ⭐ Link Day 12
13 ⭐ ⭐ Link Day 13
14 ⭐ ⭐ Link Day 14
15 ⭐ ⭐ Link Day 15
16 ⭐ ⭐ Link Day 16
17 ⭐ ⭐ Link Day 17
18 ⭐ ⭐ Link Day 18
19 ⭐ ⭐ Link Day 19
20 ⭐ ⭐ Link Day 20
21 ⭐ ⭐ Link Day 21
22 ⭐ ⭐ Link Day 22
23 ⭐ ⭐ Link Day 23
24 ⭐ ❌ Link Day 24
25 ⭐ ❌ Link Day 25

About

My personal template for Advent of Code

License:MIT License


Languages

Language:TypeScript 99.7%Language:JavaScript 0.3%