Home

Awesome

Advent of Code 2018 in Go

These are my soluions for Advent of Code 2018 written in Go.

The goal is to learn quirks & tricks of Go, which are new to me, compared to concise dynamically typed languages like Coffeescript, that I'm familiar with, while keeping the code concise, and not go the wordy Java-way.

"Go gotchas"

Go is low-level language with built-in concurrency and garbage collection, designed as a highly efficient C++ or Java competitor. To achieve high speed (both in compilation and execution), some surprising design decisions were made. It takes time to learn them.

Quirks found so far:

Advent of Code specifics

Input

Multiple inputs are provided in global ins variable:

ins := map[string]string{
  "a":`1`,
  "b":`2`,
}

That's because I submit solutions to 2 different accounts: one linked to github, another - to google. I would stick to github one, but google account has private leaderboard from previous year, that I want to track, but have no joining link for it.