221 results for "":

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:

On the subject of time

It’s a fine Wednesday of February, and I’m sitting in my living room at four in the morning, typing these words. Just a few minutes ago, I poured myself a half glass of wine and smoked a cigarette, celebrating the end of “my first week”, as a matter of saying. I’m done with paid work for the week, and I get a few days to enjoy doing what I’m really interested in these days: creating games.

Thumbnail for Cleaning up and upgrading third-party crates

Cleaning up and upgrading third-party crates

The bleeding edge of rustc and clippy

Typically, you’d want a production application to use a stable version of Rust. At the time of this writing, that’s Rust 1.65.0, which stabilizes a bunch of long-awaited features (GATs, let-else, MIR inlining, split debug info, etc.).

Cool bear Cool Bear's hot tip

For every Rust release, Mara makes a wonderful recap thread on Twitter, on top of the official announcement.

Twitch fell behind

So you want to do live streams. Are you sure? Okay. Let’s talk about it.

Let’s talk numbers

Being a “content creator” (sorry for those who hate that term) is a job, for sure, and many people do it, successfully, full-time, they pay rent with it etc.

Platforms like Twitch & YouTube would have you think that, if you put in enough effort, you can grow your channel from nothing to 🎉 profitable ✨ in just a few short years.

Thumbnail for Everything but ELF

Everything but ELF

And we’re back!

In the last article, we thanked our old code and bade it adieu, for it did not spark joy. And then we made a new, solid foundation, on which we planned to actually make an executable packer.

As part of this endeavor, we’ve made a crate called encore, which only depends on libcore, and provides some of the things libstd would give us, but which we cannot have, because we do not want to rely on a libc.

The HTTP crash course nobody asked for

HTTP does a pretty good job staying out of everyone’s way.

If you’re reading this article, there’s a solid chance it was delivered to you over HTTP. Even if you’re reading this from an RSS reader or something. And you didn’t even have to think about it!

“Not having to think about it” is certainly a measure of success for a given technology. By contrast, I think about Bluetooth a lot. I wish I didn’t.

Thumbnail for All color is best-effort

All color is best-effort

I do not come to you with answers today, but rather some observations and a lot of questions.

The weird glitch

Recently I was editing some video and I noticed this:

A screenshot of the video, there are visible circles at various places in the image. Some of them are black, some of them are white. The image itself shows some blue and white text composited on some blurry background, which doesn’t really matter for this, and there’s a red line horizontal up in the image. It’s very confusing.

Not what the finger is pointing at — the dots.

Here are the separate layers this image is made up of: the background is a stock image I’ve licensed from Envato Elements:

A picture of a canyon, darker than you’d expect.

Because I use it as a background image, I’ve cranked down the exposition in the Color tab:

Recursive iterators in Rust

I’ve been looking for this blog post everywhere, but it doesn’t exist, so I guess it’s my turn to write about Some Fun with Rust.

The task at hand

Let’s say you have a recursive, acyclic data structure, like so:

struct Node { values: Vec<i32>, children: Vec<Node>, }

This allows you to represent a tree-like structure:

[1, 2, 3] /\ / \ / \ / \ / \ [4, 5] [6, 7]
Thumbnail for Migrating from warp to axum

Migrating from warp to axum

Falling out of love with warp

Back when I wrote this codebase, warp was the best / only alternative for something relatively high-level on top of hyper.

I was never super fond of warp’s model — it’s a fine crate, just not for me.

The way routing works is essentially building a type that gets larger and larger. One route might look like:

bye = warp warppath | | name
Thumbnail for Day 8 (Advent of Code 2020)

Day 8 (Advent of Code 2020)

Time for another Advent of Code 2020 problem!

That one sounds like it’s going to be fun. Our input is pretty much assembly, like this:

nop +0 acc +1 jmp +4 acc +3 jmp -3 acc -99 acc +1 jmp -4 acc +6

So, the first thing we’re going to do is write down some types.

There’s more than one way to approach this problem, but let’s go with this:

#[derive =