Hacker Newsnew | past | comments | ask | show | jobs | submit | ognarb's commentslogin

> History/Motivations This project started as an exploration of using AI agents for software development. Based on experience tuning systems using Abseil's B+tree, I was curious if performance could be improved through SIMD instructions, a customized allocator, and tunable node sizes. Claude proved surprisingly adept at helping implement this quickly, and the resulting B+tree showed compelling performance improvements, so I'm making it available here.

It seems the code was written with AI, I hope the author knows what he is doing. Last time I tried to use AI to optimize CPU-heavy C++ code (StackBlur) with SIMD, this failed :/


I apologize if this is common knowledge. Modern C++ coding agents need to have a deep semantic understanding of the external libraries and header files. A simple RAG on the code base is not enough. For example, GitHub Copilot for VS Code and Visual Studio uses IDE language services like IntelliSense. To that extent, using a proper C++ IDE rather than a plain editor will improve the quality of suggested code. For example, if you're using VS Code, make sure the C/C++ Extension Pack is installed.

Both Codex/Claude Code are terrible with C++. Not sure why that is, but they just spit out nonsense that creates more work than it helps me.

Have you tried to do any OpenGL or Vulkan work with it? Very frustrating.

React and HTML, though, pretty awesome.


On the other hand, I've been using Claude Code for the past several months at work in several C++ projects. It's been fine at understanding C++. It just generates a lot of boilerplate, doesn't follow DRY, and gets persnickety with tests.

I've started adding this to all of my new conversations and it seems to help:

    You are a principal software engineer. I report to you. Do not modify files. Do not write prose. Only provide observations and suggestions so that I can learn from you.
My question to the LLM then follows in the next paragraph. Foregoing most of the LLM's code-writing capabilities in favor of giving observations and ideas seems to be a much better choice for productivity. It can still lead me down rabbit holes or wrong directions, but at least I don't have to deal with 10 pages of prose in its output or 50 pages of ineffectual code.

Yeah, it's a decent rubber duck.

As soon as it starts trying to write actual code or generate a bunch of files it's less than helpful very quickly.

Perhaps I haven't tried enough, but I'm entirely unsold on this for anything lower level.


Gemini & ChatGPT have not done well at writing or analyzing OpenGL like rendering code for me, as well. And for many algorithms, it's not good at explaining them as well. And for some of the classical algorithms, like cascading shadow mapping, even articles written by people and example source code that I found is wrong or incomplete.

Learning "the old ways" is certainly valuable, because the AIs and the resources available are bad at these old ways.


Which models?

It's possible Opus 4.5 and GPT-5.2 are significantly less terrible with C++ than previous models. Those only came out within the past 2 months.

They also have significantly more recent knowledge cut-off dates.


I'll be specific:

I've been recently working with Opus 4.5 and GPT-5.2. Both have been unable to migrate a project from using ARB shaders to 3.3 and GLSL. And I don't mean migrating the shaders themselves, just changing all the boring glue code that tells the application to use GLSL and manage those instead of feeding the ARB shaders directly.

They have also failed spectacularly at implementing this paper: https://www.cse.chalmers.se/~uffe/soft_gfxhw2003.pdf

No matter how I sliced it, I could not get a simple cube to have the shadows as described in the paper.

I've also recently tried to get Opus 4.5 to move the Job system from Doom 3 BFG to the original codebase. Clean clone of dhewm3, pointed Opus to the BFG Job system codebase, and explained how it works. I have also fed it the Fabien Sanglard code review of the job system: https://fabiensanglard.net/doom3_bfg/threading.php

As well as the official notes that explain the engine differences: https://fabiensanglard.net/doom3_documentation/DOOM-3-BFG-Te...

I did that because, well, I had ported this job system before and knew it was something pretty "pluggable" and could be implemented by an LLM. Both have failed. I'm yet to find a model that does this.


It's funny, I've also been trying to use AI to implement (simpler) shadow mapping code and it has failed. I eventually formed a very solid understanding of the problem domain myself and achieved my goals with hand written code.

I might try to implement this paper, great find! I love this 2000-2010 stuff



Perfect. Now I can continue to be confused! Beginner mindset!

Thanks, that's very specific! Sounds like that's out of reach of the current generation of models.

Will be interesting to see if models in six months time can handle this, since they clearly can't do it today.


In what scenarios are they terrible? I hope not every scenario. I've found Codex adequate for refactoring and unit tests. I've not used it in anger to write any significant new code.

I suppose part of the problem is that training a model on publicly available C++ isn't going to be great because syntactically broken code gets posted to the web all the time, along with suboptimal solutions. I recall a talk saying that functional languages are better for agents because the code published publicly is formally correct.


I use ChatGPT with C++ but in very limited manner. So far it was overall win. I watch the code very closely of course and usually end up doing few iterations (mostly optimizing for speed, reliability, concurrency).

Also to generate boilerplate / repetitive.

Overall I consider it a win.


I use Claude to generate C++ 23, it usually performs well. It takes a bit of nudging to avoid repeating itself, reusing existing functionality, not altering huge portions without running tests, etc. But generally it is helpful and knows what to do.

I had the same experience. C++ doesn't even compile or I have to tell it all the time "use C++23 features". I tried to learn OpenGL with it. This worked out a bit, since I had to spot the errors :D

Same here. C++ changes fast and can be written in many styles so not a ton of training data I assume.

Oh hey, I wrote a Stackblur implementation in Rust. The trick I used is to SIMD across multiple rows/columns of the image rather than trying to SIMD the algorithm itself.

https://github.com/logandark/stackblur-iter


I'd love to see a breakdown of what exactly worked here, or better yet, PR to upstream Abseil that implements those ideas.

AI is always good at going from 0 to 80%, it's the last 20% it struggles with. It'd be interesting to see a claude-written code making its way to a well-established library.


There is a nice overview of this sort of events on the End Of 10 website: https://endof10.org/places/


I knew about gpgme-json, but I didn't knew, you could do web auth with that. I though the usecase was mainly mailvelope. How does that work?


I want to know as well, I just read gpgme-json page posted, but it doesn't include anything about WebAuthn (aka passkeys).

Can you use GPG-agent for non-resident passkey challenges?

I also have Yubikey setup, but haven't thought of this.


That screenshot is very old, for an actual screenshot. For an actual screenshot, you can find one on today's announcement: https://kde.org/announcements/plasma/6/6.5.0/

Btw as one the web developer behind KDE's website, do you mind telling me where you found that screenshot?


> That screenshot is very old, for an actual screenshot. For an actual screenshot, you can find one on today's announcement: https://kde.org/announcements/plasma/6/6.5.0/

Those do look better admittedly. I still think it looks a bit "Fischer Price" but that is personal taste.

> Btw as one the web developer behind KDE's website, do you mind telling me where you found that screenshot?

Of course. It was on your screenshots page that I found via DDG

https://duckduckgo.com/?q=KDE+screenshots

The first result I go was:

https://kde.org/screenshots/


Thanks for the link to the screenshots page, I completely forgot we had one


No problem.


On linux, you are likely missing the db drivers for Qt for other database types.


I'm running it on Windows


Honestly I think it's fair. Really the only people affected by this change are people creating proprietary forks, everyone else benefits from this change.

I just wish there was a way to ensure that the company itself doesn't do a proprietary fork.


Simple. Don't have contribution agreements. Contributors maintain their copyright so as they can prevent relicensing. Mind, FSF requires copyright for their submissions (I believe), but they're, arguably, a "good actor" in this space.

But, if the code base becomes a patchwork of contributors, it can become difficult to relicense.


FSF stopped requiring contributor agreements years ago.


It’s not fair. The AGPL violates freedom 0 and is nonfree.

https://sneak.berlin/20250720/the-agpl-is-nonfree/

Running a SaaS with in-house modifications is a protected use case for free software. The AGPL is a EULA masquerading as a license.


Definition of freedom has changed in cloud era. The idea behind GPL was, if you modify your code and distribute it, you need to contribute back the changes, with the wider goal of increasing the commons. All the legalese was just to make sure that the idea worked.

In the era of cloud, distribution needs to include distribution over wire, because so many apps are now run in the cloud. And that's why AGPL. It preserves the spirit of GPL in modern times.


Yes, this idea that you must “contribute back” is itself an infringement on privacy, and is why copyleft licenses are falling out of favor of things like MIT.

The spirit of the GPL was never a good idea.


Not the OP, but here’s how I see it: freedom doesn’t exist in a vacuum. Whether it’s in society or in software, real freedom comes with some responsibility. You can’t just take, take, take and expect the ecosystem to stay healthy. That’s not how any of this works.

Same thing applies to free software. If we actually care about keeping that world alive, there’s gotta be some duty baked in—some expectation to contribute back, or at least not strip-mine the commons and bounce.

MIT’s blown up mostly because the big players don’t need the broader free software community anymore. They’ve got the scale, the headcount, and the cash to build and maintain their own internal ecosystems. So from their POV, permissive licenses like MIT are perfect—no obligations, no copyleft, no friction.

But let’s not pretend that’s “freedom” in the idealistic sense. It’s freedom to extract, sure. Freedom to integrate and forget where it came from. For a lot of people on HN, that’s fine. But if you care about the sustainability of the broader ecosystem? Then yeah, we’ve got to talk about duty, not just rights.


If you are distributing an AGPL software as a derivative work, you must also distribute the source. You can make as many modifications for internal use and not distribute them, if you're not making a derivative work.


> They see this as bad, because they think you should be forced to publish your modifications to the software you use internally, even if you don’t want to.

This is incorrect. You are only forced to publish if you are creating derivative works. See how overleaf uses propietary git integration with AGPL overleaf.


That article makes a lot of dubious claims. The central claim is that by breaking links to the source code in development on your own machine with no one else using it, then you are breaking the license by not showing a notice offering the source to yourself.

This is typical of software developers trying to interpret law. Can you imagine someone explaining to a judge that they are suing for a breach of license terms under the circumstances. "So, you are saying he did not give himself access to the code on his laptop?"

Even if that nonsense was correct, there is a dead easy workaround. Run a server with the code on it bound to localhost and you then have your network server for all users interacting with the code (yourself!). Not needed, just an additional layer of proof the claim "it is impossible to comply" is false.

Edit: to add, I am also not impressed by the author's other blog posts, such as a moan about not having PRs for FOSS projects accepted for good reasons (if you dig down into it). Lots of other complaining and nonsense too.


The best part about my website is that visiting it is completely optional.


The US is not only restricting the free speech of their own citizens but also from citizens of other countries...


[flagged]


I would think things like removing access to research which contained certain keywords could count, as well as things like ordering the removal of images of women and people of colour from military websites for example.


Words like “female” will flag scientific research grant applications for review and any found to be supporting diversity equity and inclusion face being cut

https://www.insidehighered.com/news/quick-takes/2025/02/05/n...


US universities are being punished for allowing free speech of individual members. The federal government is angling to get these groups to self-censor.


US citizens themselves restrict the free speech of other US citizens, the governing bodies don't have to do much.


Peaceful protest against Israel's destruction of Gaza will get you in trouble.

Research all the anti-LGBTQ legislation at the federal and state levels.

Remember, after all, the 1st amendment covers not only freedom of speech, but also assembly, the press, no establishment of religion, and the ability to petition the government. All of these things have been attacked and will continue to be attacked.


Idaho Teacher ordered to remove “Everybody is welcome” sign in classroom as US government threatens to cut funding for orgs supporting inclusive ideologies (lgbt, “woke”)

https://www.idahostatesman.com/news/local/education/article3...


It’d been going on for a while: they had embedded people at Twitter, Facebook, etc. to act as liaisons to “protect truth” on subjects such as the origins of Covid, hunter Biden’s laptop, the senility of a certain commander in chief, the discussion on males participating in women’s sports, etc. the movement went so far as preventing speakers with opposing views to speak at universities. The idea of safe spaces itself is about censorship of ideas.

All in the name of stopping “misinformation”.


That was just private citizens exercising their own free speech rights, even if you disagreed. Now we have the federal government punishing people with speech and beliefs the president and his cronies don't like. It's a whole different ballgame.


> That was just private citizens exercising their own free speech rights

It was just a 'coincidence' that the US government was putting serious monopoly investigations on every big tech and social media company at the same time it offered these censorship 'suggestions', I'm sure.


[flagged]


Europe has blasphemy laws


The mythical single entity known as Europe


Some say that they even call themselves a “union of those who are European”


And this "union" has a blasphemy law, does it?

(It does not).

(And even if it did, that wouldn't in any way make the decades long crackdown on free speech in America one single iota better).


(I can’t follow what you’re trying to say)


Who does? Are brits European?


No, Brits are livestock


He just asked for examples? Can you give some?


1. University funding cancellations because of disfavored but 1A protected protests

2. Attacks on law firms with disfavored clients.

3. Federal law suits against media like NBC, ABC, and investigations of NPR and others.

4. Increased arrest rate for “obstruction” by ICE of people protesting immigration enforcement.

5. Blanket bans on “DEI” speech and retaliation against organizations that promote DEI.

6. An executive Order mandating that schools teach “patriotic” content or lose funding.

7. Banning trans people from the military directly infringing their 1A protected rights to express their identity.

8. Take overs of institutions like the Kennedy Center for the Arts, dismissal of the Librarian of Congress, content regulation of the Smithsonian, take-downs of federal data and images related to disfavored speech.

9. Revoking green cards because of 1A protected cards, denying visas, travel bans - all limiting what speech and associations are available to US citizens.

10. FTC merger rules forbidding coordinated boycotts.

11. Banning the Associated Press from the press room. General attacks on the media as “the enemy of America.”


1. This isn't suppressing free speech. This is classic new deal government. I thought liberals liked that?

2. No one is obligated to work with you, or give you clearances if you're suspected of being against state interests.

3. I thought we were all for government crackdowns on corrupt corporations?

4. Many of these people are obstructionist.

5. DEI is discriminatory. I thought liberals were anti-discrimination?

6. More new deal government. Nothing improper here. You just lost the vote.

7. The military is not obligated to allow anyone to serve. It's a job, like any other. Freedom of speech isn't freedom from consequences, pal.

8. Being selective of what you promote isn't suppression of speech. Is it suppression of speech when Confederate monuments are removed, or did you lose the vote?

9. Those are not citizens.

10. This is regulation to prevent anti-competitive behavior and harassment.

11. Not free speech. You're not obligated to be in a press room

TBH, seems like you care that you lost, not about freedom. Why should I give you any freedom when your goal is to deprive me of mine?


I list several instances of the government coercing speech. You conclude that taking away my freedom is a legitimate goal. Strange.



Mercedes Benz is already for example using KWin from KDE as Wayland compositor and likely many other open source components. So this sort of move is not without precedent.

It's a smart move to do so instead of switching to Android Auto and loosing control of one of the most important component of the experience of the car.


Kia is also using a Linux Wayland system on an x86-64 Intel machine (with an iGPU) with an (excellent) QT5 UI for their infontainment system


They're replacing it with an Android Automotive-based OS in 2026.


[flagged]


Still? It is the best and the most mature cross-platform toolkit. Among both open-source and proprietary ones. It is the default for embedded / industrial UIs and automotive. At least in Europe but I think many US companies like Autodesk also use Qt. Its programming paradigms are a bit outdated. However, it is quite performant and supports many 2D and 3D acceleration drivers / APIs.


I'm not sure I agree the paradigms are outdated. Sometimes the new stuff ends up worse for the problem



Qt pretty much owns the automotive market.


Medical also


Wow: I run KDE with Wayland on my PC, and given the instability I've experienced, I'm surprised it's suitable for a high-reliability environment like a car. I suppose that it being a more controlled environment may help, but even still, I wonder how stable it actually is.


They aren't using KDE for the car, just KWin. And KWin is a robust compositor - it will happily survive a horrible KDE crash and even let you restart the session (unlike Mutter) in many cases.

If you're only using a Wayland compositor to render a webview, you cut out a lot of the surface area that could potentially cause a crash.


"Wow: I run KDE with Wayland on my PC"

Me too - its fine for me. You are probably holding it wrong 8)

My car (Seic MG4 - an EV) clearly has two lots of software. The reliable stuff that runs the "must work" stuff like driving controls and motors etc. and the other stuff that ought to work in an ideal world and I think that lot is on the Android tablet mid dashboard.

The other stuff even includes "lane assist" and other safety features because when I force re-boot the console they report as offline on the display behind the steering wheel, which I think is linked to the first system - the RTOS automotive jobbie.

I think SEIC (and I'm sure this is standard practice) have done a fairly decent job with the divvy up of responsibility between funky features and must work or death will ensure features. I'm an IT consultant and know when Android auto has crashed on my phone or car or both or the radio is on silent or there is dust in a USB port ...

Wayland vs X11 is not an issue in cars - whatever you get will either work always or be a bit of a mild distraction.

Cheers Jon

PS I went to school in Abingdon, Oxfordshire. My car has nothing in common with the real Morris Garage. The MG marque is merely an affectation and I don't know why Seic really bothers.


None


Another open source app with a bit of similar goal: https://apps.kde.org/itinerary/

The collaboration part is not that developed (but does exist based on Matrix as decentralized and end to end encrypted storage). That works very well is ticket extraction for hotels, train or flight + search for connection using public transport APIs.

Disclaimer: I'm involved with that app


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: