RSSAmplifier

Blog

Matt Oswalt

Recent content on Matt Oswalt's Technical Blog

oswalt.devRSS feed ↗10 posts

Latest posts

Difference between 'iter()' and 'into_iter()' in Rust

In today’s edition of “things that really confused me when starting with Rust” - I struggled to understand the difference between these two methods I kept seeing:

Rust HeaderMap Iteration Semantics

This Rust program is syntactically correct, but there’s a mistake in it. Can you spot it? 1 use http::header::{ CONTENT_LENGTH , HOST , HeaderMap}; 2 3 fn main () { 4 let headers: HeaderMap = get_headermap(); 5 6 for (name, value) in headers { 7 if let Some (name) = name { 8 println! ( ' {:?} : {:?} ' , name, value); 9 } 10 } 11 } 12 13 // get_headermap() implementation omitted from this…

Classifying MNIST Handwritten Digits With a Fully Connected Neural Network

I’d like to continue on my deep learning journey. In my first blog on this topic I built a basic neural network “from scratch”. This was done intentionally to learn how things work at a low-level, even though it was impractical for any “serious” usage.

Neural Network from Scratch - Updated

In my last blog , I set up a basic 2-2-1 neural network by hand to solve the XOR table. I used mean squared error (MSE) for the network’s loss function:

A Simple Neural Network from Scratch

In this post, we’ll explore building a neural network from scratch, for whatever definition of “from scratch” includes the use of Python. This means no third-party libraries like PyTorch, Tensorflow, even Numpy.

Unix Domain Sockets

In a previous post on sockets in Linux we briefly explored Unix Domain Sockets (UDS) by invoking the AF_UNIX domain in a few examples. In this post I’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’ve only ever used domains like AF_INET / AF_INET6 .

Linux Sockets: Relevant Syscalls

In my previous post on Linux sockets , there were several examples that referenced “syscalls” when working with sockets. I’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.

Linux Sockets: Domains and Types

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…

Copy and Clone in Rust

Rust’s Copy trait 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’s ownership model are significant. As I gained more experience, I also encountered the Clone trait frequently as well, and like many others, found it difficult to…

Network Programmability and Automation: Second Edition

Nearly seven years ago, I wrote a blog post announcing an exciting new project: a new O’Reilly book titled “Network Programmability and Automation”. 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…