#adventofcode 2021 Day 6.
Even more important to pick the right data structure today than it was yesterday!
I didn't at first, thinking it a premature optimization...
But while I paid for it by having to implement the solution twice, at least I had a known-correct solution to test my optimized version against, which turned out to be very helpful!
We're getting into the part of #adventofcode 2021 where data structures really matter, and it's a fun thing to consider – most day to day programming problems aren't this obviously about that.
Anyway, here's my (commented) solution for Day 5:
It's not super performant, but good enough. I'm pretty sure at least part of it is due to Data.Map being an ordered Map, when I don't really need it to be.
Unpopular opinion: One should never call themselves an expat. Sure, it used to have a specific meaning, but nowadays, its meaning is just "privileged (white) immigrant".
Ever since I moved to Berlin, I made a point to call myself an immigrant, and it was surprising how many low-key racists got confused by that, as they preferred to call white immigrants expats to differentiate that from "the bad ones".
Note, you're not bad for calling yourself an expat, but it's worth a reevaluation.
Plasma 5.23 has brought back visible scrollbars!
They are thick! They have contrast! The background color is different from the foreground! They have contours! I can visibly see them!
Visible scrollbars are BACK!
Some good news:
A years-long project to develop a systematic way to clean the Great Pacific Garbage Patch finished an important test a couple of days ago. It removed a large amount of plastic. Like, so much that with about 15 additional copies of that test equipment, the entire patch could be cleaned in a few years.
@hafnia American tourist in Montreal goes up to the hotel front desk. “Why is it that when I turn the knob marked C, I get hot water?” “Well, sir, the C stands for chaud, which is the French word for hot.” “Hmm, ok, that makes sense. But why is the othe knob also marked C?” “That C stands for cold, sir. You know, Canada is a bilingual country.”
As a result of a critical system failure on October 3rd of 2021, Misskey.io's has been rolled back to a backup made on April 4th of 2021.
In accordance with this, all account data has also been reset to the state it was in at the point this backup was made. We are greatly sorry for the inconvenience, but would like to ask users of remote instances that have followed users from Misskey.io between the above stated timespan to please cancel and re-follow the users that they have followed, as while it may seem like you are following them, this is not being correctly reflected.
Additionally, we would be happy if you could please spread the news of this post to as many people as you are able to.
Once again, we sincerely apologize for the great trouble caused by this incident and ask for both understanding and cooperation in this matter.
I like robots, obsolete technology, and terrible puns.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!