bouncer
← Back

Melkey · 6.9K views · 281 likes

Analysis Summary

20% Minimal Influence
mildmoderatesevere

“Be aware that the high-energy praise for the language ('cracked', 'brilliant') is a common stylistic choice to drive engagement rather than a neutral technical assessment.”

Transparency Transparent
Human Detected
98%

Signals

The content features a distinct personal voice with natural verbal stumbles, real-time coding demonstrations, and specific references to the creator's identity (Melkey). The transcript lacks the formulaic, perfectly polished structure typical of AI narration or script generation.

Natural Speech Patterns Transcript contains filler words ('uh', 'basically'), self-corrections ('subsubsubsubscriber'), and conversational tangents ('I don't know if you guys have noticed this').
Personal Branding and Context The creator uses their own handle 'Melkey' as a variable value in the code example and references their Twitch stream and specific learning journey.
Live Coding Logic The speaker explains a 'complicated sentence' they just said out loud and reacts to the code execution in real-time, showing human cognitive processing.

Worth Noting

Positive elements

  • This video provides a clear, hands-on demonstration of Zig's unique approach to method receivers and memory pointers, which is helpful for developers transitioning from higher-level languages.

Influence Dimensions

How are these scored?
About this analysis

Knowing about these techniques makes them visible, not powerless. The ones that work best on you are the ones that match beliefs you already hold.

This analysis is a tool for your own thinking — what you do with it is up to you.

Analyzed March 13, 2026 at 16:07 UTC Model google/gemini-3-flash-preview-20251217 Prompt Pack bouncer_influence_analyzer 2026-03-08a App Version 0.1.0
Transcript

Zigstrs are not just boring data containers. They're fast, they're explicit, and they're the backbone to some of the most powerful, cleanest code written in modern-day engineering. In the next few minutes, I'm going to show you how Zigg Strrus gives you complete control over memory layout, default methods, and even compile time magic without hiding anything from you. We're going to go over the learning zig programming language textbook, go into the details of everything Zigr related, and I'm going to break down everything I learned right now. So I have this example here which is taken from the chapter. Basically we create our new strruct called user. So our user strct and in this user strct it has four fields an id field a name field which is basically a string an email field which is basically a string but again these are list of const u8 because zig doesn't have a native string type and then it has the subscriber field which is a boolean. Now you may notice something interesting with this first function in it. And basically this is kind of the constructor or the initializer of our user strruct. So this is basically how we instantiate a brand new instance of our user struck. So this function in it takes in all the parameters that I mentioned before our ID, name, email and subscriber. It then returns the user struck as a return value and it returns user and we pass in the fields from the actual uh function arguments. And the thing to note here is actually this dot notation. So you can do dot id dotname.subsubsubsubscriber to uh go into the actual fields of the user strct within the curly braces. Okay. And then you can see here this constu we're describing our user.init and we're passing in those fields. So ID is one, the name is melky, the email is melky@gmail.com and the subscriber is true. And then if I have this try u.print name, this is a method or a function on the actual user strct itself. And the way ze handles it is very interesting and I think kind of brilliant. So if I go up into the actual function name function print name fn print name, it's defined within the curly braces of the strruct. So I don't know if you guys have noticed this when I was talking about the init function, but all these functions are declared within the actual closure or instantiation of the strruct itself. So we have this function print name and the first thing that I want to kind of highlight and and showcase your attention is this argument self user. Now if you come from Python or JavaScript you may be familiar with the self or this notation which is basically a reference to itself especially more popular with Python where it actually uses the self keyword uh verbatim. Now as I kind of just explained self is a reference to itself. So you can see here print name it takes this argument self which is this user type which is the strruct itself and then when we uh we call try standard out print we're calling self.name which is going to be the name field within the user strr. So when we call the u print name again u is our instance of melkey which is just our strruct our user struck when we call print name and we say self.name name it's going to be the value we passed in into the innit function which is now going to be the name field of the user struck. So if I go and I run zig build run you can see here that we are in fact printing milky as we expect it to do so. Now the thing is this doesn't have to be self. You can actually put this and then over here you can change this from self to this and if you save this and recompile it you're going to get the exact same value mel. And the reason for that is because Zigg is smart enough, the compiler and the language itself is smart enough that the it actually doesn't bind a keyword this or self or anything else to the actual reference to itself. Now, that was a pretty complicated sentence to say out loud. However, the thing to make it simple is the first parameter that you pass in into a function that's defined within the actual closure, the actual curly brace of the strct. The first argument you pass that is of type user will be in fact a reference to itself. And again, this doesn't have to be self. This doesn't have to be [snorts] this. This could be like me. You go here. You can change this uh name oops to me. Save. And again, if I recompile this milky now, what's interesting is what happens if you come into a situation where you have a function that's defined within your user struck, but it actually takes another user. Like let's say you want to print both names of two user pairs. What do you do then? Okay, so I went ahead and created a new function called print oh not print let's go print both names which the highlight here is it takes two arguments a me user and I kept it me just to make it concise to what I made before but again it's going to be self this whatever you want and it takes another argument which is other which is also a type user and you can see here I have two prints one is going to print meame and the other one's going to print the other usersame field but how will this work so here I'm going to make another user It's going to be user.init. We're going to put two. We're going to put del key here. We're going to put del key atgmail.com. And just to be different, let's go ahead and say that del key is uh whoops not fail. Uh false not a subscriber. Okay. So now if I do try you. The first argument I'm going to put here is you. And then the other one is going to be other you. All right. Save this. And if I go back and recompile it, we get an error. The reason why we got that first argument is because I was calling print name instead of print both names. So I change it to print both names. And when I run it again, you can see I'm still getting an error, but this time it says remember function expected one argument found two. And if we go back, you can see that print both names does in fact expect two arguments in the actual function definition. But when we call it, we're passing it two arguments. However, if I just change it to this and I save this and I run this, you can now see we get Meli and Delki which is what we expect. So the basics of what is happening here is again Zigg is intelligent enough to understand that if you are passing it an argument that is a reference type user that is that it is going to be an actual instance of itself. So ev every other following argument is going to be more more in the sense of what an actual argument is in the traditional sense of passing in arguments to functions. And just to demonstrate this even further, I have this function print random name which does not have that first argument me to a user type or whatever self this again whatever it could be and just takes a random argument. And if I go here and I try print random name fely and click zig run, you can see here print random name is not a member function. No field or member function named print random name in main do user. If I go back and add me, which will be a user type and save this, it says unused function parameter. So let's just go ahead and copy this and put me.name name and then save it like so. If I go back and run this, you can see here now we have melkkey, delkkey, felkey and mely. So this demonstrates all the functions that you defined as properties as methods of that struck need to have this first argument uh which is a selfargument a reference to itself to make them work as you would expect. So if you're coming from Go, another thing you may be thinking is how do you make some of these methods or actual strus public? And Zigg actually has the pub keyword just for that. So if you come from Go, you may think that capitalizing user and capitalizing these function names will make them publicly available from one module to another across your application. However, a lot of people don't really like that syntax or like that structure. Personally, I also don't really like it. It doesn't really make sense why one capital letter starting in the function name makes it publicly available but whatever Zigg makes it a little bit more explicit with the introduction of this pub keyword. So you can see here in the example they have which is very similar to the one we have they have just const user struck and then when they import that in a register.zig file you can see here that user is not marked public so it's undefined. So there's an error. So if you go back and just put the pub keyword in front of the const user, this now works fine because now this user truck is publicly available. And if you're key and you're probably thinking, well, does that make all the methods publicly available? No, it does not. It only makes the strruct publicly available in that module import. To make every single method publicly, each and every single one is going to have the pub function uh declaration. You can see here funk in it, it's not declared. So you have to add pub function in it pub function print name into each of the functions that you want to make publicly available in different module imports. And the ones you want to make private well you just don't add pub to it and you leave them like this. And now another part of this is changing the actual fields of an instantiated uh selfstruct object. So basically we've explored how to pass in that selfstruct object into method calls and we can call those fields pretty easily. But how do we change one of the fields within it? So the book goes about the strruct state and it basically shows you that to modify the strruct state you not only have to change the const but if you don't the actual instantiation so as we have it here constu user if we try to modify one of the fields in a change name function we're going to get an error because we're trying to change the field of a constant value which you cannot do in zig. So here I'll make a funk uh change underscore name. We'll take me user like this. And then we'll take new name. Okay. Con Whoops. Const u8 void. And here we'll just do uh me.name equals new name like so. And then I'll actually take this pasty here. Paste it here. Take the flush. Paste it here. And we'll put something like before we'll put me. Okay. And then here we'll just put oops after. Save this. And here unused local constant. If I try to do this, if I do try. It'll make the new name something like Stephen. Save this. go here and if I run this you can see here cannot assign to constant me.name new name but if I go up and change this from a constu to var and I saved it and I go back we got another error and this is because the user initiated struck is still a con. So here all we have to do is change this like so. And now you can see here before me and after Steven. So now this is a pointer to the user uh object the self object or me object as opposed to passing it by reference. So again if I just remove this save it zig build we get errors. If I just add it back which is now a pointer a reference. And you can see here if I try you print name and I run this again, you can see that before meliy after Steven and it's still Steven. Meaning that we've actually changed the value of name in our user struck to the actual reference memory using a pointer as opposed to passing it by reference. Okay, that's going to be it for this video. It's a bit of a longer one. Let me know if you guys enjoyed this series. Let me know in the comment section down below if you're also learning Zigg. And if you are enjoying this, if you are, subscribe, leave a comment, give a like. It helps a lot. And I'll see you guys in the next episode. Peace.

Video description

Lets keep learning the zig programming language 25% FEM Membership with course: https://frontendmasters.com/courses/complete-go/?code=MELKEY25&utm_source=melkey ### Twitch I stream live on Twitch every weekend Twitch : https://www.twitch.tv/melkey Zig structs are illegal These structs feel different... This is the BEST tutorial on structs in Zig #zig

© 2026 GrayBeam Technology Privacy v0.1.0 · ac93850 · 2026-04-03 22:43 UTC