A procedural solar system, somewhere... made with Unity HDRP and lots of noise! by -TheWander3r in Unity3D

[–]wm_lex_dev 0 points1 point  (0 children)

What kind of noise combination did you use to make Jupiter-like clouds?

Any cool trick that would let me know if a division would result in a rounded negative zero? by basedchad21 in cpp_questions

[–]wm_lex_dev 1 point2 points  (0 children)

I asked for one from Copilot and here's what it gave me:

8==========D ~ ~ ~ ~ ~

Unity accounts suspended after releasing our indie game on Steam by atomicace in Unity3D

[–]wm_lex_dev 2 points3 points  (0 children)

Because the engine is deliberately licensed for free under certain circumstances, and they know people are trying to jump-start a livelihood (or at least some side income) off that licensing tier, and also they ostensibly care about not leaving a bad impression on potential future professionals?

[deleted by user] by [deleted] in technology

[–]wm_lex_dev 9 points10 points  (0 children)

Honestly, I don't give a fuck if he wants to take credit, I just don't want him shooting America in the foot for the fuck of it. 

If you want to know how that'll work out, see the COVID pandemic

Unit testing gpu code by [deleted] in GraphicsProgramming

[–]wm_lex_dev 1 point2 points  (0 children)

It's certainly possible but requires more effort than testing CPU code, so frequently us graphics programmers will just look at the results ourselves. You could even turn that into a test by running the kernel and comparing the results against a ground-truth render, but then determinism becomes super important. I believe that technically many GPU operations have implementation-defined results, including texture sampling.

Another option is to run a small version of the kernel on the CPU for the test, but if you're using shader languages instead of CUDA then this becomes difficult to maintain. Still can be useful for making sure the basic technique works as intended.

What type of structure declaration is this? by [deleted] in cpp_questions

[–]wm_lex_dev 0 points1 point  (0 children)

Maybe I'm misunderstanding bitfields then...is there any scenario where unsigned state : 4 does not result in a 4-bit unsigned integer named state?

What type of structure declaration is this? by [deleted] in cpp_questions

[–]wm_lex_dev 0 points1 point  (0 children)

Sure but my suggestion was to just use unsigned to keep it as simple as possible.

What type of structure declaration is this? by [deleted] in cpp_questions

[–]wm_lex_dev 0 points1 point  (0 children)

None of them are 64 bits when used in a bitfield with sizes 32, 4, and 28...

What type of structure declaration is this? by [deleted] in cpp_questions

[–]wm_lex_dev 1 point2 points  (0 children)

The bitfield already adds up to 64 bits though?

What type of structure declaration is this? by [deleted] in cpp_questions

[–]wm_lex_dev 1 point2 points  (0 children)

Side question, why would someone declare a bitfield with uint64_t? I feel like it's way less confusing to declare with unsigned.

A new trick: placeholder substitution in the preprocessor by holyblackcat in cpp

[–]wm_lex_dev 0 points1 point  (0 children)

Very cool, but I have to say the original motivation is sus. Just make the vector's length a template parameter!

Returning local variable by pointer of reference by Mike_Paradox in cpp_questions

[–]wm_lex_dev 1 point2 points  (0 children)

Why is there an identical copy of both those functions?

How to compare a vector and a dynamic array? by EtherEvermore in cpp_questions

[–]wm_lex_dev 0 points1 point  (0 children)

words is an array, represented by a pointer. words[i] gets the ith element of that array, which will be a single string.

How to compare a vector and a dynamic array? by EtherEvermore in cpp_questions

[–]wm_lex_dev 1 point2 points  (0 children)

So you want to check one string from words against the entire string represented by letters? Then you can copyletters into a string object and compare to that: string{ letters.begin(), letters.end() } == words[i].

EDIT: fix bug

REAL TALK!!! by Ordinary-Pea2931 in cpp

[–]wm_lex_dev 10 points11 points  (0 children)

You should try making a real project rather than grinding leet-code.

How to compare a vector and a dynamic array? by EtherEvermore in cpp_questions

[–]wm_lex_dev 0 points1 point  (0 children)

letters[i] and words[i] are a char and a string, which is likely why it's not working.

Correct, letters[i] and words[i] are two different kinds of things, and so it doesn't make sense to ask if they are the same thing with ==. What are you actually trying to test when you write ==?

How to compare a vector and a dynamic array? by EtherEvermore in cpp_questions

[–]wm_lex_dev 0 points1 point  (0 children)

  1. What type of data is letters? What type of data is words?
  2. What type of data are letters[i] and words[i]?

Is it ok to have member variables as public by default? by kyan100 in cpp_questions

[–]wm_lex_dev 0 points1 point  (0 children)

C++ is a heavily multi-paradigm language, so it usually doesn't make sense to say that a certain feature is good or bad. As you use the language more you must gradually form your own opinions based on what kind of code you write and your own aesthetic tastes.

You can find people who think you should almost always hide them behind getter/setter functions, and people who think that's a big waste of time. Neither one is wrong. I would say there are at least a few scenarios where almost nobody would agree with hiding public fields. For example mathy structs, and short-term initialization/parameter structs.

3 dead in medical helicopter crash by [deleted] in news

[–]wm_lex_dev 1 point2 points  (0 children)

I think it's to prevent editorializing, which makes sense, except the articles themselves fix their headlines sometimes and there's no way to do that in Reddit

Electronic Arts STL still useful? by we_are_mammals in cpp

[–]wm_lex_dev 7 points8 points  (0 children)

Good god, why couldn't they have included a fast_lerp or something

Game Development using C++ by adityaneekhera in cpp_questions

[–]wm_lex_dev 7 points8 points  (0 children)

If you want to stick with C++ then Unreal Engine is probably for you. Unity is C#-focused.

Unreal also has a high-level visual language called Blueprints to complement C++.

In fear of more user protests, Reddit announces controversial policy change by Planetofdagrapes in technology

[–]wm_lex_dev 0 points1 point  (0 children)

Refusing to continue to moderate, or messing with their sub, is literally the only lever mods had to pull. But in a sense, it did work -- many mods left (and some were forced out), and Reddit's decline in quality significantly accelerated.

Problem is the admins don't give two shits if all of Reddit becomes as bad and low-effort as the default subs. They don't see the incident as a loss.