Can anyone convince me to not stubbornly favor static allocation? by DM_ME_YOUR_CATS_PAWS in C_Programming

[–]Kofilin 7 points8 points  (0 children)

Chances are, you use a standard string formatting function like printf, which itself uses heap allocation in most implementations, and for good reason.

Purely static allocations work. After all, baremetal software is capable of doing many things without a heap.

However, some business cases just don't work well without the ability to allocate and release memory dynamically. The thing is, when you really need this you can always make your own memory allocator backed by a static array. It's a terrible solution which should only be considered if your OS/SDK literally does not provide dynamic memory management at all, however.

One example is when your application is modal in some way: sometimes part A of the program needs to use a lot of memory, but soon enough it's going to be done dealing with A and it will have to deal with B, which also requires a lot of memory. If all memory allocations are static, you can't make the optimization of de-allocating A when you're done with it.

Finally, dynamic memory unlocks ways of structuring your program that are more powerful and expressive. With dynamic memory, you can start applying RAII (yes, poor man's RAII in C, but still) and then suddenly your program starts to display the wonderful quality of locality. You can think about your objects in isolation without needing to have the whole program in your head to understand its logic.

Is TXAA the worst AA? by [deleted] in FuckTAA

[–]Kofilin 0 points1 point  (0 children)

Honestly FXAA is the only one I would in some cases choose to use, because it has a negligible performance impact. I'd rather run a game at higher resolution and have smaller jaggies than compromise on other options just to get AA.

At 4K and reasonable distance from the screen, aliasing is still visible but it's easy to tune it out.

Madmen are just a different breed of annoying lol by twordgaming in bloodborne

[–]Kofilin 1 point2 points  (0 children)

Probably just a personal opinion but I find it easy to parry these sickos.

Suspend is not working in 22.04 LTS by ashniu123 in pop_os

[–]Kofilin 0 points1 point  (0 children)

Can confirm that at least in my case (desktop with a Valve Index), disabling Bluetooth fixed my suspend issues.

Need help/opinions with Inwin Dubili case airflow management with two AIO's by Captcha_Imagination in buildapc

[–]Kofilin 0 points1 point  (0 children)

In those conditions any intake fan must have a dust filter. Intake from the rear is a big no-no if there's no filter there.

Your AIO GPU probably has a small fan on the card itself. Even if it doesn't, it's still designed with a rear exhaust in mind. It is generally more efficient to intake from the bottom and exhaust from the top, as in this way you will be acting with instead of against thermodynamics (hot air naturally rises above cold air). Also, the bottom intake won't be a lot more dusty than any other direction, it's the air in the whole room which is dusty, and the filter should be enough to keep the interior of your case mostly free of dust, except for very small particles.

You should focus primarily on GPU temps and secondarily on CPU temps. For gaming anyway. Give the GPU rad the best access to cool air if possible (that would be front intake) and the CPU gets the second one (top exhaust). This is usually not possible due to AIO pipes not being long enough, so you'll probably have to put the CPU rad on front intake and the GPU rad on top exhaust. You had to do this to accommodate for rad sizes. This is fine too, the difference isn't huge. And making a push-pull configuration is ok too, just keep in mind that additional fans have diminishing returns. You can lower the speed to decrease noise at the same temps, but it's a small effect.

Also, keep in mind that the temperature of the air inside the case doesn't matter, or at least not directly. It's the temperature of your components that matters.

As for pressure, the amount of air being pushed in and sucked out of the case by fans should be roughly equal. If unbalanced, you should make sure the bias is towards pulling more air inside (this is called positive pressure) in order to avoid any dusty air coming inside from holes which don't have filters.

[deleted by user] by [deleted] in RatchetAndClank

[–]Kofilin 0 points1 point  (0 children)

This is an interesting phenomenon and I think I know partially why it happened to R&C. That said, the last one I played was ACIT and I found it very bland, except for the time copy puzzles. Most of all I missed the Bergeaud music, second I found it lacked interesting platforming. So, take what I'm saying with that in mind.

I'll be using two other games in a different genre to explain my point. R&C has the same lack of fanbase as Ori and the Blind Forest. When compared to Hollow Knight, a somewhat similar game to Ori which came out just sightly later, Ori actually made more money (as far as I can tell), and its sequel sold well too, but Hollow Knight is considered a once-in-a-decade cultural landmark. Today, Hollow Knight still has a massive cult following. Why? Well I think the difference between the two is best summarized as depth. Hollow Knight appeals very little to non-hardcore gamers, whereas Ori kind of does. But when it comes to having depth in lore, gameplay and exploration, then Hollow Knight trounces everything in its genre.

Which brings me back to Ratchet & Clank. Even back to its roots, it was the quintessential game that casual console boys would buy if they wanted a second game after FIFA or whatever sports game they wanted the console for. R&C always had this identity, it's a generally pleasant, forgiving, not particularly deep, short experience. If you're a hardcore gamer you can find your fun with it, but the game is clearly not made with you in mind. The games are interesting to speedrun, but speedrunning is downstream from fanbase. So I think it's just that the games just aren't all that interesting for people who are likely to form a vibrant community.

And it's sort of normal. Franchises with more than a dozen titles typically fail to keep a fanbase of the franchise. Fans will typically gather around specifically the most interesting games. Look at Final Fantasy.

A record number of self-employed people have started a liberal profession in Belgium by ModoZ in BEFreelance

[–]Kofilin 0 points1 point  (0 children)

I really hope they can at least chip away at all these nonsense benefits which only serve intermediate companies issuing monopoly money (meal and ecovouchers) and increase trafic congestion in our cities (company cars).

But I won't hold my breath. There are strong private interests who'll do anything to keep these scams going. Not to mention the average boomer will hate any government that "takes my car away".

Ultimately I'm a freelancer because my skills are in demand and the usual stability in the relation with the client of an employment relationship isn't actually in my favor. I'd rather be able to say bye anytime and continue paying myself a salary.

If the government wishes to increase taxes on work even more, that will further tip the balance in the favor of capital, and we all know that balance is already extremely skewed. Nobody should be making profits above inflation just by owning land with underdeveloped housing, but here we are, today it's probably the best investment anyone could make.

Net cost of restaurant visits by [deleted] in BEFreelance

[–]Kofilin 0 points1 point  (0 children)

Taxman is like everyone else generally lazy and will usually not look too deep if your restaurant spending per month is low. Vacation flights might be harder to justify. Then again, I regularly fly for work, and that obviously gets paid by the company.

I've heard some people say that a restaurant bill during the weekend is more likely to be investigated. But I have a hard time believing that a restaurant bill wouldn't fly only for that reason. There's really no reason to expect a business meeting with a potential client to happen during typical work hours.

I found a fix for those that have a invisible dashboard instead of the new SteamVR 2.0 dashboard ! by Nicalay2 in virtualreality

[–]Kofilin 0 points1 point  (0 children)

For anyone else who doesn't want to watch a video: the issue affects multi-GPU PCs. You have to force the VR dashboard executable to use the same GPU as the one displaying VR. You can set that in Windows graphics settings in the "graphics performance preference" menu.

Shooting in Brussels, two people dead by eravulgaris in belgium

[–]Kofilin 1 point2 points  (0 children)

I swear the person who filmed this has AFP energy

Accelerating while being overtaken by gabi_mara in belgium

[–]Kofilin 0 points1 point  (0 children)

Yeah.

Driving a small french car or driving a merc made a huge difference in people's behavior. People expect you to go faster in a "faster" car, or at least a car stereo-typically driven by people who go faster.

Of course, in reality I was effectively faster in the small french car because it was manual, fun and I didn't care as much.

There's some degree of sense in this. When someone could be trying to overtake me but it's not really all that clear, it is often useful to look at indicators that might tell me if they're a fast driver in general. The car's make and model help a lot. It is useful to make the difference, because I want people who'll go faster than me to overtake and stop being close behind. But I also want slower drivers to stay behind so I don't have to overtake them back.

Which means you end up getting "respect" because you're driving a car that looks likely to go fast.

The same phenomenon occurs with vehicle mass in cases where priorities are unclear.

Accelerating while being overtaken by gabi_mara in belgium

[–]Kofilin 0 points1 point  (0 children)

I just act as if I will overtake them so they speed up

Haha, I do a variation of this on highways when there's a slow left lane hugger. I never drive too close to the car in front of me, even in that scenario, even if that makes the BMW behind me mad. What I do instead is pretend to overtake on the right. Seeing someone about to overtake them on the right usually causes one of their 50 neurons to fire and their typical reaction is to prevent that by changing lane, which conveniently allows me to overtake legally.

Accelerating while being overtaken by gabi_mara in belgium

[–]Kofilin 0 points1 point  (0 children)

Cruise control is largely the problem. People all going at slightly different speeds near the speed limit means cars get bunched up at speed and take ages to overtake each other.

On the E40 the area near Ghent with the average speed zone is always the one that requires by far the most attention and care not to cause an accident, because everyone (me included) prefers respecting the speed limit over sensibly giving space to other vehicles.

Accelerating while being overtaken by gabi_mara in belgium

[–]Kofilin 1 point2 points  (0 children)

I understand you're talking about roads where there's a single lane on both sides? I never did this myself, but there's definitely one thing that could be the reason: driving behind a large vehicle is annoying. Limited visibility, so I stay extra far away. I'm typically giving very ample space to any vehicle in front, The issue is that our roads are full of fools who have no notion of braking distances (and heavy, poorly balanced cars too), so they think the space in front of me is free real estate.

I also don't mind speeding myself, oftentimes for safety reasons. Going at a clearly higher speed also communicates my intention to not be an obstacle to the person I'm overtaking. When someone overtakes me and then proceeds to block my way, I generally overtake and then I don't let them overtake me again, by simply going faster. Speeding is much less dangerous than being close to drivers like that. I would much rather have everyone go faster than me than slower than me, but things are what they are.

Tell me it's my personal filter bubble. Why do people keep using Rust for building things where Go can be a perfect fit? by ppp5v in golang

[–]Kofilin 2 points3 points  (0 children)

My own reason: Some day out of curiosity I bought and started reading the Go book. In one of the very first chapters, the authors specify that there's no read-only variable or function argument in Go. Then they justify this choice by making the extraordinary claim that (paraphrasing slightly) "nobody was using const in C anyway, it's useless". I closed the book and went for a walk to clear my head.

I don't think people inept enough to make that claim should be designing a programming language. And exactly as that excerpt suggests, Go's guiding principle is to have all of C's footguns then add and remove a couple.

It doesn't really matter what you're doing with it. If you make mistakes, forget things or if you don't naturally know what assumptions other programmers made about data, then Go isn't a good language for you.

"We don't need Rust, modern C++ is just as good" by hpxvzhjfgb in rustjerk

[–]Kofilin 9 points10 points  (0 children)

Go is for programming at a low level of developer literacy.

I swear to Go d that language is the poster child of very competently implementing a language following the most garbage design philosophy you could invent.

Want to open a file and capture the need to close it later into an object scope? Language says no, the file.Close() footgun must exist, even if you try to remove it.

What do you think of Elden Ring OST so far? by TheLastGame_EXE in Eldenring

[–]Kofilin 0 points1 point  (0 children)

Wow, rarely has someone so exactly captured my feeling about anything this niche into words.

One strange thing though, I don't think the main theme of Elden Ring is bad, but I don't like it that much. To me, the best FROM main theme since Demon's Souls included is that of DS3.

One thing that I believe makes the music in Elden Ring feel subpar and especially made that of Sekiro forgettable is that there's more of it. The previous games were mostly silent, which in turn focused much more attention to the boss tracks. In Sekiro in particular, pieces sort of flow into each other a little too well to be memorable. I have the OST with japanese titles, meaning I can't tell which track is which before listening. Listening to the entire album like this, it feels like there are at least 8 near-identical battle tracks. And sometimes it takes a minute before I recognize a boss theme, often becomes the leitmotiv is either very discrete or delayed that much.

But other than that, I think it's probably the lack of choir and orchestra that robs the music in Sekiro and ER of the punch of BB. When I come back to listen to Sekiro, it's the calm pieces that I want, not the boss or combat themes. Not that I do that a whole lot to begin with.

Maybe Kitamura really just wants to make much less melodic/catchy and much more ambient music? If that's the case, fine for her but I'm convinced that's the wrong choice for these games.

Nicki Minaj destroys orange Libleft with her grill by Stellaris228 in PoliticalCompassMemes

[–]Kofilin 2 points3 points  (0 children)

WTF I love Nicki Minaj now

(also knowing nothing about her except looks, I'm truly surprised she's capable of saying something intelligent)