<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Adam Chalmers</title>
    <subtitle>Blogging, generally about Rust</subtitle>
    <link rel="self" type="application/atom+xml" href="https://blog.adamchalmers.com/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-04-03T00:00:00+00:00</updated>
    <id>https://blog.adamchalmers.com/atom.xml</id>
    <entry xml:lang="en">
        <title>My year of reading Chinese history</title>
        <published>2026-04-03T00:00:00+00:00</published>
        <updated>2026-04-03T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/learning-about-chinese-history/"/>
        <id>https://blog.adamchalmers.com/learning-about-chinese-history/</id>
        
        <summary type="html">&lt;p&gt;Last year I read a lot of Chinese history. I didn&#x27;t expect to find it so interesting! China&#x27;s history has now become a passion of mine. I want to tell you how I fell down this rabbithole, and why I stayed.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>2025 reflections</title>
        <published>2026-01-02T00:00:00+00:00</published>
        <updated>2026-01-02T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/2025-reflections/"/>
        <id>https://blog.adamchalmers.com/2025-reflections/</id>
        
        <summary type="html">&lt;p&gt;It&#x27;s been a good year. We moved back to Austin from New Orleans, I&#x27;ve watched my first kid grow and develop and really start having a personality, and I&#x27;ve had a lot of fun at work.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>I am 34</title>
        <published>2025-11-16T00:00:00+00:00</published>
        <updated>2025-11-16T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/i-am-34/"/>
        <id>https://blog.adamchalmers.com/i-am-34/</id>
        
        <summary type="html">&lt;p&gt;This weekend I turned 34. When friends or family have birthdays, I like to ask them what they&#x27;re excited for in the coming year. Today someone flipped the question on me, and this is what I answered.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>2024 reflections</title>
        <published>2025-04-01T00:00:00+00:00</published>
        <updated>2025-04-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/2024-reflections/"/>
        <id>https://blog.adamchalmers.com/2024-reflections/</id>
        
        <summary type="html">&lt;p&gt;Better late than never! It&#x27;s been a really big year. My wife and I had our first baby, we moved to New Orleans (temporarily), I gave my first in-person conference presentation (at RustConf) then flew to Vienna for my second (EuroRust). And Zoo has grown massively. So it&#x27;s been a fun but crazy year.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>EuroRust 2024 talk: Code as contract as code</title>
        <published>2025-01-01T00:00:00+00:00</published>
        <updated>2025-01-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/eurorust-2024/"/>
        <id>https://blog.adamchalmers.com/eurorust-2024/</id>
        
        <summary type="html">&lt;p&gt;A few months ago I was invited to EuroRust to talk about API servers and clients. When I worked at Cloudflare, I maintained a few API servers and the official Cloudflare Rust API client. There was a lot of toil and stress involved whenever the API servers changed: schemae had to be updated, and then so did clients.&lt;&#x2F;p&gt;
&lt;p&gt;When I joined Zoo I was very impressed to find that our CEO Jess Frazelle had already set up automatic schema generation from the API servers, and then automatic client generation from those schemae (in 4 different languages)! This made managing our API servers at Zoo MUCH easier than it was at Cloudflare.&lt;&#x2F;p&gt;
&lt;p&gt;So I wrote this conference talk aimed at my past self -- it&#x27;s basically a guide on how to simplify your API operations.&lt;&#x2F;p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;embed&#x2F;bjgGboWCTDw?si=OeGk9XbHN5JK8Vdh&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; referrerpolicy=&quot;strict-origin-when-cross-origin&quot; allowfullscreen&gt;&lt;&#x2F;iframe&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>RustConf 2024 talk: Building a programming language for CAD</title>
        <published>2025-01-01T00:00:00+00:00</published>
        <updated>2025-01-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/rustconf-2024/"/>
        <id>https://blog.adamchalmers.com/rustconf-2024/</id>
        
        <summary type="html">&lt;p&gt;Recently I gave my first-ever in-person conference presentation! I was invited to RustConf 2024 where I talked about why we&#x27;re building KCL (KittyCAD language), a programming language for 3D design, at Zoo.dev.&lt;&#x2F;p&gt;
&lt;p&gt;The talk has three parts: background about computer-aided design (CAD) software and mechanical engineering, then why we built a programming language, then what I learned from the process and the gaps in existing compilers 101 education.&lt;&#x2F;p&gt;
&lt;p&gt;At some point I hope to expand this into a blog post, but until then you can just watch the video.&lt;&#x2F;p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;embed&#x2F;f11kfaKAPzw?si=frUKFlMKLhRT2TEI&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; referrerpolicy=&quot;strict-origin-when-cross-origin&quot; allowfullscreen&gt;&lt;&#x2F;iframe&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>My Developer Voices interview</title>
        <published>2024-10-30T00:00:00+00:00</published>
        <updated>2024-10-30T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/developer-voices/"/>
        <id>https://blog.adamchalmers.com/developer-voices/</id>
        
        <summary type="html">&lt;p&gt;Kris Jenkins of &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;pod.link&#x2F;developer-voices&quot;&gt;Developer Voices&lt;&#x2F;a&gt; spoke to me on his podcast! We talked about KittyCAD and its language, which I&#x27;m building for my work at &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;zoo.dev&quot;&gt;Zoo&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;You can listen to it wherever you get your podcasts, or watch it on YouTube. Thanks so much for having me on your podcast, Kris! Developer Voices has become my favourite tech podcast and I really love the range of people he talks to. Kris goes deep and is scared of getting into the technical nitty-gritty, unlike some other tech podcasts I&#x27;ve tried. I strongly recommend listening to his archive!&lt;&#x2F;p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;embed&#x2F;7USuyXL0q6Y?si=GaDZbcNJY5jPYvMG&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; referrerpolicy=&quot;strict-origin-when-cross-origin&quot; allowfullscreen&gt;&lt;&#x2F;iframe&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>I&#x27;m speaking at RustConf 2024!</title>
        <published>2024-09-06T00:00:00+00:00</published>
        <updated>2024-09-06T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/im-at-rustconf-2024/"/>
        <id>https://blog.adamchalmers.com/im-at-rustconf-2024/</id>
        
        <content type="html" xml:base="https://blog.adamchalmers.com/im-at-rustconf-2024/">&lt;p&gt;I&#x27;ll be at RustConf 2024, speaking about KCL, the 3D manufacturing language we&#x27;re building at &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;zoo.dev&quot;&gt;Zoo.dev&lt;&#x2F;a&gt;!
I&#x27;m really excited to present, and to meet a lot of other Rustaceans. If you&#x27;re going to be in Montreal,
send me a message or email (contact details &lt;a href=&quot;&#x2F;about&quot;&gt;here&lt;&#x2F;a&gt;) and let&#x27;s make sure we say hi.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>My Kitty terminal config</title>
        <published>2024-05-29T00:00:00+00:00</published>
        <updated>2024-05-29T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/kitty-terminal-config/"/>
        <id>https://blog.adamchalmers.com/kitty-terminal-config/</id>
        
        <summary type="html">&lt;p&gt;I&#x27;ve been using &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;sw.kovidgoyal.net&#x2F;kitty&#x2F;&quot;&gt;Kitty&lt;&#x2F;a&gt; terminal for five years now, and I&#x27;m really happy with it. Recently I got curious about how to make it look prettier (inspired by all the beautiful terminals I see in some programmer subreddits). So, keep reading for a little explanation of my Kitty config file.&lt;&#x2F;p&gt;
&lt;p&gt;I also made a video showing how I configure a totally fresh Kitty terminal from nothing.&lt;&#x2F;p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;embed&#x2F;-0XjDgaLUY0?si=klaWrwSmw3LC7LRG&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; referrerpolicy=&quot;strict-origin-when-cross-origin&quot; allowfullscreen&gt;&lt;&#x2F;iframe&gt;
&lt;p&gt;But if you prefer text, keep reading.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Video: My VM and its time-travelling debugger</title>
        <published>2024-03-22T00:00:00+00:00</published>
        <updated>2024-03-22T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/time-travelling-debugger/"/>
        <id>https://blog.adamchalmers.com/time-travelling-debugger/</id>
        
        <summary type="html">&lt;p&gt;My work at &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;zoo.dev&quot;&gt;Zoo&lt;&#x2F;a&gt; has recently focused on &lt;a href=&quot;&#x2F;tags&#x2F;kcl&#x2F;&quot;&gt;KCL&lt;&#x2F;a&gt;, our CAD programming language. Currently our &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;zoo.dev&#x2F;modeling-app&quot;&gt;modeling app&lt;&#x2F;a&gt; uses a tree-walk interpreter, but for various reasons we&#x27;ve been exploring a proper compiler instead. I&#x27;ve been developing the compiler, called &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;KittyCAD&#x2F;modeling-app&#x2F;tree&#x2F;main&#x2F;src&#x2F;wasm-lib&#x2F;grackle&quot;&gt;Grackle&lt;&#x2F;a&gt;. It compiles to a bytecode VM (i.e. an abstract machine), called the KCVM. I gave a 10-minute presentation about KCVM and its time-travelling debugger at a tech talk in Austin recently. Here&#x27;s the recording!&lt;&#x2F;p&gt;
&lt;p&gt;Thanks very much to &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;jam.dev&#x2F;&quot;&gt;Jam.dev&lt;&#x2F;a&gt; for hosting the event!&lt;&#x2F;p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;embed&#x2F;iVeKGU29aSI&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; allowfullscreen&gt;&lt;&#x2F;iframe&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Free users are incredible</title>
        <published>2024-01-02T00:00:00+00:00</published>
        <updated>2024-01-02T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/value-of-free-users/"/>
        <id>https://blog.adamchalmers.com/value-of-free-users/</id>
        
        <summary type="html">&lt;p&gt;Cloudflare has a really generous free tier, and it gets a &lt;em&gt;lot&lt;&#x2F;em&gt; of free users. I often see comments on Hacker News saying &quot;Cloudflare must be doing something shady, so many people use it for free, and if you&#x27;re not the customer, then you&#x27;re the product&quot;. This is mostly wrong -- Cloudflare gets a lot of value from its free users, in normal, not-shady ways. Here&#x27;s why it&#x27;s helpful to have a ton of free users.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>2023 reflections</title>
        <published>2023-12-23T00:00:00+00:00</published>
        <updated>2023-12-23T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/2023-reflections/"/>
        <id>https://blog.adamchalmers.com/2023-reflections/</id>
        
        <summary type="html">&lt;p&gt;Thinking about the things I liked and some really fun career changes from the last 12 months.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Video: Error handling</title>
        <published>2023-12-21T00:00:00+00:00</published>
        <updated>2023-12-21T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/rust-club-error-handling/"/>
        <id>https://blog.adamchalmers.com/rust-club-error-handling/</id>
        
        <summary type="html">&lt;p&gt;The fourth Rust Club video is up! Every Monday I teach Rust to my coworkers at &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;zoo.dev&quot;&gt;zoo.dev&lt;&#x2F;a&gt; on video chat. We record the call and put it on YouTube so you can learn too. This week&#x27;s video is about different ways to handle errors in Rust -- when should you panic and when should you return a Result::Err? And what type should that Result::Err be?&lt;&#x2F;p&gt;
&lt;p&gt;Apologies for the low video quality, starting from next episode we used a better-quality recording system.&lt;&#x2F;p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;embed&#x2F;IdnjG5N2l4M&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; allowfullscreen&gt;&lt;&#x2F;iframe&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Video: Analyzing performance</title>
        <published>2023-12-05T00:00:00+00:00</published>
        <updated>2023-12-05T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/rust-club-perf-tools/"/>
        <id>https://blog.adamchalmers.com/rust-club-perf-tools/</id>
        
        <summary type="html">&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;kittycad.io&quot;&gt;KittyCAD&lt;&#x2F;a&gt;&#x27;s third Rust Club video is up! We analyze how fast the demo parser from my [first video][&#x2F;winnow-basics] is, and find ways to speed it up. We use benchmarks to measure its speed, and flamegraphs to visualize its runtime, to find places we can improve.&lt;&#x2F;p&gt;
&lt;p&gt;Apologies for the low video quality, I didn&#x27;t know we&#x27;d be releasing this to YouTube, so it&#x27;s just using Zoom&#x27;s &quot;record screen&quot; feature. Starting from episode 5 we used a better-quality recording system.&lt;&#x2F;p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;embed&#x2F;2IHPvPmzS8g&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; allowfullscreen&gt;&lt;&#x2F;iframe&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Investigating crazy compile times</title>
        <published>2023-11-28T00:00:00+00:00</published>
        <updated>2023-11-28T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/crazy-compile-time/"/>
        <id>https://blog.adamchalmers.com/crazy-compile-time/</id>
        
        <summary type="html">&lt;p&gt;I hate long compiles. I spend hours of my time trying to reduce minutes of compile-time. I recently noticed that the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;kittycad&quot;&gt;KittyCAD Rust API client&lt;&#x2F;a&gt; was taking an incredibly long time to compile in release mode. Weirdly, the compile time in debug mode was totally fine. I managed to shrink the release compile-times from 33 minutes to 1.5 minutes. Here&#x27;s how.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Video: Parsing a programming language</title>
        <published>2023-11-22T00:00:00+00:00</published>
        <updated>2023-11-22T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/rust-club-parse-kcl/"/>
        <id>https://blog.adamchalmers.com/rust-club-parse-kcl/</id>
        
        <summary type="html">&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;kittycad.io&quot;&gt;KittyCAD&lt;&#x2F;a&gt;&#x27;s second Rust Club video is up! My [first video][&#x2F;winnow-basics] covered the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;winnow&quot;&gt;Winnow&lt;&#x2F;a&gt; library for parsing text. Today&#x27;s video shows you a real-world parser example. I&#x27;m working on the KittyCAD language (KCL) for designing CAD models, and this reviews the tokenizer and parser I wrote recently.&lt;&#x2F;p&gt;
&lt;p&gt;Apologies for the low video quality, I didn&#x27;t know we&#x27;d be releasing this to YouTube, so it&#x27;s just using Zoom&#x27;s &quot;record screen&quot; feature. Starting from episode 5 we used a better-quality recording system.&lt;&#x2F;p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;embed&#x2F;LUcI6KkM-PE&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; allowfullscreen&gt;&lt;&#x2F;iframe&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Interviewed at Filtra.io</title>
        <published>2023-11-04T00:00:00+00:00</published>
        <updated>2023-11-04T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/filtra-interview/"/>
        <id>https://blog.adamchalmers.com/filtra-interview/</id>
        
        <summary type="html">&lt;p&gt;I had a great time talking to Drew of &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;filtra.io&quot;&gt;filtra.io&lt;&#x2F;a&gt;! We talked what KittyCAD does and why we&#x27;re all-in on Rust. We also get into my past at Cloudflare and why there&#x27;s so much Rust there. Check out the piece &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;filtra.io&#x2F;rust-kittycad-nov-23&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Video: My P99Conf talk on Rust backends</title>
        <published>2023-10-19T00:00:00+00:00</published>
        <updated>2023-10-19T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/p99-2023/"/>
        <id>https://blog.adamchalmers.com/p99-2023/</id>
        
        <summary type="html">&lt;p&gt;I had a great time presenting at &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;p99conf.io&quot;&gt;P99Conf&lt;&#x2F;a&gt;! I watch their talks every year and I always learn a lot. I was really thrilled to present a talk at this year&#x27;s conference. It&#x27;s heavily based on my blog post &lt;a href=&quot;&#x2F;why-rust-on-backend&quot;&gt;Why use Rust on the backend?&lt;&#x2F;a&gt;. If you missed the talk, you can watch the recording or view the slides &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.p99conf.io&#x2F;session&#x2F;high-level-rust-for-backend-programming&#x2F;&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Video: Parsing text with Winnow</title>
        <published>2023-10-19T00:00:00+00:00</published>
        <updated>2023-10-19T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/winnow-basics/"/>
        <id>https://blog.adamchalmers.com/winnow-basics/</id>
        
        <summary type="html">&lt;p&gt;I work at &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;kittycad.io&quot;&gt;KittyCAD&lt;&#x2F;a&gt;, and every Monday I teach Rust to my coworkers for an hour. We always record them, so that over time we build up an archive of Rust learning videos. Recently I realized we should put some of them on the internet, because other programmers outside KittyCAD might find them helpful too!&lt;&#x2F;p&gt;
&lt;p&gt;This is our first episode, and it&#x27;s about building parsers with &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;winnow&quot;&gt;Winnow&lt;&#x2F;a&gt;, a new fork of Nom. I&#x27;m a big fan of Nom, and I&#x27;ve written &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;blog.adamchalmers.com&#x2F;tags&#x2F;nom&#x2F;&quot;&gt;about it a &lt;em&gt;lot&lt;&#x2F;em&gt;&lt;&#x2F;a&gt;. I&#x27;ve been interested in Winnow since it was &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;epage.github.io&#x2F;blog&#x2F;2023&#x2F;02&#x2F;winnow-toml-edit-combine-nom&#x2F;&quot;&gt;announced&lt;&#x2F;a&gt;, so here&#x27;s an hour-long explanation of how to use Winnow.&lt;&#x2F;p&gt;
&lt;p&gt;Apologies for the low video quality, I didn&#x27;t know we&#x27;d be releasing this to YouTube, so it&#x27;s just using Zoom&#x27;s &quot;record screen&quot; feature. Future episodes should have higher video quality!&lt;&#x2F;p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;embed&#x2F;QF3kMyzMC40?si=_PSOoJkI8F0zq9oI&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; allowfullscreen&gt;&lt;&#x2F;iframe&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Rustconf 2023 recap</title>
        <published>2023-10-02T00:00:00+00:00</published>
        <updated>2023-10-02T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/rustconf-2023-recap/"/>
        <id>https://blog.adamchalmers.com/rustconf-2023-recap/</id>
        
        <summary type="html">&lt;p&gt;I got back from Rustconf 2023 last week, and I had a great time! I thought I&#x27;d write up my impressions of the conference, for anyone curious about what it&#x27;s actually like.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Missed opportunities for git aliases</title>
        <published>2023-06-19T00:00:00+00:00</published>
        <updated>2023-06-19T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/git-aliases/"/>
        <id>https://blog.adamchalmers.com/git-aliases/</id>
        
        <summary type="html">&lt;p&gt;I don&#x27;t pair program very often, but sometimes when you&#x27;re stuck on a really annoying problem, it can be helpful to have a coworker looking over your shoulder. My new job is fully-remote, so we occasionally screenshare when someone&#x27;s stuck. One of my favourite things about pair programming is that I get to see the little idiosyncrasies of everyone&#x27;s workflow. For example, you notice which peers use vim for everything, and pick up on all their awesome little keybindings to jump around the document. Or you realize that one peer has installed a bunch of awesome VSCode extensions that you can steal.&lt;&#x2F;p&gt;
&lt;p&gt;Several coworkers have remarked that I use shell aliases way more often than them! For example, I mostly work with rust, so I used &lt;code&gt;alias c=&quot;cargo&quot;&lt;&#x2F;code&gt; to tell my shell &quot;when I type &lt;code&gt;c&lt;&#x2F;code&gt;, replace it with &lt;code&gt;cargo&lt;&#x2F;code&gt;&quot;. Then I use Cargo&#x27;s built-in aliases, e.g. &lt;code&gt;cargo check&lt;&#x2F;code&gt; and &lt;code&gt;cargo c&lt;&#x2F;code&gt; are equivalent. So, when I want to run &lt;code&gt;cargo check&lt;&#x2F;code&gt; I just type &lt;code&gt;c c&lt;&#x2F;code&gt; and my shell expands it to &lt;code&gt;cargo c&lt;&#x2F;code&gt; and Cargo expands it to &lt;code&gt;cargo check&lt;&#x2F;code&gt;. My coworkers were very amused by this! I think a suite of nice, easy aliases can really save you time and avoid interrupting your &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Flow_(psychology)&quot;&gt;flow state&lt;&#x2F;a&gt;. I&#x27;m trying to use more aliases for common tasks, and here&#x27;s how I&#x27;ve been doing it.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Introduction to HTTP Multipart</title>
        <published>2023-04-25T00:00:00+00:00</published>
        <updated>2023-04-25T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/multipart/"/>
        <id>https://blog.adamchalmers.com/multipart/</id>
        
        <summary type="html">&lt;p&gt;Multipart, or &quot;form-encoded data&quot;, is something I see everywhere but never had to actually understand or use myself, because HTTP libraries handled it for me. Recently, though, I had to dive deeper into how multipart works, because it&#x27;s pretty important at both Cloudflare and my new job at KittyCAD. Used correctly, multipart makes your file uploads faster and use less memory. I&#x27;m going to explain how it works, at a high level, so you&#x27;ll recognize when you could use it to save time and memory in your HTTP servers&#x2F;clients.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Why use Rust on the backend?</title>
        <published>2023-03-19T00:00:00+00:00</published>
        <updated>2023-03-19T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/why-rust-on-backend/"/>
        <id>https://blog.adamchalmers.com/why-rust-on-backend/</id>
        
        <summary type="html">&lt;p&gt;I read and liked Andrew Israel&#x27;s &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.propelauth.com&#x2F;post&#x2F;i-love-building-a-startup-in-rust-i-wouldnt-pick-it-again&quot;&gt;I love building a startup in Rust. I wouldn&#x27;t pick it again.&lt;&#x2F;a&gt;
It makes a lot of sense! He basically says that his startup prioritizes developer productivity over
performance. Sensible choice for a start-up founder to make. If Rust is going to slow your developers
down, and you don&#x27;t need its benefits, then you should definitely consider using a different language.&lt;&#x2F;p&gt;
&lt;p&gt;On the other hand, I&#x27;ve been using Rust as high-level language at Cloudflare for a few years now.
By &quot;a high-level language&quot; I mean one where performance doesn&#x27;t really matter much. I&#x27;ve mostly been
using it for API servers, where overall latency doesn&#x27;t really matter too much. I&#x27;d be totally fine
using a garbage collected language, or an interpreted language, because I don&#x27;t need to eke out every
last microsecond for &lt;em&gt;blazing fast performance&lt;&#x2F;em&gt;. I just want my server to stay up, do its job, and
let me ship features quickly.&lt;&#x2F;p&gt;
&lt;p&gt;So why use Rust for a task like that? Well, although Rust has a reputation for being a low-level
systems language, it actually does an admirable job of acting like a high-level language. So here&#x27;s
my list of reasons to consider using Rust, even for a project where performance isn&#x27;t critical.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>I&#x27;m on Rustacean Station</title>
        <published>2023-02-07T00:00:00+00:00</published>
        <updated>2023-02-07T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/rustacean-station/"/>
        <id>https://blog.adamchalmers.com/rustacean-station/</id>
        
        <summary type="html">&lt;p&gt;Hi all! Allen Wyma of &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;rustacean-station.org&#x2F;&quot;&gt;Rustacean Station&lt;&#x2F;a&gt; had me on the podcast to talk about Rust at Cloudflare. We cover why and how Cloudflare started using Rust, how my team specifically works with Rust, and how Cloudflare works. We also go on a big tangent about social security numbers. Give &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;rustacean-station.org&#x2F;episode&#x2F;adam-chalmers&#x2F;&quot;&gt;the episode&lt;&#x2F;a&gt; a listen if you&#x27;d like.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Signals vs. Servers</title>
        <published>2023-02-06T00:00:00+00:00</published>
        <updated>2023-02-06T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/signals-vs-servers/"/>
        <id>https://blog.adamchalmers.com/signals-vs-servers/</id>
        
        <summary type="html">&lt;p&gt;Say you&#x27;re running a long-lived program, like a server. Let&#x27;s say the server needs to read some files from disk, like certificates or keys. Every so often, the certificates change, so your server has to reload them. How do you tell the server to reload those files? The traditional way is to use Unix signals. Your server &lt;em&gt;listens&lt;&#x2F;em&gt; for a particular signal, like &lt;code&gt;SIGUSR1&lt;&#x2F;code&gt; (user-defined signal #1) or &lt;code&gt;SIGHUP&lt;&#x2F;code&gt; (hangup signal), and can execute whatever code you programmed in when the signal is received. So, your code waits for the appropriate signal, receives it, then reloads the certs.&lt;&#x2F;p&gt;
&lt;p&gt;This approach works fine, but it has some usability problems that came up at work. So, my coworkers have been thinking about better ways to do this. I wanted to blog about one such way, and see if anyone has better ideas.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>2022 reflections</title>
        <published>2023-02-05T00:00:00+00:00</published>
        <updated>2023-02-05T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/2022-reflections/"/>
        <id>https://blog.adamchalmers.com/2022-reflections/</id>
        
        <summary type="html">&lt;p&gt;Reflecting on the things I liked in 2022. I started writing this in December 2022 and completely forgot to finish it until February next year.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Illegal satire about Rust</title>
        <published>2022-11-11T00:00:00+00:00</published>
        <updated>2022-11-11T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/fake-rust-twitter/"/>
        <id>https://blog.adamchalmers.com/fake-rust-twitter/</id>
        
        <summary type="html">&lt;p&gt;In case you didn&#x27;t hear, &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;twitter.com&#x2F;elonmusk&#x2F;status&#x2F;1586104694421659648?lang=en&quot;&gt;comedy is now legal on Twitter&lt;&#x2F;a&gt; but &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;twitter.com&#x2F;elonmusk&#x2F;status&#x2F;1590884973535711232&quot;&gt;accounts engaged in parody must include “parody” in their name, not just in bio&lt;&#x2F;a&gt;. Of course, this &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;twitter.com&#x2F;littlebear36_&#x2F;status&#x2F;1590831728393953281&quot;&gt;only made everyone double down&lt;&#x2F;a&gt;. So yesterday, I changed my name to Rust Language and started posting misinformation.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;twitter.com&#x2F;adam_chal&#x2F;status&#x2F;1590721811876306944&quot;&gt;&lt;img src=&quot;&#x2F;fake-rust-twitter&#x2F;strang.png&quot; alt=&quot;Tweet from my personal Twitter, changed to impersonate the official Rust twitter. The tweet says &amp;quot;We&amp;#39;re adding a fifth string type called &amp;quot;Strang&amp;quot;. It&amp;#39;s subtly different to String but we&amp;#39;re not going to tell you how.&amp;quot;&quot; &#x2F;&gt;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The last week on twitter has basically been &quot;the new 3rd grade substitute teacher can&#x27;t control the class&quot; and we&#x27;re all misbehaving. I&#x27;ve changed &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;twitter.com&#x2F;adam_chal&quot;&gt;my twitter&lt;&#x2F;a&gt; back to my real name and face, so I&#x27;ve preserved my fake Rust tweets for posterity here.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Solving common problems with Kubernetes</title>
        <published>2022-10-09T00:00:00+00:00</published>
        <updated>2022-10-09T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/kubernetes-problems/"/>
        <id>https://blog.adamchalmers.com/kubernetes-problems/</id>
        
        <summary type="html">&lt;p&gt;I first learned Kubernetes (&quot;k8s&quot; for short) in 2018, when my manager sat me down and said &quot;Cloudflare is migrating to Kubernetes, and you&#x27;re handling our team&#x27;s migration.&quot; This was slightly terrifying to me, because I was a good programmer and a mediocre engineer. I knew how to write code, but I didn&#x27;t know how to deploy it, or monitor it in production. My computer science degree had taught me all about algorithms, data structures, type systems and operating systems. It had not taught me about containers, or ElasticSearch, or Kubernetes. I don&#x27;t think I even wrote a single YAML file in my entire degree. I was scared of ops. I was &lt;em&gt;terrified&lt;&#x2F;em&gt; of Kubernetes.&lt;&#x2F;p&gt;
&lt;p&gt;Eventually I made it through and migrated all the Cloudflare Tunnel infrastructure from Marathon to Kubernetes. I didn&#x27;t enjoy it, and I was way over my deadline, but I did learn a lot. Now it&#x27;s 2022, and I&#x27;m leading a small team of engineers, some of whom have never used Kubernetes before. So I&#x27;ve found myself explaining Kubernetes to them. They seemed to find it helpful, so I thought I&#x27;d write it down and share it with the rest of you.&lt;&#x2F;p&gt;
&lt;p&gt;This article is aimed at engineers who need to deploy their code using Kubernetes, but have no idea what Kubernetes is or how it works. I&#x27;m going to tell you a story about a junior engineer. We&#x27;re going to follow this engineer as they build a high-quality service, and when they run into problems, we&#x27;ll see how Kubernetes can help solve them. Hopefully this will get you comfortable building your own services in k8s!&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Static streams for faster async proxies</title>
        <published>2022-08-26T00:00:00+00:00</published>
        <updated>2022-08-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/streaming-proxy/"/>
        <id>https://blog.adamchalmers.com/streaming-proxy/</id>
        
        <summary type="html">&lt;p&gt;Last week in &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;discord.com&#x2F;invite&#x2F;tokio&quot;&gt;Tokio&#x27;s Discord chat server&lt;&#x2F;a&gt; someone asked a really interesting question: how can you stream a multipart body from an incoming request into an outgoing request? My struggle to answer this really helped me understand Rust async lifetimes. We&#x27;ll explore &lt;em&gt;why&lt;&#x2F;em&gt; this is tricky, then design and benchmark a solution.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>What are Rust&#x27;s HTTP extensions?</title>
        <published>2022-07-24T00:00:00+00:00</published>
        <updated>2022-07-24T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/what-are-extensions/"/>
        <id>https://blog.adamchalmers.com/what-are-extensions/</id>
        
        <summary type="html">&lt;p&gt;I learned about extensions when reading the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;hyper&#x2F;latest&#x2F;hyper&#x2F;struct.Request.html#method.extensions&quot;&gt;hyper docs&lt;&#x2F;a&gt;. But they also pop up in lots of other Rust web libraries, like &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;http&#x2F;latest&#x2F;http&#x2F;struct.Extensions.html&quot;&gt;http&lt;&#x2F;a&gt;, &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;tonic&#x2F;latest&#x2F;tonic&#x2F;struct.Extensions.html&quot;&gt;tonic&lt;&#x2F;a&gt;, and &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;actix-web&#x2F;latest&#x2F;actix_web&#x2F;dev&#x2F;struct.Extensions.html&quot;&gt;actix-web&lt;&#x2F;a&gt;. So they must be really useful, if so many libraries offer them. But I personally had no idea what they were or how to use them. Today I&#x27;m going to explain what extensions really are (a set of values, keyed by type), and how you can use them to pass data between different parts of your web servers (e.g. middleware, routers, and handler functions). I&#x27;ll give you a real-world example from the gRPC server I&#x27;m building at my job.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>What I learned from making a DNS client in Rust</title>
        <published>2022-04-10T00:00:00+00:00</published>
        <updated>2022-04-10T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/making-a-dns-client/"/>
        <id>https://blog.adamchalmers.com/making-a-dns-client/</id>
        
        <summary type="html">&lt;p&gt;Over the last few weeks I built &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;adamchalmers&#x2F;dingo&quot;&gt;my own DNS client&lt;&#x2F;a&gt;. Mostly because I thought dig (the standard DNS client) was kinda clunky. Partly because I wanted to learn more about DNS. So here&#x27;s how I built it, and how you can build your own too. It&#x27;s a great weekend project, and I learned a lot from finishing it.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Parsing DNS headers with Nom</title>
        <published>2022-03-11T00:00:00+00:00</published>
        <updated>2022-03-11T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/nom-dns/"/>
        <id>https://blog.adamchalmers.com/nom-dns/</id>
        
        <summary type="html">&lt;p&gt;In the last blog post, we learned how to &lt;a href=&quot;&#x2F;nom-bits&quot;&gt;parse binary, bit-by-bit&lt;&#x2F;a&gt; with Nom. I really wanted to give a real-world example of binary protocols, so here&#x27;s one from &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;adamchalmers&#x2F;dingo&quot;&gt;Dingo&lt;&#x2F;a&gt;, a basic DNS client I made.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Parsing bitstreams with Nom</title>
        <published>2022-02-01T00:00:00+00:00</published>
        <updated>2022-02-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/nom-bits/"/>
        <id>https://blog.adamchalmers.com/nom-bits/</id>
        
        <summary type="html">&lt;p&gt;Programming languages generally only manipulate bytes (groups of 8 bits). It can be pretty tricky to manipulate single bits. But sometimes you need to -- for example, a &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;html&#x2F;rfc1035#section-4.1.1&quot;&gt;DNS header&lt;&#x2F;a&gt; has some 4-bit numbers, and encodes some boolean flags into single bits. So we really need a way to parse binary data without chunking it up into bytes of 8 bits.&lt;&#x2F;p&gt;
&lt;p&gt;Luckily, &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;nom&quot;&gt;Nom&lt;&#x2F;a&gt; can do this! In the last blog post, we learned how to &lt;a href=&quot;&#x2F;nom-chars&quot;&gt;parse text files&lt;&#x2F;a&gt; with Nom. The trick is to start with simple parsers that parse a few characters at a time. Then, using combinators, combine those simple parsers into more complex parsers that can deserialize an entire structured file. We can reuse this approach for parsing &lt;em&gt;binary&lt;&#x2F;em&gt; data too. Let&#x27;s see how!&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Parsing Text with Nom</title>
        <published>2022-01-05T00:00:00+00:00</published>
        <updated>2022-01-05T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/nom-chars/"/>
        <id>https://blog.adamchalmers.com/nom-chars/</id>
        
        <summary type="html">&lt;p&gt;&quot;Parsing&quot; is turning a stream of raw text or binary into some structured data types, i.e. a Rust type that your code can understand and use. This isn&#x27;t the textbook definition of parsing, but damnit, this is my blog and my opinion. This tutorial is about &lt;em&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;nom&quot;&gt;nom&lt;&#x2F;a&gt;&lt;&#x2F;em&gt;, my favourite Rust parsing library. It uses a &lt;em&gt;parser combinator&lt;&#x2F;em&gt; approach: you start writing tiny parsers that match, say, a single number or a character. These become building blocks for larger parsers, that match, say, a date or a phone number. By combining many small parsers together, you can build a big parser that decodes a file or stream into nice Rust structs and enums. In this tutorial we&#x27;ll use Nom to parse the input file to an &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;adventofcode.com&quot;&gt;Advent of Code&lt;&#x2F;a&gt; puzzle.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Pin, Unpin, and why Rust needs them</title>
        <published>2021-08-23T00:00:00+00:00</published>
        <updated>2021-08-23T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/pin-unpin/"/>
        <id>https://blog.adamchalmers.com/pin-unpin/</id>
        
        <summary type="html">&lt;p&gt;Using async Rust libraries is usually easy. It&#x27;s just like using normal Rust code, with a little &lt;code&gt;async&lt;&#x2F;code&gt; or &lt;code&gt;.await&lt;&#x2F;code&gt; here and there. But writing your own async libraries can be hard. The first time I tried this, I got really confused by arcane, esoteric syntax like &lt;code&gt;T: ?Unpin&lt;&#x2F;code&gt; and &lt;code&gt;Pin&amp;lt;&amp;amp;mut Self&amp;gt;&lt;&#x2F;code&gt;. I had never seen these types before, and I didn&#x27;t understand what they were doing. Now that I understand them, I&#x27;ve written the explainer I wish I could have read back then. In this post, we&#x27;re gonna learn&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;What Futures are&lt;&#x2F;li&gt;
&lt;li&gt;What self-referential types are&lt;&#x2F;li&gt;
&lt;li&gt;Why they were unsafe&lt;&#x2F;li&gt;
&lt;li&gt;How Pin&#x2F;Unpin made them safe&lt;&#x2F;li&gt;
&lt;li&gt;Using Pin&#x2F;Unpin to write tricky nested futures&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Grids in Rust, part 2: const generics</title>
        <published>2021-03-24T00:00:00+00:00</published>
        <updated>2021-03-24T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/grids-2/"/>
        <id>https://blog.adamchalmers.com/grids-2/</id>
        
        <summary type="html">&lt;p&gt;In &lt;a href=&quot;&#x2F;grids-1&quot;&gt;part one&lt;&#x2F;a&gt;, we defined a Grid trait and implemented it using 1D and 2D vectors. Benchmarks revealed that a 1D vector was a better choice than a nested 2D vector. In this post, we&#x27;ll write a new implementation that uses arrays instead of Vec. This should be faster!&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Grids in Rust, part 1: nested vs. flat Vecs</title>
        <published>2021-03-22T00:00:00+00:00</published>
        <updated>2021-03-22T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.adamchalmers.com/grids-1/"/>
        <id>https://blog.adamchalmers.com/grids-1/</id>
        
        <summary type="html">&lt;p&gt;While making a &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;adamchalmers&#x2F;raytracer&quot;&gt;raytracer in Rust&lt;&#x2F;a&gt;, I needed an efficient way to store the pixels of a 2D image. In this post, we&#x27;ll compare two different implementations of a 2D grid datatype, dipping our toes into data parallelism with Rayon and benchmarking with Criterion.&lt;&#x2F;p&gt;</summary>
        
    </entry>
</feed>
