<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: hermitdev</title><link>https://news.ycombinator.com/user?id=hermitdev</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Tue, 29 Sep 2026 13:07:01 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=hermitdev" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by hermitdev in "I asked Meta’s Muse for its filesystem and it sent me 6.8GB"]]></title><description><![CDATA[
<p>> It's not engineering if you're just guessing as to what is degrading the performance and what might improve it.<p>Engineering is literally the art of making educated guesses and then testing/proving/disproving/improving upon them. Nothing is exact. Everything is approximate. Iterate until the result is good enough.</p>
]]></description><pubDate>Tue, 22 Sep 2026 19:05:24 +0000</pubDate><link>https://news.ycombinator.com/item?id=49806471</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=49806471</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49806471</guid></item><item><title><![CDATA[New comment by hermitdev in "Small programming tricks"]]></title><description><![CDATA[
<p>> The latter example, sounds like something trivially done by the compiler.<p>Taken by itself? Absolutely. In the middle of 50-deep templatized call stack? Maybe not. Compilers have their limitations (memory, runtime, other cost budgeting algorithms), and the more complex the code, the hard the optimizer has to work. But, yeah. Most of the gains from branchless code is going to come from this like numerical tools, vectorization and loop unrolling, things of that nature. It was an admittedly contrived example.</p>
]]></description><pubDate>Fri, 18 Sep 2026 15:12:30 +0000</pubDate><link>https://news.ycombinator.com/item?id=49755538</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=49755538</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49755538</guid></item><item><title><![CDATA[New comment by hermitdev in "Small programming tricks"]]></title><description><![CDATA[
<p>What people refer to when they say "branchless code" is something very particular, and it refers to not triggering the CPU's branch prediction. That is, don't make the CPU have to guess which fork in the code you're going to take. This is usually accomplished in one of two ways: either bit twiddling hacks or specialized instructions that do not affect the CPU's branch prediction, such as the 'cmov' family in x86. If you search for `examples of branchless code using conditional moves` using your search engine of choice, you'll find numerous examples.<p>A trivial example is actually written with a branch in C/C++, but relies on compiler optimizations to kick in. If you compile a ternary operator in C/C++ (and probably rust, C# and other languages) such as in:<p><pre><code>   int min_branchless(int a, int b) {
        return a < b ? a : b; // Often emits cmov with -O2
   }
</code></pre>
With gcc/clang a -O2, one would expect the compiler to emit the following assembly:<p><pre><code>    cmp edi, esi
    cmovle eax, edi   ; select a if a <= b
    ret
</code></pre>
There's numerical tricks for other operations/comparisons, and compilers know a lot of them. But, I just suggest compiling your code and configuring your compiler to emit the generated assembly with references to the code it was generated from (you should be able to get it to emit source line references in the assembly). You'll likely be surprised at the optimizations applied at -02, and utterly confused by what you find at -03.<p>edit: Also, it doesn't mean to never branch, but to minimize branching, especially in tight loops. Branch outside loops, not inside, for instance.<p>e.g. don't do:<p><pre><code>    for (...) {
        if (condition independent of loop variable) { 
          ...
        } else {
          ...
        }
    }
</code></pre>
do:<p><pre><code>    if (condition independent of loop variable) { 
        for (...) {
          ...
        }
    } else {
        for (...) {
          ...
        }
    }</code></pre></p>
]]></description><pubDate>Wed, 16 Sep 2026 18:11:28 +0000</pubDate><link>https://news.ycombinator.com/item?id=49730798</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=49730798</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49730798</guid></item><item><title><![CDATA[New comment by hermitdev in "LG TVs caught spying even when offline or on standby"]]></title><description><![CDATA[
<p>I don't mean to be dismissive, but isn't this old news? Hasn't it been the case that _all_ "smart" TVs have been spying on users since they came out? I've personally operated as if they are: my TV is not connected to the internet. At least, not through my internet connection. It's not on my wifi, nor is it connected to my LAN.</p>
]]></description><pubDate>Tue, 08 Sep 2026 17:51:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=49613938</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=49613938</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49613938</guid></item><item><title><![CDATA[New comment by hermitdev in "Vietnam bans unskippable ads"]]></title><description><![CDATA[
<p>Every time see Mr Beast (I don't watch any of his stuff, just accidentally see promos on Prime sometimes), he reminds me of Homer Simpson's forced smile in the Simpsons' espiode "Re-Nedufication" [0].<p>[0]: <a href="https://i.pinimg.com/originals/c8/84/8e/c8848e81afa88a42bd4dcdacc966289e.png" rel="nofollow">https://i.pinimg.com/originals/c8/84/8e/c8848e81afa88a42bd4d...</a></p>
]]></description><pubDate>Wed, 07 Jan 2026 19:26:07 +0000</pubDate><link>https://news.ycombinator.com/item?id=46531228</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=46531228</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46531228</guid></item><item><title><![CDATA[New comment by hermitdev in "Pingfs: Stores your data in ICMP ping packets (2020)"]]></title><description><![CDATA[
<p>> to 4 GB packets<p>Heh. Anyone remember the ping of death[0]? A lot (most?) of computers on the early internet didn't properly handle large packets, _especially_ from ICMP pings. Once upon a time, you could send a single ping w/ a packet size of 65536 and crash the remote.<p>[0] <a href="https://en.wikipedia.org/wiki/Ping_of_death" rel="nofollow">https://en.wikipedia.org/wiki/Ping_of_death</a></p>
]]></description><pubDate>Fri, 19 Dec 2025 17:02:51 +0000</pubDate><link>https://news.ycombinator.com/item?id=46328119</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=46328119</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46328119</guid></item><item><title><![CDATA[New comment by hermitdev in "John Carmack on mutable variables"]]></title><description><![CDATA[
<p>While your example of `sum` is a nice, pure function, it'll unfortunately blow up in python on even moderately sized inputs (we're talking thousands of elements, not millions) due to lack of tail calls in Python (currently) and the restrictions on recursion depth. The CPython interpreter as of 3.14 [0] is now capable of using tail calls in the interpreter itself, but it's not yet in Python, proper.<p>[0]: <a href="https://docs.python.org/3/whatsnew/3.14.html#a-new-type-of-interpreter" rel="nofollow">https://docs.python.org/3/whatsnew/3.14.html#a-new-type-of-i...</a></p>
]]></description><pubDate>Fri, 31 Oct 2025 21:32:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=45776939</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=45776939</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45776939</guid></item><item><title><![CDATA[New comment by hermitdev in "Texas law gives grid operator power to disconnect data centers during crisis"]]></title><description><![CDATA[
<p>> This is a terrible idea.<p>No, it isn't. Any decent datacenter will have on-site generation in event of power grid failure, anyway. When I was an intern, the company I worked for would routinely go off grid during the summer at a call from the electric company. The electric company actually gave us significant incentives to do so, because us running on our own 12MW generator was effectively like the grid operator farming out a 12MW peaker unit.</p>
]]></description><pubDate>Mon, 18 Aug 2025 14:52:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=44941283</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=44941283</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44941283</guid></item><item><title><![CDATA[New comment by hermitdev in "Graham: Synchronizing Clocks by Leveraging Local Clock Properties (2022) [pdf]"]]></title><description><![CDATA[
<p>> that EU regulation requires their timestamps to be within 100 microseconds of UTC,<p>It's the same in the US. It's covered under CAT NMS (Consolidated Audit Trail, National Market System). Probably too much information at: <a href="https://www.catnmsplan.com/" rel="nofollow">https://www.catnmsplan.com/</a></p>
]]></description><pubDate>Mon, 11 Aug 2025 14:14:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=44864301</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=44864301</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44864301</guid></item><item><title><![CDATA[New comment by hermitdev in "Run a C# file directly using dotnet run app.cs"]]></title><description><![CDATA[
<p>I started using C# towards the end of the 1.0 beta or maybe just after RTM...I embarrassingly called it "C pound" for quite a while. Because, even as someone born and raised in the US, pretty much my only exposure to the symbol was in the context of phones. "Call me at blah, pound one-two-three" as in the extension is "#123".<p>Remember, it was originally release +20 years ago (goddamn, I feel old now); recorded video or even audio over the internet were much, much, MUCH rarer then, when "high-speed" speed internet for a lot of people meant a 56K modem.<p>Back then, most developer's first exposure to C# then was likely in either print form (books or maybe MSDN magazine).</p>
]]></description><pubDate>Thu, 29 May 2025 20:25:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=44130003</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=44130003</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44130003</guid></item><item><title><![CDATA[New comment by hermitdev in "GCC 15.1"]]></title><description><![CDATA[
<p>This is a vast, _vast_ over-simplification: The primary "feature" of HFT is providing liquidity to market.<p>HFT firms are (almost) always willing to buy or sell at or near the current market price. HFT firms basically race each other for trade volume from "retail" traders (and sometimes each other). HFTs make money off the spread - the difference between the bid & offer - typically only a cent. You don't make a lot of money on any individual trade (and some trades are losers), but you make money on doing a lot of volume.  If done properly, it doesn't matter which direction the market moves for an HFT, they'll make money either way as long as there's sufficient trading volume to be had.<p>But honestly, if you want to learn about HFT, best do some actual research on it - I'm not a great source as I'm just the guy that keeps the stuff up and running; I'm not too involved in the business side of things.  There's a lot of negative press about HFTs, some positive.</p>
]]></description><pubDate>Fri, 25 Apr 2025 21:10:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=43798549</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=43798549</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43798549</guid></item><item><title><![CDATA[New comment by hermitdev in "GCC 15.1"]]></title><description><![CDATA[
<p>> We can use UB to refer to both. :)<p>You can, but in the context of the standard, you'd be wrong to do so. Undefined behavior and unspecified behavior have specific, different, meanings in context of the C and C++ standards.<p>Conflate them at your own peril.</p>
]]></description><pubDate>Fri, 25 Apr 2025 17:50:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=43796589</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=43796589</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43796589</guid></item><item><title><![CDATA[New comment by hermitdev in "GCC 15.1"]]></title><description><![CDATA[
<p>> Would you rather have a HFT trade go correctly and a few nanoseconds slower or a few nanoseconds faster but with some edge case bugs related to variable initialisation ?<p>As someone who works in the HFT space: it depends. How frequently and how bad are the bad-trade cases?  Some slop happens. We make trade decisions with hardware _without even seeing an entire packet coming in on the network_. Mistakes/bad trades happen. Sometimes it results in trades that don't go our way or missed opportunities.<p>Just as important as "<i>can</i> we do better?" is "<i>should</i> we do better?". Queue priority at the exchange matters. Shaving nanoseconds is how you get a competitive edge.<p>> I would posit is it things like network latency that would dominate.<p>Everything matters. Everything is measured.<p>edit to add:  I'm not saying we write software that either has or relies upon unitialized values. I'm just saying in such a hypothetical, it's not a cut and dry "do the right thing (correct according to the language spec)" decision.</p>
]]></description><pubDate>Fri, 25 Apr 2025 16:46:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=43795813</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=43795813</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43795813</guid></item><item><title><![CDATA[New comment by hermitdev in "I wrote to the address in the GPLv2 license notice (2022)"]]></title><description><![CDATA[
<p>> I realize this all probably sounds very silly to someone born before 1980<p>I was born after 1980 and I think you're beating a dead horse, here. You're conflating accessibility with convenience. Not just with this comment, but others you've made in this thread.<p>> those goddamn BIC pens all go bad (ink dries up or something), before I use even 5% of one of them.<p>Grab the pen by the end opposite the nib, give it a good shake for a few seconds, lick the nib, scribble on a scrap piece of paper until it starts writing again. Problem solved.  You can't resurrect a dead laptop or computer by licking and shaking it (at least I've never succeeded in doing so).</p>
]]></description><pubDate>Thu, 24 Apr 2025 20:40:44 +0000</pubDate><link>https://news.ycombinator.com/item?id=43787237</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=43787237</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43787237</guid></item><item><title><![CDATA[New comment by hermitdev in "How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2"]]></title><description><![CDATA[
<p>Editting simcity saves was my introduction to hex editing...</p>
]]></description><pubDate>Wed, 23 Apr 2025 18:28:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=43775181</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=43775181</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43775181</guid></item><item><title><![CDATA[New comment by hermitdev in "Detecting if an expression is constant in C"]]></title><description><![CDATA[
<p>The problem is: it's infectious into the generated code, as well. Is that 3rd party or not? Yes, it was generated by a 3rd party tool, but from, ostensibly, _your_ protobuf file.<p>edit to add: and yes `-isystem` is absolutely a useful tool. If memory serves, though, it doesn't protect from macro or template expansions, though.</p>
]]></description><pubDate>Wed, 23 Apr 2025 13:51:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=43772208</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=43772208</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43772208</guid></item><item><title><![CDATA[New comment by hermitdev in "Detecting if an expression is constant in C"]]></title><description><![CDATA[
<p>> And I'd rather keep the library warning free instead of telling the users to switch warnings off.<p>Thank you! Separately, but related: fuck you, Google! (every time I have to deal with protobuf in C++, I curse Google and their "we don't give a shit about signed vs unsigned comparisons").</p>
]]></description><pubDate>Tue, 22 Apr 2025 19:38:30 +0000</pubDate><link>https://news.ycombinator.com/item?id=43765532</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=43765532</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43765532</guid></item><item><title><![CDATA[New comment by hermitdev in "Python’s new t-strings"]]></title><description><![CDATA[
<p>Hey, at least Python is nowhere near Perl in terms of language creep. I don't need a Period Table of Operators [0] to keep Python straight in my head.<p>[0] <a href="https://www.ozonehouse.com/mark/periodic/" rel="nofollow">https://www.ozonehouse.com/mark/periodic/</a></p>
]]></description><pubDate>Tue, 22 Apr 2025 19:30:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=43765452</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=43765452</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43765452</guid></item><item><title><![CDATA[New comment by hermitdev in "Python’s new t-strings"]]></title><description><![CDATA[
<p>> The reason it works is because Python functionally has no bool type. True and False are just integers with names.<p>This has not been true since around 2.4 or 2.5. The oldest Python I have available to me currently is 2.7, and this holds then, as it does now in 3.13:<p><pre><code>    >>> type(True)
    <class 'bool'>
    >>> type(1)
    <class 'int'>
</code></pre>
<i>Prior</i> to having a bool type, Python didn't even have True/False keywords.<p>The reason something silly like `4 + True` works is because the bool type implements `tp_as_number` [0].  The reason it works this way is intentional because it would been a Python 3 str-style debacle if ints and bools were not interchangeable.<p>[0] <a href="https://github.com/python/cpython/blob/main/Objects/boolobject.c#L182">https://github.com/python/cpython/blob/main/Objects/boolobje...</a></p>
]]></description><pubDate>Tue, 22 Apr 2025 19:14:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=43765307</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=43765307</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43765307</guid></item><item><title><![CDATA[New comment by hermitdev in "How much do you think it costs to make a pair of Nike shoes in Asia?"]]></title><description><![CDATA[
<p>> Meanwhile there is another reason why the number of government workers has gone down:<p>Uh...excluding the very recent cuts this year under Trump; the number of civilians in the US Federal work force has gone up fairly steadily. [0]<p>We had 23.592 million civilian employees in Jan 2025. 21.779M in Jan 2021, after  being largely stagnant overall the previous 10 years. That's a net change in excess of 1.8M employees under Biden.<p>I do find it interesting that it appears that employee count was flat, or even down under Obama, but until COVID, there was a steady increase under Trump v1.<p>[0] <a href="https://fred.stlouisfed.org/series/USGOVT" rel="nofollow">https://fred.stlouisfed.org/series/USGOVT</a></p>
]]></description><pubDate>Wed, 09 Apr 2025 22:28:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=43638725</link><dc:creator>hermitdev</dc:creator><comments>https://news.ycombinator.com/item?id=43638725</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43638725</guid></item></channel></rss>