• 0 Posts
  • 110 Comments
Joined 3 years ago
cake
Cake day: June 18th, 2023

help-circle

  • mkwt@lemmy.worldtoProgrammer Humor@programming.dev< :-( >
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    23 hours ago

    In C and C++, the source character set is implementation defined. This means that each compiler sets its own rules about what characters are accepted. For example compilers could choose to accept ASCII or EBCDIC or Unicode, or some combination, etc.

    So the ISO standard will say that ; character is the end of statement punctuation. But it is up to the compiler to say which character(s) or code point(s) represent the ISO ;.

    The ISO standards also require compilers to define a separate execution character set to specify values that can be stored in char and used with the string library functions. The execution character set doesn’t have to be the same as the source character set.

    Edit: I should also mention that the rules for this stuff are changing a lot in ISO C23 and C++23. (Which standards I haven’t yet personally adopted.) Basically the ISO 23 standards mandate compilers to support UTF-8 source files, and they map every source character in the ISO standard to its corresponding Unicode character.








  • There is no reason to have 50 separate curriculums. The ONLY reason that exists is so MAGA states can use the schools to indoctrinate American schoolchildren

    That’s not the only reason. There are in fact principles of federalism, and there’s the 10th amendment to the constitution. Educating the public is not one of the 17 enumerated powers granted to Congress in article I. Under the 10th, powers that are not granted to the national government are reserved to the states or to the people.

    This is why the national government’s regulation of education is based around carrots in the form of block grants that states apply for. Not enforcement sticks.



  • A spinning circle requires just two threads, one to do the work and one to spin the circle. And they don’t have to talk to each other.

    A progress bar is the same thing, but now the work thread has to periodically communicate the progress to the bar thread, and inter-thread synchronization has to be setup. And how do you know how much progress a single file transfer represents? Or how many progress points is a registry edit versus a file transfer? It’s hard to figure out in advance, which is why so many progress bars are shitty estimates of progress.










  • That region of origin protection does not extend to the United States.

    In the US, “parmesan” can legally be just about any kind of cheese made in any location (mostly Wisconsin), as long as it is aged at least 10 months, and not more than 32% moisture. “Parmigiano Reggiano” and some other specific trademarks are protected terms in the US that mean the same as they do in Europe.