Ed's intended audience is probably more familiar with Beckett's play than some random indie game engine.
gerikson
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.
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
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.
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.
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.
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.
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.
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
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
Isn't there a huge neo-nazi subculture around Paradox games, with weird mods and stuff?
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