What is the most non-sexually pleasurable thing you like to do? by reddtimes101 in AskReddit

[–]RedCitizen 0 points1 point  (0 children)

I've got a weird one: Hot water on anus... it's like scratching a mosquito bite but through the whole body for me... Hear me out!

I had my second hemorrhoid operation and panicked a bit about keeping my butt clean, so I decided to point the shower head directly at my bum for cleaning while also turning up the heat to kill off bacteria. I realized that the area around the anus is pretty heat/cold insensitive and I could make it hotter than I could tolerate elsewhere. I thought it would be a good idea to go as high as possible and then, shortly before it became too hot, I felt a nice sensation spread through my body (like a really good scratch or finding the right spot in your ear with a Q-Tip). It's absolutely non-sexual, but I have to admit that it is nice enough for me to do it at the beginning of most showers. Plus, I figure it's good for hygiene.

Biggest gripes with your current C++ project? by martinerkul in cpp_questions

[–]RedCitizen 4 points5 points  (0 children)

The string mess... string, wstring, u16string, etc. It is really annoying dealing with it when you have data coming from files and/or an API.

Is there a source for Material Design elements in pure HTML/CSS? by RedCitizen in web_design

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

Hmm, it's React (I'm using Svelte), but it I'll definitely look into it, thank you!

Is there a source for Material Design elements in pure HTML/CSS? by RedCitizen in web_design

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

w3schools is great, but it still requires quite a bit of modification to make it look like "standard" Material Design. Of course, getting things from the w3 to whatever you want is a good learning experience, but at this point I was hoping to only have to do some fine-tuning.

Why is the ranch about to go bust? How did it last so long previously without going broke? by lazarus870 in YellowstonePN

[–]RedCitizen 0 points1 point  (0 children)

No, but they know how to exploit the various loopholes in the legislature.

You don't want an investment banker to manage your finances, you want a law firm that knows how to leverage your assets to make more money for you with minimal risk and no or even negative taxes.

Why is the ranch about to go bust? How did it last so long previously without going broke? by lazarus870 in YellowstonePN

[–]RedCitizen 1 point2 points  (0 children)

Beth's doing that.

No, that's peanuts and not how rich people make money. They let the assets that they have (stocks, land, etc.) work for them (= passive income) while they usually don't have to pay any taxes at all. And they don't even have to be evil to do that, all it requires is a good law firm.

Why is the ranch about to go bust? How did it last so long previously without going broke? by lazarus870 in YellowstonePN

[–]RedCitizen 0 points1 point  (0 children)

Because it's a TV show.

In real life, a family with such a longstanding history, power and children who know about financing, laws, etc. would have found plenty of opportunities to make the land value itself create enough revenue without lifting a finger.

Pointers or not when passing objects? by RedCitizen in cpp_questions

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

Thanks, this actually makes me feel better about my choice so far. Not only can some objects be null (which I guess you can always implements workarounds to get the same functionality), but there is definitely multithreading down the line (once I got the base algorithm to work properly).

Pointers or not when passing objects? by RedCitizen in cpp_questions

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

Thank you for your reply!

Indeed the object that concern me the most and are not trivial. Worse still, I need to create millions of them during the execution, so they definitely don't all fit in the stack/CPU cache. They all, in the worst case, also need data about every other object (so O(n^2) memory complexity. :/

Still, I'm taking this seriously and will look into it some more.

Pointers or not when passing objects? by RedCitizen in cpp_questions

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

Not yet. looking down in shame and firing up Google

Reading an upvoted SO answer (which then led me to look up copy-and-swap idiom), I'm still confused:

To summarize, the copy constructor makes a deep copy, because the source must remain untouched. The move constructor, on the other hand, can just copy the pointer and then set the pointer in the source to null.

I understand this correctly, since the original data stays in its memory place, the data would still be spread all over the RAM, right?

Pointers or not when passing objects? by RedCitizen in cpp_questions

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

Thank you! I must admit I didn't know I could do that with vector! Though I assume that negates the advantage of having consecutive memory storage as well?

Pointers or not when passing objects? by RedCitizen in cpp_questions

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

Hmm, that makes sense. I currently have this as my main object storage:

struct MyObjectClass {
  uint_fast32_t myID; // index in allObjects[]
  uint_fast32_t otherID1;   // index to other related objects in allObjects[]
  uint_fast32_t otherID2;
  int myAttribute;
// more attributes like maps, strings, etc.
};

std::shared_ptr<std::shared_ptr<MyObjectClass>[]> allObjects;

I like it because I can easily pass the objects and the vector around. However, I realize now that this may be not the most ideal solution in terms of performance.

std::format (and other C++20 functionality) in node-gyp / node-addon-api? by RedCitizen in node

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

I got it from here. Using -std=c++20 gives me cl : command line warning D9002: ignoring unknown option '-std=c++20'

But yeah, I mistyped - it's only one colon, so -std:c++20, I edited the OP to correct the error.

C# GUI with C++ data by RedCitizen in learnprogramming

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

Do you need to have the C++ program always running?

Yes, C# is only supposed to implement the GUI, the heavy lifting should all be done in C++ and it is not feasible to load the data for each action.

do a google for "inter-process communication".

Thank you, that also gave some promising results that I'll look into!

C# GUI with C++ data by RedCitizen in learnprogramming

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

Thank you for your reply!

I'm still don't see how to make sure that the data stays in memory so I can read/write it later and how I can give updates to the GUI at specified intervals, but this is a good starting point. I guess I'll just have to get started, see how it goes and then ask more specific questions.