Stefano Cristiano
Stefano Cristiano
  • 33
  • 6 263
Async Transform Streams - Part 2 - Sane C++ Libraries [ep.33]
In this video I'm creating an async state machine for the transform stream, based on the previous code for synchronous transforms.
This is a continuation of the Async Stream abstraction similar to the one provided by node.js (nodejs.org/api/stream.html).
The code of this video has been commited to:
github.com/Pagghiu/SaneCppLibraries/commit/21a0c92723ada6fbc3dfb1f6d4c2c3d94ac96435
pagghiu.bsky.social
discord.gg/tyBfFp33Z6
x.com/pagghiu_
mastodon.gamedev.place/@pagghiu
0:00 Intro
0:40 What to do
1:45 AsyncDuplexStream
3:35 Async Transform Stream
24:52 Async ZLib Transform Stream
28:18 Debug Unwanted State
30:59 Debug unref buffer
33:34 [SKIP ME] Debug State Machine
57:36 Recap
1:00:21 Conclusions
มุมมอง: 49

วีดีโอ

Async Transform Streams - Part 1 - Sane C++ Libraries [ep.32]
มุมมอง 9714 วันที่ผ่านมา
In this video I'm implementing an Async Transform Stream. I am also implementing a simple zlib based compression and decompression stream placed in the middle of the two pipelines used for the AsyncStreams test. This is a continuation of the Async Stream abstraction similar to the one provided by node.js (nodejs.org/api/stream.html). The code of this video has been commited to: github.com/Paggh...
node.js-like C++ Async Socket Streams - Sane C++ Libraries [ep.31]
มุมมอง 222หลายเดือนก่อน
In this video I'm implementing an Async Socket Streams. The basic test to cerify its basic functionality is: - Async Read data from a file, - Async Pipe data to a socket - Async Read it from the other side of the socket - Async Write data to a file This is a continuation of the Async Stream abstraction similar to the one provided by node.js (nodejs.org/api/stream.html). The code of this video h...
node.js-like C++ Async Streams Pipeline - Sane C++ Libraries [ep.30]
มุมมอง 153หลายเดือนก่อน
In this video I'm implementing an Async Pipeline abstraction than can route data buffers from readable sources to writable destinations. This is a continuation of the Async Stream abstraction similar to the one provided by node.js (nodejs.org/api/stream.html). The code of this video has been commited to github.com/Pagghiu/SaneCppLibraries/commit/9d9d550b63e439a53815c8d699d310adfb5e6f3c discord....
node.js-like C++ Async Writable Streams - Sane C++ Libraries [ep.29]
มุมมอง 1382 หลายเดือนก่อน
In this video I am finalizing the async readable stream and starting the async writable stream. This is part of an effort to implement in Sane C Libraries an abstraction similar to node.js streams (nodejs.org/api/stream.html). Code for this video has been committed to: github.com/Pagghiu/SaneCppLibraries/commit/11a2b925279298b10c895666805316256dd39f24 discord.gg/tyBfFp33Z6 pagghiu.bsky.social x...
node.js-like C++ Async Readable Streams - Sane C++ Libraries [ep.28]
มุมมอง 1772 หลายเดือนก่อน
Showcase how to start implementing a Stream abstraction similar to the one provided by node.js (nodejs.org/api/stream.html) Code has been cleaned up and committed but it includes also the Readable Async part that will be shown in the next (already recorded) video. github.com/Pagghiu/SaneCppLibraries/commit/339f291e9b44d51045e976be02afaf4f640d7fab I've been trying to improve the audio, so please...
C++ Async Http Web Server - Sane C++ Libraries [ep.27]
มุมมอง 1204 หลายเดือนก่อน
Showcase how to start implementing a simple Http Web Server. The SC::Http library is still very draft, but let's try to make it better! github.com/Pagghiu/SaneCppLibraries The work done in the video has been cleaned up and committed to: github.com/Pagghiu/SaneCppLibraries/commit/9f4700f78d8098cddcc27964db1c699785cfdfd1 github.com/Pagghiu/SaneCppLibraries/commit/381438043d7ba58c404c30b438e7dbfb7...
Sane C++ Libraries - July 2024 Update [ep.26]
มุมมอง 1605 หลายเดือนก่อน
Quick update on Sane C Libraries July 2024 release. Blog: pagghiu.github.io/site/blog/2024-07-31-SaneCppLibrariesUpdate.html GitHub release: github.com/Pagghiu/SaneCppLibraries/releases/tag/release/2024/07 discord.gg/tyBfFp33Z6 pagghiu_ mastodon.gamedev.place/@pagghiu github.com/Pagghiu/SaneCppLibraries 0:00 Intro 1:00 Serialization SCExample 2:43 Versioned serialization 6:19 Hot-Re...
C++ Serialization and Reflection (with Hot-Reload) - Sane C++ Libraries [ep.25]
มุมมอง 2515 หลายเดือนก่อน
Showcase how to use Sane C Reflection and Serialization libraries to persist data structures when hot-reloading to save and restore application state. github.com/Pagghiu/SaneCppLibraries The work done in the video has been cleaned up and committed to : github.com/Pagghiu/SaneCppLibraries/commit/b14ef5ed7682d96ddfbbabf3adb3981c42afb61e discord.gg/tyBfFp33Z6 pagghiu_ mastodon.gamedev....
Hot-Reload C++ on iOS - Sane C++ Libraries [ep.24]
มุมมอง 1495 หลายเดือนก่อน
Port SCExample Hot Reload sample to run on a (Jailbroken) iOS. github.com/Pagghiu/SaneCppLibraries The work done in the video has been cleaned up and committed to : github.com/Pagghiu/SaneCppLibraries/commit/85e6352b3afc14e328df5fff078361ad22600d53 github.com/Pagghiu/SaneCppLibraries/commit/20f2dd9b55316f9dd12797a10f5766b928daf0b9 github.com/Pagghiu/SaneCppLibraries/commit/e6d21a84a4fee56bbf925...
Sane C++ Libraries - June 2024 Update [ep.23]
มุมมอง 2406 หลายเดือนก่อน
Quick update on Sane C Libraries June 2024 release. Blog: pagghiu.github.io/site/blog/2024-06-30-SaneCppLibrariesUpdate.html GitHub release: github.com/Pagghiu/SaneCppLibraries/releases/tag/release/2024/06 discord.gg/tyBfFp33Z6 pagghiu_ mastodon.gamedev.place/@pagghiu github.com/Pagghiu/SaneCppLibraries 00:00 Intro 01:00 SCExample 06:35 SC::Async 07:57 SC::Plugin 12:33 SC::FileSyste...
Hot-Reload dear imgui - Sane C++ Libraries [ep.22]
มุมมอง 2836 หลายเดือนก่อน
Expand SCExample to hot-reload plugins linking to dear imgui library. github.com/Pagghiu/SaneCppLibraries The work done in the video has been cleaned up and committed to : github.com/Pagghiu/SaneCppLibraries/commit/94ad0d95b63c8eaa5eef8947bd6e66c10a6b8eb6 github.com/Pagghiu/SaneCppLibraries/commit/96e6df4b03488488337cb823b9c6f3f5326cb72a discord.gg/tyBfFp33Z6 pagghiu_ mastodon.gamed...
Add Async IO to Immediate Mode GUI - Sane C++ Libraries [ep.21]
มุมมอง 4346 หลายเดือนก่อน
github.com/Pagghiu/SaneCppLibraries Expand a simple Immediate GUI example to only redraw on user input or Async IO events coming from SC::Async event loop library. This uses the three new event loop methods introduced in th-cam.com/video/3lbyx11qDxM/w-d-xo.html The work done in the video has been committed to github.com/Pagghiu/SaneCppLibrariesPrivate/commit/784ffcf7768abd94fad7ac6877fbd56fbd2d...
Pause Immediate Mode GUI - Save CPU Time - Sane C++ Libraries [ep.20]
มุมมอง 2856 หลายเดือนก่อน
github.com/Pagghiu/SaneCppLibraries Try to build a "Desktop Style" 2D GUI app in contrast to the typical "Game" or "3D Engine" style app where Immediate Mode GUIs are usually used rendering at every frame. This means: - Build a simple sokol dear imgui example using SC::Build. - Pause rendering when there is no user input on macOS, Windows and Linux. - Resume rendering when user moves mouse, use...
Sane C++ Libraries - May 2024 Update [ep.19]
มุมมอง 566 หลายเดือนก่อน
Quick update on Sane C Libraries May 2024 release. Blog: pagghiu.github.io/site/blog/2024-05-31-SaneCppLibrariesUpdate.html GitHub release: github.com/Pagghiu/SaneCppLibraries/releases/tag/release/2024/05 discord.gg/tyBfFp33Z6 pagghiu_ mastodon.gamedev.place/@pagghiu github.com/Pagghiu/SaneCppLibraries 00:00 Intro 01:17 SC::Async 03:50 SC::Build 06:43 GitHub CI 08:47 SC::Socket (UDP...
BREAK SC::Async IO Event Loop! Sane C++ Libraries [ep.18]
มุมมอง 1547 หลายเดือนก่อน
BREAK SC::Async IO Event Loop! Sane C Libraries [ep.18]
Sane C++ Libraries - April 2024 Update [ep.17]
มุมมอง 1087 หลายเดือนก่อน
Sane C Libraries - April 2024 Update [ep.17]
Implement background work in SC::Async event loop. Sane C++ Libraries [ep.16]
มุมมอง 768 หลายเดือนก่อน
Implement background work in SC::Async event loop. Sane C Libraries [ep.16]
Sane C++ Libraries - March 2024 Update [ep.15]
มุมมอง 669 หลายเดือนก่อน
Sane C Libraries - March 2024 Update [ep.15]
Async file read and writes using Thread Pool! Sane C++ Libraries [ep.14]
มุมมอง 14610 หลายเดือนก่อน
Async file read and writes using Thread Pool! Sane C Libraries [ep.14]
Simple ThreadPool. Sane C++ Libraries [ep.13]
มุมมอง 6210 หลายเดือนก่อน
Simple ThreadPool. Sane C Libraries [ep.13]
Linux Async I/O using io_uring (2 of 2). Sane C++ Libraries [ep.12]
มุมมอง 20010 หลายเดือนก่อน
Linux Async I/O using io_uring (2 of 2). Sane C Libraries [ep.12]
Linux Async I/O using io_uring (1 of 2). Sane C++ Libraries [ep.11]
มุมมอง 28310 หลายเดือนก่อน
Linux Async I/O using io_uring (1 of 2). Sane C Libraries [ep.11]
A tour of SC::Async. Sane C++ Libraries [ep.10]
มุมมอง 6110 หลายเดือนก่อน
A tour of SC::Async. Sane C Libraries [ep.10]
Linux inotify File System Watcher. Sane C++ Libraries [ep.9]
มุมมอง 9811 หลายเดือนก่อน
Linux inotify File System Watcher. Sane C Libraries [ep.9]
Linux Async I/O using epoll (2 of 2). Sane C++ Libraries [ep.8]
มุมมอง 17011 หลายเดือนก่อน
Linux Async I/O using epoll (2 of 2). Sane C Libraries [ep.8]
Linux Async I/O using epoll (1 of 2). Sane C++ Libraries [ep.7]
มุมมอง 57911 หลายเดือนก่อน
Linux Async I/O using epoll (1 of 2). Sane C Libraries [ep.7]
Posix fork hates me. Sane C++ Libraries [ep.6]
มุมมอง 6611 หลายเดือนก่อน
Posix fork hates me. Sane C Libraries [ep.6]
Build everything on Linux! Sane C++ Libraries [ep.5]
มุมมอง 31611 หลายเดือนก่อน
Build everything on Linux! Sane C Libraries [ep.5]
Start Linux porting! Sane C++ Libraries [ep.4]
มุมมอง 29611 หลายเดือนก่อน
Start Linux porting! Sane C Libraries [ep.4]

ความคิดเห็น

  • @valknut9648
    @valknut9648 4 หลายเดือนก่อน

    Sane as in without any of the usual code of conduct suspects that destroy everything they touch? 😆

    • @Pagghiu
      @Pagghiu 4 หลายเดือนก่อน

      Sane as in keeping it simple so that people can think "Hey I could have been writing this myself!" 😇

  • @marlowbosville4454
    @marlowbosville4454 8 หลายเดือนก่อน

    Promo>SM 🌹

  • @serialselfkiller
    @serialselfkiller 10 หลายเดือนก่อน

    Supercool! 💪🏼💣

  • @Diego-xo8ft
    @Diego-xo8ft 10 หลายเดือนก่อน

    long live C++

  • @Maximus98245
    @Maximus98245 10 หลายเดือนก่อน

    Thank you! Was looking for io_uring demo and found your video. May I ask, what is the motivation behind building another set of libraries when we already have Boost/POCO and many others? I see that the code is lot more readable and is not sprinkled with complicated templated classes, so that's a plus. I also looked at SC::Vector and was not sure what the goal was. Why not use the std::vector? Thanks again.

    • @Pagghiu
      @Pagghiu 10 หลายเดือนก่อน

      Thank you for watching the video! 😀 You can read the Motivations section pagghiu.github.io/SaneCppLibraries/#autotoc_md45 but in general it's just having fun building something cool and sharing my view on how to fight the endless complexity predicated by some of the libraries you've indicated. So many libraries are "sprinkled with complicated templated classes" for no good reason. Some programmers are just attracted by endless unjustified complexity. And yes, you got one of the main points at first sight! Readability is one of most important principles pagghiu.github.io/SaneCppLibraries/page_principles.html because the best code is the easy to read one. SC::Vector exists because the project doesn't use the Standard C++ library, so std::vector can't be used. The main reason for not using the Standard C++ library is that including a single header from the C++ stdlib is nowadays putting in every compile unit tens of thousands of complicated lines of code, slowing compile time of projects by order of magnitude. Fast compile time is another core principle of Sane C++ Libraries. Another reason for not using the C++ standard library is that uses exceptions for error handling, that is a non zero-cost abstraction (SC::Vector returns bools / error codes). There are many other reasons but I can't enumerate all of them here😁

  • @cozis947
    @cozis947 11 หลายเดือนก่อน

    Hei Stefano! Having the video divided in segments with their own titles is super handy. It made it super easy to focus on the things I was curious about!

  • @ducklingzpl46u36
    @ducklingzpl46u36 11 หลายเดือนก่อน

    Cant join the discord! Please give us the new link!

    • @Pagghiu
      @Pagghiu 11 หลายเดือนก่อน

      You're right! Here is the new link discord.gg/tyBfFp33Z6

    • @ducklingzpl46u36
      @ducklingzpl46u36 11 หลายเดือนก่อน

      @@Pagghiu Thanks

  • @earlbjorn
    @earlbjorn 11 หลายเดือนก่อน

    Subscribed👌

  • @user-ge2vc3rl1n
    @user-ge2vc3rl1n ปีที่แล้ว

    I like the attempt but genuinely asking without being snarky, why not use Rust? I feel like this endeavour should be taken by the C++ committee to expand C++ to have a suitable std lib like Python does for instance.

    • @Pagghiu
      @Pagghiu 11 หลายเดือนก่อน

      I am genuinely just having fun building this little project 😄 And to avoid eluding your questions: 1. I feel very productive in my own selected C++ subset and none of the problems the Rust was born to solve are actual problems that I experience in my own daily usage. I very rarely have memory or threading issues, even if C++ is "unsafe" by nature. I do not write security critical code though, maybe Rust is great for people in that field. 2. I like Python and its stdlib is really so complete, and an inspiration for me when looking at the ease of use of its API. C++ committee delivers specifications through a voting process done in in-person meetings. I think it's very difficult for a Python level stdlib to be created through this process, it has not happened so far and I don't expect it to be happening in the future.

    • @user-ge2vc3rl1n
      @user-ge2vc3rl1n 11 หลายเดือนก่อน

      My dream is for C++ to have a shift in design that allows for a complete rewrite of the std lib but I know I'm deluded and it will never happen. But C++ is a fantastic language, I just find it to be weird in a lot of cases. And like you said Python has a complete std lib, it is so weird to me that C++ doesn't really offer this

  • @cozis947
    @cozis947 ปีที่แล้ว

    Hei, great video! I was wondering why you went with a unity build? I've heard about it a couple times, but I'm still not sure what to think about it

    • @Pagghiu
      @Pagghiu ปีที่แล้ว

      The unity build for this project is just a convenient way of delivering the library to users without needing to impose them a build system that would be required by any non trivial library. The unit tests project generated by the internal build system for example doesn't use the unity build, all files compile just fine in isolation. I plan to generate build files for other build systems using SC::Build so that everyone can keep using their favorite build system...or no build system at all!