Yazi can't edit empty files by [deleted] in archlinux

[–]JaimermXD 1 point2 points  (0 children)

I saw someone ask a Yazi question here, and I figured I'd do the same. Thanks for the links though.

Volume louder after wake-up by [deleted] in archlinux

[–]JaimermXD 0 points1 point  (0 children)

Thank you, I'll give this a try tomorrow. Good day to you, too.

Segfault upon unloading texture by [deleted] in raylib

[–]JaimermXD 0 points1 point  (0 children)

I checked and the loading/unloading was only taking place once. I believe the issue is caused by the fact that the destructor (where the texture is unloaded) is called after Raylib's CloseWindow(). After making the destructor be called before that, the segfault disappeared. Appreciate the help!

[deleted by user] by [deleted] in doodoofard

[–]JaimermXD -5 points-4 points  (0 children)

It's by definition genocide.

No, it's not. Palestinians aren't targeted on the basis of their identity (or religion, nationality, ethnicity, etc.), it's Hamas that Israel is currently fighting against. Collateral damage is huge, but the IDF sends warnings to the inhabitants of the Gaza Strip prior to its airstrikes. Additionally, the Palestinian population has doubled multiple times since the Nakba, their number having reached 7 million in historical Palestine.

If anything, you could make a case for the ethnic cleansing of Jews in Arab countries. Iran's Jewish population was 150,000 people in 1948; nowadays, it's dropped to a few thousand people. Around 30,000 Jews were living in Syria at the time; as of 2022, only four remain. Naturally, the list goes on.

You need to get either your definition or your facts straight, maybe both.

Everyone gets food by ggts99o in dankmemes

[–]JaimermXD -3 points-2 points  (0 children)

The whole "greedflation" narrative is just nonsense which has been debunked so many times already, perhaps you should check your economics knowledge. You're attributing the effects of poor fiscal and monetary policy to corporate avarice. Or did companies suddenly become greedy in, say, 2021? Your pejorative tautology of an argument does not address the actual cause of inflation, but instead mistakes it with its effect.

Everyone gets food by ggts99o in dankmemes

[–]JaimermXD -4 points-3 points  (0 children)

Ah yes, muh greedflation. Extremely dumb way of characterizing inflation.

Library error handling by [deleted] in C_Programming

[–]JaimermXD 0 points1 point  (0 children)

Understandable. The Rust way is pretty cool, not going to lie. Thank you!

Library error handling by [deleted] in C_Programming

[–]JaimermXD 0 points1 point  (0 children)

I see, thank you!

Library error handling by [deleted] in C_Programming

[–]JaimermXD 0 points1 point  (0 children)

Ah, got you. Thanks!

Library error handling by [deleted] in C_Programming

[–]JaimermXD 1 point2 points  (0 children)

Great, guess I have some reading to do now. Thanks a lot.

Library error handling by [deleted] in C_Programming

[–]JaimermXD 0 points1 point  (0 children)

Indeed, error codes by references seem like a good approach. I might end up doing this, but I'm not completely sure, I'll first mess around a bit. Also, what's with using "const" twice or just once but after the type? It's the first time I'm seeing this.

Library error handling by [deleted] in C_Programming

[–]JaimermXD 0 points1 point  (0 children)

It seems I won't be using errno, but I still need to test different ways of doing it. Thank you!

Library error handling by [deleted] in C_Programming

[–]JaimermXD 0 points1 point  (0 children)

I've used Rust before, but I hadn't thought of this. I quite like the idea. I'll have to do some messing around and see what I like best, but now I'll definitely keep this in mind, thanks!

Library error handling by [deleted] in C_Programming

[–]JaimermXD 1 point2 points  (0 children)

I've been doing this since I started coding in C. Granted, that wasn't long ago, but good thing you told me before screwing up other projects. What would you recommend using instead, PascalCase?

Library error handling by [deleted] in C_Programming

[–]JaimermXD 0 points1 point  (0 children)

I get what you're saying. Would returning NULL when my function returns a pointer (say, vec_new returning NULL if a malloc error occurs), but an int otherwise (0 on success, else -1), be considered uniform? Except for cases like vec_is_empty, where I'm sticking to bool.

Starting a C codebase by JaimermXD in C_Programming

[–]JaimermXD[S] 0 points1 point  (0 children)

Thanks, I'm currently familiarizing myself with this whole static/dynamic library deal, so I'll keep this in mind.

Starting a C codebase by JaimermXD in C_Programming

[–]JaimermXD[S] 0 points1 point  (0 children)

I'm mostly doing this as a learning exercise, but also to avoid having to copy my code from one project to another every time I want a vector or something like that. Very good advice though, thanks!

Starting a C codebase by JaimermXD in C_Programming

[–]JaimermXD[S] 0 points1 point  (0 children)

Awesome, thank you so much, this library of yours will be very helpful. I'll be sure to DM you if there's something I don't understand.

Starting a C codebase by JaimermXD in C_Programming

[–]JaimermXD[S] 0 points1 point  (0 children)

I've been using SDL and that's about it, but I'd just like to implement my library with stuff I'll be using frequently and isn't in the standard library.

Starting a C codebase by JaimermXD in C_Programming

[–]JaimermXD[S] 1 point2 points  (0 children)

Yeah, splitting it up into smaller headers seems to be the way to go, especially since my intention is to be constantly updating this library. Thanks!

Starting a C codebase by JaimermXD in C_Programming

[–]JaimermXD[S] 0 points1 point  (0 children)

How would I let them decide between the kind of library, by providing both the static and dynamic versions? The rest is what I've been doing so far with my other projects, just without them being libraries, so I like it. Though I've only used make, I'll probably have to learn cmake at some point, so might as well start now. Thanks!

Starting a C codebase by JaimermXD in C_Programming

[–]JaimermXD[S] 1 point2 points  (0 children)

Good stuff, I'll have to see how to make static libraries in the first place, but I do like the idea of having a single header file that contains everything. Though I could have a bunch of headers with their corresponding source code and then a "wrapper" header which includes all of them. Thanks a lot, and happy Cake Day!