Pascal uses =
for comparison (and :=
for assignment), which confused the fuck out of me when I switched to C.
I take my shitposts very seriously.
Pascal uses =
for comparison (and :=
for assignment), which confused the fuck out of me when I switched to C.
It’s a convention set by early programming languages.
In most C-like languages, if (a = b)...
is also a valid comparison. The =
(assignment) operation returns the assigned value as a result, which is then converted to a boolean value by the if
expression. Consider this Javascript code:
let a = b = 1
b
variable and assigns it the value of the expression 1
, which is one.b = 1
, which is the assigned value, which is 1
.a
variable and assigns the previously returned value, which is 1
.Another example:
let a = 1
let b = 2
let c = 3
console.log(a == b) // prints "false" because the comparison is false
console.log(a = b) // prints 2 because the expression returns the value of the assignment, which is 'b', which is 2
// Using this in an 'if' statement:
if (b = c) { // the result of the assignment is 3, which is converted to a boolean true
console.log("what")
}
You can’t do the same in Python (it will fail with a syntax error), but it’s better to adhere to convention because it doesn’t hurt anyone, but going against it might confuse programmers who have greater experience with another language. Like I was when I switched from Pascal (which uses =
for comparison and :=
for assignment) to C.
The wonders of running everything synchronously in the UI event loop…
Ah yes, “the devs”. What percentage of the profit do you think goes to the gameplay developers, the backend developers, the designers, the character artists, the environment artists, the QA team, the writers, the voice talent, the localization teams, and the other roles too numerous to list but too important to ignore, that actually create the game? In contrast, how much do the executives, managers, and parasites shareholders pocket?
Even if you assume a fair division between all people, just look at how long the credits list is. The average developer employee won’t go hungry because a couple hundred players stop buying gamble coins.
“No way to prevent this” says the country where this regularly hap–
Oh wait, it’s looting. Sorry, force of habit.
Thanks, but that’s the same one that I found. It removes the power button from the start menu and disables the shutdown
command, but the computer still responds to ACPI and even the keyboard’s power-off button.
If I see Captain Anderson’s “NEED to KNOW BAsis” knife-hand animation, I’m going to shit.
Recall is not mandatory after all. https://www.youtube.com/watch?v=gBqIUkmVel8
Recall and the new file explorer share a dependency, except the file explorer doesn’t mark it as a dependency, so when Recall is removed, it is removed as well. Good job, Microsoft.
It makes sense if you represent complex numbers as (a, b)
pairs, where a
is the real part and b
is the imaginary part (just like the popular a + bi
representation that can be expanded to a * (1, 0) + b * (0, 1)
). AB’s length is (1, 0)
, AC’s length is (0, 1)
, and BC’s length will also be a complex number.
I think.
There are use-cases where a computer should not be turned off by its user for the purpose of remote management. I’m dealing with one just as I’m writing this comment.
There’s an exam in a classroom. In 20 minutes I’ll have to run an ansible script to remove this group’s work, clean up the project directory, and rollback two VMs to the prepared snapshot to get ready for the next group. I’ve put a big-ass banner on the wallpaper telling the students not to shut down the computer, and already half of them are off.
Unacceptable: “You look submissive and enslaveable.”
Acceptable: “You look just like an elf.”
Mainly because our students are idiots and will complain if the computer doesn’t turn off. Or worse, take independent action and hold the power button, or actually yank the power cable. Maybe I should just lean into it and convince them that the monitor is the computer.
Jokes aside, how could I implement such a policy? I’ve only found one that hides the power buttons from the start menu, but Windows still responds to ACPI.
I don’t know if clean ZSH does it, but if you have the zsh-syntax-highlighting plugin, it tests if the path you’re typing exists every time you edit the line.
As another IT guy at a university, having to manually turn on 30 computers in a classroom for updates or whatever is already a pain in the ass. Wake on LAN is not a reliable solution. Havin to manually flip over every box, then putting them down, and then fixing the cables that got yanked… I’d throw those fuckers in the trash.
The Dell Optiplex 3080 Micro’s form factor is perfectly tiny without compromising user comfort.
Ah yes.
/* return an item's property as identified by 'prop' */
prop_t* getItemProperty(item_t* item, char* prop)
The floor is made of floor.
The 5V applies only to 4-pin type-A and type-B connectors.
USB Power Delivery over a regular USB-C-compliant cable delivers a variable current of up to 3A, using discrete voltages of 5V for up to 15W of power, 9V for up to 27W, 12V for up to 48W, and 20V for up to 60W.
Higher powers require dedicated USB PD-compliant cables that can handle up to 240W at a voltage of 48V.
My uneducated guess is money.
Manufacturers likely have factories (either theirs or a contracted company’s) where they can mass produce the power bricks for a low cost. Upgrading to a USB power supply doesn’t offer significant benefits compared to the power brick of similar wattage, and the up-front cost of setting up a new supplier is financially unjustified. The old technology works just as well, so why change?
High power USB is still a relatively new technology. I’m sure it will proliferate, but the consumer market has a fuckton of inertia.
Students here usually get Mondays off when the next Tuesday is a holiday. As a university sysadmin, I cherish those days because that’s when we can get actual work done without having to work around the chaotic classroom reservations or work in ten-minute bursts during breaks. It’s also when we can implement changes to the network and update the servers because the office workers don’t tend to come in.
The last time that happened, all of us sysadmins did about three months’ worth of actual work in a few hours, then used the smaller lecture hall as a cinema for the rest of the day.
All of the characters look like they came straight outta Shrek 2.
I’ve never seen that, even in university, and it would be equally as confusing without explanation.