Skip to content

eruizc-dev/aoc-2020

Repository files navigation

Advent of Code 2020

I challenged myself to solve Advent of Code 2020 in a different programming language every day. Here's some thoughts:

Day 1: Python

At this point, I had no intentions of using multiple languages. I should've saved this one for later.

Day 2: C

I had no intentions of using multiple languages either. But I wanted to do things in C before it gets too complicated.

Day 3: Brainfuck

This day I decided to use multiple languages as I saw an oportunity to do brainfuck before things get complicated.

I found no interpreter/compiler that worked on my machine so I did my own and added support for multiple input streams to read directly from an input file.

It was very rough, I gave up at some point and got some bash to help me. But I'm happy with the result, I'm not doing esoterics anymore...

Day 4: F#

For this day I wanted to try something new but not that crazy. I've never used this language, but my previous experience with the .net environment really helped.

I struggled a lot with the algorithms since everything was unmutable but Linq came to help. I found it extremely difficult to handle null values: I don't like that.

Performance sucks but I'm glad that it works and I still have plenty of hair.

Day 5: Rust

I struggled a lot for this day! Mostly selecting the language than anything else: I wanted something new and challenging but I was very lazy. I had Fortran and Cobol at the top of my head and almost attempted using Oak.

I like Rust: it shares some familiarities with C++ with a very clean and minimalist syntax that I really liked. Except for their horrible lambda functions, at least they're better than Python's...

Day 6: Fortran

I really wanted to make this day in C, but I already used it for day 2. What else can I use? Haskell? Prolog? No! Fortran!

It was such an amazing experience to work with this language. I almost resigned and attempted Bash! The string manipulation is horrible and because I spent over 5 hours solving this challenge I decided I would not try to clean/optimize this code.