Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moelf/aoc2023
Advent of Code 2023
https://github.com/moelf/aoc2023
advent-of-code advent-of-code-2023
Last synced: 2 months ago
JSON representation
Advent of Code 2023
- Host: GitHub
- URL: https://github.com/moelf/aoc2023
- Owner: Moelf
- License: mit
- Created: 2023-11-30T19:31:17.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-25T21:22:30.000Z (about 1 year ago)
- Last Synced: 2024-05-01T13:11:54.888Z (8 months ago)
- Topics: advent-of-code, advent-of-code-2023
- Language: Python
- Homepage:
- Size: 325 KB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://github.com/Moelf/AoC2023/workflows/CI/badge.svg)](https://github.com/Moelf/AoC2023/actions)
Advent of Code 2023: https://adventofcode.com/2023
## How to contribute
- upload input and solutions in the same PR. Name and clean up them properly
- when adding a new programming language, remember to update `runtests.jl` to "teach" it how to compile & run the ``When testing locally, you can choose languages you want. For example, to avoid building C++ with bezel:
to run - `julia runtests.jl python cpp`
```
> julia runtests.jl python cpp
Test Summary: | Pass Total Time
Day 00 | 4 4 0.3s
python 00.py 00_test.txt | 2 2 0.0s
cpp 00.cpp 00_test.txt | 2 2 0.3s
```## Repo structure
```bash
AoC2023/
├── runtests.jl
├── inputs
│ ├── 00_test.txt
│ ├── 01_bauerc.txt
│ └── 01_moelf.txt
├── solutions
│ ├── 00_test.txt
│ ├── 01_bauerc.txt
│ └── 01_moelf.txt
└── src
├── cpp
│ ├── 00.cpp
│ └── 01.cpp
└── julia
├── 00_test.jl
└── 01_bauerc_moelf.jl
```- the input files should be named as `_.txt`, the content should be the input of the day without any dangling empty lines at the end
- the solutions files should be named exactly as corresponding input file, the content should be exactly one or two lines (depending on if you solved both parts)
- the `src//_.` should matched the double-digit day number convention. The `` should match what appears in [`runtests.jl`](https://github.com/Moelf/AoC2023/blob/main/runtests.jl#L18-L28)## Note for Julia
Each `_julia.jl` script should use a `main()` and `@__FILE__` pattern similar to:
```julia
function main(path)
println("hello world")
println("solution 2")
end(abspath(PROGRAM_FILE) == @__FILE__) && main(ARGS[1])
```this way we can put each script int a `DayN` module and compile only once per day.