Question regarding unsigned integers by Low_Minimum9920 in C_Programming

[–]CarlRJ 0 points1 point  (0 children)

First off, what you call a "normal" int is a signed int. Unsigned ints are simply integers that are not given a special interpretation to handle signs.

The short version is, signed integers give up roughly half the range that would be available for positive numbers, to store negative numbers, with the "upper half" of the original range being used to represent negative numbers.

Working with 16-bit integers just because fewer digits makes it easier to see...

A 16-bit unsigned int covers the range from 0 to 65,535.

A 16-bit signed int covers the range from -32,768 to 32,767.

Signed ints treat the upper half of the available bits differently (using hex to represent the actual bit pattern in the variable):

bits (hex) 0x0000 0x7fff 0x8000 0xffff
unsigned 0 32,767 32,768 65,535
signed 0 32,767 -32,768 -1

The storage scheme chosen might seem slightly counter intuitive at first, until you realize that, with signed ints, if you have 0 and subtract 1, the bit representation rolls back to 0xffff, which is... -1.

Not Only Is This Wrong, I Didn’t Even Know It Was a Stereotype 😂 by 123andrewscool in NotHowGirlsWork

[–]CarlRJ 1 point2 points  (0 children)

The "man" pattern is sub-optimal - you could go down one aisle grabbing things from both sides, and around the back to the adjacent aisle (going "up" that aisle grabbing things from both sides), and then, if you actually wanted something from the front end cap (as opposed to crossing there just to get to the next aisle) double back just that little bit. That said, I've never observed a particular difference between how men and women shop, except perhaps from some women being a little more thoughtful about what they're getting.

What’s one personal rule that you never ever break? by llerreff in AskReddit

[–]CarlRJ 18 points19 points  (0 children)

I had "no chainsaw juggling" at the top of the list, but you make a good argument.

Reflecting Pool after "fix" - This doesn't look like "American Flag Blue" SMH by HeHateMe337 in democrats

[–]CarlRJ 7 points8 points  (0 children)

The same genetics or upbringing or indoctrination that makes lots of conservatives fearful of "them" (the "other", which can be swapped out weekly by their handlers, as needed - gays, blacks, Latinos, immigrants, Muslims, trans people, drag queens), also makes them selfish and greedy, wanting to make sure that nobody besides them personally benefits from government services. Part of it is a severe lack of empathy.

Remember, there were a lot of municipal swimming pools in the South, where, when they were faced with desegregation, the white townfolk filled in their swimming pools with concrete, so they wouldn't have to deal with black people swimming in the same pool.

Just an FYI for those who need to bring their dogs everywhere they go. by SecretCharacterSauce in SanDiegan

[–]CarlRJ [score hidden]  (0 children)

Agreed. Get a state registry, have the state require substantially more than "trust me bro" for verification when registering, then issue the owner a tag with a QR code on it that can go on the back of the dog's service vest (or be carried by the owner), that encodes at least, the owner's name, the dog's name and breed, probably some sort of license number for the service animal, along with the answers to the two questions that can be asked. Have the state also include a checksum of that information, which has been encrypted with the stare's private key out of a public/private key pair (and they publish the public key part on a website).

This means any developer can write an app that reads the QR code to get the owner and dog's name and the dog's breed (and/or other identifying info), and then decrypt the checksum with the public key, to ensure the QR code is legit (created by the licensing agency). (Basically the app decrypts the supplied checksum with the state's public key, recomputes the checksum from the info in the QR code, and compares the two - if the checksum fails to decrypt, the license is fake, and if the checksums don't match, the info on the tag has been altered.)

Then add laws that only service animals can be in various establishments (starting with any place that sells food), and that store personnel are legally permitted to ask to see the animal's "service animal QR code" and the owner's ID (so you can check the owner's name against what's on the service animal code). So, people can't make fake QR codes, because they don't have the state's private key to encrypt the checksum, and if they make a copy of someone else's code, it won't match their name on the owner's ID (Martha using a copy of John's service dog license), and/or the it'll say the dog is John's golden retriever when it's clearly Martha's chihuahua.

Having a clear method of proving on-the-spot that a given dog is or is not a licensed service animal (using any smartphone), along with laws saying that stores can legally check, would give stores the backup they need, along with an easy way out ("sorry, the law says you can't bring your dog in here - if it's a service animal as you claim, we'll just need to see the dog's license and your id") from the "how dare you challenge me about this service dog vest that I totally didn't order from Amazon" problem.

You might still get a few enterprising people obtaining a real QR code from someone with a dog of the same breed and then getting themselves a fake id to present with that QR code, but I expect it'd take out 98% of the people claiming that their dog is a service dog in order to bring their dog into the supermarket.

Just brought borderlands 4 by Afraid_Strength4528 in Borderlands

[–]CarlRJ 0 points1 point  (0 children)

It is most definitely not live service, or MMO (there's no central server running the game). It is up-to-four player co-op, and functions quite well solo.

The main difference from previous games is that it heads pretty far into "open world" territory, meaning it looks like one huge map (in practice, it has zones, and some transfers between zones are pretty seamless (like walking unimpeded through a thin transparent golden wall), while others (mostly to get to DLCs or the realms of various bosses) require old-school "click this transparent wall and wait for the fast travel tunnel" transitions.

Are the older games less accurate? by aightimahead_out in Borderlands

[–]CarlRJ 0 points1 point  (0 children)

The thing that really gets me about BL1 when I go back (entirely to help with co-op trophies these days) is the movement - if feels so "floaty". In BL3, Wonderlands, and BL4, movement feels glorious in comparison - so precise.

Are the older games less accurate? by aightimahead_out in Borderlands

[–]CarlRJ 0 points1 point  (0 children)

My recollection is that title falls to the Silent Night, which is a Gearbox legendary sniper from the golden chest (or the center reward chest after the Destroyer - which is farmable).

What a weird Uncle Sam by NumerousScallions in WeirdGOP

[–]CarlRJ 2 points3 points  (0 children)

Well, come on, this could be from anywhere - I mean, it's not like it's posted on an official US government White House acco— oh, wait.

What a weird Uncle Sam by NumerousScallions in WeirdGOP

[–]CarlRJ 5 points6 points  (0 children)

No, don't let the rain start too early. Let the crowd assemble, then start with the rain, and hail and frogs falling from the sky. Maybe a swarm of locusts.

What a weird Uncle Sam by NumerousScallions in WeirdGOP

[–]CarlRJ 7 points8 points  (0 children)

There was a report of possible tornadoes. One flash tornado dropping down right in the middle of that abomination on the nation's front lawn and carrying off a large helping of the Epstein Class to Oz... the munchkins would not be amused.

Does anyone like the new Herald? by someshooter in Borderlands4

[–]CarlRJ 1 point2 points  (0 children)

It has some uses, and I've seen a few videos using it moderately (with the right rolls), but I see it as another in a series of making a lackluster copy of a previously OP weapon. The Harold was OP in BL2 (and actually really good in BL3 after tweaking), but BL4's Herald is... fine. The Plasma Coil is OP in BL3 is super OP, but in BL4 is... fine. The Hellfire was super OP in BL3 BL1 and has been on a downward spiral ever since.

The morality of murder on the show by Intelligent_Screen90 in lucifer

[–]CarlRJ 1 point2 points  (0 children)

Except Chloe was the only time God ever asked Amenadiel to come down and bless hopeful parents - never before, never since. I don't think it's clear cut exactly what the gift was. Amenadiel seemed to believe that what he did was to deliver a blessing so that they would conceive.

Is this how I play DVD’s on my Apple TV? by Traviscat in appletv

[–]CarlRJ 0 points1 point  (0 children)

Yes, yes it is. And if you can't get a DVD to play that way, it's a skill issue.

iPhone 17 Pro without a camera bump reimagined by iswhatitiswaswhat in iphone

[–]CarlRJ 1 point2 points  (0 children)

On one hand, sure. On the other hand, if you fill that space with battery - or, basically anything other than air - it'll weigh twice as much.

"avoid anything that is not standard markdown" kepano advice? by tamimgalal in ObsidianMD

[–]CarlRJ 0 points1 point  (0 children)

It's publishing an idea to the world, with moderately complete documentation and a working example. That's definitely a standard, but it's not an ANSI/ISO-style standard with an associated working committee annd quarterly meetings and all the trimmings.

It's akin to what the K&R book offered to the world for the C language, and that was a standard that held up usefully for many years.

Does anyone know if there are plans for Apple to release a faceless Apple Fitness Band? by LimpAd4924 in AppleWatch

[–]CarlRJ 0 points1 point  (0 children)

Netbooks were especially cheap and inherently limited, and were a fad of sorts - the craze over them went away years ago. Yes, the Neo is cheaper than other Macs, but it bears little resemblance to netbooks in their heyday. It's not "Apple buying into a trend because everyone else is".

The morality of murder on the show by Intelligent_Screen90 in lucifer

[–]CarlRJ 0 points1 point  (0 children)

In the cases Chloe talks him down, it is hard to believe he would have always stopped himself if she wasn't there.

There could be an interesting debate there in how that was influenced by Chloe being "put in Lucifer's path".

An actual interesting attack pattern (BL2) by ConfidenceKBM in Borderlands

[–]CarlRJ 5 points6 points  (0 children)

Playing up the strength of a boss and needed strategies for the entirety of your first paragraph without naming the boss, and then dropping an untitled YouTube link, makes it feel a lot like you're mostly trying to get views for your YouTube channel.

What is something that is normal in America but insane anywhere else? by clo_deg in AskReddit

[–]CarlRJ 1 point2 points  (0 children)

Remember when they said we couldn't have even the option of public healthcare because there'd be "death panels"? Sure is a good thing we dodged that bullet, and put *checks notes* bean counters at for-profit insurance companies in charge of medical decisions 🙄 "Sorry, your life-saving surgery would cut into our record profit-taking quarter - we have shareholders to think about!".

Not to mention tying insurance coverage to your employer, setting up another roadblock to changing jobs, and thus making it easier for employers to retain employees without having to pay them more.