# cpp

Published articles for cpp.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## WMMA guide for AMD RDNA 4 architecture GPUs - part 3

DevFeed: [WMMA guide for AMD RDNA 4 architecture GPUs - part 3](<https://devfeed.tech/articles/wmma-guide-for-amd-rdna-4-architecture-gpus-part-3-15053.md>)

Original publisher: [Read original article](<https://gpuopen.com/learn/wmma-guide-amd-rdna-4-gpus-part-3/>)

Author: Hui Zhang

Published: 2026-06-02T19:02:00Z

Content type: tutorial

Language: en

Sources: [AMD GPUOpen](<https://devfeed.tech/sources/amd-gpuopen.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [llama.cpp](<https://devfeed.tech/topics/llama-cpp.md>), [Warp](<https://devfeed.tech/topics/warp.md>)

Tags: [3](<https://devfeed.tech/tags/3.md>), [amd](<https://devfeed.tech/tags/amd.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [code](<https://devfeed.tech/tags/code.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [cuda](<https://devfeed.tech/tags/cuda.md>), [getting-started](<https://devfeed.tech/tags/getting-started.md>), [guide](<https://devfeed.tech/tags/guide.md>), [hip](<https://devfeed.tech/tags/hip.md>), [implement](<https://devfeed.tech/tags/implement.md>), [llama-cpp](<https://devfeed.tech/tags/llama-cpp.md>), [maths](<https://devfeed.tech/tags/maths.md>), [memory](<https://devfeed.tech/tags/memory.md>), [ml](<https://devfeed.tech/tags/ml.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [rdna](<https://devfeed.tech/tags/rdna.md>), [reference-guide](<https://devfeed.tech/tags/reference-guide.md>), [technical-article](<https://devfeed.tech/tags/technical-article.md>), [technical-articles](<https://devfeed.tech/tags/technical-articles.md>), [user-guides-manuals](<https://devfeed.tech/tags/user-guides-manuals.md>)

### AI overview

This tutorial explains how to implement an in-register matrix transpose using the WMMA layout on AMD RDNA 4 GPUs. It describes an identity-matrix approach that avoids additional memory operations and notes its use in Llama.cpp for Flash Attention.

### Source excerpt

Learn how to implement fast in-register matrix transpose on AMD RDNA™ 4 architecture GPUs with a WMMA-based identity trick, delivering a lightweight, memory-free alternative proven in Llama.cpp.

## I have officially retired from Emacs

DevFeed: [I have officially retired from Emacs](<https://devfeed.tech/articles/i-have-officially-retired-from-emacs-20514.md>)

Original publisher: [Read original article](<https://nullprogram.com/blog/2026/04/26/>)

Published: 2026-04-26T00:00:00Z

Content type: article

Language: en

Sources: [Chris Wellons](<https://devfeed.tech/sources/chris-wellons.md>)

Topics: [Emacs](<https://devfeed.tech/topics/emacs.md>), [Vim](<https://devfeed.tech/topics/vim.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [GUI](<https://devfeed.tech/topics/gui.md>), [Maintainers](<https://devfeed.tech/topics/maintainers.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [article](<https://devfeed.tech/tags/article.md>), [blog](<https://devfeed.tech/tags/blog.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [elfeed](<https://devfeed.tech/tags/elfeed.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [gui](<https://devfeed.tech/tags/gui.md>), [maintainers](<https://devfeed.tech/tags/maintainers.md>), [net-11](<https://devfeed.tech/tags/net-11.md>)

### AI overview

The author describes retiring from Emacs after 20 years of daily use and gradually switching to modal editing and Vim. They replaced two Emacs-based applications they relied on, M-x calc and Elfeed, with stackcalc and Elfeed2, multi-platform native C++ GUI applications. The article also discusses the need for new maintainers and the trade-offs involved in achieving feature parity.

### Source excerpt

This article was discussed on reddit and on Hacker News. This past Tuesday I typed C-x C-c in Emacs for the last time after 20 years of daily use. Though nearly half that time was gradually retiring it, switching to modal editing, then to Vim. Emacs is a platform, and I'd grown accustomed to its applications, especially those I built myself. There was no particular hurry, so replacements came slowly. With my newly-acquired superpowers I could knock out the last two pieces in a few days' work, namely M-x calc with stackcalc and Elfeed with Elfeed2. I'm especially excited about the latter because it already exceeds the original. Both are multi-platform, native C++ GUI applications using native UI components. These actively-in-use packages require new maintainers (apply on the project's issues/discussion): @ (about) aio (about) bitpack Elfeed (apply here) Impatient (about) javadoc-lookup (about) json-rpc memoize (about) nasm-mode (about) simple-httpd (about) Skewer (about) weak-ref (about) x86-lookup (about) No wonder it took so long for me to move on! I'm not handing these off to just anyone, and you'll need to establish your reputation. Having already made contributions is a good sign, even if never merged. I'm willing to transfer them off my namespace, though you'll need to manage the Melpa hand-off (on which I'll sign-off). If there are no takers, these projects will be archived but not deleted. Trying out wxWidgets The Emacs Calculator is amazing and the best calculator I've ever used, which is why nothing I could find was going to replace it. My clone uses GMP and MPFR for multi-precision, so it's far faster, as to be expected, but it's not nearly at feature parity. It's missing esoteric features including symbolic processing. Though it's enough to cover all of my own usage. I can add more features later. The Emacs Calculator manual served as a specification when building stackcalc. Elfeed has been a cornerstone of my daily routines for the past 13 years. Nothing

## My brave new code-signing world

DevFeed: [My brave new code-signing world](<https://devfeed.tech/articles/my-brave-new-code-signing-world-20513.md>)

Original publisher: [Read original article](<https://nullprogram.com/blog/2026/04/25/>)

Published: 2026-04-25T18:12:29Z

Content type: opinion

Language: en

Sources: [Chris Wellons](<https://devfeed.tech/sources/chris-wellons.md>)

Topics: [Azure](<https://devfeed.tech/topics/azure.md>), [Security](<https://devfeed.tech/topics/security.md>), [Code](<https://devfeed.tech/topics/code.md>), [Claude](<https://devfeed.tech/topics/claude.md>), [Microsoft](<https://devfeed.tech/topics/microsoft.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [alternatives](<https://devfeed.tech/tags/alternatives.md>), [azure](<https://devfeed.tech/tags/azure.md>), [claude](<https://devfeed.tech/tags/claude.md>), [cli](<https://devfeed.tech/tags/cli.md>), [cost](<https://devfeed.tech/tags/cost.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [crypto](<https://devfeed.tech/tags/crypto.md>), [github](<https://devfeed.tech/tags/github.md>), [security](<https://devfeed.tech/tags/security.md>), [signing](<https://devfeed.tech/tags/signing.md>)

### AI overview

The article describes the author's move to code-sign Windows releases using Azure Artifact Signing and custom infrastructure called aas-sign. It discusses the cost, regional identity-verification requirement, difficult Azure portal experience, AI-assisted setup, and alternatives involving Azure CLI, Jsign, and SignTool.exe.

### Source excerpt

The new w64devkit release two weeks ago is the first to be code-signed with my identity, verified by Microsoft's certificate chain. Currently only the release packaging is signed -- the self-extracting archive and its payload -- but I will soon code-sign individual EXEs and DLLs within the distribution. In fact, all Windows builds of my project releases have been code-signed the past two weeks, including dcmake, and so should everything going forward. My signing identity builds reputation with each download, so users will have an easier time with SmartScreen, and security software generally. Azure Artifact Signing creates the actual signature, but the rest is done with new infrastructure I built myself, aas-sign. As is often the case, the existing options were deficient for my needs, so I had to build it myself. This code-signing is not free, and simply having aas-sign on hand, or using the GitHub Actions action, is insufficient. You must be serious enough to spend US$10/month for the Azure subscription. After that you are subjected to the labyrinth that is the Azure portal, the most confusing UI I've ever used. Luckily we live in an age of wonders, and I could describe to Claude in Chrome what I wanted and it would happen (Sonnet works better than Opus for this). It took as much time to figure out Azure as I spent creating a fully-functional, native debugger front-end. Clear your schedule if you're going to try it yourself. If it weren't for AI assistance I would have given up. The one-time setup process is only open to North America, and involves sharing identify documents (i.e. driver's license) with Microsoft. Unlike the rest of Azure, that part was streamlined and fairly painless. Between the cost and this requirement, this is a niche space. However, if this is your niche, aas-sign is currently the best software available. It's the tool Microsoft should have written, but didn't due to ongoing institutional failures. The alternatives are a pair of tools: Azure CLI

## dcmake: a new CMake debugger UI

DevFeed: [dcmake: a new CMake debugger UI](<https://devfeed.tech/articles/dcmake-a-new-cmake-debugger-ui-20512.md>)

Original publisher: [Read original article](<https://nullprogram.com/blog/2026/04/07/>)

Published: 2026-04-07T03:04:02Z

Content type: article

Language: en

Sources: [Chris Wellons](<https://devfeed.tech/sources/chris-wellons.md>)

Topics: [CMake](<https://devfeed.tech/topics/cmake.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [GUI](<https://devfeed.tech/topics/gui.md>), [Visual Studio](<https://devfeed.tech/topics/visual-studio.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [cmake](<https://devfeed.tech/tags/cmake.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [debugger](<https://devfeed.tech/tags/debugger.md>), [engineering-productivity](<https://devfeed.tech/tags/engineering-productivity.md>), [linux](<https://devfeed.tech/tags/linux.md>), [macos](<https://devfeed.tech/tags/macos.md>), [ui](<https://devfeed.tech/tags/ui.md>), [visual-studio](<https://devfeed.tech/tags/visual-studio.md>), [windows](<https://devfeed.tech/tags/windows.md>)

### AI overview

The article introduces dcmake, a cross-platform native GUI debugger for CMake's debugger mode. It describes its DAP-based interaction, Dear ImGui interface, Visual Studio-inspired controls, persistent UI state, and use of AI to accelerate development.

### Source excerpt

CMake has a --debugger mode since 3.27 (July 2023), allowing software to manipulate it interactively through the Debugger Adaptor Protocol (DAP), an HTTP-like protocol passing JSON messages. Debugger front-ends can start, stop, step, breakpoint, query variables, etc. a live CMake. When I came across this mode, I immediately conceived a project putting it to use. Thanks to recent leaps in software engineering productivity, I had a working prototype in 30 minutes, and by the end of that same day, a complete, multi-platform, native, GUI application. I named it dcmake ("debugger for CMake"). I've tested it on macOS, Windows, and Linux. Despite only being couple days old, it's one of the coolest things I've ever built. Prior to 2026, I estimate it would have taken me a month to get the tool to this point. It has a Dear ImGui interface, which I've experienced as a user but never built on myself before. Specifically the docking branch. In a sense it's a toolkit for building debuggers, so it's playing an enormous role in how quickly I put this project together. All of the "windows" tear out and may be free-floating or docked wherever you like, closely matching the classic Visual Studio UI. I borrowed all the same keybindings: F10 to step over, F11 to step in, F5 to start/continue, shift+F5 to stop. Click on line numbers to toggle breakpoints, right click to run-to-line, hover over variables with the mouse to see their values. Nearly every every UI state persists across sessions, and it opens nearly instantly. This is just one of many situations I've used AI the past month for UI development, and it's been shockingly effective. I can describe roughly the interface I want, and the AI makes it happen in a matter of minutes. It understands what I mean, filling in the details, sometimes anticipating what I'll ask for next. If I'm unsure how I want a UI to work, it also offers good advice. If I need simple icons and such, it can draw those, too. It's all incredibly empowering. On

## 2026 has been the most pivotal year in my career... and it's only March

DevFeed: [2026 has been the most pivotal year in my career... and it's only March](<https://devfeed.tech/articles/2026-has-been-the-most-pivotal-year-in-my-career-and-it-s-only-march-20511.md>)

Original publisher: [Read original article](<https://nullprogram.com/blog/2026/03/29/>)

Published: 2026-03-29T21:38:22Z

Content type: opinion

Language: en

Sources: [Chris Wellons](<https://devfeed.tech/sources/chris-wellons.md>)

Topics: [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Automation](<https://devfeed.tech/topics/automation.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [2026](<https://devfeed.tech/tags/2026.md>), [ai](<https://devfeed.tech/tags/ai.md>), [automation](<https://devfeed.tech/tags/automation.md>), [c](<https://devfeed.tech/tags/c.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [development](<https://devfeed.tech/tags/development.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [software](<https://devfeed.tech/tags/software.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>), [tools](<https://devfeed.tech/tags/tools.md>)

### AI overview

The author reflects on leaving a long-term employer and adapting to AI-assisted software engineering. They describe no longer writing code directly in their professional role, instead coordinating AI helpers while continuing to read, understand, and evaluate code. AI assistance enabled substantial contributions to a large C++ codebase during onboarding, while shifting bottlenecks away from code production. The article also argues that frontier AI products are advancing faster than self-hosted or free models.

### Source excerpt

In February I left my employer after nearly two decades of service. In the moment I was optimistic, yet unsure I made the right choice. Dust settled, I'm now absolutely sure I chose correctly. I'm happier and better for it. There were multiple factors, but it's not mere chance it coincides with these early months of the automation of software engineering. I left an employer that is years behind adopting AI to one actively supporting and encouraging it. As of March, in my professional capacity I no longer write code myself. My current situation was unimaginable to me only a year ago. Like it or not, this is the future of software engineering. Turns out I like it, and having tasted the future I don't want to go back to the old ways. In case you're worried, this is still me. These are my own words. Writing is thinking, and it would defeat the purpose for an AI to write in my place on my personal blog. That's not going to change. I still spend much time reading and understanding code, and using most of the same development tools. It's more like being a manager, orchestrating a nebulous team of inhumanly-fast, nameless assistants. Instead of dicing the vegetables, I conjure a helper to do it while I continue to run the kitchen. I haven't managed people in some 20 years now, but I can feel those old muscles being put to use again as I improve at this new role. Will these kitchens still need human chefs like me by the end of the decade? Unclear, and it's something we all need to prepare for. My situation gave me an experience onboarding with AI assistance -- a fast process given a near-instant, infinitely-patient helper answering any question about the code. By second week I was making substantial, wide contributions to the large C++ code base. It's difficult to attach a quantifiable factor like 2x, 5x, 10x, etc. faster, but I can say for certain this wouldn't have been possible without AI. The bottlenecks have shifted from producing code, which now takes relatively no time

## Structured Output with LangChain and Llamafile

DevFeed: [Structured Output with LangChain and Llamafile](<https://devfeed.tech/articles/structured-output-with-langchain-and-llamafile-25139.md>)

Original publisher: [Read original article](<https://blog.brakmic.com/structured-output-with-langchain-and-llamafile/>)

Author: brakmic

Published: 2025-06-22T16:50:12Z

Content type: tutorial

Language: en

Sources: [Harris Brakmic - Coding](<https://devfeed.tech/sources/harris-brakmic-coding.md>)

Topics: [LangChain](<https://devfeed.tech/topics/langchain.md>), [llamafile](<https://devfeed.tech/topics/llamafile.md>), [JSON](<https://devfeed.tech/topics/json.md>), [llama.cpp](<https://devfeed.tech/topics/llama-cpp.md>), [Parser](<https://devfeed.tech/topics/parser.md>), [Pydantic](<https://devfeed.tech/topics/pydantic.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [code](<https://devfeed.tech/tags/code.md>), [coding](<https://devfeed.tech/tags/coding.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [import](<https://devfeed.tech/tags/import.md>), [json](<https://devfeed.tech/tags/json.md>), [langchain](<https://devfeed.tech/tags/langchain.md>), [llama-cpp](<https://devfeed.tech/tags/llama-cpp.md>), [llamafile](<https://devfeed.tech/tags/llamafile.md>), [llm](<https://devfeed.tech/tags/llm.md>), [local](<https://devfeed.tech/tags/local.md>), [local-llm](<https://devfeed.tech/tags/local-llm.md>), [models](<https://devfeed.tech/tags/models.md>), [properties](<https://devfeed.tech/tags/properties.md>), [python](<https://devfeed.tech/tags/python.md>), [structured-output](<https://devfeed.tech/tags/structured-output.md>)

### AI overview

A tutorial on using LangChain with Llamafile to produce structured JSON output from a local large language model. It uses JsonOutputParser, PromptTemplate, and a Pydantic model because Llamafile does not provide a with_structured_output method.

### Source excerpt

Learn how to extend Llamafile with LangChain's JsonParser to produce clean, structured JSON output

## Revisiting HPX

DevFeed: [Revisiting HPX](<https://devfeed.tech/articles/revisiting-hpx-25138.md>)

Original publisher: [Read original article](<https://blog.brakmic.com/revisiting-hpx/>)

Author: brakmic

Published: 2024-09-23T09:53:03Z

Content type: tutorial

Language: en

Sources: [Harris Brakmic - Coding](<https://devfeed.tech/sources/harris-brakmic-coding.md>)

Topics: [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Testing](<https://devfeed.tech/topics/testing.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [coding](<https://devfeed.tech/tags/coding.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [distributed-computing](<https://devfeed.tech/tags/distributed-computing.md>), [examples](<https://devfeed.tech/tags/examples.md>), [framework](<https://devfeed.tech/tags/framework.md>), [hpx](<https://devfeed.tech/tags/hpx.md>), [installation](<https://devfeed.tech/tags/installation.md>), [macos](<https://devfeed.tech/tags/macos.md>), [parallel](<https://devfeed.tech/tags/parallel.md>), [parallelism](<https://devfeed.tech/tags/parallelism.md>), [programming](<https://devfeed.tech/tags/programming.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

This hands-on article revisits HPX, a runtime system for asynchronous, parallel, and distributed computing. It covers installation on macOS, configuration, compilation, and testing, and discusses HPX features including task-based parallelism and components.

### Source excerpt

This article explores the powerful parallelization and distributed computing capabilities of the HPX framework. Starting with installation on macOS, it walks through configuring, compiling, and testing HPX on a modest machine, highlighting key features like asynchronous programming, task-based parallelism, and HPX components. Whether new to HPX or looking for practical examples, this guide offers a hands-on approach to understanding and utilizing HPX in real-world scenarios.

## Practical parsing with PEG and cpp-peglib

DevFeed: [Practical parsing with PEG and cpp-peglib](<https://devfeed.tech/articles/practical-parsing-with-peg-and-cpp-peglib-36520.md>)

Original publisher: [Read original article](<https://berthub.eu/articles/posts/practical-peg-parsing/>)

Published: 2024-04-22T14:19:09Z

Content type: tutorial

Language: en

Sources: [Bert Hubert's writings](<https://devfeed.tech/sources/bert-hubert-s-writings.md>)

Topics: [Parsing](<https://devfeed.tech/topics/parsing.md>), [Parser](<https://devfeed.tech/topics/parser.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Library](<https://devfeed.tech/topics/library.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [examples](<https://devfeed.tech/tags/examples.md>), [library](<https://devfeed.tech/tags/library.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [programming](<https://devfeed.tech/tags/programming.md>), [repository](<https://devfeed.tech/tags/repository.md>)

### AI overview

A practical tutorial on Parsing Expression Grammars that builds a non-trivial parser in C++ using the single-include cpp-peglib library. It also points readers to PEG libraries for Go, Rust, and Python and provides a GitHub repository containing the examples.

### Source excerpt

A very practical introduction to Parsing Expression Grammars (PEGs), in which we'll build a non-trivial parser using the most excellent cpp-peglib single-include C++ library. Post includes links to PEG libraries for Go, Rust and Python, and a ready to run GitHub repository of all examples. If I'll ever stop programming it will be because I can no longer find the energy to parse even just one more string format.

## MutexProtected: A C++ Pattern for Easier Concurrency

DevFeed: [MutexProtected: A C++ Pattern for Easier Concurrency](<https://devfeed.tech/articles/mutexprotected-a-c-pattern-for-easier-concurrency-38361.md>)

Original publisher: [Read original article](<https://awesomekling.github.io/MutexProtected-A-C++-Pattern-for-Easier-Concurrency/>)

Author: Andreas Kling

Published: 2023-04-06T00:00:00Z

Content type: tutorial

Language: en

Sources: [Andreas Kling](<https://devfeed.tech/sources/andreas-kling.md>)

Topics: [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Code](<https://devfeed.tech/topics/code.md>), [Deadlock](<https://devfeed.tech/topics/deadlock.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [callback](<https://devfeed.tech/tags/callback.md>), [class](<https://devfeed.tech/tags/class.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [locks](<https://devfeed.tech/tags/locks.md>), [mutex](<https://devfeed.tech/tags/mutex.md>), [programming](<https://devfeed.tech/tags/programming.md>), [serenityos](<https://devfeed.tech/tags/serenityos.md>), [technical](<https://devfeed.tech/tags/technical.md>), [type-system](<https://devfeed.tech/tags/type-system.md>)

### AI overview

This tutorial explains the MutexProtected pattern, which combines a mutex and protected data behind a callback-based C++ API. It compares manual locking in C with C++ RAII and the newer pattern, showing how the design reduces forgotten-lock errors and encodes the mutex-data relationship in the type system. It also notes that inconsistent ordering of multiple MutexProtected instances can still cause deadlocks.

### Source excerpt

In this post, we will discuss the challenges of programming with locks and how the C++ language offers some useful tools to make it easier. We will start with an example in C and then use C++ to improve upon it in steps. The example APIs are based on real-life APIs from the SerenityOS kernel.

## How SerenityOS declares ssize\_t

DevFeed: [How SerenityOS declares ssize\_t](<https://devfeed.tech/articles/how-serenityos-declares-ssize-t-38356.md>)

Original publisher: [Read original article](<https://awesomekling.github.io/How-SerenityOS-declares-ssize_t/>)

Author: Andreas Kling

Published: 2023-04-04T00:00:00Z

Content type: opinion

Language: en

Sources: [Andreas Kling](<https://devfeed.tech/sources/andreas-kling.md>)

Topics: [C](<https://devfeed.tech/topics/c.md>), [POSIX](<https://devfeed.tech/topics/posix.md>), [Operating system](<https://devfeed.tech/topics/operating-system.md>), [compilers](<https://devfeed.tech/topics/compilers.md>), [standard](<https://devfeed.tech/topics/standard.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [library](<https://devfeed.tech/tags/library.md>), [posix](<https://devfeed.tech/tags/posix.md>), [serenityos](<https://devfeed.tech/tags/serenityos.md>), [standard](<https://devfeed.tech/tags/standard.md>), [technical](<https://devfeed.tech/tags/technical.md>), [unix](<https://devfeed.tech/tags/unix.md>)

### AI overview

This article explains how SerenityOS declares ssize_t using a C preprocessor macro technique. It contrasts the approach with more architecture-specific declarations commonly used by other C libraries and notes the limitations of the hack.

### Source excerpt

This post explores one of my favorite hacks in SerenityOS. I don't recommend doing this in your codebase, but it has worked for us so far. :^)

## Hello Deep Learning: Further reading & worthwhile projects

DevFeed: [Hello Deep Learning: Further reading & worthwhile projects](<https://devfeed.tech/articles/hello-deep-learning-further-reading-worthwhile-projects-36360.md>)

Original publisher: [Read original article](<https://berthub.eu/articles/posts/dl-and-now-what/>)

Published: 2023-03-30T10:00:09Z

Content type: article

Language: en

Sources: [Bert Hubert's writings](<https://devfeed.tech/sources/bert-hubert-s-writings.md>)

Topics: [Deep learning](<https://devfeed.tech/topics/deep-learning.md>), [PyTorch](<https://devfeed.tech/topics/pytorch.md>), [Code](<https://devfeed.tech/topics/code.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [llama.cpp](<https://devfeed.tech/topics/llama-cpp.md>), [Whisper](<https://devfeed.tech/topics/whisper.md>), [llama](<https://devfeed.tech/topics/llama.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [jupyter notebooks](<https://devfeed.tech/topics/jupyter-notebooks.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [deep-learning](<https://devfeed.tech/tags/deep-learning.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [projects](<https://devfeed.tech/tags/projects.md>), [python](<https://devfeed.tech/tags/python.md>), [pytorch](<https://devfeed.tech/tags/pytorch.md>), [reading](<https://devfeed.tech/tags/reading.md>)

### AI overview

This article concludes the Hello Deep Learning series with a short list of further-reading resources and projects. It recommends PyTorch documentation, educational material by Andrej Karpathy, FastAI Jupyter notebooks, and local open-source projects including Whisper.cpp and Llama.cpp.

### Source excerpt

This page is part of the Hello Deep Learning series of blog posts. You are very welcome to improve this page via GitHub! After having completed this series of blogposts (well done!) you should have a good grounding in what deep learning is actually doing. However, this was of course only a small 20k word introduction, so there is a lot left to learn. Unfortunately, there is a lot of nonsense online.

## Memory safety for SerenityOS

DevFeed: [Memory safety for SerenityOS](<https://devfeed.tech/articles/memory-safety-for-serenityos-38360.md>)

Original publisher: [Read original article](<https://awesomekling.github.io/Memory-safety-for-SerenityOS/>)

Author: Andreas Kling

Published: 2022-05-19T00:00:00Z

Content type: article

Language: en

Sources: [Andreas Kling](<https://devfeed.tech/sources/andreas-kling.md>)

Topics: [Memory Safety](<https://devfeed.tech/topics/memory-safety.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Programming language](<https://devfeed.tech/topics/programming-language.md>), [systems](<https://devfeed.tech/topics/systems.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [jakt](<https://devfeed.tech/tags/jakt.md>), [memory-safety](<https://devfeed.tech/tags/memory-safety.md>), [programming-language](<https://devfeed.tech/tags/programming-language.md>), [serenityos](<https://devfeed.tech/tags/serenityos.md>), [systems](<https://devfeed.tech/tags/systems.md>), [technical](<https://devfeed.tech/tags/technical.md>)

### AI overview

The post explains SerenityOS's plan to improve memory safety. It describes why the project is moving away from C++, the author's exploration of memory-safe systems languages, and the possibility of designing a new programming language.

### Source excerpt

This post describes how we're going to achieve memory safety in SerenityOS.

## Linear Time Liveness Analysis

DevFeed: [Linear Time Liveness Analysis](<https://devfeed.tech/articles/linear-time-liveness-analysis-25069.md>)

Original publisher: [Read original article](<https://databasearchitects.blogspot.com/2020/04/linear-time-liveness-analysis.html>)

Author: Thomas Neumann (noreply@blogger.com)

Published: 2020-04-28T14:42:00Z

Content type: article

Language: en

Sources: [Database Architects](<https://devfeed.tech/sources/database-architects.md>)

Topics: [Compiler](<https://devfeed.tech/topics/compiler.md>), [Code](<https://devfeed.tech/topics/code.md>), [gcc](<https://devfeed.tech/topics/gcc.md>), [C](<https://devfeed.tech/topics/c.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [c](<https://devfeed.tech/tags/c.md>), [code](<https://devfeed.tech/tags/code.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [gcc](<https://devfeed.tech/tags/gcc.md>)

### AI overview

The article examines why compilers can take super-linear time on large generated functions with many conditional blocks. It reports that GCC becomes effectively unable to compile sufficiently large examples and that Clang also shows super-linear behavior under optimization. It then introduces a control-flow-graph-based approach to liveness analysis intended to scale better than propagating liveness sets.

### Source excerpt

Standard compiler are usually used with hand-written programs. These programs tend to have reasonably small functions, and can be processed in (nearly) linear time. Generated programs however can be quite large, and compilers sometimes struggle to compile them at all. This can be seen with the following (silly) demonstration script: import subprocess from timeit import default_timer as timer def doTest(size): with open("foo.cpp", "w") as out: print("int foo(int x) {", file=out) for s in range(size): p="x" if s==0 else f'l{s-1}' print (f'int l{s}; if (__builtin_sadd_overflow({p},1,&l{s})) goto error;', file=out) print(f'return l{size-1};error: throw;}}', file=out); start = timer() subprocess.run(["gcc", "-c", "foo.cpp"]) stop = timer() print(size, ": ", (stop-start)) for size in [10,100,1000,10000,100000]: doTest(size) It generates one function with n statements of the form "int lX; if (__builtin_sadd_overflow(lY,1,&lX)) goto error;" which are basically just n additions with overflow checks, and then measures the compile time. The generated code is conceptually a very simple, but it contains a lot of basic blocks due to the large number of ifs. When compiling with gcc we get the following compile times: n101001,00010,000100,000 compilation [s]0.020.040.1934.99> 1h The compile time is dramatically super linear, gcc is basically unable to compile the function if it contains 10,000 ifs or more. In this simple example clang fares better when using -O0, but with -O1 it shows super-linear compile times, too. This is disastrous when processing generated code, where we cannot easily limit the size of individual functions. In our own system we use neither gcc nor clang for query compilation, but we have same problem, namely compiling large generated code. And super-linear runtime quickly becomes an issue when the input is large. One particular important problem in this context is liveness analysis, i.e, figuring out which value is alive at which part of the program. The textb

## Smarter C/C++ inlining with \_\_attribute\_\_((flatten))

DevFeed: [Smarter C/C++ inlining with \_\_attribute\_\_((flatten))](<https://devfeed.tech/articles/smarter-c-c-inlining-with-attribute-flatten-38362.md>)

Original publisher: [Read original article](<https://awesomekling.github.io/Smarter-C++-inlining-with-attribute-flatten/>)

Author: Andreas Kling

Published: 2020-04-27T00:00:00Z

Content type: tutorial

Language: en

Sources: [Andreas Kling](<https://devfeed.tech/sources/andreas-kling.md>)

Topics: [inlining](<https://devfeed.tech/topics/inlining.md>), [c/c++](<https://devfeed.tech/topics/c-c-plus-plus.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [clang](<https://devfeed.tech/topics/clang.md>), [gcc](<https://devfeed.tech/topics/gcc.md>), [build times](<https://devfeed.tech/topics/build-times.md>)

Tags: [build-times](<https://devfeed.tech/tags/build-times.md>), [c-c-plus-plus](<https://devfeed.tech/tags/c-c-plus-plus.md>), [clang](<https://devfeed.tech/tags/clang.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [function](<https://devfeed.tech/tags/function.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [technical](<https://devfeed.tech/tags/technical.md>)

### AI overview

This post explains how to use the __attribute__((flatten)) function attribute in C/C++ to apply aggressive inlining selectively. GCC and Clang support the attribute, which inlines a function's callees while limiting the program-size, cache-locality, and build-time costs of broader inlining.

### Source excerpt

This post describes a compile-time technique for getting the benefits of aggressive inlining in hot code while protecting cool code from its downsides.

## Running Alexa CPP SDK on ESP32

DevFeed: [Running Alexa CPP SDK on ESP32](<https://devfeed.tech/articles/running-alexa-cpp-sdk-on-esp32-13949.md>)

Original publisher: [Read original article](<https://developer.espressif.com/blog/running-alexa-cpp-sdk-on-esp32/>)

Author: John Lee

Published: 2018-05-18T00:00:00Z

Content type: article

Language: en

Sources: [Blog on Developer Portal](<https://devfeed.tech/sources/blog-on-developer-portal.md>)

Topics: [ESP32](<https://devfeed.tech/topics/esp32.md>), [SDKs](<https://devfeed.tech/topics/sdks.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [software-development](<https://devfeed.tech/topics/software-development.md>)

Tags: [alexa](<https://devfeed.tech/tags/alexa.md>), [blog](<https://devfeed.tech/tags/blog.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [esp32](<https://devfeed.tech/tags/esp32.md>), [framework](<https://devfeed.tech/tags/framework.md>), [github](<https://devfeed.tech/tags/github.md>), [hardware](<https://devfeed.tech/tags/hardware.md>), [http](<https://devfeed.tech/tags/http.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [software](<https://devfeed.tech/tags/software.md>), [spiram](<https://devfeed.tech/tags/spiram.md>), [thread](<https://devfeed.tech/tags/thread.md>), [threads](<https://devfeed.tech/tags/threads.md>), [tls](<https://devfeed.tech/tags/tls.md>)

### AI overview

The article describes Espressif's effort to port Amazon's Alexa C++ SDK to the ESP32 and launch a beta preview. It reports that the ESP32 hardware and software framework supported the demanding workload, which used 47 threads, audio buffers, two TLS connections, and substantial external SPI memory.

### Source excerpt

Back in late 2017, when Amazon launched their C++ SDK for Alexa, we thought it would be fun to port the SDK on ESP32. It not only will showcase the powerful development tools and execution environment that ESP32 currently has, but it will also be a great way to run Alexa on ESP32. We recently launched a beta preview of this Alexa on ESP32 on github. The Alexa C++ SDK is targetted for micro-processores, and is quite heavy to be run on micro-controllers.

## Security Alert - cpp-ethereum's account unlocking problem not yet fixed \[Now fixed\]

DevFeed: [Security Alert - cpp-ethereum's account unlocking problem not yet fixed \[Now fixed\]](<https://devfeed.tech/articles/security-alert-cpp-ethereum-s-account-unlocking-problem-not-yet-fixed-now-fixed-16761.md>)

Original publisher: [Read original article](<https://blog.ethereum.org/en/2016/06/03/security-alert-cpp-ethereums-account-unlocking-problem-not-yet-fixed>)

Author: Christian Reitwiessner

Published: 2016-06-03T18:05:58Z

Content type: news

Language: en

Sources: [Ethereum Foundation Blog](<https://devfeed.tech/sources/ethereum-foundation-blog.md>)

Topics: [Security](<https://devfeed.tech/topics/security.md>), [bug](<https://devfeed.tech/topics/bug.md>), [Ethereum](<https://devfeed.tech/topics/ethereum.md>)

Tags: [bug](<https://devfeed.tech/tags/bug.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [ethereum](<https://devfeed.tech/tags/ethereum.md>), [issue](<https://devfeed.tech/tags/issue.md>), [security](<https://devfeed.tech/tags/security.md>)

### AI overview

The article warns that the account-unlocking security issue in cpp-ethereum was not completely fixed by version 1.2.6. It identifies affected versions from 1.2.0 through 1.2.6, notes that geth, Mist, and the Ethereum Wallet are not affected in the stated configurations, and announces a subsequent bugfix release, version 1.2.7.

### Source excerpt

Affected configurations: cpp-ethereum (eth, AlethZero, ...) version 1.2.0 up to 1.2.6 Note: Neither "geth" nor "Mist" nor the "Ethereum Wallet" (unless explicitly used together with cpp-ethereum) are affected by this, they lock accounts correctly again. This is just a quick head's up that cpp-ethereum's security issue around account security...