home.social

#c20 — Public Fediverse posts

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

  1. Talk: Who’s Afraid of the Big Bad Template

    Templates and metaprogramming considered as the big bad wolf of C++, and it’s time to stop being scared of this wolf, as it’s one of the most powerful creatures of C++.

    In this talk I’ve demonstrated the power of this incredible creature, while I hope that this talk would be an easy enterence to this concept (pan intended), and to help you developing the anticipation to walk into the cave of metaprogramming.

    The talk was give on Core C++ 2025.

    https://youtu.be/LWeZctvHhiI?si=i2v2yFgCN8eoYHKB

    Useful Links

    GitHub Repo
    Presentation Slides

    Feel fee to leave your thoughts in the comments, and happy compile-time coding.

    #advanced #beginners #C #c17 #c20 #conference #CoralKashri #CoreC #CoreC2025 #Intermediate #metaProgramming #modernC #talk #templates

  2. The #TTRPGs I would love to see at my table:

    • Lancer
    • Draw Steel
    • D&D 4E
    • Vampire the Masquerade (V20)
    • Changeling the Dreaming
    • Some type of cyberpunk game

    The TTRPGS I think I have the time and energy to run:
    • Lancer
    • D&D 4E
    ? Draw Steel
    ? Vampire the Masquerade (V20)

    #TTRPG #VampireTheMasquerade #VtM #DnD4E #LancerRPG #DrawSteel #ChangelingTheDreaming #CtD #Cyberpunk #V20 #C20

  3. Reverse Iterations

    Sometimes, we all need a way to iterate over a container in the opposite direction. There are several ways to reverse-iterate a container, and in this article, we’ll explore them.

    Index Iteration

    Probably the simplest way, taken from C is to iterate using an index location:

    for (int64_t index = ssize(container) - 1; index >= 0; --index) {    // do something with `container[index]`}

    This way is highly not recommended as it might lead to infinite loops if done incorrectly (for example by using uint64_t or size_t for the index type), and you can find more issues with this way in some previous articles about iterators in this blog.

    Reverse Iterators

    Another way to iterate a container is by using reverse iterators (rbegin() and rend()):

    for (auto it = container.rbegin(); it != container.rend(); ++it) {    // do something with `*it`}

    This is a more recommended way, but it might be a little bit frustrating compared to a regular for-range loop:

    for (auto elem : container) { /*do something with `elem`*/ }

    The closest way to this method using the standard (before C++20) is:

    std::for_each(container.rbegin(), container.rend(), [](auto elem) {    // so something with `elem`});

    Ranges (C++20)

    If you are using the ranges library, or using at least C++20, you can use the following method to iterate a container in reverse order:

    for (auto elem : container | std::views::reverse) {    // do something with `elem`}

    Custom Reverse Container View

    Another way to use the for-range loop (even if you don’t use C++20 or the ranges library), is to create your own container mask, to modify the behavior of the begin() and end() functions:

    template <typename T>class reverse_view {public:    reverse_view(T& cont) : container(&cont) {}        typename T::reverse_iterator begin() { return container->rbegin(); }    typename T::reverse_iterator end() { return container->rend(); }    private:    T* container;};

    Then, you’ll be able to use it like that:

    std::vector<int> container = {1, 2, 3, 4, 5};for (int elem : reverse_view(container)) {    std::cout << elem << ", ";}

    More Ways

    I hope you learned something new, and feel free to share in the comments if you know other ways to reverse-iterate over a container.

    #advanced #C_ #c11 #c14 #c17 #c20 #containers #Intermediate #Iterators #ranges #reverse #reverseIterators

  4. Home is where the dross is...! We're talking about freeholds, glades, thorpes, et cetera today, as we go through C20's aptly named Book of Freeholds. Presenting far more extensive systems and suggestions than we've hitherto had for these centers of fae life, it's a dense volume with much material for players and STs alike. 🏡

    Come and sit by the balefire for a while at: changelingthepodcast.com/podca

    #ChangelingTheDreaming #C20 #Changeling20 #ctd #WorldOfDarkness #wod #ttrpg

  5. Now that we're through the corebook, it's time to get supplementary. We're joined this week by author Christine Beard to talk about her work, Yours to Keep (a jumpstart for Changeling: the Dreaming 20th), as well as the line's Ready-Made Characters book. This pair of books can help new and veteran players alike launch their first chronicle; we discuss how, and whether, and why. 🌱

    The deets: changelingthepodcast.com/podca

    #ChangelingTheDreaming #C20 #Changeling20 #ctd #WorldOfDarkness #wod #ttrpg

  6. At last...! We have arrived at our trilogy of episodes considering the C20 corebook in all its tatterdemalion glory. To kick things off: a chapter-by-chapter walkthrough and overview of the game. If you're a new player, we hope this will be helpful! If you're a vet, then we hope you'll nod along in grumpish agreement. To be continued... 🦋

    The journey begins at: changelingthepodcast.com/podca

    #ChangelingTheDreaming #C20 #Changeling20 #ctd #WorldOfDarkness #wod #ttrpg