Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/passsy/aoc22_dart_code_golf
AdventOfCode 2022 in Dart focusing on code golf, making the solutions as small as possible
https://github.com/passsy/aoc22_dart_code_golf
advent-of-code aoc-2022-in-dart aoc2022
Last synced: about 2 months ago
JSON representation
AdventOfCode 2022 in Dart focusing on code golf, making the solutions as small as possible
- Host: GitHub
- URL: https://github.com/passsy/aoc22_dart_code_golf
- Owner: passsy
- License: apache-2.0
- Created: 2022-12-02T13:06:09.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-01T18:42:53.000Z (about 1 year ago)
- Last Synced: 2024-05-01T22:44:09.859Z (8 months ago)
- Topics: advent-of-code, aoc-2022-in-dart, aoc2022
- Language: Dart
- Homepage:
- Size: 119 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Advent of Code 2022 in Dart (Code Golf)
This is my attempt at solving the [Advent of Code 2022](https://adventofcode.com/2022) puzzles in the shortest possible code using [Dart](https://dart.dev/) `2.18`.
You can find the solution in `/bin`.
I created `.min.dart` file containing the shortest possible code for each puzzle.
The normal `dart` files are the same code I used to solve the puzzles in the first place before starting to code golf the solutions.
## Rules
- The Dart program has to have a `main(List args)` entrypoint.
- The input is read from file and passed into the `main` function line by line.
- External dependencies are not allowed.
- The output is printed via `print()`See the [`mainTester()`](https://github.com/passsy/aoc22_dart_code_golf/blob/main/test/main_tester.dart) function as reference
## Results
#### Day 1
Part 1: [84 chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day1_part1.min.dart) | Part 2: [129 chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day1_part2.min.dart)#### Day 2
Part 1: [116 chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day2_part1.min.dart) | Part 2: [119 chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day2_part2.min.dart)#### Day 3
Part 1: [168 chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day3_part1.min.dart) | Part 2: [178 chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day3_part2.min.dart)#### Day 4
Part 1: [138 chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day4_part1.min.dart) | Part 2: [136 chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day4_part2.min.dart)#### Day 5
Part 1: [393 chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day5_part1.min.dart) | Part 2: [384 chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day5_part2.min.dart)#### Day 6
Part 1: [101 chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day6_part1.min.dart) | Part 2: [103 chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day6_part2.min.dart)#### Day 7
Part 1: [415 chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day7_part1.min.dart) | Part 2: [434 chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day7_part2.min.dart)#### Day 8
Part 1: [339 chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day8_part1.min.dart) | Part 2: [>1k chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day8_part2.min.dart)#### Day 9
Part 1: [>1k chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day9_part1.min.dart) | Part 2: [>1k chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day9_part2.min.dart)#### Day 10
Part 1: [129 chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day10_part1.min.dart) | Part 2: [158 chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day10_part2.min.dart)#### Day 11
Part 1: [>1k chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day11_part1.min.dart) | Part 2: [>1k chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day11_part2.min.dart)#### Day 12
Part 1: [>2k chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day12_part1.min.dart) | Part 2: [>2k chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day12_part2.min.dart)#### Day 13
Part 1: [- chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day13_part1.min.dart) | Part 2: [- chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day13_part2.min.dart)#### Day 14
Part 1: [- chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day14_part1.min.dart) | Part 2: [- chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day14_part2.min.dart)#### Day 15
Part 1: [- chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day15_part1.min.dart) | Part 2: [- chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day15_part2.min.dart)#### Day 16
Part 1: [- chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day16_part1.min.dart) | Part 2: [- chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day16_part2.min.dart)#### Day 17
Part 1: [- chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day17_part1.min.dart) | Part 2: [- chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day17_part2.min.dart)#### Day 18
Part 1: [- chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day18_part1.min.dart) | Part 2: [- chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day18_part2.min.dart)#### Day 19
Part 1: [- chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day19_part1.min.dart) | Part 2: [- chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day19_part2.min.dart)#### Day 20
Part 1: [- chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day20_part1.min.dart) | Part 2: [- chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day20_part2.min.dart)#### Day 21
Part 1: [>1k chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day21_part1.min.dart) | Part 2: [>1k chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day21_part2.min.dart)#### Day 22
Part 1: [>1k chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day22_part1.min.dart) | Part 2: [>1k chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day22_part2.min.dart)#### Day 23
Part 1: [>1k chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day23_part1.min.dart) | Part 2: [>1k chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day23_part2.min.dart)#### Day 24
Part 1: [>1k chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day24_part1.min.dart) | Part 2: [>1k chars](https://github.com/passsy/aoc22_dart_code_golf/blob/master/bin/day24_part2.min.dart)## License
```
Copyright 2022 Pascal WelschLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.```