My name is Alice Ryhl. I am a programmer and mathematician, currently a student at the University of Copenhagen.

Projects and articles

I have written a few articles, most of which are about a project of mine. Note that some of these are quite old.

Actors with Tokio

This article is about building actors with Tokio directly, without using any actor libraries such as Actix. This turns out to be rather easy to do, however there are some details you should be aware of:

  1. Where to put the tokio::spawn call.
  2. Struct with run method vs bare function.
  3. Handles to the actor.
  4. Backpressure and bounded channels.
  5. Graceful shutdown.

The techniques outlined in this article should work with any executor, but for simplicity we will only talk about Tokio. There is some overlap with the spawning and channel chapters from the Tokio tutorial, and I recommend also reading those chapters.

Continue Reading

Async: What is blocking?

The async/await feature in Rust is implemented using a mechanism known as cooperative scheduling, and this has some important consequences for people who write asynchronous Rust code.

The intended audience of this blog post is new users of async Rust. I will be using the Tokio runtime for the examples, but the points raised here apply to any asynchronous runtime.

If you remember only one thing from this article, this should be it:

Async code should never spend a long time without reaching an .await.

Continue Reading

The Game of Life on a PCB

I've created a printed circuit board (PCB) that simulates the game of life on a 5 by 5 LED grid, and can be remote controlled with Bluetooth. The project was created in collaboration with another student as a school project. Here is a video of the finished product:

Continue Reading