Kat
I haven't had a linear progression, I've just learned little chunks at random points and then given up
Kat
I'm determined to write a sys info tool
Ибраги́м
On and off for a good while
What were you using in Learning? Learning materials do matter.
I had to learn again when I found out I've been learning it wrong.
Kat
I haven't really been using anything
Kat
My strategy is usually to just figure out each part of what I want rather than following a tutorial
Ибраги́м
Kat
Do you have it in PDF? I don't have anything that can display DOCX
Ибраги́м
Kat
It worked great for other languages
Kat
Maybe not C++
Kat
My brain has latched on to the idea of making a system info tool so I guess we're doing that
Kat
My fancy snake language knowledge is pretty damn good
Ибраги́м
Kat
I've written a shell, a window manager, a Userbot all kinds of neat stuff
Ибраги́м
Kat
I don't know JS
Kat
Oh you mean fancy snake language
Kat
Of course it's fancy snake language lol
Kat
My userbot is annoying
Ибраги́м
Plus use Arch BTW. Kids 101!
Kat
I use Arch btw
Ибраги́м
Your sins are innumerable
Kat
Lol
Kat
(Arch btw)
Kat
Okay I think I'm finally getting somwhere
Kat
In writing this sys info tool, I've hit a beautiful brick wall where I have to learn a language feature
Kat
> ./sysinfo
�6�wM%
Kat
Uh
Kat
What did I do
Kat
int main() {
utsname uname;
printf(uname.sysname);
return 0;
}
Francisco
Are you in Linux?
Kat
yep
Francisco
Mmm, I assume uname.sysname is a char*
Kat
Oh you have to call uname
Kat
I presume I tried to print empty data. The uname function updates the struct I thinl
Kat
ayyyy
Kat
I fixed it
Ибраги́м
Anonymous
Kat
C++
Ибраги́м
(Arch btw)
We don't use that in hare.
Kat
Kat
Memes aside Arch is genuinely really good
Kat
Ибраги́м
Kat
I finally feel like I'm actually learning for once
Anonymous
Kat
I'm a little confused by something though. I keep seeing this int getlogin_r(char *buf, size_t bufsize); What does it mean?
Anonymous
Kat
I want to access data from a struct but that seems to be doing something else
Kat
Kat
Is that just the function declaration so you know what arguments to pass?
Kat
This is how I've always learned programming
Kat
I find it hard to concentrate on tutorials
Kat
Okay so it seems like there are two styles of function calling. There's passing a pointer to a variable to a function and having the variable filled with the necessary data, and there's also having the data returned from the function. Is there a reason both are used?
Ибраги́м
A lot is hidden in the books
Kat
I'm good at fancy snake language and I learned this way
Kat
I do follow the official tutorials for new stuff that's added though
Ибраги́м
Kat
Yes?
Kat
It doesn't seem like there's a decent way to get the distro name. Every single distro stores it in a different way and distros aren't even required to have one at all
Kat
But I've written my little system info tool, I learned a bunch along the way
Ибраги́м
Kat
kat@comfy
OS: Linux 4.20.11-arch1-1-ARCH
Terminal: st-256color
Shell: /usr/bin/zsh
Kat
That works on some distros
Kat
I'd have to write quite a big function to catch all the edge cases
Ибраги́м
Kat
https://pastebin.com/x4BNVeBF
Kat
kat@comfy
OS: Linux 4.20.11-arch1-1-ARCH
Terminal: st-256color
Shell: /usr/bin/zsh
Anonymous
Any PUBG lover here ??