212 results for "":

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.

Things that can go wrong when downloading

When I get a little bit too emotional about my current baby, the itch.io app, there’s always a timely support ticket reminding me that it is currently, still a glorified game downloader.

However true that is, that doesn’t mean it’s easy! In the past year, I’ve had to account for a bunch of failure conditions that can happen, some of which I didn’t realize were even possible. Let’s review them, for fun!

The thumbnail for this page

Day 14 (Advent of Code 2022)

I like how the day 14 puzzle sounds, because I think it’ll give me an opportunity to show off yet another way to have Rust embedded in a web page.

But first…

Cool bear

Let me guess: parsing?

You bet your furry ass, parsing.

Parsing

The input looks something like this:

498,4 -> 498,6 -> 496,6 503,4 -> 502,4 -> 502,9 -> 494,9

And each line is essentially… a polyline: we’re supposed to draw lines between every point on the path, and that determines rocks on the map.

The thumbnail for this page

Loading multiple ELF objects

Up until now, we’ve been loading a single ELF file, and there wasn’t much structure to how we did it: everyhing just kinda happened in main, in no particular order.

But now that shared libraries are in the picture, we have to load multiple ELF files, with search paths, and keep them around so we can resolve symbols, and apply relocations across different objects.

Efficient game updates

A little while ago, I wrote an article on things that can go wrong when downloading, it listed a series of reasons, from network problems to invalid content to imperfect hardware that may occur when initially installing a game.

This article discusses what methods we can use to upgrade a game to a later version, when an older version has been successfully installed.

The thumbnail for this page

Async fn in trait... not

Async fn in trait… not

I was planning on showing the in-progress async_fn_in_trait feature in the context of my website, but it turns out, I can’t!

My website uses two databases: one local SQLite database for content, and a shared Postgres database for user credentials, preferences etc. Migrations are run on startup, and each migration implements one of the following traits:

The thumbnail for this page

Crafting ARP packets to find a remote host's MAC address

Alright. ALRIGHT. I know, we’re all excited, but let’s think about what we’re doing again.

So we’ve managed to look at real network traffic and parse it completely. We’ve also taken some ICMP packets, parsed them, and then serialized them right back and we got the exact same result.

So I know what you’re thinking - let’s just move our way down the stack again - stuff that ICMP packet in an IP packet, then in an Ethernet frame, and then serialize the whole thing.

I am a Java, C#, C or C++ developer, time to do some Rust

As I’ve said before, I’m working on a book about lifetimes. Or maybe it’s just a long series - I haven’t decided the specifics yet. Like every one of my series/book things, it’s long, and it starts you off way in the periphery of the subject, and takes a lot of detours to get there.

In other words - it’s great if you want an adventure (which truly understanding Rust definitely is), but it’s not the best if you are currently on the puzzled end of a conversation with your neighborhood lifetime enforcer, the Rust compiler.

oocdoc, Part 2 — brummi

In , we saw how to use NaturalDocs, a language-agnostic documentation generator. Today we’ll see how to use brummi, a tool specific to ooc, written by Friedrich Weber.

Generating .json files

The first step to generate docs using brummi is to use rock, to generate a set of .json files describing the code. The --backend command-line option allows to select which backend you want rock to use (the C backend is the default).

The thumbnail for this page

Designing and implementing a safer API on top of LoadLibrary

It’s refactor time!

Our complete program is now about a hundred lines, counting blank lines (see the end of part 3 for a complete listing).

While this is pretty good for a zero-dependency project (save for pretty-hex), we can do better.

First off, concerns are mixed up. In the same file, we:

  • Expose LoadLibraryA / GetProcAddress
  • Expose the Win32 ICMP API