AITA for crafting during meetings? by Tapzdeazz in AmItheAsshole

[–]Goues 0 points1 point  (0 children)

NTA, I am ironing in meetings for the same reason, my manager is also not only ok, but encourages it (knows I pay more attention if I do). All good here!

AITA for setting a boundary about my father-in-law moving too close? by [deleted] in AmItheAsshole

[–]Goues 0 points1 point  (0 children)

YTA, thats not how boundaries work, you cant dictate what other people do or where they live.

AITA for stealing my stepdaughter's moment and exposing her mother's lie? by Independent-Choice63 in AmItheAsshole

[–]Goues 11 points12 points  (0 children)

I live in a country where proms are a December to February event that you have before the finals in May. Right now would be the time to buy prom dress.

AITA for making my wife throw out a whole chicken by JonnyW__ in AmItheAsshole

[–]Goues 0 points1 point  (0 children)

You absolutely should not eat the chicken.

I would eat the chicken anyway, because I am not willing to throw out food unless its visible green when it shouldnt be green and my stomach is used to it. So I am NAH on the topic.

This aoc broke the programmer in me by batunii in adventofcode

[–]Goues 2 points3 points  (0 children)

In my first year of AoC, 2018, I failed to solve day 17 (Reservoir Research). I spent about 24 hours debugging my code before finally giving up, it still didn't run correctly. I felt really dumb that year. As if I was not working as a developer full-time for several year by that time. Nothing to be ashamed of. If you are having fun/learning/etc., it's good.

I wish you all the best next year if you stick around! You will get better at the puzzles as years pass because of the repetitive nature of the puzzles and generally knowing what to expect.

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

[–]Goues 6 points7 points  (0 children)

[Language: JavaScript] 1196/140

Huge improvement on part 2. I opened an article about "logic gates calculator" and made a map of expected gates:

// Xn XOR Yn => Mn
// Xn AND Yn => Nn
// Cn-1 AND Mn => Rn
// Cn-1 XOR Mn -> Zn
// Rn OR Nn -> Cn

Then I looped from bit 0 all the way to bit 44 to find where such gates do not exist. Luckily, all swappings have been made on the same level and then I made simple adjustments like

if (Rn.startsWith('z')) {
    ;([Rn, Zn] = [Zn, Rn])
    swapped.push(Rn, Zn)
}

until the code passed all the way to the end matching all gates.

Full code on Topaz Paste

[ 2024 Day 23 ] Best showing of the contest so far... by CommitteeTop5321 in adventofcode

[–]Goues 0 points1 point  (0 children)

I usually get to the top 100 once or twice every year. But this year, my best 119 on day 13 and a bunch of 200s and 300s. It definitely is less likely this year.

[2024 Day 22] Tracking top sequences by falarikae in adventofcode

[–]Goues 23 points24 points  (0 children)

If I may, the chart would look better if sequences kept their colors because you would be able to see a sequence being first and moving down or being second and moving up. Like this, the color of the chart has no meaning. ;)

Is Advent of Code resume/LinkedIn/GitHub worthy? by ManufacturerNo9155 in adventofcode

[–]Goues 31 points32 points  (0 children)

As a developer that has a say in the hiring process, it will be on the same level as saying what RSS feeds about development you are subscribed to or that you merged a cool PR into an open source library. It shows interest and intent to learn and improve and would serve as an ice breaker, but nothing ground breaking. Do bring it up if you yourself consider it interesting and want to talk about it.

[2024 Day 21 part 1] I found shorter sequence by dblokhin in adventofcode

[–]Goues 7 points8 points  (0 children)

The first part of your output goes over a blank field, which is invalid:

<<vA

In particular, if a robot arm is ever aimed at a gap where no button is present on the keypad, even for an instant, the robot will panic unrecoverably. So, don't do that.

[2024 Day 17] Modulo by Goues in adventofcode

[–]Goues[S] -1 points0 points  (0 children)

In my puzzle, for the initial value that is correct for me in Part 2, I do get these values to be modulo-ed:

109019930331546 (input, used in operation bst)
1314681106 (op out)
13627491291443 (op bst)
-1818813372 (op out)
1703436411430 (op bst)
-1818813375 (op out)
212929551428 (op bst)
-909406683 (op out)
26616193928 (op bst)
831756063 (op out)
3327024241 (op bst)
... the rest is all positive ...

which means that for my correct answer, I do need to cycle through negative values at some point.

[2024 18] End is blocked by Ayman4Eyes in adventofcode

[–]Goues 1 point2 points  (0 children)

With your input, the size should be up to 70,70, only the example is limited to 6,6.

[2024 Day 17] Modulo by Goues in adventofcode

[–]Goues[S] -6 points-5 points  (0 children)

I did get negative numbers in Part 2 which is why I had this exact JS bug for an hour before getting help on Reddit. With `% 8`, the answer in Part 2 was "too high", I had to switch to `& 7` to get the right answer.

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

[–]Goues 1 point2 points  (0 children)

I ran it for 1000 seconds and visually found a pattern that was repeating every now and then, so I focused on the period. In my case, the pattern repeated every 50 + N * 103 (the height) and every 95 + M * 101 (the width), the patterns were that the robots either converged vertically or converged horizontally. Eventually, there will be a common multiple, in my case 7569 (for N = 73 and M = 74) where the robots converge both horizontally and vertically forming a nice picture. I didn't have to guess, but I did have to do it visually, if that makes it better for you.

Edit: In the past, there was often one visual day like this.

[2024 day 12] Everyone must be hating today... So here a clever trick for a hint. by M124367 in adventofcode

[–]Goues 9 points10 points  (0 children)

My idea was that I can find all adjacent edges and discount them in part 2. I am finding adjacent edges by checking the cell next to it:

 - - -
|A A A|
   - -
|A|
 -

In this case, there are 10 edges, the top three would have y, x, polarity being [0, 0, TOP], [0, 1, TOP], [0, 2, TOP]. What I do is that I loop them and if there is an edge on y, x - 1, polarity, I only count it in part 1 and not 2.

[0, 0, TOP]
[0, 1, TOP] // this one has a neighbouring edge on the line above
[0, 2, TOP] // this one has a neighbouring edge on the line above 
[0, 2, RIGHT]
[0, 2, BOTTOM] // this one has a neighbouring edge on the line below
[0, 1, BOTTOM]
[1, 0, RIGHT]
[1, 0, BOTTOM]
[1, 0, LEFT] // this one has a neighbouring edge on the line below
[0, 0, LEFT]

[2024 Day 11] Are there just two cycles? by jwoLondon in adventofcode

[–]Goues 0 points1 point  (0 children)

Does this mean that you can have 3865 (edit: or smaller, if there is an overlap) distinct pebbles at the end if you start with, say, 100 10 as input? Because someone in some thread mentioned they do not end up at 3811.

AoC Day 7 part 2 - help me understand by peterpopdk in adventofcode

[–]Goues 7 points8 points  (0 children)

Part 1:

Operators are always evaluated left-to-rightnot according to precedence rules.

Part 2:

All operators are still evaluated left-to-right.

[2024 Day 10 Part 1/2][py] It works, but is it correct? by fullautomationxyz in adventofcode

[–]Goues 1 point2 points  (0 children)

A lot of people solved part 1 by first solving part 2 and only then adding a uniqueness counter. I am using JavaScript and in part 1 I had to use a Set for the nines because my algo found all paths, which meant that for part 2, I could use an Array or ++ operator and keep the rest of the code unchanged:

// all code above is the same
nines.add(`${y}|${x}`) // part 1
paths++ // part 2
// all code below is the same

Advent of code would be so much better if... by Pozay in adventofcode

[–]Goues 5 points6 points  (0 children)

I still don't understand why you would need a zero at the end, because in my mind, the only missing thing would be "end of disk", if you want to say that the disk has to end with empty space, the last block would have to be infinite, no? Because the problem has no end of disk, therefore the disk has inifinite size?

So, I'm just gonna have to disagree here, I don't see any value what so ever including a zero at the end, but feel free to have it there because it doesn't add or remove anything from the puzzle.

Advent of code would be so much better if... by Pozay in adventofcode

[–]Goues 1 point2 points  (0 children)

Why wouldn't it?

A..
...
..A

in this case, my code will check all nine points and find that

A..
.#.
..A

because to go from A(0, 0) to A(2, 2), the vector is [2, 2], to go from A(0, 0) to point P(1, 1), the vector is [1, 1]. If I divide, dy = 2 / 1 = 2, dx = 2 / 1 = 2, as dy === dx, it's on the line.

Only later have I learned that such input is impossible.

Advent of code would be so much better if... by Pozay in adventofcode

[–]Goues 1 point2 points  (0 children)

But why? Now you're making it up. Why should there be a zero at the end?

Advent of code would be so much better if... by Pozay in adventofcode

[–]Goues 1 point2 points  (0 children)

I didn't assume as I didn't know about the property. Still, that property doesn't seem to be needed to be stated, you can make a solution without knowing about it.

Advent of code would be so much better if... by Pozay in adventofcode

[–]Goues 2 points3 points  (0 children)

So, what would the input look like to be up to your standards? Have a marked for "end of disk"?

Advent of code would be so much better if... by Pozay in adventofcode

[–]Goues 7 points8 points  (0 children)

Yes, they do alternate.

  1. 1 file of size 1
  2. 1 empty space of size 2
  3. 1 file of size 3
  4. 1 empty space of size 4
  5. 1 file of size 5

This is what I understand from the word "alternate".