Skip to content
0:00 / 0:00

#zig#io#streaming

Don't Forget To Flush by Andrew Kelley

TigerBeetle

14K subscribers • 8 videos on Hallway

YouTube
  • Recommended by 2 people: 1 on Lobsters and 1 in engineering communities.
  • Presented by Andrew Kelley, creator of Zig
  • An opinion. It argues one side of a question engineers disagree on.

Advanced. Deep dive for people who know the field.

85K views1 year ago2 recommendations

Systems programmingProgramming languagesZigNetworking and protocolsOperating systems

Andrew Kelley examines input/output streaming abstractions, analyzing data flow, error handling, and a unified interface design for I/O and multithreading.

Every programming language environment has an interface for streaming data. Using real world examples of compression, files, sockets, and network protocols, this talk critically examines a variety of strategies for designing an input/output abstraction. We'll watch the data closely as it flows through the pipeline, as well as examining how error conditions are handled. Finally, I'll draw a non-obvious connection between I/O and multithreading, and explain my evil/genius/ridiculous (take your pick) plan to put ALL I/O behind one massive interface, making a lot of people happy/angry (take your pick). andrewkelley.me/ ziglang.org/zsf/ Talk from Systems Distributed '25: systemsdistributed.com

Why it's here

2 people recommend this

What people say. Highly recommended as an insightful talk by Zig's creator on the design of streaming I/O interfaces and systems programming abstractions.

u/Ok_Emu7904in r/Zig • Recommends

We are so back 🔥🔥 🔥 source

robbievon Lobsters • Recommends

Don’t Forget To Flush

u/Ok_Emu7904in r/Zig • Recommends

We are so back 🔥🔥 🔥 here is the link btw , -> link

u/marler8997in r/Zig • Mentions

On “Why std.Io.Writer interface design is different from std.mem.Allocator interface in 0.15.1”

In a phrase, it keeps the "buffer above the vtable", which, makes it optimizer friendly. Andrew goes over it in a recent talk here: [video

u/eightrxin r/Zig • Mentions

On “Threading/parallel processing.. how good is it in Zig?”

Zig is currently implementing its new std.Io interface, which will be passed to functions like allocators already do. That way, different Io implementations can be passed to synchronicity-agnostic functions. I'd recommend watching Don't forget to flush by Andrew Kelley to see the motivation behind the changes.

u/marler8997in r/Zig • Mentions

On “Can someone explain to me the new std.Io interface or point me to good resources where I can see it in action?”

The new std.Io with 0.15 is actually a warranted change all on its own even without async. It's all about keeping the buffer above the vtable which Andrew talks about here: link to this video I've been using it in some of my projects like zigx, dbus-zig and zipcmdline. I've even backported it to 0.14 so I could keep those projects working on 0.14 and 0.15 for now. The changes took a bit to understand but now that I do they have a huge impact on both performance and design patterns. All for the better IMO.