<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Matt Oswalt</title><link>https://oswalt.dev/</link><description>Recent content on Matt Oswalt's Technical Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© 2010 - 2026 Matt Oswalt</copyright><lastBuildDate>Fri, 17 Apr 2026 19:08:40 +0000</lastBuildDate><atom:link href="https://oswalt.dev/feed.xml" rel="self" type="application/rss+xml"/><item><title>Difference between 'iter()' and 'into_iter()' in Rust</title><link>https://oswalt.dev/2026/02/difference-between-iter-and-into_iter-in-rust/</link><pubDate>Fri, 06 Feb 2026 00:00:00 +0000</pubDate><guid>https://oswalt.dev/2026/02/difference-between-iter-and-into_iter-in-rust/</guid><description>&lt;p>In today&amp;rsquo;s edition of &amp;ldquo;things that really confused me when starting with Rust&amp;rdquo; - I struggled to understand the difference between these two methods I kept seeing:&lt;/p></description></item><item><title>Rust HeaderMap Iteration Semantics</title><link>https://oswalt.dev/2026/02/headermap-iteration-semantics/</link><pubDate>Sun, 01 Feb 2026 00:00:00 +0000</pubDate><guid>https://oswalt.dev/2026/02/headermap-iteration-semantics/</guid><description>&lt;p>This Rust program is syntactically correct, but there&amp;rsquo;s a mistake in it. Can you spot it?&lt;/p>
&lt;div class="expressive-code">
&lt;figure class="frame not-content">
&lt;figcaption class="header">
&lt;span class="title">&lt;/span>
&lt;/figcaption>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-rust" data-lang="rust">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c" id="hl-0-1">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-1"> 1&lt;/a>&lt;/span>&lt;span>&lt;span style="color:#cba6f7">use&lt;/span> http::header::{&lt;span style="color:#f9e2af">CONTENT_LENGTH&lt;/span>, &lt;span style="color:#f9e2af">HOST&lt;/span>, HeaderMap};
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c" id="hl-0-2">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-2"> 2&lt;/a>&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c" id="hl-0-3">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-3"> 3&lt;/a>&lt;/span>&lt;span>&lt;span style="color:#cba6f7">fn&lt;/span> &lt;span style="color:#89b4fa">main&lt;/span>() {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c" id="hl-0-4">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-4"> 4&lt;/a>&lt;/span>&lt;span> &lt;span style="color:#f38ba8">let&lt;/span> headers: &lt;span style="color:#f9e2af">HeaderMap&lt;/span> &lt;span style="color:#89dceb;font-weight:bold">=&lt;/span> get_headermap();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c" id="hl-0-5">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-5"> 5&lt;/a>&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c" id="hl-0-6">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-6"> 6&lt;/a>&lt;/span>&lt;span> &lt;span style="color:#cba6f7">for&lt;/span> (name, value) &lt;span style="color:#cba6f7">in&lt;/span> headers {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c" id="hl-0-7">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-7"> 7&lt;/a>&lt;/span>&lt;span> &lt;span style="color:#cba6f7">if&lt;/span> &lt;span style="color:#f38ba8">let&lt;/span> &lt;span style="color:#89dceb">Some&lt;/span>(name) &lt;span style="color:#89dceb;font-weight:bold">=&lt;/span> name {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c" id="hl-0-8">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-8"> 8&lt;/a>&lt;/span>&lt;span> &lt;span style="color:#89b4fa">println!&lt;/span>(&lt;span style="color:#a6e3a1">&amp;#34;&lt;/span>&lt;span style="color:#a6e3a1">{:?}&lt;/span>&lt;span style="color:#a6e3a1">: &lt;/span>&lt;span style="color:#a6e3a1">{:?}&lt;/span>&lt;span style="color:#a6e3a1">&amp;#34;&lt;/span>, name, value);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c" id="hl-0-9">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-9"> 9&lt;/a>&lt;/span>&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c" id="hl-0-10">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-10">10&lt;/a>&lt;/span>&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c" id="hl-0-11">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-11">11&lt;/a>&lt;/span>&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c" id="hl-0-12">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-12">12&lt;/a>&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c" id="hl-0-13">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-13">13&lt;/a>&lt;/span>&lt;span>&lt;span style="color:#6c7086;font-style:italic">// get_headermap() implementation omitted from this example
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/figure>
&lt;/div>
&lt;p>This is a simplified form of a bug I introduced a while back while adding a really large new feature to a service that,
among other things, is parsing HTTP requests from other instances of itself.&lt;/p></description></item><item><title>Classifying MNIST Handwritten Digits With a Fully Connected Neural Network</title><link>https://oswalt.dev/2025/12/classifying-mnist-handwritten-digits-with-a-fully-connected-neural-network/</link><pubDate>Sun, 28 Dec 2025 00:00:00 +0000</pubDate><guid>https://oswalt.dev/2025/12/classifying-mnist-handwritten-digits-with-a-fully-connected-neural-network/</guid><description>&lt;p>I&amp;rsquo;d like to continue on my deep learning journey. In &lt;a href="https://oswalt.dev/2025/08/a-simple-neural-network-from-scratch/">my first blog on this topic&lt;/a> I built a basic neural network &amp;ldquo;from scratch&amp;rdquo;. This was done intentionally to learn how things work at a low-level, even though it was impractical for any &amp;ldquo;serious&amp;rdquo; usage.&lt;/p></description></item><item><title>Neural Network from Scratch - Updated</title><link>https://oswalt.dev/2025/08/neural-network-from-scratch-updated/</link><pubDate>Sun, 31 Aug 2025 00:00:00 +0000</pubDate><guid>https://oswalt.dev/2025/08/neural-network-from-scratch-updated/</guid><description>&lt;p>In &lt;a href="https://oswalt.dev/2025/08/a-simple-neural-network-from-scratch/">my last blog&lt;/a>, I set up a basic 2-2-1 neural network by hand to solve the XOR table. I used &lt;a href="https://en.wikipedia.org/wiki/Mean_squared_error">mean squared error (MSE)&lt;/a> for the network&amp;rsquo;s loss function:&lt;/p></description></item><item><title>A Simple Neural Network from Scratch</title><link>https://oswalt.dev/2025/08/a-simple-neural-network-from-scratch/</link><pubDate>Fri, 29 Aug 2025 00:00:00 +0000</pubDate><guid>https://oswalt.dev/2025/08/a-simple-neural-network-from-scratch/</guid><description>&lt;p>In this post, we&amp;rsquo;ll explore building a neural network from scratch, for whatever definition of &amp;ldquo;from scratch&amp;rdquo; includes the use of Python. This means no third-party libraries like PyTorch, Tensorflow, even Numpy.&lt;/p></description></item><item><title>Unix Domain Sockets</title><link>https://oswalt.dev/2025/08/unix-domain-sockets/</link><pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate><guid>https://oswalt.dev/2025/08/unix-domain-sockets/</guid><description>&lt;p>In a &lt;a href="https://oswalt.dev/2025/07/linux-sockets-domains-and-types/">previous post on sockets in Linux&lt;/a> we briefly explored &lt;a href="https://man7.org/linux/man-pages/man7/unix.7.html">Unix Domain Sockets (UDS)&lt;/a> by invoking the &lt;code>AF_UNIX&lt;/code> domain in a few examples. In this post I&amp;rsquo;d like to dig into more of the specifics of using this domain on Linux as there are some quirks that are worth covering that you may not expect if you&amp;rsquo;ve only ever used domains like &lt;code>AF_INET&lt;/code>/&lt;code>AF_INET6&lt;/code>.&lt;/p></description></item><item><title>Linux Sockets: Relevant Syscalls</title><link>https://oswalt.dev/2025/07/linux-sockets-relevant-syscalls/</link><pubDate>Tue, 29 Jul 2025 00:00:00 +0000</pubDate><guid>https://oswalt.dev/2025/07/linux-sockets-relevant-syscalls/</guid><description>&lt;p>In my &lt;a href="https://oswalt.dev/2025/07/linux-sockets-domains-and-types/">previous post on Linux sockets&lt;/a>, there were several examples that referenced &amp;ldquo;syscalls&amp;rdquo; when working with sockets. I&amp;rsquo;d like to spend a little time exploring these more exhaustively - what they are, the syscalls you are most likely to run into when working with sockets, and the details of their usage given a few practical examples.&lt;/p></description></item><item><title>Linux Sockets: Domains and Types</title><link>https://oswalt.dev/2025/07/linux-sockets-domains-and-types/</link><pubDate>Sun, 27 Jul 2025 00:00:00 +0000</pubDate><guid>https://oswalt.dev/2025/07/linux-sockets-domains-and-types/</guid><description>&lt;p>The socket is one of the most crucial primitives for systems communication. It is the endpoint on which an application can send and/or receive information, either between processes on the same system, or to any other network-connected system. Tens or perhaps even hundreds were used behind the scenes for the simple task of getting this blog post to reach your screen. They are a fundamental aspect of how applications and systems communicate with each other.&lt;/p></description></item><item><title>Copy and Clone in Rust</title><link>https://oswalt.dev/2023/12/copy-and-clone-in-rust/</link><pubDate>Thu, 28 Dec 2023 10:00:00 +0000</pubDate><guid>https://oswalt.dev/2023/12/copy-and-clone-in-rust/</guid><description>&lt;p>Rust&amp;rsquo;s &lt;a href="https://doc.rust-lang.org/std/marker/trait.Copy.html">&lt;code>Copy&lt;/code> trait&lt;/a> is one of the earliest things I struggled with when I started learning the language. On its surface, this trait is quite simple, but its implications on how an implementing type can interact with Rust&amp;rsquo;s ownership model are significant. As I gained more experience, I also encountered the &lt;a href="https://doc.rust-lang.org/std/clone/trait.Clone.html">&lt;code>Clone&lt;/code>&lt;/a> trait frequently as well, and like many others, found it difficult to remember the differences between the two, especially early on. Both are just two of several examples of how Rust is much more explicit about these kinds of things, especially when compared to the languages I&amp;rsquo;ve historically used.&lt;/p></description></item><item><title>Network Programmability and Automation: Second Edition</title><link>https://oswalt.dev/2022/07/network-programmability-and-automation-second-edition/</link><pubDate>Fri, 08 Jul 2022 10:00:00 +0000</pubDate><guid>https://oswalt.dev/2022/07/network-programmability-and-automation-second-edition/</guid><description>&lt;p>Nearly seven years ago, &lt;a href="https://oswalt.dev/2015/12/training-the-next-generation-network-engineer/">I wrote a blog post&lt;/a> announcing an exciting new project: a new O&amp;rsquo;Reilly book titled &amp;ldquo;Network Programmability and Automation&amp;rdquo;. Of course, I was absolutely thrilled to work on this project with my co-authors Jason Edelman and Scott Lowe, but I was also eager to be able to make this kind of impact on what was still at the time, a very nascent network automation discipline in the industry.&lt;/p></description></item></channel></rss>