Crazy idea: reducing function coloring in function templates and enabling reuse, is it possible by caller-injected marker?
I was reading a paper about resumable functions short ago and I wonder if a language extendion would be possible that would work the following way:
// Poor man's syntax
std::copyif(myrange, coawaitable (...) { coawait ... });
How would it work? Taking advantage that templates are code to be generated, at the place where the function is called, the compiler would generate a coawait for the function, making it reusable.
https://redd.it/1u4nyp5
@r_cpp
I was reading a paper about resumable functions short ago and I wonder if a language extendion would be possible that would work the following way:
// Poor man's syntax
std::copyif(myrange, coawaitable (...) { coawait ... });
How would it work? Taking advantage that templates are code to be generated, at the place where the function is called, the compiler would generate a coawait for the function, making it reusable.
https://redd.it/1u4nyp5
@r_cpp
Reddit
From the cpp community on Reddit
Explore this post and more from the cpp community
Trip report: June 2026 ISO C++ standards meeting (Brno, Czechia)
https://herbsutter.com/2026/06/13/brno-trip-report/
https://redd.it/1u4wilz
@r_cpp
https://herbsutter.com/2026/06/13/brno-trip-report/
https://redd.it/1u4wilz
@r_cpp
Sutter’s Mill
Trip report: June 2026 ISO C++ standards meeting (Brno, Czechia)
Adopted this week in draft C++29: Complete catalog of all undefined behavior in C++. Contract pre/post support for virtual functions. Defaulting (=default) for postfix increment/decrement. Designat…
Spatial Canvas: a single-file C++/Win32/Direct3D 11 zoomable window manager that puts your live windows on an infinite canvas
I've been building a zoomable-UI (ZUI) window manager for Windows in C++ and
wanted to share the architecture, since the interesting part is how you keep
dozens of live windows rendering at once.
Each window is captured via Windows.Graphics.Capture (FreeThreaded frame pool,
poll-based, lock-free) into a persistent D3D11 texture, then drawn as a
1:1-pixel textured quad in world space on a borderless fullscreen swapchain.
Pan/zoom is just a camera transform. A D2D/DWrite overlay draws the rest:
title labels, a world-anchored dot grid, the minimap, docks.
The hard problem: if you move/hide windows off-screen to composite them, DWM
occlusion-throttles them and Windows.Graphics.Capture starts returning black
or stale frames. Your canvas fills with black tiles. So there is no input
simulation and no off-screen hiding. Instead, each window "parks" in a 2px
visible strip at the bottom of the primary monitor — 2px is enough that DWM
keeps compositing it, so the capture stays live, but it's hidden behind the
canvas. When you cross a zoom threshold (or double-click), the real HWND is
moved (SetWindowPos) onto its quad's screen rect and given focus; now you're
typing into the actual window, not a proxy. Pull back and it returns to the
strip. Two states per window: parked (live texture on the canvas) and
swapped-in (the real window).
Other bits:
\- Single translation unit (\~3300 lines, Canvas.cpp), entry RunCanvasApp().
\- Idle-throttled main loop (dirty flag + MsgWaitForMultipleObjectsEx) so it
doesn't burn the GPU when nothing changes.
\- Device-lost (TDR / sleep-wake) does a full D3D/D2D/WGC rebuild; an unhandled-
exception filter un-parks windows on crash so nothing is stranded in the strip.
\- Single 559 KB exe, statically linked — no .NET / VC redist.
A few things that bit me along the way:
\- IsBorderRequired(false) / the borderless-capture path black out capture on
some Windows builds — removed.
\- Content-sized CopySubresourceRegion + a drain-to-newest loop also produced
black tiles; a single TryGetNextFrame + full CopyResource is the proven path.
\- Added a cbuffer field the pixel shader reads, but bound the cbuffer only to
the vertex stage → every tile came out alpha=0 (invisible). If a stage reads
a cbuffer, bind it to that stage.
Repo + 30s demo: https://github.com/13auth/spatial-canvas
It's an early prototype and I'd genuinely appreciate critique on the capture/
compositing approach. (Heads-up: source-available but not OSS-licensed — happy
to explain the reasoning in the comments.)
https://redd.it/1u52eim
@r_cpp
I've been building a zoomable-UI (ZUI) window manager for Windows in C++ and
wanted to share the architecture, since the interesting part is how you keep
dozens of live windows rendering at once.
Each window is captured via Windows.Graphics.Capture (FreeThreaded frame pool,
poll-based, lock-free) into a persistent D3D11 texture, then drawn as a
1:1-pixel textured quad in world space on a borderless fullscreen swapchain.
Pan/zoom is just a camera transform. A D2D/DWrite overlay draws the rest:
title labels, a world-anchored dot grid, the minimap, docks.
The hard problem: if you move/hide windows off-screen to composite them, DWM
occlusion-throttles them and Windows.Graphics.Capture starts returning black
or stale frames. Your canvas fills with black tiles. So there is no input
simulation and no off-screen hiding. Instead, each window "parks" in a 2px
visible strip at the bottom of the primary monitor — 2px is enough that DWM
keeps compositing it, so the capture stays live, but it's hidden behind the
canvas. When you cross a zoom threshold (or double-click), the real HWND is
moved (SetWindowPos) onto its quad's screen rect and given focus; now you're
typing into the actual window, not a proxy. Pull back and it returns to the
strip. Two states per window: parked (live texture on the canvas) and
swapped-in (the real window).
Other bits:
\- Single translation unit (\~3300 lines, Canvas.cpp), entry RunCanvasApp().
\- Idle-throttled main loop (dirty flag + MsgWaitForMultipleObjectsEx) so it
doesn't burn the GPU when nothing changes.
\- Device-lost (TDR / sleep-wake) does a full D3D/D2D/WGC rebuild; an unhandled-
exception filter un-parks windows on crash so nothing is stranded in the strip.
\- Single 559 KB exe, statically linked — no .NET / VC redist.
A few things that bit me along the way:
\- IsBorderRequired(false) / the borderless-capture path black out capture on
some Windows builds — removed.
\- Content-sized CopySubresourceRegion + a drain-to-newest loop also produced
black tiles; a single TryGetNextFrame + full CopyResource is the proven path.
\- Added a cbuffer field the pixel shader reads, but bound the cbuffer only to
the vertex stage → every tile came out alpha=0 (invisible). If a stage reads
a cbuffer, bind it to that stage.
Repo + 30s demo: https://github.com/13auth/spatial-canvas
It's an early prototype and I'd genuinely appreciate critique on the capture/
compositing approach. (Heads-up: source-available but not OSS-licensed — happy
to explain the reasoning in the comments.)
https://redd.it/1u52eim
@r_cpp
GitHub
GitHub - 13auth/spatial-canvas: Spatial Canvas - canli Windows pencerelerini sonsuz zoom'lanabilir tuvale yerlestiren pencere yoneticisi…
Spatial Canvas - canli Windows pencerelerini sonsuz zoom'lanabilir tuvale yerlestiren pencere yoneticisi (WGC + park&swap, tek exe) - 13auth/spatial-canvas
Report from the Brno 2026 ISO C++ Committee meeting - mp-units
https://mpusz.github.io/mp-units/HEAD/blog/2026/06/13/report-from-the-brno-2026-iso-c-committee-meeting/
https://redd.it/1u535mb
@r_cpp
https://mpusz.github.io/mp-units/HEAD/blog/2026/06/13/report-from-the-brno-2026-iso-c-committee-meeting/
https://redd.it/1u535mb
@r_cpp
mpusz.github.io
Report from the Brno 2026 ISO C++ Committee meeting - mp-units
The quantities and units library for C++
Catcheer: A minimalist, zero-config native C++ WebView wrapper for HTML5 apps and games. Baseline executable is ~333 KB.
https://github.com/nzxy-dev/Catcheer
https://redd.it/1u58mm2
@r_cpp
https://github.com/nzxy-dev/Catcheer
https://redd.it/1u58mm2
@r_cpp
GitHub
GitHub - nzxy-dev/Catcheer: Easily and efficiently distribute your html-based projects.
Easily and efficiently distribute your html-based projects. - nzxy-dev/Catcheer
C++ 2026 June Compiler Update
https://cppreference.com/cpp/compiler_support
https://redd.it/1u5c6f4
@r_cpp
https://cppreference.com/cpp/compiler_support
https://redd.it/1u5c6f4
@r_cpp
C++ lifetimes. Is there an alternative way? Hylo subscripts achieve controlled lifetimes without viral annotations
https://hylo-lang.org/docs/user/language-tour/subscripts/
https://redd.it/1u5ffmc
@r_cpp
https://hylo-lang.org/docs/user/language-tour/subscripts/
https://redd.it/1u5ffmc
@r_cpp
Logicwise: Factory for C++ Concepts
https://github.com/frog-singing/Logicwise
https://redd.it/1u5fmuw
@r_cpp
https://github.com/frog-singing/Logicwise
https://redd.it/1u5fmuw
@r_cpp
GitHub
GitHub - frog-singing/Logicwise: Factory for C++ Concepts – mass & structural compile-time verification for cpp20 metaprogramming
Factory for C++ Concepts – mass & structural compile-time verification for cpp20 metaprogramming - frog-singing/Logicwise
cppman.nvim: Browse C++ docs from inside Neovim
I hope it's okay that I post this here. If not, just let me know and I'll remove it.
I made a small Neovim plugin called cppman.nvim for browsing C++ reference docs directly inside Neovim.
I use it myself quite a bit, so I thought I'd share it in case anyone else finds it useful, or has ideas for improvements.
It adds
I tried to keep it lightweight and not too opinionated.
Repo: https://github.com/simonwinther/cppman.nvim
https://redd.it/1u5j36c
@r_cpp
I hope it's okay that I post this here. If not, just let me know and I'll remove it.
I made a small Neovim plugin called cppman.nvim for browsing C++ reference docs directly inside Neovim.
I use it myself quite a bit, so I thought I'd share it in case anyone else finds it useful, or has ideas for improvements.
It adds
:CPPMan, uses cppman's local index, and opens the docs in a floating buffer. It also supports both fzf-lua and snacks.nvim.I tried to keep it lightweight and not too opinionated.
Repo: https://github.com/simonwinther/cppman.nvim
https://redd.it/1u5j36c
@r_cpp
GitHub
GitHub - simonwinther/cppman.nvim: Neovim popup UI for cppman, with searchable C++ reference docs and in-buffer navigation
Neovim popup UI for cppman, with searchable C++ reference docs and in-buffer navigation - simonwinther/cppman.nvim
Vcpkg Binary Caching on GitHub Finally Made Easy
https://github.com/LegalizeAdulthood/vcpkg-github-cache
https://redd.it/1u5mkez
@r_cpp
https://github.com/LegalizeAdulthood/vcpkg-github-cache
https://redd.it/1u5mkez
@r_cpp
GitHub
GitHub - LegalizeAdulthood/vcpkg-github-cache: GitHub Action for vcpkg binary caching with GitHub Packages NuGet feeds.
GitHub Action for vcpkg binary caching with GitHub Packages NuGet feeds. - LegalizeAdulthood/vcpkg-github-cache
Repo of utilities written with C++ reflection
I started exploring C++26's static reflection, and I'm putting together a repo with utilities written with it
First utility I have, is
I'd love to hear any suggestions and feedback! Repo
https://redd.it/1u5pvuq
@r_cpp
I started exploring C++26's static reflection, and I'm putting together a repo with utilities written with it
First utility I have, is
std::visit, but for C unions (with some small constraints to avoid UB ofc)I'd love to hear any suggestions and feedback! Repo
https://redd.it/1u5pvuq
@r_cpp
GitHub
GitHub - TerensTare/mirror: Use cases for reflection
Use cases for reflection. Contribute to TerensTare/mirror development by creating an account on GitHub.
C++ RVO: Return Value Optimization for Performance in Bloomberg C++ Codebases - Michelle Fae D'Souza
https://www.youtube.com/watch?v=WyxUilrR6fU
https://redd.it/1u5sb5u
@r_cpp
https://www.youtube.com/watch?v=WyxUilrR6fU
https://redd.it/1u5sb5u
@r_cpp
YouTube
C++ RVO: Return Value Optimization for Performance in Bloomberg C++ Codebases - Michelle Fae D'Souza
https://cppcon.org
---
Can You RVO? Using Return Value Optimization for Performance in Bloomberg C++ Codebases - Michelle Fae D'Souza - CppCon 2024
---
Learn what Return Value Optimization (RVO) is, and what you can do to ensure the compiler applies it…
---
Can You RVO? Using Return Value Optimization for Performance in Bloomberg C++ Codebases - Michelle Fae D'Souza - CppCon 2024
---
Learn what Return Value Optimization (RVO) is, and what you can do to ensure the compiler applies it…
Projects being in "Show and Tell" is bad.
Because of this, nearly all posts are just conference links and blog links. Projects deserve their own post and are the source of actual fun discussion. I propose that the Show and Tell rule be removed, but Show and Tell post can remain if a project that lame appears.
https://redd.it/1u5x86n
@r_cpp
Because of this, nearly all posts are just conference links and blog links. Projects deserve their own post and are the source of actual fun discussion. I propose that the Show and Tell rule be removed, but Show and Tell post can remain if a project that lame appears.
https://redd.it/1u5x86n
@r_cpp
Reddit
From the cpp community on Reddit
Explore this post and more from the cpp community
Parsing JSON at compile time with C++26 static reflection (Daniel Lemire)
https://lemire.me/blog/2026/06/14/parsing-json-at-compile-time-with-c26-static-reflection/
https://redd.it/1u619lv
@r_cpp
https://lemire.me/blog/2026/06/14/parsing-json-at-compile-time-with-c26-static-reflection/
https://redd.it/1u619lv
@r_cpp
Daniel Lemire's blog
Parsing JSON at compile time with C++26 static reflection
Suppose that you have a configuration file in JSON. Something like this: { "width": 1920, "height": 1080, "fullscreen": true, "title": "My Game", "volume": 0.8 } Normally you ship this file alongside your program, open it at startup, read it, and parse it.…
Looking for collaborators to build an OpenGL engine in C++
I'm currently developing a small OpenGL engine in C++ as a personal learning project and foundation for future graphics and simulation applications.
​
The project is open source:
https://github.com/HG9032/OpenGLengine
​
I'm looking for people who are interested in computer graphics, OpenGL, game engines, rendering, or C++ development and would like to contribute, learn together, or discuss ideas.
​
The engine currently includes:
​
\- Window management (GLFW)
\- Shader management
\- Mesh rendering
\- Transform system
\- Basic rendering pipeline
​
Planned features:
​
\- Camera system
\- Scene management
\- Materials and textures
\- STL model loading
\- Lighting
\- Thermal simulation visualization
​
Whether you're experienced or just learning OpenGL, feel free to reach out if you'd like to collaborate.
​
https://github.com/HG9032/OpenGLengine
https://redd.it/1u6979x
@r_cpp
I'm currently developing a small OpenGL engine in C++ as a personal learning project and foundation for future graphics and simulation applications.
​
The project is open source:
https://github.com/HG9032/OpenGLengine
​
I'm looking for people who are interested in computer graphics, OpenGL, game engines, rendering, or C++ development and would like to contribute, learn together, or discuss ideas.
​
The engine currently includes:
​
\- Window management (GLFW)
\- Shader management
\- Mesh rendering
\- Transform system
\- Basic rendering pipeline
​
Planned features:
​
\- Camera system
\- Scene management
\- Materials and textures
\- STL model loading
\- Lighting
\- Thermal simulation visualization
​
Whether you're experienced or just learning OpenGL, feel free to reach out if you'd like to collaborate.
​
https://github.com/HG9032/OpenGLengine
https://redd.it/1u6979x
@r_cpp
GitHub
GitHub - HG9032/OpenGLengine
Contribute to HG9032/OpenGLengine development by creating an account on GitHub.
Building a High-Throughput C++ FIX Server: From Single-Core Efficiency to Multi-Core Scaling
https://substack.com/home/post/p-202082856
https://redd.it/1u6ecnq
@r_cpp
https://substack.com/home/post/p-202082856
https://redd.it/1u6ecnq
@r_cpp
Substack
Building a High-Throughput FIX Server
From Single-Core Efficiency to Multi-Core Scaling
arewemodulesyet.org passes the mark of 100 projects with modules support for the first time.
https://arewemodulesyet.org/
https://redd.it/1u6f2iq
@r_cpp
https://arewemodulesyet.org/
https://redd.it/1u6f2iq
@r_cpp
Reddit
From the cpp community on Reddit: arewemodulesyet.org passes the mark of 100 projects with modules support for the first time.
Posted by germandiago - 9 votes and 2 comments
New C++ Conference Videos Released This Month - June 2026 (Updated to Include Videos Released 2026-06-08 - 2026-06-14)
**C++Online**
2026-06-08 - 2026-06-14
* Monads Meet Mutexes - Arne Berger - [https://youtu.be/AisGDOoF82U](https://youtu.be/AisGDOoF82U)
* Lock-free Queues in the Multiverse of Madness - Dave Rowland - [https://youtu.be/eHmjkFdQl00](https://youtu.be/eHmjkFdQl00)
2026-06-01 - 2026-06-07
* Writing C++ Code is Challenging, Writing Performant C++ Code is Daunting - Dmitrii Radivonchik - [https://youtu.be/R2sm9mailuU](https://youtu.be/R2sm9mailuU)
* Case Study - Purging Undefined Behavior and Intel Assumptions in a Legacy Codebase - Roth Michaels - [https://youtu.be/H-dHTeSR\_n8](https://youtu.be/H-dHTeSR_n8)
**ADC**
2026-06-08 - 2026-06-14
* Low Latency Android Audio with improved CPU Performance - Phil Burk - [https://youtu.be/DtBrKEu0R0g](https://youtu.be/DtBrKEu0R0g)
* Linux as the Conductor - Driving Pre-Compiled Audio DSP Kernels on C7x for Real-Time Processing - Vishnu Pratap Singh - [https://youtu.be/Auq9WnHNtPo](https://youtu.be/Auq9WnHNtPo)
* Overview of Granular Synthesis - Avrosh Kumar - [https://youtu.be/QpBV24nWg2M](https://youtu.be/QpBV24nWg2M)
* The Agentic Symphony - Multi-Agent Collaboration for Emergent Musical Composition - Meera Sundar - [https://youtu.be/QMUXoImgTIA](https://youtu.be/QMUXoImgTIA)
2026-06-01 - 2026-06-07
* Beyond the DAW - Designing a Procedural Sequencer Powered by Music-Theory - Romy Dugue & Cecill Etheredge - [https://youtu.be/48sH4wQUDAs](https://youtu.be/48sH4wQUDAs)
* From DAW Users to Audio Developers - Teaching JUCE to Creative Minds - Milap Rane - [https://youtu.be/200UrugEanY](https://youtu.be/200UrugEanY)
* Music Design and Systems - Achieving Inaudibly Complex Systems in Video Games - Liam Peacock - [https://youtu.be/R6raBvCNsQo](https://youtu.be/R6raBvCNsQo)
* Developing for Avid’s Audio Ecosystem - Rob Majors - [https://youtu.be/91-7YWVKRE4](https://youtu.be/91-7YWVKRE4)
**CppCon**
2026-06-01 - 2026-06-07
* Lightning Talk: Navigating Code Reviews as a Code Author - Ben Deane - [https://youtu.be/zygtgvHp\_MM](https://youtu.be/zygtgvHp_MM)
* Lightning Talk: Eight Consteval Queens and Compile-Time Printing - Sagnik Bhattacharya - [https://youtu.be/gNPhJrXLiIs](https://youtu.be/gNPhJrXLiIs)
* Instrumenting the Stack: Strategies for End-to-end Sanitizer Adoption - Damien Buhl - [https://youtu.be/TSrymTXw5w8](https://youtu.be/TSrymTXw5w8)
https://redd.it/1u6ik24
@r_cpp
**C++Online**
2026-06-08 - 2026-06-14
* Monads Meet Mutexes - Arne Berger - [https://youtu.be/AisGDOoF82U](https://youtu.be/AisGDOoF82U)
* Lock-free Queues in the Multiverse of Madness - Dave Rowland - [https://youtu.be/eHmjkFdQl00](https://youtu.be/eHmjkFdQl00)
2026-06-01 - 2026-06-07
* Writing C++ Code is Challenging, Writing Performant C++ Code is Daunting - Dmitrii Radivonchik - [https://youtu.be/R2sm9mailuU](https://youtu.be/R2sm9mailuU)
* Case Study - Purging Undefined Behavior and Intel Assumptions in a Legacy Codebase - Roth Michaels - [https://youtu.be/H-dHTeSR\_n8](https://youtu.be/H-dHTeSR_n8)
**ADC**
2026-06-08 - 2026-06-14
* Low Latency Android Audio with improved CPU Performance - Phil Burk - [https://youtu.be/DtBrKEu0R0g](https://youtu.be/DtBrKEu0R0g)
* Linux as the Conductor - Driving Pre-Compiled Audio DSP Kernels on C7x for Real-Time Processing - Vishnu Pratap Singh - [https://youtu.be/Auq9WnHNtPo](https://youtu.be/Auq9WnHNtPo)
* Overview of Granular Synthesis - Avrosh Kumar - [https://youtu.be/QpBV24nWg2M](https://youtu.be/QpBV24nWg2M)
* The Agentic Symphony - Multi-Agent Collaboration for Emergent Musical Composition - Meera Sundar - [https://youtu.be/QMUXoImgTIA](https://youtu.be/QMUXoImgTIA)
2026-06-01 - 2026-06-07
* Beyond the DAW - Designing a Procedural Sequencer Powered by Music-Theory - Romy Dugue & Cecill Etheredge - [https://youtu.be/48sH4wQUDAs](https://youtu.be/48sH4wQUDAs)
* From DAW Users to Audio Developers - Teaching JUCE to Creative Minds - Milap Rane - [https://youtu.be/200UrugEanY](https://youtu.be/200UrugEanY)
* Music Design and Systems - Achieving Inaudibly Complex Systems in Video Games - Liam Peacock - [https://youtu.be/R6raBvCNsQo](https://youtu.be/R6raBvCNsQo)
* Developing for Avid’s Audio Ecosystem - Rob Majors - [https://youtu.be/91-7YWVKRE4](https://youtu.be/91-7YWVKRE4)
**CppCon**
2026-06-01 - 2026-06-07
* Lightning Talk: Navigating Code Reviews as a Code Author - Ben Deane - [https://youtu.be/zygtgvHp\_MM](https://youtu.be/zygtgvHp_MM)
* Lightning Talk: Eight Consteval Queens and Compile-Time Printing - Sagnik Bhattacharya - [https://youtu.be/gNPhJrXLiIs](https://youtu.be/gNPhJrXLiIs)
* Instrumenting the Stack: Strategies for End-to-end Sanitizer Adoption - Damien Buhl - [https://youtu.be/TSrymTXw5w8](https://youtu.be/TSrymTXw5w8)
https://redd.it/1u6ik24
@r_cpp
YouTube
Monads Meet Mutexes - Arne Berger - C++Online 2026
Online Workshops + Training Sessions Available through April-June 2026 from only £150 ($200)
14 Sessions Available on a range of topics. Student Rates available from only £45/$60! US and EU friendly session times.
https://cpponline.uk/
---
Monads Meet Mutexes…
14 Sessions Available on a range of topics. Student Rates available from only £45/$60! US and EU friendly session times.
https://cpponline.uk/
---
Monads Meet Mutexes…
Cross-Language Data Types
https://ekxide.io/blog/cross-language-data-types
Have you ever thought about sharing data across language boundaries without serialization? This blog post highlights the challenges behind this endeavor and how they can be overcome. Note: I'm not the original author of the blog post, but since the author does not have a Reddit account, I post it on his behalf.
https://redd.it/1u6mrw8
@r_cpp
https://ekxide.io/blog/cross-language-data-types
Have you ever thought about sharing data across language boundaries without serialization? This blog post highlights the challenges behind this endeavor and how they can be overcome. Note: I'm not the original author of the blog post, but since the author does not have a Reddit account, I post it on his behalf.
https://redd.it/1u6mrw8
@r_cpp
ekxide
Cross-Language Data Types
An introduction into the memory-layout compatible data types in iceoryx2
LLMs with C and C++ - switch from HFT to AI lab
I'm a senior C++ dev recently started working with a neolab (who works with anthropic). Thought I would write some of observations i made.
* I had experimented with LLMs for a while before making the switch. LLMs fail a lot on C and C++ due to harder nature and powerful nature of language.
* Talking purely from benchmarks, languages like python and JS (the vibecoder's first language) have very hard benchmarks - think fixing actual bug that touches 3 different modules from scratch with access to tools like grep, cat and python3 executer.
* Whereas, benchmarks for C and C++ are at basic QA style questions. I have added a task from benchmark, which fable 5 could not solve.
* LLMs do not have understanding of latest ISO standards - for some reasons it switches to C++17 again and again
* LLMs are trash at template metaprogramming. Try debugging CRTP type of errors.
Looking at the efforts and progress, I am still not sure if we will see LLMs writing MRs to linux kernel. The approach they used for vibecoding languages do not care about memory safety, thread safety and performance much. It would be interesting to see the space evolve.
PS: a example from benchmark
PS2: i'm not associated with benchmark. they say the code is taken from real github issues.
Observe the following faulty CPP code snippet and error type list. Your task is to select the error type of the code based on the error list provided.
You only need to answer error type. Do not write anything else in your response.
For example, if the code snippet is missing a semicolon, Your output should be 'missing_colons'.
faulty code:
```cpp
#include <bits/stdc++.h>
int countPermutations(int n, int k, int qq[])
{
const int N = 505, P = 998244353;
int *q = new int[n + 10];
int m, dp[N][N], jc[N], f[N], ans;
memset(q, 0, sizeof(int) * (n + 1));
memset(dp, 0, sizeof(dp));
memset(jc, 0, sizeof(jc));
memset(f, 0, sizeof(f));
ans = 0;
for (int i = 1; i <= n; i++)
q[i] = qq[i - 1];
dp[0][0] = f[0] = 1;
for (int i = jc[0] = 1; i <= n; i++)
jc[i] = 1LL * jc[i - 1] * i % P;
for (int i = 1; i <= n; i++)
{
f[i] = jc[i];
for (int j = 1; j < i; j++)
f[i] = (f[i] + P - 1LL * f[j] * jc[i - j] % P) % P;
}
for (int i = 1; i <= n; i++)
{
for (int j = 0; j < i; j++)
for (int k = 1; k <= n; k++)
dp[i][k] = (dp[i][k] + dp[j][k - 1] * 1LL * f[i - j] % P) % P;
}
m = 0;
for (int i = 1; i <= n; i++)
if (q[i] > q[i + 1])
{
m = i;
break;
}
if (m == n)
{
for (int i = k; i <= n; i++)
ans = (ans + dp[n][i]) % P;
}
else
{
for (int i = m + 1; i <= n; i++)
{
if (i != m + 1 && (q[i - 1] > q[i] || q[i] < q[m]))
break;
int c = k + i - n - 1;
if (c >= 0)
ans = (ans + dp[m][c] * 1LL * jc[i - m - 1] % P) % P;
}
}
return ans;
}
```
error list:
['Delayed Execution', 'Improper HTML structure', 'Missing $', 'Missing mut', 'Misused := and =', 'Misused === and ==', 'Misused =>', 'Misused Macro Definition', 'Misused Spread Operator', 'Misused begin/end', 'Misused match', 'Misused var and val', 'Unused Variable', 'algorithm_error', 'condition_error', 'double_bug', 'faulty_indexing', 'function_error', 'html_unclosed_label', 'html_value_error', 'html_wrong_label', 'illegal_comment', 'illegal_indentation', 'illegal_keyword', 'illegal_separation', 'json_content_error', 'json_digital_leader_is_0', 'json_duplicate keys', 'json_struct_error', 'markdown_content_error', 'markdown_title_error', 'markdown_unclosed_error', 'missing_backtick', 'missing_colons', 'misused ==and=',
I'm a senior C++ dev recently started working with a neolab (who works with anthropic). Thought I would write some of observations i made.
* I had experimented with LLMs for a while before making the switch. LLMs fail a lot on C and C++ due to harder nature and powerful nature of language.
* Talking purely from benchmarks, languages like python and JS (the vibecoder's first language) have very hard benchmarks - think fixing actual bug that touches 3 different modules from scratch with access to tools like grep, cat and python3 executer.
* Whereas, benchmarks for C and C++ are at basic QA style questions. I have added a task from benchmark, which fable 5 could not solve.
* LLMs do not have understanding of latest ISO standards - for some reasons it switches to C++17 again and again
* LLMs are trash at template metaprogramming. Try debugging CRTP type of errors.
Looking at the efforts and progress, I am still not sure if we will see LLMs writing MRs to linux kernel. The approach they used for vibecoding languages do not care about memory safety, thread safety and performance much. It would be interesting to see the space evolve.
PS: a example from benchmark
PS2: i'm not associated with benchmark. they say the code is taken from real github issues.
Observe the following faulty CPP code snippet and error type list. Your task is to select the error type of the code based on the error list provided.
You only need to answer error type. Do not write anything else in your response.
For example, if the code snippet is missing a semicolon, Your output should be 'missing_colons'.
faulty code:
```cpp
#include <bits/stdc++.h>
int countPermutations(int n, int k, int qq[])
{
const int N = 505, P = 998244353;
int *q = new int[n + 10];
int m, dp[N][N], jc[N], f[N], ans;
memset(q, 0, sizeof(int) * (n + 1));
memset(dp, 0, sizeof(dp));
memset(jc, 0, sizeof(jc));
memset(f, 0, sizeof(f));
ans = 0;
for (int i = 1; i <= n; i++)
q[i] = qq[i - 1];
dp[0][0] = f[0] = 1;
for (int i = jc[0] = 1; i <= n; i++)
jc[i] = 1LL * jc[i - 1] * i % P;
for (int i = 1; i <= n; i++)
{
f[i] = jc[i];
for (int j = 1; j < i; j++)
f[i] = (f[i] + P - 1LL * f[j] * jc[i - j] % P) % P;
}
for (int i = 1; i <= n; i++)
{
for (int j = 0; j < i; j++)
for (int k = 1; k <= n; k++)
dp[i][k] = (dp[i][k] + dp[j][k - 1] * 1LL * f[i - j] % P) % P;
}
m = 0;
for (int i = 1; i <= n; i++)
if (q[i] > q[i + 1])
{
m = i;
break;
}
if (m == n)
{
for (int i = k; i <= n; i++)
ans = (ans + dp[n][i]) % P;
}
else
{
for (int i = m + 1; i <= n; i++)
{
if (i != m + 1 && (q[i - 1] > q[i] || q[i] < q[m]))
break;
int c = k + i - n - 1;
if (c >= 0)
ans = (ans + dp[m][c] * 1LL * jc[i - m - 1] % P) % P;
}
}
return ans;
}
```
error list:
['Delayed Execution', 'Improper HTML structure', 'Missing $', 'Missing mut', 'Misused := and =', 'Misused === and ==', 'Misused =>', 'Misused Macro Definition', 'Misused Spread Operator', 'Misused begin/end', 'Misused match', 'Misused var and val', 'Unused Variable', 'algorithm_error', 'condition_error', 'double_bug', 'faulty_indexing', 'function_error', 'html_unclosed_label', 'html_value_error', 'html_wrong_label', 'illegal_comment', 'illegal_indentation', 'illegal_keyword', 'illegal_separation', 'json_content_error', 'json_digital_leader_is_0', 'json_duplicate keys', 'json_struct_error', 'markdown_content_error', 'markdown_title_error', 'markdown_unclosed_error', 'missing_backtick', 'missing_colons', 'misused ==and=',