I guess it's like bound checking - runtime checks in debug, else undefined. But, as we would have said in the 90s: to the extreme.
I guess it's like bound checking - runtime checks in debug, else undefined. But, as we would have said in the 90s: to the extreme.
I'd only consider Zig (a) for fun (b) couldn't afford the GC (c) needed c-interop (d) had a team of superstars. There are probably better choices, just none that I'd pick.
I'd only consider Zig (a) for fun (b) couldn't afford the GC (c) needed c-interop (d) had a team of superstars. There are probably better choices, just none that I'd pick.
But, if you can't afford those constraint (e.g. non-shared memory)...
But, if you can't afford those constraint (e.g. non-shared memory)...
var buf: [1024]u8 = undefined;
var iovec: [1][]u8 = [_][]u8{&buf};
while (true) {
const n = try tls_client.reader.readVec(&iovec);
std.debug.print("{d} - {s}\n", .{n, buf[0..n]});
}
}
var buf: [1024]u8 = undefined;
var iovec: [1][]u8 = [_][]u8{&buf};
while (true) {
const n = try tls_client.reader.readVec(&iovec);
std.debug.print("{d} - {s}\n", .{n, buf[0..n]});
}
}
That's not how stream programming works.
That's not how stream programming works.
Not clear why fmt.formatIntBuf couldn't stick around and do that for me. If nothing else, at least deprecated and removed later.
This repeated for many functions.
Not clear why fmt.formatIntBuf couldn't stick around and do that for me. If nothing else, at least deprecated and removed later.
This repeated for many functions.