• 1 Post
  • 56 Comments
Joined 1 year ago
cake
Cake day: June 30th, 2025

help-circle

  • I would recommend dovecot and postfix but i haven’t tried any others as these just worked for me.

    For hosting i chose a VPS instead of running it at home, i believe at home is a bit harder as you may need a PTR record from your isp, but im not sure.

    For a VPS pick a provider that allows for port 25, I use hetnzer which allow it (atleast for me) after one month and paying your first invoice.

    Then setup all the DNS records and send a few test mails to mail checker sites.

    You don’t need a perfect score, my IP is on one block list for some reason but that hasn’t given me any trouble.








  • No.

    5.3 Onderhoudsbehandeling heroïne

    Indicatiecriteria voor heroïne op medisch voorschrift

    De behandelend arts voorafgaand aan de heroïnebehandeling heeft vastgesteld dat voor de cliënten die worden behandeld op een behandelplaats van de behandeleenheid geldt dat de cliënt:

    1 de Nederlandse nationaliteit bezit, op grond van een wettelijke bepaling als Nederlander wordt behandeld of vreemdeling is en rechtmatig verblijf geniet als bedoeld in artikel 8 van de Vreemdelingenwet 2000.

    Translation:

    5.3 Heroin maintenance treatment

    Criteria for prescribing heroin on medical prescription

    Prior to the commencement of heroin treatment, the treating doctor has established that, for clients being treated at a treatment centre within the treatment unit, the client:

    1 holds Dutch nationality, is treated as a Dutch national by virtue of a statutory provision, or is a foreign national and is lawfully resident as referred to in Article 8 of the Aliens Act 2000.

    https://verslavingskundenederland.nl/documents/2026/11/Handreiking-opiaatonderhoudsbehandeling-2021.pdf






  • It was a simplified example.

    B and C can’t share any other attributes without duplication of code

    struct A {
        [[nodiscard]] virtual std::uint32_t DoSomething() = 0;
    };
    
    struct B : A {
        std::uint32_t DoSomething() override { 
            return 0;
        }
    };
    
    int main() {
        B b;
        b.DoSomething(); //no warning
    }
    

    even if you use virtual attributes aren’t inherited.

    If you ment members instead of attributes this is unrelated to virtual:

    struct A {
        std::uint32_t a;
    };
    
    
    struct B : A {
        void DoSomething() { 
            std::println("B"); 
        }
    };
    
    struct C : A {
        void DoSomething() { 
            std::println("C"); 
        }
    };
    

    Now the member is shared and it works fine and there is no virtual.

    There’s also no strict enforcement of inheritance.

    True, but neither is there when just using virtual:

    struct A {
        virtual void DoSomething() = 0;
    };
    
    struct B : A {
    
    };
    

    This compiles fine if final is not added.

    Not that its an issue as reflection has solved this problem:

    consteval std::string_view HasMethods(std::meta::info impl, std::meta::info iface) {
        constexpr auto ctx = std::meta::access_context::unchecked();
        for (auto fn : members_of(iface, ctx)) {
            if (!is_function(fn) || is_special_member_function(fn)) continue;
            bool found = false;
            for (auto cand : members_of(impl, ctx))
                if (is_function(cand) && has_identifier(cand) && identifier_of(cand) == identifier_of(fn) && type_of(cand) == type_of(fn))
                    found = true;
            if (!found)
                return std::define_static_string(std::string(identifier_of(impl)) + " is missing " + display_string_of(fn));
        }
        return {};
    }
    
    
    struct A {
        void DoSomething();
    };
    
    struct B  {
    
    };
    static_assert(HasMethods(^^B, ^^A).empty(), HasMethods(^^B, ^^A));
    
    // g++ -std=c++26 -freflection main.cpp
    // main.cpp:30:41: error: static assertion failed: B is missing void A::DoSomething()
    // 30 | static_assert(HasMethods(^^B, ^^A).empty(), HasMethods(^^B, ^^A));
    

    Now you get the strict enforcement of inheritance and no virtual.


  • Why does it make zero sense in C++?

    edit: simplified example of what i mean

    struct A {
        virtual void DoSomething() = 0;
    };
    
    struct B : A {
        void DoSomething() override { 
            std::println("B"); 
        }
    };
    
    struct C : A {
        void DoSomething() override { 
            std::println("C"); 
        }
    };
    
    void InvokeDoSomething(A* a) {
        a->DoSomething();
    }
    

    vs

    struct B {
        void DoSomething() { 
            std::println("B"); 
        }
    };
    
    struct C {
        void DoSomething() { 
            std::println("C"); 
        }
    };
    
    template <typename T>
    void InvokeDoSomething(T* t) {
        t->DoSomething();
    }