I really like these new videos that use Zig on small single episode projects instead of just explaining Zig syntax or the standard lib. Don't get me wrong, I like the explainers, but I want to know how to put the pieces together to make something useful. Live coding videos are fine, but they're typically very long. These are short, to the point videos that still get something done with Zig which is a niche that afaik is unique to this channel. Maybe you could also do videos on parts of larger projects, that are still discrete and self-contained, like how to process command-line arguments, or how to parse JSON. I dunno it's just a thought. Edit: I mean to do these things for real (In anger.) and not just using the libraries themselves... Maybe a simple CSV reader would be a better project, seeing that there is no std library for that.
Thank you. Can you suggest how to study zig in effectively? I would like to know if reviewing repos help or make it worse? I don't have low level background, only Python, Typescript.
I would recommend looking at the standard library source code in the Zig repo itself. Data structures like ArrayList, HashMap, and Bitset will give you a feel of how Zig code is written, tested, and how its peculiar allocation paradigm is used. Also, reading the Language Reference is very helpful in learning the language for the first time and as a reference later on.
If you implement the format method as per the std.fmt instructions to provide for formatting of Node and Trie, you can then print the trie using the normal print functions and the Trie's format method would traverse the tree (like in the lookup method) and call the Node's format method on its way down. I think I've implemented this format method for other structs in previous videos. If I have a chance, I'll update the Trie code to add this funtionality.
I really like these new videos that use Zig on small single episode projects instead of just explaining Zig syntax or the standard lib. Don't get me wrong, I like the explainers, but I want to know how to put the pieces together to make something useful. Live coding videos are fine, but they're typically very long. These are short, to the point videos that still get something done with Zig which is a niche that afaik is unique to this channel.
Maybe you could also do videos on parts of larger projects, that are still discrete and self-contained, like how to process command-line arguments, or how to parse JSON. I dunno it's just a thought. Edit: I mean to do these things for real (In anger.) and not just using the libraries themselves... Maybe a simple CSV reader would be a better project, seeing that there is no std library for that.
Those are some great suggestions and I will definitely take them into consideration for upcoming episodes. Thanks a lot for sharing your ideas.
Thank you. Can you suggest how to study zig in effectively? I would like to know if reviewing repos help or make it worse? I don't have low level background, only Python, Typescript.
I would recommend looking at the standard library source code in the Zig repo itself. Data structures like ArrayList, HashMap, and Bitset will give you a feel of how Zig code is written, tested, and how its peculiar allocation paradigm is used. Also, reading the Language Reference is very helpful in learning the language for the first time and as a reference later on.
how would one print out the nodes in the trie? I can't seem to get the syntax quite right 😞
If you implement the format method as per the std.fmt instructions to provide for formatting of Node and Trie, you can then print the trie using the normal print functions and the Trie's format method would traverse the tree (like in the lookup method) and call the Node's format method on its way down. I think I've implemented this format method for other structs in previous videos. If I have a chance, I'll update the Trie code to add this funtionality.