Inside Zig's New Writer

0.15 releasing thoroughly sidetracked me into writing a very long blog post about the new std.Io.Writer.

Particularly proud of this diagram:

35 Likes

I’ll have a read later, since I still cant my head around writergate.
But an off-topic question, but since you mention it, which tool do you use for your diagrams please? They are nice :slight_smile: I am new to linux and tried about 5 last week, all a bit disapointing. I saw @Sze had a nice diagram the other day as well:

I use excalidraw.com . It’s a webapp but it saves your work locally I think. It’s quite nice.

2 Likes

Thanks for the write up. It is particularly timely since I’m in the middle of implementing a std.Io reader and writer for a Uart peripheral on a bespoke micro-controller platform. I’m still sorting through the interfaces and your explanation helped in a couple of areas where I was still stumbling about.

2 Likes

halfway through it and loving it.

may i comment on how a dark theme is not universally comfortable? i’m on a bright train right now and it’s somewhat difficult to read.

2 Likes

This is why I love the “prefers color scheme” css media query. It’s brilliant - you can give users what they want without asking them!

4 Likes

Thanks for the kind words.

Understood. I’ll try using @andrewrk’s suggestion to provide a light mode.

2 Likes

well, whether that’s brilliant or gloomy depends on your prefers-prefers-color-scheme setting

4 Likes

prefers-prefers-color-scheme-color-scheme, perhaps?

Since this conversation has diverged into css :laughing: let me add another ask for the blog to be mobile friendly.

2 Likes

great read!

1 Like