Karl Seguin
karlseguin.com
Karl Seguin
@karlseguin.com
I find it fun. And there's probably a blog post or two in there. But the TL;DR would be - I've always found reading / reviewing code fun. It's the same, but a bit different.
October 29, 2025 at 8:31 AM
Claude also didn't like the way pg.zig's pool handled connections in a fail-state, so it wrote this:
github.com/karlseguin/p...
October 29, 2025 at 5:03 AM
Claude didn't like my lame hash function.

github.com/karlseguin/h...
October 28, 2025 at 2:09 PM
Everyone should try and use Google Jules just to see that there's clearly something wrong at Google.
October 9, 2025 at 5:18 AM
Spam on Fastmail is getting a bit bad.
October 8, 2025 at 10:06 AM
Let's pay some bills.
September 20, 2025 at 6:03 AM
Blogged: Is #zig's New Writer Unsafe?

www.openmymind.net/Is-Zigs-New-...

Please tell me I'm doing something stupid. #ziglang
Is Zig's New Writer Unsafe?
Karl Seguin's Blog - A mix of coding and creative writing
www.openmymind.net
September 20, 2025 at 12:08 AM
Not the #zig post I thought I was writing, but this is what came out:

Everything is a []u8
www.openmymind.net/Everything-I...
September 7, 2025 at 1:33 PM
dev: my zig code is slower than Go.
zig dev: have you tried ReleaseFast?

dev: my zig code is less safe than Go.
zig dev: have you tried ReleaseSafe?

dev: my #zig binary is larger than with Go.
zig dev: have you tried ReleaseSmall?
August 25, 2025 at 1:30 AM
Blogged: I'm too dumb for Zig's new IO interface
www.openmymind.net/Im-Too-Dumb-...
August 22, 2025 at 11:56 AM
In #zig new Reader IO, there's no `read` method. Given a reader, you can't just say "give me what data is available" - you know, the most fundamental building block of socket programming.

As far as I can tell is, you do:

var w: Writer = .fixed(buf);
const n = try r.stream(w, .limited(buf.len));
August 22, 2025 at 2:35 AM
I use Gemini like a search engine where the link I click gives me a page with blinking text and animated gifs.
August 21, 2025 at 4:23 AM
Gonna say it: The changes to zig's std are pretty bad.

I've seen this before, where people/orgs are good are building languages / tooling, but not libraries/frameworks.

Think C#/CLR and then awfulness like ASP.NET and WPF.

#zig
August 20, 2025 at 2:36 AM
this std rewrite is fun.
August 18, 2025 at 12:11 PM
#zig: we don't need a string type

also #zig:
std.debug.print("{any}", .{"over 9000"}
> { 111, 118, 101, 114, 32, 57, 48, 48, 48 }

Don't say I could use "{s}"..the point is sometimes you need a discriminator between a string a a byte array (e.g. binding to a table column)
August 11, 2025 at 10:22 AM
Friendly reminder to wipe out `.zig-cache/` every once in a while. Mine was at 96GB.
August 11, 2025 at 8:43 AM
I feel like zig's build system is specifically designed for the people who built zig's build system.

I somehow simultaneously have a build.zig file that I don't understand why it *isn't* working in Linux, while also not understanding how it *does* work on Mac.
August 2, 2025 at 11:29 AM
Should be illegal to have "type" and "error" be a reserved keywords. #ziglang
July 27, 2025 at 10:27 AM
Ugh. Latest #zig changes are rough. No more std.json.stringify (multi-step now with get a JSON formatter first via std.json.fmt).

Using an ArrayList[Unamnaged](u8) as a StringBuilder is out. Use std.Io.Writer.Allocating (which, inconsistently? appears to be "managed")
July 26, 2025 at 7:20 AM
I'm unreasonably annoyed by `std.ascii.eqlIgnoreCase`. At the very least, it needs a variant that assumes that one parameter is an already-lower-cased value.

#ziglang #zig
July 25, 2025 at 1:25 PM
July 17, 2025 at 12:44 PM
Blogged: Zig's new LinkedList API (it's time to learn @ fieldParentPtr)

www.openmymind.net/Zigs-New-Lin...

#zig #ziglang
April 10, 2025 at 1:40 PM
90 days to get trade agreements done with other countries, including China.
April 10, 2025 at 6:12 AM
std.SinglyLinkedList and DoublyLinkedList have changed quite a bit recently. #ziglang
April 8, 2025 at 12:32 AM
I'm discovering that MacOS is more likely to run memory-incorrect/unsafe code (possibly run it incorrectly) than Linux, which is more likely to crash the process.

Investigating these crashes, I never come out saying "Linux is wrong", but rather "How TF did this work on Mac?".

cont ->
April 7, 2025 at 10:12 AM