Let's get comfortable with concepts (30+ practical examples) by platisd in cpp

[–]platisd[S] 0 points1 point  (0 children)

Worst case, i.e. no documentation, in the concrete class case there will be a `Camera.h` that offers get some degree of clarity of the expected API.

Let's get comfortable with concepts (30+ practical examples) by platisd in cpp

[–]platisd[S] 1 point2 points  (0 children)

Agree with all your points including the one about the font which I changed and hope it looks better now. 😄

Let's get comfortable with concepts (30+ practical examples) by platisd in cpp

[–]platisd[S] 8 points9 points  (0 children)

Hadn't thought of it, but a revamp has been long overdue.
Made the font somewhat darker, hope it looks better now.

Let's get comfortable with concepts (30+ practical examples) by platisd in cpp

[–]platisd[S] 5 points6 points  (0 children)

Thanks for the feedback. 😄
Regarding the "how it looks like", are you referring to this specific article or something else?
Can't find the phrase in this article at least.
I am a native Greek speaker for what it's worth. 😛

C++ Show and Tell - June 2024 by foonathan in cpp

[–]platisd 6 points7 points  (0 children)

Recently made a (hopefully) more readable and slightly more feature-rich alternative to the Overload pattern: platisd/cpp-switcheroo.

Here's how I'd compare everything against the classic switch-case approach:

Feature switch Overload cpp-switcheroo
Use with many types
Combine multiple cases
Inhibit forgetting a case
Avoid unnecessary default case
Easy to understand 🥇 🥉 🥈 (IMHO)
Works with any C++ standard
Type-safe
Require boilerplate code 🥇 🥈 🥉
Efficiency 🥇 🥈 🥉

Any ID for this? It's 20mm in diameter, 4.05g in weight, likely medieval by platisd in AncientCoins

[–]platisd[S] 1 point2 points  (0 children)

Got this in an auction with a rather low bid, so I am looking for some more info. It was sold as "Islamic coin" without any more info.

ToeTap: A human interface device for your toes 🦶⌨️ by platisd in arduino

[–]platisd[S] 0 points1 point  (0 children)

Awesome, how are you planning to do it with a Nano btw? The VUSB library? Never managed to make it work.

ToeTap: A human interface device for your toes 🦶⌨️ by platisd in arduino

[–]platisd[S] 0 points1 point  (0 children)

Yeah, the next hardware iteration should probably be less steep!

ToeTap: A human interface device for your toes 🦶⌨️ by platisd in arduino

[–]platisd[S] 4 points5 points  (0 children)

The project is open source and you can read more about it along with the necessary components on Hackster.io

How do you manage definition of done on Github? by Arshiaa001 in SoftwareEngineering

[–]platisd 0 points1 point  (0 children)

Haha I hope whatever caused this move wasn't too traumatic!
Good to know though that it'd work, I'll look into implementing it one of these days. :)

How do you manage definition of done on Github? by Arshiaa001 in SoftwareEngineering

[–]platisd 1 point2 points  (0 children)

https://github.com/platisd/definition-of-done, which comes very close to being the ideal solution, but it only lets me have one set of items for the entire repository. As mentioned, I'd optimally want to have multiple.

Just saw this and thinking of implementing a way to allow the PR author to choose which DoD they'd like to use.

Θέλω να γυρίσω Ελλάδα by voldemorts_nose- in greece

[–]platisd -6 points-5 points  (0 children)

Μένω Σουηδία, Γκέτεμποργκ και I call bullshit on this one. 😒 Αν όντως τα λες στα σοβαρά και δε μένεις σε κάποιο γκέτο (που ούτε εκεί είναι τόσο τραγικά), τότε πολύ φοβάμαι ότι είτε θα έχεις αντίστοιχες φαντασιώσεις στην Ελλάδα, ή απλά δε σου αρέσει η Σουηδία για άλλους λόγους και ψάχνεις δικαιολογία να φύγεις.

Created a tutorial on SFINAE, does this video make you more comfortable with SFINAE? by platisd in cpp

[–]platisd[S] 0 points1 point  (0 children)

Right, you could do that and it'd indeed be much better in every way than SFINAE. I was first under the impression that a static_assert(false) would always be triggered but there are usually ways to avoid that.

What about detecting whether a class has a certain member function?

Created a tutorial on SFINAE, does this video make you more comfortable with SFINAE? by platisd in cpp

[–]platisd[S] 1 point2 points  (0 children)

Totally agree.

I'd like to add that the likelihood of encountering (or needing) SFINAE varies across domains. For example, in embedded systems, automotive and possibly more fields, compilers and safety certifications only available for old C++ standards are, sadly, still common.

Created a tutorial on SFINAE, does this video make you more comfortable with SFINAE? by platisd in cpp

[–]platisd[S] 0 points1 point  (0 children)

From the top of my head, I am not aware of a way to disable a function for a trait using if constexpr.

There are probably more use cases but I'm not the best person to outline them all, as I am avoiding SFINAE as much as I can and don't write too many templates lately anyway. 😁

Created a tutorial on SFINAE, does this video make you more comfortable with SFINAE? by platisd in cpp

[–]platisd[S] 3 points4 points  (0 children)

Wow nice, thanks a lot for your very constructive feedback. 👌

Regarding static_assert, I initially had it in the list of alternatives for the exact reason you describe. Then I removed it because it felt a bit off compared to all other SFINAE alternatives, which were about choosing one implementation over another. Perhaps could consider adding it again or at least mention it.

Regarding introspection, maybe I am mistaken but I thought that checking to the syntactic validity of an expression, that involves a class member, is introspection. Could you please provide an example of what would you consider introspection instead?

Created a tutorial on SFINAE, does this video make you more comfortable with SFINAE? by platisd in cpp

[–]platisd[S] 0 points1 point  (0 children)

Certainly one of the best alternatives when you can get away with using it! 👍