<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Zig on ilikeorangutans</title><link>https://kuelzer.ca/tags/zig/</link><description>Recent content in Zig on ilikeorangutans</description><generator>Hugo</generator><language>en</language><copyright>© 2026 Jakob Külzer</copyright><lastBuildDate>Sun, 12 Apr 2026 14:27:24 -0400</lastBuildDate><atom:link href="https://kuelzer.ca/tags/zig/index.xml" rel="self" type="application/rss+xml"/><item><title>Zig, Memory, and the mysterious `170`</title><link>https://kuelzer.ca/posts/2025/09/06/zig-memory-and-the-mysterious-170/</link><pubDate>Sat, 06 Sep 2025 11:06:48 -0400</pubDate><guid>https://kuelzer.ca/posts/2025/09/06/zig-memory-and-the-mysterious-170/</guid><description>&lt;p&gt;I&amp;rsquo;m hacking on a small Zig application with a GTK frontend, and part of using GTK is passing around &lt;code&gt;?*anyopaque&lt;/code&gt; pointers and you never quite know if it&amp;rsquo;s working. In my app I&amp;rsquo;m passing around a struct that holds a &lt;del&gt;string&lt;/del&gt; &lt;code&gt;[]const u8&lt;/code&gt; to various GTK callbacks. However the string was empty. This led me down a rabbit hole of trying to figure out if my pointers were correctly passed, even going as far as stepping through it with a debugger. Turns out, the pointers are all correct. Even my &lt;del&gt;string&lt;/del&gt; &lt;code&gt;[]const u8&lt;/code&gt; was there with the correct length, except every single byte was set to &lt;code&gt;170&lt;/code&gt; and I realized I was looking at undefined memory. Zig in debug mode sets undefined memory to &lt;code&gt;0xaa&lt;/code&gt; which is &lt;code&gt;170&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Zig Fetch</title><link>https://kuelzer.ca/posts/2024/07/17/zig-fetch/</link><pubDate>Wed, 17 Jul 2024 12:18:03 -0400</pubDate><guid>https://kuelzer.ca/posts/2024/07/17/zig-fetch/</guid><description>&lt;p&gt;Zig&amp;rsquo;s package manager is still a bit rough. It only supports fetching tarballs, but many github projects don&amp;rsquo;t have them unless they have a release. There&amp;rsquo;s a &lt;a href="https://www.baeldung.com/linux/github-download-tarball"&gt;trick to fetch any commit as a tarball though&lt;/a&gt;:&lt;/p&gt;</description></item><item><title>One Billion Row Challenge in Zig</title><link>https://kuelzer.ca/posts/2024/05/05/one-billion-row-challenge-in-zig/</link><pubDate>Sun, 05 May 2024 13:54:44 -0400</pubDate><guid>https://kuelzer.ca/posts/2024/05/05/one-billion-row-challenge-in-zig/</guid><description>&lt;p&gt;I finally got around to looking into &lt;a href="https://github.com/gunnarmorling/1brc?tab=readme-ov-file"&gt;The One Billion Row Challenge&lt;/a&gt;. If you&amp;rsquo;re unfamiliar, it&amp;rsquo;s a challenge to how fast a program can read and process one billion rows. It&amp;rsquo;s fascinating because it&amp;rsquo;s all about raw performance including algorithms, CPU instructions, and profiling and benchmarking. All things I enjoy dabbling with.&lt;/p&gt;</description></item><item><title>Zig - First Impressions</title><link>https://kuelzer.ca/posts/2023/10/23/zig-first-impressions/</link><pubDate>Mon, 23 Oct 2023 19:50:27 -0400</pubDate><guid>https://kuelzer.ca/posts/2023/10/23/zig-first-impressions/</guid><description>&lt;p&gt;I&amp;rsquo;ve been following the zig language for a while ever since I saw &lt;a href="https://corecursive.com/067-zig-with-andrew-kelley/"&gt;Andrew Kelly&amp;rsquo;s talk&lt;/a&gt; on &lt;a href="https://corecursive.com/"&gt;Corecursive&lt;/a&gt;.
The way Andrew describes the design of zig was very engrossing and who doesn&amp;rsquo;t like a language build
for speed. But I have struggled with picking it up; time is in short supply and so were docs for zig
when I first looked at it.&lt;/p&gt;
&lt;p&gt;But that has changed; I finally found some motivation and &lt;a href="https://ziglearn.org/"&gt;ziglearn.org&lt;/a&gt; which
is a good introduction to zig. I have only managed to read the first two chapters, much less understand
them but it&amp;rsquo;s enough to be dangerous (to myself?).&lt;/p&gt;</description></item></channel></rss>