Joined April 2009
1,123 Photos and videos
I have a list of strings. I'm given another list of strings. I want to find my strings within the list I'm given. There has to be a clever way to do this, right? Not just nested loops. Maybe I build a trie of my strings?
67
It is 2026 and companies that are big enough to do better still crash their homepage. It was eBay just a month or so ago.
1
82
I finally found a method that works on Win9x. Walk the stack until you find an EIP >= 2GiB. System DLLs are loaded in that range on Win9x. User stuff is below. That will be a page in Kernel32. Then go back pages until a one starts with "MZ".
Now THAT is interesting. Why does my debugger know about this magic __IMPORT_DESCRIPTOR_KERNEL32 value?? Where does it come from? Is Kernel32 always loaded into the same location??
2
12
1,683
You can apparently look at the TEB's SEH list. The last entry will be Kernel32's. Both of these methods just get you to a Kernel32 page from which you can backpeddle. However, this method doesn't work with exceptions disabled, I think? The loader sees you aren't using SEH?
1
125
Disclosing AI usage in a project seems tricky. For example, did the AI create all the code & art and no human reviewed it? That feels like it should be disclosed. But if a human reviewed it, I'm less scared. Or if the AI only generated ideas, and the human created...0% scared.
1
1
147
But then we're taking their word for it. DID a human review this? How careful was the review? I have no way of knowing. Further, coders blindly copy & paste from StackOverflow all the time. We don't disclose that liability...
78
Very cool
MSVC just got a new brain 🧠✨ Sample PGO feeds the compiler real execution data → better inlining, smarter branches, and codegen that matches reality. Tiny samples, big wins. 👉 Dive in: buff.ly/zRqGx8x
1
122
You see this guy? Ranked #50 in the world (front page of results) on this GPU overclocking benchmark. Look at his GPU temps. He was using liquid nitrogen. Not any more! Not on my watch!
2
126
I seen it! Sephiroth DID do this!
64
A bit more info: The path I described works on WinNT. But on Win9x, the Ldr is not part of the PEB. Another path is to follow the loaded DOS header -> PE header -> import table. But that only works when you explicitly import. It doesn't work on the implicit import.
I've spent a few days stuck on something. A Windows program is loaded, FS/GS points to the TEB, which points to the PEB, which points to the Ldr. My Ldr pointer is null. And I don't think it should be. I think Kernel32 is always loaded. In fact, it is in my imports table.
1
1
195
In that screenshot, you can see the first few functions on the call stack are Kernel32. That is when explicitly importing. When implicitly linking, the addresses are the same but the "KERNEL32! " is missing. Kernel32 is definitely still there. But even the debugger doesn't know.
96
Found another. template<int val1, int val2> struct Max { enum size { value = val1 > val2) ? val1 : val2 }; }; // notice the ")"
Been playing with VC6.0 recently. Soooo much easier to get ICEs. We've come a long way, baby.
169
This is a long shot, but... Anyone able to connect me with a person on the Windows file I/O team?
2
1
1
1,957
Now THAT is interesting. Why does my debugger know about this magic __IMPORT_DESCRIPTOR_KERNEL32 value?? Where does it come from? Is Kernel32 always loaded into the same location??
2
1
1,889
I'm working on PNG compression and found an interest (but maybe not) thing. For my test corpus (icons & logos, not photos), the lossless compression is actually smaller than the lossy JXL compression.
1
184
And I'm not even talking about "crank up the quality so it doesn't look bad because artifacts". I'm talking about default settings. Maybe not surprising because icons & logos were always the wheelhouse of lossless compressors anyway.
1
136
Another oddity is it seems almost all of PNG's compression power (currently) comes from carefully selecting the right filter. More effort in the Deflate step does almost nothing.
1
97
Aarrgg grumble grumble, VC 6.0 doesn't support class partial template specialization. I forgot how workaround-y our code was back then.
98
Hear me out, I want to play as Tupac/Snoop in the pod racing game.
87
What is the correct default for image compression effort? I figure: - Start at the knee on the effort/reward curve - Take up at least as much time as it took for the invocation (script? fast. human typed? give it a second) - Let it churn in the background if from an editor
75