- parsing command line arguments
- logging (loglevels, files, stdout/stderr, etc.)
- talking to a restful service via HTTP
Thanks in advance!
https://ziglearn.org/chapter-2/#iterators
I don't think that going further into parsing is in scope. std.log is something that definitely needs to be covered. HTTP, I'm not sure about as it requires a lot of extra machinery outside of the standard library and these things aren't mature yet.
https://ziglang.org/documentation/master/
And the (fairly new, and still a bit thin) std library documentation
https://ziglang.org/documentation/master/std/#std
...gives a good enough rundown to start writing real-world code if you're coming from another C-like programming language.
Zig's std lib documentation will keep getting better. In the meantime, the std lib code itself is so well written, it's worth a read, even coming from another language, and even if you have no intention to learn Zig. I found it easy to read and was impressed by the code structure and quality of the design.
Of course, that's not to suggest that code is documentation, but I've learned alot about improving my programming in general, just by reading Zig's std lib.
I love this quote, adding it to my quote list; is it from something?
Zig the language, and Zig the std lib have two different sets of documentation. The former is really, really good, and I wouldn't say lacking at all, considering Zig is still pre-1.0. Take a look here: https://ziglang.org/documentation/master/
It's the Zig std lib auto-generated documentation (i.e. I/O things like epoll and io_uring and much more) that is incomplete, and to which most of the "documentation is lacking" and "read the std lib source" comments relate.
It's only if you want to know how to use Zig for things like I/O, then you'll need to read the std lib source (and the growing number of blog posts and talks etc), in the same way that K&R is also not always helpful as a guide for these things (and others) today in C.
But the Zig language itself is pretty easy to grok from the excellent language documentation and examples already linked to.
Bonus question: I have a function doing a transformation on this array, what is the way to duplicate this array