|
Males are known to have two heads when it comes to making certain types of decisions - so mind expansion, one way or another ?
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
No, the ones I'm talking about aren't illegal
|
|
|
|
|
Years ago I actually got one of these that promised to expand my parts, regardless of gender.
|
|
|
|
|
With some luck, perhaps your account is not on the list, and this can by checked on the website of Troy Hunt “have i been pwned?”, afaik. Tested this myself recently , the website seems like a good idea ...
modified 5-Apr-21 13:17pm.
|
|
|
|
|
I've been coming up on haveibeenpwnd for years.
One is a hack of a website that copied data from LinkedIn and the other is a scrape of a MongoDB database that copied data from LinkedIn
Both instances contain only public data I believe, since they probably copied it from my LinkedIn page directly.
Still, it's a frightening thought that services that I didn't even sign up to (heck, I don't even know) are still leaking my data.
People say "just don't create a FB account", but they don't know FB is still tracking you through things such as like buttons on other pages you visit.
If you think not creating an account (on FB, Google, Amazon...) will keep you safe you're going to have a bad time.
And that's why we need strict regulation.
Except people don't care because "they've got nothing to hide" and so big tech can grow even bigger and keep collecting abusing our data
|
|
|
|
|
*headdesk* *headdesk* *headdesk*
This code should compile but it doesn't
using mono1 = pixel<
channel_traits<channel_name::L,1> >;
mono1 m=color<mono1>::White;
I spent the last two weeks working on a graphics library, only to find out after all is said and done that part of it doesn't work correctly.
None of this is supposed to generate code that executes at run time - except a single assignment from the const value 1 , but it won't initialize
The problem is in order to make it work correctly, I need to redesign a significant portion of it.
All of this could have been avoided if the C++ compiler would have thrown an error on my constexpr marked routines like it should have. I know why it didn't - because the offending bits were in a template function which wasn't being instantiated - but still, it should have, because I say so.
Real programmers use butterflies
modified 5-Apr-21 8:08am.
|
|
|
|
|
That's why we have consteval (in C++20)
|
|
|
|
|
*sigh*
If only I could target it.
Real programmers use butterflies
|
|
|
|
|
Maybe I'm missing something, but I don't see how it could've helped if the template function wasn't instantiated.
|
|
|
|
|
I'm not sure. I've not used consteval yet, I was just taking his word for it.
It's possible I wouldn't have needed a template if I used it?
Real programmers use butterflies
|
|
|
|
|
I haven't used it either. Never heard of it, in fact, because C++11 is still good enough for me!
My cursory investigation also found a constinit . The three of them (with constexpr , which I like as a substitute for extern const ) are mutually exclusive, and the new ones (unlike constexpr , I believe) guarantee that an item is folded at compile time. If not, error.
|
|
|
|
|
I guess I misunderstood the problem, I was under impression it's due to heisenexpr functions (constexpr function not being required to be evaluated at compile time). Invoking consteval function in non-constexpr context will cause compile error, so these kind of issue can be detected earlier.
|
|
|
|
|
Quote: because the offending bits were in a template function which wasn't being instantiated When I started to learn C++, I thought templates were compiled, which seemed rather remarkable and mysterious. It was an epiphany to learn that they weren't.
|
|
|
|
|
Same, although in retrospect I should have known simply because C and C++ have no concept of types at runtime (excepting RTTI) - it would be impossible to instantiate an instance of a type without type information.
Real programmers use butterflies
|
|
|
|
|
That's the big "gotcha" in templates. You're far from the only one to be caught out like that.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Right? I mean, I love them, and I actually love the fact that they don't compile until you instantiate them - sometimes - because you don't have to worry about the fact that the types you're using haven't been declared yet. I use this "feature" all the time, even though it bites me.
As is usually the case with C++, the same thing that gives me fantastic flexibility also gives me huge opportunities to blow it all up.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: the same thing that gives me fantastic flexibility also gives me huge opportunities to blow it all up
As a witch, you should know that with great Powers come great responsibilities...
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Yeah well, practicing witchcraft is a bit like skateboarding. It punishes you for your mistakes.
Real programmers use butterflies
|
|
|
|
|
So write your own C++ compiler using mirrored backwards B-trees, canonical lexers and dynamically functionalized parsers so your constexpr can compile like you want it to.
There's actually lots of need for such a compiler so I'm looking forward to the article
|
|
|
|
|
I'll let you know when I have 50 spare man-years laying around.
Real programmers use butterflies
|
|
|
|
|
This is a problem I was bitten by just last week. Not as badly as you but it happened. This has happened to be several times when I've written template classes and functions : they have an issue with one type or another and my testing missed that case. That's the key that I keep overlooking : make the test cases as thorough as possible. When I've done this I don't have that kind of problem and when I don't, I often do. I don't think the language or the compiler are to blame for my assumptions.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
Oh I certainly blame myself. I mean, there are number of things I could have checked out that would have stopped me.
More I'm just ranting about the swiss army knife that is C++. I can use it for just about anything but somehow i always end up cutting myself with it.
Real programmers use butterflies
|
|
|
|
|
My current favorite band to listen to while working is called, "Bowling For Soup" and they have hilarious lyrics. One of my favorite phrases in a song of theirs makes me think of C++. It is a simile that says, "like a chainsaw in need of juggling." Sometimes that's how it seems templates are to work with : juggling chainsaws.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
honey the codewitch wrote: mono1 m=color<mono1>::White;
Forgive me, but isn't this a circular reference?
I mean, doesn't this confuse the compiler as to which mono1 you're referring? The variable or the template using?
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Not at all. Anything inside angle brackets is part of a template, and is not executed at run time.
Edit: Whoops I think I misunderstood you, even though my answer is more or less correct.
Basically, there's only one mono1. It's a type alias. It's also an argument to a template function that returns an instance of whatever type was passed into it.
There's nothing circular here.
Real programmers use butterflies
|
|
|
|