#c11 — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #c11, aggregated by home.social.
-
“Bitfield Pitfalls”, Michal Necasek, OS/2 Museum (https://www.os2museum.com/wp/bitfield-pitfalls/).
Via HN: https://news.ycombinator.com/item?id=47469945
On Lobsters: https://lobste.rs/s/xtue97/bitfield_pitfalls
#C #Programming #BitFields #Gotchas #C89 #C11 #Bits #SystemsProgramming #Compilers
-
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 -
Pluralistic: Daily links from Cory Doctorow – No trackers, no ads. Black type, white background. Privacy policy: we don't collect or retain any data at all ever period. [Unofficial] @[email protected] ·Pluralistic: Disenshittification Nation (29 Jan 2026)
https://fed.brid.gy/r/https://pluralistic.net/2026/01/29/post-american-canada/
-
Pluralistic: Daily links from Cory Doctorow – No trackers, no ads. Black type, white background. Privacy policy: we don't collect or retain any data at all ever period. [Unofficial] @[email protected] ·Pluralistic: It's not normal (14 Jan 2026)
https://fed.brid.gy/r/https://pluralistic.net/2026/01/14/sole-and-despotic/
-
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 -
Коробка багов (взрывается): кроссплатформенное коварство
В сентябре мы рассматривали релиз 86Box v5.0, приуроченный к тридцати годам со дня выхода в розничную продажу Windows 95, и пообещали показать ещё кое-что. О чём мы сознательно умолчали, и почему оставили находку для отдельной статьи? Что осталось в "коробке"?
https://habr.com/ru/companies/pvs-studio/articles/963286/
#pvsstudio #86box #libc #glibc #freebsd #c11 #эмуляция #совершенный_код #стандарты_кодирования
-
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_torsize_tfor 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()andrend()):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()andend()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
-
"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."
https://pluralistic.net/2024/11/15/radical-extremists/#sex-pest
-
Some great points, some not so great ones:
“My Favorite C Programming Practices” [2014], Malcolm Inglis (https://github.com/mcinglis/c-style).
Via HN: https://news.ycombinator.com/item?id=40409956
#C #Programming #CProgramming #Style #CodingStyle #Guidelines #BestPractices #C11 #C17 #C99
-
Uff! This is a nasty & unexpected #bug in the #C11 specification 😰:
“Workarounds For C11 _Generic” [2023], Simon Tatham (https://www.chiark.greenend.org.uk/~sgtatham/quasiblog/c11-generic/).
Via Lobsters: https://lobste.rs/s/lqx0w5/workarounds_for_c11_generic
-
Turns out #Linux moved from C89 to #C11 a couple years back: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=50560ce6a0bdab2fc37384c52aa02c7043909d2c 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.)
-
Frama-C's new machdep mechanism allows users to more easily create their own machdeps (machine-dependent configuration files). With a #C11-compatible compiler, it's automatic! Check out our new blog post for more details: https://frama-c.com/2024/01/29/new-machdep.html
(And feel free to ask questions here, we'll try to answer them as best we can.)
-
@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 https://ici.radio-canada.ca/nouvelle/1974911/loi-radiodiffusion-reforme-netflix-youtube-spotify #C11
-
@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 👏🥳 https://www.noovo.info/nouvelle/ottawa-publie-ses-directives-au-crtc-pour-la-loi-sur-la-diffusion-continue-en-ligne.html
-
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
-
CRTC establishes new registration requirements arising from Bill C-11 for streaming services worldwide, including video and podcasters. Any service - alone or as a group - generating $10M+ in broadcast revenues in Canada must register by November 29, 2023.
https://twitter.com/CRTCeng/status/1707818973880823935 -
Watched Aaron Gunn's latest vid "The End of Free Speech in Canada" re Bill #C11, featuring intervus with #Poilievre, Ezra Levant, & #jordanpeterson.
But he expressed his concerns best on a panel at ManningCentre/Canada Strong&Free&Proud bunfest in March when he explained:
"A lot of people get their conservative content from US -Ben Shapiro, Joe Rogan-so they're going to bury all that deep on the algorithm if you're Canadian." #cdnpoli #rightwing
Interesting choice of attire for the promo btw -
As reported on by Louis Rossman, #YouTube is now pushing the same #payola scam that #Amazon #Kindle did.
https://www.youtube.com/watch?v=7wFqblQY6Dk
EEVBlog actually bought into this as an experiment and his video did WORSE than projected without ads
https://www.youtube.com/watch?v=bxvXaqJnSrY
I think I have an idea as to why. Do you remember how Canada Bill #C11 was going to screw over Canadian creators by having their videos served to people who don't want them? I think buying YouTube ads for your own video does the same thing.
-
I also care in all kinds of crazy ways about communications policy. I have an MA in Communication from #Stanford, and I spent 30 years as a working journalist, with the #CBC and #Postmedia among others. As a member the Transportation and Communications committee (aka #TRCM) I work on comms policy of all sorts, including the controversial #C11 #C18 and the issues involving #Meta #Facebook #Google #Alphabet etc. So if you are a comms policy wonk, please let's connect! #introduction #journalism
-
I want to share this provocative speech-turned-article from my friend, Senator @colindeacon about Bill C-18 and Google. An important read. https://www.policymagazine.ca/canada-needs-to-protect-weakening-news-outlets-will-bill-c-18-help-sustain-a-journalism-ecosystem/ #BillC18 #C18 #SenateofCanada #Google #Facebook #SenCa #Canada #cdnpoli #TRCM #C11 #BillC11 #AI