220 results for "":

Image decay as a service

Since I write a lot of articles about Rust, I tend to get a lot of questions about specific crates: “Amos, what do you think of oauth2-simd? Is it better than openid-sse4? I think the latter has a lot of boilerplate.”

And most of the time, I’m not sure what to responds. There’s a lot of crates out there. I could probably review one crate a day until I retire!

Thumbnail for More devops than I bargained for

More devops than I bargained for

Background

I recently had a bit of impromptu disaster recovery, and it gave me a hunger for more! More downtime! More kubernetes manifest! More DNS! Ahhhh!

The plan was really simple. I love dedicated Hetzner servers with all my heart but they are not very fungible.

You have to wait entire minutes for a new dedicated server to be provisioned. Sometimes you pay a setup fee, et cetera. And at some point to server static websites and serve as a K3S server, it’s simply just too big, and approximately twice the price that I should pay.

Thumbnail for Day 3 (Advent of Code 2020)

Day 3 (Advent of Code 2020)

Hello all, and welcome back to Advent of Code 2020, featuring Cool Bear.

Cool bear

Hey y’all!

Let’s get right to it.

The problem statement for Day 3 is as follows: we’re given a map, that looks like this:

..##....... #...#...#.. .#....#..#. ..#.#...#.# .#...##..#. ..#.##..... .#.#.#....# .#........# #.##...#... #...##....# .#..#...#.#

And we imagine that it repeats infinitely to the right, like so:

Thumbnail for Learning Nix from the bottom up

Learning Nix from the bottom up

Remember the snapshot we made allll the way back in Part 1? Now’s the time to use it.

Well, make sure you’ve committed and pushed all your changes, but when you’re ready, let’s go back in time to before we installed anything catscii-specific in our VM.

This should emulate the experience of a colleague onboarding onto the project well enough!

(I didn’t actually use VirtualBox’s snapshot feature for this, I actually set up a Ubuntu 22.10 VM on another computer entirely, but the effect should be much the same).

Thumbnail for Day 10 (Advent of Code 2020)

Day 10 (Advent of Code 2020)

Cool bear

Day, 10! Day, 10!

Okay, Day 10.

Again, the problem statement is very confusing - but what it all boils down to is this. We have a list of numbers:

16 10 15 5 1 11 7 19 6 12 4

To which we need to add 0 and whatever the maximum was, plus three:

16 10 15 5 1 11 7 19 6 12 4 0 22

From there on, if we take them in order, we’ll have gaps of 1 and gaps of 3:

Happy stay with us day

I didn’t really know what to do for “World Suicide Prevention Day 2014”.

First off, I didn’t know it existed at all. Like, c’mon, know your audience, if you have a party like that, I want in!

Second, it’s a terrible name: I hereby propose “stay with us day” in place. Nevermind the “world” part because, hey, we’re on the internet, the “suicide” part because, well, avoiding that is just the very start of a long uphill battle, and let’s keep the “day” part because, honest, if we can attract people’s attention for even a single day per year, it’ll be nothing short of a miracle.

Thumbnail for Day 5 (Advent of Code 2020)

Day 5 (Advent of Code 2020)

Time for another day of Advent of Code 2020.

For Day 5, we’re going to have to do…

Cool bear

Let me guess: more parsing?

Amos

Correct!

So there’s an airline that uses binary space partitioning when referring to seats - there’s 128 rows and 8 columns. The first 7 characters are either F (Front, for the lower half) and B (back, for the upper half), and the last 3 are L (Left, for the lower half) or R (Right, for the upper half).

Proc macro support in rust-analyzer for nightly rustc versions

I don’t mean to complain. Doing software engineering for a living is a situation of extreme privilege. But there’s something to be said about how alienating it can be at times.

Once, just once, I want to be able to answer someone’s “what are you working on?” question with “see that house? it wasn’t there last year. I built that”.

Instead for now, I have to answer with: “well you see… support for proc macros was broken in rust-analyzer for folks who used a nightly rustc toolchain, due to incompatibilities in the bridge (which is an unstable interface in the first place), and it’s bound to stay broken for the foreseeable future, not specifically because of technical challenges, but mostly because of human and organizational challenges, and I think I’ve found a way forward that will benefit everyone.”

Thumbnail for Making our own spectrogram

Making our own spectrogram

A couple months ago I made a loudness meter and went way too in-depth into how humans have measured loudness over time.

A screenshot of the fasterthanlime audio meter, with RMS, sample peak, true peak, and various loudness metrics.

Today we’re looking at a spectrogram visualization I made, which is a lot more entertaining!

We’re going to talk about how to extract frequencies from sound waves, but also how my spectrogram app is assembled from different Rust crates, how it handles audio and graphics threads, how it draws the spectrogram etc.

Pin and suffering

Disclaimer:

async fn in trait has shipped in Rust 1.75, about 2.5 years after this article was written.

I’d like to think that my understanding of “async Rust” has increased over the past year or so. I’m 100% onboard with the basic principle: I would like to handle thousands of concurrent tasks using a handful of threads. That sounds great!