<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
      <title>Alice Ryhl</title>
      <link>https://ryhl.io</link>
      <description>Personal website</description>
      <generator>Zola</generator>
      <language>en</language>
      <atom:link href="https://ryhl.io/rss.xml" rel="self" type="application/rss+xml"/>
      <lastBuildDate>Sat, 13 Feb 2021 00:00:00 +0000</lastBuildDate>
      <item>
          <title>Actors with Tokio</title>
          <pubDate>Sat, 13 Feb 2021 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://ryhl.io/blog/actors-with-tokio/</link>
          <guid>https://ryhl.io/blog/actors-with-tokio/</guid>
          <description>&lt;p&gt;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:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Where to put the &lt;code&gt;tokio::spawn&lt;&#x2F;code&gt; call.&lt;&#x2F;li&gt;
&lt;li&gt;Struct with &lt;code&gt;run&lt;&#x2F;code&gt; method vs bare function.&lt;&#x2F;li&gt;
&lt;li&gt;Handles to the actor.&lt;&#x2F;li&gt;
&lt;li&gt;Backpressure and bounded channels.&lt;&#x2F;li&gt;
&lt;li&gt;Graceful shutdown.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;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
&lt;a href=&quot;https:&#x2F;&#x2F;tokio.rs&#x2F;tokio&#x2F;tutorial&#x2F;spawning&quot;&gt;spawning&lt;&#x2F;a&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;tokio.rs&#x2F;tokio&#x2F;tutorial&#x2F;channels&quot;&gt;channel chapters&lt;&#x2F;a&gt; from the Tokio tutorial, and I recommend also
reading those chapters.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Async: What is blocking?</title>
          <pubDate>Mon, 21 Dec 2020 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://ryhl.io/blog/async-what-is-blocking/</link>
          <guid>https://ryhl.io/blog/async-what-is-blocking/</guid>
          <description>&lt;p&gt;The async&#x2F;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.&lt;&#x2F;p&gt;
&lt;p&gt;The intended audience of this blog post is new users of async Rust. I will be using the
&lt;a href=&quot;https:&#x2F;&#x2F;tokio.rs&#x2F;&quot;&gt;Tokio&lt;&#x2F;a&gt; runtime for the examples, but the points raised here apply to any asynchronous
runtime.&lt;&#x2F;p&gt;
&lt;p&gt;If you remember only one thing from this article, this should be it:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Async code should never spend a long time without reaching an &lt;code&gt;.await&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
</description>
      </item>
      <item>
          <title>Temporarily opt-in to shared mutation</title>
          <pubDate>Sat, 15 Aug 2020 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://ryhl.io/blog/temporary-shared-mutation/</link>
          <guid>https://ryhl.io/blog/temporary-shared-mutation/</guid>
          <description>&lt;p&gt;The purpose of this blog post is to celebrate the anniversary of two really neat methods
on the &lt;a href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;stable&#x2F;std&#x2F;cell&#x2F;struct.Cell.html&quot;&gt;&lt;code&gt;Cell&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; type:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;stable&#x2F;std&#x2F;cell&#x2F;struct.Cell.html#method.from_mut&quot;&gt;&lt;code&gt;Cell::from_mut&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; This method turns a &lt;code&gt;&amp;amp;mut T&lt;&#x2F;code&gt; into a &lt;code&gt;&amp;amp;Cell&amp;lt;T&amp;gt;&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;stable&#x2F;std&#x2F;cell&#x2F;struct.Cell.html#method.as_slice_of_cells&quot;&gt;&lt;code&gt;Cell::as_slice_of_cells&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; This method turns a &lt;code&gt;&amp;amp;Cell&amp;lt;[T]&amp;gt;&lt;&#x2F;code&gt; into a &lt;code&gt;&amp;amp;[Cell&amp;lt;T&amp;gt;]&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Both methods were released in &lt;a href=&quot;https:&#x2F;&#x2F;blog.rust-lang.org&#x2F;2019&#x2F;08&#x2F;15&#x2F;Rust-1.37.0.html&quot;&gt;version 1.37.0&lt;&#x2F;a&gt; of Rust, exactly one year ago
from the date this post was published.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Backblaze B2 Rust library</title>
          <pubDate>Tue, 27 Jun 2017 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://ryhl.io/blog/backblaze/</link>
          <guid>https://ryhl.io/blog/backblaze/</guid>
          <description>&lt;p&gt;This page functions as a home page for my rust library &lt;code&gt;backblaze-b2&lt;&#x2F;code&gt;. Here are some
links to the project:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;backblaze-b2&quot;&gt;crates.io&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;backblaze-b2&quot;&gt;Documentation&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;Darksonn&#x2F;backblaze-b2-rs&quot;&gt;Git repository&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</description>
      </item>
      <item>
          <title>The Game of Life on a PCB</title>
          <pubDate>Sun, 18 Dec 2016 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://ryhl.io/blog/gol-pcb/</link>
          <guid>https://ryhl.io/blog/gol-pcb/</guid>
          <description>&lt;p&gt;I&#x27;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:&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Fractals on the Riemann Sphere</title>
          <pubDate>Tue, 06 Dec 2016 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://ryhl.io/blog/fractals-360/</link>
          <guid>https://ryhl.io/blog/fractals-360/</guid>
          <description>&lt;p&gt;In order to investigate the behaviour of &lt;a href=&quot;https:&#x2F;&#x2F;ryhl.io&#x2F;blog&#x2F;newton-intro&#x2F;&quot;&gt;Newton Fractals&lt;&#x2F;a&gt; at
infinity, I&#x27;ve plotted Newton Fractals on the Riemann sphere. Here&#x27;s an
animated video of a Newton Fractal plotted on the Riemann sphere using
YouTube&#x27;s 360° video feature:&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Introduction to Newton Fractals</title>
          <pubDate>Sun, 30 Oct 2016 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://ryhl.io/blog/newton-intro/</link>
          <guid>https://ryhl.io/blog/newton-intro/</guid>
          <description>&lt;p&gt;When I try to learn a new programming language, I don&#x27;t write a hello world. Instead, I
write a generator of newton fractals. Here&#x27;s an example of a newton fractal:&lt;&#x2F;p&gt;
</description>
      </item>
    </channel>
</rss>
