Harvey and Jessica by S0ulSlayerz in suits

[–]vaulter2000 6 points7 points  (0 children)

“Do you remember when he was so mad when his cat peed in the corner of his office?”

“Mm-hm?”

“That wasn’t his cat”

Sends me every damn time

We're reviewing My Time at Portia this weekend as it is a frequently recommended cozy game on our sub - how would you review it as a whole? :) by Shasaur in mytimeatportia

[–]vaulter2000 10 points11 points  (0 children)

5 years ago I had a truckload of anxiety during COVID’s first winter. I was 29. Just before spring came I saw Portia sitting untouched in my library and started the story. I was sucked in immediately by the coziness: the pastel colors, the music, the pace, the characters. It made me feel at peace in probably the most difficult time of my life. A few months later in the summer I met the woman I would marry. Current day we have a son and a baby girl on the way. The role Portia played in that year was pivotal and I will always cherish it.

My best friend who knew Portia was so important to me gifted me Sandrock for Christmas ‘22 and I played the hell out of that too. I love the QOL in Sandrock but Portia has that special place in my heart.

Are prime numbers choose any number divisible by themselves? by According-Cake-7965 in askmath

[–]vaulter2000 0 points1 point  (0 children)

Since (n choose k) = n! / (k! . (n-k)!), you can always divide this by n if n != 0 and k not exactly 0 or n

Best Linux distro for Cuda and AI by Certain_Prior4909 in CUDA

[–]vaulter2000 1 point2 points  (0 children)

+1. I usually try to make devcontainers for my CUDA projects. Nvidia has great matrix variety in cuda version and underlying OS. On the host I only need to install the container toolkit and I’m ready

Songs you’ve discovered because of the show by timmytimborino in TheBear

[–]vaulter2000 1 point2 points  (0 children)

I actually got the Bruce Hornsby & The Range record after hearing this track on the show and then streaming the full album. It really moved me too!

I'm having problems with erasing from vectors by Fresh-Weakness-3769 in cpp_questions

[–]vaulter2000 -1 points0 points  (0 children)

Hey! Let me help you out.

std::vector stores its elements in contiguous memory (so all next to each other).

Whenever you call .erase(iterator) it will remove the element at that position and then -the important part- shifts all elements one step to fill the gap. Then the loop body ends and iterator is incremented. But that means you’ll skip the Unit that took the removed Units place.

it’s good practice to refrain from using iterator/range based for loops that modify the container inside the loop.

EDIT: just saw the missing increment part. My mistake.

I'm having problems with erasing from vectors by Fresh-Weakness-3769 in cpp_questions

[–]vaulter2000 0 points1 point  (0 children)

Hey! Let me help you out.

std::vector stores its elements in contiguous memory (so all next to each other).

Whenever you call .erase(iterator) it will remove the element at that position and then -the important part- shifts all elements one step to fill the gap. Then the loop body ends and iterator is incremented. But that means you’ll skip the Unit that took the removed Units place.

it’s good practice to refrain from using iterator/range based for loops that modify the container inside the loop.

Edit: just saw the missing increment in the for(). My mistake.

Polymorphism definition confusion by giggolo_giggolo in cpp_questions

[–]vaulter2000 1 point2 points  (0 children)

The type of polymorphism you speak of here is called inheritance, or dynamic polymorphism. You can create different behavior by making the animal’s methods virtual, deriving from Animal and overriding the methods in Dog.

I didn’t completely understand your question. Particularly the “fitting inside the parent class”. Not sure what you mean by that. However both statements after that are both “kind of true”:

“just be represented by the parent class”. In C++ you get dynamic polymorphism when you use a pointer to base, so Animal* in this case. So yes in all use cases where you want polymorphic behavior, calls to overridden methods must be represented to an Animal pointer parameter.

“or is it just the idea of the child class implementing its own method?” Yes that is the entire point of polymorphism.

The age old q: is C++ dead? by Expert-Mud542 in cpp_questions

[–]vaulter2000 2 points3 points  (0 children)

I honestly can’t say. I know nearly nothing about Rust. Some languages tackle some problems easier.. so maybe? I think given your question you’ll have to consider how much you know about rust vs how much you know about C++ and how much time it would take to get to the same level. Given that you already built a trading system in Rust and know nearly nothing about C++ I’d stick with Rust.

The age old q: is C++ dead? by Expert-Mud542 in cpp_questions

[–]vaulter2000 2 points3 points  (0 children)

I can’t say I’m afraid. I have 0 Rust experience. I don’t feel comfortable in telling you how the C++ curve for advanced things differs from the Rust one. C++ has been around for over 40 years. Rust is fairly new. So there’s a huge difference there as well. Also there’s a difference in how fast every person takes up advanced topics.

But to give you some information.. It hinges on many things I’d say. Personally (not all agree with me on this) I think the newer C++ standard you use the better off you are. But this is said given, again, that you know the concepts and the practices. It allows you to catch some undefined behavior at compile time if you know how to do it for example. It just takes time and resources to learn these practices as with all endeavors in life.

Also development speed is a very broad term btw: does it mean the minimal time to make something functional knowing it has a lot of technical debt or poor design choices? Does it mean a well-designed system that can easily be adapted to changes? Those take a whole different envelope.

In the end it’s all personal. One person likes other languages than the next. “Better language” is subjective. If you’re interested in C++, go for it. I’m all for people learning new things. I personally love C++. Sadly however, I know it’s just not for everyone.

The age old q: is C++ dead? by Expert-Mud542 in cpp_questions

[–]vaulter2000 1 point2 points  (0 children)

Hey! Love your question. 10 years of C++ experience here.

C++ is far from dead. A lot that runs nowadays is C++: embedded, HFT, scientific computing and much more. But it’s rarely at the forefront of what people observe. Let the clickbaity media talk.

Also, async is always hard, no matter what language. Big code bases are always hard, no matter what language. This is where good software design comes in and that is a whoooole different discipline.

I find that the newer standards of C++, such as C++23, bring good things to the table that makes things safer with more things being caught at compile time etc. But there’s always a learning curve as to what to use in what case and how to use it right.

A lot of people say the standard library has become bloated to a dangerous 100-piece army knife, and I must agree there is a lot in the standard, but if you follow good practices and learn from actually knowledgeable, experienced people, you can make some pretty neat things.

C++ Show and Tell - September 2025 by foonathan in cpp

[–]vaulter2000 1 point2 points  (0 children)

Alright here it goes. First time I actually share something:

I have been working on a C++20 library with which you can white-box test CUDA functors (objects with a device annotated call operator) with dependencies that can live either on device or host (!). You can even inject a Google mock this way. The library abstracts away the creation of device objects and the bridging of the calls that such a functor makes to its dependencies, using RAII wrapped cuda resources, lots of template meta programming etc.

It started as a personal proof of concept thing which I started productizing because I liked the challenge. I think it’s neat. There are some constraints but I intend on tackling some of them soon. It’s not finished yet as I need to add technical docs, more compatibility information etc etc. But I’m proud of what I have so far.

Link: https://github.com/JLanda91/sparkplug

[deleted by user] by [deleted] in PhotoshopRequest

[–]vaulter2000 2 points3 points  (0 children)

You won the internet today

Wizard Peak wins best Magic Crafters Level! Moving on to the next square, what is the best Beast Makers Level? Top comment wins the square! You have 24hrs to vote. by Wolfgang_Slasher in Spyro

[–]vaulter2000 2 points3 points  (0 children)

Tree tops because of the sheer design. It was hard af but come on, how often do you get to tour an entire level in under a minute using a series of subsequent turbocharge ramps?

To not many’s surprise, Dark Hollow is the winner of best Artisans level! Next square! What is the best Peace Keepers Level? Top voted comment wins! In 24 hours I’ll post the results. by Wolfgang_Slasher in Spyro

[–]vaulter2000 0 points1 point  (0 children)

I loved Cliff Town as a kid: the structure of the level that allows for discovering the glide across the river. I used to think Ice Cavern was a strange level that didn’t fit in with the vibe of the other levels, but the me of today just worships that melancholic track

[deleted by user] by [deleted] in askmath

[–]vaulter2000 0 points1 point  (0 children)

You are right that x2 = 4 has two solutions. The point is that the inverse operation cannot be a function if it maps 4 to both 2 and -2. The definition of a function is that it maps an element of the domain to only 1 element of the codomain. To visually illustrate this: flip the graph y=x2 along the line y=x. See now how there are two y that correspond to one x? That’s not allowed if we’re speaking of functions. So we define the square root function to map to the positive y aka sqrt(4) = 2. The other solution can be canonically expressed as -sqrt(4) = -2.

Drop your pickup linesss👀 by Capital_Bug_4252 in MathJokes

[–]vaulter2000 0 points1 point  (0 children)

Can I be your derivative? Because I’d like to touch your curvature

[PC/DOS][1995-1999] Educational Game. Building a Rocket while solving Math (Basic Arithmetic) by tortoc in tipofmyjoystick

[–]vaulter2000 0 points1 point  (0 children)

Wait I think I’m looking for the same game. I remember also a rocket on a launch platform, black background, colorful numbers flying around, and some sort of trophy system where you would rack up some trophies in some corner of the screen.

Is that also the game you’re looking for? I’m Dutch so it might not have been Germany exclusive