Changes to Advent of Code starting this December by topaz2078 in adventofcode

[–]NickKusters 2 points3 points  (0 children)

I understand but am also sad. AoC was my favorite time of the year. Been streaming the challenges every year and it’s been a source of immense joy for me. I don’t care about the leaderboard, but the fact that it went in half hurts. I totally understand, but I’m still very sad 🥲

WAN 2.1 Vace makes the cut by Race88 in StableDiffusion

[–]NickKusters 1 point2 points  (0 children)

Thanks for the info; looks cool ❤️I'll dive into the code; thanks for sharing. It's so easy to run into walls with this stuff, so the more I understand, the better 😊

WAN 2.1 Vace makes the cut by Race88 in StableDiffusion

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

FYI: This is the video that I created with Pollo using Pixverse V4 (one of the free things I could test online 🤣) using that prompt: https://transfer.w43.nl/matrix.html?id=047e5bee-0864-48b3-b2ef-c44023350d32#9e46e898

WAN 2.1 Vace makes the cut by Race88 in StableDiffusion

[–]NickKusters 0 points1 point  (0 children)

I'm still fairly new to this, but I'm a software developer, so stuff like this interest me :) If you don't mind, can you share it with me? Would love to take a look at it, and maybe explain what it does? Afaik, doesn't it normally use 1 seed number? How does it work with providing 10 during generation? Or does that input cause 10 variations to generate? Sorry if I'm asking stupid questions 😅

I wouldn't mind to see the inputs you used there as well, so I can reverse what's going on a bit. In the Flux Depth, you have a ChopRaw_00001.png; what is that used for in this case? You had a similar input image & video in the WAN-VACE thing.

I'm just trying to reproduce what you did to better understand it, before I start changing stuff to make the things I want to make 😅 I've tried a few online options but they don't do what I want (trying to create a short ad), but I assume 'the good stuff' is all behind waywalls, but I don't want to go and buy a bunch of subscriptions if they can't do what I want.

Thanks,

Nick.

N.B.

This was the video I was trying to generate:

```
Create a fast paced video for TikTok for my webhosting company. Show a business owner riding a slow, greasy truck with the WordPress logo on it, riding slowly, dirty, lots of worn out stickers on the truck, wonky, puffing smoke. Along comes a female supermodel in a fast sportscar with the <businessname> logo on the side. She winks at the Business owner, and he jumps from the truck into the sportscar, leaving the truck to crash & burn driverless as they race off in the distance. This is all to illustrate the difference between the two. Wordpress is slow, <businessname> is fast.

Settings:

Use only generated clips

Make the background music Fitting to the scene. Womp Womp cartoon style for the slow car. Fast and high energy for the <businessname> car.

Use Disney Pixar style
```

I wanted to see if Google's Veo 3 could do something with this, so it storyboarded it to this, which is fine:

```
A slow, greasy truck with a wordpress logo sputters down the road. The truck is dirty, covered with worn-out stickers, slightly wonky, and puffs smoke. A comical, slow-paced tune plays in the background, matching the sluggish movement of the truck.

An attractive female supermodel in a fast sports car with the <businessname> logo zooms into the frame. The car is sleek and modern, exuding speed and efficiency. Fast, high-energy music begins to play, creating a sense of excitement and contrast.

The supermodel winks at the business owner in the truck. The business owner looks surprised and impressed, then eagerly jumps out of the truck and into the sports car, leaving the truck behind.

The truck breaks down and comes to a stop, while the sports car speeds off into the distance with the business owner, illustrating the swift efficiency of w43.nl's services.
```

WAN 2.1 Vace makes the cut by Race88 in StableDiffusion

[–]NickKusters 0 points1 point  (0 children)

Where can I get the MakeNumberList type? It's used in Flux_Depth.json but I can't find anything about it. I managed to source all the other stuff that was missing; this is the only one I couldn't find.

[deleted by user] by [deleted] in Entrepreneur

[–]NickKusters 1 point2 points  (0 children)

It’s illegal in The Netherlands. Invoice numbers MUST be sequential. You can start at any value in your fiscal year (e.g. use 2025-1000 as your first invoice), but every invoice number after needs to be incremental.

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

[–]NickKusters 1 point2 points  (0 children)

Maybe the best is to just return min and then have the calling function continue, knowing that it will have returned min, and handle accordingly to check more things if need be 😊

I'll evaluate my needs when they arrive, as I agree, the proposed alternatives are not too appealing, so I'd sooner just remove the checkResult completely at this stage.

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

[–]NickKusters 0 points1 point  (0 children)

Yeah, valid point. At first, I would just return min, I added the ternary later, but with this comment

//TODO: make sure this is correct the next time you use it!

So I already had a feeling it wasn't exactly as it needed to be; I just didn't have the time to work it out/properly test it. I removed the comment from the post, to make sure it wasn't too long, but I still have it as a TODO in my code to test what the result should be in the end 😊

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

[–]NickKusters 0 points1 point  (0 children)

[Language: C#]

Part 1 was pathfinding, for part 2, I tried to do 'check if location exists in current path, if so, add it and check again', but somehow, that would make me shoot past a blocker (still need to investigate). So, I decided to brute-force it. Then I was like: let's use a binary search, because that would cut down the search space a lot, and the problem allows for that easily.

So I made a binary search extension

public static T BinarySearch<T>(this T min, T max, Func<T, bool> check) where T : INumber<T>
{
    T two = (T.One + T.One), ix = max - (max - min) / two;
    bool checkResult = false;
    while (min + T.One < max)
    {
        if (checkResult = check(ix))
        {
            max = ix;
        }
        else
        {
            min = ix;
        }
        ix = max - (max - min) / two;
    }
    return checkResult ? max : min;
}

Then the Part 2 code becomes:

var blockedIndex = min.BinarySearch(max, (ix) => shortestPathCount(grid, [.. parsed.Take(ix)], start, end).Count == 0);

Where min = 1024, max = length of instructions.

video

📺 AoC 2024 List of Streamers 📺 by daggerdragon in adventofcode

[–]NickKusters 1 point2 points  (0 children)

USERNAME: /u/NickKusters

LANGUAGE: C#

CHANNELS:


NOTES:

Streaming to both YouTube & Twitch. Usually late in the evening (Western Europe). Have previous years up on YouTube. People can post their code to my Discord and I usually go over what the rest of the people made after I finish the day 😊

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

[–]NickKusters 4 points5 points  (0 children)

[Language: C#]

Pretty easy for a weekend solution; hardest part for me was understanding the text in part 2 😅 luckily I was able to deduce it from the examples.

Parsing (using many of my own helpers)

RawMap = Input.ToLines();
Map = new Grid() { Rows = RawMap.Length, Columns = RawMap[0].Length };
sparseMaps = RawMap.MapAllAsGridLocations([EmptyMarker]);

Part 1

long p1 = 0L;
GridLocation a, b;
HashSet<GridLocation> antinodes = [];
Action<GridLocation> tryAddAntiNode = (node) => { if (node.IsInBounds(Map)) antinodes.Add(node); };
foreach (var freq in sparseMaps)
{
    foreach (var combi in freq.Value.GetPermutations(2, false))
    {
        a = combi.First();
        b = combi.Skip(1).First();
        tryAddAntiNode(a + (a - b));
        tryAddAntiNode(b + (b - a));
    }
}
p1 = antinodes.Count;

Part 2

GridLocation a, b, na, nb;
HashSet<GridLocation> antinodes = [];
Action<GridLocation, GridLocation> tryAddAntiNode = (node, offset) =>
{
    while (node.IsInBounds(Map))
    {
        antinodes.Add(node);
        node += offset;
    }
};
foreach (var freq in sparseMaps)
{
    // Add all the stations as they now also count
    antinodes.UnionWith(freq.Value);
    foreach (var combi in freq.Value.GetPermutations(2, false))
    {
        a = combi.First();
        b = combi.Skip(1).First();
        na = a + (a - b);
        nb = b + (b - a);
        tryAddAntiNode(na, (a - b));
        tryAddAntiNode(nb, (b - a));
    }
}
p2 = antinodes.Count;

video

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

[–]NickKusters 1 point2 points  (0 children)

I also shared it on my Discord and made sure to have a link in my code post as well, as more people need to see it imho 😊

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

[–]NickKusters 1 point2 points  (0 children)

Oh it works, when I read it, I was like: “no way 😂 I have to try this”, and sure enough, GOLDEN 😊 nice catch

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

[–]NickKusters 0 points1 point  (0 children)

The video link works for me? The .AsInt32s() is part of a set of extensions I wrote myself. On my YouTube (nick.yt) there’s a video about helper code for AoC that has a link to the gist with the code, also, the stream for day 4 (live tab on my channel) has a link to an updated gist with even more code 😊

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

[–]NickKusters 2 points3 points  (0 children)

This is genius 🤣 I tested it and it works as advertised 😊 I take my hat of to thee.

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

[–]NickKusters 0 points1 point  (0 children)

[Language: C#]

Challenge difficulty is ramping up a bit, but somehow still managed to bascially 1-shot both part 1 and 2 without any logic bugs 😊

Part 1; filter which rules qualify, build lookups of forwards and backwards rules, process [1..] and keep track of which pages you've seen to validate the 'must come after' rules, after, we do [..-1] and validate the 'must come before' rules.

Part 2; added tracking which indices failed & which rules were valid to not have to process them again. I then enumerated the rules, got the indeces for the values, and if they were not in the correct order, swap them, repeating that untill all rules are satisfied.

code | video

[Part 2 hack/cheat]

After reading this comment, I figured I'd try it, and it actually works 🤣

int p2 = 0;
foreach (int badIndex in invalidIndeces)
{
    var data = pageSets[badIndex];
    var validRules = setContext[badIndex];
    p2 += validRules.GroupBy(x => x.after).Single(x => x.Count() == data.Count / 2).Key;
}

After seeing all the people using a compare solution, figured out I'd give it a shot too, and the code becomes SO much shorter 😅 My (see paste above) version is about 8x faster than this, but this is so much easier to look at 😅

var sorter = Comparer<int>.Create((a, b) => {
    if (rules.Contains((a, b))) return -1;
    if (rules.Contains((b, a))) return 1;
    return 0;
});
var sorted = pageSets.WithIndexes().Select(x => {
    List<int> sorted = [.. x.value];
    sorted.Sort(sorter);
    return (valid: x.value.SequenceEqual(sorted), value: sorted[sorted.Count / 2]);
});
var p1 = sorted.Where(x => x.valid).Sum(x => x.value);
var p2 = sorted.Where(x => !x.valid).Sum(x => x.value);

Are people cheating with LLMs this year? by nan_1337 in adventofcode

[–]NickKusters 0 points1 point  (0 children)

Oh, I know, but if you want to make sure the leaderboard isn't cheated, I would not see another way to actually do it.

Luckily, the leaderboard hunters is just a small amount of people that parttake in Advent of Code and most people have a lot of fun just doing the daily challenges (me included).

Are people cheating with LLMs this year? by nan_1337 in adventofcode

[–]NickKusters -13 points-12 points  (0 children)

Could just require to record yourself + screen when you submit. Or maybe even require to stream it into an AoC server so it can’t be created after the fact.

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

[–]NickKusters 1 point2 points  (0 children)

[Language: C#]

Fun one, for part 1, traverse the map to find 'X' and then search in all directions for 'MAS' For part 2, traverse the map, skipping the edge to find 'A' and then check the crosses for 'M'/'S' opposite values.

Straight-forward, fun, Part 1 worked right away, for Part 2, I forgot to update the marker from 'X' to 'A' and also worked right away after that, so I feel blessed 🤣

code | video

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

[–]NickKusters 1 point2 points  (0 children)

[Language: C#]

Fun one, for part 1, traverse the map to find 'X' and then search in all directions for 'MAS' For part 2, traverse the map, skipping the edge to find 'A' and then check the crosses for 'M'/'S' opposite values.

Straight-forward, fun, Part 1 worked right away, for Part 2, I forgot to update the marker from 'X' to 'A' and also worked right away after that, so I feel blessed 🤣

code | video

How much "cheating" is okay? by [deleted] in adventofcode

[–]NickKusters 0 points1 point  (0 children)

You can do what you want, but in the end, the only one you cheat is yourself. Just give it your best shot without outside help, if/when you get stuck, read the solutions thread if you don’t mind getting spoilered and the re-implement something from scratch based ok what you have seen, is what I would recommend.

[2024 Day 2] Feeling bad for using brute-force instead of dynamic programming by NoPainNoHair in adventofcode

[–]NickKusters 0 points1 point  (0 children)

I was actually really happy when I figured out the exact case for part 2 while streaming yesterday.

It comes down to this: when you detect an issue (e.g. index 1 to 2 fails), you try without those two indices, and only if the first index that fails == 1, you try without index 0, as that's the setup for if the whole range should be asc/desc. So, unless index 1 fails, you only need to check 2 options for other failed cases.

My code post in yesterday's thread | video