home.social

#c11 — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #c11, aggregated by home.social.

  1. The C11 specification from #wg14 is so dreadful, so full of dumb ideas badly explained, as to shock the conscience
    #computerscience #programming #Clanguage #c11 #wg14

  2. The C11 specification from #wg14 is so dreadful, so full of dumb ideas badly explained, as to shock the conscience
    #computerscience #programming #Clanguage #c11 #wg14

  3. The C11 specification from #wg14 is so dreadful, so full of dumb ideas badly explained, as to shock the conscience
    #computerscience #programming #Clanguage #c11 #wg14

  4. The C11 specification from #wg14 is so dreadful, so full of dumb ideas badly explained, as to shock the conscience
    #computerscience #programming #Clanguage #c11 #wg14

  5. The C11 specification from #wg14 is so dreadful, so full of dumb ideas badly explained, as to shock the conscience
    #computerscience #programming #Clanguage #c11 #wg14

  6. These are not part of the C standard, rather, they’re part of GNU C. In other words, the Linux kernel source cannot be compiled by a compiler that implements the ISO C standard only (e.g., #C99 or #C11) without the GNU extensions. The #Linux kernel doesn’t compile with “standard C”—it compiles with GNU C.
    3/4

  7. These are not part of the C standard, rather, they’re part of GNU C. In other words, the Linux kernel source cannot be compiled by a compiler that implements the ISO C standard only (e.g., #C99 or #C11) without the GNU extensions. The #Linux kernel doesn’t compile with “standard C”—it compiles with GNU C.
    3/4

  8. These are not part of the C standard, rather, they’re part of GNU C. In other words, the Linux kernel source cannot be compiled by a compiler that implements the ISO C standard only (e.g., #C99 or #C11) without the GNU extensions. The #Linux kernel doesn’t compile with “standard C”—it compiles with GNU C.
    3/4

  9. These are not part of the C standard, rather, they’re part of GNU C. In other words, the Linux kernel source cannot be compiled by a compiler that implements the ISO C standard only (e.g., #C99 or #C11) without the GNU extensions. The #Linux kernel doesn’t compile with “standard C”—it compiles with GNU C.
    3/4

  10. Коробка багов (взрывается): кроссплатформенное коварство

    В сентябре мы рассматривали релиз 86Box v5.0, приуроченный к тридцати годам со дня выхода в розничную продажу Windows 95, и пообещали показать ещё кое-что. О чём мы сознательно умолчали, и почему оставили находку для отдельной статьи? Что осталось в "коробке"?

    habr.com/ru/companies/pvs-stud

    #pvsstudio #86box #libc #glibc #freebsd #c11 #эмуляция #совершенный_код #стандарты_кодирования

  11. Коробка багов (взрывается): кроссплатформенное коварство

    В сентябре мы рассматривали релиз 86Box v5.0, приуроченный к тридцати годам со дня выхода в розничную продажу Windows 95, и пообещали показать ещё кое-что. О чём мы сознательно умолчали, и почему оставили находку для отдельной статьи? Что осталось в "коробке"?

    habr.com/ru/companies/pvs-stud

    #pvsstudio #86box #libc #glibc #freebsd #c11 #эмуляция #совершенный_код #стандарты_кодирования

  12. Коробка багов (взрывается): кроссплатформенное коварство

    В сентябре мы рассматривали релиз 86Box v5.0, приуроченный к тридцати годам со дня выхода в розничную продажу Windows 95, и пообещали показать ещё кое-что. О чём мы сознательно умолчали, и почему оставили находку для отдельной статьи? Что осталось в "коробке"?

    habr.com/ru/companies/pvs-stud

    #pvsstudio #86box #libc #glibc #freebsd #c11 #эмуляция #совершенный_код #стандарты_кодирования

  13. Коробка багов (взрывается): кроссплатформенное коварство

    В сентябре мы рассматривали релиз 86Box v5.0, приуроченный к тридцати годам со дня выхода в розничную продажу Windows 95, и пообещали показать ещё кое-что. О чём мы сознательно умолчали, и почему оставили находку для отдельной статьи? Что осталось в "коробке"?

    habr.com/ru/companies/pvs-stud

    #pvsstudio #86box #libc #glibc #freebsd #c11 #эмуляция #совершенный_код #стандарты_кодирования

  14. Reverse Iterations

    Sometimes, we all need a way to iterate over a container in the opposite direction. There are several ways to reverse-iterate a container, and in this article, we’ll explore them.

    Index Iteration

    Probably the simplest way, taken from C is to iterate using an index location:

    for (int64_t index = ssize(container) - 1; index >= 0; --index) {    // do something with `container[index]`}

    This way is highly not recommended as it might lead to infinite loops if done incorrectly (for example by using uint64_t or size_t for the index type), and you can find more issues with this way in some previous articles about iterators in this blog.

    Reverse Iterators

    Another way to iterate a container is by using reverse iterators (rbegin() and rend()):

    for (auto it = container.rbegin(); it != container.rend(); ++it) {    // do something with `*it`}

    This is a more recommended way, but it might be a little bit frustrating compared to a regular for-range loop:

    for (auto elem : container) { /*do something with `elem`*/ }

    The closest way to this method using the standard (before C++20) is:

    std::for_each(container.rbegin(), container.rend(), [](auto elem) {    // so something with `elem`});

    Ranges (C++20)

    If you are using the ranges library, or using at least C++20, you can use the following method to iterate a container in reverse order:

    for (auto elem : container | std::views::reverse) {    // do something with `elem`}

    Custom Reverse Container View

    Another way to use the for-range loop (even if you don’t use C++20 or the ranges library), is to create your own container mask, to modify the behavior of the begin() and end() functions:

    template <typename T>class reverse_view {public:    reverse_view(T& cont) : container(&cont) {}        typename T::reverse_iterator begin() { return container->rbegin(); }    typename T::reverse_iterator end() { return container->rend(); }    private:    T* container;};

    Then, you’ll be able to use it like that:

    std::vector<int> container = {1, 2, 3, 4, 5};for (int elem : reverse_view(container)) {    std::cout << elem << ", ";}

    More Ways

    I hope you learned something new, and feel free to share in the comments if you know other ways to reverse-iterate over a container.

    #advanced #C_ #c11 #c14 #c17 #c20 #containers #Intermediate #Iterators #ranges #reverse #reverseIterators

  15. "Canadians could enjoy the resliency that comes of having a domestic tech and repair sector, and could count on it through pandemics and Trumpian trade-war.

    All of that and more could be ours, except for the cowardice and greed of Tony Clement and James Moore and the Harper Tories who voted C-11 into law in 2012.

    Everything the "radical extremists" warned them of has come true. It's long past time Canadians tore up anticircumvention law and put the interests of the Canadian public and Canadian tech businesses ahead of the rent-seeking enshittification of American Big Tech.

    Until we do that, we can keep on passing all the repair and interop laws we want, but each one will be hamstrung by Moore and Clement's "felony contempt of business model" law, and the contempt it showed for the Canadian people."

    pluralistic.net/2024/11/15/rad

    #Canada #USA #RightToRepair #Interoperability #C11 #BigTech

  16. "Canadians could enjoy the resliency that comes of having a domestic tech and repair sector, and could count on it through pandemics and Trumpian trade-war.

    All of that and more could be ours, except for the cowardice and greed of Tony Clement and James Moore and the Harper Tories who voted C-11 into law in 2012.

    Everything the "radical extremists" warned them of has come true. It's long past time Canadians tore up anticircumvention law and put the interests of the Canadian public and Canadian tech businesses ahead of the rent-seeking enshittification of American Big Tech.

    Until we do that, we can keep on passing all the repair and interop laws we want, but each one will be hamstrung by Moore and Clement's "felony contempt of business model" law, and the contempt it showed for the Canadian people."

    pluralistic.net/2024/11/15/rad

    #Canada #USA #RightToRepair #Interoperability #C11 #BigTech

  17. "Canadians could enjoy the resliency that comes of having a domestic tech and repair sector, and could count on it through pandemics and Trumpian trade-war.

    All of that and more could be ours, except for the cowardice and greed of Tony Clement and James Moore and the Harper Tories who voted C-11 into law in 2012.

    Everything the "radical extremists" warned them of has come true. It's long past time Canadians tore up anticircumvention law and put the interests of the Canadian public and Canadian tech businesses ahead of the rent-seeking enshittification of American Big Tech.

    Until we do that, we can keep on passing all the repair and interop laws we want, but each one will be hamstrung by Moore and Clement's "felony contempt of business model" law, and the contempt it showed for the Canadian people."

    pluralistic.net/2024/11/15/rad

    #Canada #USA #RightToRepair #Interoperability #C11 #BigTech

  18. "Canadians could enjoy the resliency that comes of having a domestic tech and repair sector, and could count on it through pandemics and Trumpian trade-war.

    All of that and more could be ours, except for the cowardice and greed of Tony Clement and James Moore and the Harper Tories who voted C-11 into law in 2012.

    Everything the "radical extremists" warned them of has come true. It's long past time Canadians tore up anticircumvention law and put the interests of the Canadian public and Canadian tech businesses ahead of the rent-seeking enshittification of American Big Tech.

    Until we do that, we can keep on passing all the repair and interop laws we want, but each one will be hamstrung by Moore and Clement's "felony contempt of business model" law, and the contempt it showed for the Canadian people."

    pluralistic.net/2024/11/15/rad

    #Canada #USA #RightToRepair #Interoperability #C11 #BigTech

  19. "Canadians could enjoy the resliency that comes of having a domestic tech and repair sector, and could count on it through pandemics and Trumpian trade-war.

    All of that and more could be ours, except for the cowardice and greed of Tony Clement and James Moore and the Harper Tories who voted C-11 into law in 2012.

    Everything the "radical extremists" warned them of has come true. It's long past time Canadians tore up anticircumvention law and put the interests of the Canadian public and Canadian tech businesses ahead of the rent-seeking enshittification of American Big Tech.

    Until we do that, we can keep on passing all the repair and interop laws we want, but each one will be hamstrung by Moore and Clement's "felony contempt of business model" law, and the contempt it showed for the Canadian people."

    pluralistic.net/2024/11/15/rad

    #Canada #USA #RightToRepair #Interoperability #C11 #BigTech

  20. Turns out #Linux moved from C89 to #C11 a couple years back: git.kernel.org/pub/scm/linux/k It's quite surprising; I thought they'x upgrade only if GCC dropped support for C89 :D

    (I'm catching up on my Pocket archive, can you tell? BTW I still find #LWN the best source of inspiration for good software engineering. Just read some, and you're guaranteed to experience an urge to roll up your sleeves and go hack on something.)

  21. Turns out #Linux moved from C89 to #C11 a couple years back: git.kernel.org/pub/scm/linux/k It's quite surprising; I thought they'x upgrade only if GCC dropped support for C89 :D

    (I'm catching up on my Pocket archive, can you tell? BTW I still find #LWN the best source of inspiration for good software engineering. Just read some, and you're guaranteed to experience an urge to roll up your sleeves and go hack on something.)

  22. Turns out #Linux moved from C89 to #C11 a couple years back: git.kernel.org/pub/scm/linux/k It's quite surprising; I thought they'x upgrade only if GCC dropped support for C89 :D

    (I'm catching up on my Pocket archive, can you tell? BTW I still find #LWN the best source of inspiration for good software engineering. Just read some, and you're guaranteed to experience an urge to roll up your sleeves and go hack on something.)

  23. Turns out #Linux moved from C89 to #C11 a couple years back: git.kernel.org/pub/scm/linux/k It's quite surprising; I thought they'x upgrade only if GCC dropped support for C89 :D

    (I'm catching up on my Pocket archive, can you tell? BTW I still find #LWN the best source of inspiration for good software engineering. Just read some, and you're guaranteed to experience an urge to roll up your sleeves and go hack on something.)

  24. Turns out #Linux moved from C89 to #C11 a couple years back: git.kernel.org/pub/scm/linux/k It's quite surprising; I thought they'x upgrade only if GCC dropped support for C89 :D

    (I'm catching up on my Pocket archive, can you tell? BTW I still find #LWN the best source of inspiration for good software engineering. Just read some, and you're guaranteed to experience an urge to roll up your sleeves and go hack on something.)

  25. Frama-C's new machdep mechanism allows users to more easily create their own machdeps (machine-dependent configuration files). With a -compatible compiler, it's automatic! Check out our new blog post for more details: frama-c.com/2024/01/29/new-mac

    (And feel free to ask questions here, we'll try to answer them as best we can.)

  26. @mimo @Carl (2) 27 avril 2023: "La réforme de la Loi sur la radiodiffusion intégrant des plateformes comme Netflix, #YouTube et #Spotify obtient finalement l'aval du Sénat et pourra devenir réalité." Source: Radio-Canada ici.radio-canada.ca/nouvelle/1 #C11

  27. @mimo @Carl (2) 27 avril 2023: "La réforme de la Loi sur la radiodiffusion intégrant des plateformes comme Netflix, #YouTube et #Spotify obtient finalement l'aval du Sénat et pourra devenir réalité." Source: Radio-Canada ici.radio-canada.ca/nouvelle/1 #C11

  28. @mimo @Carl (2) 27 avril 2023: "La réforme de la Loi sur la radiodiffusion intégrant des plateformes comme Netflix, #YouTube et #Spotify obtient finalement l'aval du Sénat et pourra devenir réalité." Source: Radio-Canada ici.radio-canada.ca/nouvelle/1 #C11

  29. @Carl On avait déjà perdu le droit de partager des lien de nouvelles. Bientôt, on ne pourra plus écouter Spotify sans VPN. Bravo, champions! #C11 👏🥳 noovo.info/nouvelle/ottawa-pub

  30. @Carl On avait déjà perdu le droit de partager des lien de nouvelles. Bientôt, on ne pourra plus écouter Spotify sans VPN. Bravo, champions! #C11 👏🥳 noovo.info/nouvelle/ottawa-pub

  31. @Carl On avait déjà perdu le droit de partager des lien de nouvelles. Bientôt, on ne pourra plus écouter Spotify sans VPN. Bravo, champions! #C11 👏🥳 noovo.info/nouvelle/ottawa-pub

  32. Andrew Coyne very clearly articulates why the Canadian goverment's #C11 #LinkTax and #C18 internet #CanCon bills are actively harmful to Canadians and our access to #journalism and the #internet generally. Certainly we have challenges to face on these issues, but a good start would be not making things worse with misguided and heavy-handed regulations

    theglobeandmail.com/opinion/ar

    #paywall

  33. Andrew Coyne very clearly articulates why the Canadian goverment's #C11 #LinkTax and #C18 internet #CanCon bills are actively harmful to Canadians and our access to #journalism and the #internet generally. Certainly we have challenges to face on these issues, but a good start would be not making things worse with misguided and heavy-handed regulations

    theglobeandmail.com/opinion/ar

    #paywall