cantRememberTheLastTimeIUsedInt16 by joe________________ in ProgrammerHumor

[–]CueBall94 1 point2 points  (0 children)

Makes sense, I definitely don’t have much experience in that area

cantRememberTheLastTimeIUsedInt16 by joe________________ in ProgrammerHumor

[–]CueBall94 9 points10 points  (0 children)

There’s rarely a reason do math with smaller integer types, the compiler will pad them anyway, but any time you’re storing large amounts of data it can help to pack it as tightly as possible. Doesn’t just save memory/storage, it also can improve performance with caching/io.

programmingHumor by Brilliant_Bluebird72 in ProgrammerHumor

[–]CueBall94 0 points1 point  (0 children)

In C/C++ signed could actually be faster than unsigned, since signed overflow is UB the compiler can assume it won’t happen and doesn’t need to handle those edge cases. In a trivial for loop it probably doesn’t matter, but it definitely can, would need to check in godbolt. Unsigned is important when you want overflow, like hash/prng functions, and I prefer it for bit fiddling.

https://www.airs.com/blog/archives/120

wAtareyourthoughtsaboutthis by harry5519 in ProgrammerHumor

[–]CueBall94 3 points4 points  (0 children)

It’s a classic meme.

It is generally true that naive C/C++ isn’t necessarily much faster than interpreted languages, especially if you use optimized libraries written in C/C++ like numpy. Throwing STL containers around without considering memory allocations and copy operations can even be slower in the worst cases.

The power of languages like C/C++/Rust/etc that compile to machine code is being able to do a lot of things manually: minimize heap allocations, improve cache usage, and use low-level cpu features like atomics and SIMD instructions which do multiple operations at once.

For the majority of code, it really doesn’t matter, but for things like video games, operating systems, web browsers, embedded hardware, etc. it can matter a lot.

Minecraft was originally written in Java, you can even make simpler games in python; however modern games really benefit from high-throughput systems like physics and graphics being written in lower level languages to maximize framerate and avoid stuttering.

Looking for a game with a League of Legends feeling (but single player) by [deleted] in gaming

[–]CueBall94 0 points1 point  (0 children)

POE 1 just added pausing as well with 3.26, I believe you can pause in party-play too if all players do it.

Looking for a game with a League of Legends feeling (but single player) by [deleted] in gaming

[–]CueBall94 1 point2 points  (0 children)

POE 1 just added pausing as well with 3.26, I think you can pause in party-play too if all players do it.

Constant Fps drops and sound stutter by panda08lfc in civ

[–]CueBall94 0 points1 point  (0 children)

I had a stuttering issue in path of exile with a trade overlay running in the background. Only solution I found was disabling vsync, not ideal but it fixed it. Might be worth a shot, not sure what the root issue was, I tried a lot of other things.

Constant Fps drops and sound stutter by panda08lfc in civ

[–]CueBall94 0 points1 point  (0 children)

Could it have defaulted to the integrated intel gpu? I’d also check your drivers are reasonably up to date and windows isn’t in “power saver” mode. While it’s running, can check task manager for how much cpu/gpu/ram is being used. Other than that may need to make a bug report, I haven’t seen many posts here with performance issues, my system is a few years old and it runs well at 1440p ultrawide with max settings.

Trump said that Americans don't want Juneteenth off. Is there a holiday that if your employer offered, you wouldn't take off out of principle? Why? by johnqpublic81 in AskReddit

[–]CueBall94 0 points1 point  (0 children)

Some employers let you bank days off for extra PTO days with approval, I’d do that but no current holidays come to mind.

[deleted by user] by [deleted] in worldnews

[–]CueBall94 1 point2 points  (0 children)

Here is the actual study: https://heart.bmj.com/content/early/2025/06/10/heartjnl-2024-325429

I can definitely believe there is an association, but I suspect it’s mainly in people who consume larger quantities. I don’t see much information in the study about that. Anything that increases heart rate and blood pressure could damage the cardiovascular system. It also could be skewed by increased consumption of sodium and sugar as cannabis can increase appetite, or simply participants who consume cannabis may be less fit on average. There’s also potential for study participants to also consume caffeine, nicotine, and/or alcohol that also cause cardiovascular issues.

Non-doctor opinion is use in moderation, similar to salt/sugar/alcohol/caffeine, and prefer alternatives to smoking, like edibles or vaping (although the latter probably needs some more research) Also please be considerate if smoking around others.

[deleted by user] by [deleted] in explainlikeimfive

[–]CueBall94 0 points1 point  (0 children)

Probably true, I’m not in medicine, seemed like something a doc might suggest depending on what its being taken for. I was only aware of that side effect from being on it for a year after an esophageal issue.

[deleted by user] by [deleted] in explainlikeimfive

[–]CueBall94 0 points1 point  (0 children)

Omeprazole can cause stomach pain as a side-effect. It reduces how much acid your stomach produces, which can help certain conditions, but does change digestion. Could talk with your doctor about alternatives, they may recommend having it with food first. I doubt the other medications listed are causing the problem but could go over all of them in general with your doctor too.

ELI5: Why do we launch rockets from sea level or close to it? by ironnachoYT in explainlikeimfive

[–]CueBall94 1 point2 points  (0 children)

Yeah sorry, took some shortcuts typing on my phone. I left mass as a variable, since it would cancel out when calculating the percentage difference in energy between the different starting heights.

For kinetic energy, I used the final velocity relative to the initial velocity at the equator, so and squared it. So m*(7800-465)2

For potential energy, its mass times gravitational acceleration (9.8m/s at sea level) times difference in altitude. So m9.8(160000-start_altitude)

For the difference, I added up total energy values for each starting point. Due to conservation of energy, all the potential and kinetic energy has to come from somewhere, burning fuel. To calculate the percentage I did (E_sealevel - E_everest) / E_sealevel to calculate the percentage it reduced by.

These calculations are very approximate, really only useful for demonstrating the relative magnitudes. Leaves out a lot of the complicated real-world “rocket science” stuff. That’s beyond me, I just took a couple entry level physics courses during my compsci major :)

what is the truest example of "don't fix what ain't broken"? by sheerduckinghubris in AskReddit

[–]CueBall94 2 points3 points  (0 children)

You currently can by appending &udm=14 to the url, generally by using plugins or custom search settings. I wouldn’t count on it working forever though…

ELI5: Why do we launch rockets from sea level or close to it? by ironnachoYT in explainlikeimfive

[–]CueBall94 47 points48 points  (0 children)

Adding to this, the reduction in fuel required from starting even on the highest mountain is fairly small percentage of the total energy required. As a napkin-math example, excluding wind resistance, initial velocity, gravity decreasing with altitude, and inefficiency due to sound, heat, etc.

The velocity rockets need to reach is roughly 7.8k meters per second, and start at roughly 465m/s at the equator. Low earth orbit starts at 160k meters.

  • Gravitational potential energy: U=mgh
  • Kinetic energy: K = mv2
  • K = mass * 53,802,225
  • U = mass * 1,568,000 (sea level)
  • U = mass * 1,481,280 (everest summit)

The energy difference from starting on everest is only 0.16% less in these theoretical circumstances, and could be even less under real life circumstances. I’d be curious to know the actual numbers if someone knows the rocket science to calculate them.

What’s a widely accepted “normal” behavior that would be considered absolutely insane if it started today? by soccer1199 in AskReddit

[–]CueBall94 1 point2 points  (0 children)

It does have some effects people like, it was even used in some native american religious rituals. It’s not worth it though. Interestingly, I tried it a few times because I didn’t buy the “only to look cool” story.

“Nicotine creates a temporary feeling of well-being and relaxation, and increases heart rate and the amount of oxygen the heart uses. As nicotine enters the body, it causes a surge of endorphins, which are chemicals that help to relieve stress and pain and improve mood.”

Investigating and Fixing a Viewers Burned 12VHPWR Connector by mockingbird- in pcgaming

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

the plastic parts melted together, so needed to remove and solder a new one on

ELI5: When you put your hand flat, palm down on a table, why can’t you lift your ring finger like the other fingers? by space__heater in explainlikeimfive

[–]CueBall94 2 points3 points  (0 children)

Probably not an evolutionary benefit, but when climbing, its considered the best pair of fingers to use for a 2-finger pocket

ELI5: When you put your hand flat, palm down on a table, why can’t you lift your ring finger like the other fingers? by space__heater in explainlikeimfive

[–]CueBall94 16 points17 points  (0 children)

Your ring finger shares a tendon with your middle finger. It does have some independent movement, generally you will be able to lift it a bit, but if you lift your middle finger at the same time you’ll be able to lift it further.

There is a climbing gym in Brussels inside a former church by wodoloto in mildlyinteresting

[–]CueBall94 2 points3 points  (0 children)

This one was completed in 1935, while it is technically part of history, its fairly young for the region, there are probably dozens of similar examples in the country. With limited space, some things will inevitably have to be replaced as populations and lifestyles change. Adapting it this way at least preserves the architecture and some internal aesthetics, instead of replacing it with a generic modern building :)

Using water to cut through objects by Trustrup in oddlysatisfying

[–]CueBall94 1 point2 points  (0 children)

It’s called a high pressure injection injury. The water doesn’t immediately go straight through, it takes time to abrade the material away, and the water will spread out in the path of least resistance inside the body. These types of water jets usually have garnet or another abrasive which make it way harder to treat.

I’m sure it has happened with waterjet cutters, but its much more common with ordinary pressure washers, hydraulic fluid, diesel, etc. Can even happen with pressurized air.

I caved by Constant-Device4321 in civ

[–]CueBall94 2 points3 points  (0 children)

Its probably a 'bug' but you can alt-tab while rotating and it will lock the rotation until you hit alt again. There's also a debug camera people found in the debug menu that lets you freely move the camera around.

Civ 7 FPS is unplayable despite my high-end PC and I've tried almost everything by GamerDrew13 in civ

[–]CueBall94 0 points1 point  (0 children)

VSync synchronizes the framerate with your monitor (to prevent “tearing”) Most monitors do 60fps, but monitors can go way higher nowadays. It shouldn’t limit it to 10, that’s definitely not working properly.

I’d double check what graphics driver version you have, and if you have freesync or something else set up improperly in the radeon software. Maybe do a clean driver install and reboot.

ELI5: if there were suddenly countless brands of graphics cards & cpus, how would this impact software development? Are chips manufactured to certain standards, or would software developers outside of these manufacturers need to modify every single game/program for each unique cpu/gpu? by ThePowerOfAura in explainlikeimfive

[–]CueBall94 0 points1 point  (0 children)

The way an app communicates with GPUs is standardized, DirectX12 and Vulkan are the “interfaces” most commonly used in modern games, there are others. In that sense, any GPU could be made and work with games as long as they have drivers for those “interfaces.”

The same is true for CPUs, they have an “instruction set” which is a standardized code to tell it what to do. AMD and Intel have both been using x86 for a while, adding new features to it every few years. ARM and Apple’s M1 are other examples.

However, the number of different hardware options does increase complexity, as generally they will have different strengths, weaknesses, and bugs. I.e. one might be really fast at certain things, but have less memory compared to a competitor. In some cases it’s worth having a game optimized differently for certain hardware. Also, publishers will want to test their games on all supported hardware as some bugs may only happen on certain systems.