<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: mtklein</title><link>https://news.ycombinator.com/user?id=mtklein</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sun, 28 Jun 2026 00:44:01 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=mtklein" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by mtklein in "The Garbage Collection Handbook: The Art of Automatic Memory Management (2nd Ed) (2023)"]]></title><description><![CDATA[
<p>I have never seen Codex or Claude get manual memory management wrong.  I used to be pretty fastidious about using leak sanitizer or other such tools to catch my own memory management issues, and while not quite useless, that sort of testing has dropped way down my list of worries the more I lean on LLMs.  I am constantly surprised by how many formerly tedious or error prone tasks stopped being either of those, and I expect to see practice shift away from middle-safe languages like C++ to not just much more safe languages like Rust but surprisingly also to much less safe ones like C and platform specific assembly.</p>
]]></description><pubDate>Fri, 26 Jun 2026 01:56:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=48681494</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=48681494</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48681494</guid></item><item><title><![CDATA[New comment by mtklein in "C++26 Shipped a SIMD Library Nobody Asked For"]]></title><description><![CDATA[
<p>Part of that could be ABI constraints.  There are some surprising calling convention differences between a vector and a struct or union with vectors in it, and they vary platform to platform.  E.g. on ARM a struct with two 128-bit vectors will pass in two registers where on x86 it must pass via the stack.<p>Using __attribute__ to tweak calling conventions can often really clean this up, but that's just as obscure and non-portable as the problem it fixes.  So you either end up writing weird non-portable code one way or weird non-portable code another... Code working with these types doesn't get to benefit from zero-cost abstraction to the degree we're used to with normal scalar code.</p>
]]></description><pubDate>Sun, 17 May 2026 10:38:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=48167701</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=48167701</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48167701</guid></item><item><title><![CDATA[New comment by mtklein in "Tesla is recalling its cheaper Cybertruck because the wheels might fall off"]]></title><description><![CDATA[
<p>I hate to admit it, but the Corona "Change your Latitude" ads are what locked it in for me.</p>
]]></description><pubDate>Fri, 08 May 2026 15:08:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=48064291</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=48064291</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48064291</guid></item><item><title><![CDATA[New comment by mtklein in "It's OK to compare floating-points for equality"]]></title><description><![CDATA[
<p>what I mean here about NaNs is that from a testing perspective, I want to be able to write a test that expects NaN in the same way that I write other expectations, and you can't do that with ==.<p><pre><code>    assert(x == 7);    // fine
    assert(y == NaN);  // never true
    assert(y != y);    // this is what you meant
</code></pre>
so this equiv() helper fixes that,<p><pre><code>    assert(equiv(x, 7));    // fine
    assert(equiv(y, NaN));  // also fine
</code></pre>
now, as far as treating NaNs equivalently, the IEEE 754 float format has a huge number of possible representations of NaN, and if you did something like a bitwise comparison, you might think that 0x7fc00000, 0x7f800001, 0xffc00000, 0x7fc0f00d were all different and not equivalent, but they're all NaNs, and I find that when I'm looking for a NaN, I very rarely care about exactly which one I'm looking at.  So checking (x!=x && y!=y) admits any two NaNs as equivalent.</p>
]]></description><pubDate>Sun, 19 Apr 2026 15:02:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=47824816</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=47824816</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47824816</guid></item><item><title><![CDATA[New comment by mtklein in "It's OK to compare floating-points for equality"]]></title><description><![CDATA[
<p>My preference in tests is a little different than just using IEEE 754 ==,<p><pre><code>    _Bool equiv(float x, float y) {
        return (x <= y && y <= x)
            || (x != x && y != y);
    }
</code></pre>
which both handles NaNs sensibly (all NaNs are equivalent) and won't warn about using == on floats.  I find it also easy to remember how to write when starting a new project.</p>
]]></description><pubDate>Sat, 18 Apr 2026 18:46:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=47818386</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=47818386</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47818386</guid></item><item><title><![CDATA[New comment by mtklein in "Qwen3.6-35B-A3B: Agentic coding power, now open to all"]]></title><description><![CDATA[
<p>Yes, it's a "Brain float", basically an ordinary 32-bit float with the low 16 mantissa bits cut off.  Exact same range as fp32, lower precision, and not the same as the other fp16, which has less exponent and more mantissa.</p>
]]></description><pubDate>Thu, 16 Apr 2026 16:37:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=47795959</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=47795959</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47795959</guid></item><item><title><![CDATA[New comment by mtklein in "Google has the same AI adoption curve as John Deere"]]></title><description><![CDATA[
<p>The closest term I know is "just-so story".</p>
]]></description><pubDate>Mon, 13 Apr 2026 21:00:41 +0000</pubDate><link>https://news.ycombinator.com/item?id=47757754</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=47757754</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47757754</guid></item><item><title><![CDATA[New comment by mtklein in "Waymo Safety Impact"]]></title><description><![CDATA[
<p>I am also not looking forward to the system transitioning from "big experiment, burn money to make it good" to "established business unit, tweak it to death for incrementally more money / personal promotion."  We're still in the honeymoon period and I very much expect to hate Waymo in 10 or 15 years when they reach a steady state.</p>
]]></description><pubDate>Thu, 19 Mar 2026 21:26:31 +0000</pubDate><link>https://news.ycombinator.com/item?id=47446424</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=47446424</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47446424</guid></item><item><title><![CDATA[New comment by mtklein in "AVX2 is slower than SSE2-4.x under Windows ARM emulation"]]></title><description><![CDATA[
<p>If I remember correctly, the AVX2 feature set is a fairly direct upscale of SSE4.1 to 256 bit.  Very few instructions even allowed interaction between the top and bottom 128 bits, I assume to make implementation on existing 128 bit vector units easier.  And the most notable new things that AVX2 added beyond that widening, fp16 conversion and FMA support, are also present in NEON, so I wouldn't expect that to be the issue either.<p>So I'd bet the issue is either newness of the codebase, as the article suggests, or perhaps that it is harder to schedule the work in 256 bit chunks than 128.  It's got to be easier when you've got more than enough NEON q registers to handle the xmms, harder when you've got only exactly enough to pair up for handling ymms?</p>
]]></description><pubDate>Wed, 18 Feb 2026 16:31:46 +0000</pubDate><link>https://news.ycombinator.com/item?id=47062800</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=47062800</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47062800</guid></item><item><title><![CDATA[New comment by mtklein in "Why medieval city-builder video games are historically inaccurate (2020)"]]></title><description><![CDATA[
<p>I agree with you, but we must admit that The Expanse has all of spaceships bouncing around, explosion sounds, and superhumans.</p>
]]></description><pubDate>Fri, 23 Jan 2026 17:11:27 +0000</pubDate><link>https://news.ycombinator.com/item?id=46734949</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=46734949</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46734949</guid></item><item><title><![CDATA[New comment by mtklein in "Framework Laptop 13 gets ARM processor with 12 cores via upgrade kit"]]></title><description><![CDATA[
<p>This is astonishingly bad power usage for a laptop, a complete dealbreaker: "...early tests show that the SoC already draws about 16 watts at idle..."</p>
]]></description><pubDate>Fri, 05 Dec 2025 16:33:30 +0000</pubDate><link>https://news.ycombinator.com/item?id=46163594</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=46163594</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46163594</guid></item><item><title><![CDATA[New comment by mtklein in "LLVM-MOS – Clang LLVM fork targeting the 6502"]]></title><description><![CDATA[
<p>This was a nice surprise when learning to code for NES, that I could write pretty much normal C and have it work on the 6502.  A lot of tutorials warn you, "prepare for weird code" and this pretty much moots that.</p>
]]></description><pubDate>Sun, 30 Nov 2025 17:53:03 +0000</pubDate><link>https://news.ycombinator.com/item?id=46098813</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=46098813</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46098813</guid></item><item><title><![CDATA[New comment by mtklein in "Zig is so cool, C is cooler"]]></title><description><![CDATA[
<p>Zig is so good at this, it is also probably the easiest way to cross-compile C.</p>
]]></description><pubDate>Sat, 08 Nov 2025 17:32:13 +0000</pubDate><link>https://news.ycombinator.com/item?id=45858382</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=45858382</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45858382</guid></item><item><title><![CDATA[New comment by mtklein in "CPU cache-friendly data structures in Go"]]></title><description><![CDATA[
<p>I think this is _Alignas/alignas.<p><pre><code>    struct foo {
        _Alignas(64) float x,y;
        _Alignas(64) int     z;
    };
    _Static_assert(sizeof(struct foo) == 192, "");</code></pre></p>
]]></description><pubDate>Thu, 09 Oct 2025 17:51:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=45530875</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=45530875</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45530875</guid></item><item><title><![CDATA[New comment by mtklein in "Laptops create systems. Phones feed algorithms. The asymmetry determines power"]]></title><description><![CDATA[
<p>I very much used to agree with this, but some time this summer the ChatGPT iOS app started to change this for me.  I have definitely had days where I've felt as coding-creative as I can be on a laptop but instead just texting my AI interns to handle the execution while I'm out for a walk.</p>
]]></description><pubDate>Sun, 05 Oct 2025 12:54:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=45481146</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=45481146</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45481146</guid></item><item><title><![CDATA[New comment by mtklein in "Walking around the compiler"]]></title><description><![CDATA[
<p>I don't understand why this article invents and explains a phony ranged-float fix when the real fix from the footnotes would have been just as simple to explain.  The deception needlessly undermines the main point of the article, which I completely agree with.</p>
]]></description><pubDate>Fri, 26 Sep 2025 11:30:55 +0000</pubDate><link>https://news.ycombinator.com/item?id=45385272</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=45385272</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45385272</guid></item><item><title><![CDATA[New comment by mtklein in "Patrick Winston: How to Speak (2018) [video]"]]></title><description><![CDATA[
<p>You're not wrong that he wasn't physically fit, but he was also one of the most human people many of us in this thread have ever met.</p>
]]></description><pubDate>Mon, 01 Sep 2025 23:22:49 +0000</pubDate><link>https://news.ycombinator.com/item?id=45097496</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=45097496</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45097496</guid></item><item><title><![CDATA[New comment by mtklein in "What Does will-change In CSS Do?"]]></title><description><![CDATA[
<p>For a good long while at least, this flag was a signal for the browser to use CPU rendering, because of the overhead of GPU setup for rendering very changing content was too high.<p>My knowledge is dated and second hand though.  New GPU APIs hopefully changed this!</p>
]]></description><pubDate>Fri, 29 Aug 2025 23:21:29 +0000</pubDate><link>https://news.ycombinator.com/item?id=45070508</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=45070508</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45070508</guid></item><item><title><![CDATA[New comment by mtklein in "Linear scan register allocation on SSA"]]></title><description><![CDATA[
<p>I found this especially nice working with large SIMD constants.</p>
]]></description><pubDate>Thu, 21 Aug 2025 02:20:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=44968442</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=44968442</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44968442</guid></item><item><title><![CDATA[New comment by mtklein in "Dicing an Onion, the Mathematically Optimal Way"]]></title><description><![CDATA[
<p>Okay, I'll bite: 2 and 5 are prime, this is the perfect fifth problem, only approximate solutions are possible.  Make me wrong!</p>
]]></description><pubDate>Sat, 16 Aug 2025 21:08:03 +0000</pubDate><link>https://news.ycombinator.com/item?id=44926943</link><dc:creator>mtklein</dc:creator><comments>https://news.ycombinator.com/item?id=44926943</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44926943</guid></item></channel></rss>