Amazing how much, and the type of, spam I get on here :(

Wanted to dogfood pg.zig, I wrote a a couple crawlers (in Go) and exposes the data behind an API using http.zig and pg.zig: and

> cat ~/.psqlrc
\set QUIET
\set HISTFILE          ~/.cache/psql/:DBNAME
\set HISTSIZE          2000
\set HISTCONTROL       ignoredups
\pset linestyle        unicode
\pset null             'NULL'
\timing                on
\set PROMPT1           '%n@%m %/$ '
\set PROMPT2           ''

Coming to the realization that I don't use assert enough in my code.

Ran into issues using std.Thread.Pool. Over 70% of cycles were spent allocating and freeing the closure. It might be a poor choice if you need thousands of small jobs queued per second. Still investigating though.

Another week, another Zig library. This time a library for generating Prometheus metrics:

I can't believe tech bloggers lock their content on
Changes to http.zig

Working on making http.zig nonblocking. The epoll/kqueue stuff is easy (though, certainly not flawless), but the amount of change I've had to do to the rest of the code is bothersome and almost certainly full of bugs. I now feel strongly that every modern language/stdlib needs a cohesive concurrency story baked in. Goroutines, Erlang processes, stackless coroutines...anything, but something, please!

A native PostgreSQL for Zig. Pretty sure it's the only native client, all others wrap libpq. I'm told it's being used in a production environment:

I've been saying this for a long time: "Stop deploying web application firewalls" -

Modern cybersecurity is, at best, about compliance, not security. At worse, it's all theater.

Zig's test runner has some frustrations, but there are hooks for writing a custom one. It has its own limitations, but I've been using this:

New blog post: Fast Path to Burnout - Delaying Deploys

There is now a Chinese translation of Learning Zig: