Advent of Code 2020

Some things are really hard but I managed to understand the basics pretty easily

I found part 2 pretty straight forward :slight_smile:

Puzzle 2 Part 2

image

Regex is just as obtuse as APL :slight_smile:

sad apl noises

this abuses that booleans are cast to 0 or 1, I'd recommend checking for not<(condition a) = (condition b)>

Yeah - I know :frowning:

I have previous offences in this area and I DID say I wouldn't do it again but those bad habits that I learnt using BASIC in the 80's will always be with me :slight_smile:

Woah, the '80s? Thought you were younger ;​)

PS

I know a couple people to whom I told this and they somehow felt offended, that is in no way my intent.

Oops, sorry, I was still thinking about counting parentheses. My bad.

Regex is just as obtuse as APL

Hey! Them's fightin' words.

How's it going for day 3?

Just woken up and drinking 1st cuppa :slight_smile:

Took me a little while to work out how to do the mod when the list indexes start at 1 and not 0

Puzzle 3 Part 1

image

Part 2

Part 1 of Puzzle 4 wasn't too bad but part 2 is going to take a little bit longer!

Puzzle 4 Part 1

Puzzle 4 Part 2 - link to project

https://snap.berkeley.edu/snap/snap.html#present:Username=cymplecy&ProjectName=aoc2020_4_2a

I'm still making my way through these :slight_smile:

And I'd just like to thank @spaceelephant for their hash table blocks, as without them, I don't think I'd be able to solve Day 15 Part 2 before the universe finally collapses back in on itself :slight_smile:

These are just plain JS objects, right?

No idea how the blocks do their work - I just used them

Sounds like the best approach

List of my project names for the ones I've done so far
They are not neat or tidy or very efficient :frowning:

So they can be loaded using

https://snap.berkeley.edu/snap/snap.html#present:Username=cymplecy&ProjectName=xxx
replacing the xxx with the actual name

A friend of mine has pointed out that I need to stop as it is very much past advent now :slight_smile:

[edit - I might try going back through them and making them more presentable :slight_smile:

In later projects, I did follow a convention of using keypress a for the test data and keypress b for the puzzle input. I also sometimes had keypress c for alternative test data

Tidy versions

Day 1 Part 1
Day 1 Part 2
]

hey, if you want to join my leaderboard that I just decided to make for snap, here's the code

1492847-2e9c76cd

just enter that code here Leaderboard - Advent of Code 2021
Don't worry, no personal data is saved on private leaderboards (unless you put personal data in your name).

I think you posted this in the wrong thread - this is the 2020 one :slight_smile:

oh, lol, I didn't see that.

edit: just searched, and I don't see a topic for 2021 (besides each day)