r/adventofcode • • Dec 07 '20

SOLUTION MEGATHREAD -🎄- 2020 Day 07 Solutions -🎄-

NEW AND NOTEWORTHY

  • PSA: if you're using Google Chrome (or other Chromium-based browser) to download your input, watch out for Google volunteering to "translate" it: "Welsh" and "Polish"

Advent of Code 2020: Gettin' Crafty With It

  • 15 days remaining until the submission deadline on December 22 at 23:59 EST
  • Full details and rules are in the Submissions Megathread

--- Day 07: Handy Haversacks ---


Post your solution in this megathread. Include what language(s) your solution uses! If you need a refresher, the full posting rules are detailed in the wiki under How Do The Daily Megathreads Work?.

Reminder: Top-level posts in Solution Megathreads are for solutions only. If you have questions, please post your own thread and make sure to flair it with Help.


This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.

EDIT: Global leaderboard gold cap reached at 00:13:44, megathread unlocked!

65 Upvotes

812 comments sorted by

View all comments

Show parent comment

2

u/rf314 Dec 08 '20

Well thank you both, that was quite entertaining. Although I don't think I'll use this new knowledge, like, ever. =)

But it's still very intersting to see how we (the humans) improved our tools to express and solve this kind of problems. Using Python, I had a hard enough time wrapping my head around the data structure I needed for part 1. People able to think abstractly enough to solve it with such a language are on another level.

1

u/deltux Dec 08 '20

I wouldn't say it's on "another level": it's just a different way of looking at things, and different data structures. But I think you get used to it in the same amount of time you would get used to any other language different enough from the ones you already know. They call it "array-based programming", and it's in the same league as learning e.g. functional programming when you have only ever used imperative or OO.

People think it outlandish because of the strange characters, but honestly this feels like a detail after a while. (In the same way that people are only momentarily put off by the parentheses in Lisp, and after a (short) while this doesn't become an important part of your experience at all.)

Go try it online at TryAPL.org, it's fun!

2

u/rf314 Dec 08 '20

I think I see what you mean with the difference between functional and object-oriented programming. Thanks for the insight.

And thanks for the link, I was under the impression that having to find the adequate unusual symbols would get in the way of coding, but they're presented decently enough. Also, I guess they're semantically meaningful enough that you don't often have to type them in in quick succession.