Published on: 2025-06-05 11:00:48
This is going to be a long post, but I hope you get value out of it. This wasn’t an easy topic to tackle but it was definitely worthwhile! Hopefully, you leave with a decent understanding of how memory ordering works and how to use atomics in conjunction with memory ordering to build a lock-free queue in C++. Note: If you want to actually compile the code and run it, make sure to do so with the TSan flag enabled for the CLang compiler. TSan is a reliable way of detecting data races in your cod
Keywords: data memory ready std thread
Find related items on AmazonPublished on: 2025-06-16 13:52:14
📟 zli A blazing-fast, zero-cost CLI framework for Zig. The last one you will ever use. Build modular, ergonomic, and high-performance CLIs with ease. All batteries included. 🧱 Each command is modular and self-contained. inspired by Cobra (Go) and clap (Rust). 📚 Documentation See docs.md for full usage, examples, and internals. 🚀 Highlights Modular commands & subcommands Fast flag parsing ( --flag , --flag=value , shorthand -abc ) , , shorthand ) Type-safe support for bool , int , string
Keywords: const std try zig zli
Find related items on AmazonPublished on: 2025-06-24 11:07:19
Before we dive into the topic, let me introduce you my new friend catsay , a simple Go program which eats stdin and speaks like a cat: Cute! ... but it's not what I want to talk about. What makes this screenshot very exciting is, it's a Linux lightweight virtual machine running on Starina operating system! That said, this post is not about how hard it is to write a hypervisor (see my previous post for that). In fact, it's not that hard. The hardest part is to design how you interact with the h
Keywords: command linux new starina stdin
Find related items on AmazonPublished on: 2025-07-02 00:45:53
Several years back I found an interesting question on Reddit. Essentially the author asks why there is no way to expand a pack into a sequence of case labels followed by a statement. It was illustrated with the following imaginary syntax: 1 2 3 4 5 6 7 8 9 10 11 template < class Visitor , class Variant , std :: size_t ... Is > auto visit_impl ( Visitor visitor , Variant && variant , std :: index_sequence < Is ... > ) { auto i = variant . index (); switch ( i ) { ( case Is : return visitor ( get
Keywords: index int return std variant
Find related items on AmazonPublished on: 2025-07-11 03:52:15
Implementing a Struct of Arrays Recently, I watched Andrew Kelley’s talk on Practical Data Oriented Design. It goes into some of the architectural changes he’s been making to the Zig compiler, with pretty significant performance benefit. Would definitely recommend checking out the talk, even if you’re like me and have never written any Zig. About halfway through the talk, he shows a way to improve his memory usage by avoiding wasting memory. By turning this structure: const Monster = struct {
Keywords: auto point std struct type
Find related items on AmazonPublished on: 2025-07-18 03:13:31
AnuDB AnuDB is a lightweight, serverless document database designed for C++ applications, offering efficient storage of JSON documents through MessagePack serialization. It provides a serverless, schema-less solution for applications requiring flexible data management with robust query capabilities. Since AnuDB written on top of RocksDB, it ensures atomicity, durability and consistency of your documents. You can adjust memory/CPU usage of AnuDB based on RocksDB options mentioned in StorageEngi
Keywords: anudb document mqtt operations std
Find related items on AmazonPublished on: 2025-07-23 11:36:58
Last week, we discussed language features that are becoming constexpr in C++26. Today, let’s turn our attention to the standard library features that will soon be usable at compile time. One topic is missing: exceptions. As they need both core language and library changes, I thought they deserved their own post. P2562R1: constexpr stable sorting This paper proposes making std::stable_sort , std::stable_partition , std::inplace_merge , and their ranges counterparts usable in constant expression
Keywords: constexpr default destructor std trivial
Find related items on AmazonPublished on: 2025-08-02 11:39:32
This series has been expanded into a book! It covers many more topics in much greater detail. You can now pre-order Building a Debugger. Debuggers are one of the most valuable tools in any developer’s kit. However, although these tools are in such widespread use, there aren’t a lot of resources which tell you how they work and how to write one, especially when compared to other toolchain technologies like compilers. In this post series we’ll learn what makes debuggers tick and write one for deb
Keywords: debugger ll pid process std
Find related items on AmazonPublished on: 2025-08-06 09:13:03
Since constexpr was added to the language in C++11, its scope has been gradually expanded. In the beginning, we couldn’t even use if , else or loops, which were changed in C++14. C++17 added support for constexpr lambdas. C++20 added the ability to use allocation and use std::vector and std::string in constant expressions. In this article, let’s see how constexpr evolves with C++26. To be more punctual, let’s see what language features become more constexpr -friendly. We’ll discuss library chang
Keywords: article constant constexpr std void
Find related items on AmazonPublished on: 2025-08-13 15:09:50
Learning to Write Less Slow C, C++, and Assembly Code The benchmarks in this repository don't aim to cover every topic entirely, but they help form a mindset and intuition for performance-oriented software design. It also provides an example of using some non-STL but de facto standard libraries in C++, importing them via CMake, and compiling from source. For higher-level abstractions and languages, check out less_slow.rs and less_slow.py . Much modern code suffers from common pitfalls, such as
Keywords: build_release code install less_slow std
Find related items on AmazonPublished on: 2025-08-14 01:09:50
Learning to Write Less Slow C, C++, and Assembly Code The benchmarks in this repository don't aim to cover every topic entirely, but they help form a mindset and intuition for performance-oriented software design. It also provides an example of using some non-STL but de facto standard libraries in C++, importing them via CMake, and compiling from source. For higher-level abstractions and languages, check out less_slow.rs and less_slow.py . Much modern code suffers from common pitfalls, such as
Keywords: build_release code install less_slow std
Find related items on AmazonPublished on: 2025-08-14 16:46:10
Vivarium By James Somers The keeper of a university’s lab animals stumbles onto an extraordinary secret. For his mice the “sun” happened to rise between two and three in the morning, and so he, too, built his day around the artificial lights—even though increasingly this routine estranged him from the waking world. He’d pull in to a nearly empty parking lot, it would be him and the janitorial staff. He’d make his way down, down into the guts of the building, past airy lecture halls and glass-
Keywords: anna mice mouse postdoc time
Find related items on AmazonPublished on: 2025-08-16 18:46:10
Vivarium By James Somers The keeper of a university’s lab animals stumbles onto an extraordinary secret. For his mice the “sun” happened to rise between two and three in the morning, and so he, too, built his day around the artificial lights—even though increasingly this routine estranged him from the waking world. He’d pull in to a nearly empty parking lot, it would be him and the janitorial staff. He’d make his way down, down into the guts of the building, past airy lecture halls and glass-
Keywords: anna mice mouse postdoc time
Find related items on AmazonPublished on: 2025-08-22 17:16:03
<- to README.md <- to implementation.hpp utl::profiler is single-include solution for localized profiling, it features simple macros to measure how much time is taken by a certain scope / expression / code segment. Profiler automatically builds a call graph for all profiled functions and prints a nicely formatted table for every thread. See examples. Key features: Below is an output example from profiling a JSON parser: Definitions // Profiling macros UTL_PROFILER_SCOPE (label); UTL_PROFIL
Keywords: profiler profiling std thread utl_profiler
Find related items on AmazonPublished on: 2025-08-23 06:06:33
Zig's new LinkedList API (it's time to learn @fieldParentPtr) In a recent, post-Zig 0.14 commit, Zig's SinglyLinkedList and DoublyLinkedList saw significant changes. The previous version was a generic and, with all the methods removed, looked like: pub fn SinglyLinkedList ( comptime T : type ) type { return struct { first : ? * Node = null , pub const Node = struct { next : ? * Node = null , data : T , } ; } ; } The new version isn't generic. Rather, you embed the linked list node with your
Keywords: const node power std user
Find related items on AmazonPublished on: 2025-08-20 09:15:26
terser (shorter) lambda == SHORTY This library is intended to give terser syntax than C++'s lambdas, not replace C++ with lazy DSL. import shorty; using namespace shorty ::literals ; // you no longer need to remember if it's `std::less` or `std::greater` std::ranges::sort (subject, $lhs > $rhs); // filter only even subject | std::views::filter(($i % 2 ) == 0 ); // zip together and transform std::views::zip (A,B,C,D) | std::views::transform($a * $b + $c * $d); // call external function auto pyt
Keywords: args arguments auto const std
Find related items on AmazonPublished on: 2025-09-15 04:15:47
msgpack23 A modern, header-only C++ library for MessagePack serialization and deserialization. Overview msgpack23 is a lightweight library that provides a straightforward approach to serializing and deserializing C++ data structures into the MessagePack format. It is written in modern C++ (targeting C++20 and beyond) and leverages templates and type traits to provide a flexible, zero-dependency solution for packing and unpacking various data types. Key Features Header-only : Simply include
Keywords: header msgpack23 pack std types
Find related items on AmazonPublished on: 2025-09-15 23:37:42
Hexi is a lightweight, header-only C++23 library for safely handling binary data from arbitrary sources (but primarily network data). It sits somewhere between manually memcpying bytes from network buffers and full-blown serialisation libraries. The design goals are ease of use, safety when dealing with untrusted data, a reasonable level of flexibility, and keeping overhead to a minimum. What Hexi doesn't offer: versioning, conversion between different formats, handling of text-based formats,
Keywords: buffer data hexi std stream
Find related items on AmazonPublished on: 2025-09-16 09:37:42
Hexi is a lightweight, header-only C++23 library for safely handling binary data from arbitrary sources (but primarily network data). It sits somewhere between manually memcpying bytes from network buffers and full-blown serialisation libraries. The design goals are ease of use, safety when dealing with untrusted data, a reasonable level of flexibility, and keeping overhead to a minimum. What Hexi doesn't offer: versioning, conversion between different formats, handling of text-based formats,
Keywords: buffer data hexi std stream
Find related items on AmazonPublished on: 2025-09-16 16:11:07
Building Statically Linked Go Executables with CGO and Zig This is a short post about how to create a statically linked Go executable that calls in to CGO dependencies using Zig. The full code for this post is available in this repo. By default, if you're using CGO, the executable you generate dynamically links, but I frequently want to statically link to avoid runtime errors. First, let's create a zig library, with zig init, then trim back the excess stuff it generates so we're left just wit
Keywords: build const main std zig
Find related items on AmazonPublished on: 2025-09-17 17:51:12
P1306 gives us compile time repetition of a statement for each element of a range - what if we instead want the elements as a pack without introducing a new function scope? In this blog post we’ll look at the expand helper, expansion statements and how arbitrary ranges can be made decomposable via structured bindings to reduce the need for IILEs. Element-wise expansion The expand pattern The reflection features introduced in P2996 by themselves are sufficient to iterate over a compile time r
Keywords: auto constexpr operator std template
Find related items on AmazonPublished on: 2025-09-26 10:20:27
Shift-To-Middle Array The Shift-To-Middle Array is a dynamic array designed to optimize insertions and deletions at both ends, offering a high-performance alternative to std::deque , std::vector , and linked lists. It achieves this while maintaining contiguous memory storage, improving cache locality and enabling efficient parallel processing. 🌟 Features ✅ Amortized O(1) insertions & deletions at both ends ✅ Fast random access (O(1)) ✅ Better cache locality than linked lists ✅ Supports SIM
Keywords: array benchmarks middle shift std
Find related items on AmazonPublished on: 2025-09-30 01:19:25
In the previous article, we discussed what language features are removed from C++26. In this one, we are going to cover both language features that are finally removed after a few years of deprecation, and also those that are getting deprecated by C++26. As a reminder, a removal from the language usually happens in two steps. First a feature gets deprecated, meaning that its users would face compiler warnings for using deprecated features. As a next step, which in some cases never comes, the co
Keywords: 26 deprecated implementation removed std
Find related items on AmazonPublished on: 2025-10-07 17:07:03
cppmatch A lightweight header-only Clang/GCC compatible C++ library for expressive pattern matching and error handling. Check an example in examples folder or go to compiler-explorer to play with it! Overview A header-only C++ library that offers exceptionless error handling and type-safe enums, bringing Rust-inspired error propagation with the ? operator and the match operator to C++. The expect macro simplifies error propagation by automatically returning the error from a function when an
Keywords: error result return std value
Find related items on AmazonPublished on: 2025-10-18 14:51:36
This post describes how to compile a single C++ source file to an object file with the Clang API. Here is the code. It behaves like a simplified clang executable that handles -c and -S . 1 cat > main.cc << eof 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
Keywords: cc clang int llvm std
Find related items on AmazonPublished on: 2025-10-16 14:03:51
C++/WinRT pull request 1225 fixed a problem with a call to invoke . What’s the problem, why did it show up all of a sudden, and what can you do if you are stuck on an older version of C++/WinRT? The problem is at the point in winrt:: impl:: promise_base ::set_completed makes an unqualified call to invoke() : namespace winrt::impl { ⟦ ... ⟧ template <typename Delegate, typename... Arg> bool invoke(Delegate const& delegate, Arg const&... args) noexcept; ⟦ ... ⟧ template <typename Derived, typena
Keywords: handler invoke namespace std winrt
Find related items on AmazonPublished on: 2025-10-26 13:05:43
Mar 04, 2025 Why fastDOOM is fast During the winter of 2024, I restored an IBM PS/1 486-DX2 66Mhz, "Mini-Tower", model 2168. It was the computer I always wanted as a teenager but could never afford. Words cannot do justice to the joy I felt while working on this machine. As soon as I got something able to boot, I benchmarked the one software I wanted to run. C:\DOOM>doom.exe -timedemo demo1 timed 1710 gametics in 2783 realtics Doom doesn't give the fps right away. You have to do a bit of ma
Keywords: build doom exe fastdoom mode
Find related items on AmazonPublished on: 2025-10-27 14:05:43
Mar 04, 2025 Why fastDOOM is fast During the winter of 2024, I restored an IBM PS/1 486-DX2 66Mhz, "Mini-Tower", model 2168. It was the computer I always wanted as a teenager but could never afford. Words cannot do justice to the joy I felt while working on this machine. As soon as I got something able to boot, I benchmarked the one software I wanted to run. C:\DOOM>doom.exe -timedemo demo1 timed 1710 gametics in 2783 realtics Doom doesn't give the fps right away. You have to do a bit of ma
Keywords: build doom exe fastdoom mode
Find related items on AmazonPublished on: 2025-11-04 05:28:40
If you read my articles, you probably know that I like playing with NativeAOT a lot, especially to use C# in places where it wasn’t possible before. I already wrote a simple profiler, this time we will go a step further and try to write a Garbage Collector in C#. Of course, this won’t result in anything usable in production. Building a performant and fully-featured GC would take hundreds of hours of work, and using a managed language for that is a poor choice (can you imagine your GC being rand
Keywords: const dll gc manageddotnetgc std
Find related items on AmazonGo K’awiil is a project by nerdhub.co that curates technology news from a variety of trusted sources. We built this site because, although news aggregation is incredibly useful, many platforms are cluttered with intrusive ads and heavy JavaScript that can make mobile browsing a hassle. By hand-selecting our favorite tech news outlets, we’ve created a cleaner, more mobile-friendly experience.
Your privacy is important to us. Go K’awiil does not use analytics tools such as Facebook Pixel or Google Analytics. The only tracking occurs through affiliate links to amazon.com, which are tagged with our Amazon affiliate code, helping us earn a small commission.
We are not currently offering ad space. However, if you’re interested in advertising with us, please get in touch at [email protected] and we’ll be happy to review your submission.