gerikson

joined 2 years ago
[–] [email protected] 4 points 1 month ago* (last edited 1 month ago) (1 children)

Day 5 - Print Queue

day 5

urgh this took me much longer than it should have... part 1 was easy enough but then I got tied up in knots with part 2. Finally I just sorto-bogo-sorted it all into shape

Perl: https://github.com/gustafe/aoc2024/blob/main/d05-Print-Queue.pl

Recheck array size: 98
All rechecks passed after 5938 passes
Duration: 00h00m00s (634.007 ms)

[–] [email protected] 9 points 1 month ago

Ed's intended audience is probably more familiar with Beckett's play than some random indie game engine.

[–] [email protected] 2 points 1 month ago (1 children)

re: 4-2

is it really n^2 tho? You have to do a constant check around each element, but that does not increase with the number of elements. And you can optimize a bit by marking already seen 'A's as illegal states and don't have to check them when the next row is processed.

[–] [email protected] 4 points 1 month ago* (last edited 1 month ago) (1 children)

Day 4 - Ceres Search

discussion

There's probably a smarter way to do this...

For part 1, I dumped everything into a matrix. Then I scanned it element by element. If I found an X, I searched in 8 directions from there and counted up if I found M A S in sequence.

For part 2 I searched for an A, checked each diagonal corner, and counted up if the opposites were M S or S M

https://github.com/gustafe/aoc2024/blob/main/d04-Ceres-Search.pl

[–] [email protected] 12 points 1 month ago (3 children)

And right now South Korea's president has declared martial law and banned all political activity, I guess she'll be just fine with that.

[–] [email protected] 4 points 1 month ago (2 children)

Day 3

3-2

I expect much wailing and gnashing of teeth regarding the parsing, which of course is utterly trivial if you know a bit if regex.

I got bit by the input being more than one line. Embarrasing.

I wonder if any input starts with a "don't()" or if it's too early for Erik to pull such trickery.

[–] [email protected] 11 points 1 month ago (5 children)

LOL @ North Korea being "woke". If they are, why are they assisting Russia, the Right's Great White Hope, in a war against a country that these people also denigrate as "woke"? But hey, never let facts or logic get in the way of a good grift.

[–] [email protected] 5 points 1 month ago (1 children)

re: 2-2

I was convinced that some of the Perl gods in the subreddit would reveal some forgotten lore that solved this in one line but looks like my brute force method of removing one element at a time was the way to go.

[–] [email protected] 4 points 1 month ago

It's that time of the year again. Last year was tough for me, i got laid off in the middle of dec and it kinda killed the vibe. I'll see how long I keep up this year. My historical backlog is growing but I've made peace with it.

[–] [email protected] 3 points 1 month ago

you know why people use reddit and lemmy because they don’t have to read the articles because people summarize the source material accurately in the title and summary

this is the funniest thing I've read all week, thanks for the LOL my dude

[–] [email protected] 5 points 1 month ago (1 children)

Thanks for expanding. I think every company that has a biggish community has to deal with nazi entryism.

This was the story I remembered about this

https://kotaku.com/the-struggle-over-gamers-who-use-mods-to-create-racist-1826606138

[–] [email protected] 5 points 1 month ago (3 children)

Isn't there a huge neo-nazi subculture around Paradox games, with weird mods and stuff?

view more: ‹ prev next ›