Creează un cont pentru a te abona la acest blog și a-i urmări articolele pe pagina Lectură.
-
A while ago, we looked at ArenaAllocators and why you should view their free as a noop.
-
If I told you that the following prints 1665: var b: std.ArrayList(u8) = try .initCapacity(init.gpa, 1024); try b.appendSlice(init.gpa, "a" ** 1025); std.debug.print("{d}\n", .
-
I use AI (Claude Code).
-
If we wanted to write a function that takes one of Zig's new *std.Io.Reader and write it to stdout, we might start with something like: fn output(r: *std.Io.Reader) !
-
If you're coming to Zig from a more hand-holding language, one of the things worth exploring is the relationship between the compiler and memory.
-
You might have heard that Zig 0.15 introduces a new IO interface, with the focus for this release being the new std.Io.Reader and std.Io.Writer types.
-
As you might have heard, Zig's Io namespace is being reworked.
-
In a recent, post-Zig 0.14 commit, Zig's SinglyLinkedList and DoublyLinkedList saw significant changes.
-
There are four important methods on Zig's std.mem.Allocator interface that Zig developers must be comfortable with: alloc(T, n) - which creates an array of n items of type T, free(ptr) - which frees memory allocate with alloc (although, this is implementa…
-
What happens when you free with an ArenaAllocator?
-
Maybe I'm the only one, but it always takes my little brain a split second to understand what's happening whenever I see, or have to write, something like value.* = .{...}.
-
I've previously blogged about how much I like Zig's getOrPut hashmap method.
-
In the last blog posts, we looked at different ways to compare strings in Zig.
-
Newcomers to Zig will quickly learn that you can't switch on a string (i.e. []const u8).
-
I have an unapologetic and, I'd like to think, pragmatic take on testing.
-
As of mid-July 2025, development on a new Io namespace is underway.
-
One of the first Zig-related blog posts I wrote was an overview of SIMD with Zig.
-
Zig doesn't have an interface keyword or some simple way to create interfaces.
-
If you look at my httpz library, you'll notice that httpz.Server(T) is a generic.
-
In an older post, we explored Zig's @ptrCast and then looked at a concrete usage in the shape of std.heap.MemoryPool.