name your function as malloc()
and see to world burn and generate bugs at factorial rate.
name your function as malloc()
and see to world burn and generate bugs at factorial rate.
Lettme introduce you to ackermann’s function:
int ack(int m, int n) {
if (m == 0) {
return n+1;
} else if((m > 0) && (n == 0)){
return ack(m-1, 1);
} else if((m > 0) && (n > 0)) {
return ack(m-1, ack(m, n-1));
}
}
You won’t run out of stackoverflows any time soon.
To produce 1 commit, I end up rebasing the damm thing at least 3 times. If there is an problem, it’s at least 2³ times.
volatile int blackhole;
blackhole = 1;
const int X = blackhole;
const int Y = blackhole;
Compiler is forbidden to assume that X == 1
would be true. It’s also forbidden to assume that X == Y
. const
just means the address and/or the data at the address is read only. const volatile int* const hwreg;
-> “read only volatile value at read only address hwreg”. Compiler can assume the hwreg
address won’t magically change, but can’t assume the value read from that address won’t.
GameBoy Color with a single game: Pokémon Red.
Next time I was able go to the shop they had upgraded to GameBoy Advance and no GB/GBC games were to be never found again. It was the best/worst thing I ever got. :'(
There were no unit tests and previous dev had opened the pandora’s box with half-written implementation. Gasp
Me:
C++: The project is now led by university research comitee optimizing essays/second and consists 1k lines of template hieroglyphs.
I almost posted comment about this but I had to keep it short. The Nvidia has an problem with their driver tainting the customers kernel/system which renders the customer in bad situation. (Of not being able to get support from kernel devs)
The proprietary taint is there for exactly for this reason:
Nvidia solution to this is breaking the kernel license terms and acting like illegal smugglers in-order to access those sweet sweet GPL-only kernel APIs as lazily as possible. I would say that this is just arrogant and greedy way of doing software development. On top of this the kernel devs get all the blame for their vigilantly of trying to exercise their own license terms.
I think if nvidia would not be this arrogant and vile to the kernel devs, they would already have an proper kernel module that could co-exist between the GPL and proprietary code. If the proprietary code is implemented only in user-space/firmware they can keep their secrets: The user-space <-> kernel-space is an boundary where kernel GPL ends. Implementing such thing would not be easy, but I don’t regard it being impossible: look at android.
In extreme: If the hostility continues, kernel devs just might be forced to go invent an corporate blacklist that goes against all principles of co-operation.
Others slightly more sane hw vendors, probably thought: fuck it. It is more profitable to push some FOSS code into the public than keeping the entire thing an trade secret. (I assume this results in the weirdly large firmware blobs that obfuscate and separate the actual hardware from the FOSS drivers)
EDIT: I read more about this issue. From proprietary code vendors viewpoint the current kernel is kind of “GPL or gtfo” situation. Linux kernel doesn’t really have an internal stable ABI for modules/drivers. Implementing such thing would require (partly) dropping the monolithic design of the Linux kernel… Such interface would be then able to added to the GPL exemption of syscall users. This would open such big can of worms that it looks to be impossible.
On 1st gen ryzen cpu (until rzen3), don’t have branch recording with “perf record -b” So no way to make your program +15% faster with profile data/PGO/FDO without effort. 😞
My most common typo is
gti <random command>
and I’m considering to alias it asrm -rf --no-preserve-root /