<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: jmgao</title><link>https://news.ycombinator.com/user?id=jmgao</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sat, 28 Nov 2026 10:04:46 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=jmgao" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by jmgao in "Splitting USB-C: USB 3 and USB 2 on one port"]]></title><description><![CDATA[
<p>What the fuck. Thanks, I think you just solved a bug that's been on my TODO list for like 6 months.<p>I wrote a library [1] that lets you use CSS selectorish syntax to select USB devices (e.g. "any device that's on port 3 of a hub that also has a Logitech device connected on port 4" -> "(!hub > device[vid=046d, port=4]) > device[port=3]") so I could do automations for things like plugging in my laptop at one desk vs another, but one of my selectors I use on my desktop for a USB-C cable would rarely fail to trigger despite the device definitely being connected and working. I'll have to check this when I get home...<p>1: <a href="https://github.com/jmgao/usbselector" rel="nofollow">https://github.com/jmgao/usbselector</a></p>
]]></description><pubDate>Tue, 24 Nov 2026 21:24:06 +0000</pubDate><link>https://news.ycombinator.com/item?id=50634928</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=50634928</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50634928</guid></item><item><title><![CDATA[New comment by jmgao in "macOS 27 does not support CoreStorage volumes"]]></title><description><![CDATA[
<p>bcachefs with foreground_target/background_target/promote_target set appropriately does this automagically: <a href="https://bcachefs.org/Caching/" rel="nofollow">https://bcachefs.org/Caching/</a></p>
]]></description><pubDate>Tue, 03 Nov 2026 22:38:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=50359244</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=50359244</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50359244</guid></item><item><title><![CDATA[New comment by jmgao in "Jailbreaking my car's navigation system just so I can change the time"]]></title><description><![CDATA[
<p>As someone that grew up in Pittsburgh and lived in the Seattle area for 5 years, Seattle's topography isn't that extreme, the drivers are just awful. My favorite example is this interstate exit: <a href="https://www.youtube.com/watch?v=Tij3SRs_5wg&list=PL_ZOHdoqrC23a3Dzq_YIadF-gtfhp4N8r" rel="nofollow">https://www.youtube.com/watch?v=Tij3SRs_5wg&list=PL_ZOHdoqrC...</a></p>
]]></description><pubDate>Tue, 03 Nov 2026 21:28:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=50358440</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=50358440</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50358440</guid></item><item><title><![CDATA[New comment by jmgao in "Infinite Mac: BeOS"]]></title><description><![CDATA[
<p>I wrote something to do this 13 years ago, someone picked it up after 6 years of inactivity (since I don't own a Mac anymore): <a href="https://github.com/justjake/metamove" rel="nofollow">https://github.com/justjake/metamove</a></p>
]]></description><pubDate>Sat, 31 Oct 2026 01:33:31 +0000</pubDate><link>https://news.ycombinator.com/item?id=50312370</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=50312370</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50312370</guid></item><item><title><![CDATA[New comment by jmgao in "Solar panels that plug into your wall"]]></title><description><![CDATA[
<p>That pricing is insane. I had 11.3 kWp of panels + 48 kWh of batteries installed in the Bay Area a few months ago, for $40k (shoutouts to Potrero Energy).</p>
]]></description><pubDate>Tue, 13 Oct 2026 04:25:29 +0000</pubDate><link>https://news.ycombinator.com/item?id=50066709</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=50066709</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50066709</guid></item><item><title><![CDATA[New comment by jmgao in "Show HN: PaperMono, e-ink fridge magnet shopping list with mobile web page"]]></title><description><![CDATA[
<p>I've been on the mailing list for restocks for a month now :-(<p>This is the only device that I've found that has an e-ink display and an NFC chip that can read cards (there are a few with writable tags).</p>
]]></description><pubDate>Mon, 28 Sep 2026 18:16:16 +0000</pubDate><link>https://news.ycombinator.com/item?id=49882125</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=49882125</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49882125</guid></item><item><title><![CDATA[New comment by jmgao in "Optimizing a Spin-Lock"]]></title><description><![CDATA[
<p>Optimistically spinning for a bit before falling back to futex or equivalent is <i>very</i> different from a spinlock.</p>
]]></description><pubDate>Mon, 14 Sep 2026 22:33:06 +0000</pubDate><link>https://news.ycombinator.com/item?id=49705140</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=49705140</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49705140</guid></item><item><title><![CDATA[New comment by jmgao in "Apple discontinues the Mac Pro"]]></title><description><![CDATA[
<p>MCPRUE sells shameless ripoffs of the Mac Pro case, but with support for standard motherboard sizing, if you really want your PC to double as a cheese grater: <a href="https://www.mcprue.com/case" rel="nofollow">https://www.mcprue.com/case</a></p>
]]></description><pubDate>Fri, 27 Mar 2026 01:40:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=47538134</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=47538134</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47538134</guid></item><item><title><![CDATA[New comment by jmgao in "The unlikely story of Teardown Multiplayer"]]></title><description><![CDATA[
<p>> For the longest time (and for good reasons), floating point operations were considered unsafe for deterministic purposes. That is still true to some extent, but the picture is more nuanced than that. I have since learned a lot about floating point determinism, and these days I know it is mostly safe if you know how to navigate around the pitfalls.<p>If you're only concerned about identical binaries on x86, it's not too bad because AMD and Intel tend to have intentionally identical implementations of most floating point operations, with the exception of a few of the approximate reciprocal SSE instructions (rcpps, rsqrtps, etc). Modern x86 instructions tend to have their exact results strictly defined to avoid this kind of inconsistency: <a href="https://software.intel.com/en-us/articles/reference-implementations-for-IA-approximation-instructions-vrcp14-vrsqrt14-vrcp28-vrsqrt28-vexp2" rel="nofollow">https://software.intel.com/en-us/articles/reference-implemen...</a><p>If you want this to work across ARM and x86 (or even multiple ARM vendors), you are screwed, and need to restrict yourself to using only the basic arithmetic operations and reimplement everything else yourself.</p>
]]></description><pubDate>Tue, 17 Mar 2026 10:02:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=47410604</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=47410604</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47410604</guid></item><item><title><![CDATA[New comment by jmgao in "Gathering Linux Syscall Numbers in a C Table"]]></title><description><![CDATA[
<p>> I was expecting a unified interface across all architectures, with perhaps one or two architecture-specific syscalls to access architecture-specific capabilities; but Linux syscalls are more like Swiss cheese.<p>There's lots of historical weirdness, mostly around stuff where the kernel went "oops, we need 64-bit time_t or off_t or whatever" and added, for example, getdents64 to old platforms, but new platforms never got the broken 32-bit version. There are some more interesting cases, though, like how until fairly recently (i.e. about a decade ago for the mainline kernel), on x86 (and maybe other platforms?) there weren't individual syscalls for each socket syscall, they were all multiplexed through socketcall.</p>
]]></description><pubDate>Thu, 22 Jan 2026 09:18:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=46716900</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=46716900</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46716900</guid></item><item><title><![CDATA[New comment by jmgao in "Anker goes big with new whole home backup system"]]></title><description><![CDATA[
<p>> I use about 1500kWh a year, but I don’t need aircon and heating is district heating.<p>That's 171 W on average, that's about the same as my refrigerator (~150 W on average).</p>
]]></description><pubDate>Mon, 12 Jan 2026 21:30:20 +0000</pubDate><link>https://news.ycombinator.com/item?id=46594553</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=46594553</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46594553</guid></item><item><title><![CDATA[New comment by jmgao in "The most famous transcendental numbers"]]></title><description><![CDATA[
<p>Well, except for inf, -inf, and nan.</p>
]]></description><pubDate>Wed, 31 Dec 2025 17:04:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=46445935</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=46445935</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46445935</guid></item><item><title><![CDATA[New comment by jmgao in "A production bug that made me care about undefined behavior"]]></title><description><![CDATA[
<p>> Compilers can do whatever they want when they see UB, and accessing an unassigned and unassiganble (file-local) variable is UB, therefore the compiler can just decide that *foo is in fact always 42, or never 42, or sometimes 42, and all would be just as valid options for the compiler.<p>That's not exactly correct. It's not that the compiler sees that there's UB and decides to do something arbitrary: it's that it sees that there's exactly one way for UB to <i>not</i> be triggered and so it's assuming that that's happening.</p>
]]></description><pubDate>Mon, 29 Dec 2025 23:09:20 +0000</pubDate><link>https://news.ycombinator.com/item?id=46427144</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=46427144</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46427144</guid></item><item><title><![CDATA[New comment by jmgao in "A production bug that made me care about undefined behavior"]]></title><description><![CDATA[
<p>There are some even funnier cases like this one: <a href="https://gcc.godbolt.org/z/cbscGf8ss" rel="nofollow">https://gcc.godbolt.org/z/cbscGf8ss</a><p>The compiler sees that foo can only be assigned in one place (that isn't called locally, but could called from other object files linked into the program) and its address never escapes. Since dereferencing a null pointer is UB, it can legally assume that `*foo` is always 42 and optimizes out the variable entirely.</p>
]]></description><pubDate>Mon, 29 Dec 2025 21:16:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=46425807</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=46425807</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46425807</guid></item><item><title><![CDATA[New comment by jmgao in "Rootless Pings in Rust"]]></title><description><![CDATA[
<p>Wrong way around: UDP sockets are datagram sockets, there are datagram sockets that are not UDP.</p>
]]></description><pubDate>Tue, 02 Dec 2025 10:06:58 +0000</pubDate><link>https://news.ycombinator.com/item?id=46119609</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=46119609</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46119609</guid></item><item><title><![CDATA[New comment by jmgao in "Google Revisits JPEG XL in Chromium After Earlier Removal"]]></title><description><![CDATA[
<p>Describing it as 'Google' is misleading, because different arms of the company might as well be completely different companies. The Chrome org seems to have had the same stance as Firefox with regards to JPEG XL: "we don't want to add 100,000 lines of multithreaded C++ because it's a giant gaping security risk", and the JPEG XL team (in a completely separate org) is addressing those concerns by implementing a Rust version. I'd guess that needing the "commitment to long-term maintenance" is Chrome fighting with Google Research or whatever about long-term headcount allocation towards support: Chrome doesn't want the JPEG XL team to launch and abandon JPEG XL in chrome and leaving Chrome engineers to deal with the fallout.</p>
]]></description><pubDate>Sun, 23 Nov 2025 11:30:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=46022694</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=46022694</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46022694</guid></item><item><title><![CDATA[New comment by jmgao in "AirPods libreated from Apple's ecosystem"]]></title><description><![CDATA[
<p>It doesn't seem obvious to me that this is actually a bug in the Android implementation, it seems like this is due to AirPods violating the spec and requiring a special handshake before responding to standard requests. It doesn't seem reasonable to expect Android to work around a device that appears to be intentionally breaking the spec for vendor lock-in purposes: the possibility of them just OTAing an update that breaks in some other way means that you'd have to be entirely bug compatible with iOS's bluetooth implementation.</p>
]]></description><pubDate>Sun, 16 Nov 2025 03:12:23 +0000</pubDate><link>https://news.ycombinator.com/item?id=45942451</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=45942451</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45942451</guid></item><item><title><![CDATA[New comment by jmgao in "PCB Edge USB C Connector Library"]]></title><description><![CDATA[
<p>I've found 0.8mm to make much more reliable connections, since the specification says that the tongue should be 0.7mm. 0.6mm will disconnect if the cable is angled in any way.</p>
]]></description><pubDate>Sun, 26 Oct 2025 07:29:21 +0000</pubDate><link>https://news.ycombinator.com/item?id=45709797</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=45709797</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45709797</guid></item><item><title><![CDATA[New comment by jmgao in "Bring Your Own Agent to Zed – Featuring Gemini CLI"]]></title><description><![CDATA[
<p>Seconding this, it's the only editor other than emacs that has a vim-mode that feels like it's maintained by a long term vim user.</p>
]]></description><pubDate>Wed, 27 Aug 2025 21:45:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=45045705</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=45045705</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45045705</guid></item><item><title><![CDATA[New comment by jmgao in "Some bits on malloc(0) in C being allowed to return NULL"]]></title><description><![CDATA[
<p>C89: <a href="https://port70.net/%7Ensz/c/c89/c89-draft.html" rel="nofollow">https://port70.net/%7Ensz/c/c89/c89-draft.html</a><p>If the size of the space requested is zero, the behavior is implementation-defined; the value returned shall be either a null pointer or a unique pointer.</p>
]]></description><pubDate>Thu, 26 Jun 2025 17:50:21 +0000</pubDate><link>https://news.ycombinator.com/item?id=44389646</link><dc:creator>jmgao</dc:creator><comments>https://news.ycombinator.com/item?id=44389646</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44389646</guid></item></channel></rss>