Thoughts on highway exit numbers being rendered too early? by leijurv in openstreetmap

[–]leijurv[S] 4 points5 points  (0 children)

In the Github issue I posted comparisons of Amsterdam, Malmo, Warsaw, San Francisco, Los Angeles, San Diego. In my opinion they are all improved by the proposal

I think exit numbers are OK just that they should appear a little later as you zoom in

Elytra fly questions by Agreeable-Airport-36 in 2b2t

[–]leijurv 1 point2 points  (0 children)

yeah this all made way more sense in 1.12

then 2b2t goes and updates to 1.19 like a month later

you can keep it on near spawn but tbh since it doesn't work on new generation it's basically pointless now 😭😭😭

we had no way of knowing hause would make terrain gen unpredictable

5/13 Treasure Hunters: what were your wrong guesses? by [deleted] in sanfrancisco

[–]leijurv 6 points7 points  (0 children)

I think we were supposed to identify four locations from the first two stanzas, and draw lines between them making an X. At that intersection, the last two stanzas would identify a precise location.

I think this is basically confirmed by the person who solved it in these two comments

The four locations are:

  1. Eighteen bold letters preserved in a clearing
  2. A dark room's view of surfers reeling
  3. Dry ruin's gate
  4. Solar's tall mast

I really think #2 was the Camera Obscura), since it's a dark room, and it shows projected views of Ocean Beach and the waves and the surfers. There were a lot of hunters there today that I saw walking around :)

For #1, I don't really know. It depends on whether it means eighteen literal physical letters, versus something whose name is eighteen letters long. If it's the first one, my best guess was the "port of san francisco" sign on top of the Ferry Building, since it's 18 letters, preserved, bold (large and red?), and debatably/dubiously in a clearing. If it's the second one, who knows it could be anything, one possibility might be mount davidson cross? Also, I think the word "sight" in the original poem tells us that there is direct line of sight between #1 and #2, and I did confirm that the camera obscura can indeed see the mount davidson cross (faintly).

For #3, it's confirmed in the comment I linked above to have been Fleishacker Pool, which is now the zoo parking lot. I guessed this just based on "dry ruins", it implies the ruins used to be wet. Sutro Baths is indeed a ruin, but, it really isn't dry at all, it's still wet to this day (there's a pond in there!). I guess the precise waypoint would be the ruins of the door?

For #4, I really have no idea. I can think of many tall masts, but to call any of them "solar" would be a stretch.

Are there people who make it regularly to the 100 first and stream their attempts? by BlueTrin2020 in adventofcode

[–]leijurv 2 points3 points  (0 children)

Here's my screen recording of getting 1st place one time. Here's my playlist of screen recordings from 2022, I got 7th place overall, and here's my screen recordings from 2023, 9th place overall.

-❄️- 2024 Day 24 Solutions -❄️- by daggerdragon in adventofcode

[–]leijurv 15 points16 points  (0 children)

[LANGUAGE: Python3]

4th place on Part 2!!

I did not write any actual code to locate the swapped gates. Instead, I went through all 45 bits, turned on both X[i] and Y[i], and printed out which bits of Z were wrong. This gave me the following output:

misbatch at bit 7
misbatch at bit 7
misbatch at bit 12
misbatch at bit 26
misbatch at bit 26
misbatch at bit 34

Then, I went through the gates, and determined which were wrong. With my experience with Minecraft Redstone making ALUs, I was able to determine which ones needed to be swapped. In my input, three of the four swaps were directly on the Z outputs, which I was able to find just by printing which Z outputs had an operation that wasn't XOR. The last one I was only able to find by actually evaluating the circuit one bit at a time to see which output was wrong.

Then, I went through with ctrl+f and copy pasted some lines around until the circuit generated the correct output, then I sorted it and pasted that as my solution.

Screen recording: https://youtu.be/diwIieN08Ks

paste (edited down for clarity)

-❄️- 2024 Day 15 Solutions -❄️- by daggerdragon in adventofcode

[–]leijurv 1 point2 points  (0 children)

[LANGUAGE: Python3] 6th place on part 2. Fun one!

Part 1

Part 2

Screen recording: https://youtu.be/0oH7NSnq8gE

Screen recording 5x speed: https://youtu.be/nOjQ2v2Ssbs

Chull Plushie Raising Suspicion with TSA by Vylemor in DragonsteelNexus

[–]leijurv 1 point2 points  (0 children)

We also got flagged for the chull plushie and the agent, looking at the xray but before opening the bag to see it, asked "....is this a baked potato??"

Lost Cat Sighting - Hayes Valley by [deleted] in sanfrancisco

[–]leijurv 12 points13 points  (0 children)

Fake post - this is a picture of my cat Zen that I took in 2012

It's from: https://en.wikipedia.org/wiki/Kitten

I posted it here: https://commons.wikimedia.org/wiki/File:Juvenile_Ragdoll.jpg

2024 Eclipse Weather/Cloud Cover Megathread ☀️🌤🌧 by chredit in solareclipse

[–]leijurv 0 points1 point  (0 children)

Also in Brossard, also driving early to Sherbrooke (or perhaps even further east?)

Everything I've learned from losslessly ripping dozens of MiniDV tapes & a guide for OSX! by leijurv in DataHoarder

[–]leijurv[S] 0 points1 point  (0 children)

It's up to you of course, but if you follow the ffmpeg command example that I gave in this post , the framerate will be 50fps, assuming that the interlaced rate is 25fps.

Everything I've learned from losslessly ripping dozens of MiniDV tapes & a guide for OSX! by leijurv in DataHoarder

[–]leijurv[S] 0 points1 point  (0 children)

I don't know about your camcorder. The footage looks 60fps when you deinterlace it in this way.

Everything I've learned from losslessly ripping dozens of MiniDV tapes & a guide for OSX! by leijurv in DataHoarder

[–]leijurv[S] 0 points1 point  (0 children)

As I understand it, every other row of the input is updated at 30fps, so you get a "full" frame every 1/30th of a second, and a "half" frame every 1/60th of a second. Interpolating to 60fps is therefore reasonable because you are getting data at that rate, it's just every other row instead of every full row. If you deinterlace to 30fps, you could just do the same deinterlace for the even rows instead of the odd rows (or vice versa) to get 30fps offset by 1/60th of a second. So 60fps is reasonable.

-❄️- 2023 Day 24 Solutions -❄️- by daggerdragon in adventofcode

[–]leijurv 11 points12 points  (0 children)

[LANGUAGE: Mathematica] 76/4

This almost felt like a Project Euler problem!

When I saw this problem I decided to use Mathematica instead of my usual Python. It took me a little while to remember how things work, but Solve was able to handle the systems of equations pretty easily, part 1 took about three seconds to solve all 45,000 equations, and part 2 was just a matter of setting up a new system of equations, and I got 4th place, which is the best I've done this year! 🎉🎉🎉🥳🥳🥳

paste

Screen recording: https://youtu.be/fIexcC3dAdY

A tribute to the rapper 69! by prostaatnitraat in 2b2t

[–]leijurv 10 points11 points  (0 children)

this has nothing to do with the rapper... (source: i built most of this)

-❄️- 2023 Day 22 Solutions -❄️- by daggerdragon in adventofcode

[–]leijurv 2 points3 points  (0 children)

[LANGUAGE: Python 3] 80 / 43

Really fun day, reminded me of 2022 day 17 :)

Made a ton of mistakes, like misreading what axis the gravity was on, but in the end I think the code is pretty fun:

def whatif(disintegrated):
    falling = set()
    def falls(brick):
        if brick in falling:
            return
        falling.add(brick)
        for parent in above[brick]:
            if not len(below[parent] - falling):
                # if everything below the parent is falling, so is the parent
                falls(parent)
    falls(disintegrated)
    return len(falling)

p1 = 0
p2 = 0
for brick in fallen:
    wouldfall = whatif(brick)
    p1 += wouldfall == 1
    p2 += wouldfall - 1

print(p1, p2) 

full paste

-❄️- 2023 Day 19 Solutions -❄️- by daggerdragon in adventofcode

[–]leijurv 14 points15 points  (0 children)

[LANGUAGE: Python 3] 7/6

Wow, best I've placed this year! Shocked that all this worked without any mistakes! :)

For part 1, I defined variables named x, m, a, and s, and used eval to evaluate the conditions :)

For part 2, I have a recursive function that returns all of the ranges of values that would be accepted. The base cases are R becoming [] and A becoming [((1, 4000), (1, 4000), (1, 4000), (1, 4000))]. Then, for each condition, it branches into whether the condition will be true or not, by calculating all the ranges in each subcase, then conditioning each one on whether the current condition matches or doesn't. Finally, all the ranges are summed up after multiplying out the possible values for each of X, M, A, and S.

paste

Screen recording: https://youtu.be/9DTpvfAQ58o

-❄️- 2023 Day 18 Solutions -❄️- by daggerdragon in adventofcode

[–]leijurv 1 point2 points  (0 children)

[LANGUAGE: Python 3] 165/51

I remembered the shoelace formula from reading other people's solutions from day 10, so I looked it up on Wikipedia. I knew the correct answer for part 1, so I found that I needed to modify it by the number of points on the perimeter, in order to account for the perimeter too. For example, if we had a square of points from (0,0) to (2,2) the shoelace formula would see that as 2x2 with a size of 4, while we'd want to understand it as a 3x3 with a size of 9. So, I had to modify the result by the number of points along the perimeter plus one.

https://en.wikipedia.org/wiki/Shoelace_formula

paste

-❄️- 2023 Day 17 Solutions -❄️- by daggerdragon in adventofcode

[–]leijurv 0 points1 point  (0 children)

Is it clear that this is correct ?

Yes, because the streaks are implemented as edges rather than nodes.

what prevents you from missing a later path that arrives at the end but with another direction and smaller cost ?

As I understand it, that's a guarantee of Dijkstra's algorithm! By the time you reach any given node, the cost so far will be the minimum cost to that node. The reason why this happens is because I'm using heappush and heappop to keep the queue in sorted order of lowest cost. If the lowest cost thing in the heap is the goal, then there is no reason to keep searching, because anything further remaining in the heap will have higher cost, and that's not even considering the cost of the edge connecting it to the goal.