Posts from 2023
-
:
Rust - Introduction
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. I’m a long term C++ programmer who is coming to Rust with lots of baggage. I’d like to write … -
:
Rust - An Id Manager
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. The first piece of code that I’m going to play with in Rust is a “reusable id manager”. … -
:
Rust - An interval
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. We’ll start with an interval, this is a struct with an upper and lower limit and represents an … -
:
Rust - A collection of intervals
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. Now that I have a simple interval I need a collection of them to represent the available ids that we can … -
:
Rust - Adding intervals correctly
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. Our simple collection of intervals has a major failing, it doesn’t merge intervals and so we end up … -
:
Rust - Removing values
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. Now that we can insert intervals into our collection we need to be able to remove them. There are three … -
:
Rust - Building an id manager from a collection of intervals
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. Now that we have a collection of intervals we can begin to build our id manager. The id manager turns the … -
:
Rust - Smart Ids; object lifetime and mutability
Previously published This article was previously published on len-learns-rust.com. A full index of the articles from this len-learns-rust.com can be found here. The simple id manager that I built last time is just that, simple. However, … -
:
Rust - Renaming without restructuring
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. We now have a ThreadSafeIdManager that can provide SmartId’s. It would probably be better to simply … -
:
Rust - Generic code in Rust
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. Now that we have an IdManager that works reasonably well and does much of what we require of it we can look … -
:
Rust - Clean up and additional functionality
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. We now have a generic IdManager so now we just need to finish off the required functionality. The missing … -
:
Rust - The journey so far
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. I’ve now built a generic IdManager which does everything I want it to do, for now. I’ve bumbled … -
:
Rust - Threading
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. Now that I have my generic IdManager I’d like to use it from multiple threads. As I said, this code … -
:
L'Hexapod: More than just a delay, it seems...
Previously published This article was previously published on lhexapod.com as part of my journey of discovery into robotics and embedded assembly programming. A full index of these articles can be found here. Back in 2010 I thought that the … -
:
Migrating to Hugo
I have just completed migrating the blog from Movable Type to Hugo. Hopefully everything still works and is in the right place, but do let me know if you find any issues. The comments have been migrated to Disqus. I’ve been wanting to … -
:
Currently reading - Rust Atomics and Locks
I’m currently reading Rust Atomics and Locks by Mara Bos and it’s excellent. Really approachable, concise and detailed. A pleasure to read. -
:
SetServiceStatus framework bug
One of my clients has been reporting an intermittent issue with the deployment of new releases of their game server. This runs as a Windows service on many, many, cloud machines and, just sometimes, the service seems to have issues during … -
:
LockExplorer is no more
I’ve finally done what I should have done several years ago and shut down the LockExplorer site. I haven’t had the time required to keep the tool up to date and fewer people were interested than I originally expected. I may make … -
:
Currently reading - Rust Brain Teasers
I’m currently reading Rust Brain Teasers by Herbert Wolverson. It’s a nice book of bite-sized puzzles in Rust that are ideal for the way I like to learn (randomly jumping around from subject to subject that happen to interest … -
:
Practical Testing: 39 - 19 years' unit testing the same code
Back in 2004 I started a series of blog posts called “Practical Testing”, about unit testing a non-trivial piece of C++ code. The idea was to show how adding unit tests to existing, real-world, code could be useful and could … -
:
Adventures with \Device\Afd
I’ve been playing around with Rust recently and whilst investigating asynchronous programming in Rust I was looking at Tokio, an async runtime. From there I started looking at Mio, the cross-platform, low-level, I/O code that Tokio … -
:
VS2022 Version 17.6.0 Preview 3.0 - Standard Library Modules warnings (std.ixx)
So, this morning I’m back from my Easter break and working on some code for a client and the first thing I do is kick off my CI build and things start failing. It seems that my “cunning plan” to have my CI build use the … -
:
GoogleTest - the first test
I’m in the process of investigating GoogleTest and the experience has been interesting. I’ve been unit testing code and doing Test Driven Development for a long time now; almost 20 years and I’m still learning. I’ve … -
:
Practical Testing: 40 - Code updates and new functionality
Nineteen years ago I began a series of blog posts, called “Practical Testing”, about testing real-world, multi-threaded code. As with most code that works well, and is used by lots of people, we’re still changing it and … -
:
Practical Testing: 41 - GoogleTest
I’ve been writing a series of blog posts, called “Practical Testing”, about testing real-world, multi-threaded code. Up until now I’ve used my own, home grown, unit testing framework. When I started out with this … -
:
Building OpenSSL 3.x for x86 and x64 on Windows for side by side deployment
Back in August 2012 I shared my scripts for building OpenSSL on Windows. These have changed a little since the ones I had for the 1.0.x and 0.9.x releases of OpenSSL. The main idea is the same, the scripts build the OpenSSL code as both … -
:
The cost of encapsulation
I’m debugging performance issues with a C++ server that has been stalling and then failing to recover. I’ve reached a point where we can generate the problem using a network interruption that causes multiple connections to … -
:
Quick and dirty analysis of memory allocations in Visual Studio code
Yesterday I was bemoaning encapsulation and how it was hiding what was going on inside my objects (and quite right too, what good would it be otherwise?). The issue is that the object I was interested in, and each of the objects that formed … -
:
Adventures with \Device\Afd - test driven understanding
I’ve been investigating the ‘sparsely documented’ \Device\Afd interface that lies below the Winsock2 layer. Today I use a test driven method for understanding and documenting the API. TDU - Test Driven Understanding When … -
:
20 years of blogging...
On the 3rd of May 2003 I posted the first entry on this blog. I then proceeded to “back fill” the blog with various things that had either been posted before in other places or had been laying around waiting for me to have … -
:
Wayback
This blog has been around a long time and the internet tends to rot. This means that quite a lot of the links on old posts are broken. I’m slowly fixing these broken links to use “The Wayback Machine” but it’s … -
:
Rust - Thinking about threading
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. My threading background in C++ on Windows and Linux goes back a long way and that means that I have some … -
:
Rust - Simple threading
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. The simplest threading is already covered by most Rust books. Starting up a thread, passing stuff to it, … -
:
Testing, discipline and detail
The manual process around updating broken links is due to be replaced by a simple link checker that I’ve been writing in Rust. It’s not quite ready yet but it’s nearly there… I was updating a few broken links today … -
:
Rust - Sharing data between threads
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. Now that we can send messages to threads I want to see how we can access shared data from those threads. … -
:
Rust - Accessing the Id Manager from multiple threads
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. Since I now understand a little about how to share data between threads I can try and use my Id Manager … -
:
Rust - Deadlocks
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. One reason that access shared data using locks is a bad idea is that, in complex code, it may be possible … -
:
Debugging network protocols with journaling
One of my long-term clients has hundreds of cloud machines running instances of their server, each server maintains thousands of reliable UDP connections using a custom protocol that we’ve developed over the years. When things go … -
:
Rust - Lifetimes
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. One of the jobs of the Rust compiler’s “borrow checker” is to track the life of each … -
:
Rust - Borrowing mutable references
Previously published This article was previously published on len-learns-rust.com. A full index of these articles can be found here. In addition to managing the lifetimes of references to variables, the Rust compiler’s borrow checker … -
:
Sick PC
I’ve had a sick PC for several weeks now. It has cost me a surprising amount of time and thought. It started with my main work machine randomly hanging. This is Windows 11 with a Ryzen 9 5900X, and it has previously run faultlessly … -
:
Multi-threaded testing
I’ve always found testing multi-threaded code in C++ a humbling experience. It’s just so easy to make stupid mistakes and for those mistakes to lurk in code until the circumstances are just right for them to show themselves. … -
:
Setting the preferred NUMA node for a Windows Service (and making it work after a reboot)
When your machine has multiple NUMA nodes it’s often useful to restrict a process to using just one for performance reasons. It’s sometimes hard to fully utilize multiple NUMA nodes and, if you get it wrong, it can cost in … -
:
How little things kick you out of the zone
I had an internet outage this morning. This shouldn’t have been much of a problem for me as all of the code that I needed to be working on is on my local git server and all of the dependencies are local. Or so I thought. The client …