[-] azi@mander.xyz 3 points 1 day ago

yum yum PFAS residues and melted spatula plastic

[-] azi@mander.xyz 1 points 2 days ago* (last edited 2 days ago)

Honestly as long as literals are properly converted, I don't see any other way to do this in an entirely encoding agnostic way

[-] azi@mander.xyz 2 points 2 days ago* (last edited 2 days ago)

I'm not sure if there's anything enable_if can do that concepts can't do somewhat better but yeah there's definitely a lot of subtleties that reflection is going to make nicer or possible in the first place

[-] azi@mander.xyz 1 points 3 days ago

You already can do that with C++20 concepts and the requires expression

template <typename T>
concept has_member_foo = requires(T t) {
    t.foo();
};

// Will fail to instantiate (with nice error 
// message) if t.foo() is ill-formed
template <has_member_foo T>
void bar(T t) {
    // ...
}

// abbreviated form of above
void baz(has_member_foo auto t) {
    // ...
}

// verbose form of above
template <typename T> requires
    has_member_foo<T>
void biz(T t) {
    // ...
}

// same as above but with anonymous concept
template <typename T> requires
    requires(T t) { t.foo(); }
void bom(T t) {
    // ...
}

// If already inside a function
if constexpr (has_member_foo<T>) {
    // ...
}

// Same but with anonymous concept
if constexpr (requires(T t) { t.foo(); }) {
    // ...
}
[-] azi@mander.xyz 1 points 3 days ago

C++26 reflection is compiletime

[-] azi@mander.xyz 15 points 5 days ago* (last edited 5 days ago)

There's a bunch of species of cactus (family Cactaceae) but only Rhipsalis baccifera is found in the old world. Even weirder is that it's not just found in the Americas and sub-Saharan Africa but also Sri Lanka for some reason.

Map of Cactus ranges. Rhipsalis baccifera is found in Sri Lanka and sub-Saharan Africa while all other species are found in the Americas

[-] azi@mander.xyz 2 points 6 days ago

Honestly I feel like Shadow is an IEM guy so he can feel superior to others

[-] azi@mander.xyz 5 points 6 days ago

gamers reinvent the stenomask

[-] azi@mander.xyz 1 points 6 days ago

\mathbf. It's consistent with \mathrm for well-defined constants

[-] azi@mander.xyz 1 points 6 days ago
[-] azi@mander.xyz 1 points 6 days ago

Raw meat carries infectious disease

[-] azi@mander.xyz 9 points 6 days ago

Honestly I think the fame of the tank man has overshadowed other scenes of the incident and people often don't realize just how bloody it was.

CW blood and shooting

view more: next ›

azi

joined 6 months ago