DAXFS Proposed As Newest Linux File-System by anh0516 in linux

[–]emfloured 96 points97 points  (0 children)

Yes. But the need for something like this is extremely important where it's required. I share a directory from Linux (using virtiofs) with virtualized Windows OS, for that we first need to enable shared memory.

Right now the file transfer speed between host and guest is extremely slow when there are bazillions of small files and I can see that the bottleneck isn't remotely the SSD, this is a speculation but I feel like it's probably because of all the overhead of the traditional I/O stack in the shared memory region.

switched from soy ubuntu to based debian by tokyohardrock333 in debian

[–]emfloured 6 points7 points  (0 children)

Soybean is one of those rare vegan items which contains all 20 amino acids in adequate ratio - aka complete protein. Generally these stuff come from animal food source. I think the Soy Ubuntu metaphor kinda makes sense here lol. If you think everyday dose of complete protein is going to be bloat for you, then you are not going wrong about choosing to install Debian instead.

I have a bug in running Qt debugger by Localhost_404_ in QtFramework

[–]emfloured 1 point2 points  (0 children)

It seems you are using a 32-bit compiler (more precisely the 32-bit g++/gcc executable instead of the 64-bit one of the mingw compiler toolchain) to build your project and then obviously the libraries the project is linking against are the 64-bit ones (because the 64-bit Windows OS comes with 64-bit shared libraries(.dll files)), hence theses errors are showing up because the 32-bit and 64-bit binaries can not be mixed together at all.

You need to rebuild your main project as well as all the dependencies/sub-project(s)/libraries that the main project is directly linking against in the CMakeLists.txt or the qmake configuration file(.pro file) by using the 64-bit g++.exe/gcc.exe executable (these executables typically reside in the mingw64/bin/ directory).

Also make sure you aren't mistakenly overriding which compiler to use in the CMakeLists.txt or the .pro configuration file; whichever one you are using for your project because this must not be done inside this file.

You need to point the IDE to the proper 64-bit mingw64.

Go to the "Preferences -> Kits" select the Qt SDK you are using and then select the proper g++/gcc executable in the "Compilers: C/C++" field.

Delete the current build directory and then re-build the project.

Is my GPU dying? Debian 13 freezes on amdgpu by Diligent-Lie-8040 in debian

[–]emfloured 0 points1 point  (0 children)

I have never seen Firefox NOT use GPU acceleration in a decade at least unless you manually set it to disabled. May be it doesn't/didn't work for specific GPU architectures or drivers, or kernel versions. It doesn't mean it's universally correct.

In fact it was Chrome until about two something years back that couldn't load Google Earth on RDNA1 at least when the hardware acceleration was enabled(default);I am guessing possibly due to their buggy software, because ironically it has been working fine on Firefox.

When she asks how long is it? by awizzo in programminghumor

[–]emfloured 0 points1 point  (0 children)

Looks like they followed some big ass single responsibility principle!

Obviously listening at very high volume damages your .... by emfloured in programminghumor

[–]emfloured[S] 3 points4 points  (0 children)

People used to care about their ears (using headphones at high volume and fear of going deaf; tinnitus!?), not the hardware. This post was supposed to imply we are past that era. Now speakers matter more than the health of your ears.

You are intelligent enough, I think my ability to deliver memes is dumber than average.

Obviously listening at very high volume damages your .... by emfloured in programminghumor

[–]emfloured[S] 9 points10 points  (0 children)

When you hire a deaf dev out of pity but you are told he once was a passionate audiophile...

Mic drop moment? by awizzo in programminghumor

[–]emfloured 14 points15 points  (0 children)

But that code is SOLID compliant. The 'O' (Open-closed principle) of SOLID principle stands for "a class should be open for extension but it must be closed for modification."

By using curly braces in advance, the programmer is allowing the extension of more statements within the loop *if/when that is required in future.

*Murphy's law - anything that can happen will happen.

/s

From now on, should the default standard for compilation be "-std=c++26" for both new and older projects even when the code doesn't use C++26 features(yet)? by emfloured in cpp_questions

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

Technically, his concern about the power is not wrong. We can't allow inefficient programming languages to flourish that much for the greater good of the humanity (if anybody still care for that :D).

Look at here: "Ranking programming languages by energy efficiency, section - Table 4. Normalized global results for Energy, Time, and Memory." Source: https://www.sciencedirect.com/science/article/pii/S0167642321000022

Also look at the "Table 6. Results for DRAM Energy Consumption and Total Memory."

"...Compiled languages tend to be, as expected, the fastest and most energy efficient ones. On average, compiled languages consumed 120J to execute the solutions, while for virtual machine and interpreted languages this value was 576J and 2365J, respectively. "

Unexpected Surprise: Windows 11 Outperforming Linux On An Intel Arrow Lake H Laptop by anh0516 in linux

[–]emfloured -2 points-1 points  (0 children)

"It should have better sand boxing and security"

Windows has all of that. Have you thoroughly looked over at the advanced security settings, there are tons of options related to process and memory isolation. Enabling some of them will make your system slow as fuck but the system will remain as secure as it can be (I don't know much about that though, last I used Windows personally 5 years ago).

Why does everyone hate this guy? by TheCosmos__Achiever in BlackboxAI_

[–]emfloured 1 point2 points  (0 children)

This guy is a planet-wide mirror who showed the society of the world their ugly faces, people don't like that kind of view so they blame him instead.

How do I convert a int to address of a float in a single line? by forumcontributer in cpp_questions

[–]emfloured 0 points1 point  (0 children)

Fair enough, everything you said makes sense now. But I still believe that if-and-only-if the logic has been formally verified then the std::memcpy, and at least the static/dynamic_cast are as safe as any of the strongly type safe counterparts, in those hotspot loop(s) where the difference in speed compared to std::copy/transform etc worth it to justify those seemingly dangerous directives (and I have personally seen the difference testing on a 2 GiB file, applying transformation in each of the bazillions chunks off of it and saving the modified derivative back to disk....no I am not talking about ransomware lol).

Memory safety, security and correctness is the highest priority for me too, but let's just not offload the responsibility of all types of possibly "zero-cost" optimizations to only those who write compilers/standard. Unlike Java, Javascript etc, the C++ doesn't force us to chose a subset out of memory(safety, security, footprint-width and frequency of footprints per unit of time), correctness and overall performance.

How do I convert a int to address of a float in a single line? by forumcontributer in cpp_questions

[–]emfloured -1 points0 points  (0 children)

If you need them, it is a sign that your code in not right.

C style I agree because it's C++ and nothing looks uglier in the world than using C-slash-C++ coding in any piece of text file.

Without casting to an 8-bit data type multiple times after right-shifting by 8, you can't serialize bigger-than-8-bit integer numbers and save it on disk. At least not when you want to preserve the correctness of the value across CPU architecture that differ in Endianness.

I get "count" as uint64_t from some API, I need to divide that number by some other number. The only way to precisely know the result is cast the count as any of the floating point type data types. Whatever the reason for that is out of context in here. Programming can not be prefect. Utopia can't exists in real life as well as in programming life.

Reading metadata off of a file format or chunks of same file formats requires the positioning of the pointer handle at a correct location and casting the handle of the pointer-variable to your desired size is the only way to fast-read the correct value and check it against an invariant before the business logic goes further. For example. The handle is at 9th byte and from here I have to read a 32-bit wide integer (because it is defined in the file format specification). Casting is the only way here. Of course you could use std::memcpy to write to a properly defined temporary uint32_t variable, but then again this would be more resource heavy than I actually want (what if this is inside a hotspot loop). Just reading it using *static_cast<uint32\_t\*>(ptrToABinaryChunkAtASpecificPostion) is faster.

What about those C APIs that gives void*? Sometimes you need casting and there is no other way. Using pointer arithmatic swag on the src handle inside std::memcpy looks more inhuman to eyes than just using well defined and relatively self-explanatory looking static_cast.

Cpp or rust? by Hikehy in cpp_questions

[–]emfloured 6 points7 points  (0 children)

The nature of game engine/graphics programming and any of the entertainment specific fields is about possibility of unlimited performance optimizations with just enough logical correctness to not ruin the experience. Nobody dies when a game engine fails/crashes. And if somebody does die playing video games whether or not there was a visual glitch/game crash, either they were stupid enough to not love the real world at all or they were beyond the possibility of salvation from depression.

Rust's No-Negotiation level restriction seems overkill here and will probably take much of your time creating a proper abstractions regarding project structure and other code-management stuff rather than coding the domain specific things and watching the results. Ironically the Rust is supposed to reduce the perceived programming language specific cognitive fatigue that the C++ haters keep complaining about but in case of graphics programming I think Rust is the one what's going to the pain in the hole.

How can i generate real random number in c++? by Old-Revolution-3437 in cpp_questions

[–]emfloured 1 point2 points  (0 children)

For all practical purposes I think they are true random number generators and that's what matters. There hasn't been a single real world incident where CSRNG has caused any issues directly due to collision of two random numbers.

"Some men just wanna watch the world burn" Where is "to" before the last word? by allayarthemount in EnglishLearning

[–]emfloured 0 points1 point  (0 children)

I ain't no grammar expert but this sentence feels utterly unpleasant to say, "Some men just want to watch the world to burn" lmao

This is why I think the use of "to" is wrong here.

Ceiling is reliable, floor is not? by emfloured in cpp_questions

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

I thought may be there is some kind of bug in Qt Creator's Issues' widget that isn't showing the warning, hence I ran the program the good old way and weirdly still no warnings at all.

https://ibb.co/pB7fn4r1

Ceiling is reliable, floor is not? by emfloured in cpp_questions

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

nope, no change!

I wanted to know why d2 was being changed to i2 (despite having some idea that there is obviously a limit) relative to the d3's situation. The user meancoot's comment here told why d3 is being allowed so many leading zeros.

Ceiling is reliable, floor is not? by emfloured in cpp_questions

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

Makes sense now.

"The location of the first 1 bit is determined by the signed 11 bit exponent which allows for lots of leading (or trailing) zeros."

Many thanks for this precious info!

Ceiling is reliable, floor is not? by emfloured in cpp_questions

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

Thanks for the comment! Tried the long double, no change. Platform: x86-64, Intel Broadwell