<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: drhagen</title><link>https://news.ycombinator.com/user?id=drhagen</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Wed, 29 Apr 2026 08:11:04 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=drhagen" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by drhagen in "A “frozen” dictionary for Python"]]></title><description><![CDATA[
<p>Great! Now make `set` have a stable order and we're done here.</p>
]]></description><pubDate>Thu, 11 Dec 2025 11:45:50 +0000</pubDate><link>https://news.ycombinator.com/item?id=46230206</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=46230206</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46230206</guid></item><item><title><![CDATA[New comment by drhagen in "A “frozen” dictionary for Python"]]></title><description><![CDATA[
<p>If this gets wide enough use, they could add an optimization for code like this:<p><pre><code>    n = 1000
    a = {}
    for i in range(n):
        a[i] = str(i)
    a = frozendict(a)  # O(n) operation can be turned to O(1)
</code></pre>
It is relatively easy for the JIT to detect the `frozendict` constructor, the `dict` input, and the single reference immediately overwritten. Not sure if this would ever be worth it.</p>
]]></description><pubDate>Thu, 11 Dec 2025 11:42:29 +0000</pubDate><link>https://news.ycombinator.com/item?id=46230181</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=46230181</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46230181</guid></item><item><title><![CDATA[New comment by drhagen in "We Need to Die"]]></title><description><![CDATA[
<p>A funny thing I realized: immortality is incompatible with spending a nonzero fraction of my life with children.<p>I treasure the time I spend with my kids. I can see that this season will be over soon. This won't be my whole life, but it will be a significant fraction of my life. If I were immortal, this would be a tiny blip in the inconceivably far past for 100% of my life.<p>You may think I could start again every 100 or 1000 or million years, but if a nonzero fraction of people did that, that would be exponential growth. Even ignoring resource constraints, you cannot sustain exponential growth of any kind in a 3D universe.<p>A universe with kids necessitates a universe with death.</p>
]]></description><pubDate>Tue, 09 Dec 2025 21:19:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=46210799</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=46210799</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46210799</guid></item><item><title><![CDATA[New comment by drhagen in "Await Is Not a Context Switch: Understanding Python's Coroutines vs. Tasks"]]></title><description><![CDATA[
<p>It does yield control. As far as I know, that's "how you're supposed to it". But the example is not great because there is no other task available to switch to, so the event loop goes right back to where it left off. While the text says otherwise, I'm pretty sure the same thing would happen in JS, C#, and Java.</p>
]]></description><pubDate>Wed, 26 Nov 2025 12:01:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=46056584</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=46056584</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46056584</guid></item><item><title><![CDATA[New comment by drhagen in "The Missing 11th of the Month (2015)"]]></title><description><![CDATA[
<p>1s in other ordinals were misread, but two 1s next to each other were misread wildly more often than anything else. My current theory, which I only hint at in the last paragraph, was that "nth" was in the OCR dictionary, "nth" is close to "11th" in pixel space, and no other ordinal is that similar to a dictionary word. Therefore, "11th" gets misread most often.</p>
]]></description><pubDate>Thu, 19 Jun 2025 14:36:23 +0000</pubDate><link>https://news.ycombinator.com/item?id=44319081</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=44319081</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44319081</guid></item><item><title><![CDATA[New comment by drhagen in "The Missing 11th of the Month (2015)"]]></title><description><![CDATA[
<p>The last time this hit HN, my hosting provider complained about the traffic, but I've since migrated the blog to GitHub Pages, so I guess that won't be an issue this time.</p>
]]></description><pubDate>Thu, 19 Jun 2025 13:10:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=44318388</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=44318388</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44318388</guid></item><item><title><![CDATA[New comment by drhagen in "I don't like NumPy"]]></title><description><![CDATA[
<p>> Personally, I think np.einsum is one of the rare parts of NumPy that’s actually good.<p>einsum only being able to do multiplication makes it quite limited. If we leaned into the Einstein notation (e.g. [1]), we could make something that is both quite nice and quite performant.<p>[1] <a href="https://tensora.drhagen.com/" rel="nofollow">https://tensora.drhagen.com/</a></p>
]]></description><pubDate>Thu, 15 May 2025 20:34:03 +0000</pubDate><link>https://news.ycombinator.com/item?id=43999046</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=43999046</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43999046</guid></item><item><title><![CDATA[New comment by drhagen in "Why can't we remember our lives as babies or toddlers?"]]></title><description><![CDATA[
<p>From experience, I am skeptical of this hypothesis. Little kids will absolutely recall memories from before they knew how to speak.<p>Just last week, my two-year-old spied the freezer pops in storage. She pointed out back and said, "Eat on deck!" Clearly, she remembered eating freezer pops on the deck, but the last time she did that was last summer (northern hemisphere) when she didn't know how to talk at all, let alone say "deck".</p>
]]></description><pubDate>Tue, 18 Feb 2025 01:57:37 +0000</pubDate><link>https://news.ycombinator.com/item?id=43085293</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=43085293</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43085293</guid></item><item><title><![CDATA[New comment by drhagen in "Who is the skeleton buried by a secret society under this Baltimore bar?"]]></title><description><![CDATA[
<p>In Chapter 21 of the Screwtape Letters, CS Lewis discusses the dangers of interchanging of the various flavors of "my". (Well, a fictional demon monologues about the utility of confusing "my" in the mind of humans, but that's the Screwtape Letters for you.)</p>
]]></description><pubDate>Tue, 29 Oct 2024 18:51:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=41988045</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=41988045</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41988045</guid></item><item><title><![CDATA[New comment by drhagen in "Homemade AI drone software finds people when search and rescue teams can't"]]></title><description><![CDATA[
<p>It even has an xkcd: <a href="https://xkcd.com/2128/" rel="nofollow">https://xkcd.com/2128/</a></p>
]]></description><pubDate>Mon, 07 Oct 2024 15:39:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=41767102</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=41767102</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41767102</guid></item><item><title><![CDATA[New comment by drhagen in "Linux desktop market share climbs to 4.45%"]]></title><description><![CDATA[
<p>How much of this is due to non-technical users simply using phones and tablets instead of laptops and other devices with "desktop" OSes?</p>
]]></description><pubDate>Wed, 21 Aug 2024 19:16:52 +0000</pubDate><link>https://news.ycombinator.com/item?id=41313273</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=41313273</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41313273</guid></item><item><title><![CDATA[New comment by drhagen in "Is oral history more durable than written history?"]]></title><description><![CDATA[
<p>Using 12000-year-old stories to support the thesis that oral history is more durable than written history is only logical if we have reason to believe that written history also existed then. I believe the consensus is that writing was invented about 5000-6000 years ago.<p>Still, finding that a non-zero fraction of oral history survives on the order of tens of millennia is very cool.</p>
]]></description><pubDate>Thu, 15 Aug 2024 09:53:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=41254400</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=41254400</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41254400</guid></item><item><title><![CDATA[New comment by drhagen in "The Trouble with __all__"]]></title><description><![CDATA[
<p>I always thought Scala had nice imports [1]:<p><pre><code>    import users.*
    import users.User
    import users.{User, UserPreferences}
    import users.UserPreferences as UPrefs
</code></pre>
[1] <a href="https://docs.scala-lang.org/tour/packages-and-imports.html#imports" rel="nofollow">https://docs.scala-lang.org/tour/packages-and-imports.html#i...</a></p>
]]></description><pubDate>Thu, 01 Aug 2024 19:38:58 +0000</pubDate><link>https://news.ycombinator.com/item?id=41132743</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=41132743</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41132743</guid></item><item><title><![CDATA[New comment by drhagen in "Secure Boot is broken on 200 models from 5 big device makers"]]></title><description><![CDATA[
<p>I remember USB drives in the '00s that had a read-only toggle. They were useful for rescuing machines that had a virus.<p>Edit: A quick search reveals that, of course, you can still buy them today. I have not felt a need for one in ages.</p>
]]></description><pubDate>Thu, 25 Jul 2024 19:18:51 +0000</pubDate><link>https://news.ycombinator.com/item?id=41072329</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=41072329</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41072329</guid></item><item><title><![CDATA[New comment by drhagen in "Secure Boot is broken on 200 models from 5 big device makers"]]></title><description><![CDATA[
<p>> To this day, key players in security—among them Microsoft and the US National Security Agency—regard Secure Boot as an important, if not essential, foundation of trust in securing devices in some of the most critical environments, including in industrial control and enterprise networks.<p>Am I correct that Secure Boot purely exists to prevent this attack vector: malware gets root on the OS, hardware allows updating firmware via OS now owned by malware, but Secure Boot means you have to wipe only the hard drive instead of the firmware to eliminate the malware.<p>It seems like it would be a lot simpler and more reliable to add a button to motherboards that resets the firmware to the factory version (on memory that can't be written by a malicious OS).</p>
]]></description><pubDate>Thu, 25 Jul 2024 19:02:29 +0000</pubDate><link>https://news.ycombinator.com/item?id=41072166</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=41072166</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41072166</guid></item><item><title><![CDATA[New comment by drhagen in "Two's complement integers with only sign bit set should be a trap representation"]]></title><description><![CDATA[
<p>R does this [1]. It is the sentinel that it uses internally to represent a missing value (i.e. NA) in integer arrays. Integer operations overflow to this value.<p>[1] <a href="https://stackoverflow.com/a/56507840/1485877" rel="nofollow">https://stackoverflow.com/a/56507840/1485877</a></p>
]]></description><pubDate>Wed, 07 Feb 2024 12:47:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=39287882</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=39287882</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=39287882</guid></item><item><title><![CDATA[New comment by drhagen in "AI Is Already Killing Books"]]></title><description><![CDATA[
<p>The recent advances in LLMs have made me realize how important a signal well written English was to filtering content by quality. If the first few sentences were on topic, syntactically correct, and grammatically complex, it was worth skimming at least. This was obviously not remotely perfect, but it was pretty good. LLMs are blowing that up. They have not increased the amount of garbage on the internet (plenty of stupid people around to supply that), but they made it a lot easier to make garbage look superficially like it was thoughtfully written by an intelligent person.</p>
]]></description><pubDate>Sat, 06 Jan 2024 14:01:15 +0000</pubDate><link>https://news.ycombinator.com/item?id=38891492</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=38891492</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=38891492</guid></item><item><title><![CDATA[New comment by drhagen in "New York may ban noncompete employment agreements and Wall Street is not happy"]]></title><description><![CDATA[
<p>I always liked to phrase it as: "Never attribute to incompetence that which is adequately explained by incentives."<p>People like Hanlon's razor because it still lets them insult people they don't like. "incompetent" and "stupid" work about as well as "malicious" and "evil". I don't think anyone will ever give a name to a statement so...unsatisfying.</p>
]]></description><pubDate>Sat, 18 Nov 2023 20:39:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=38324125</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=38324125</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=38324125</guid></item><item><title><![CDATA[New comment by drhagen in "37, the median value for the second prime factor of an integer"]]></title><description><![CDATA[
<p>That seems unlikely. Those numbers only look related in base 10. 1/e is about a third of 1 and 37 is about a third of 100, which is why they look similar in base 10. In base 16, 1/e is about 0.5e2d58 and 37 is 25.<p>And prime numbers are prime numbers regardless of base.</p>
]]></description><pubDate>Mon, 13 Nov 2023 01:47:22 +0000</pubDate><link>https://news.ycombinator.com/item?id=38245983</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=38245983</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=38245983</guid></item><item><title><![CDATA[New comment by drhagen in "Zoom's TOS Permit Training AI on User Content Without Opt-Out"]]></title><description><![CDATA[
<p>I don't know. There's a pretty big difference between feeding data to an AI in order to get its response and feeding data to an AI in order to train it to generate responses for third-parties. With current technology, the latter poses a risk to confidentiality that the former lacks.</p>
]]></description><pubDate>Mon, 07 Aug 2023 19:53:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=37040048</link><dc:creator>drhagen</dc:creator><comments>https://news.ycombinator.com/item?id=37040048</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37040048</guid></item></channel></rss>