• 0 Posts
  • 91 Comments
Joined 11 months ago
cake
Cake day: August 7th, 2023

help-circle

  • #include <stdio.h>
    
    int main() {
    
    Long long x = 0x7165498511230;
    
    while (x) putchar(32 + ((0xC894A7875116601 >> ((x >>= 4) & 15) * 7) & 0x7F));
    
    return 0;
    }
    

    Might be wrong on a few things here as I haven’t done C++ in a while, but my understanding is this. I’m sure you can guess that this is just a very cheekily written while loop to print the characters of “Hello, World!” but how does it work? So first off, all ASCII characters have an integer value. That 32 there is the value for the space character. So depending on what ((0xC894A7875116601 >> ((x >>= 4) & 15) * 7) & 0x7F)) evaluates down into you’ll get different characters. The value for “H” for example is 72 so that first iteration we know that term somehow evaluated to the number 40 as 72 - 32 = 40.

    So how do we get there? That big number, 0xC894A7875116601 is getting shifted right some number of bits. Let’s start evaluating the parenthesis. (X >>= 4) means set x to be itself after bit shifting it right by 4 bits then whatever that number is we bitwise AND it with 15 or 1111 in binary. This essentially just means each iteration we discard the rightmost digit of 0x7165498511230, then pull out the new right most digit. So the first iteration the ((x >>= 4) & 15) term will evaluate to 3, then 2, then 1, then 1, etc until we run out of digits and the loop ends since effectively we’re just looking for x to be 0.

    Next we take that number and multiply it by 7. Simple enough, now for that first iteration we have 21. So we shift that 0xC894A7875116601 right 21 bits, then bitwise AND that against 0x7F or 0111 1111 in binary. Just like the last time this means we’re just pulling out the last 7 bits of whatever that ends up being. Meaning our final value for that expression is gonna be some number between 0 and 127 that is finally added to 32 to tell us our character to print.

    There are only 10 unique characters in “Hello, World!” So they just assigned each one a digit 0-9, making 0x7165498511230 essentially “0xdlroW ,olleH!” The first assignment happens before the first read, and the loop has a final iteration with x = 0 before it terminates. Which is how the “!” gets from one end to the other. So they took the decimal values for all those ASCII characters, subtracted 32 then smushed them all together in 7 bit chunks to make 0xC894A7875116601 the space is kinda hidden in the encoding since it was assigned 9 putting it right at the end which with the expression being 32 + stuff makes it 0 and there’s an infinitely assumed parade of 0s to the left of the C.




  • Most likely just awkward rounding when the screenshot was taken. A lot of the time those post age indicator tags just count the number of hours between it and you then each multiple of 24 is a day without caring about when the actual date changes. So the first could easily have been at like 7pm one day and the second like 11am the next day and they’d both get abbreviated at 6 days ago if you were looking at it at like 4pm when you haven’t quite hit the next multiple of 24 hours.





  • Okay very basically this whole thing started with a hypothetical posed to a bunch of women about which they would rather run into while alone in the woods; A random man, or a bear. A lot of women chose the bear. Reasons varied from “The worst the bear will do is kill me,” to “At least I know the bear wants to kill me,” with a general theme seeming to be that whatever tangible threat the bear posed was preferable to the uncertainty of wondering whether or not a random man would assault them.

    The poster’s stated goal with the hypothetical was to get men to think about why the women were choosing the bear. Instead a lot of guys took it as a personal attack, like they were being punished for the actions of other men. Many started attacking the question, insisting that bears are way more dangerous than virtually any man. This led to a lot of dismissive responses of the criticism like “This is why women choose the bear,” or talking about women’s safety being more important than men’s feelings.

    I’m simplifying a lot but that’s the basic gist of it.


  • The ones that get me are the ones that talk about voting 3rd party. A lot of them seem to understand that the 3rd party is not going to win and that their best case scenario is… I guess “Next time they’ll listen to us and we’ll get a real leftist?” So… Your solution to the genocide is wait 4 years to get someone who will directly end it? Bestie, I don’t think Gaza will be around in 4 years. Even if you discount Trump’s stated desire to be a dictator and Project 2025.

    Or, what happens by the way if Biden wins in spite of them voting 3rd party? Surely it doesn’t mean that they’ve directly proven to the Democrats that they literally don’t need that voting bloc?






  • If Biden just does it and waits to get sued rather than going to SCOTUS himself to get them to rule that he can divert the funds it opens up a bunch of problems for everyone. Not only does it still not save Biden and the dems time and resources as they still have to argue the case at every level it goes to and still have to be the ones to appeal it higher if any of the lower courts rule against them. But if they win it could arguably be even worse. Sure we stop the border wall, but what is there to stop a future Republican president from saying “I think Medicaid, SNAP, Medicare, Social Security, Welfare, Section 8, or other federal social program they don’t like are illegal actually and I’m not releasing the funds for them” and us then needing to sue him into complying?


  • EmptySlime@lemmy.blahaj.zoneto196@lemmy.blahaj.zoneBatterules
    link
    fedilink
    English
    arrow-up
    11
    ·
    edit-2
    2 months ago

    Fun fact: My wife ended up with pretty severe malabsorption after her bariatric surgery. Her vitamin A levels went so low that she had almost entirely lost her night vision. For like 6 years now she’s been taking upwards of 125,000IU per day and only just recently her vitamin A levels have gotten just barely into the normal range.

    So what I’m saying is my wife could actually eat an appreciable amount of polar bear liver and be fine.


  • Taking the funding of those sections of border wall to SCOTUS would have wasted the Republicans time and resources… How exactly? It would be Biden’s DOJ that would have to prepare some kind of legal rationale to challenge the wall funding. Then even if they came up with a perfect ironclad reasoning SCOTUS isn’t even required to grant it cert to even hear the case.

    I utterly fail to see any version of this where it wastes more Republican resources than Democrat ones.


  • Basically yes that’s my understanding. When Congress appropriates money for something, the Executive Branch is obligated by law to spend that money on what Congress appropriated it for.

    As much as I hate the whole border wall thing if Biden just said “Fuck Congress, we’re not doing that” it almost certainly would lead to a world where the next Republican president uses that same idea to essentially end things like Medicaid or SNAP.


  • To my knowledge the only sections of wall he’s built were funded by Trump’s Congress before he left office. Meaning he had little choice but to spend the money on what Congress appropriated it for.

    I don’t know about you, but I’d rather not live in a world where someone like Trump can just decide he doesn’t want to spend portions of the money Congress appropriated. He could just suddenly decide that the federal government isn’t going to pay like Medicaid or SNAP.