home.social

#languagelawyering — Public Fediverse posts

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

  1. OK, #C23 #stdckdint #ckd_add () and friends look pretty freaking cool. I spam my own code as copypasta for detecting #wraparound with unsigned integer types in network protocol sequence number spaces, but the #semantics are pretty much lifted straight from #rfc3626 anyway. Maybe I should give it the C23 and C++26 template method treatment. gustedt.gitlabpages.inria.fr/c @JensGustedt @wdtz #languagelawyering

  2. @JensGustedt @wdtz So #C23 adds #memalignment (), defined in <stdlib.h> as a regular function (think side-effects and correctness); it takes the 2's complement negation of the input expressed as a #uintptr_t and masks it against the input. cgit.freebsd.org/src/tree/lib/ #FreeBSD picks it up in #libc from 15.1 and up, so it won't be in the man index until the release: freebsd.org/releases/15.1R/sch #languagelawyering

  3. Thanks to @JensGustedt TIL that C++26 also introduces native support for #C23 checked #integer #arithmetic functions, as defined in the <stdckdint.h> compatibility header. These are peripherally related to the (bleeding edge) #saturation arithmetic functions defined in the C+26 version of the <numeric> header: en.cppreference.com/cpp/numeric (You might not find these in your system headers unless you have a seriously up to date #LLVM or #GCC ) @wdtz #languagelawyering

  4. Thanks to @JensGustedt TIL that C++26 also introduces native support for #C23 checked #integer #arithmetic functions, as defined in the <stdckdint.h> compatibility header. These are peripherally related to the (bleeding edge) #saturation arithmetic functions defined in the C+26 version of the <numeric> header: en.cppreference.com/cpp/numeric (You might not find these in your system headers unless you have a seriously up to date #LLVM or #GCC ) @wdtz #languagelawyering

  5. Thanks to @JensGustedt TIL that C++26 also introduces native support for #C23 checked #integer #arithmetic functions, as defined in the <stdckdint.h> compatibility header. These are peripherally related to the (bleeding edge) #saturation arithmetic functions defined in the C+26 version of the <numeric> header: en.cppreference.com/cpp/numeric (You might not find these in your system headers unless you have a seriously up to date #LLVM or #GCC ) @wdtz #languagelawyering

  6. Thanks to @JensGustedt TIL that C++26 also introduces native support for #C23 checked #integer #arithmetic functions, as defined in the <stdckdint.h> compatibility header. These are peripherally related to the (bleeding edge) #saturation arithmetic functions defined in the C+26 version of the <numeric> header: en.cppreference.com/cpp/numeric (You might not find these in your system headers unless you have a seriously up to date #LLVM or #GCC ) @wdtz #languagelawyering

  7. Thanks to @JensGustedt TIL that C++26 also introduces native support for #C23 checked #integer #arithmetic functions, as defined in the <stdckdint.h> compatibility header. These are peripherally related to the (bleeding edge) #saturation arithmetic functions defined in the C+26 version of the <numeric> header: en.cppreference.com/cpp/numeric (You might not find these in your system headers unless you have a seriously up to date #LLVM or #GCC ) @wdtz #languagelawyering