A quick look at Zig's @ptrCast to understand what a variable really is.| www.openmymind.net
Karl Seguin's Blog - A mix of coding and creative writing| www.openmymind.net
Programming blog exploring Zig, Elixir, Go, Testing, Design and Performance| www.openmymind.net
Karl Seguin's Blog - A mix of coding and creative writing| www.openmymind.net
Karl Seguin's Blog - A mix of coding and creative writing| www.openmymind.net
Karl Seguin's Blog - A mix of coding and creative writing| www.openmymind.net
Karl Seguin's Blog - A mix of coding and creative writing| www.openmymind.net
Karl Seguin's Blog - A mix of coding and creative writing| www.openmymind.net
I've previously blogged about how much I like Zig's getOrPut hashmap method. As a brief recap, we can visualize Zig's hashmap as two arrays:| openmymind.net
Just knowing what's possible is an important step towards dealing with complexity| www.openmymind.net
Methods| www.openmymind.net
Karl Seguin's Blog - A mix of coding and creative writing| www.openmymind.net
In the last blog posts, we looked at different ways to compare strings in Zig. A few posts back, we introduced Zig's @bitCast. As a quick recap, @bitCast lets us force a specific type onto a value. For example, the following prints 1067282596:| openmymind.net
Karl Seguin's Blog - A mix of coding and creative writing| www.openmymind.net
Karl Seguin's Blog - A mix of coding and creative writing| www.openmymind.net
An introduction to using SIMD with Zig| www.openmymind.net
Karl Seguin's Blog - A mix of coding and creative writing| www.openmymind.net
Karl Seguin's Blog - A mix of coding and creative writing| www.openmymind.net
Karl Seguin's Blog - A mix of coding and creative writing| www.openmymind.net
Karl Seguin's Blog - A mix of coding and creative writing| www.openmymind.net
In an older post, we explored Zig's @ptrCast and then looked at a concrete usage in the shape of std.heap.MemoryPool.| openmymind.net
How to sort an array of strings in Zig.| www.openmymind.net
Directly manipulating JSON serialization for better performance| www.openmymind.net
A recently merged pull request removed anonymous struct from Zig. I was surprised by this change - it seemed like a big deal. But it turns out that I didn't understand what an anonymous struct were, and this change isn't quite as big as I thought. Consider this code:| openmymind.net
In the following code, we create a Post structure with a skeleton format method. Despite being pretty comfortable with Zig, I could stare at this code for hours and not realize that it has two issues.| openmymind.net
Upgrading our simple server to use multiple worker threads| www.openmymind.net
Using writev to minimize writes, and using large buffers to minimize writes and why it's important to minimize system calls| www.openmymind.net
Adding data to the TCP byte stream to create discrete messages.| www.openmymind.net
Creating closures in zig and storing anytype as a field| www.openmymind.net
How Zig's allocators can help manage memory and improve performance| www.openmymind.net
Understanding and managing keys and values, and key pointers and value pointers, in Zig's HashMap| www.openmymind.net
A Look at Zig's HashMap, AutoHashMap and StringHashMap as well as the unmanaged variants| www.openmymind.net
Understanding and implementing interfaces in Zig| www.openmymind.net
Generics| www.openmymind.net
How a mutex, a condition variable and a priority queue can be used to build a simple task scheduler in Zig.| www.openmymind.net
Learning Zig| www.openmymind.net