Files
hpr-knowledge-base/hpr_transcripts/hpr4017.txt
Lee Hanken 7c8efd2228 Initial commit: HPR Knowledge Base MCP Server
- MCP server with stdio transport for local use
- Search episodes, transcripts, hosts, and series
- 4,511 episodes with metadata and transcripts
- Data loader with in-memory JSON storage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 10:54:13 +00:00

56 lines
6.3 KiB
Plaintext

Episode: 4017
Title: HPR4017: Advent of code day 6-10 catchup
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr4017/hpr4017.mp3
Transcribed: 2025-10-25 18:38:31
---
This is Hacker Public Radio, episode 4,017 for Tuesday the 26th of December 2023.
Today's show is entitled, Advent of Code Day 610 Catch Up.
It is hosted by Daniel Person, and is about seven minutes long.
It carries a clean flag.
The summary is I talk through the second five challenges of this year's Advent of Code.
Hello Hacker, Daniel Person here again with another five days of Advent of Code.
So let's go through days 6 to 10.
I have now completed them and have solutions for all five, but they have been progressively harder.
So it's going to be an interesting continuation of the Advent of Code this year.
So the first one was just the challenge where you had to figure out what the optimal time or the winning time for a boat was.
If you held it in, held a button in for a couple of milliseconds, and then you got the distance.
And then you needed to figure out, depending on the length of the race, what the optimal time to hold the button to pretty much speed up the boat.
So it increased in acceleration for the longer time you held the button in, but of course you can't hold it in forever because the race had a final length of time.
So the first one was pretty easy. The next one was also easy because it just was working with very much larger numbers.
The only difference of those two. So the second one was just using the big int class in Java, for instance, to handle that when you want to run really large numbers.
Next up we have the camel cards. This is a sorting exercise where you had a bunch of card eggs where you could have poker rules, five of a kind, four of a kind, full house and so on.
The problematic part was when you actually came to part two and they said, okay, now you need to sort them again and get the values out.
But in this case, when you sort them, we also have changed the knights to being jokers and the jokers could be any card, which made it a lot harder, but I saw that as well.
So it was pretty much just a figuring out how to sort the deck of cards using the sorting algorithms in Java and so on.
It was fairly easy, but you had to keep your head straight on how these jokers actually worked in the deck.
Next up, we had the haunted wasteland and the eight. And in this case, we had a map where you should go from eight to Z.
And you had a lot of different stops. The first run, you just went through it and you needed to go a particular amount of commands.
So you had a command that could be right left, for instance, and then you needed to do all the steps and then see how many times you needed to do that and then count the number of steps.
And the first round was pretty easy, because then you just figured out how to go from eight to Z with one loop, but the second one where a little bit harder, because then you needed to figure out how a lot of them, everything that ended in a, and then ended in Z, when they ended up at the same time at the ending date.
So they were walking at the same time in the maze, which made it a little bit harder and just throw a lot of more compute power on it and solve that one as well took a long while, but it was doable.
Next up was Mirage Maintenance, and here we had a sand causal, and they pretty much had some sequences that you needed to figure out what the differences was between each sequence.
So for instance, if you had 0, 3, 6, 9, 12, 15, then all of them had 3, 3, 3, 3, 3, 3, in between them as a difference.
And then you figured out what the difference was between the three, which is just 0, 0, 0, and the problematic part here was to add another 0 and figure out which was the next value in the sequence, and the last part was to figure out the previous value of the sequence.
So you started at the first one and added a 0 there, instead.
It was not hard to wrap my hand around, but I had a lot of problems with the math around this, it was a math heavy day, and I'm not really that keen on these kind of things.
So I would love to see more challenges where you create a file system, or create a small game, or create a processor that could handle operations, and so on, more of these state machines are more fun.
Yeah, let's hope we have these coming up in the further challenges here.
And then we have DA10, the piped maze, and this was not that hard by the first part.
The first part was pretty much figuring out how long a loop in the maze was, and you knew which the starting point was, so I pretty much just follow the loop around until I ended up at the start point again.
And then I had the full continuous loop, and could figure out how long it was, and where the middle point was, because you wanted to figure out where the third style was in the loop.
But the second part was really complicated, there you needed to figure out what amount of area was inside the loop.
And everything that wrapped around and so on, that you could reach in any way from the outside was not inside of this loop.
And the loop was super complicated to draw out. I have actually printed it out and put it up on my wall, because I thought it was so interesting to look at.
But I sold this by using a class in Java, called a general path.
And then when you had created a full path, you could go through and figure out how many of the points were inside and or outside of the path.
But I had a problem here, I had forgotten to actually add the starting position to the loop, which made the full sum one more than the actual possible answer.
So when I figured that one out and removed the last one or added the start position, I got the right answer and could get the last start there.
So now we have 20 starts, we have finished day 10, and I'm really looking forward to the next coming 15 puzzles or 15 days of puzzles.
And perhaps I will record again when we are at 15. I hope to see you there. Bye.
You have been listening to Hacker Public Radio at HackerPublicRadio.org. Today's show was contributed by a HBR listener like yourself.
If you ever thought of recording a podcast, then click on our contribute link to find out how easy it leads.
Hosting for HBR has been kindly provided by an onsthost.com, the internet archive and our things.net.
On this otherwise status, today's show is released under Creative Commons, Attribution, 4.0 International License.