• 2 Posts
  • 269 Comments
Joined 1 year ago
cake
Cake day: June 15th, 2023

help-circle


  • Replacing /usr/bin/firefox doesn’t fix anything if you don’t restart Firefox itself.

    On my box updating firefox and then restarting it won’t even launch the new version because NixOS knows I’m logged in and won’t just change things in my environment. But unless there’s a kernel update yes nixos rebuild switch followed by logging out and logging in is equivalent to rebooting as it will automatically shut down and restart all system services, I think even systemd itself. Modulo some wibbles around kernel modules but those fall under kernel updates in my book.

    Contrast Ubuntu, which really likes to prompt your for reboots. The difference between a distro primarily for desktop use and one that can also do desktop because also devops want a desktop. Hey I could spin up 1000 cloud instances of my desktop with a couple of keystrokes isn’t that impressively useless :)


  • Data after dst+n is unchanged.

    Sure but that means the part before that is garbage because you have a null terminated string without terminator.

    Or at least that’s how I see it. If your intention isn’t to start and end with a null-terminated string you should be using memcpy. Let us not talk about situations where CHAR_BIT != 8 that’s not POSIX anyway.

    Even better, just avoid doing string manipulation in C.



  • barsoap@lemm.eetoProgrammer Humor@programming.devA Guessing Game
    link
    fedilink
    arrow-up
    6
    arrow-down
    3
    ·
    edit-2
    23 days ago

    How on earth should a newcomer know that the letter “n” in that word stands for number without having to google it?

    By looking at the difference between strcpy and strncpy. Preferably, though, you should simply learn C before writing C.

    The gist of is is that strcpy takes a null-terminated string and copies it somewhere, while strncpy takes a zero-terminated string and copies it somewhere but will not write more than n bytes. strncpy literally has exactly one more parameter than strcpy, that being n, hence the name. If n is smaller than the string length (as in: distance to first null byte) then you’re bound to have garbage in your destination, and to check for that you have to dereference the pointer strncpy returns and check if it’s actually null. Yay C error handling.

    In retrospect null-terminated strings were a mistake, but so were many other things, at some point you just have to accept that there’s hysterical raisins everywhere.




  • You can choose the former to an extent, but the latter is biologically inherited.

    So Obama isn’t African American, got it.

    The point is, people inherit physical characteristics common to their enthnicity

    Ethnicity is not genetic. Are you one of those yanks spewing nonsense such as “I’m 23% French that’s why I like mayonnaise”.

    “race is imaginary”

    That anyone said that is something you’re imagining. Also just because we’re imagining something doesn’t mean it’s not real. A judge is just a human in fancy clothes imagining to have power over you, try telling them that as a defendant they’ll be impressed at your reasoning skills. The bailiffs? Only imagining that they have to follow the judge’s orders.


  • Nationality =/= ethnicity.

    I never claimed them to be equal. Also, “Nordic” isn’t a nationality, Norwegian would be. If Harris was born in the US, moved to Norway when she was 3, went to school in Norway, studied in Norway, then returned to the US, what ethnicity do you think she would identify with? And yes bi-ethnic people exist, very common in fact because people do move around.

    You force migrant Africans to drown in the Mediterranean, get off your high horse dude.

    Did you just call me Italian. Or Greek. Or whatever. You force migrant Latinos to drown in the Rio Grande.

    You take a set of physical characteristics and common heritage and you classify people based on that.

    Why would you connect such unconnected things as phenotype and heritage? Why not have separate classifiers for both things? Why, then, on top of that, sort people into subcultures based on those classifiers?

    That’s the whole point of the phrase “race is a social construct”. Attacking the validity of race as a concept.

    Democracy is a social construct. Freedom is a social construct. The only thing that’s getting attack, and should and must be attacked, is a purported biological basis for ascribing properties to people based on phenotype because that’s complete BS. And with that, I repeat the Epictetus quote:

    These reasonings are unconnected: “I am richer than you, therefore I am better”; “I am more eloquent than you, therefore I am better.” The connection is rather this: “I am richer than you, therefore my property is greater than yours;” “I am more eloquent than you, therefore my style is better than yours.” But you, after all, are neither property nor style.

    Do you now, finally, understand what he’s saying there? The connection is not “You have black skin, therefore, you are African American”, the connection is rather “You have black skin, therefore, you get sunburnt less easy than me”.


  • As I have said, picking individual outliers does not invalidate a category.

    I didn’t say anything about validity.

    Probably not, but even if she could, she doesn’t have any Sicilian ancestry to my knowledge, so it would be inaccurate to call her Sicilian.

    So it would be inaccurate to call Obama African American because he has no slave ancestry?


    “African American” is a subculture identified with people freed from slavery. It is not a thing of ancestry, or Obama wouldn’t be part of it. It is not a matter of phenotype, or Harris wouldn’t be part of it. And both aren’t outliers, they’re simply prominent examples. At the same time, you have more recent African immigrants to the US who very much insist that they are not part of that group identity. Dunno how Obama’s father identified but he had that kind of heritage.

    Noone, at least no American, is questioning Harris’ and Obama’s identity as African American, and that’s precisely because it’s neither about ancestry nor phenotype but subcultural belonging. They’re African American because they stay vibing that way.

    She could call herself Nordic and we would laugh at her.

    Plenty of people with much darker skin in the Nordics. If she had gone to school and studied in Norway or something Nordic would be absolutely accurate. See here on the other side of the Atlantic we don’t sort ethnicities by phenotype because phenotype has nothing to do with ethnicity. Correlation, yes, causation, fuck no. Double triple fuck no. This man is Oldenburger. How could I claim otherwise his Low Saxon is better than mine! …and Harris is African American, even she doesn’t fit the phenotype, because it’s only correlation, and Obama is African American, he fits the phenotype and chose to vibe that way, but also might’ve chosen otherwise. Which probably would not have exactly been the path of least resistance because America, overall, is racist AF with their subcultural identifications.


  • YOU JUST FUCKING ASSERT THIS. FUCKING A PRIORI.

    No. Case in point: I mentioned how Harris has lighter skin than many a Sicilian, and also very much has a temperate climate nose. These are not, in the slightest, phenotype traits typical of sub-saharan Africa mostly Nigeria thereabouts where most of the slaves trafficked during the Atlantic slave trade where from.

    If you can’t see that then I suggest you visit an optometrist.

    If you pass as white you are, for all intents and purposes, white.

    Then why is Harris considered black? What does “passing” mean, here? Does it really have anything to do with phenotype, or is it cultural?

    But some humans have different numbers of fingers! Some have four,

    That’s a misexpression, the genome codes for five. And even then: Having six fingers is a physical, objective, trait. Harris being black isn’t, phenotypically she could just as well be Italian.


  • Or are Arabs Hispanic, too?

    Phenotypically? Yes, they’re very close. The whole Mediterranean is which shouldn’t be terribly surprising. I guess the reason USians use “Hispanic” and not “Greek” is because Mexico speaks Spanish.

    The reason Europeans can reliably tell Sicilians and Arabs apart is not because of phenotype, but because Arabs tend to look like they visit the barber five times a day. Probably because they do.


  • Well by that definition fucking everything is a social construct.

    Nope. That humans generally have five fingers is not a social construct, it’s an (emergent) property of our genome.

    Whether Harris is sorted into “white” or “black” OTOH is based on a social construct: The US’s conception of race is not based on physical traits but social realities. It harkens back to the one drop rule which is complete BS when it comes to biology, what matters in her being sorted into “black” is not her phenotype (quite light skin, temperate climate nose, …), but that a portion, at least a drop, of her ancestry comes from black slaves. That’s a social context, not a biological one.

    Even more obvious is Obama, actually: He’s not a descendant of slaves. So it’s not even heritage which dictates whether you’re black in the US, but whether your phenotype looks like you possibly could be.

    Let me end with Epictetus:

    These reasonings are unconnected: “I am richer than you, therefore I am better”; “I am more eloquent than you, therefore I am better.” The connection is rather this: “I am richer than you, therefore my property is greater than yours;” “I am more eloquent than you, therefore my style is better than yours.” But you, after all, are neither property nor style.


  • So you’re saying race == phenotype? Then you also have to say that race is a continuum, and, therefore, any arbitrary line on that continuum a social construct.

    Which is btw blindingly obvious to Europeans, Harris is white in my book: There’s plenty of Italians with darker skin. Funny how perception changes if you actually consider skin colour to be skin colour and not some grand overarching signifier for an in reality culturally defined group.


  • That’s just Algol instead of B. Most languages use the one or the other, then there’s sexpr-based languages (lisp, scheme), lua (technically Algol but not needing semicolons while also not needing newlines so it’s definitely special), and layout syntax (Haskell, or, if you want a bad implementation, python).


  • It’s not just old Haskell code that’s how you write Haskell if you want explicit braces. Well, mostly generate, but it’s still the idiomatic formatting (and when you generate you always generate braces because it’s easy to get layout subtly wrong when generating).

    Haskell also does the whole

    data Foo = Bar
             | Baz
             | Quux
    
    foo = [ Bar
          , Baz
          , Quux
          ]
    

    thing, makes sense to apply it to braces especially as they’re seen only very rarely. Single-line, yes, but not multi-line.



  • Should all be in place. Even nvidia driver support. It’s one of the rare cases where I actually support nvidia on a technical level, that is, having explicit sync is good. I can also understand that they didn’t feel like implementing proper implicit sync (hence all the tearing etc) when it’s a technically inferior solution.

    OTOH, they shouldn’t have bloody waited until now to get this through. Had they not ignored wayland for a literal decade this all could’ve been resolved before it became an issue for end-users.