<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: ack_complete</title><link>https://news.ycombinator.com/user?id=ack_complete</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sat, 30 May 2026 19:21:25 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=ack_complete" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by ack_complete in "How do I inform Windows that I'm writing a binary file?"]]></title><description><![CDATA[
<p>It's both. Originally Visual C++ binaries built for DLL-based C runtime relied on MSVCRT.DLL and that was installed by the redist. Starting with Visual Studio .NET 2002, separate CRT DLLs starting with MSVCR70.DLL were used. MSVCRT.DLL is now part of Windows to support parts of the OS itself and for compatibility with programs that still use it. I think some versions of MinGW also use MSVCRT.<p>Current versions of the OS ship with functions in MSVCRT.DLL that weren't in the last VC6 version, such as the updated C++ exception handler (__CxxFrameHandler4). AFAIK, there is no redistributable version of it, it's unique to the OS.</p>
]]></description><pubDate>Thu, 07 May 2026 02:48:24 +0000</pubDate><link>https://news.ycombinator.com/item?id=48044853</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=48044853</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48044853</guid></item><item><title><![CDATA[New comment by ack_complete in "Integer Overflow Checking Cost"]]></title><description><![CDATA[
<p>That's with a simple data operation and using a recent x86 vector ISA (AVX-512) that is only available on some systems, notably excluding any current Intel desktop CPU.<p>The real killer isn't the data operations, though, it's if the overflow checks interfere with converting the loop logic or data addressing to vectorizable form. Indexing with 32-bit signed int vs. unsigned int on a 64-bit platform in C is a classic case -- with unsigned the compiler cannot assume that addressing offsets don't wrap, which then prevents coalescing data accesses into vector loads and stores.</p>
]]></description><pubDate>Sat, 02 May 2026 18:24:59 +0000</pubDate><link>https://news.ycombinator.com/item?id=47988982</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47988982</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47988982</guid></item><item><title><![CDATA[New comment by ack_complete in "You can beat the binary search"]]></title><description><![CDATA[
<p>Note that CPUs have also gotten dramatically wider in both execution width and vector capability since you were a teenager. The increased throughput shifts the balance more toward being able to burn operations to reduce dependency chains. It's possible for your idea to have been both non-viable on the CPUs at the time and more viable on CPUs now.</p>
]]></description><pubDate>Thu, 30 Apr 2026 15:44:46 +0000</pubDate><link>https://news.ycombinator.com/item?id=47964216</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47964216</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47964216</guid></item><item><title><![CDATA[New comment by ack_complete in "Windows Server 2025 Runs Better on ARM"]]></title><description><![CDATA[
<p>Two issues.<p>First, regarding application compatibility: the heap was already changed once prior to the segment heap. The Low Fragmentation Heap (LFH) was added in XP and made default in Vista, with applications no longer having to opt into it:<p><a href="https://learn.microsoft.com/en-us/windows/win32/memory/low-fragmentation-heap" rel="nofollow">https://learn.microsoft.com/en-us/windows/win32/memory/low-f...</a><p>Second, the segment heap has different tradeoffs that make it not a guaranteed win to swap in, it trades off performance for working set:<p><a href="https://issues.chromium.org/issues/40138716" rel="nofollow">https://issues.chromium.org/issues/40138716</a></p>
]]></description><pubDate>Wed, 22 Apr 2026 15:35:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=47865112</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47865112</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47865112</guid></item><item><title><![CDATA[New comment by ack_complete in "Writing string.h functions using string instructions in asm x86-64 (2025)"]]></title><description><![CDATA[
<p>The REP MOVS series of instructions have an interesting history due to the advantages and disadvantages of microcode and its shifting performance relative to manual code with each CPU generation. It has long been great for aligned large copies due to the microcode having access to cache-wide copies, but until recently struggled with small copies. Apparently, one of the reasons is a lack of branch prediction in microcode:<p><a href="https://stackoverflow.com/questions/33902068/what-setup-does-rep-do" rel="nofollow">https://stackoverflow.com/questions/33902068/what-setup-does...</a><p>Non-temporal stores are tricky performance wise. They can be dramatically faster than normal stores (~3x), they may be faster on some generations of CPUs than others, they may be slower if subsequent code needs the destination in the CPU cache, and even for GPUs they may not be ideal if an iGPU is sharing part of the cache hierarchy with the CPU. But the worst issue is that occasionally a specific CPU will have some random pathological behavior with them. IIRC, masked non-temporal stores were horrifically slow on some AMD APUs, on the order of hundreds to thousands of cycles per instruction. I find it hard to recommend them much anymore.</p>
]]></description><pubDate>Tue, 21 Apr 2026 02:25:52 +0000</pubDate><link>https://news.ycombinator.com/item?id=47843801</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47843801</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47843801</guid></item><item><title><![CDATA[New comment by ack_complete in "It's OK to compare floating-points for equality"]]></title><description><![CDATA[
<p>Yeah, that's effectively quantization, which will not work for general tolerance checks where you'd convert float similarity to int similarity.<p>There are cases where the quantization method is useful, hashing/binning floats being an example. Standard similarity checks don't work there because of lack of transitivity. But that's fundamentally a different operation than is-similar.</p>
]]></description><pubDate>Sun, 19 Apr 2026 02:34:28 +0000</pubDate><link>https://news.ycombinator.com/item?id=47821357</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47821357</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47821357</guid></item><item><title><![CDATA[New comment by ack_complete in "It's OK to compare floating-points for equality"]]></title><description><![CDATA[
<p>This case actually works because for finite numbers of a given sign, the integer bit representations are monotonic with the value due to the placement of the exponent and mantissa fields and the implicit mantissa bit. For instance, 1.0 in IEEE float is 0x3F800000, and the next immediate representable value below it 1.0-e is 0x3F7FFFFF.<p>Signed zero and the sign-magnitude representation is more of an issue, but can be resolved by XORing the sign bit into the mantissa and exponent fields, flipping the negative range. This places -0 adjacent to 0 which is typically enough, and can be fixed up for minimal additional cost (another subtract).</p>
]]></description><pubDate>Sat, 18 Apr 2026 19:17:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=47818678</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47818678</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47818678</guid></item><item><title><![CDATA[New comment by ack_complete in "Microsoft hasn't had a coherent GUI strategy since Petzold"]]></title><description><![CDATA[
<p>One significant difference is that Metro/UWP requires signing for pretty much everything. Without signing you can't have package identity, and without package identity, you can't even use the UI system. Furthermore, it requires a paid cert, which is expensive and requires publicly divulging your identity. I have major problems with this as it opens developers up to harassment. .NET at least allowed self-signed certs.<p>It's true that there is no great answer for how to add capabilities and sandboxing after the fact. But what Windows did was build an incredibly restrictive sandbox and then tell everyone who couldn't accommodate even one of the restrictions was "sucks to be you". The result was that developers, when confronted with "all or nothing" for Metro-style apps, were forced to choose nothing. It was also not a good look that Microsoft's own flagship applications like Visual Studio and Office did not show any progress toward adopting UWP, and in the latter case, was specifically exempted from the Windows RT restrictions to continue using Win32 on that platform.<p>If there had been a better strategy for easing in UWP technology, we might have seen better progress on adoption of Windows Runtime APIs and capabilities so new programs could gradually move toward the new technologies and away from HWNDs. Unfortunately, the technical barriers that were put in place between Win32 and UWP are so large that progress toward breaking them down in the Windows App SDK has been slow.</p>
]]></description><pubDate>Tue, 07 Apr 2026 01:20:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=47669596</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47669596</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47669596</guid></item><item><title><![CDATA[New comment by ack_complete in "Microsoft hasn't had a coherent GUI strategy since Petzold"]]></title><description><![CDATA[
<p>Eh, WinForms did a lot to make Win32 UI accessible and usable -- especially layout and easy customization -- but I have to differ on the cross-language story. It was great, IF you were making primarily a C# program that happened to use some C/C++ components.<p>From the native code side, it was not so great. The .NET 2.0 CLR had very poor support for hosting from the native side and really wanted you to make a program that was .NET first, it didn't work well if you wanted something like primarily a C++ program that hosted a C# UI in the same process. Reverse P/Invoke via native exports wasn't exposed, so creating DLLs for consumption by non-.NET programs was difficult. Mixed mode debugging was and still is painful, with the debugger being glacially slow at some operations like OutputDebugString() processing and blocking some native features like data breakpoints, and the CLR eating access violation exceptions from native code so they couldn't be debugged properly. Build-mode wise, we had to ban C++/CLI assemblies depending on C# assemblies because the C# project system didn't handle incremental builds properly and forced the dependent C++ assembly to rebuild all the time.<p>These issues still largely exist and are an issue with WPF. It's a great UI framework, but it's unusable unless your front end is primarily a C# program.</p>
]]></description><pubDate>Mon, 06 Apr 2026 19:22:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=47665646</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47665646</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47665646</guid></item><item><title><![CDATA[New comment by ack_complete in "Microsoft hasn't had a coherent GUI strategy since Petzold"]]></title><description><![CDATA[
<p>WPF originally had two major rendering issues. One was the lack of pixel snapping support, and another was gamma correction issues during text rendering, particularly for light text on a dark background (due to an alpha correction approximation, IIRC). The two combined led to blurry text in WPF applications.<p>These were finally improved for WPF 4, since Visual Studio 2010 switched to it and had a near riot in the betas due to the poor rendering in the text editor.</p>
]]></description><pubDate>Mon, 06 Apr 2026 15:57:30 +0000</pubDate><link>https://news.ycombinator.com/item?id=47662604</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47662604</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47662604</guid></item><item><title><![CDATA[New comment by ack_complete in "Microsoft hasn't had a coherent GUI strategy since Petzold"]]></title><description><![CDATA[
<p>The main reason Win32 can't handle automatic background suspension or low-power push notifications is simply that those features haven't been exposed to it. There's nothing preventing a Win32 program from receiving those types of notifications and then being force-ended by the OS if it doesn't respond in time.<p>When I first started porting programs to Windows ARM64, I didn't have an ARM64 device and had to test in QEMU. It ran extremely slowly, probably 1/50th of real time. All UWP programs like Calculator ran like a slug. But which programs still ran reasonably? Classic WinDbg and Task Manager. Two programs that were still plain Win32.<p>There <i>are</i> significant issues with Win32, namely its lack of a permissions and isolation and lack of hardware acceleration in the old windowing UI (User/GDI). But the idea that Win32 is inherently power inefficient is, IMO, just BS. Its roots go back to CPUs that were orders of magnitude slower than modern CPUs and there is nothing difficult about making a Win32 program that idles at 0% CPU when not in use.</p>
]]></description><pubDate>Mon, 06 Apr 2026 15:39:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=47662337</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47662337</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47662337</guid></item><item><title><![CDATA[New comment by ack_complete in "Microsoft hasn't had a coherent GUI strategy since Petzold"]]></title><description><![CDATA[
<p>That might have been more significant had the Windows Runtime not been effectively locked off to Metro-style apps. You could technically use it from a desktop app, but almost all of its functionality was only allowed within a Metro-style app, often due to requiring a core window or package identity. Even today the vast majority of useful WinRT APIs, including the entire UI system, require UWP or package identity.</p>
]]></description><pubDate>Mon, 06 Apr 2026 15:31:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=47662232</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47662232</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47662232</guid></item><item><title><![CDATA[New comment by ack_complete in "Microsoft hasn't had a coherent GUI strategy since Petzold"]]></title><description><![CDATA[
<p>The most offensive part of the Sinofsky response is this part:<p>> WinRT (2012) - it (or the embodiment in Windows 8) failed in the market but it also showed both the problem and potential solution to building for new markets while respecting the past<p>I can't express how wrong this is. WinRT was the most destructive thing that the Windows team ever did to the OS. It drove a hard stake into Windows, splitting it in half and declaring that anything previous to Windows 8, oriented toward desktop, or using primary input through mouse and keyboard over touch was dead. Microsoft basically told all existing Windows developers that if they weren't building a new, touch-oriented, mobile-style app specifically for Windows 8, they didn't matter and wouldn't get any support whatsoever, which is exactly what happened every time they broke existing desktop functionality. Calling this "respecting the past" is a crass insult and taking no responsibility for damaging the Windows development experience and accelerating development away from native Windows apps.</p>
]]></description><pubDate>Mon, 06 Apr 2026 00:27:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=47655452</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47655452</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47655452</guid></item><item><title><![CDATA[New comment by ack_complete in "StackOverflow: Retiring the Beta Site"]]></title><description><![CDATA[
<p>The place I work at tried using an SO enterprise instance and it was quite ineffective. We didn't have the toxicity of the public instance, but generally having a Q&A forum double as a knowledge base is an oddball format that doesn't work out. Adding AI integration is not likely to compensate for that.</p>
]]></description><pubDate>Sun, 05 Apr 2026 20:36:50 +0000</pubDate><link>https://news.ycombinator.com/item?id=47653626</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47653626</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47653626</guid></item><item><title><![CDATA[New comment by ack_complete in "Use string views instead of passing std:wstring by const&"]]></title><description><![CDATA[
<p>The Windows API uses WCHAR = wchar_t, so if you use char16_t, you have to convert back and forth to avoid running afoul of strict aliasing rules. This imposes conversion costs without benefits; both using wchar_t directly or converting to/from UTF-8 are better.</p>
]]></description><pubDate>Wed, 01 Apr 2026 07:19:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=47597892</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47597892</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47597892</guid></item><item><title><![CDATA[New comment by ack_complete in "Gzip decompression in 250 lines of Rust"]]></title><description><![CDATA[
<p>Doesn't need to be inline assembly, just pre-encoded lookup tables and intrinsics-based vectorized CRC alone will add quite a lot of code. Most multi-platform CRC algorithms tend to have at least a few paths for byte/word/dword at a time, hardware CRC, and hardware GF(2) multiply. It's not really extreme optimization, just better algorithms to match better hardware capabilities.<p>The Huffman decoding implementation is also bigger in production implementations for both speed and error checking. Two Huffman trees need to be exactly complete <i>except</i> in the special case of a single code, and in most cases they are flattened to two-level tables for speed (though the latest desktop CPUs have enough L1 cache to use single-level).<p>Finally, the LZ copy typically has special cases added for using wider than byte copies for non-overlapping, non-wrapping runs. This is a significant decoding speed optimization.</p>
]]></description><pubDate>Fri, 27 Mar 2026 15:50:20 +0000</pubDate><link>https://news.ycombinator.com/item?id=47544302</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47544302</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47544302</guid></item><item><title><![CDATA[New comment by ack_complete in "Windows native app development is a mess"]]></title><description><![CDATA[
<p>Yes, and this is also how Windows 10/11 explorer turns some parts of its UI dark like scrollbars. But notably, Microsoft refuses to officially support Explorer's dark control themes or ship a complete dark theme, and because the theming engine only loads themes signed by Microsoft, no one else can ship one either without patching the OS.</p>
]]></description><pubDate>Mon, 23 Mar 2026 19:22:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=47493956</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47493956</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47493956</guid></item><item><title><![CDATA[New comment by ack_complete in "Windows native app development is a mess"]]></title><description><![CDATA[
<p>Dark mode for apps is a setting in the OS and a general expectation now, it's suboptimal to ship a new UI that doesn't support it. And, again, Win32 message boxes in your program will switch to dark mode whether you want them to or not.<p>Win32 controls ignoring system colors goes much farther back than dark mode being introduced in Windows 10. The theming engine that broke a lot of that functionality was introduced in Windows XP. Beyond that, there were always a few hardcoded colors like disabled gray text going back to Windows 95.<p>Dark mode ignoring Win32 system colors is not incompetence. It was _intentional_. Dark mode was introduced by the UWP side, which intentionally did not extend it to Win32. To this day, there is not even a Win32 API for desktop apps to query whether dark mode is even enabled. The official recommendation is to compute the luminance of the UWP foreground color setting:<p><a href="https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/ui/apply-windows-themes#know-when-dark-mode-is-enabled" rel="nofollow">https://learn.microsoft.com/en-us/windows/apps/desktop/moder...</a></p>
]]></description><pubDate>Sun, 22 Mar 2026 19:31:20 +0000</pubDate><link>https://news.ycombinator.com/item?id=47481193</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47481193</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47481193</guid></item><item><title><![CDATA[New comment by ack_complete in "Windows native app development is a mess"]]></title><description><![CDATA[
<p>One difference is that the Mac OS itself was not initially 32-bit clean, with the top byte being used by the Memory Manager.</p>
]]></description><pubDate>Sun, 22 Mar 2026 18:58:03 +0000</pubDate><link>https://news.ycombinator.com/item?id=47480838</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47480838</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47480838</guid></item><item><title><![CDATA[New comment by ack_complete in "Windows native app development is a mess"]]></title><description><![CDATA[
<p>The main thing that's hard going down this route is dark mode support. The Win32 USER and common controls just don't not support dark mode, but are actively hostile to it due to the amount of hardcoded light colors and backgrounds in the system. All of the system colors are light regardless of the dark/light system setting, highlights are hardcoded to light blue, disabled controls use a hardcoded color, half of the window messages for changing control colors are silently ignored with theming is enabled. Menus are among the more difficult to deal with as they require extensive owner draw.<p>On top of this, there are a small handful of system UIs that do support dark mode and make your program look inconsistent with dark mode regardless. Message boxes will switch to dark mode, and so will file dialogs -- which is a problem if you've used the Vista-style customization, as any syslinks will appear in a color of blue that's hard to read against the dark mode background.</p>
]]></description><pubDate>Sun, 22 Mar 2026 18:48:44 +0000</pubDate><link>https://news.ycombinator.com/item?id=47480746</link><dc:creator>ack_complete</dc:creator><comments>https://news.ycombinator.com/item?id=47480746</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47480746</guid></item></channel></rss>