advent of code 2020 

monorail@DESKTOP-T7R40II:/mnt/d/Documents/advent_of_code_2020/day 1$ diff part1.py part2.py
10c10
< for pair in itertools.combinations(entries, 2):
---
> for group in itertools.combinations(entries, 3):

only had to change one line, and honestly only HAD to change one character

advent of code 2020 

ah fuck i actually forgot to include the other lines with pair in it being changed but whatever

advent of code 2020 day 2 

easy day, so of course i chose to overcomplicate it github.com/undergroundmonorail

like come on holly what the fuck is this

print(sum((is_valid(*(re.findall(r'(\d+)-(\d+) (.): (.+)', line)[0])) for line in f)))

clean it up

advent of code 2020 day 2 

it just seems so WASTEFUL to have explicit loops and a temp variable so store the number of valid passwords or whatever

advent of code 2020 day 2 

advent of code encourages insecure password database practices

advent of code 2020 day 3 

did it first thing after waking up so it's a weird flavour of "too clever for its own good"

github.com/undergroundmonorail

advent of code 2020 day 5 

going to try to do day 5 as fast as possible, maybe win points

advent of code 2020 day 5 

rank 337 for part 1 and rank 398 for part 2

and i had to debug some shit i really should have gotten on the first go, but i don't think it would have been enough

oh well

github.com/undergroundmonorail

advent of code 2020 day 5 

i did a "real" pass at day 5, since my first attempt was speedrunning it to try to get on the leaderboards. i still have that code saved in a directory but i don't think that you should write code like that

that said, i still don't really get what the clever way to do part 2 would be. it feels like there should be something but honestly i have no idea

github.com/undergroundmonorail

explicit spoilers, advent of code 2020 day 5 

pretty embarrassed with myself for thinking for like six hours "the seat codes are related to binary, i can do something binary-esque to decode them" and then didn't realize until after implementing something that worked that it's literally just binary. F and L are 0, B and R are 1

i still used reduce(lambda x, y: x*2 + y, my_iterable) to actually convert to decimal though. i considered just replacing the characters in the string with 0s and 1s and doing int(s, 2), but i chose not to to keep the code lazy. in theory it should handle arbitrarily large airplanes without having to construct any huge strings, i think

advent of code 2020 day 5 

god i'm looking at the code that i wrote as quickly as possible and for part 2 i literally do for i in range(999999):, check if i is my id, and if it is i print and break

my code that i wrote without trying to go as fast as possible is only barely nicer

surely there's a better way

advent of code 2020 day 6 

bah, i'm pretty sure this code works but i typed the answer wrong into the page and now i have to wait a minute before i can type it correctly

Follow

advent of code 2020 day 6 

@monorail oh mood

Sign in to participate in the conversation
Awoo Space

Awoo.space is a Mastodon instance where members can rely on a team of moderators to help resolve conflict, and limits federation with other instances using a specific access list to minimize abuse.

While mature content is allowed here, we strongly believe in being able to choose to engage with content on your own terms, so please make sure to put mature and potentially sensitive content behind the CW feature with enough description that people know what it's about.

Before signing up, please read our community guidelines. While it's a very broad swath of topics it covers, please do your best! We believe that as long as you're putting forth genuine effort to limit harm you might cause – even if you haven't read the document – you'll be okay!