home.social

#cpp — Public Fediverse posts

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

  1. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #CPP #DSA #Algorithms

  2. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #CPP #DSA #Algorithms

  3. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #CPP #DSA #Algorithms

  4. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #CPP #DSA #Algorithms

  5. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #CPP #DSA #Algorithms

  6. Every team learns differently — that’s why KDAB’s in-company #training programs are built around your goals. Customize the curriculum, schedule, and location to fit your needs. Explore topics like #QtDev, #Cpp, #QML, #3D, #Debugging, and more.

    Learn more: training.kdab.com/in-company-t
    training.kdab.com/in-company-t

  7. Every team learns differently — that’s why KDAB’s in-company #training programs are built around your goals. Customize the curriculum, schedule, and location to fit your needs. Explore topics like #QtDev, #Cpp, #QML, #3D, #Debugging, and more.

    Learn more: training.kdab.com/in-company-t
    training.kdab.com/in-company-t

  8. Every team learns differently — that’s why KDAB’s in-company #training programs are built around your goals. Customize the curriculum, schedule, and location to fit your needs. Explore topics like #QtDev, #Cpp, #QML, #3D, #Debugging, and more.

    Learn more: training.kdab.com/in-company-t
    training.kdab.com/in-company-t

  9. Every team learns differently — that’s why KDAB’s in-company #training programs are built around your goals. Customize the curriculum, schedule, and location to fit your needs. Explore topics like #QtDev, #Cpp, #QML, #3D, #Debugging, and more.

    Learn more: training.kdab.com/in-company-t
    training.kdab.com/in-company-t

  10. Every team learns differently — that’s why KDAB’s in-company programs are built around your goals. Customize the curriculum, schedule, and location to fit your needs. Explore topics like , , , , , and more.

    Learn more: training.kdab.com/in-company-t
    training.kdab.com/in-company-t

  11. pretty much every programming language since C has desperately needed a floating point number formatter that is like "give me up to 5 decimal digits but skip the trailing zeroes after the decimal point"

    why isn't there one?

    it's not that it would be difficult to adjust the output (`if (s.contains(".")) { s.rtrim("0") }`) but it's unnecessary friction

    #programming #cpp

  12. Hey #RStats friends, I'm having issues with compiling on Ubuntu 24.04, since R 4.6.
    I've got r-base and r-base-dev installed from the official CRAN APT repos. Installing the {later} package fails after a bunch of errors with:

    make: *** [/usr/lib/R/etc/Makeconf:199: RcppExports.o] Error 1
    ERROR: compilation failed for package ‘later’

    It reports using these compilers:

    C: ‘x86_64-linux-gnu-gcc [...] 13.3.0’
    C++: ‘x86_64-linux-gnu-g++ [...] 13.3.0’
    x86_64-linux-gnu-g++ -std=gnu++20

    Ideas?

    #cpp

  13. Here's a small C++20 header for passing/concatenating string literals as template arguments: gist.github.com/hach-que/c9ff4

    (uses TCHAR/TEXT() for #unrealengine, but adaptable to general C++ if you want)

    #gamedev #cpp

  14. I rewrote 90% of the functionality of my Build System in a single #Make file, which should make starting new #c or #cpp projects very straightforward: just list your system dependencies, and maybe add a couple compiler flags and Make will do the rest.

    Every .cpp in `./src` will be compiled, and every .a/.so in `./lib` will be linked. Both directories will be included (-I).

    I might add a command for Dedalo so it can generate something similar based on the build.cpp.

  15. I rewrote 90% of the functionality of my Build System in a single #Make file, which should make starting new #c or #cpp projects very straightforward: just list your system dependencies, and maybe add a couple compiler flags and Make will do the rest.

    Every .cpp in `./src` will be compiled, and every .a/.so in `./lib` will be linked. Both directories will be included (-I).

    I might add a command for Dedalo so it can generate something similar based on the build.cpp.

  16. F1 does not get you to the help for a given Qt class in CLion as it does in Qt Creator. So, how do you get there? Watch this new episode of the CLion series to find out more. #CLion #QtDev #IDE #Cpp #CPlusPlus

    youtube.com/watch?v=F0Nj4Pf-9ic

  17. F1 does not get you to the help for a given Qt class in CLion as it does in Qt Creator. So, how do you get there? Watch this new episode of the CLion series to find out more. #CLion #QtDev #IDE #Cpp #CPlusPlus

    youtube.com/watch?v=F0Nj4Pf-9ic

  18. F1 does not get you to the help for a given Qt class in CLion as it does in Qt Creator. So, how do you get there? Watch this new episode of the CLion series to find out more. #CLion #QtDev #IDE #Cpp #CPlusPlus

    youtube.com/watch?v=F0Nj4Pf-9ic

  19. F1 does not get you to the help for a given Qt class in CLion as it does in Qt Creator. So, how do you get there? Watch this new episode of the CLion series to find out more. #CLion #QtDev #IDE #Cpp #CPlusPlus

    youtube.com/watch?v=F0Nj4Pf-9ic

  20. F1 does not get you to the help for a given Qt class in CLion as it does in Qt Creator. So, how do you get there? Watch this new episode of the CLion series to find out more.

    youtube.com/watch?v=F0Nj4Pf-9ic

  21. It took me a while (bc I'm lazy), but I finally integrated my test framework Icaro with my build system Dedalo (as it was intended to be from the beginning).

    It's still a bit awkward to set up, but `ddl test` successfully compiles and runs the tests placed in `tests/tests.cpp`.

    I'm sure there'll be a lot of bugs, but it's growing nicely.

    gitlab.com/ludusestars/dedalo

    #cpp #testing #tdd #handmade

  22. It took me a while (bc I'm lazy), but I finally integrated my test framework Icaro with my build system Dedalo (as it was intended to be from the beginning).

    It's still a bit awkward to set up, but `ddl test` successfully compiles and runs the tests placed in `tests/tests.cpp`.

    I'm sure there'll be a lot of bugs, but it's growing nicely.

    gitlab.com/ludusestars/dedalo

    #cpp #testing #tdd #handmade

  23. It took me a while (bc I'm lazy), but I finally integrated my test framework Icaro with my build system Dedalo (as it was intended to be from the beginning).

    It's still a bit awkward to set up, but `ddl test` successfully compiles and runs the tests placed in `tests/tests.cpp`.

    I'm sure there'll be a lot of bugs, but it's growing nicely.

    gitlab.com/ludusestars/dedalo

    #cpp #testing #tdd #handmade

  24. @ibigfoot @DOAGeV @joergi @Mastodon @pixelfed @loops

    Zum Glück ist keine der genannten Anwendungen in #Java geschrieben 😈

    #javahate

    Gibt es überhaupt #Fediverse Anwendungen in Java? Wenn ja, wer ist so masochistisch und tut sich das an, wenn er auch #Python, #Ruby, #Rust, #Go, #Cpp, #TypeScript, oder notfalls sogar #PHP verwenden könnte?

    Gibts den Artikel auch online ohne toten Baum?

  25. I've been looking into matrix multiplication using std::simd and std::mdspan/submdspan (all single-threaded).
    I got to 86% of peak FLOP. x86_64 AVX2 has 32/16 FLOP/cycle peak (2 FMAs per cycle).
    I suspect better performance needs a more cache-friendly layout mapping. This is using layout_right.

    #stdsimd #simd #mdspan #cpp26 #cpp

  26. Tutto nasce da una mail. Un lettore mi ha scritto ponendo 16 domande su come si valorizza una campagna pubblicitaria nazionale in Radio: audience, AQH, GRP, CPP, target, costo, pressione.

    Ne è nato un articolo. E forse qualcosa di più: Lettere al Direttore. Uno spazio per trasformare domande vere in risposte utili.

    #Radio #RadioAdvertising #RadioMarketing
    #PubblicitàRadiofonica #Audience #AQH #GRP #CPP

    👇 👇 Articolo FREE sul blog www.astorri.it. 📻 📻

    astorri.it/non-si-compra-uno-s

  27. Tutto nasce da una mail. Un lettore mi ha scritto ponendo 16 domande su come si valorizza una campagna pubblicitaria nazionale in Radio: audience, AQH, GRP, CPP, target, costo, pressione.

    Ne è nato un articolo. E forse qualcosa di più: Lettere al Direttore. Uno spazio per trasformare domande vere in risposte utili.

    #Radio #RadioAdvertising #RadioMarketing
    #PubblicitàRadiofonica #Audience #AQH #GRP #CPP

    👇 👇 Articolo FREE sul blog www.astorri.it. 📻 📻

    astorri.it/non-si-compra-uno-s

  28. Tutto nasce da una mail. Un lettore mi ha scritto ponendo 16 domande su come si valorizza una campagna pubblicitaria nazionale in Radio: audience, AQH, GRP, CPP, target, costo, pressione.

    Ne è nato un articolo. E forse qualcosa di più: Lettere al Direttore. Uno spazio per trasformare domande vere in risposte utili.

    #Radio #RadioAdvertising #RadioMarketing
    #PubblicitàRadiofonica #Audience #AQH #GRP #CPP

    👇 👇 Articolo FREE sul blog www.astorri.it. 📻 📻

    astorri.it/non-si-compra-uno-s

  29. Tutto nasce da una mail. Un lettore mi ha scritto ponendo 16 domande su come si valorizza una campagna pubblicitaria nazionale in Radio: audience, AQH, GRP, CPP, target, costo, pressione.

    Ne è nato un articolo. E forse qualcosa di più: Lettere al Direttore. Uno spazio per trasformare domande vere in risposte utili.

    #Radio #RadioAdvertising #RadioMarketing
    #PubblicitàRadiofonica #Audience #AQH #GRP #CPP

    👇 👇 Articolo FREE sul blog www.astorri.it. 📻 📻

    astorri.it/non-si-compra-uno-s

  30. Tutto nasce da una mail. Un lettore mi ha scritto ponendo 16 domande su come si valorizza una campagna pubblicitaria nazionale in Radio: audience, AQH, GRP, CPP, target, costo, pressione.

    Ne è nato un articolo. E forse qualcosa di più: Lettere al Direttore. Uno spazio per trasformare domande vere in risposte utili.

    #Radio #RadioAdvertising #RadioMarketing
    #PubblicitàRadiofonica #Audience #AQH #GRP #CPP

    👇 👇 Articolo FREE sul blog www.astorri.it. 📻 📻

    astorri.it/non-si-compra-uno-s

  31. ACCU on Sea 2026 SESSION ANNOUNCEMENT: Bridging CPUs and GPUs with std::execution - Using Senders / Receivers as a Frame Graph by Al-Afiq Yeong

    accuonsea.uk/2026/sessions/bri

    Register now at accuonsea.uk/tickets/

    #cpu #gpu #cpp #coding