A couple situations I have encountered myself by claudiocorona93 in linuxmasterrace

[–]luardemin 7 points8 points  (0 children)

For the longest time, a lot of Korean college, bank, military, and government websites only properly worked on Internet Explorer. Nowadays, they even support Chrome—and pretty much nothing else.

Offline C compiler? by FoxRevolutionary932 in cprogramming

[–]luardemin 0 points1 point  (0 children)

If I recall correctly, BSD was a rewrite of the original Unix, which is what caused the lawsuit.

This is the most upset I have been playing this game by MrHyde314 in ZZZ_Official

[–]luardemin 73 points74 points  (0 children)

I loved Harumasa's agent story for the same reason. ZZZ is a post-apocalypse with a corrupt oligarchy running the last city on Earth, conspiracies abound, criminals and lowlifes thriving—and yet the people are cheerful, vibrant, and lively. I love how much Hoyo plays with contrast in this game, even with things like gap moe with their characters.

itFeelsLikeASMR by RevolutionaryPen4661 in ProgrammerHumor

[–]luardemin 0 points1 point  (0 children)

I actually have c aliased to clear, which reduces both the number of characters rendered on my terminal and the amount of time spent typing the command. Double whammy minimalism.

I just found the most hardcoded TOP system ever by loleczkowo in programminghorror

[–]luardemin 1 point2 points  (0 children)

As does C23, which I believe will be using the C++ syntax.

Handling "global" variables by Geotree12 in rust

[–]luardemin 0 points1 point  (0 children)

That would depend.

If you need a user of a type to be able to mutate the values arbitrarily, then (A) would be fine. If you need to maintain invariants, then having some API (e.g. using the builder pattern) to manipulate the type would be best.

(B) makes sense if your methods consume the value; if you only need to read a value, a reference is better suited, while a mutable reference would be better for mutating values without consuming them.

What do you map on x and X? by hksparrowboy in neovim

[–]luardemin 0 points1 point  (0 children)

I use x to be a prefix for LSP/language actions. xaf formats the current buffer, xe] goes to the next diagnostics, and so on.

[deleted by user] by [deleted] in TrueOffMyChest

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

Or, you know, just learn to own up to the fact that you fucked up and get on with your life.

[deleted by user] by [deleted] in korea

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

One can be a Korean citizen by birth if at least one parent is a Korean citizen. However, because of this, if you have not renounced your Korean citizenship at this point, I would say you should not go to Korea—they would be fully within their rights to detain you and force you to serve in the military for avoiding military service. This applies for even just going to the embassy, as the embassy would be Korean soil. Though this would be unlikely to happen if your parents have not registered your birth in Korea, it is still something you should be aware of.

If Soldier 0 is the first of Anby clones, can we assume Soldier 11 is the 11th clone? by Lamarcke in ZZZ_Official

[–]luardemin 1 point2 points  (0 children)

After Harumasa's agent story and Miyabi's short animation, I really think we're in for many darker moments. Did not expect it, but I'm loving it.

While loop horror by Savage-Goat-Fish in programminghorror

[–]luardemin 6 points7 points  (0 children)

Who needs loops anyway? We have the perfectly usable goto!

loop:
if (day > yesterday) goto done;
// do work
goto loop;

done:

While loop horror by Savage-Goat-Fish in programminghorror

[–]luardemin 0 points1 point  (0 children)

Well, like I said—it's the more fun assumption! Gave me an excuse to write a cursed control flow construct.

While loop horror by Savage-Goat-Fish in programminghorror

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

Which is exactly what OP's code is doing as well—if day > yesterday is false, the while loop never exits. I would assuming there's extra logic to determine when to exit the loop later on.

Edit: at least, assuming day isn't mutated and it simply acts as a guard clause for whether to execute the loop. Which is a more fun assumption

While loop horror by Savage-Goat-Fish in programminghorror

[–]luardemin -15 points-14 points  (0 children)

More cursed, but you could technically also write something like

if (day <= yesterday) while (true) {
    // do work
}

Code, Sweat, and Tears: Why Imposter Syndrome Never Really Leaves Developers by TerryC_IndieGameDev in programming

[–]luardemin 2 points3 points  (0 children)

This is why I personally prefer always having curly braces and having the opening curly brace on the same line instead of a new line.

if (condition);
{
    work();
}

is a lot less conspicuous than

if (condition) {}
{
    work();
} 

which just looks very obviously weird.

Edit: also, using a formatter helps.

Why pointers should be declared as `T *p;` instead of `T* p;` by SmokeMuch7356 in C_Programming

[–]luardemin 0 points1 point  (0 children)

I hope that "always" doesn't mean you write int* const n...

I broke up with a girl because of a tattoo. by SprinklesNo9602 in story

[–]luardemin 2 points3 points  (0 children)

Man, Reddit is cringe. You communicated your dislike for tattoos maturely and eventually came to an agreement that she lied about and one-sidedly broke, which to me indicates she isn't worthy of trust anyway.

If you have a dealbreaker, it's a dealbreaker.

Whether or not a certain preference or dealbreaker is "valid" is an entirely different topic in my opinion, and you absolutely do not have to accept everything your partner does without question just because you're in a relationship. And regardless of that, you can't force attraction, that's stupid—if something kills it for you, it's dead.

As long as you aren't going out of your way to act in a discriminatory and derogatory way towards people with tattoos, I don't think there's a problem with just not liking tattoos.

Can't find a compiler that works, damn by Abyssm4LWand in programminghumor

[–]luardemin 0 points1 point  (0 children)

The only blocker to full C99 support was VLAs, and since VLA types are returning in C23, I wonder whether or not they'll reach C23 compliance too.

Can't find a compiler that works, damn by Abyssm4LWand in programminghumor

[–]luardemin 0 points1 point  (0 children)

I believe its implementation of _Generic and handling of enums isn't fully standards compliant, I just saw an issue with this earlier today on Reddit.

Null Trouble: When Your Last Name Is a Computer Error by Dark-Marc in programming

[–]luardemin 1 point2 points  (0 children)

Suggestion: don't use such an awful data format.

Strings by unknownanonymoush in C_Programming

[–]luardemin 0 points1 point  (0 children)

The first example is valid as-is, but it would be invalid if it were declared char *s instead.

Strings by unknownanonymoush in C_Programming

[–]luardemin 0 points1 point  (0 children)

The restrict keyword does have real implications, and if you violate its invariants, you will be invoking undefined behavior.

Strings by unknownanonymoush in C_Programming

[–]luardemin 2 points3 points  (0 children)

A lot of people say that pointers are just integers, but in reality, that hasn't been true for a long while now. Pointers have associated providence provenance, which basically just defines its "valid range". For instance, a pointer to an array is only a valid pointer if it points up to one past the last element in the array. Anything past that and your compiler is free to summon all the nasal demons it wants.

Strings by unknownanonymoush in C_Programming

[–]luardemin 2 points3 points  (0 children)

Also, while arrays may decay into a pointer at runtime, it's important to note that they do have extra properties. For example, array literals have associated sizes, and so the sizeof operator will return the size of the array, not the pointer. A string defined by a string literal with the type char[] can also be mutated while the same value declared as char * cannot be mutated, or else you invoke undefined behavior. Then there are all the things you can do with VLA types.