Skip Navigation

User banner
Posts
258
Comments
2,247
Joined
2 yr. ago

  • The press has always been biased. Bezos just reversed the WaPo's bias.

    All press is biased. If you deny one press outfit access to the White House, you need to deny them all or none at all. Otherwise, you're partial, you favor your guys and you're no better than Trump.

  • I really hope that if we ever get a Democrat back in the White House, press credentials of WaPo and anyone who bent a knee to Trump are revoked.

    The one thing democrats should never do is act like Trump. Spite and revenge are not healthy political attitudes.

  • Trump should be glad: he's uniquely special because his special is the short bus kind.

  • So who's surprised...

    WaPo is owned by Bezos.
    Bezos is part of the broligarch clique.
    The broligarchs use MAGA to enrich their already ultrarich asses.
    Ergo, WaPo is now MAGA's mouthpiece.

    Me, I don't even bother posting any story from WaPo. They're compromised as far as I'm concerned.

  • After Trump being elected twice, and the second time with more votes than the first despite Jan 6, the felony convictions and all the rest, I'm not surprised by anything anymore: America as a country is simply not fucking right in the head.

  • unlawful border crossing are at an all-time low

    Unlawful presidential executive orders are at an all-time high too.

  • I have news for you: it already exists. It's still more or less dormant, but all it would take is one order to activate.

    It's called CloudFlare.

  • They're quite simple. Just convert the values to binary and apply the applicable truth tables. Just remember operator precedence when you use them, and in doubt, don't trust your luck and apply parentheses generously 🙂

  • But what is an example of where I can use it?

    Aside from operations on bitfields, a bitwise operator can be useful in several "non bits" cases. For instance:

    value & 1 evaluates to 1 if value is odd (and will evaluate to True in an if statement)
    value >> 1 divides value by 2 (integer division)

    But usually bitwise operators are for when you want to manipulate bits in values. For instance:

    value | 5 returns value with bits 1 and 3 set to True
    value & 0xffff returns the 16 least-significant bits in value (usually you do this to make sure it will fit in 2 bytes in memory for example)
    value & (0xffff ^ 5) returns the lower 16 bits of value with bits 1 and 3 set to False

    Etc.

  • Much to unpack here...

    coin == 25 | 10 | 5

    ...will evaluate as True if coin is equal to the bitwise OR of 25, 10 and 5 - i.e. 31. In other word, it's equivalent to coin == 31. That's because the bitwise OR has precedence over the == operator. See operator precedence in Python.

    If I replace the ‘|’ with ‘or’ the code runs just fine.

    It probably doesn't. If you replace | with or, you have the statement coin == 25 or 10 or 5 which is always True in the if statement because it's evaluated as (coin == 25) or (not 0) or (not 0) in an if statement.

    coin == 25 | coin == 10 | coin == 5

    ...will evaluate as coin == (25 | coin) == (10 | coin) == 5. Again, operator precedence.

    What you want to do is this:

    if coin in [25, 10, 5]:

    or

    if coin in (25, 10, 5):

    or simply

    if coin == 25 or coin == 10 or coin == 5:

    Don't create problems and confusion for the next guy who reads your code for nothing. Simple and readable are your friends 🙂

  • He survived because he WASN'T run over by a train. He luckily fell asleep very close to the rails but just out of danger.

  • You have to admit, they have a great sense of macabre humor. I guess the only countries that top that are China and Iran.

  • That's the most accurate article on the subject I've read in years.

  • The sad truth is, Americans are so damned dumb, he might be right.

  • Do we officially call them the US Gestapo yet or do we wait until they resort to torture on US soil?

  • 3DPrinting @lemmy.world

    Elefont ring - Adaptive Writing Device by Tryspire

    Support Community for Amputees @lemmy.sdf.org

    Elefont ring - Adaptive Writing Device by Tryspire

    Glasses and eyewear @lemmy.sdf.org

    Do motion sickness glasses work?

    Disability @feddit.uk

    Smart Caption Glasses for the Deaf - AugmentOS

    Glasses and eyewear @lemmy.sdf.org

    Smart Caption Glasses for the Deaf - AugmentOS

    politics @lemmy.world

    Supreme Court rejects Trump’s request to keep billions in foreign aid frozen

    Support Community for Amputees @lemmy.sdf.org

    This High Schooler Invented a Low-Cost, Mind-Controlled Prosthetic Arm

    politics @lemmy.world

    Trump announces strategic crypto reserve including bitcoin, Solana, XRP and more

    Support Community for Amputees @lemmy.sdf.org

    One-armed basketball player makes women's Division III history with basket

    politics @lemmy.world

    WashPost opinion editor resigns after Jeff Bezos announces changes to Opinion section

    Politics @beehaw.org

    "who could've seen this coming"

    Politics @beehaw.org

    Some Republicans fear Medicaid cuts could cost them their jobs

    politics @lemmy.world

    SCOTUS pauses judge's order requiring Trump administration pay foreign aid contractors

    Glasses and eyewear @lemmy.sdf.org

    How Glasses Correct for Astigmatism

    politics @lemmy.world

    Judge orders Trump administration to pay bills from foreign aid contractors, comply with earlier ruling

    politics @lemmy.world

    What Can House Republicans Cut Instead of Medicaid? Not Much.

    Glasses and eyewear @lemmy.sdf.org

    I Designed Sunglasses With a $200,000 3D Printer

    politics @lemmy.world

    Economic Blackout: What to know about the February 28 boycott taking off on social media

    politics @lemmy.world

    ‘Very alarming’: CDC halts flu vaccination campaign

    retrocomputing @lemmy.sdf.org

    Nice upgrade for old PCs