Stefano Cristiano
pagghiu.bsky.social
Stefano Cristiano
@pagghiu.bsky.social
Principal Research Scientist@NVIDIA
(Omniverse Physics)
Author of "Sane C++ Libraries"
https://github.com/Pagghiu/SaneCppLibraries
Videos: https://youtube.com/@Pagghiu
Site: https://pagghiu.github.io
Opinions are my own.
Pinned
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 - 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
November 1, 2025 at 10:40 AM
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
InteropSTL: Show std::string and std::vector<char> usage with File an… · Pagghiu/SaneCppLibraries@cb8bca4
…d FileSystem libraries
github.com
October 26, 2025 at 7:59 AM
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
September 30, 2025 at 10:31 PM
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
September 5, 2025 at 7:19 PM
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
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...
github.com
August 31, 2025 at 8:35 AM
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
August 11, 2025 at 1:51 PM
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
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...
github.com
August 1, 2025 at 9:21 PM
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...
FileSystemWatcher: Remove dependency from Async and File libraries · Pagghiu/SaneCppLibraries@563c03e
github.com
July 28, 2025 at 8:58 PM
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
July 23, 2025 at 8:21 PM
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
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 ...
github.com
June 30, 2025 at 10:02 PM
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
June 28, 2025 at 8:58 AM
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
Sane C++ Libraries: Async
pagghiu.github.io
June 21, 2025 at 3:11 PM
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
June 11, 2025 at 8:25 PM
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
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
deepwiki.com
May 31, 2025 at 9:00 AM
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
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...
github.com
April 30, 2025 at 10:10 PM
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
April 12, 2025 at 6:49 AM
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
April 5, 2025 at 7:06 AM
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
Sane Coding Blog - ☔️ Sane C++ March 25
Sane Coding Blog
pagghiu.github.io
March 31, 2025 at 8:19 PM
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? 😅
March 18, 2025 at 9:43 PM
I've been pushing one more refactoring for Sane C++ Libraries Containers (never enough!) to take advantage of all of my recently acquired know-how on fighting UB connected to violating compiler aliasing analysis...or at least isolate it!

Hopefully this is now better than before 🧹
#cpp #cplusplus
Foundation: Refactor Segment to reduce and isolate UB · Pagghiu/SaneCppLibraries@7a97c14
github.com
March 17, 2025 at 11:00 PM
It looks like self-relative pointers in C++ always cause UB, unless done through member ptrs.
Member ptrs don't seem to be usable as generalized self-relative ptrs, to locate the start of a dynamic array memory inside an arena or something similar...
Time to rollback the relative pointers change?🙄
I've just pushed a significant update for Vector-like containers in Sane C++ Libraries making the size/capacity header always inline and using relative pointers.
Relative pointers can be useful to do bulk memcpy-serialization of structures based on such containers.
github.com/Pagghiu/Sane...
#cpp
Foundation: Use relative pointers in Segment and make header inline · Pagghiu/SaneCppLibraries@8a00000
github.com
March 12, 2025 at 6:01 PM
Reposted by Stefano Cristiano
Published a WIP 'dynamic_fonts' branch to receive feedback. This should evolve and stabilize toward a 1.92 release (in 1-2 months). github.com/ocornut/imgu...

(Published code in this branch includes font scaling but not style/general scaling yet. Still working on that)
March 5, 2025 at 7:42 PM
I've just pushed a significant update for Vector-like containers in Sane C++ Libraries making the size/capacity header always inline and using relative pointers.
Relative pointers can be useful to do bulk memcpy-serialization of structures based on such containers.
github.com/Pagghiu/Sane...
#cpp
Foundation: Use relative pointers in Segment and make header inline · Pagghiu/SaneCppLibraries@8a00000
github.com
March 9, 2025 at 10:50 PM
Sane C++ Libraries improvements for February 2025:

✅ Containers re-write
✅ SC::Build per-file settings

Blog:
pagghiu.github.io/site/blog/2025-02-28-SaneCppLibrariesUpdate.html

Github:
github.com/Pagghiu/SaneCppLibraries/releases/tag/release%2F2025%2F02

Have a nice weekend!
#cpp #cplusplus
Sane Coding Blog - 🎠 Sane C++ February 25
Sane Coding Blog
pagghiu.github.io
March 1, 2025 at 7:57 AM
For absolutely no reason I've decided to rewrite Vector / SmallVector / Array / SmallArray classes for Sane C++ Libraries.
I've added a Buffer class (+SmallBuffer) to Foundation to replace all Vector (+SmallVector) usages.
It's based on a very compact Segment<> class (<500LOC).
#cpp
February 13, 2025 at 7:03 PM