Show newer

He still can't figure out the difference between moderation and censorship 🤦‍♂️

Steve Herman  
House Judiciary Committee Chairman Jim Jordan (R-OH) has sent a letter to #Meta CEO Mark Zuckerberg raising questions about potential censorship on...

@leclau @maxkennerly Competent employees? Office space that's actually paid for? Someone competent to run the show? All unnecessary luxuries for a multi-billion dollar tech company.

@maxkennerly "before we have the luxury of anything else" he says, as he chooses to hemorrhage additional money to paying thousands to some of the most despicable users of his free platform.

I made a robot that runs on physics, moving only through the application of force and torque. It's a bit top-heavy and wobbly when its turret is deployed though. Maybe I need to add training wheels...

@freemo @realcaseyrollins Is the repo open source? I might putter around in there if I have some free time...

@peterdrake It shouldn't, so long as unity's implementation of (Singleton == this) has its own null-check first, which it probably does, but I'm not sure.
So, the situation I'm concerned about would be that Singleton references a destroyed object. Running (Singleton == null) checks if it's null *or* destroyed, which prevents the second check. But I don't know if (Singleton == this) will also break out if it's null or if it will try to run a comparison op between a live object and a destroyed one (which would throw an error).

In other words, it's mostly just me being paranoid and defensively coding.

The endless spectacle of Twitter's crash and burn 

"Sir, advertisers are fleeing our platform like the plague, we've got crushing debt payments we can't afford, nobody here knows what all those semicolons are for in the code, and the sheriff is in the lobby right now saying we're being evicted for not paying rent! What do we do?!?"

Elon Musk: "Start giving handouts to rapists!"

independent.co.uk/tech/twitter

@peterdrake No, I don't think so. It would only be to check if a singleton from a previous execution context was still stored in the static reference.

But it's worth noting that there are a number of places where OnDestroy may *not* be called (mostly in-editor, not in-built-game, such as hard exits).

@peterdrake On 1, correct. That's why I usually make the singleton property a public get but a private set. With the pattern above, that achieves the same goals.

On 2, it's to specifically use Unity's overloaded null checks to make sure it's not pointing to a dead/destroyed reference before checking equality. I'm not sure if the straight equality check does that, so I added a null check as a short-circuit.

I wonder what percentage of people who think gender-affirming surgery is unnecessary and barbaric also think that circumcisions are perfectly fine...

once i develop object permanence, it's all over for y--WAIT WHERE'D YOU GO, WHAT IS HAPPENING

@jann Wait, how is not watching their shows supposed to support them? If anything, that just makes it more likely they'll be cancelled, right?

@peterdrake Basically, the key is to make sure to clean up after yourself since the editor won't do it for you. So, if you have a static score integer, make sure somebody's start function resets it to zero. Stuff like that.

@peterdrake Oh, you still have to use statics, you just have to be smart about it. This is the pattern I use that hasn't failed yet. Put it in the Start() function of MonoBehaviours. Try to avoid singletons of non-unity-managed-objects (you'd need a different pattern than the below).

if(Singleton == null)
{
Singleton = this;
DontDestroyOnLoad(gameObject);
}
else if(Singleton != this)
{
Destroy(gameObject); // two in scene
}

As long as you do that for Unity objects, that first null check will use Unity's override == check to also check for destroyed or unreferenceable objects.

And then in the Destroy function:

if(Singleton != null && Singleton == this)
{
Singleton = null;
}

@peterdrake Except then static variables persist between sessions, which can easily break poorly-implemented singleton patterns. Be *very* careful.

If your builds are taking a long time, I highly recommend letting unity refresh the Library folder (just close Unity, delete the library folder from your project, and re-open unity). It'll take Unity a while to rebuild that folder, but then script builds should be *much* faster for a while.

Show older
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.