mirror of
				https://github.com/theoludwig/advent_of_code.git
				synced 2025-09-11 23:11:18 +02:00 
			
		
		
		
	chore: simplify structure + multiple years of advent of code possible
This commit is contained in:
		| @@ -1 +0,0 @@ | ||||
| { "extends": ["@commitlint/config-conventional"] } | ||||
							
								
								
									
										20
									
								
								.github/ISSUE_TEMPLATE/BUG.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								.github/ISSUE_TEMPLATE/BUG.md
									
									
									
									
										vendored
									
									
								
							| @@ -1,20 +0,0 @@ | ||||
| --- | ||||
| name: "🐛 Bug Report" | ||||
| about: "Report an unexpected problem or unintended behavior." | ||||
| title: "[Bug]" | ||||
| labels: "bug" | ||||
| --- | ||||
|  | ||||
| <!-- | ||||
|   Please provide a clear and concise description of what the bug is. Include | ||||
|   screenshots if needed. Please make sure your issue has not already been fixed. | ||||
| --> | ||||
|  | ||||
| ## Steps To Reproduce | ||||
|  | ||||
| 1. Step 1 | ||||
| 2. Step 2 | ||||
|  | ||||
| ## The current behavior | ||||
|  | ||||
| ## The expected behavior | ||||
							
								
								
									
										18
									
								
								.github/ISSUE_TEMPLATE/DOCUMENTATION.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								.github/ISSUE_TEMPLATE/DOCUMENTATION.md
									
									
									
									
										vendored
									
									
								
							| @@ -1,18 +0,0 @@ | ||||
| --- | ||||
| name: "📜 Documentation" | ||||
| about: "Correct spelling errors, improvements or additions to documentation files (README, CONTRIBUTING...)." | ||||
| title: "[Documentation]" | ||||
| labels: "documentation" | ||||
| --- | ||||
|  | ||||
| <!-- Please make sure your issue has not already been fixed. --> | ||||
|  | ||||
| ## Documentation | ||||
|  | ||||
| <!-- Please uncomment the type of documentation problem this issue address --> | ||||
|  | ||||
| <!-- Documentation is Missing --> | ||||
| <!-- Documentation is Confusing --> | ||||
| <!-- Documentation has Typo errors --> | ||||
|  | ||||
| ## Proposal | ||||
							
								
								
									
										20
									
								
								.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
									
									
									
									
										vendored
									
									
								
							| @@ -1,20 +0,0 @@ | ||||
| --- | ||||
| name: "✨ Feature Request" | ||||
| about: "Suggest a new feature idea." | ||||
| title: "[Feature]" | ||||
| labels: "feature request" | ||||
| --- | ||||
|  | ||||
| <!-- Please make sure your issue has not already been fixed. --> | ||||
|  | ||||
| ## Description | ||||
|  | ||||
| <!-- A clear and concise description of the problem or missing capability... --> | ||||
|  | ||||
| ## Describe the solution you'd like | ||||
|  | ||||
| <!-- If you have a solution in mind, please describe it. --> | ||||
|  | ||||
| ## Describe alternatives you've considered | ||||
|  | ||||
| <!-- Have you considered any alternative solutions or workarounds? --> | ||||
							
								
								
									
										20
									
								
								.github/ISSUE_TEMPLATE/IMPROVEMENT.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								.github/ISSUE_TEMPLATE/IMPROVEMENT.md
									
									
									
									
										vendored
									
									
								
							| @@ -1,20 +0,0 @@ | ||||
| --- | ||||
| name: "🔧 Improvement" | ||||
| about: "Improve structure/format/performance/refactor/tests of the code." | ||||
| title: "[Improvement]" | ||||
| labels: "improvement" | ||||
| --- | ||||
|  | ||||
| <!-- Please make sure your issue has not already been fixed. --> | ||||
|  | ||||
| ## Type of Improvement | ||||
|  | ||||
| <!-- Please uncomment the type of improvements this issue address --> | ||||
|  | ||||
| <!-- Files and Folders Structure --> | ||||
| <!-- Performance --> | ||||
| <!-- Refactoring code --> | ||||
| <!-- Tests --> | ||||
| <!-- Not Sure? --> | ||||
|  | ||||
| ## Proposal | ||||
							
								
								
									
										8
									
								
								.github/ISSUE_TEMPLATE/QUESTION.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								.github/ISSUE_TEMPLATE/QUESTION.md
									
									
									
									
										vendored
									
									
								
							| @@ -1,8 +0,0 @@ | ||||
| --- | ||||
| name: "🙋 Question" | ||||
| about: "Further information is requested." | ||||
| title: "[Question]" | ||||
| labels: "question" | ||||
| --- | ||||
|  | ||||
| ### Question | ||||
							
								
								
									
										7
									
								
								.github/PULL_REQUEST_TEMPLATE.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/PULL_REQUEST_TEMPLATE.md
									
									
									
									
										vendored
									
									
								
							| @@ -1,7 +0,0 @@ | ||||
| <!-- Please first discuss the change you wish to make via issue before making a change. It might avoid a waste of your time. --> | ||||
|  | ||||
| # What changes this PR introduce? | ||||
|  | ||||
| ## List any relevant issue numbers | ||||
|  | ||||
| ## Is there anything you'd like reviewers to focus on? | ||||
							
								
								
									
										22
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -11,12 +11,13 @@ env: | ||||
|  | ||||
| jobs: | ||||
|   ci: | ||||
|     timeout-minutes: 30 | ||||
|     runs-on: "ubuntu-latest" | ||||
|     strategy: | ||||
|       matrix: | ||||
|         rust-version: ["1.74.0", "stable"] | ||||
|         rust-version: ["1.84.1", "stable"] | ||||
|     steps: | ||||
|       - uses: "actions/checkout@v4.1.1" | ||||
|       - uses: "actions/checkout@v4.2.2" | ||||
|  | ||||
|       - uses: "dtolnay/rust-toolchain@master" | ||||
|         with: | ||||
| @@ -28,20 +29,3 @@ jobs: | ||||
|       - run: "cargo test --verbose" | ||||
|       - run: "cargo clippy --verbose -- -D warnings" | ||||
|       - run: "cargo fmt -- --check" | ||||
|  | ||||
|   lint-general: | ||||
|     runs-on: "ubuntu-latest" | ||||
|     steps: | ||||
|       - uses: "actions/checkout@v4.1.1" | ||||
|  | ||||
|       - name: "Setup Node.js" | ||||
|         uses: "actions/setup-node@v4.0.1" | ||||
|         with: | ||||
|           node-version: "20.x" | ||||
|  | ||||
|       - run: "npm clean-install" | ||||
|  | ||||
|       - run: 'npm run lint:commit -- --to "${{ github.sha }}"' | ||||
|       - run: "npm run lint:editorconfig" | ||||
|       - run: "npm run lint:markdown" | ||||
|       - run: "npm run lint:prettier" | ||||
|   | ||||
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1,2 +1,4 @@ | ||||
| target | ||||
| node_modules | ||||
| book | ||||
| .bin | ||||
|   | ||||
| @@ -1,12 +0,0 @@ | ||||
| { | ||||
|     "config": { | ||||
|         "extends": "markdownlint/style/prettier", | ||||
|         "default": true, | ||||
|         "relative-links": true, | ||||
|         "no-duplicate-heading": false, | ||||
|         "no-inline-html": false, | ||||
|     }, | ||||
|     "globs": ["**/*.md"], | ||||
|     "ignores": ["**/node_modules", "**/target"], | ||||
|     "customRules": ["markdownlint-rule-relative-links"], | ||||
| } | ||||
| @@ -1,3 +0,0 @@ | ||||
| { | ||||
|   "semi": false | ||||
| } | ||||
							
								
								
									
										9
									
								
								.vscode/extensions.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								.vscode/extensions.json
									
									
									
									
										vendored
									
									
								
							| @@ -1,9 +0,0 @@ | ||||
| { | ||||
|   "recommendations": [ | ||||
|     "editorconfig.editorconfig", | ||||
|     "esbenp.prettier-vscode", | ||||
|     "davidanson.vscode-markdownlint", | ||||
|     "rust-lang.rust-analyzer", | ||||
|     "tamasfe.even-better-toml" | ||||
|   ] | ||||
| } | ||||
							
								
								
									
										18
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							| @@ -1,18 +0,0 @@ | ||||
| { | ||||
|   "rust-analyzer.check.command": "clippy", | ||||
|   "[rust]": { | ||||
|     "editor.defaultFormatter": "rust-lang.rust-analyzer", | ||||
|     "editor.tabSize": 4, | ||||
|     "editor.formatOnSave": true | ||||
|   }, | ||||
|   "[toml]": { | ||||
|     "editor.defaultFormatter": "tamasfe.even-better-toml", | ||||
|     "editor.formatOnSave": true | ||||
|   }, | ||||
|   "editor.defaultFormatter": "esbenp.prettier-vscode", | ||||
|   "prettier.configPath": ".prettierrc.json", | ||||
|   "editor.formatOnSave": true, | ||||
|   "editor.codeActionsOnSave": { | ||||
|     "source.fixAll": "explicit" | ||||
|   } | ||||
| } | ||||
| @@ -1,132 +0,0 @@ | ||||
| # Contributor Covenant Code of Conduct | ||||
|  | ||||
| ## Our Pledge | ||||
|  | ||||
| We as members, contributors, and leaders pledge to make participation in our | ||||
| community a harassment-free experience for everyone, regardless of age, body | ||||
| size, visible or invisible disability, ethnicity, sex characteristics, gender | ||||
| identity and expression, level of experience, education, socio-economic status, | ||||
| nationality, personal appearance, race, religion, or sexual identity | ||||
| and orientation. | ||||
|  | ||||
| We pledge to act and interact in ways that contribute to an open, welcoming, | ||||
| diverse, inclusive, and healthy community. | ||||
|  | ||||
| ## Our Standards | ||||
|  | ||||
| Examples of behavior that contributes to a positive environment for our | ||||
| community include: | ||||
|  | ||||
| - Demonstrating empathy and kindness toward other people | ||||
| - Being respectful of differing opinions, viewpoints, and experiences | ||||
| - Giving and gracefully accepting constructive feedback | ||||
| - Accepting responsibility and apologizing to those affected by our mistakes, | ||||
|   and learning from the experience | ||||
| - Focusing on what is best not just for us as individuals, but for the | ||||
|   overall community | ||||
|  | ||||
| Examples of unacceptable behavior include: | ||||
|  | ||||
| - The use of sexualized language or imagery, and sexual attention or | ||||
|   advances of any kind | ||||
| - Trolling, insulting or derogatory comments, and personal or political attacks | ||||
| - Public or private harassment | ||||
| - Publishing others' private information, such as a physical or email | ||||
|   address, without their explicit permission | ||||
| - Other conduct which could reasonably be considered inappropriate in a | ||||
|   professional setting | ||||
|  | ||||
| ## Enforcement Responsibilities | ||||
|  | ||||
| Community leaders are responsible for clarifying and enforcing our standards of | ||||
| acceptable behavior and will take appropriate and fair corrective action in | ||||
| response to any behavior that they deem inappropriate, threatening, offensive, | ||||
| or harmful. | ||||
|  | ||||
| Community leaders have the right and responsibility to remove, edit, or reject | ||||
| comments, commits, code, wiki edits, issues, and other contributions that are | ||||
| not aligned to this Code of Conduct, and will communicate reasons for moderation | ||||
| decisions when appropriate. | ||||
|  | ||||
| ## Scope | ||||
|  | ||||
| This Code of Conduct applies within all community spaces, and also applies when | ||||
| an individual is officially representing the community in public spaces. | ||||
| Examples of representing our community include using an official e-mail address, | ||||
| posting via an official social media account, or acting as an appointed | ||||
| representative at an online or offline event. | ||||
|  | ||||
| ## Enforcement | ||||
|  | ||||
| Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||||
| reported to the community leaders responsible for enforcement at | ||||
| <contact@theoludwig.fr>. | ||||
| All complaints will be reviewed and investigated promptly and fairly. | ||||
|  | ||||
| All community leaders are obligated to respect the privacy and security of the | ||||
| reporter of any incident. | ||||
|  | ||||
| ## Enforcement Guidelines | ||||
|  | ||||
| Community leaders will follow these Community Impact Guidelines in determining | ||||
| the consequences for any action they deem in violation of this Code of Conduct: | ||||
|  | ||||
| ### 1. Correction | ||||
|  | ||||
| **Community Impact**: Use of inappropriate language or other behavior deemed | ||||
| unprofessional or unwelcome in the community. | ||||
|  | ||||
| **Consequence**: A private, written warning from community leaders, providing | ||||
| clarity around the nature of the violation and an explanation of why the | ||||
| behavior was inappropriate. A public apology may be requested. | ||||
|  | ||||
| ### 2. Warning | ||||
|  | ||||
| **Community Impact**: A violation through a single incident or series | ||||
| of actions. | ||||
|  | ||||
| **Consequence**: A warning with consequences for continued behavior. No | ||||
| interaction with the people involved, including unsolicited interaction with | ||||
| those enforcing the Code of Conduct, for a specified period of time. This | ||||
| includes avoiding interactions in community spaces as well as external channels | ||||
| like social media. Violating these terms may lead to a temporary or | ||||
| permanent ban. | ||||
|  | ||||
| ### 3. Temporary Ban | ||||
|  | ||||
| **Community Impact**: A serious violation of community standards, including | ||||
| sustained inappropriate behavior. | ||||
|  | ||||
| **Consequence**: A temporary ban from any sort of interaction or public | ||||
| communication with the community for a specified period of time. No public or | ||||
| private interaction with the people involved, including unsolicited interaction | ||||
| with those enforcing the Code of Conduct, is allowed during this period. | ||||
| Violating these terms may lead to a permanent ban. | ||||
|  | ||||
| ### 4. Permanent Ban | ||||
|  | ||||
| **Community Impact**: Demonstrating a pattern of violation of community | ||||
| standards, including sustained inappropriate behavior, harassment of an | ||||
| individual, or aggression toward or disparagement of classes of individuals. | ||||
|  | ||||
| **Consequence**: A permanent ban from any sort of public interaction within | ||||
| the community. | ||||
|  | ||||
| ## Attribution | ||||
|  | ||||
| This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||||
| version 2.0, available at | ||||
| [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0]. | ||||
|  | ||||
| Community Impact Guidelines were inspired by | ||||
| [Mozilla's code of conduct enforcement ladder][mozilla coc]. | ||||
|  | ||||
| For answers to common questions about this code of conduct, see the FAQ at | ||||
| [https://www.contributor-covenant.org/faq][faq]. Translations are available | ||||
| at [https://www.contributor-covenant.org/translations][translations]. | ||||
|  | ||||
| [homepage]: https://www.contributor-covenant.org | ||||
| [v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html | ||||
| [mozilla coc]: https://github.com/mozilla/diversity | ||||
| [faq]: https://www.contributor-covenant.org/faq | ||||
| [translations]: https://www.contributor-covenant.org/translations | ||||
| @@ -1,32 +0,0 @@ | ||||
| # 💡 Contributing | ||||
|  | ||||
| Thanks a lot for your interest in contributing to **theoludwig/advent_of_code_2023**! 🎉 | ||||
|  | ||||
| ## Code of Conduct | ||||
|  | ||||
| **theoludwig/advent_of_code_2023** adopted the [Contributor Covenant](https://www.contributor-covenant.org/) as its Code of Conduct, and we expect project participants to adhere to it. Please read [the full text](./CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated. | ||||
|  | ||||
| ## Open Development | ||||
|  | ||||
| All work on **theoludwig/advent_of_code_2023** happens directly on this repository. Both core team members and external contributors send pull requests which go through the same review process. | ||||
|  | ||||
| ## Types of contributions | ||||
|  | ||||
| - Reporting a bug. | ||||
| - Suggest a new feature idea. | ||||
| - Correct spelling errors, improvements or additions to documentation files (README, CONTRIBUTING...). | ||||
| - Improve structure/format/performance/refactor/tests of the code. | ||||
|  | ||||
| ## Pull Requests | ||||
|  | ||||
| - **Please first discuss** the change you wish to make via [issue](https://github.com/theoludwig/advent_of_code_2023/issues) before making a change. It might avoid a waste of your time. | ||||
|  | ||||
| - Ensure your code respect linting. | ||||
|  | ||||
| - Make sure your **code passes the tests**. | ||||
|  | ||||
| If you're adding new features to **theoludwig/advent_of_code_2023**, please include tests. | ||||
|  | ||||
| ## Commits | ||||
|  | ||||
| The commit message guidelines adheres to [Conventional Commits](https://www.conventionalcommits.org/) and [Semantic Versioning](https://semver.org/) for releases. | ||||
							
								
								
									
										325
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										325
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| # This file is automatically @generated by Cargo. | ||||
| # It is not intended for manual editing. | ||||
| version = 3 | ||||
| version = 4 | ||||
|  | ||||
| [[package]] | ||||
| name = "array-init" | ||||
| @@ -9,10 +9,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" | ||||
|  | ||||
| [[package]] | ||||
| name = "autocfg" | ||||
| version = "1.1.0" | ||||
| name = "bumpalo" | ||||
| version = "3.17.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" | ||||
| checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" | ||||
|  | ||||
| [[package]] | ||||
| name = "cfg-if" | ||||
| @@ -22,147 +22,89 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" | ||||
|  | ||||
| [[package]] | ||||
| name = "console" | ||||
| version = "0.15.7" | ||||
| version = "0.15.10" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" | ||||
| checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b" | ||||
| dependencies = [ | ||||
|  "encode_unicode", | ||||
|  "lazy_static", | ||||
|  "libc", | ||||
|  "once_cell", | ||||
|  "unicode-width", | ||||
|  "windows-sys", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "crossbeam-deque" | ||||
| version = "0.8.3" | ||||
| version = "0.8.6" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" | ||||
| checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" | ||||
| dependencies = [ | ||||
|  "cfg-if", | ||||
|  "crossbeam-epoch", | ||||
|  "crossbeam-utils", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "crossbeam-epoch" | ||||
| version = "0.9.15" | ||||
| version = "0.9.18" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" | ||||
| checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" | ||||
| dependencies = [ | ||||
|  "autocfg", | ||||
|  "cfg-if", | ||||
|  "crossbeam-utils", | ||||
|  "memoffset", | ||||
|  "scopeguard", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "crossbeam-utils" | ||||
| version = "0.8.16" | ||||
| version = "0.8.21" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" | ||||
| dependencies = [ | ||||
|  "cfg-if", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "day_1" | ||||
| version = "1.0.0" | ||||
|  | ||||
| [[package]] | ||||
| name = "day_2" | ||||
| version = "1.0.0" | ||||
|  | ||||
| [[package]] | ||||
| name = "day_3" | ||||
| version = "1.0.0" | ||||
|  | ||||
| [[package]] | ||||
| name = "day_4" | ||||
| version = "1.0.0" | ||||
|  | ||||
| [[package]] | ||||
| name = "day_5" | ||||
| version = "1.0.0" | ||||
| dependencies = [ | ||||
|  "indicatif", | ||||
|  "rayon", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "day_6" | ||||
| version = "1.0.0" | ||||
| dependencies = [ | ||||
|  "rayon", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "day_7" | ||||
| version = "1.0.0" | ||||
| dependencies = [ | ||||
|  "array-init", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "day_8" | ||||
| version = "1.0.0" | ||||
| checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" | ||||
|  | ||||
| [[package]] | ||||
| name = "either" | ||||
| version = "1.9.0" | ||||
| version = "1.13.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" | ||||
| checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" | ||||
|  | ||||
| [[package]] | ||||
| name = "encode_unicode" | ||||
| version = "0.3.6" | ||||
| version = "1.0.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" | ||||
| checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" | ||||
|  | ||||
| [[package]] | ||||
| name = "indicatif" | ||||
| version = "0.17.7" | ||||
| version = "0.17.11" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" | ||||
| checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" | ||||
| dependencies = [ | ||||
|  "console", | ||||
|  "instant", | ||||
|  "number_prefix", | ||||
|  "portable-atomic", | ||||
|  "rayon", | ||||
|  "unicode-width", | ||||
|  "web-time", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "instant" | ||||
| version = "0.1.12" | ||||
| name = "js-sys" | ||||
| version = "0.3.77" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" | ||||
| checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" | ||||
| dependencies = [ | ||||
|  "cfg-if", | ||||
|  "once_cell", | ||||
|  "wasm-bindgen", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "lazy_static" | ||||
| version = "1.4.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" | ||||
|  | ||||
| [[package]] | ||||
| name = "libc" | ||||
| version = "0.2.150" | ||||
| version = "0.2.169" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" | ||||
| checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" | ||||
|  | ||||
| [[package]] | ||||
| name = "memoffset" | ||||
| version = "0.9.0" | ||||
| name = "log" | ||||
| version = "0.4.25" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" | ||||
| dependencies = [ | ||||
|  "autocfg", | ||||
| ] | ||||
| checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" | ||||
|  | ||||
| [[package]] | ||||
| name = "number_prefix" | ||||
| @@ -171,16 +113,82 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" | ||||
|  | ||||
| [[package]] | ||||
| name = "portable-atomic" | ||||
| version = "1.6.0" | ||||
| name = "once_cell" | ||||
| version = "1.20.3" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" | ||||
| checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" | ||||
|  | ||||
| [[package]] | ||||
| name = "portable-atomic" | ||||
| version = "1.10.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" | ||||
|  | ||||
| [[package]] | ||||
| name = "proc-macro2" | ||||
| version = "1.0.93" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" | ||||
| dependencies = [ | ||||
|  "unicode-ident", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "puzzle_2023_day_1" | ||||
| version = "1.0.0" | ||||
|  | ||||
| [[package]] | ||||
| name = "puzzle_2023_day_2" | ||||
| version = "1.0.0" | ||||
|  | ||||
| [[package]] | ||||
| name = "puzzle_2023_day_3" | ||||
| version = "1.0.0" | ||||
|  | ||||
| [[package]] | ||||
| name = "puzzle_2023_day_4" | ||||
| version = "1.0.0" | ||||
|  | ||||
| [[package]] | ||||
| name = "puzzle_2023_day_5" | ||||
| version = "1.0.0" | ||||
| dependencies = [ | ||||
|  "indicatif", | ||||
|  "rayon", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "puzzle_2023_day_6" | ||||
| version = "1.0.0" | ||||
| dependencies = [ | ||||
|  "rayon", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "puzzle_2023_day_7" | ||||
| version = "1.0.0" | ||||
| dependencies = [ | ||||
|  "array-init", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "puzzle_2023_day_8" | ||||
| version = "1.0.0" | ||||
|  | ||||
| [[package]] | ||||
| name = "quote" | ||||
| version = "1.0.38" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" | ||||
| dependencies = [ | ||||
|  "proc-macro2", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "rayon" | ||||
| version = "1.8.1" | ||||
| version = "1.10.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" | ||||
| checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" | ||||
| dependencies = [ | ||||
|  "either", | ||||
|  "rayon-core", | ||||
| @@ -197,35 +205,114 @@ dependencies = [ | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "scopeguard" | ||||
| version = "1.2.0" | ||||
| name = "syn" | ||||
| version = "2.0.98" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" | ||||
| checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" | ||||
| dependencies = [ | ||||
|  "proc-macro2", | ||||
|  "quote", | ||||
|  "unicode-ident", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "unicode-ident" | ||||
| version = "1.0.17" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" | ||||
|  | ||||
| [[package]] | ||||
| name = "unicode-width" | ||||
| version = "0.1.11" | ||||
| version = "0.2.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" | ||||
| checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" | ||||
|  | ||||
| [[package]] | ||||
| name = "wasm-bindgen" | ||||
| version = "0.2.100" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" | ||||
| dependencies = [ | ||||
|  "cfg-if", | ||||
|  "once_cell", | ||||
|  "wasm-bindgen-macro", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "wasm-bindgen-backend" | ||||
| version = "0.2.100" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" | ||||
| dependencies = [ | ||||
|  "bumpalo", | ||||
|  "log", | ||||
|  "proc-macro2", | ||||
|  "quote", | ||||
|  "syn", | ||||
|  "wasm-bindgen-shared", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "wasm-bindgen-macro" | ||||
| version = "0.2.100" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" | ||||
| dependencies = [ | ||||
|  "quote", | ||||
|  "wasm-bindgen-macro-support", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "wasm-bindgen-macro-support" | ||||
| version = "0.2.100" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" | ||||
| dependencies = [ | ||||
|  "proc-macro2", | ||||
|  "quote", | ||||
|  "syn", | ||||
|  "wasm-bindgen-backend", | ||||
|  "wasm-bindgen-shared", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "wasm-bindgen-shared" | ||||
| version = "0.2.100" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" | ||||
| dependencies = [ | ||||
|  "unicode-ident", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "web-time" | ||||
| version = "1.1.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" | ||||
| dependencies = [ | ||||
|  "js-sys", | ||||
|  "wasm-bindgen", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "windows-sys" | ||||
| version = "0.45.0" | ||||
| version = "0.59.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" | ||||
| checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" | ||||
| dependencies = [ | ||||
|  "windows-targets", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "windows-targets" | ||||
| version = "0.42.2" | ||||
| version = "0.52.6" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" | ||||
| checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" | ||||
| dependencies = [ | ||||
|  "windows_aarch64_gnullvm", | ||||
|  "windows_aarch64_msvc", | ||||
|  "windows_i686_gnu", | ||||
|  "windows_i686_gnullvm", | ||||
|  "windows_i686_msvc", | ||||
|  "windows_x86_64_gnu", | ||||
|  "windows_x86_64_gnullvm", | ||||
| @@ -234,42 +321,48 @@ dependencies = [ | ||||
|  | ||||
| [[package]] | ||||
| name = "windows_aarch64_gnullvm" | ||||
| version = "0.42.2" | ||||
| version = "0.52.6" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" | ||||
| checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" | ||||
|  | ||||
| [[package]] | ||||
| name = "windows_aarch64_msvc" | ||||
| version = "0.42.2" | ||||
| version = "0.52.6" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" | ||||
| checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" | ||||
|  | ||||
| [[package]] | ||||
| name = "windows_i686_gnu" | ||||
| version = "0.42.2" | ||||
| version = "0.52.6" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" | ||||
| checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" | ||||
|  | ||||
| [[package]] | ||||
| name = "windows_i686_gnullvm" | ||||
| version = "0.52.6" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" | ||||
|  | ||||
| [[package]] | ||||
| name = "windows_i686_msvc" | ||||
| version = "0.42.2" | ||||
| version = "0.52.6" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" | ||||
| checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" | ||||
|  | ||||
| [[package]] | ||||
| name = "windows_x86_64_gnu" | ||||
| version = "0.42.2" | ||||
| version = "0.52.6" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" | ||||
| checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" | ||||
|  | ||||
| [[package]] | ||||
| name = "windows_x86_64_gnullvm" | ||||
| version = "0.42.2" | ||||
| version = "0.52.6" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" | ||||
| checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" | ||||
|  | ||||
| [[package]] | ||||
| name = "windows_x86_64_msvc" | ||||
| version = "0.42.2" | ||||
| version = "0.52.6" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" | ||||
| checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" | ||||
|   | ||||
							
								
								
									
										10
									
								
								Cargo.toml
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								Cargo.toml
									
									
									
									
									
								
							| @@ -1,14 +1,14 @@ | ||||
| [workspace] | ||||
| members = ["day_*"] | ||||
| members = ["advent_*/puzzle_*"] | ||||
| resolver = "2" | ||||
|  | ||||
| [workspace.package] | ||||
| # name = "advent_of_code_2023" | ||||
| # name = "advent_of_code" | ||||
| version = "1.0.0" | ||||
| edition = "2021" | ||||
| rust-version = "1.74.0" | ||||
| rust-version = "1.84.1" | ||||
|  | ||||
| [workspace.dependencies] | ||||
| rayon = { version = "=1.8.1" } | ||||
| indicatif = { version = "=0.17.7", features = ["rayon"] } | ||||
| rayon = { version = "=1.10.0" } | ||||
| indicatif = { version = "=0.17.11", features = ["rayon"] } | ||||
| array-init = { version = "=2.1.0" } | ||||
|   | ||||
							
								
								
									
										21
									
								
								LICENSE
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								LICENSE
									
									
									
									
									
								
							| @@ -1,21 +0,0 @@ | ||||
| # MIT License | ||||
|  | ||||
| Copyright (c) Théo LUDWIG <contact@theoludwig.fr> | ||||
|  | ||||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| of this software and associated documentation files (the "Software"), to deal | ||||
| in the Software without restriction, including without limitation the rights | ||||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| copies of the Software, and to permit persons to whom the Software is | ||||
| furnished to do so, subject to the following conditions: | ||||
|  | ||||
| The above copyright notice and this permission notice shall be included in all | ||||
| copies or substantial portions of the Software. | ||||
|  | ||||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| SOFTWARE. | ||||
							
								
								
									
										74
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										74
									
								
								README.md
									
									
									
									
									
								
							| @@ -1,78 +1,38 @@ | ||||
| <h1 align="center">theoludwig/advent_of_code_2023</h1> | ||||
| <h1 align="center">theoludwig/advent_of_code</h1> | ||||
|  | ||||
| <p align="center"> | ||||
|   <strong>My Solutions for the <a href="https://adventofcode.com/2023">Advent of Code 2023</a>, implemented in the <a href="https://www.rust-lang.org/">Rust Programming Language</a>.</strong> | ||||
| </p> | ||||
|  | ||||
| <p align="center"> | ||||
|   <a href="./CONTRIBUTING.md"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" alt="CONTRIBUTING" /></a> | ||||
|   <a href="./LICENSE"><img src="https://img.shields.io/badge/licence-MIT-blue.svg" alt="Licence MIT"/></a> | ||||
|   <a href="./CODE_OF_CONDUCT.md"><img src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg" alt="Contributor Covenant" /></a> | ||||
|   <br /> | ||||
|   <a href="https://github.com/theoludwig/advent_of_code_2023/actions/workflows/ci.yml"><img src="https://github.com/theoludwig/advent_of_code_2023/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI" /></a> | ||||
|   <a href="https://www.rust-lang.org/"><img src="https://img.shields.io/badge/Rust%20MSRV-v1.74.0-blue?logo=rust" alt="Rust" /></a> | ||||
|   <a href="https://conventionalcommits.org"><img src="https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg" alt="Conventional Commits" /></a> | ||||
|   <strong>My Solutions for the <a href="https://adventofcode.com/">Advent of Code</a>, implemented in the <a href="https://www.rust-lang.org/">Rust Programming Language</a>.</strong> | ||||
| </p> | ||||
|  | ||||
| ## Days Progress | ||||
|  | ||||
| - [Day 1 (`**`)](./day_1) | ||||
| - [Day 2 (`**`)](./day_2) | ||||
| - [Day 3 (`**`)](./day_3) | ||||
| - [Day 4 (`**`)](./day_4) | ||||
| - [Day 5 (`**`)](./day_5) | ||||
| - [Day 6 (`**`)](./day_6) | ||||
| - [Day 7 (`*`)](./day_7) | ||||
| - [Day 8 (`*`)](./day_8) | ||||
| ### [2023](./advent_2023) | ||||
|  | ||||
| ## Getting Started | ||||
| - [Day 1 (`**`)](./advent_2023/puzzle_2023_day_1) | ||||
| - [Day 2 (`**`)](./advent_2023/puzzle_2023_day_2) | ||||
| - [Day 3 (`**`)](./advent_2023/puzzle_2023_day_3) | ||||
| - [Day 4 (`**`)](./advent_2023/puzzle_2023_day_4) | ||||
| - [Day 5 (`**`)](./advent_2023/puzzle_2023_day_5) | ||||
| - [Day 6 (`**`)](./advent_2023/puzzle_2023_day_6) | ||||
| - [Day 7 (`*`)](./advent_2023/puzzle_2023_day_7) | ||||
| - [Day 8 (`*`)](./advent_2023/puzzle_2023_day_8) | ||||
|  | ||||
| ### Prerequisites | ||||
| ## Prerequisite: Rust Toolchain | ||||
|  | ||||
| #### Rust Toolchain | ||||
| The project is **tested** against the following [Rust](https://www.rust-lang.org/) versions: | ||||
|  | ||||
| The current Minimum Supported [Rust](https://www.rust-lang.org/) Version (MSRV) is **v1.74.0**. | ||||
|  | ||||
| The project is **tested** against the following Rust versions: | ||||
|  | ||||
| - **Minimum Supported Rust Version (MSRV): v1.74.0** | ||||
| - **Minimum Supported Rust Version (MSRV): v1.84.1** | ||||
| - **Latest Stable Version** | ||||
|  | ||||
| #### External Linting Tools (optional) | ||||
|  | ||||
| **External linting tools** are used to ensure a consistent code style (external to Rust) and commit message format. They are **used in the Continuous Integration (CI)** pipeline and **can be optionally used locally**. | ||||
|  | ||||
| They have to be installed using [Node.js](https://nodejs.org/) >= v20.0.0 and [npm](https://www.npmjs.com/) >= v10.0.0. | ||||
| ## Usage | ||||
|  | ||||
| ```sh | ||||
| npm clean-install | ||||
| ``` | ||||
|  | ||||
| ### Usage | ||||
|  | ||||
| ```sh | ||||
| # Run a specific day's challenge (e.g. Day 1) | ||||
| cargo run --package day_1 | ||||
| # Run a specific day's challenge (e.g. Day 1 of 2023) | ||||
| cargo run --package puzzle_2023_day_1 | ||||
|  | ||||
| # Build, Lint, and Test Usage | ||||
| cargo build | ||||
| cargo test | ||||
| cargo clippy --verbose -- -D warnings | ||||
| cargo fmt -- --check | ||||
|  | ||||
| # External Linting Tools Usage (optional) | ||||
| echo 'chore: try commitlint' | npm run lint:commit | ||||
| npm run lint:editorconfig | ||||
| npm run lint:markdown | ||||
| npm run lint:prettier | ||||
| ``` | ||||
|  | ||||
| ## 💡 Contributing | ||||
|  | ||||
| Anyone can help to improve the project, submit a Feature Request, a bug report or even correct a simple spelling mistake. | ||||
|  | ||||
| The steps to contribute can be found in the [CONTRIBUTING.md](./CONTRIBUTING.md) file. | ||||
|  | ||||
| ## 📄 License | ||||
|  | ||||
| [MIT](./LICENSE) | ||||
|   | ||||
							
								
								
									
										3
									
								
								advent_2023/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								advent_2023/README.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| # Advent of Code 2023 | ||||
|  | ||||
| Source: <https://adventofcode.com/2023> | ||||
| @@ -1,5 +1,5 @@ | ||||
| [package] | ||||
| name = "day_4" | ||||
| name = "puzzle_2023_day_1" | ||||
| version.workspace = true | ||||
| edition.workspace = true | ||||
| rust-version.workspace = true | ||||
| @@ -1,4 +1,4 @@ | ||||
| # - Day 1: Trebuchet?! - | ||||
| # - Day 1 of 2023: Trebuchet?! - | ||||
| 
 | ||||
| Source: <https://adventofcode.com/2023/day/1> | ||||
| 
 | ||||
| @@ -1,8 +1,8 @@ | ||||
| use day_3::{part_1, part_2}; | ||||
| use puzzle_2023_day_1::{part_1, part_2}; | ||||
| 
 | ||||
| fn main() { | ||||
|     let input = include_str!("../input.txt"); | ||||
|     println!("- Day 3: Gear Ratios -"); | ||||
|     println!("- Day 1 of 2023: Trebuchet?! -"); | ||||
|     println!("Answer Part 1: {}", part_1(input)); | ||||
|     println!("Answer Part 2: {}", part_2(input)); | ||||
| } | ||||
| @@ -1,5 +1,5 @@ | ||||
| [package] | ||||
| name = "day_2" | ||||
| name = "puzzle_2023_day_2" | ||||
| version.workspace = true | ||||
| edition.workspace = true | ||||
| rust-version.workspace = true | ||||
| @@ -1,4 +1,4 @@ | ||||
| # - Day 2: Cube Conundrum - | ||||
| # - Day 2 of 2023: Cube Conundrum - | ||||
| 
 | ||||
| Source: <https://adventofcode.com/2023/day/2> | ||||
| 
 | ||||
| @@ -24,7 +24,7 @@ impl FromStr for NumberOfCubesOfEachColor { | ||||
|     ///
 | ||||
|     /// ```
 | ||||
|     /// use std::str::FromStr;
 | ||||
|     /// use day_2::NumberOfCubesOfEachColor;
 | ||||
|     /// use puzzle_2023_day_2::NumberOfCubesOfEachColor;
 | ||||
|     ///
 | ||||
|     /// let string = "3 blue, 4 red";
 | ||||
|     /// let expected_result = NumberOfCubesOfEachColor {
 | ||||
| @@ -75,7 +75,7 @@ impl FromStr for Game { | ||||
|     ///
 | ||||
|     /// ```
 | ||||
|     /// use std::str::FromStr;
 | ||||
|     /// use day_2::{Game, NumberOfCubesOfEachColor};
 | ||||
|     /// use puzzle_2023_day_2::{Game, NumberOfCubesOfEachColor};
 | ||||
|     ///
 | ||||
|     /// let string = "Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green";
 | ||||
|     /// let expected_result = Game {
 | ||||
| @@ -173,7 +173,7 @@ pub fn part_2(input: &str) -> usize { | ||||
| } | ||||
| 
 | ||||
| #[cfg(test)] | ||||
| mod day_2_tests { | ||||
| mod puzzle_2023_day_2_tests { | ||||
|     use super::*; | ||||
| 
 | ||||
|     #[test] | ||||
							
								
								
									
										8
									
								
								advent_2023/puzzle_2023_day_2/src/main.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								advent_2023/puzzle_2023_day_2/src/main.rs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| use puzzle_2023_day_2::{part_1, part_2}; | ||||
|  | ||||
| fn main() { | ||||
|     let input = include_str!("../input.txt"); | ||||
|     println!("- Day 2 of 2023: Cube Conundrum -"); | ||||
|     println!("Answer Part 1: {}", part_1(input)); | ||||
|     println!("Answer Part 2: {}", part_2(input)); | ||||
| } | ||||
| @@ -1,5 +1,5 @@ | ||||
| [package] | ||||
| name = "day_1" | ||||
| name = "puzzle_2023_day_3" | ||||
| version.workspace = true | ||||
| edition.workspace = true | ||||
| rust-version.workspace = true | ||||
| @@ -1,4 +1,4 @@ | ||||
| # - Day 3: Gear Ratios - | ||||
| # - Day 3 of 2023: Gear Ratios - | ||||
| 
 | ||||
| Source: <https://adventofcode.com/2023/day/3> | ||||
| 
 | ||||
| @@ -201,7 +201,7 @@ pub fn part_2(input: &str) -> usize { | ||||
| } | ||||
| 
 | ||||
| #[cfg(test)] | ||||
| mod day_3_tests { | ||||
| mod puzzle_2023_day_3_tests { | ||||
|     use super::*; | ||||
| 
 | ||||
|     #[test] | ||||
| @@ -1,8 +1,8 @@ | ||||
| use day_4::{part_1, part_2}; | ||||
| use puzzle_2023_day_3::{part_1, part_2}; | ||||
| 
 | ||||
| fn main() { | ||||
|     let input = include_str!("../input.txt"); | ||||
|     println!("- Day 4: Scratchcards -"); | ||||
|     println!("- Day 3 of 2023: Gear Ratios -"); | ||||
|     println!("Answer Part 1: {}", part_1(input)); | ||||
|     println!("Answer Part 2: {}", part_2(input)); | ||||
| } | ||||
| @@ -1,5 +1,5 @@ | ||||
| [package] | ||||
| name = "day_3" | ||||
| name = "puzzle_2023_day_4" | ||||
| version.workspace = true | ||||
| edition.workspace = true | ||||
| rust-version.workspace = true | ||||
| @@ -1,4 +1,4 @@ | ||||
| # - Day 4: Scratchcards - | ||||
| # - Day 4 of 2023: Scratchcards - | ||||
| 
 | ||||
| Source: <https://adventofcode.com/2023/day/4> | ||||
| 
 | ||||
| @@ -19,7 +19,7 @@ impl FromStr for CardNumbers { | ||||
|     ///
 | ||||
|     /// ```
 | ||||
|     /// use std::str::FromStr;
 | ||||
|     /// use day_4::CardNumbers;
 | ||||
|     /// use puzzle_2023_day_4::CardNumbers;
 | ||||
|     ///
 | ||||
|     /// let string = "83 86  6 31 17  9 48 53";
 | ||||
|     /// let expected_result = CardNumbers {
 | ||||
| @@ -61,7 +61,7 @@ impl FromStr for Card { | ||||
|     ///
 | ||||
|     /// ```
 | ||||
|     /// use std::str::FromStr;
 | ||||
|     /// use day_4::{Card, CardNumbers};
 | ||||
|     /// use puzzle_2023_day_4::{Card, CardNumbers};
 | ||||
|     ///
 | ||||
|     /// let string = "Card 1: 41 48 83 86 17 | 83 86  6 31 17  9 48 53";
 | ||||
|     /// let expected_result = Card {
 | ||||
| @@ -148,7 +148,7 @@ pub fn part_2(input: &str) -> usize { | ||||
| } | ||||
| 
 | ||||
| #[cfg(test)] | ||||
| mod day_4_tests { | ||||
| mod puzzle_2023_day_4_tests { | ||||
|     use super::*; | ||||
| 
 | ||||
|     #[test] | ||||
| @@ -1,8 +1,8 @@ | ||||
| use day_1::{part_1, part_2}; | ||||
| use puzzle_2023_day_4::{part_1, part_2}; | ||||
| 
 | ||||
| fn main() { | ||||
|     let input = include_str!("../input.txt"); | ||||
|     println!("- Day 1: Trebuchet?! -"); | ||||
|     println!("- Day 4 of 2023: Scratchcards -"); | ||||
|     println!("Answer Part 1: {}", part_1(input)); | ||||
|     println!("Answer Part 2: {}", part_2(input)); | ||||
| } | ||||
| @@ -1,5 +1,5 @@ | ||||
| [package] | ||||
| name = "day_5" | ||||
| name = "puzzle_2023_day_5" | ||||
| version.workspace = true | ||||
| edition.workspace = true | ||||
| rust-version.workspace = true | ||||
| @@ -1,4 +1,4 @@ | ||||
| # - Day 5: If You Give A Seed A Fertilizer - | ||||
| # - Day 5 of 2023: If You Give A Seed A Fertilizer - | ||||
| 
 | ||||
| Source: <https://adventofcode.com/2023/day/5> | ||||
| 
 | ||||
| @@ -22,7 +22,7 @@ impl FromStr for RangeConverter { | ||||
|     ///
 | ||||
|     /// ```
 | ||||
|     /// use std::str::FromStr;
 | ||||
|     /// use day_5::RangeConverter;
 | ||||
|     /// use puzzle_2023_day_5::RangeConverter;
 | ||||
|     ///
 | ||||
|     /// let string = "50 98 2 ";
 | ||||
|     /// let expected_result = RangeConverter {
 | ||||
| @@ -72,7 +72,7 @@ impl FromStr for CategoryConverter { | ||||
|     ///
 | ||||
|     /// ```
 | ||||
|     /// use std::str::FromStr;
 | ||||
|     /// use day_5::{CategoryConverter, RangeConverter};
 | ||||
|     /// use puzzle_2023_day_5::{CategoryConverter, RangeConverter};
 | ||||
|     ///
 | ||||
|     /// let string = "
 | ||||
|     /// seed-to-soil map:
 | ||||
| @@ -148,7 +148,7 @@ impl FromStr for Almanac { | ||||
|     ///
 | ||||
|     /// ```
 | ||||
|     /// use std::str::FromStr;
 | ||||
|     /// use day_5::{Almanac, CategoryConverter, RangeConverter};
 | ||||
|     /// use puzzle_2023_day_5::{Almanac, CategoryConverter, RangeConverter};
 | ||||
|     ///
 | ||||
|     /// let string = "
 | ||||
|     /// seeds: 79 14 55 13
 | ||||
| @@ -249,7 +249,7 @@ pub fn part_2(input: &str) -> usize { | ||||
| } | ||||
| 
 | ||||
| #[cfg(test)] | ||||
| mod day_5_tests { | ||||
| mod puzzle_2023_day_5_tests { | ||||
|     use super::*; | ||||
| 
 | ||||
|     #[test] | ||||
							
								
								
									
										8
									
								
								advent_2023/puzzle_2023_day_5/src/main.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								advent_2023/puzzle_2023_day_5/src/main.rs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| use puzzle_2023_day_5::{part_1, part_2}; | ||||
|  | ||||
| fn main() { | ||||
|     let input = include_str!("../input.txt"); | ||||
|     println!("- Day 5 of 2023: If You Give A Seed A Fertilizer -"); | ||||
|     println!("Answer Part 1: {}", part_1(input)); | ||||
|     println!("Answer Part 2: {}", part_2(input)); | ||||
| } | ||||
| @@ -1,5 +1,5 @@ | ||||
| [package] | ||||
| name = "day_6" | ||||
| name = "puzzle_2023_day_6" | ||||
| version.workspace = true | ||||
| edition.workspace = true | ||||
| rust-version.workspace = true | ||||
| @@ -1,4 +1,4 @@ | ||||
| # - Day 6: Wait For It - | ||||
| # - Day 6 àf 2023: Wait For It - | ||||
| 
 | ||||
| Source: <https://adventofcode.com/2023/day/6> | ||||
| 
 | ||||
| @@ -89,7 +89,7 @@ pub fn part_2(input: &str) -> usize { | ||||
| } | ||||
| 
 | ||||
| #[cfg(test)] | ||||
| mod day_6_tests { | ||||
| mod puzzle_2023_day_6_tests { | ||||
|     use super::*; | ||||
| 
 | ||||
|     #[test] | ||||
| @@ -1,8 +1,8 @@ | ||||
| use day_2::{part_1, part_2}; | ||||
| use puzzle_2023_day_6::{part_1, part_2}; | ||||
| 
 | ||||
| fn main() { | ||||
|     let input = include_str!("../input.txt"); | ||||
|     println!("- Day 2: Cube Conundrum -"); | ||||
|     println!("- Day 6 of 2023: Wait For It -"); | ||||
|     println!("Answer Part 1: {}", part_1(input)); | ||||
|     println!("Answer Part 2: {}", part_2(input)); | ||||
| } | ||||
| @@ -1,5 +1,5 @@ | ||||
| [package] | ||||
| name = "day_7" | ||||
| name = "puzzle_2023_day_7" | ||||
| version.workspace = true | ||||
| edition.workspace = true | ||||
| rust-version.workspace = true | ||||
| @@ -1,4 +1,4 @@ | ||||
| # - Day 7: Camel Cards - | ||||
| # - Day 7 of 2023: Camel Cards - | ||||
| 
 | ||||
| Source: <https://adventofcode.com/2023/day/7> | ||||
| 
 | ||||
| @@ -143,7 +143,7 @@ impl FromStr for CardsHand { | ||||
|     ///
 | ||||
|     /// ```
 | ||||
|     /// use std::str::FromStr;
 | ||||
|     /// use day_7::{Card, CardsHand, CardsHandType};
 | ||||
|     /// use puzzle_2023_day_7::{Card, CardsHand, CardsHandType};
 | ||||
|     ///
 | ||||
|     /// let string = "32T3K 765";
 | ||||
|     /// let expected_result = CardsHand {
 | ||||
| @@ -205,7 +205,7 @@ pub fn part_1(input: &str) -> usize { | ||||
| } | ||||
| 
 | ||||
| #[cfg(test)] | ||||
| mod day_7_tests { | ||||
| mod puzzle_2023_day_7_tests { | ||||
|     use super::*; | ||||
| 
 | ||||
|     #[test] | ||||
| @@ -1,8 +1,8 @@ | ||||
| use day_7::part_1; | ||||
| use puzzle_2023_day_7::part_1; | ||||
| 
 | ||||
| fn main() { | ||||
|     let input = include_str!("../input.txt"); | ||||
|     println!("- Day 7: Camel Cards -"); | ||||
|     println!("- Day 7 of 2023: Camel Cards -"); | ||||
|     println!("Answer Part 1: {}", part_1(input)); | ||||
|     // println!("Answer Part 2: {}", part_2(input));
 | ||||
| } | ||||
| @@ -1,5 +1,5 @@ | ||||
| [package] | ||||
| name = "day_8" | ||||
| name = "puzzle_2023_day_8" | ||||
| version.workspace = true | ||||
| edition.workspace = true | ||||
| rust-version.workspace = true | ||||
| @@ -1,4 +1,4 @@ | ||||
| # - Day 8: Haunted Wasteland - | ||||
| # - Day 8 of 2023: Haunted Wasteland - | ||||
| 
 | ||||
| Source: <https://adventofcode.com/2023/day/8> | ||||
| 
 | ||||
| @@ -21,7 +21,7 @@ impl FromStr for DesertMap { | ||||
|     /// ```
 | ||||
|     /// use std::str::FromStr;
 | ||||
|     /// use std::collections::HashMap;
 | ||||
|     /// use day_8::{DesertMap, HorizontalDirection};
 | ||||
|     /// use puzzle_2023_day_8::{DesertMap, HorizontalDirection};
 | ||||
|     ///
 | ||||
|     /// let string = "
 | ||||
|     /// RL
 | ||||
| @@ -143,7 +143,7 @@ pub fn part_2(input: &str) -> usize { | ||||
| } | ||||
| 
 | ||||
| #[cfg(test)] | ||||
| mod day_8_tests { | ||||
| mod puzzle_2023_day_8_tests { | ||||
|     use super::*; | ||||
| 
 | ||||
|     #[test] | ||||
							
								
								
									
										8
									
								
								advent_2023/puzzle_2023_day_8/src/main.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								advent_2023/puzzle_2023_day_8/src/main.rs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| use puzzle_2023_day_8::{part_1, part_2}; | ||||
|  | ||||
| fn main() { | ||||
|     let input = include_str!("../input.txt"); | ||||
|     println!("- Day 8 of 2023: Haunted Wasteland -"); | ||||
|     println!("Answer Part 1: {}", part_1(input)); | ||||
|     println!("Answer Part 2: {}", part_2(input)); | ||||
| } | ||||
							
								
								
									
										1
									
								
								day_1/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								day_1/.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1 +0,0 @@ | ||||
| /target | ||||
							
								
								
									
										1
									
								
								day_2/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								day_2/.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1 +0,0 @@ | ||||
| /target | ||||
							
								
								
									
										1
									
								
								day_3/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								day_3/.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1 +0,0 @@ | ||||
| /target | ||||
							
								
								
									
										1
									
								
								day_4/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								day_4/.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1 +0,0 @@ | ||||
| /target | ||||
							
								
								
									
										1
									
								
								day_5/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								day_5/.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1 +0,0 @@ | ||||
| /target | ||||
| @@ -1,8 +0,0 @@ | ||||
| use day_5::{part_1, part_2}; | ||||
|  | ||||
| fn main() { | ||||
|     let input = include_str!("../input.txt"); | ||||
|     println!("- Day 5: If You Give A Seed A Fertilizer -"); | ||||
|     println!("Answer Part 1: {}", part_1(input)); | ||||
|     println!("Answer Part 2: {}", part_2(input)); | ||||
| } | ||||
							
								
								
									
										1
									
								
								day_6/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								day_6/.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1 +0,0 @@ | ||||
| /target | ||||
| @@ -1,8 +0,0 @@ | ||||
| use day_6::{part_1, part_2}; | ||||
|  | ||||
| fn main() { | ||||
|     let input = include_str!("../input.txt"); | ||||
|     println!("- Day 6: Wait For It -"); | ||||
|     println!("Answer Part 1: {}", part_1(input)); | ||||
|     println!("Answer Part 2: {}", part_2(input)); | ||||
| } | ||||
							
								
								
									
										1
									
								
								day_7/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								day_7/.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1 +0,0 @@ | ||||
| /target | ||||
							
								
								
									
										1
									
								
								day_8/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								day_8/.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1 +0,0 @@ | ||||
| /target | ||||
| @@ -1,8 +0,0 @@ | ||||
| use day_8::{part_1, part_2}; | ||||
|  | ||||
| fn main() { | ||||
|     let input = include_str!("../input.txt"); | ||||
|     println!("- Day 8: Haunted Wasteland -"); | ||||
|     println!("Answer Part 1: {}", part_1(input)); | ||||
|     println!("Answer Part 2: {}", part_2(input)); | ||||
| } | ||||
							
								
								
									
										2570
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2570
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										24
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								package.json
									
									
									
									
									
								
							| @@ -1,24 +0,0 @@ | ||||
| { | ||||
|   "name": "advent_of_code_2023", | ||||
|   "private": true, | ||||
|   "type": "module", | ||||
|   "engines": { | ||||
|     "node": ">=20.0.0", | ||||
|     "npm": ">=10.0.0" | ||||
|   }, | ||||
|   "scripts": { | ||||
|     "lint:commit": "commitlint", | ||||
|     "lint:editorconfig": "editorconfig-checker", | ||||
|     "lint:markdown": "markdownlint-cli2", | ||||
|     "lint:prettier": "prettier . --check" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@commitlint/cli": "18.6.0", | ||||
|     "@commitlint/config-conventional": "18.6.0", | ||||
|     "editorconfig-checker": "5.1.3", | ||||
|     "markdownlint": "0.33.0", | ||||
|     "markdownlint-cli2": "0.12.1", | ||||
|     "markdownlint-rule-relative-links": "2.3.1", | ||||
|     "prettier": "3.2.5" | ||||
|   } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user