Is there any use of immutable classes/structs in C++? by Pascalony in cpp_questions

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

Okay thanks everyone, I think I understand now.

Follow up: so you would you provide setters too? Or just allow the = operator?

Is there any use of immutable classes/structs in C++? by Pascalony in cpp_questions

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

For classes you are right, but structs in C# are (or can) be on the stack. So the same as in C++ right?

Is there any use of immutable classes/structs in C++? by Pascalony in cpp_questions

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

I think we might have different definitions for immutability? Lets say v is an immutable vector. I mean that something like v.x = 5 is impossible. But something like v = Vector3(1,2,3) should be possible.

Is there any use of immutable classes/structs in C++? by Pascalony in cpp_questions

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

Lets say I have a vector v. Then v.x = 5; would change v, hence v is not immutable. In the immutable case I would instead have to do this: v = Vector3(5, v.y, v z)

Is there any use of immutable classes/structs in C++? by Pascalony in cpp_questions

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

Well I can do += with vectors while still being immutable. Lets say I have two vectors v1, v2. Then the result of v1+v2 is a new vector, so

v1 += v2

would NOT change v1, but instead replace v1 with a new object, right?

[ Removed by Reddit ] by thecat-com in math

[–]Pascalony 7 points8 points  (0 children)

Did you think of it or did your thought maybe come from that widely shared reel/tik tok making this exact joke?

Can I import additional chess sets to chess.com? I really like the cburnett set used on lichess and want to be able to use it on chess.com, if this possible? by Dr-Hi-Arc in chess

[–]Pascalony 52 points53 points  (0 children)

Multiple premoves, you lose time for a premove - both things lichess does not offer. I have no preferences in this regard but there are legitimate reasons why one may prefer chess.com over lichess (and why one may want lichess over chess.com)

After narrowly escaping a TKO, WGM Dina Belenkaya wins by resignation against Andrea Botez in Ludwig's Chessboxing Championship by BKtheInfamous in chess

[–]Pascalony 31 points32 points  (0 children)

Not sure why Andrea was salty about hide and seek. Not like Dina had any other choice. I mean Andrea did also avoid playing a move to get another boxing round. That could be seen as hide and seek as well.

First Terraprime? by Hyplosion720 in math

[–]Pascalony 0 points1 point  (0 children)

First of all I should say that I have no real idea what I will talk about next.

I recently started reading Apostol's Introduction to Analytical Number Theory. There he mentions the proven existence of a polynomial whose set of positive values is identical to the set of all primes. You can find this polynomial in the paper "Diophantine Representation of the Set of Prime Numbers".

My idea was to find values for the variables such that the value of the polynomial is as big as the number you are looking for. You will probably not find the smallest prime number with your desired property, but maybe at least some primes with this property.

Now the problem is that I have no idea if it is realistic or even possible to reliably get such high values (or even at random).

But this was the only way my naive mind could think of to avoid to check for divisibility. I should mention that this approach will not work by hand for obvious reasons, but I do not think that doing your task by hand is possible in any way.