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.
If I see Captain Anderson’s “NEED to KNOW BAsis” knife-hand animation, I’m going to shit.
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.
Listening to metal music with female singers, on two separate occasions. The first was Planet Hell by Nightwish (from the End of an Era concert), and the second one was either Eluveitie or Dalriada.
Never ask:
On second thought, ask all of those questions.
Host a multiplayer game and annoy the shit out of people
Date an audiophile and you’ll never run out of quality cables. If you’re lucky, they might even agree to flog you with the Stax Lambda’s flat ribbon cable.
I have an Xbox One controller. It worked well out of the box on my previous machine, but the current one somehow maps the buttons incorrectly when I connect with bluetooth. Installing the hid-xpadneo
kernel module (xpadneo-dkms
on the AUR), which is a driver specifically for Xbox controllers, fixed it completely.
It works flawlessly with everything I’ve tried, including emulators. The hardware is also extremely durable. It’s survived several drops over five years (bought it for Sekiro’s launch) and being mangled by a dog. The only disadvantage is the stupid fucking flimsy micro-USB port, but the newest Series models have USB-C. If you can, get a rechargeable battery pack and a charging dock.
If you care about repairability, it’s not the worst, but not particularly good either. Parts of the shell are held by plastic tabs that are easy to damage, the internals are all located on one PCB, and the wires to the haptic motors are soldered on.
That’s a fair point. I rarely read comments on news articles, but morbid curiosity overpowered my self-preservation instinct.
The comments under the article are a special kind of braindead.
It’s longer than you think.
(I have a severe irrational fear of teleportation)
Exhibit #1 of why every vote counts and every voter is needed.
I tried dual-booting Win10 and Arch for a few months. It was problematic.
I had to set the clock every time I switched because one expected the hardware clock to use UTC time and the other expected local time.
NTFS on Linux is not good. The driver works, but there are fundamental differences between NTFS and Unix-like filesystems that makes cooperation difficult (e.g. NTFS uses ACLs instead of the user/group ownership and user/group/others permissions of Unix). Windows also places additional restrictions on the filesystem (e.g. NTFS supports file names that contain :
, Windows doesn’t) that can completely bork the volume if violated.
But the worst offender, and what made me nuke Windows entirely, is Windows Update. It completely fucked up the boot partition, deleted the bootloader, then died and left Windows unusable.
These are all issues that can be solved, if you know how to solve them. My advice is to go cold turkey and delete Windows from your life.
Leah Rowe probably hasn’t stopped laughing since this was published.
You.
Are.
Late.
(man’s got the best teeth in two solar systems)
You’ve never done this?
Dude in the back is looking at the result with the same intensity as a teenager seeing boobs for the first time.
Also political memes.
And memes.
I’ve never seen that, even in university, and it would be equally as confusing without explanation.