JATtho

joined 1 year ago
[–] [email protected] 7 points 2 months ago* (last edited 2 months ago)

C++: you sure you want to do this? This will either: a) blow your foot off b) be too fast to be measured in micro-benchmarks.

b. B. B. a. then B.

You have chosen to simultaneously blow your arm off and be the fastest code thing on the planet. Congrats. Yes.

[–] [email protected] 1 points 2 months ago

I was suspicious as heck of this link, but I thank you for being benign.

[–] [email protected] 4 points 2 months ago* (last edited 2 months ago) (2 children)

My most common typo is gti <random command> and I'm considering to alias it as rm -rf --no-preserve-root /

[–] [email protected] 20 points 2 months ago (1 children)

name your function as malloc() and see to world burn and generate bugs at factorial rate.

[–] [email protected] 5 points 2 months ago

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.

[–] [email protected] 3 points 2 months ago

A lot. That's the answer.

[–] [email protected] 6 points 3 months ago

std::chrono::neutronstar_clock

[–] [email protected] 1 points 3 months ago

After 362879 wrong answers you will pass. Or after 2,0922789888×10¹³ tries if it's a fancy 4x4 grid.

[–] [email protected] 1 points 3 months ago* (last edited 3 months ago)

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.

[–] [email protected] 2 points 3 months ago
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.

 

Have a good day.

4
Stubb. (sopuli.xyz)
 

Haavisto.

 

I replaced the equivalent of floor in a code base and I was surprised it didn't break. Yet.

 

I have nothing to add.

view more: next ›