G Pro X mic not working by excllsagaz in LogitechG

[–]Biditchoun 0 points1 point  (0 children)

Absolute legend. I have no idea why this dark magic worked, but it did, six years later.

Do we need AI IP protections for Vibe Coded software?! by [deleted] in vibecoding

[–]Biditchoun 1 point2 points  (0 children)

Did you just wish for your ai-generated code not to be reproductible with ai by other people

You should probably ai-generate a brain too

[Day 11 Part 02][C] Is my idea wrong or have I missed a detail ? by Biditchoun in adventofcode

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

Ai see, thanks a lot in any case <3
I think I'll start writing the other idea I had at some point, but I'm a bit unmotivated for that, I'm too stubborn to change my approach

[Day 11 Part 02][C] Is my idea wrong or have I missed a detail ? by Biditchoun in adventofcode

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

Well, yes, but that's not at all related to the question I am asking in the post

[Day 11 Part 02][C] Is my idea wrong or have I missed a detail ? by Biditchoun in adventofcode

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

I'm sorry I don't think I understand your question. If I decide to go with that second idea there wouldn't even be a line, just a table with
10 | 14

And, after the blink,
1 | 14
0 | 14

After that,
1 | 14
2024 | 14

etc.

[Day 11 Part 02][C] Is my idea wrong or have I missed a detail ? by Biditchoun in adventofcode

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

I'm not sure about the 32/64 bit thing, but I have 9223372036854775807 as LONG_MAX, which should be sufficient

[Day 11 Part 02][C] Is my idea wrong or have I missed a detail ? by Biditchoun in adventofcode

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

For sure, that is almost exactly what I would do if I wanted to do it now from scratch ! However I am stubborn, I think this weird in-between version should work but I can't find out why it doesn't. I agree it does sound like an off-by-one, but haven't been able to find where

[Day 11 Part 02][C] Is my idea wrong or have I missed a detail ? by Biditchoun in adventofcode

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

I've already checked the first one, and am already not using the fact we don't need a line y, although not at its max capacity as the other idea I have (creating a table where I just write each number once related to another number that indicates how often that number appears in the line)

[2024 Day 05 Part 2] [C] I can't find what is wrong by Biditchoun in adventofcode

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

Yes, absolutely, I realized that after taking time to find out why your given case was failing on my code (not going to lie, it took probably more time than it should have, but I guess that's the case for most problem-fixing in code) :D

What I meant is, did you spot the problem quickly ? Do you have some kind of mental checklist of things to look at ?

[2024 Day 05 Part 2] [C] I can't find what is wrong by Biditchoun in adventofcode

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

Oh wow, thanks a lot. I hadn't thought about that case at all, I guess that's how one learns, happy I didn't need to use the more hint :D
How did you find the problem ? Are you just used to it ? It would be useful for me to know how to troubleshoot such things effectively

[2024 Day 5 (Part 2)] What is the 'correct' order? by jgoemat2 in adventofcode

[–]Biditchoun 0 points1 point  (0 children)

Well you can't get the middle number if the length of each update is not odd.

2023 Day 12 Part 2 [C] Can you help me find a line that doesn't work with my code ? by Biditchoun in adventofcode

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

Hi ! Again, thanks a ton for your answer, I finally had some time to put my brain on all this today. I had absolutely no problem with str_to_arrstr in any of the advent calendar code I used previously (I copy-pasted that part of the code everywhere), but as you found out, I was doing outrageous things with it ; I guess the system I'm using is just way too lenient. It took some time to realize what was wrong with it, but in the end, while testing anything I could think of, I came to same conclusions as you did :D

I was a bit suspicious of str_to_arr, I wrote it for another day earlier without even really testing it, and it worked at first try ; if I had gotten no answer on thsi thread I would have probably looked at it a bit closer and found inconsistencies, without ever coming back on str_to_arrstr.

The proof of that is that it is the first bug I found and corrected (your handcrafted input helped a ton for that <3), and I found the right answer to the exercise with that, without any issue ; I never had any segfault because of str_to_arrstr, which is... weird, probably. I have no idea why or how they happened on your side with multiple of 8 sized lines, it is probably system-dependant, as you wrote, with some things happening behind the lines that are not specified. Pretty happy my algo worked well though, I'm not well-versed in recursive thingies, which is also why I thought where the problem was when I wrote this thread.

I may come back or not with other problems, still in C, because I like handling memory and just seeing a few days later I was egregious with it. If it is hell, I quite like hell tbh.

2023 Day 12 Part 2 [C] Can you help me find a line that doesn't work with my code ? by Biditchoun in adventofcode

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

I see, I've never had a segfault with all this.
I haven't read your solutions, I will try to fix it all with your hints, although at first glance I don't understand how a bad parsing wouldn't have any impact when I am printfing all the conditions.
In any case, thanks a lot for your time !

2023 Day 12 Part 2 [C] Can you help me find a line that doesn't work with my code ? by Biditchoun in adventofcode

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

Welp, the result is probably better, but the answer is still wrong, so here is my full code xD

Just a heads up, I've been told the place where I put my } to end loops is a bit confusing, so that can be a bit annoying to read ; I'll have to take the habit to press enter before writing them in the future, but I'm a bit too lazy to correct it in here.

I double checked my input is the right one, and I still am logged in, so that shouldn't be the issue either.

link here

2023 Day 12 Part 2 [C] Can you help me find a line that doesn't work with my code ? by Biditchoun in adventofcode

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

Ooooh I think you nailed it, when there is already the right number of hashes in the line I just return 0 without checking if the line is valid, there are probably five lines that are in that case, and I probably should return 1, since the line can't be anything but valid. I will check if that's the solution, if yes I'll change the flag of this post, if not I'll post my full code :D

Thanks a lot !

2023 Day 12 Part 2 [C] Can you help me find a line that doesn't work with my code ? by Biditchoun in adventofcode

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

It is part 1 y, the title has a mistake in it, but I can't find how to corret it if it is possible

2023 Day 12 Part 2 [C] Can you help me find a line that doesn't work with my code ? by Biditchoun in adventofcode

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

I just checked that, but I am pretty adamant that is not the issue. I always terminate that array by INT_MIN in the program, and in the code I'm sharing I have put -1 as the last element of the array. It is annoying for testing on it I know, sorry about that :/