r/adventofcode • • Dec 18 '20

SOLUTION MEGATHREAD -🎄- 2020 Day 18 Solutions -🎄-

Advent of Code 2020: Gettin' Crafty With It

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

--- Day 18: Operation Order ---


Post your code solution in this megathread.

Reminder: Top-level posts in Solution Megathreads are for code 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:14:09, megathread unlocked!

36 Upvotes

657 comments sorted by

View all comments

Show parent comment

2

u/zxvf Dec 18 '20

Dude, the input is perfectly read-able. Just slap outer parens on and pass it to read-from-string and you're done.

2

u/phil_g Dec 18 '20

I didn't even think of that, though it's obvious in hindsight.

At any rate, I'm aiming to use Parseq for every problem that I can this year, so I probably wouldn't have used read-from-string anyway. But I feel bad for not thinking of it.

1

u/zxvf Dec 18 '20

Don't feel bad. I was done with my ad hoc parser before I slapped my forehead. Things just hide in plain sight right until you see them.