Thoughts

mental health break ,./'"**^^$_---
Okay, I figured it out. I figured out how to read from standard-in in Zig
``` var input = std.BoundedArray(u8, 128).init(0) catch unreachable; _ = stdin.streamUntilDelimiter(input.writer(), '\n', input.capacity()) catch unreachable; const got: []u8 = input.slice(); std.log.debug("{s}", .{ got }); ``` My biggest problem was actually not understanding the difference between the length and the capacity of my BoundedArray. It's just not well documented. Oh, and obviously I know that Zig expects explicit allocations and I don't expect it to support a Ruby-style `read()`. It would be nice if streamUntilDelimiter took a &BoundedArray and returned a []u8. Or took an allocator and returned a []u8.
Link 8:18 a.m. Feb 22, 2024 UTC-5