212 results for "":

The thumbnail for this page

Day 12 (Advent of Code 2020)

Time for the Day 12 problem!

In this problem, we have a ship. And we have navigation instructions:

  • Action N means to move north by the given value.
  • Action S means to move south by the given value.
  • Action E means to move east by the given value.
  • Action W means to move west by the given value.
  • Action L means to turn left the given number of degrees.
  • Action R means to turn right the given number of degrees.
The thumbnail for this page

Day 12 (Advent of Code 2022)

Alright! The day 12 puzzle involves path finding, and it seems like a good time to lean more heavily on the WASM embeds I’ve set up for the previous parts.

Let’s start by setting up the types we’ll want!

Types and parsing

Our input is a heightmap, like so:

Sabqponm abcryxxl accszExk acctuvwj abdefghi

Where 'a'..='z' is a square with a given elevation (from lowest to highest), S is the start, and E is the end.

rock 0.9.7 + new website

This is going to be a short one.

Basically, since February, both shamanas, fredreichbier and I have putting way too much work into the latest iteration of rock, an ooc compiler written in ooc.

I have the pleasure to announce that version 0.9.7, codename pacino is now out, as you can plainly see on the new website: https://ooc-lang.github.io

You can read the release notes to learn what has changed, but basically expect a lot of fixes, some new APIs, and awesome backtraces.

The thumbnail for this page

Crafting ICMP-bearing IPv4 packets with the help of bitvec

So. Serializing IPv4 packets. Easy? Well, not exactly.

IPv4 was annoying to parse, because we had 3-bit integers, and 13-bit integers, and who knows what else. Serializing it is going to be exactly the same.

Right now, we don’t have a way to serialize that.

Let’s take the version and ihl fields, both of which are supposed to take 4 bits, together making a byte. We could serialize them like this:

The thumbnail for this page

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).

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.

The thumbnail for this page

Parsing and serializing ICMP packets with cookie-factory.

In the last part, we’ve finally parsed some IPv4 packets. We even found a way to filter only IPv4 packets that contain ICMP packets.

There’s one thing we haven’t done though, and that’s verify their checksum. Folks could be sending us invalid IPv4 packets and we’d be parsing them like a fool!

This series is getting quite long, so let’s jump right into it.

When rustc explodes

One could say I have a bit of an obsession with build times.

I believe having a “tight feedback loop” is extremely valuable: when I work on a large codebase, I want to be able to make small incremental changes and check very often that things are going as expected.

Especially if I’m working on a project that needs to move quickly: say, the product for an early-stage startup, or a side-project for which I only ever get to do 1-hour work bursts at most.

The thumbnail for this page

A no_std Rust binary

In Part 11, we spent some time clarifying mechanisms we had previously glossed over: how variables and functions from other ELF objects were accessed at runtime.

We saw that doing so “proper” required the cooperation of the compiler, the assembler, the linker, and the dynamic loader. We also learned that the mechanism for functions was actually quite complicated! And sorta clever!

The thumbnail for this page

Technology, as seen on TV

Enhance! In this series, we’re looking at TV depictions of technology, and reviewing how realistic they are. Of course, they’re very rarely accurate, but it’s still interesting to take a look and try to figure out what they could’ve been thinking of, and just reminisce in general.