filtoid

joined 8 months ago
[–] filtoid@lemmy.ml 4 points 1 month ago* (last edited 1 month ago)

You are correct, I had misremembered how it works. It can evaluate build arguments, but they have to be numerical. However you can define new variables (in the pre-processor, not in code - ie, after a #) to replace those numbers, to make the intent clearer. Eg.

#define DEBUG_1 1

#define DEBUG_2 2

#if DEBUG_LEVEL >= DEBUG_1

Then pass the build arg DEBUG_LEVEL at compile time

More info here:

https://learn.microsoft.com/en-us/cpp/preprocessor/hash-if-hash-elif-hash-else-and-hash-endif-directives-c-cpp?view=msvc-170

Edit: formatting of code snippet

[–] filtoid@lemmy.ml 2 points 1 month ago (2 children)

I'm going to take a shot at answering this, but please bear in mind that it's been a long time since I looked into the C pre-parser.

#if allows for arbitrary Boolean logic, eg #if build_env "local"

#if defined us to see if a thing has been defined already, quite often used to make sure that a header file is only imported once, redeclaration of headers is a compiler error. Eg. #if !defined(__SOME_UNIQUE_FILE_IDENTIFIER) (then define the class) then write your #endif

#ifdef wasn't always standard and was added later in the ANSI spec be a keyword, it's shorthand for the same thing as #if defined. -

This is my understanding anyway, I'm going with the principal that someone who knows more will be more likely to post a rebuttal (which I encourage).

[–] filtoid@lemmy.ml 17 points 1 month ago (1 children)

Unfortunately masks are most effective when the person with COVID wears them, rather than people who are trying to avoid COVID, but human nature is such that people with COVID (ones who go out in public) are often ones least worried about it so least likely to wear a mask in the first place.

I had a similar experience where I went to a conference and masked up religiously around groups only to catch it anyway while my colleagues didn't mask and didn't catch it.

Sometimes you can do everything right and still fail (paraphrasing Picard).

[–] filtoid@lemmy.ml 35 points 2 months ago

If he were my boss I'd ignore him during work hours too, tbh.

[–] filtoid@lemmy.ml 11 points 2 months ago

I agree, the job of politicians is to reframe Trans rights as policies that benefit everyone. If everyone at a negotiation feels like they are winning you have a successful negotiation. Who cares if the new policy disproportionately benefits one group, we are all better off because of it, and in the case of Trans rights give them the same (non-codified) protections as everyone else.

(This is if course ignoring the oft used tactic of the far right which is to do the opposite and reframe beneficial policies (eh. ACA) as something that only benefits one group by calling it a funny name (eg. Obamacare), so it's easier said than done, but that is what the democrats should be doing more of, imho)

[–] filtoid@lemmy.ml 3 points 3 months ago

You forgot KN#CKERS

[–] filtoid@lemmy.ml 6 points 3 months ago (1 children)

First visit to the vet plays out like an Abbot and Costello sketch!

[–] filtoid@lemmy.ml 5 points 3 months ago (1 children)
[–] filtoid@lemmy.ml 5 points 3 months ago (1 children)

I live in Luxembourg and I have the same question!

I suspect it is trains going outside of the country but it's funny to see nonetheless. I think most trains originate from Luxembourg (when travelling to other countries over anything that would be considered a long distance which I suspect gives them a scheduling advantage).

[–] filtoid@lemmy.ml 4 points 3 months ago

plus ça change, plus c'est la même chose

(The more things change, the more they stay the same)

[–] filtoid@lemmy.ml 8 points 3 months ago

I mean, yeah, he'd have to hold the phone, no way that thing would stay the nook of his shoulder with a neck like that!

view more: ‹ prev next ›