Compiler Engineer clang front end. Interests: C++, C, and undefined behavior. Martial Artist, Book Worm and Dad

Blog: https://shafik.github.io/
Bsky: https://bsky.app/profile/shafik.bsky.social (@shafik.bsky.social)
Twitter: https://twitter.com/shafikyaghmour (@shafikyaghmour)

This profile is from a federated server and may be incomplete. View on remote instance

@shafik@hachyderm.io avatar shafik , to random

This is a damning article from the Wikipedia editors on GenAI articles written for Wikipedia: https://wikiedu.org/blog/2026/01/29/generative-ai-and-wikipedia-editing-what-we-learned-in-2025/

ALT
@shafik@hachyderm.io avatar shafik , to random

Retro C++ quiz

<iostream>
<string>

int main() {
using namespace std::string_literals;
std::string s1("hello world",5);
std::string s2("hello world"s,5);

std::cout<<s1<<s2; // What is the output?
}

Without checking:

A. hellohello
B. world world
C. hello world
D. worldhello


@shafik@hachyderm.io avatar shafik , to random

There is nothing like the scorn of a developer who bought into something and then realizes that they were very wrong.

"Where's the Shovelware? Why AI Coding Claims Don't Add Up": https://mikelovesrobots.substack.com/p/wheres-the-shovelware-why-ai-coding

My argument: If so many developers are so extraordinarily productive using these tools, where is the flood of shovelware? We should be seeing apps of all shapes and sizes, video games, new websites, mobile apps, software-as-a-service apps — we should be drowning in choice. We should be in the middle of an indie software revolution. We should be seeing 10,000 Tetris clones on Steam. Consider this: with all you know about AI-assisted coding and its wide adoption, if I showed you charts and graphs of new software releases across the world, what shape of that graph would you expect? Surely you’d be seeing an exponential growth up-and-to-the-right as adoption took hold and people started producing more?

ALT
@thomasfuchs@hachyderm.io avatar thomasfuchs , to random

So these people charge money for their super serious reporting

ALT
shafik ,
@shafik@hachyderm.io avatar

@thomasfuchs @glennf

I don't think it is that they don't care, it is safe to stay within a particularly framing because that is what everyone is else is doing.

Standing out from the crowd means being wrong carries a much greater penalty.

It is a variation of "Nobody ever gets fired for buying IBM"

Having a solid tech reporting team that had the depth to stick their necks out would require significant investment.

@shafik@hachyderm.io avatar shafik , to random

"The Illusion of Thinking: Understanding the Strengths and Limitations of Reasoning Models via the Lens of Problem Complexity": https://machinelearning.apple.com/research/illusion-of-thinking

Nothing surprising for me here but I salute the folks willing to go against the grain and ask the hard questions. Folks can now look at this work and maybe have a better answer to how limited these models really are.

ALT
@shafik@hachyderm.io avatar shafik , to random

Click on your old gobolt/g links to preserve them: https://xania.org/202505/compiler-explorer-urls-forever

Bring out your old godbolt links

@shafik@hachyderm.io avatar shafik , to random

Stackoverflow bans LLMs: https://meta.stackoverflow.com/q/421831/1708801

I missed this but still important news.

There is nothing shocking in the rationale, the quality is just not high enough and the content just sounds right enough that the effort to review swamps out good content.

ALT
@shafik@hachyderm.io avatar shafik , to random

Talk about saying the quiet part out loud.

Folks who don't understand AI like it more but once they understand it they find it less appealing. SOOOOOO companies should target low literacy customers and keep folks ignorant

https://journals.sagepub.com/doi/10.1177/00222429251314491

Like wow 🤯

ALT
@shafik@hachyderm.io avatar shafik , to random

Teen Vogue yet again doing the needed work that few others in the media seem willing to do.

https://www.teenvogue.com/story/ice-watch-programs-immigrants-how-to-start

@molly0xfff@hachyderm.io avatar molly0xfff , to random

somewhere, someone is trying to dig through my years of wikipedia editing history to prove my sinister influence, only to be driven mad by having to paw through reams of edits on things like figuring out how we should spell the name of Michael Keaton’s character in Beetlejuice

shafik ,
@shafik@hachyderm.io avatar

@molly0xfff so if you edit Beetlejuice three times does that summon him?

@molly0xfff@hachyderm.io avatar molly0xfff , to random
shafik ,
@shafik@hachyderm.io avatar

@molly0xfff not being able to quote toot is so frustrating.

shafik ,
@shafik@hachyderm.io avatar

@molly0xfff folks need to step up and donate more.

@regehr@mastodon.social avatar regehr , to random

I went to find awesome floating point bit tricks and found a pile of UB :(

https://karmafx.net/docs/karmafx_floattricks.pdf

ALT
shafik ,
@shafik@hachyderm.io avatar

@regehr

-fno-strict-aliasing FTW 😭

@eniko@peoplemaking.games avatar eniko , to random

i love programming C

ALT
shafik ,
@shafik@hachyderm.io avatar

@eniko

not that we don't have a ton of cursed code in C but this is a MSVC/Windows problem not a C problem.

This is also a problem that intellisense has a different frontend 😱

@shafik@hachyderm.io avatar shafik , to random

Quip on double negation from “Says Who”

ALT
@chandlerc@hachyderm.io avatar chandlerc , to random

So, just for the sake of curiosity -- how bad is it to create a 563486 character long string literal?

Clang very helpfully tells me that it exceeds the maximum length guaranteed to work -- 64k -- but c'mon, do any compilers really care?

I'm feeling lazy about building the compiler-explorer example that checks this...

shafik ,
@shafik@hachyderm.io avatar

@chandlerc

The compiler is trying to be helpful Chandler 🧐

I would be curious how the other implementations handle it though if you ever feel up to creating a minimal reproducer.

@shafik@hachyderm.io avatar shafik , to random

Crazy graphic of the day.

Wage theft greatly eclipses all other forms of theft value: https://www.tcworkerscenter.org/2018/09/wage-theft-vs-other-forms-of-theft-in-the-u-s/

ALT
@shafik@hachyderm.io avatar shafik , to random

I meet a microbiologist today

They were wag BIGGER than I expected 🥁

@shafik@hachyderm.io avatar shafik , to random

AI power center usage is causing the life of some coal power plants to be extended: https://wapo.st/3KSgQxx

It found data centers will account for 8 percent of total electricity use in the United States by 2030, a near tripling of their share today. New solar and wind energy will meet about 40 percent of that new power demand from data centers, the forecast said, while the rest will come from a vast expansion in the burning of natural gas. The new emissions created would be comparable to that of putting 15.7 million additional gas-powered cars on the road. “We all want to be cleaner,” Brian Bird, president of NorthWestern Energy, a utility serving Montana, South Dakota and Nebraska, told a recent gathering of data center executives in Washington, D.C. “But you guys aren’t going to wait 10 years … My only choice today, other than keeping coal plants open longer than all of us want, is natural gas. And so you’re going see a lot of natural gas build out in this country.”

ALT
@shafik@hachyderm.io avatar shafik , to random

TIL Binet's Formula for calculating the Nth Fibonacci number: https://mathworld.wolfram.com/BinetsFormula.html

It is pretty amazing that this formula gives us whole numbers.

Enjoy! 🤯

ALT
@shafik@hachyderm.io avatar shafik , to random

#2 Christmas C++

Santa I want ...

ALT