Skip to content

Examples of "Advent Of Code" solutions in many programming languages.

Notifications You must be signed in to change notification settings

davemac30/Advent-Of-Code-Polyglot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code

For the uninitiated, Advent of Code is a series of programming challenges, a new one is released each day until Dec. 25th.

Each challenge requires thinking in a different way to solve it, and for this reason I love to use these sorts of problems to learn how different programming languages idiomatically approach each solution. You'll notice that in any given situation, the idiomatic Python way of solving something will be very different from the Haskell or Lisp way of doing things.

So let's collect code samples from as many languages as we can to see how things are done!

Guidelines

  • If you have solutions to contribute in a language, please submit them in a pull-request and I'll get to them as soon as I can.
  • Please don't include your problem's 'input.txt' or solution, as these are different for each person.
  • Please put each solution (including part 1 and part 2) into separate files (even if there's a bit of code duplication) it makes it easier to figure out what's going on.
  • Please try to write clean code solutions in your language of choice, and remember that this is about seeing different ways that languages approach things, so if a particular language feature or idiom applies nicely to the situation, make sure to include it!
  • The goal of this is to be easy to read, so include comments and avoid using multiple files and using complicated build steps unless necessary.
  • I'm not an expert, so if you see improvements that could be made to a solution in the repository, feel free to submit a pull request to clean it up, but keep in mind that if it's a trivial difference, or is simply personal preference, it may be ignored.
  • In pull requests please follow the established pattern:
  • language-name/day-num/part#.extension
  • How will we decide what the optimal solution is?
  • For now I'm just accepting solutions as they come in, if someone can demonstrate that their solution is either more idiomatic to the language or is significantly cleaner, then we'll switch it in. Keep in mind that it's about seeing how idioms differ amongst different languages, not necessarily about getting the most optimal solution. Let's not get competitive about it.

Have fun!!

About

Examples of "Advent Of Code" solutions in many programming languages.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Perl 14.9%
  • Python 13.1%
  • Erlang 12.7%
  • Haskell 12.0%
  • C# 11.0%
  • Rust 10.4%
  • Other 25.9%