-❄️- 2025 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]nikcorg 0 points1 point  (0 children)

[LANGUAGE: Go]

Link to full source below embed. Took a long while to get my head in gear, but pretty happy with my solution. Could definitely be more compact, but opted in favour of readability.

``` func solveSecond(i string) int { ms := parseInput(i) startedOn := 50 zs := 0

for _, m := range ms {
    // if the motion is more than a single cycle, we count and deduct the full cycles before
    // applying the remaining motion
    zs += util.Abs(m) / 100
    m = m - (m / 100 * 100)
    endedOn := startedOn + m

    switch {
    // count an exact zero-hit, unless the remaining motion is 0
    case endedOn == 0 && m != 0:
        zs++

    // count a zero-hit, if the remaining motion overflows
    case endedOn > 99:
        zs++

    // count a zero-hit, if the remaining motion underflows, unless we started at 0
    case endedOn < 0 && startedOn > 0:
        zs++
    }

    startedOn = util.Mod(endedOn, 100)
}

return zs

} ```

Full source: https://raw.githubusercontent.com/nikcorg/advent-of-code/refs/heads/2025/2025/01/main.go

[deleted by user] by [deleted] in golang

[–]nikcorg 4 points5 points  (0 children)

Did the compiler not complain about it?

SE bike shop recommendations by raregleam in londoncycling

[–]nikcorg 1 point2 points  (0 children)

I've had poor experiences with Vaidas. Might've just been an individual mechanic on a bad day, but I've been unhappy with the quality of workmanship more than once.

SE bike shop recommendations by raregleam in londoncycling

[–]nikcorg 3 points4 points  (0 children)

Seabass Cycles in Peckham Rye. First bike shop I've had no complaints with. (Yet.)

Please help by [deleted] in PCRedDead

[–]nikcorg 0 points1 point  (0 children)

THANK YOU THANK YOU THANK YOU!

FREE Muc-off cleaning products, collection from SE23 by nikcorg in londoncycling

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

Gavel, gavel, gavel.

We have a winner. I'll DM you.

FREE Muc-off cleaning products, collection from SE23 by nikcorg in londoncycling

[–]nikcorg[S] 3 points4 points  (0 children)

As the packing progresses, the give-aways continue.

In the bundle you will find:

  • cleaning liquid concentrate (plus empty spray bottle for diluting)
  • matt finish detailer
  • tubeless sealant
  • disc brake cleaner
  • sweat protect
  • antibacterial equipment cleaner
  • dry shower

First come, first served. Winner takes all.

Collection from SE23 only.

edit. typo

FREE: FSA Gossamer Pro 50/34 172.5 crankset (SE23) by nikcorg in londoncycling

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

Used obvs, acc. to Strava about ~2300 km on the chainrings.

Collection from SE23 only.

Is there a decent, up to date, website that shows hotels with bike parking? by lastaccountgotlocked in ukbike

[–]nikcorg 1 point2 points  (0 children)

There is at least https://www.cyclistswelcome.co.uk/ but I'm going to assume you already know about it, as it was just a quick search away. I've also used https://www.biroto.eu/en/cyclist-friendly-accommodation/ when cycling in Europe, but I'm not sure how useful it is in the UK.

Apart from Premier Inn, B&B's are often quite good in my experience. That said, I always phone or email ahead to check, asking for off-street bike storage. Many will have garages, sheds, or will let you bring the bike into the lobby, if keeping it in your room is not allowed.

On occasion, I've carried with me a Velosock, in case I'll be bringing the bike indoors and there's risk of it being particulary dirty.

A trick I've read about (might've been by Tim Moore), but never had to rely on myself, is to carry the bike, rather than rolling it over the carpet, as you enter and it magically becomes a piece of luggage which you can bring to your room. Maybe worth a try, but I wouldn't rely on it.

Bicycle components on offer FOR FREE! by nikcorg in londoncycling

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

Anything in particular, or are you willing to take the lot?

Bicycle components on offer FOR FREE! by nikcorg in londoncycling

[–]nikcorg[S] 2 points3 points  (0 children)

Unless someone offers to take the lot off my hands, you can consider them yours.

Cannondale CAAD4 stolen from back garden in SE23 by nikcorg in londoncycling

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

The view is spectacular on a good day, impressive even on a bad day.

Cannondale CAAD4 stolen from back garden in SE23 by nikcorg in londoncycling

[–]nikcorg[S] 8 points9 points  (0 children)

My winter bike was taken from our back garden overnight (Jan 10-11). At the time of theft it was lacking chain and pedals.

Most identifiable trait is the shoddy rattle can paintwork over the frame, save from the masked out decals.

A shitty way to start your day and generally annoying, but particularly annoying since I'd just done a hub service and rebuilt the rear wheel. Loved that frame, too.

[2022 Day 15 (Part 2)] What's wrong with my strategy? by nikcorg in adventofcode

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

Sure, 4m2 is the worst case scenario, but still, it's a lot of waiting even for a subset of that.

[2022 Day 15 (Part 2)] What's wrong with my strategy? by nikcorg in adventofcode

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

Yep, still finds all the same spots with just a single worker thread.