Sign in

Stefano Cristiano

@pagghiu.bsky.social
131 followers 87 following 167 posts

Principal Research Scientist@NVIDIA github.com/Pagghiu/SaneCppLibraries Videos: youtube.com/@Pagghiu Site: pagghiu.github.io Opinions are my own.

PostsRepliesMedia
Stefano Cristiano @pagghiu.bsky.social · 02/10/2026
Thanks, Jeremy! I’ve always wanted to get rid of all those random string literals leaking into the binary, while also bubbling up some of the platform/library specific errors without using exceptions (😄). Message formatting was also pretty inconsistent before and long overdue for a proper cleanup…
010
Stefano Cristiano @pagghiu.bsky.social · 01/10/2026
Sane C++ Libraries - September 2026 ! 🍂 ✅ Structured errors, optional diagnostics ✅ Unix-domain sockets ✅ External async HTTP transports ✅ Updated agent skills ✅ Async lifetime and cancellation fixes #cpp #cplusplus
github.com
Release 2026-09 · Pagghiu/SaneCppLibraries
September 2026 Update Blog Post Structured Result errors The biggest change this month is the error model shared by the libraries. Previously, SC::Result stored a pointer to an error message. It wa...
110
Stefano Cristiano @pagghiu.bsky.social · 31/08/2026
Sane C++ Libraries - August 2026 ! 🌊 ✅ New Cryptography library - A wrapper for OS API (macOS CommonCrypto, Windows CNG, Linux AF_ALG) + OpenSSL3 on all OS ✅ AsyncStreams using the above Cryptography ✅ Fibers library improvements github.com/Pagghiu/Sane... #cpp #cplusplus
github.com
Release 2026-08 · Pagghiu/SaneCppLibraries
August 2026 Update Blog Post Cryptography The biggest addition this month is the new Cryptography library. It provides a small synchronous interface for secure random bytes, AES-GCM, HMAC, HKDF, an...
010
Stefano Cristiano @pagghiu.bsky.social · 01/08/2026
Sane C++ Libraries - July 2026 ! 🏖️ ✅New Fibers library - stackful cooperative scheduler ✅New AsyncFibers library - async/io for Fibers Will your agents be more effective at writing callbacks (Async), coroutines (Await) or sync-looking code (Fibers)?😀 github.com/Pagghiu/Sane... #cpp #cplusplus
Sane C++ dependency graph for July 2026
000
Reposted by Stefano Cristiano
Andre Weissflog @flohofwoe.bsky.social · 15/07/2026
Tinkering with Box3D + Sokol + Emscripten :) Box3D is *fun* to work with, very simple and straightforward C API, and very configurable (this is simd + single-threaded). New sokol-sample will be up in one or two days.
3535
Stefano Cristiano @pagghiu.bsky.social · 16/07/2026
Hot take: software documentation focused on code tutorials will become obsolete. In AI-first development, documentation should teach humans the ideas behind a piece of software, while agent skills take care of code related details. I need to start doing my part on Sane C++ docs
000
Stefano Cristiano @pagghiu.bsky.social · 14/07/2026
Have you tried Sane C++ Libraries in a real project, even an experiment or internal tool? If so, which component, project type and platform? Did you evaluate, integrate, ship, or still use it? Links welcome but optional. Reply or DM me. I’d love to learn who it helps today. #cpp #cplusplus
000
Stefano Cristiano @pagghiu.bsky.social · 01/07/2026
Sane C++ Libraries - June 2026 ! ☀️ ✅Explicit Agentic Programming focus pagghiu.github.io/SaneCppLibra... ✅Remove all dependencies from Foundation and Strings ✅Support Windows Long Paths ✅Formalize some of the many Async implicit contracts github.com/Pagghiu/Sane... #cpp #cplusplus
000
Stefano Cristiano @pagghiu.bsky.social · 17/06/2026
Yes, I agree. I will add plans / specs for new libraries / features and reverse-engineer the Specs and ADR for the manually written code (still the large majority of the project code btw) plus the features added in the last months (for which I have unfortunately already discarded most plans).
100
Stefano Cristiano @pagghiu.bsky.social · 17/06/2026
After more than 6 months of building Sane C++ Libraries entirely with AI coding agents, I've decided to explicitly reposition the project around agent-driven development. The website and project have been renovated to make that vision clear: pagghiu.github.io/SaneCppLibra... #cpp #cplusplus
230
Stefano Cristiano @pagghiu.bsky.social · 31/05/2026
Sane C++ Libraries - May 2026 ! 🌷 ✅Await: new C++ 20 coroutine library on top of Async ✅Http: router, WebSocket/API/File server ✅SC-package: becomes more declarative ✅Standard C++ headers now allowed by default ✅Async: remove dependency on liburing github.com/Pagghiu/Sane... #cpp #cplusplus
010
Stefano Cristiano @pagghiu.bsky.social · 01/05/2026
Sane C++ Libraries - April 2026 ! 🌷 SC::Build gets: ✅ self-hosted backend default ✅ cross-compilation (sysroots + llvm-mingw) ✅ Wine / QEMU cross-runs ✅ curl SC-build.sh support for external projects 🧪 first experimental Fil-C++ target github.com/Pagghiu/Sane... #cpp #cplusplus
000
Stefano Cristiano @pagghiu.bsky.social · 31/03/2026
Sane C++ Libraries - March 2026 ✅ SC::Build native backend ✅ Simplified internal deps (AsyncStreams) ✅ Faster Http parser + chunked encoding ✅ NEW standalone HttpClient lib ✅ FileSystem/File metadata + permissions APIs ✅ Socket multicast + TCP_NODELAY github.com/Pagghiu/Sane... #cpp #cplusplus
Dependencies diagram for Sane C++ Libraries
000
Stefano Cristiano @pagghiu.bsky.social · 28/02/2026
Sane C++ Libraries - February 2026 ✅New SerialPort lib ✅File+Async support named pipes ✅AsyncFileSend (sendfile / TransmitFile) ✅Async uses pidfd (process) / eventfd (wake-up) ✅AGENTS.md ✅Support running SCTest in parallel worktrees github.com/Pagghiu/Sane... #cpp #cplusplus
github.com
Release 2026-02 · Pagghiu/SaneCppLibraries
February 2026 Update Blog Post SerialPort and Named Pipes February has been all about connecting low-level I/O pieces end to end. A new cross-platform SerialPort library landed with dedicated tests...
000
Stefano Cristiano @pagghiu.bsky.social · 31/01/2026
Probably prompts are to generated code the same way as human written code is to assembly. Reading generated code may be useful in rare cases (like reading assembly today) but most future AI SW builders will happily skip it because it will be too inconvenient, slowing down software creation too much.
010
Stefano Cristiano @pagghiu.bsky.social · 31/01/2026
Projects like this one, aiming at lowering complexity for human programmers, in a specific programming language (C++), feel obsolete to me now that AI makes it possible to rewrite entire softwares / systems, swapping languages and/or libraries/frameworks with minimal effort [2/2]
100
Stefano Cristiano @pagghiu.bsky.social · 31/01/2026
In the last months I have been using AI to write 100% of the code I am responsible for. I have been starting to ask so many questions to myself. The first is if and in what form to continue "Sane C++ Libraries" project, currently almost entirely made of "human-written" code [1/2]
100
Stefano Cristiano @pagghiu.bsky.social · 31/01/2026
I copy-pasted the wrong link for the release...the correct one is github.com/Pagghiu/Sane...
github.com
Release 2026-01 · Pagghiu/SaneCppLibraries
January 2026 Update Blog Post It looks like AI is taking over the world (starting from writing code better and faster than humans). Probably this entire project is now totally useless and obsolete,...
010
Stefano Cristiano @pagghiu.bsky.social · 31/01/2026
Sane C++ Libraries - January 2026 ✅Http performance + stability (keep-alive, multipart/form-data) ✅AsyncStreams (child buffers + AutoDestroy + async destruction) ✅New AsyncWebServer example ✅New Http Benchmark github.com/Pagghiu/Sane... #cpp #cplusplus
github.com
Release 2025-12 · Pagghiu/SaneCppLibraries
December 2025 Update Blog Post Dependencies The bulk of work for this month has been getting rid of the Memory dependency from the Http library. This is incredibly important, because allocation is ...
110
Stefano Cristiano @pagghiu.bsky.social · 01/01/2026
Sane C++ Libraries - December 2025 ✅ Http library is now allocations free! ✅ Http API is shaping up (but still draft) ✅ Async got fixes for partial Posix writes ✅ Debug visualizers for Span<T> ✅ Fixes for AsyncStreams, Process, File and Foundation! github.com/Pagghiu/Sane... #cpp #cplusplus
github.com
Release 2025-12 · Pagghiu/SaneCppLibraries
December 2025 Update Blog Post Dependencies The bulk of work for this month has been getting rid of the Memory dependency from the Http library. This is incredibly important, because allocation is ...
010
Stefano Cristiano @pagghiu.bsky.social · 27/12/2025
I have been further restructuring the API making it simple to fix all buffers for a given client/connection. The single array holding memory for all connections can easily be resized at runtime, leveraging well known virtual memory reservation / commit techniques (StableArray).
000
Stefano Cristiano @pagghiu.bsky.social · 22/12/2025
Sane C++ Libraries is 2 years old! 🎉🎂 🙏 repost to support the project!❤️ ✅Fast compile time ✅Bloat free ✅Simple readable code ✅Easy to integrate ⛔️No C++ Standard Library ⛔️No third party build dependencies github.com/Pagghiu/SaneCppLibraries pagghiu.github.io/site/blog/2025-12-23-SaneCpp2Year.html
000
Stefano Cristiano @pagghiu.bsky.social · 22/12/2025
I am also updating SCExample to use VirtualMemory, pre-allocating a large slice of address space for a large number of clients. I still need to update SCExample to show how to do the actual runtime resizing of maximum clients with the running web server.
100
Stefano Cristiano @pagghiu.bsky.social · 22/12/2025
I've been pushing a few changes to cleanup and improve the API. When using fixed request / response queues now just 4 buffers are needed instead of 6. github.com/Pagghiu/Sane...
100
Stefano Cristiano @pagghiu.bsky.social · 14/12/2025
After some heavy rework, also Sane C++ Http library is allocation free, by adopting Async Streams everywhere. Creating an async file web server uses only 6 buffers. Not a single byte will be allocated outside of them. SC::Http library is still draft, but it's steadily improving! #cpp #cplusplus
A small code snippet showing the new Async Streams based Http API for Sane C++ Libraries
140
Stefano Cristiano @pagghiu.bsky.social · 30/11/2025
Sane C++ Libraries - November 2025 ✅ Http library based on AsyncStreams (still draft) ✅ AsyncStreams read-only / growable buffers support ✅ Async fixes for reentrancy ✅ ToolsBootstrap C port for extra speed ✅ Build improvements / de-hardcoding github.com/Pagghiu/Sane... #cpp #cplusplus
Dependencies for Sane C++ Libraries for November 2025
020
Stefano Cristiano @pagghiu.bsky.social · 01/11/2025
Sane C++ Libraries - October 2025 ✅ Further reduction of internal dependencies ✅ Bring Your Own Containers example (InteropSTL) ✅ New bootstrap for SC::Tools written in C++ ✅ Increased test coverage ✅ Improved CI ✅ Fixes github.com/Pagghiu/Sane... #cpp #cplusplus
Sane C++ Libraries Dependencies (October 2025)
020
Stefano Cristiano @pagghiu.bsky.social · 26/10/2025
Sane C++ Libraries has finally become a BYOC (Bring Your Own Containers) project! We have SC::Strings and SC::Vector<T>, using relative pointers and a "scoped" allocator logic that not everyone may like, but you can now write adapters to use something else
github.com
InteropSTL: Show std::string and std::vector<char> usage with File an… · Pagghiu/SaneCppLibraries@cb8bca4
…d FileSystem libraries
010
Stefano Cristiano @pagghiu.bsky.social · 30/09/2025
Sane C++ Libraries - September 2025 ✅Get rid of many inter-library dependencies ✅Stop accidental dependencies additions in CI ✅Free most libraries from dynamic allocation ✅Transform Build from lib to app ✅Add GDB Pretty Printer ✅Many smaller fixes github.com/Pagghiu/Sane... #cpp #cplusplus
A drawing showing current state of dependencies between Sane C++ Libraries
010
Stefano Cristiano @pagghiu.bsky.social · 05/09/2025
I've been adding to Sane C++ Libraries a GDB debug visualizer (pretty printer in gdb terminology) taking care of strings and containers. In addition to the already existing ones for LLDB and MSVC Debugger (.natvis) I think we should be good now! #cpp #cplusplus
Picture of the pretty printers being registered by the new GDB debug visualizer script for Sane C++ Libraries
000
Stefano Cristiano @pagghiu.bsky.social · 31/08/2025
Sane C++ Libraries - August 2025 ✅ Available as Single File Libs ✅ Threading: Semaphore / Barrier / RWLock (→ Stable) ✅ AsyncStreams: IPC Pipe Streams (→ MVP) ✅ Process: Improve reliability ✅ More fixes (see blog post details) pagghiu.github.io/site/blog/2025-08-31-SaneCppLibrariesUpdate.html #cpp
github.com
Release 2025-08 · Pagghiu/SaneCppLibraries
August 2025 Update Blog Post Single File Libraries One of the core principles of this project is to be "Easy to Integrate". I'm always looking for ways to lower the barrier to entry for using these...
000
Stefano Cristiano @pagghiu.bsky.social · 30/08/2025
Of course I would only vibe-code Sane C++ Libraries!
000
Stefano Cristiano @pagghiu.bsky.social · 11/08/2025
Sane C++ Libraries are now available as amalgamated single-file libs! They can be amalgamated offline or directly in-browser at: pagghiu.github.io/SaneCppLibra... Each amalgamation lists dependencies on other amalgamated libs and the LOC of its header vs. implementation sections. Have fun! #cpp
Screenshot of the Sane C++ Libraries Amalgamation tool, allowing to amalgamate libraries directly in browser.Screenshot of one example amalgamated single file lib (SaneCppFileSystem.h) showing the initial header section with LOC count for header vs. implementation, explicit list of dependencies, copyright etc.
000
Stefano Cristiano @pagghiu.bsky.social · 01/08/2025
Sane C++ Libraries - July 2025 Major cleanup month!🧹 ✅ Massive reduction in inter-library dependencies ✅ 7 libraries now allocation-free: - Async - File - FileSystem - FileSystemIterator - FileSystemWatcher - Process - Socket pagghiu.github.io/site/blog/2025-07-31-SaneCppLibrariesUpdate.html #cpp
github.com
Release 2025-07 · Pagghiu/SaneCppLibraries
July 2025 Update Blog Post Automatic Dependency and LOC List of dependencies between libraries and the number of lines of code (LOC) composing them gives an immediate complexity indication. For thi...
000
Stefano Cristiano @pagghiu.bsky.social · 28/07/2025
I have been removing the dependency of the Sane C++ FileSystemWatcher library from the Async one. There's a new mini-lib now called FileSystemWatcherAsync wiring them together explicitly when event loops are needed. It feels so much cleaner now! github.com/Pagghiu/Sane...
github.com
FileSystemWatcher: Remove dependency from Async and File libraries · Pagghiu/SaneCppLibraries@563c03e
000
Stefano Cristiano @pagghiu.bsky.social · 23/07/2025
I wonder if I should capitalize on this by distributing them as isolated single file libraries...
000
Stefano Cristiano @pagghiu.bsky.social · 23/07/2025
I have been removing many inter-dependencies between Sane C++ "Libraries" (mainly Strings/Memory/Containers) The following libraries do not allocate anymore! 🎉 ✅ Async ✅ File ✅ FileSystem ✅ FileSystemWatcher ✅ FileSystemIterator ✅ Process ✅ Socket See: pagghiu.github.io/SaneCppLibra... #cpp
100
Stefano Cristiano @pagghiu.bsky.social · 30/06/2025
Sane C++ Libraries June 2025: ✅ Async FS Ops - {copy|remove|rename}{file|folder} - {open|close|read|write}file ✅ AsyncUDP {SendTo | ReceiveFrom} ✅ FileSystem {Iterator | Watcher} / Memory dependencies cleanup Blog pagghiu.github.io/site/blog/20... Github github.com/Pagghiu/Sane... #cpp #cplusplus
github.com
Release 2025-06 · Pagghiu/SaneCppLibraries
June 2025 Update Blog Post Async File System Operations A major new feature this month is the unified AsyncFileSystemOperation that provides async file system operations across all platforms. This ...
020
Stefano Cristiano @pagghiu.bsky.social · 28/06/2025
This week I have been adding a few more obvious Async FileSystem Ops: ✅ file/directory rename ✅ file/directory remove pagghiu.github.io/SaneCppLibra... #cpp #cplusplus
pagghiu.github.io
Sane C++ Libraries: Async
020
Stefano Cristiano @pagghiu.bsky.social · 21/06/2025
Async FileSystem Operation has been added to Sane C++ Libraries for: ✅file open/close ✅file read/write ✅file copy All ops are executed on user supplied thread-pool for IOCP(win)/kqueue(mac)/epoll(linux), with special code path for io_uring(linux)! pagghiu.github.io/SaneCppLibra... #cpp #cplusplus
pagghiu.github.io
Sane C++ Libraries: Async
020
Stefano Cristiano @pagghiu.bsky.social · 11/06/2025
I have been adding to Sane C++ Libraries some async primitives needed to send and receive bytes to and from UDP sockets (sendTo and receiveFrom). As always implemented for IOCP, kqueue / epoll and io_uring! Documentation: pagghiu.github.io/SaneCppLibra... Commit: github.com/Pagghiu/Sane... #cpp
000
Stefano Cristiano @pagghiu.bsky.social · 31/05/2025
Sane C++ Libraries May 2025: ✅ AsyncSequence - Serial execution of async requests ✅ SC::Async - Smaller memory footprint - Improved cancellation handling deepwiki.com/Pagghiu/Sane... Blog: pagghiu.github.io/site/blog/20... Github: github.com/Pagghiu/Sane... Have a nice weekend! #cpp #cplusplus
deepwiki.com
Pagghiu/SaneCppLibraries | DeepWiki
The Sane C++ Libraries project provides a comprehensive set of platform abstraction libraries for macOS, Windows, and Linux. This documentation covers the architecture, components, and integration app
010
Stefano Cristiano @pagghiu.bsky.social · 30/04/2025
Sane C++ Libraries April 2025 ✅ Process fork ✅ Struct dumping ✅ Async vectorized writes ✅ Tools update ✅ Repo restructuring Blog: pagghiu.github.io/site/blog/2025-04-30-SaneCppLibrariesUpdate.html Github: github.com/Pagghiu/SaneCppLibraries/releases/tag/release%2F2025%2F04 Have a nice week! #cpp
github.com
Release 2025-04 · Pagghiu/SaneCppLibraries
April 2025 Update Blog Post Process SC::Process library allows spawning process across all supported platforms with many features, including I/O redirection and setting environment variables / star...
020
Stefano Cristiano @pagghiu.bsky.social · 12/04/2025
I've added a ProcessFork class to Sane C++ Libraries after discovering that "fork" on Windows can be approximated with RtlCloneUserProcess. There are a ton of limitations but it's useful to serialize a data structure without blocking for IO or copying it for async IO. Nice! #cpp
000
Stefano Cristiano @pagghiu.bsky.social · 05/04/2025
std::launder is so 2024
010
Stefano Cristiano @pagghiu.bsky.social · 05/04/2025
An example of "struct dumping" in Sane C++ Libraries. Anything SC::Segment based (Vector / String / VectorMap etc.) can be dumped and restored by just casting it (well, start_lifetime_as 🤭). I guess it's not rocket science but recent additions make creating this simple and easy. #cpp #cplusplus
120
Stefano Cristiano @pagghiu.bsky.social · 31/03/2025
Sane C++ Libraries improvements for March 2025: ✅ Custom Allocators (Segment / Containers) ✅ Relative Pointers Blog: pagghiu.github.io/site/blog/2025-03-31-SaneCppLibrariesUpdate.html Github: github.com/Pagghiu/SaneCppLibraries/releases/tag/release%2F2025%2F03 Have a nice week! #cpp #cplusplus
pagghiu.github.io
Sane Coding Blog - ☔️ Sane C++ March 25
Sane Coding Blog
010
Stefano Cristiano @pagghiu.bsky.social · 18/03/2025
This is going to be hard! Fun fact: I was just incidentally thinking right now about using thread_local static to store a memory allocator.
010
Stefano Cristiano @pagghiu.bsky.social · 18/03/2025
While debugging some of the recent container issues for Sane C++ Libraries I have been starting to track the number of allocation and deallocations calls. The test suite by itself is doing 20K allocations and ~50K re-allocations 🫠. Is it MAYBE time to add support for custom allocators? 😅
000
Stefano Cristiano @pagghiu.bsky.social · 17/03/2025
I have been slapping volatile where I think it makes sense to force the optimizer think twice about making weird assumptions around that code. Hopefully this will not be so bad performance wise. I could maybe replace that offset == 0 conditional with some branchless code to improve things further...
000