Couple days ago, December 1st started the tenth incarnation of Advent of Code, popular programming contest started back in 2015. The author describes Advent of Code (AoC) as "a series of small programming puzzles for a variety of skill sets and skill levels in any programming language you like".
The rules of AoC are quite simple. Starting from December 1st until Christmas, every day at 5 a.m. UTC a new task is released. The tasks consist of two parts, where second part is revealed after you solve the first part, and it is a continuation and/or variation of the first part. You don't submit your code, just the result of your calculation.
The participation in AoC is free (although, if you like it, consider donating), all you need to do is log in with your Github, Google, Twitter, or Reddit account.
If you have never participated in AoC before or you want to prepare yourself for the start of the competition by solving some tasks, take a look at the previous events. To bring you up to speed, we recommend solving any of first 10 tasks of any year, as those are usually easier and can be solved relatively fast.
Advent of Code offers private leadearboards, and Nim has not only one but two of them.
The original Nim private leaderboard has previously filled up to the maximum of 200 users. We have opened a new private leaderboard, which you can join by using 681448-60235f8f code on this link.
If you have joined one of these leaderboards in previous years, there's no need to do it again — you're already in.
In this thread you can post links to your AoC repositories, share your solutions, ask for help, discuss the tasks, etc.
People usually share their solutions on r/adventofcode subreddit and we encourage you to share your Nim solutions there too and showcase the beauty of Nim.
If you're sharing your solutions via Twitter or other platforms, use #AdventOfNim hashtag and/or mention @nim_lang.
You can also use Nim IRC/Gitter/Discord channel (https://discord.gg/nim, #aoc channel) if you have some Nim-related problem, but have in mind that your snippets might contain spoilers for other who haven't solved the task yet — not everybody will be able to solve the tasks at 5 a.m. UTC. Consider waiting at least couple of hours before asking for help (in that time, try it some more to see if you can solve it by yourself :)).
Have fun!
thanks @janAkali for starting this thread!
I will be participating as usual, for the 7th year in a row. For the parsing part I plan to use possum, a nice language (and binary) that has that goal of making parsing fun and friendly (my assessment so far: goal achieved).
For the solution I plan to use Nim as usual. Possum output is a json file, so using jsony I can effectively deserialize parsing results in Nim's types. repo here: https://github.com/pietroppeter/advent-of-code-2024
Let's see if I can actually make it past day 10 this year.
Solutions can be found here.
Also accessible as a TUI via ssh (thanks to soft-serve) with:
ssh -p 23231 git.dayl.in -t advent-of-code-2024
This is my second live Advent of Code event.
As with previous year, I'm trying to solve both parts of each day in a single file, reusing most of the code.
My solutions are available in the codeberg repo: https://codeberg.org/janAkali/aoc24-nim
@miran, sorry for hijacking your aoc announcement.
Don't be sorry. Thanks for doing it!
I made a convenient tool to automatically download the input, run tests and submit the solution if anyone is interested: https://github.com/vanyle/advent-of-nim/
I don't have a lot of time to program, so having my text editor already opened with a
proc part1(s: string): string =
discard
proc part2(s: string): string =
discard
really helps.