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
Ибраги́м
@NameKatt See this
Kat
Do you have it in PDF? I don't have anything that can display DOCX
Ибраги́м
My strategy is usually to just figure out each part of what I want rather than following a tutorial
Ah, shotgunning. Usually works for Spies and Soothsayers/fortunetellers.
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
Ибраги́м
It worked great for other languages
Until it doesn't. It's being half-baked.
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
Ибраги́м
I don't know JS
So it's Python then
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
Memes aside Arch is genuinely really good
Anonymous
tell me how to use please
Go search it on GitHub, it also has an example source code that will explain everything
Ибраги́м
In writing this sys info tool, I've hit a beautiful brick wall where I have to learn a language feature
> I've hit a beautiful brick wall where I have to learn a language feature How not to learn 101 esp for beginners
Kat
I finally feel like I'm actually learning for once
Ибраги́м
That is how I learn
Or how you get excited
Francisco
I finally feel like I'm actually learning for once
The moments I think I learn the most are by hitting problems I don't know how to solve
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?
Kat
I want to access data from a struct but that seems to be doing something else
Kat
Is that just the function declaration so you know what arguments to pass?
Ибраги́м
Is that just the function declaration so you know what arguments to pass?
Exactly why you need actual learning not just trying-to-do-stuff-learning
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?
Ибраги́м
I find it hard to concentrate on tutorials
You're NOT alone, but you have to face it at some point if u actually want to be really good at anything.
Ибраги́м
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
Ибраги́м
I do follow the official tutorials for new stuff that's added though
But u keep asking questions like this? "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?"
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
Ибраги́м
But I've written my little system info tool, I learned a bunch along the way
Congrats my little princess. Let's see your codes and throw you some icecream for your sefless efforts
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 ??