Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adityachandak287/aoc-2023
Advent of Code 2023 solutions
https://github.com/adityachandak287/aoc-2023
Last synced: about 7 hours ago
JSON representation
Advent of Code 2023 solutions
- Host: GitHub
- URL: https://github.com/adityachandak287/aoc-2023
- Owner: adityachandak287
- License: mit
- Created: 2023-12-02T17:38:04.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2023-12-18T16:33:27.000Z (11 months ago)
- Last Synced: 2024-05-28T23:38:38.798Z (6 months ago)
- Language: Go
- Size: 97.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Advent of Code 2023
Learn more: https://adventofcode.com/2023
## Typescript
```shell
bun run 01/1a.ts# Compile Typescript to Javascript (for node)
npx tsc 04/typescript/4b.ts --target es2016 --module nodenext --moduleResolution nodenext
node 04/typescript/4b.js
# Skip compile step with ts-node (much slower)
npx ts-node 04/typescript/4b.ts
```## Python
```shell
python3 02/2a.py# profile python code (output in index.html, decrease interval if not enough samples)
pyinstrument --interval=0.000001 --renderer html --outfile index.html 04/python/4b.py
```## Golang
```shell
go run ./04/go --input ./04/input-04.txt --part A# Build and run (much faster)
go build -o ./04/go/main ./04/go/main.go
./04/go/main --input ./04/input-04.txt --part A
```### Bootstrap
To bootstrap Golang solution for day 5 for example
1. Copy directory `./templates/go` into `./05`
2. Update `./05/go/go.mod` file module name to `module 05`
3. Run command `go work use 05/go`## Comparing performance by benchmarking using [hyperfine](https://github.com/sharkdp/hyperfine)
```shell
bash 04/bench.sh
```Benchmark output: [04/bench.log](04/bench.log)