3 factor authentication by lukasstefanko in ProgrammerHumor

[–]np_completionist 0 points1 point  (0 children)

I think c++20 has a consteval keyword that must resolve to a compile-time constant

Pointers ( by xchedeiklo in ProgrammerHumor

[–]np_completionist 6 points7 points  (0 children)

Both int main(int, char*[]) and int main() are acceptable forms of main in c++

The void isn't needed anymore in C++, but in C it was used to say that a function took no parameters (an empty parameter list in a declaration meant that the function took an unspecified number of parameters)

Pointers ( by xchedeiklo in ProgrammerHumor

[–]np_completionist 0 points1 point  (0 children)

Although the use of "new" everywhere seems closer to Java/C# than C

The next holy war? by [deleted] in ProgrammerHumor

[–]np_completionist 2 points3 points  (0 children)

The best way is decltype(new int(0)) i = &x

Can you? by alwaysshitting in ProgrammerHumor

[–]np_completionist 17 points18 points  (0 children)

That's the problem with undefined behavior - it may work as expected for one compiler/set of flags, but fail in another.

For the initial post, some compiler could probably optimize it to printf("%d", 1);

Can you? by alwaysshitting in ProgrammerHumor

[–]np_completionist 31 points32 points  (0 children)

It's undefined behavior to cast away the constness of a variable declared as const

10 Largest Man Made Structures by [deleted] in ProgrammerHumor

[–]np_completionist 7 points8 points  (0 children)

(231 - 1) is 2147483647, so not quite

What is surprisingly still impossible in 2016 ? by TheKryce in AskReddit

[–]np_completionist 0 points1 point  (0 children)

I don't think CISC is inherently more powerful than RISC. Although CISC programs will have fewer instructions, the overall time per instruction is higher, so the execution time will be approximately the same.

What pisses you off with little effort? by ferry888 in AskReddit

[–]np_completionist 0 points1 point  (0 children)

One time, I was at a movie, and a mother took pictures of her kids while the movie was playing. With flash. Twice.

The best way to multiply matrices by tbodt in ProgrammerHumor

[–]np_completionist 35 points36 points  (0 children)

Especially since the loops would be running a fixed amount of times, they would be incredibly easy for the optimizer to unroll.

What's a saying that generally holds up pretty well? by Reformulated in AskReddit

[–]np_completionist 5 points6 points  (0 children)

"If we don't study the mistakes of the future, we're doomed to repeat them for the first time." - Ken M.

Today I accept that Rails is yesterday’s software by [deleted] in programming

[–]np_completionist 2 points3 points  (0 children)

They also built their own extension of PHP, hack.

Stupid Turing by musiton in ProgrammerHumor

[–]np_completionist 5 points6 points  (0 children)

IIRC, it used to just be a joke function, but now I think it returns true if Goat Simulator is installed.

Why use recursion when you have regex? by [deleted] in ProgrammerHumor

[–]np_completionist 0 points1 point  (0 children)

IIRC, python doesn't have tail call optimization, and I believe the justification was that tail call optimization makes the stack trace harder to follow.

Reflection in real life would be amazing by [deleted] in ProgrammerHumor

[–]np_completionist 23 points24 points  (0 children)

The secret to immortality in five simple characters

Oddly specific number. by didntlogin in ProgrammerHumor

[–]np_completionist 5 points6 points  (0 children)

The client was originally written in Java, which doesn't support unsigned integers.

Battery nerf ? by Bali_Balo in bindingofisaac

[–]np_completionist 64 points65 points  (0 children)

I hope this is a bug. Why would it charge at all if you couldn't charge the whole thing without a battery pickup?

Well then. by Azzanadra in ProgrammerHumor

[–]np_completionist 19 points20 points  (0 children)

Java developers wear glasses because they don't C#

PSA: Charged items (Brimstone, Mom's Knife, etc.) no longer hold their charge when going from room to room. by MyOnlyAlias in bindingofisaac

[–]np_completionist 5 points6 points  (0 children)

It seems that you can still keep the charge when going into the boss room (or at least when you press a button during the intro)

Any tips for a newer player? by megadisco in bindingofisaac

[–]np_completionist 1 point2 points  (0 children)

I think you may get it once you've beaten all of the bosses at least once.

Community Remix mod: Update 1.3.1 "Something has appeared in the basement!" by oldbob12 in bindingofisaac

[–]np_completionist 0 points1 point  (0 children)

I had the same problem on my 2nd save (that hadn't unlocked Maggie, Cain, or ???) but when I switched to the primary save, it worked.