221 results for "":
Day 1 (Advent of Code 2022)
Two years ago, I did part of Advent of Code 2020 using the Rust language. It was a lot of fun, so let’s try it again!
The problem statement
Our input looks something like this:
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
Each group of lines separated by an empty line is a list of food items an elf is carrying: each line corresponds to the number of calories in that food.
One funny way to bundle assets
There’s one thing that bothers me. In part 1, why are we using
hyper-staticfile? Couldn’t we just use file:/// URLs?
Well, first off: showing off how easy it is to serve some static files, even in a “scary” language like Rust, is just not something I could pass up.
But also: think about distributing salvage as a tool. Will we want to
distribute all those HTML/CSS/JS/font files alongside it?
Reading files the hard way - Part 2 (x86 asm, linux kernel)
Looking at that latest mental model, it’s.. a bit suspicious that every program ends up calling the same set of functions. It’s almost like something different happens when calling those.
Are those even regular functions? Can we step through them with a debugger?
If we run our stdio-powered C program in gdb, and break on read, we can
confirm that we indeed end up calling a read function (which is called
__GI___libc_read here, but oh well):
Async fn in trait, for real this time
async_trait’s one weird type ascription trick
Now that I got the Log in with GitHub feature working, let’s explore
what this would’ve looked like with the async_trait crate.
First up, the trait definition:
/// Something that can refresh credentials
# [ async_trait :: async_trait ]
pub trait CredentialsRefresher {
async fn refresh ( & self , creds -> eyre
Does Dioxus spark joy?
Note: this article is adapted from a presentation I gave at a Rust Paris Meetup — that’s why it sounds a little different than usual. Enjoy!
Good evening! Tonight, I will attempt to answer the question: Does Dioxus spark joy? Or at the very least, whimsy.
What’s Dioxus, you ask? It is first and foremost a name that is quote: “legally not inspired by any Pokémon”.
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.”
itch.io app timeline 2016
I’ve been working on the itch.io desktop app for about a year now, so I thought I’d make a quick recap:
At the time of this writing, the app has been downloaded about 460K times (including updates). Not counting the back-end, the app and its various components are made up of around 100K lines of code (mostly javascript and golang), most of which is open-source.
Celebrating Mario Maker
I’ve been watching a lot of Super Mario Maker videos this past month. Probably a hundred hours! This game is like a world onto itself, and it was fascinating to learn its design language and patterns.
With Super Mario Maker 2 coming out soon, I thought I’d show off some of the cool stuff I’ve seen, to celebrate Mario Maker.
We’ll start with some basic elements of Mario Maker (with screenshots), and then move on to a lot of video clips showing cool stuff.
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.
Parsing IPv4 packets, including numbers smaller than bytes
Hello and welcome to Part 11 of this series, wherein we finally use some of the code I prototyped way back when I was planning this series.
Where are we standing?
Let’s review the progress we’ve made in the first 10 parts: first, we’ve started thinking about what it takes for computers to communicate. Then, we’ve followed a rough outline of the various standards and protocols that have emerged since the 1970s.