Advent of Code 2020

A Programming Language Per Day

Day Language Notes
1 x86 Assembly Uses a recursive backtracking algorithm capable of any number count
2 OCaml Uses no additional storage -- O(1) space -- but reads file twice
3 Awk Single pass through file, counting all tree collisions
4 Perl Regular expression all the things
5 Bash Only uses bash + coreutils (tr and echo are the only external cmds)
6 Python Kakes use of generators and extensive list comprehensions
7 Julia Regex + comprehension for input. Sets for determining composition
8 Lua Translated from a javascript solution. My first lua program!
9 F# (Ab)using sequences for fun(ctional programming) and profit
10 Haskell Converted my OCaml solution to Haskell
11 C Total of two dynamic memory allocations -- size is not hardcoded.
12 Swift Combination of Functional, Object-oriented, and fun with enums
13 Rust "Sliding bus" solver for part 2 rather than CRT
14 Ruby Standard object-oriented Ruby
15 PHP Uses a closure to simplify implementation
16 Lisp Brute force implementation using core Common Lisp
17 C++ Fully generic multidimensional code with hash sets for frontier
18 Flex + Bison Building your own compiler counts as a language, right?
19 Kotlin Non-deterministic Push-down automata simulator!
20 JavaScript* Detect locations of tiles, then construct, then search*
21 R Creates a new environment for the potential allergens + ingredients
22 TypeScript Converted Javascript -> Typescript
23 Scala No linked lists -- only arrays and fun in scala!
24 C# LINQ where possible
25 Java No real comments here. Pretty straight forward

* Still working on an cleaner solution to Part 2

Potential Languages to Choose from (that I didn't...)

  • D - dev environment wasn't easy
  • Go - just didn't find a use
  • Prolog - i wanted to use prolog for a problem but I'm not used to parsing in prolog
  • TI-BASIC - for fun, I would definitely implement a day or two in TI-BASIC but input parsing?