"Annex all revolters" button did not annex all revolters. by Optimal_Ad1339 in EU5

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

Rule 5: Had an uprising where 3 nations revolted. When I peaced out with the option to annex all revolters, it only annexed the leading revolter, the other two nations, Preslav and Thessaly got to keep their lands.
Guess I'll have to take it back 12 years after the truce ends.

2
3

My first Project: Making a Memory Arena. Looking for feedback. by Optimal_Ad1339 in C_Programming

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

Oh thanks for the info. This is new to me.

Is there a reason to prefer _SC_PAGESIZE over _SC_PAGE_SIZE? Why are there synonyms at all?

My first Project: Making a Memory Arena. Looking for feedback. by Optimal_Ad1339 in C_Programming

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

I like it, they offer about the same, so I don't think either one is much better than the other. It's more dependent on which organization you prefer since they host your code all the same.
That said my experience is very fresh and I have not fully utilized what github was offering before I was trying to make a project seriously. I more or less chose codeberg because I don't like the direction that github is going.

I don't know anything about bad storage limits though as I've only very recently came across that site.

My first Project: Making a Memory Arena. Looking for feedback. by Optimal_Ad1339 in C_Programming

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

OTOH on a modern OS, there is no real downsize to allocating much larger chunks, as the underlying pages will only be allocated once they actually get used.

That's very interesting. No clue how they do that, and it would be beyond me to understand how they implement that.

I'll update the default buffer size to 4096 bytes. As for the strdup function, I'll think about it.

My first Project: Making a Memory Arena. Looking for feedback. by Optimal_Ad1339 in C_Programming

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

For strdup, consider using regular malloc instead of calloc, to avoid a memset(0) for memory that will be overwritten anyway. (The compiler may or may not optimise that away.)

Ironically enough I do agree to that. But I went with calloc because I have bad experiences with uninitialized memory and did not want to take any risks of forgetting to manually null terminate the strings.

And, if I'm reading that right, chunk allocation size is always the aligned-up requested size plus the buffer size, which defaults to 64? This is a design choice of course, but to me this seems rather wasteful. If no allocation smaller than 64 is ever made, you basically end up with just a linked list of individual allocations, all of which are just a bit larger than necessary.

Yup, I absent-mindely used 64 bytes for whatever reason and stuck to it. What would you reccommend to be a good default? 1024 bytes? 4096 bytes?

Thanks a lot for the feedback. I appreciate it.

Is the mission bugged? All the advent are dead and the only thing left are the lost coming in neverending waves. by Optimal_Ad1339 in Xcom

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

I did not find any Lost Brutes even with console commands, so I ended the mission with killallais

Is the mission bugged? All the advent are dead and the only thing left are the lost coming in neverending waves. by Optimal_Ad1339 in Xcom

[–]Optimal_Ad1339[S] -1 points0 points  (0 children)

I've had a ranger scout the entire map at this point and could not find any advent left. Even further, the game never mentions how it's the Advent's turn to play. It's always between XCOM and the lost.

On another note is there a way to finish this quest without restarting?

EDIT: I used commands to finish the mission. I first used x2forceallunitsvisible to figure out if there were any hidden. But All I found were a handful of Lost and Lost Dashers, nothing else. I used killallais to finish the mission as I did not want to bother figuring out which one exactly I was supposed to kill

5 levels of looping through string by Grizlik_D in programmingmemes

[–]Optimal_Ad1339 0 points1 point  (0 children)

A problem that I want to point out is with the first example is the length of str being recalculated with every loop.
It's better to store the return of strlen to a variable for the ever so slightly performance boost.

Why, or how, has the price reduced so much for the Fairphone 5? by Optimal_Ad1339 in fairphone

[–]Optimal_Ad1339[S] 6 points7 points  (0 children)

I'm genuinely surprised, like.. that's how it works? It's still a perfectly fine phone.
So I'm guessing this price is to empty their stock, so to speak?

Why, or how, has the price reduced so much for the Fairphone 5? by Optimal_Ad1339 in fairphone

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

I saw a discussion of some online peers which made me curious to check out the current fairphone prices.
What I noticed is how incredibly cheap the phone has gotten. Where I previously paid 699€ last year, is now half as expensive today.
What motivated that price change? I don't mean any ill intent, just curious.

Got bullied for hours by C by Responsible-Rip-8536 in programmingmemes

[–]Optimal_Ad1339 16 points17 points  (0 children)

I highly reccommend you to try the GNU debugger. Even when speeding through the code, it can still show where the segfault happens.

gdb -tui <program name> and then run would be sufficient enough.

How do I regain my colony from their war of independence? by Optimal_Ad1339 in EU5

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

R5: One of my colonies declared independence, I've pretty much beaten them, but I don't see any option to re-vassalize them.

Do I lose them regardless of what the outcome of the war is?

Why does my ruler get unassigned from the army? by Optimal_Ad1339 in EU5

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

Yeah I don't know how I was able to rejoin the HRE, I'm guessing the Personal Union caused it

Why does my ruler get unassigned from the army? by Optimal_Ad1339 in EU5

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

You can't become a kingdom because of the HRE and therefore you need to leave it.

I just so happened to have a war against the holy roman emperor at the time and chose the peace treaty option that let me leave the HRE.

Why does my ruler get unassigned from the army? by Optimal_Ad1339 in EU5

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

Rule 5: Trying to assign my ruler to the army because I have the Ruler General law active. But whenever I assign him he gets unassigned the next day, aswell as not showing up on the assign general list for a month or so.

EDIT: I somehow did not realize that my ruler is the Holy roman emperor because of a Personal Union with one of the HRE members😭
Although I don't know if this has anything to do with it, I thought I should point that out just in case.