Rotation revisited: Avoiding having to calculate the gcd when doing cycle decomposition
Math is hard. Let's go counting!
Dev Blogs
Math is hard. Let's go counting!
Rotating in the minimum number of steps by performing cycle decomposition.
Moving in a straight line, in a different way.
You need to pump messages when idle, but maybe you are never idle.
ERROR_ARENA_TRASHED error code?
The storage control blocks were destroyed.
Otherwise, it'll get mapped back down to the 8-bit code page.
You don't. All files are binary at the file system level.
scope_exit RAII type
But maybe it's not worth it.
Somehow xor became the most popular version.
Not a direct line to Bill Gates's office.
Why is this even a question?
You'll have to ask nicely.
WriteProcessMemory be made faster by avoiding the intermediate buffer?
I guess it could, but why bother?
A little trivia.
Are you even compiling the correct file?
scope_exit for running code at scope exit. C# says "We have scope_exit at home."
You can wrap it in an IDisposable.
An old flag from 16-bit Windows.
A variation on the constant-memory rotation.
try...finally. C++ says "We have try...finally at home."
The destructor serves as the "finally".
Remembering some old APIs.
You can ask for its handle and mark it read-only.
You've far exceeded the design goals and have even exceeded the expressive ability of a float.
Preserving in-order while linearizing.
Ported bit by bit.
Just for fun.