Advent of Code in the Scala Community

Advent of Code (AoC) is a fun online event in which programmers can challenge themselves with small programming puzzles.

At the Scala Center, we want to use this opportunity to encourage programmers, no matter their experience, to progress in Scala by solving AoC puzzles. Our mission is to provide you with support by sharing our solutions in detailed blog posts and by gathering other solutions from our community.

Head over our website, where you can already find:

  • 6 solutions and blogposts

  • 434 lines of Scala 3 code

  • 14 solutions from the Scala community

How you can participate

1. Sign up on adventofcode.com

2. Get your hands on AoC puzzles

A new puzzle is released every day on adventofcode.com. There you will find all the problem descriptions and input to test your programs.

You can start with the puzzle of the day or any previous day. Most of the puzzles are independent and it is never too late to start solving old ones.

3. Read Scala Center’s solution

The Scala Center team is taking the challenge to solve AoC puzzles.

Once we have a solution, we publish it on this website along with a short blog post that explains our reasoning: how we understand the description, how we model the problem, how we implement the solution using the Scala standard library.

We hope our explanation will help you grow your Scala knowledge and improve your programming skills.

4. Read other solutions from the community

Every puzzle has infinitely many possible solutions.

You can have a deeper understanding of the problem and learn more about Scala by reading other solutions from the community.

5. Share your solution

This is the most important part for us because your solution will inspire us and other Scala programmers.

Share it proudly by clicking on the Edit this page button you can find at the bottom of each solution page.

5 Likes

In case you haven’t seen the blog, it’s still going on in 2023.

Today is Nov 30, 2023, and I setup a “blank template” Scala-cli project with some instructions to help people get started using VS Code: GitHub - spamegg1/advent-of-code-2023-scala: Advent of Code 2023 in Scala

2 Likes

Our first day is up :slight_smile:

Time to share your solutions over there!

3 Likes

Shared!

The chat on the #advent-of-code channel on the Scala Discord has been lively and educational so far this year. Scala

2 Likes

Today I got to use lots of lazy vals, the .ordinal of Scala 3’s enums, the Ordering[T] type-class and its implicits, wrote many functions with using parameters, wrote given instances that depended on previous ones, and even learned about resolving multiple given imports in the scope!

And it all worked! :joy:

I feel like :rocket: :firecracker: :fireworks:
Fun times!

2 Likes

Some good coming out of this year’s AoC, thanks to Day 08 we found some bugs in the Scala graph library. They were quickly fixed thanks to the maintainers! I also got to contribute the article on Day 06. It’s nice to get involved! :heart_decoration:

4 Likes