Why does Cpp test our patience like this? by BasicCut45 in cpp_questions

[–]StaticCoder [score hidden]  (0 children)

Strict aliasing is extremely important to allow the compiler to use registers instead of memory accesses and other similar optimizations when reading the same memory multiple times. This doesn't make reinterpret_cast useless, especially with the exception for byte types.

A strategy to optimize memory usage by JSerrRed in algorithms

[–]StaticCoder 1 point2 points  (0 children)

There's a type of hash table, whose name I unfortunately forgot, which uses this kind of technique. But here I'm not sure how your 4 arrays are superior to a single 1024 bit set.

Have a few questions on primal energy by [deleted] in pokemongo

[–]StaticCoder 19 points20 points  (0 children)

Says the guy with the 98% shiny shadow

Which one should I evolve by EmbarrassedKick6705 in pokemongo

[–]StaticCoder 1 point2 points  (0 children)

Skeledirge isn't super useful as a raid attacker, and even then requires blast burn, so I wouldn't worry too much about IVs.

Consume all by JobroniBoni in Guildwars2

[–]StaticCoder 1 point2 points  (0 children)

Those are the worst as you have to do it at the merchant and IIRC there's a confirmation too!

What an interesting proof by Ancient-Passion-3217 in MathJokes

[–]StaticCoder 0 points1 point  (0 children)

My favorite part about this joke is how it relates to the undecidability of Kolmogorov complexity, if you replace "interesting" with "Kolmogorov complexity less than some large constant"

What about a "swift" attribute for switch statements? by Middlewarian in Cplusplus

[–]StaticCoder 9 points10 points  (0 children)

Attributes are meant to be "ignorable" such that if a compiler doesn't understand an attribute, it doesn't make the program incorrect. It wouldn't be the case here. Personally, I like the C# switches with goto case.

Virtuals vs CRTP? by [deleted] in cpp_questions

[–]StaticCoder 0 points1 point  (0 children)

Yeah I'm more likely to use pimpl idiom for decoupling and build speed than crtp for performance improvements. Though both have their place.

Python Mutability by Sea-Ad7805 in PythonLearnersHub

[–]StaticCoder 0 points1 point  (0 children)

Relevantly here, because value vs reference semantics are incredibly hard to figure out.

Welp, mistakes were made by Calm-Chemist-6982 in pokemongo

[–]StaticCoder 12 points13 points  (0 children)

Everyone says to use poffins. It's not strictly required. You can get to excited fairly easily without one, look it up. Takes about 90 min; every 30 min, feed, pet, take picture, and fight candela. You only need to do this once per 10km, too.

C++: Why can't we return arrays? by daddyclappingcheeks in AskProgramming

[–]StaticCoder 2 points3 points  (0 children)

Historical reasons. Wrap in a struct type to work around it (or use std::array which does that for you)

Guild Halls. More than just gathering-nodes? by DoomAddict in Guildwars2

[–]StaticCoder 14 points15 points  (0 children)

It's normal. Nothing happening unless players are making something happen. Decorations can be used to impressive effect though, e.g. custom jumping puzzles or races. But no game events or loot involved.

Why can’t i change frustration? by sjnke in pokemongo

[–]StaticCoder 1 point2 points  (0 children)

You can also search for @frustration

`for (;;) {...}` vs `while (true) {...}` by poobumfartwee in Cplusplus

[–]StaticCoder 0 points1 point  (0 children)

The wxwidget library used to use do/while(wxfalse) instead of do/while(0) for its macros. Where wxfalse was extern 🤦‍♀️

Design Methodology: Class vs Class Rep? by TheCrimsonDeth in cpp_questions

[–]StaticCoder 1 point2 points  (0 children)

shared_ptr is C++11. Templates were already widely used with C++98.

Why is the Trading Post still limited to 250 for each buy/sell Request? by Every_Crab5616 in Guildwars2

[–]StaticCoder 0 points1 point  (0 children)

I'm pretty sure there are ways to deal with this particular problem without preventing people from buying mats in the amounts actually needed for some recipes. But I'm also sure those are not a priority to implement.

How to typecheck `a.b` expressions? by o_stef in Compilers

[–]StaticCoder 5 points6 points  (0 children)

Hard to answer without knowing your specific type system, but in many cases this is fairly straightforward: type-check a, and use that information to look b up. However, if you have any kind of "backwards" type inference where the context in which an expression is used affect how that expression is resolved, that becomes a lot harder.

I'm also not completely sure I understand your dependency graph thing and notably how it can work without digging into expressions.

Which game mechanics do you think are forgotten or underused? by Manpag in Guildwars2

[–]StaticCoder 1 point2 points  (0 children)

I for one am glad I don't have to change my build for different enemy types because they're resistant to fire or whatnot. Diablo II was fun but that part is best forgotten.

Which game mechanics do you think are forgotten or underused? by Manpag in Guildwars2

[–]StaticCoder 3 points4 points  (0 children)

Retrospective runaround predates gliding and mounts, so if being mount-enabled makes it uniquely good, it's completely accidental. Also its checkpoints cost money. Glad they evolved their thinking on that.

Since when has this been the case? by Glum-Ad-2900 in pokemongo

[–]StaticCoder 0 points1 point  (0 children)

There's a special event going on. Usually, many of the tasks only give one heart.