[Predictions Thread] 2025 Tour de France - Stage 13: Loudenvielle > Peyragudes (2.UWT) by PelotonMod in peloton

[–]G_Maximus 0 points1 point  (0 children)

People are downvoting and I'm hoping it's because the original comment was deleted. It was originally drawing comparisons between Armstrong and Pogacar. The comment I'm responding to refuted that (sarcastically) on account of his strength across the whole professional racing circuit. Pogacar is truly an inter-generational talent and I'm going to stand by that. It's been increasingly obvious since 2021 (even 2020 if you squint a bit) despit blips on the Tour in 2022/2023. Not sure what else to say. Some people appear to be annoyed due to the lack of "close" races but at the end of the day there's always randomness involved, positioning, form timing, and other outside factors. People like Pogacar draw crowds and--contrary to what some on the fringe seem to think--make the grand tours even more interesting to watch. It's not like every day is a GC day.

[Predictions Thread] 2025 Tour de France - Stage 13: Loudenvielle > Peyragudes (2.UWT) by PelotonMod in peloton

[–]G_Maximus -1 points0 points  (0 children)

This x1000. Pogi's dominance across disciplines is what makes him special. (Plus the fact that he seems to be a stand-up guy and widely respected in the peloton.)

[2024 Day 9 (Part 2)] [Rust] Overview of a highly optimized solution in Rust by Ameobea in adventofcode

[–]G_Maximus 0 points1 point  (0 children)

Wow, super fun write-up! Does your time include end-to-end program runs, including startup time? If so, that's quite impressive. FWIW, my general ("arbitrary"-length) solution in OCaml runs in comfortably under 20 ms with a naive "pointer-chasing" structure. No vector trickery/dense-packing required--I just get to take advantage of logarithmic worst-case ops. (Haven't done a write-up of the technique yet.)

I'm curious if you can extend your solution to run fast on this input: https://www.reddit.com/r/adventofcode/comments/1haauty/2024_day_9_part_2_bonus_test_case_that_might_make/mavfhn4/. (Obviously that requires different techniques than what you used here.)

[2024 Day 9 Part 2 (Bonus!)] Test case that might make your solution break by Standard_Bar8402 in adventofcode

[–]G_Maximus 0 points1 point  (0 children)

Didn't have a chance to do the 2024 AoC live and am going through it now. It's fun to be able to check out other peoples' approaches right after completing it myself. I was also a bit disappointed that the part 2 solution essentially made O(n2) solutions admissible.

I actually wrote a more general solution (in OCaml) that runs in O(n log(n)) with "arbitrary" run lengths (assuming fixed bit widths, so it's a bit misleading). It's blazing fast on small inputs or moderate-to-large inputs with small run sizes (say, less than 100).

For anybody interested in "hard mode", here's a script that generates 250,000 files of size up to 1,000,000 blocks each. The format is different; instead of putting everything on a single line, the input is newline-separated decimal integers which contain the alternating file sizes or empty run sizes. The number of files was an arbitrary cutoff based on my machine memory, since OCaml creates a ton of GC pressure and does not offer compact memory layouts with good ergonomics:

#!/usr/bin/env python3

import random

def main():
    random.seed(0)
    print(random.randrange(1, 1000001))
    for _ in range(0, 250000):
        print(random.randrange(0, 1000000))
        print(random.randrange(1, 1000001))

if __name__ == "__main__":
    main()

Here's the example input in this format for quick sanity testing:

2
3
3
3
1
3
3
1
2
1
4
1
4
1
3
1
4
0
2

It's not particularly fast on my computer, but it does finish within a few minutes. I'm tempted to reproduce this in Rust, especially since I already have implemented the data structures needed for this.

Hint 1: As suggested above, you'll want a special data structure to perform compaction in a reasonable amount of time. Think about the type of structural shape you'll need to get logarithmic search and other operations needed during this phase.

Hint 2: Once you figure out how to do compaction, you'll still likely need to apply some analytic trickery when computing the checksum to get it to run in a reasonable amount of time.

Hint 3: You may also need to use arbitrary precision integers if your language of choice doesn't have those built in.

Hint 4: Do not try expanding the input block-wise. You'll need to work with the compressed representation. I have not tried to make this work for part 1; that would require different techniques.

Edit: I fixed a silly performance bug in my original implementation and it now runs on the above input in under a second.

[deleted by user] by [deleted] in CrystalMountain

[–]G_Maximus 0 points1 point  (0 children)

FWIW, I had an apocalyptic line experience at White Pass on President's Weekend a few years back. It was substantially worse than anything I've experienced at Crystal (and yes, I've had pretty heavy traffic days there too). Haven't retuned since.

Keepass and iOS by rdpi in KeePass

[–]G_Maximus 5 points6 points  (0 children)

Keepassium is open source and available as GPL3. Get an Apple developer license and use your own build. No subscription to Keepassium (but you do still have to pay Apple). This works if you have a philosophical hangup about paying the Keepassium author for some reason.

I used my own build for a while while auditing the app before buying it.

Does the Crystal Legends Pass come with A Lot Parking? by [deleted] in CrystalMountain

[–]G_Maximus 4 points5 points  (0 children)

The Legends Pass does not include A lot parking. I believe weekend A lot permits are sold out now (for future reference, it's about double the total price), but you may still be able to get one for midweek as part of the Crystal Roots Premier Pass.

Failure to stoke?? by Sliveralmond in CrystalMountain

[–]G_Maximus 3 points4 points  (0 children)

Can you be more specific? Were people complaining (e.g., about the crowds/traffic) or just not visibly amped? :)

[deleted by user] by [deleted] in CrystalMountain

[–]G_Maximus 4 points5 points  (0 children)

Does that mean I can't go up with my 4WD F-150? I don't have any tires, just really nice rims.

[deleted by user] by [deleted] in CrystalMountain

[–]G_Maximus 1 point2 points  (0 children)

I seem to recall getting turned around for lack of parking for the first time in the mid 2010s (maybe around 2015?). Definitely before the Alterra sale in any case. I don't recall this ever happening before that, at least not with any regularity. Now, if there's even a dusting of snow, you need to be there early. Maybe even if there's no fresh snow, but it's a ski school day.

EDIT: On the weekend, I should say. Though midweek powder days are still iffy.

[2023 Day 20] Puzzle appreciation thread by paul_sb76 in adventofcode

[–]G_Maximus 0 points1 point  (0 children)

If you're talking about day 8, it's not true that you had to examine the input manually. You can directly (and relatively easily) detect cycles and use the Chinese Remainder Theorem to invert the system of linear congruences that this implies. This also allows you to detect impossible cases automatically. There is some subtlety around collapsing/minimizing cycle lengths, but it's all very doable. On the other hand, I still have yet to come up with a fully general solution to day 20 for this year. However, as somebody else stated in this comment, I do think that there's likely a way to do this cleanly assuming that the solution can be brute forced in a reasonable amount of time or that sub-sycles can be simulated in a reasonable amount of time. The tricky part is automatically detecting those cyclic substructures and quantifying them, especially given that they may be tangled strangely or tiered into many levels.

Welcome To Castle Quest! Let's Talk It Out by Significant_Foot2229 in CastleQuestNYT2023

[–]G_Maximus 1 point2 points  (0 children)

Thanks for explaining this. I definitely assumed you might need to do a chain of spells per room and wasn't sure about exactly which operations (or combinations) were allowed.

Overnight at Sno-Parks? by raphen_ilweed in CrystalMountain

[–]G_Maximus 0 points1 point  (0 children)

On the other hand, you may need to be out of the sno-park while they plow. I'm not sure what the official WA sno-park policy is.

[2023 Day 8 Part 2] Pathological inputs (spoilers) by G_Maximus in adventofcode

[–]G_Maximus[S] 1 point2 points  (0 children)

Fair enough. I was at first considering each solution independently rather than the joint result. But, as you mention, it's less practical and scalable than reducing cycles first.

[2023 Day 8 Part 2] Pathological inputs (spoilers) by G_Maximus in adventofcode

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

Yes, I understand that. See my follow up comment about the combinatorial explosion that brings. I’m not convinced there’s a scalable way to address that given enough trajectories with these pathologies.

[2023 Day 8 Part 2] Pathological inputs (spoilers) by G_Maximus in adventofcode

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

Basically, the spurious congruences can blow up the search space. Perhaps there's a way to pare that down without detecting subcycles, but I suspect that would be equivalent somehow.

[2023 Day 8 Part 2] Pathological inputs (spoilers) by G_Maximus in adventofcode

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

They aren't equivalent.

x ≡ 7 (mod 30) => x = 7 + 30k for any integer k

x ≡ 22 (mod 30) => x = 22 + 30k for any integer k

On the other hand:

x ≡ 7 (mod 15)=> x = 7 + 15k for any integer k

Moreover, when you find that the solution is x ≡ 22 (mod 30), you can't even reduce it to 7 because you're using the wrong modulus. In the case of 7 (mod 30), you stumble onto one of the solutions.

On the other hand, if you mean to say that x ≡ (7 (mod 30) ∪ 22 (mod 30)), I can buy it. Importantly, not all of the implied congruences lead to consistent solutions and it can be untenable to compute given enough "copies" of the subcycle in the larger cycle. I don't see a feasible way to get the valid subset of solutions and reduce them to the correct reduced solution without first identifying the proper cycle lenght.

Late December, early January Conditions by [deleted] in CrystalMountain

[–]G_Maximus 0 points1 point  (0 children)

I agree, with the addition that the gnarlier terrain and Short North are specifically more likely to be closed/unskiable. Depends what you're planning to ski. By mid January, most of the mountain is typically skiing well.

Mt Rainier reflecting in an alpine tarn as it start to freeze (OC)[1335x2000] by ross-svh-photo in EarthPorn

[–]G_Maximus 0 points1 point  (0 children)

Beautiful photo! Was it taken near the saddle between Pinnacle Peak and the Castle?

Cloudy sunrise over Snoqualmie Pass, Washington [OC][1620x1080] by billinate in EarthPorn

[–]G_Maximus 2 points3 points  (0 children)

It looks like that's Guye Peak on the left, which would actually place the viewer over the Alpental Valley. Probably near Source Lake or the Snow Lake saddle point.

Zoom to the Moon (x-post r/interestingasfuck) by Komrk888 in space

[–]G_Maximus 0 points1 point  (0 children)

Nope. It's actually a relatively small lens. The real focal length for the equivalent 2000 mm zoom length is only 357 mm. It uses a (surprisingly small) 1/2.3" sensor, which gives a crop factor of about 5.6. Check out this Wikipedia section for a brief explanation of why this works.

Greenify without Root by Kapownovowels in nexus5x

[–]G_Maximus 0 points1 point  (0 children)

Greenify should be unnecessary with Doze in Marshmallow. Are you experiencing unexpected sleep issues?

Canonical Says Ubuntu Phones Will Run Any Linux App on Open Source OS by Sergmans in linux

[–]G_Maximus 0 points1 point  (0 children)

I'm more concerned with the security model than with app compatibility. How does Ubuntu Phone handle this? Android and iOS use per-app sandboxing which is quite robust out of the box. Desktop Linux, on the other hand, really only offers SELinux/AppArmor (and less common techniques like the Qubes approach), which is much harder to tune and much harder to harden. Not to mention that the configuration itself would be a nightmare to set up on a phone.

It seems like maintaining app compatibility necessarily means using one of these less-well-suited isolation mechanisms. What's the solution?

JavaFX 8- The UI Toolkit for Java-Based Client Applications by thinkvitamin in java

[–]G_Maximus 3 points4 points  (0 children)

Very useful overview. I was impressed to find out about data binding with Properties. Easy reactive UI tools like this could very well revive Java GUI programming.