Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrewbrennanfr/advent-of-code-2024
My (very ðĪŠ) opinionated TypeScript repository for Advent of Code 2024!
https://github.com/andrewbrennanfr/advent-of-code-2024
advent-of-code bun functional-programming typescript
Last synced: 3 days ago
JSON representation
My (very ðĪŠ) opinionated TypeScript repository for Advent of Code 2024!
- Host: GitHub
- URL: https://github.com/andrewbrennanfr/advent-of-code-2024
- Owner: andrewbrennanfr
- Created: 2024-10-22T05:58:56.000Z (26 days ago)
- Default Branch: master
- Last Pushed: 2024-11-13T20:45:44.000Z (3 days ago)
- Last Synced: 2024-11-13T21:36:44.724Z (3 days ago)
- Topics: advent-of-code, bun, functional-programming, typescript
- Language: JavaScript
- Homepage: https://adventofcode.com/
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ð Advent of Code 2024 ð
Welcome to my **Advent of Code 2024** repository! Built with **TypeScript** and grounded in **functional programming**.
---
## ⥠Why Bun?
This project uses **Bun**, a fast JavaScript runtime ideal for Advent of Code:
- **Tail Call Optimization (TCO)**: Enables deep recursion without stack overflow.
- **High Performance**: Optimized JIT for complex Advent of Code computations.
- **Built-In Test Runner**: Allows easy test setup and validation of solutions.
- **Native TypeScript Support**: Type-safe coding without extra compilation.For more, visit [Bun's website](https://bun.sh/).
## ðĶ Getting Started
1. **Clone the Repository:**
```sh
git clone https://github.com/andrewbrennanfr/advent-of-code-2024.git
cd advent-of-code-2024
```2. **Install Dependencies:**
```sh
bun install
```3. **Set Up Git Hooks (using Husky):**
```sh
bun husky
```## ð Key Scripts
- **`bun check`** â TypeScript type-checking.
- **`bun format`** â Code formatting with Prettier.
- **`bun lint`** â Linting with ESLint.
- **`bun new NN`** â Creates a new puzzle directory and starts tests.
- **`bun start`** â Runs all tests in watch mode.
- **`bun start NN`** â Runs tests in directory `NN` in watch mode.
- **`bun test`** â Runs all tests once.
- **`bun test NN`** â Runs tests in directory `NN` once.---
## ð§ Project Philosophy
### Functional Programming
Emphasizes pure functions, recursion, and higher-order functions for clear, maintainable solutions.
### Immutability
To reduce side effects, data is kept immutable by default, with mutations allowed only for `Map` and `Set` instances named with a `mutable` prefix (e.g., `mutableMap`, `mutableSet`).
> â ïļ **Note**: Use mutable collections with caution due to potential side effects.
---
## ð Puzzle Inputs
Puzzle input files are excluded from version control per [Advent of Code's guidelines](https://adventofcode.com/2024/about).
---
## ð License
Licensed under the MIT License.
---
ð Happy solving!