EmptySlime

joined 11 months ago
[–] EmptySlime@lemmy.blahaj.zone 7 points 2 days ago (1 children)

Or... Bing it, if you're nasty.

A weapon to surpass Metal Gear

ROCK AND STONE TO THE BONE!

[–] EmptySlime@lemmy.blahaj.zone 8 points 2 weeks ago (1 children)
#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.

[–] EmptySlime@lemmy.blahaj.zone 9 points 2 weeks ago* (last edited 1 week ago) (1 children)

I guess it's a special kind of character called a ligature. They apparently are characters for combined operators. So in this case it seems to just be >>= all as one character?

[–] EmptySlime@lemmy.blahaj.zone 2 points 3 weeks ago

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.

[–] EmptySlime@lemmy.blahaj.zone 29 points 1 month ago (1 children)

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.

[–] EmptySlime@lemmy.blahaj.zone 13 points 1 month ago

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?

[–] EmptySlime@lemmy.blahaj.zone 2 points 1 month ago

I think you did great tbh! 10/10 teenage me would absolutely 100% never had any idea you were into them. But I also didn't figure out I was asexual until my mid twenties so idk if I can really count as a data point lol.

[–] EmptySlime@lemmy.blahaj.zone 11 points 2 months ago* (last edited 2 months ago) (1 children)

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.

[–] EmptySlime@lemmy.blahaj.zone 7 points 3 months ago

It appears to be from a personality type thing called Enneagram? It seems to be written in the standard XwY where X is the main type and Y is something called a wing which appears to be a subtype? Not totally sure since I've never heard of it before and this is just me attempting to research it.

view more: next ›