<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: charleslmunger</title><link>https://news.ycombinator.com/user?id=charleslmunger</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Tue, 21 Apr 2026 12:25:20 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=charleslmunger" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by charleslmunger in "Vite 8.0 Is Out"]]></title><description><![CDATA[
<p>>With Kotlin/Spring Boot, compilation is annoyingly slow. That's what you get with modern languages and rich syntax.<p>This is because the kotlin compiler is not written in the way people write fast compilers. It has almost no backend to speak of (if you are targeting the jvm), and yet it can be slower at compilation than gcc and clang when optimizing.<p>Modern fast compilers follow a sort of emerging pattern where AST nodes are identified by integers, and stored in a standard traversal order in a flat array. This makes extremely efficient use of cache when performing repeated operations on the AST. The Carbon, Zig, and Jai compiler frontends are all written this way. The kotlin compiler is written in a more object oriented and functional style that involves a lot more pointer chasing and far less data-dense structures.<p>Then, if run on a non-graal environment, you also have to pay for the interpreter and JIT warmup, which for short-lived tasks represents nontrivial overhead.<p>But unlike header inclusion or templates, which are language level features that have major effects on compilation time, I don't think kotlin the language is inherently slow to compile.</p>
]]></description><pubDate>Mon, 16 Mar 2026 01:55:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=47394247</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=47394247</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47394247</guid></item><item><title><![CDATA[New comment by charleslmunger in "In world without BlackBerry, physical keyboards on phones are making a comeback"]]></title><description><![CDATA[
<p>The default Gboard keyboard has settings for always showing the number row, or only showing it when entering a password. There is also a setting for the "suggestion strip" under "corrections & suggestions". You can also drag to resize the keyboard itself in the Gboard menu, to scale the height.<p>Now, whether your users will do that to play your game is a different story, but the options exist.</p>
]]></description><pubDate>Sun, 22 Feb 2026 23:10:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=47115822</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=47115822</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47115822</guid></item><item><title><![CDATA[New comment by charleslmunger in "I love the work of the ArchWiki maintainers"]]></title><description><![CDATA[
<p>Not OP, but used Arch for a while in 2011, and at some point doing an update moved /bin to /usr/bin or something like that and gave me an unbootable system. This was massive inconvenience and it took me many hours to un-hose that system, and I switched to Ubuntu. The Ubuntu became terrible with snaps and other user hostile software, so I switched to PopOS, then I got frustrated with out of date software and Cosmic being incomplete, and am now on Arch with KDE.<p>Back then I used Arch because I thought it would be cool and it's what Linux wizards use. Now Arch has gotten older, I've gotten older, and now I'm using Arch again because I've become (more of a) Linux wizard.</p>
]]></description><pubDate>Sun, 15 Feb 2026 05:43:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=47021350</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=47021350</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47021350</guid></item><item><title><![CDATA[New comment by charleslmunger in "Faster Than Dijkstra?"]]></title><description><![CDATA[
<p>You have a list of IDs, and want to make them compact for storage or transport - fast and simple way is to sort and delta encode.</p>
]]></description><pubDate>Sat, 14 Feb 2026 14:12:32 +0000</pubDate><link>https://news.ycombinator.com/item?id=47014678</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=47014678</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47014678</guid></item><item><title><![CDATA[New comment by charleslmunger in "C isn't a programming language anymore (2022)"]]></title><description><![CDATA[
<p>C99, but with a million macros backporting features from newer language versions and compiler extensions. Lovely features you don't get with ordinary c99:<p>free_sized<p>#embed<p>static_assert<p>Types for enum<p>Alignof, alignas, aligned_alloc<p>_Atomic</p>
]]></description><pubDate>Fri, 06 Feb 2026 01:30:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=46907871</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=46907871</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46907871</guid></item><item><title><![CDATA[New comment by charleslmunger in "Ask HN: Can someone make a CAS just checking last bit on x86/ARM please?"]]></title><description><![CDATA[
<p>What hardware are you running on where the cost of a relaxed 64 bit load and a branch is significant compared to a (possibly contended) cas?<p>You could always use ldset on arm for this.</p>
]]></description><pubDate>Thu, 22 Jan 2026 00:02:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=46713462</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=46713462</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46713462</guid></item><item><title><![CDATA[New comment by charleslmunger in "Linux is good now"]]></title><description><![CDATA[
<p>Yup this works but there's as of yet no HBR13.5 or better input so you're not getting full hdmi 2.1 equivalent. But if you don't care about 24 bits per pixel DSC then you can have an otherwise flawless 4k120hz experience.<p><a href="https://trychen.com/feature/video-bandwidth" rel="nofollow">https://trychen.com/feature/video-bandwidth</a></p>
]]></description><pubDate>Fri, 02 Jan 2026 05:10:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=46461632</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=46461632</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46461632</guid></item><item><title><![CDATA[New comment by charleslmunger in "America Has Become a Digital Narco-State"]]></title><description><![CDATA[
<p>It's so weird to see the leading heroin story phrased like a hypothetical, when:<p>1. Heroin itself was marketed as a "non-addictive morphine substitute", and sold to the public. It didn't become a controlled substance until 1914 (according to Wikipedia)
2. The opioid crisis was basically started and perpetuated by Purdue pharma, again marketing Oxycodone with the label “Delayed absorption as provided by OxyContin tablets, is believed to reduce the abuse liability of a drug.” and other more egregious advertising.
3. Britain went to war with China twice to force the Qing dynasty to allow them to sell opium there.
4. President Teddy Roosevelt's grandfather made a ton of money in the opium trade.<p>It's supposed to be sort of shocking hypothetical, except actually that's basically the history of the actual drug.</p>
]]></description><pubDate>Wed, 10 Dec 2025 00:12:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=46212463</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=46212463</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46212463</guid></item><item><title><![CDATA[New comment by charleslmunger in "Spinlocks vs. Mutexes: When to Spin and When to Sleep"]]></title><description><![CDATA[
<p>That depends on your workload. If you're making a game that's expected to use near 100% of system resources, or a real time service pinned to specific cores, your local application is the overall system.</p>
]]></description><pubDate>Mon, 08 Dec 2025 09:36:59 +0000</pubDate><link>https://news.ycombinator.com/item?id=46190285</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=46190285</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46190285</guid></item><item><title><![CDATA[New comment by charleslmunger in "Spinlocks vs. Mutexes: When to Spin and When to Sleep"]]></title><description><![CDATA[
<p>>Critical section under 100ns, low contention (2-4 threads): Spinlock. You’ll waste less time spinning than you would on a context switch.<p>If your sections are that short then you can use a hybrid mutex and never actually park. Unless you're wrong about how long things take, in which case you'll save yourself.<p>>alignas(64) in C++<p><pre><code>    std::hardware_destructive_interference_size
</code></pre>
Exists so you don't have to guess, although in practice it'll basically always be 64.<p>The code samples also don't obey the basic best practices for spinlocks for x86_64 or arm64. Spinlocks should perform a relaxed read in the loop, and only attempt a compare and set with acquire order if the first check shows the lock is unowned. This avoids hammering the CPU with cache coherency traffic.<p>Similarly the x86 PAUSE instruction isn't mentioned, even though it exist specifically to signal spin sections to the CPU.<p>Spinlocks outside the kernel are a bad idea in almost all cases, except dedicated nonpreemptable cases; use a hybrid mutex. Spinning for consumer threads can be done in specialty exclusive thread per core cases where you want to minimize wakeup costs, but that's not the same as a spinlock which would cause any contending thread to spin.</p>
]]></description><pubDate>Mon, 08 Dec 2025 02:07:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=46187515</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=46187515</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46187515</guid></item><item><title><![CDATA[New comment by charleslmunger in "Google unkills JPEG XL?"]]></title><description><![CDATA[
<p>>The compiled compressed binary for an APK<p>This doesn't undermine your argument at all, but we should not be compressing native libs in APKs.<p><a href="https://developer.android.com/guide/topics/manifest/application-element#extractNativeLibs" rel="nofollow">https://developer.android.com/guide/topics/manifest/applicat...</a></p>
]]></description><pubDate>Tue, 02 Dec 2025 04:36:51 +0000</pubDate><link>https://news.ycombinator.com/item?id=46117590</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=46117590</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46117590</guid></item><item><title><![CDATA[New comment by charleslmunger in "Hardening the C++ Standard Library at scale"]]></title><description><![CDATA[
<p>>Not at all? Most memory-safety issues will never even show up in the radar<p>Citation needed? There's all sorts of problems that don't "show up" but are bad. Obvious historical examples would be heartbleed and cloudbleed, or this ancient GTA bug [1].<p>1: <a href="https://cookieplmonster.github.io/2025/04/23/gta-san-andreas-win11-24h2-bug/" rel="nofollow">https://cookieplmonster.github.io/2025/04/23/gta-san-andreas...</a></p>
]]></description><pubDate>Sat, 29 Nov 2025 18:53:36 +0000</pubDate><link>https://news.ycombinator.com/item?id=46089819</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=46089819</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46089819</guid></item><item><title><![CDATA[New comment by charleslmunger in "Ditch your mutex, you deserve better"]]></title><description><![CDATA[
<p>Unfortunately the standard library mutex is designed in such a way that condition variables can't use requeue, and so require unnecessary wakeups. I believe parking lot doesn't have this problem.</p>
]]></description><pubDate>Wed, 19 Nov 2025 01:38:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=45974852</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=45974852</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45974852</guid></item><item><title><![CDATA[New comment by charleslmunger in "When O3 is 2x slower than O2"]]></title><description><![CDATA[
<p>You can influence the choice of conditional moves (usually inserting them) with<p>__builtin_expect_with_probability(..., 0.5)<p><a href="https://github.com/protocolbuffers/protobuf/commit/9f29f02a36ae0d2689ca7feebd2d07018436bcde" rel="nofollow">https://github.com/protocolbuffers/protobuf/commit/9f29f02a3...</a></p>
]]></description><pubDate>Sun, 02 Nov 2025 17:53:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=45792077</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=45792077</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45792077</guid></item><item><title><![CDATA[New comment by charleslmunger in "Syntax highlighting is a waste of an information channel (2020)"]]></title><description><![CDATA[
<p>Jetbtains IDEs let you configure this - my favorite use is to highlight kotlin extension functions differently than normal functions.<p>This kind of highlighting as a secondary information channel for compiler feedback is great. Color, weight, italics, underlines - all help increase information density when reading code.</p>
]]></description><pubDate>Mon, 13 Oct 2025 02:00:13 +0000</pubDate><link>https://news.ycombinator.com/item?id=45563999</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=45563999</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45563999</guid></item><item><title><![CDATA[New comment by charleslmunger in "I Don't Want to Code with LLM's"]]></title><description><![CDATA[
<p>If you're working on something where the cost of bugs is high and they're tricky to detect, LLM generated code may not be a winning strategy if you're already a skilled programmer. However, LLMs are great for code review in these circumstances - there is a class of bugs that are hard to spot if you're the author.<p>As a simple example, accidentally inverting feature flag logic will not cause tests to fail if the new behavior you're guarding does not actually break existing tests. I and very senior developers I know have occasionally made this mistake and the "thinking" models are very good at catching issues like this, especially when prompted with a list of error categories to look for. Writing an LLM prompt for an issue class is much easier than a compiler plugin or static analysis pass, and in many cases works better because it can infer intent from comments and symbol names. False positives on issues can be annoying but aren't risky, and also can be a useful signal that the code is not written in a clear way.</p>
]]></description><pubDate>Mon, 22 Sep 2025 16:48:14 +0000</pubDate><link>https://news.ycombinator.com/item?id=45336083</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=45336083</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45336083</guid></item><item><title><![CDATA[New comment by charleslmunger in "Rating 26 years of Java changes"]]></title><description><![CDATA[
<p>Surprised not to see the foreign functions and memory apis on this list, or varhandle. Try-with-resources was a 10/10 feature for sure though.</p>
]]></description><pubDate>Sun, 14 Sep 2025 00:44:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=45236513</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=45236513</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45236513</guid></item><item><title><![CDATA[New comment by charleslmunger in "What If OpenDocument Used SQLite?"]]></title><description><![CDATA[
<p>Mobile apps store SQLite dbs in their private data directory that only they can access. In order to exploit a vulnerability you'd have to first break the sandbox. Desktop OSes generally have far weaker protections than that, if you have access to the user's profile directory you can steal all of their credentials or plant executables etc.<p>When I think application file format I think of something like .txt, pdf, or .doc, where it's expected that you'll receive untrusted input passed around. In that case it makes a lot more sense to restrict which features of SQLite are accessible, and even then I'd worry about using it in widely - there's so much surface area, plus the user confusion of shm and wal files.</p>
]]></description><pubDate>Sat, 06 Sep 2025 18:53:13 +0000</pubDate><link>https://news.ycombinator.com/item?id=45151901</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=45151901</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45151901</guid></item><item><title><![CDATA[New comment by charleslmunger in "What If OpenDocument Used SQLite?"]]></title><description><![CDATA[
<p>That's true, but most usage of sqlite is not as an application file format, and many of those CVEs don't apply even to that use case. The reason people have policies around CVE scanning is because CVEs often represent real vulnerabilities. But there's also a stuff like "this regex has exponential or polynomial runtime on bad inputs", which is a real security issue for some projects and not others, depending on what the input to the regex is. That's also true for SQLite, and I'm guessing that the author of that page has spent a bunch of time explaining to people worried about some CVE that their usage is not vulnerable. The maintainer of cURL has expressed similar frustration.</p>
]]></description><pubDate>Fri, 05 Sep 2025 20:00:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=45142959</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=45142959</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45142959</guid></item><item><title><![CDATA[New comment by charleslmunger in "Fil's Unbelievable Garbage Collector"]]></title><description><![CDATA[
<p>Very cool. Hardware asan did not catch the pointer provenance bug in the previous implementation of that code because it relies on tag bits, and the produced pointer was bit-identical to the intended one. It sounds like fil-c would have caught it because the pointer capabilities are stored elsewhere.</p>
]]></description><pubDate>Fri, 05 Sep 2025 06:10:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=45135448</link><dc:creator>charleslmunger</dc:creator><comments>https://news.ycombinator.com/item?id=45135448</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45135448</guid></item></channel></rss>