home.social

#cpp — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #cpp, aggregated by home.social.

fetched live
  1. I think we should use instrument profilers more often so I wrote a quick practical introduction #cpp #howto #gamedev
    mropert.github.io/2026/08/13/i

  2. I think we should use instrument profilers more often so I wrote a quick practical introduction #cpp #howto #gamedev
    mropert.github.io/2026/08/13/i

  3. @brouhaha

    Sounds like a problem that is best solved with a fold over the parameter pack.

    Just the other day, I had a problem where I had a variadic class template made of child classes that were itself variadic class templates made out of varying collections of leaf strong-types that all have a certain trait - and then access those leafs from the top-level class in ascending order according to that trait.

    Heterogeneous containers like this can only be handled by folds and recursion.

    #cpp #cplusplus

  4. @brouhaha

    Sounds like a problem that is best solved with a fold over the parameter pack.

    Just the other day, I had a problem where I had a variadic class template made of child classes that were itself variadic class templates made out of varying collections of leaf strong-types that all have a certain trait - and then access those leafs from the top-level class in ascending order according to that trait.

    Heterogeneous containers like this can only be handled by folds and recursion.

    #cpp #cplusplus

  5. @charette

    If it helps:

    release() → befreien()
    reset() → rücksetzen()

    std::unique_ptr → std::eindeutiger_zgr

    There is a reason why the German language was once the 'lingua franca' of science and technology. 🤭

    #German #cpp #cplusplus

  6. @charette

    If it helps:

    release() → befreien()
    reset() → rücksetzen()

    std::unique_ptr → std::eindeutiger_zgr

    There is a reason why the German language was once the 'lingua franca' of science and technology. 🤭

    #German #cpp #cplusplus

  7. Part two of open sourcing some of my libraries is BoltAPI:
    A #Cpp Web framework with very few dependacies. It came out of wanting http3 support and needing it to build on windows.
    Is it general perpose? Sort of...
    Is fast? Oh yes 😁
    github.com/Ugbot/BoltAPI

  8. Part two of open sourcing some of my libraries is BoltAPI:
    A #Cpp Web framework with very few dependacies. It came out of wanting http3 support and needing it to build on windows.
    Is it general perpose? Sort of...
    Is fast? Oh yes 😁
    github.com/Ugbot/BoltAPI

  9. I've been thinking about this mistake all day. I originally wrote this code maybe 2 months ago. It sat in the codebase all this time without me noticing it.

    It bugs me that release() and reset() are so similar-looking. If you accidentally call the wrong one then it turns the code into a leaked pointer. Completely defeats the point of using std::unique_ptr.

    The good news in this case -- my Munin plugin that logs a boatload of stats about this long-running process is how I quickly discovered the problem. One of the things I log is open file handles. Every night at exactly midnight, the open file handle count would go up as the code would open a new DB connection. #Munin #Cpp

  10. I've been thinking about this mistake all day. I originally wrote this code maybe 2 months ago. It sat in the codebase all this time without me noticing it.

    It bugs me that release() and reset() are so similar-looking. If you accidentally call the wrong one then it turns the code into a leaked pointer. Completely defeats the point of using std::unique_ptr.

    The good news in this case -- my Munin plugin that logs a boatload of stats about this long-running process is how I quickly discovered the problem. One of the things I log is open file handles. Every night at exactly midnight, the open file handle count would go up as the code would open a new DB connection. #Munin #Cpp

  11. Oops. Found the cause of a leak I was seeing regularly.

    std::unique_ptr::release() does not delete the pointer. It simply releases it, and the caller is then responsible for managing the original pointer.

    std::unique_ptr::reset() is what deletes the pointer.

    #cpp

  12. Oops. Found the cause of a leak I was seeing regularly.

    std::unique_ptr::release() does not delete the pointer. It simply releases it, and the caller is then responsible for managing the original pointer.

    std::unique_ptr::reset() is what deletes the pointer.

    #cpp

  13. Time to open source a few of the libs I've been working on.
    Very much built with AI rather than by AI.
    Inspired by the cool stuff in @QuestDb & @TigerBeetleDB
    This is bolt, the data piece left over from my lock down game engine experiments
    github.com/Ugbot/bolt
    And yes it's in #cpp 😜

  14. Time to open source a few of the libs I've been working on.
    Very much built with AI rather than by AI.
    Inspired by the cool stuff in @QuestDb & @TigerBeetleDB
    This is bolt, the data piece left over from my lock down game engine experiments
    github.com/Ugbot/bolt
    And yes it's in #cpp 😜

  15. Aunque no estoy acostumbrado por quererlo tener siempre todo perfecto (y que nunca llega a estarlo), os comparto unos scripts que estoy creando. Esta vez lo estoy haciendo en abierto, porque tampoco está relacionado directamente con lo que estoy investigando. Es algo que necesita hacerse.

    El problema es que tengo que procesar archivos ráster muy (pero que muy) grandes. La idea es realizar la media de todos ellos para tener una concordancia entre los modelos que representan. Para este fin todas las librerías que he buscado (Python y R) se quedan cortas. Así que me ha tocado desempolbar el C++, el cual solo he aprendido a partir de solventar sus errores (así que ni idea de si es "seguro").

    Por si queréis echarle un vistazo, aunque ahora mismo solo estoy haciendo prueba:
    codeberg.org/jcintasr/bildo_cpp

    La idea es llamar a la librería que creado (resumiendo tooodo lo que tengo en las diferentes main[N].cpp) se pueda llamar desde python.

    Cualquier crítica o sugerencia será bienvenida (aunque su implementación puede que tarde debido a que no tengo tiempo).

    #codeberg #python #cpp #ciencia #investigar #programación #raster

  16. Aunque no estoy acostumbrado por quererlo tener siempre todo perfecto (y que nunca llega a estarlo), os comparto unos scripts que estoy creando. Esta vez lo estoy haciendo en abierto, porque tampoco está relacionado directamente con lo que estoy investigando. Es algo que necesita hacerse.

    El problema es que tengo que procesar archivos ráster muy (pero que muy) grandes. La idea es realizar la media de todos ellos para tener una concordancia entre los modelos que representan. Para este fin todas las librerías que he buscado (Python y R) se quedan cortas. Así que me ha tocado desempolbar el C++, el cual solo he aprendido a partir de solventar sus errores (así que ni idea de si es "seguro").

    Por si queréis echarle un vistazo, aunque ahora mismo solo estoy haciendo prueba:
    codeberg.org/jcintasr/bildo_cpp

    La idea es llamar a la librería que creado (resumiendo tooodo lo que tengo en las diferentes main[N].cpp) se pueda llamar desde python.

    Cualquier crítica o sugerencia será bienvenida (aunque su implementación puede que tarde debido a que no tengo tiempo).

    #codeberg #python #cpp #ciencia #investigar #programación #raster

  17. La version 13 de Delphi Community Edition et de C++Builder Community Editions sont sorties hier.

    Si vous êtes utilisateur de cette version gratuite de Delphi ou C++Builder vous pouvez faire la mise à jour et bénéficier de leurs nouveautés dont la mise à niveau des SDK pour iOS et Android.

    Un renouvellement de votre licence annuelle gratuite sera peut-être nécessaire. Ca se fera pendant le processus de téléchargement.

    Pour en savoir plus consultez cette page : developpeur-pascal.fr/sortie-d

    #Delphi #CBuilder #RADStudio #CommunityEdition #DelphiFree #CBuilderFree #ObjectPascal #Pascal #CPP