HNHacker News
TopNewBestAskShowJobs

LukeShu

7,078 karma · joined May 5, 2011

https://lukeshu.com/

[ my public key: https://keybase.io/lukeshu; my proof: https://keybase.io/lukeshu/sigs/HnTgaX1Qhui0yhjc6P-GRCJqUfJlk_xU09_TFpQKk0U ]

submissionscomments
LukeShu··on Goroutine Leak Profiles
"<-chan TYPE" is the receive end, "chan<- TYPE" is the send end, "chan TYPE" without an arrow can be used for either.

close() on a chan is "indicate end-of-transmission"; you should only ever use it from the send end. There is no way to explicitly "close" the receive end.

You can use `select` to do a non-blocking sends/receives, but yeah normal sends/receives are blocking.

LukeShu··on Photon-Emission-Guided Laser Fault Injection Enables RP2350 Secure Debug
> a premium price tag?

$0.80 in bulk. Around $1.25 for individual quantities, depending on who your reseller is.

AIUI, the CPU cores are a small fraction of the die area compared to all the peripherals on the chip.

LukeShu··on Why is the x86 undefined instruction called ud2? Why 2?
But those weren't on "IBM PC"-compatibles, just older micros? The 5150 had 5¼" drives. That is: (Q|MS|PC)-DOS never supported 8" floppies, right?
LukeShu··on RISC-V: They Should Have Known Better
Several of the peripherals in the RP2350 are also ARM IP.
LukeShu··on RISC-V: They Should Have Known Better
Luke Wren works at Raspberry Pi and designed the Hazard3 CPU core that is in the RP2350 chip.
LukeShu··on Illinois just passed a law that puts Linux on the hook for age verification
It was not. It was implemented by Dylan Taylor, an outside contributor who works at a fintech company in North Carolina, and has made it his hobby to submit PRs implementing age verification to all kinds of projects. The systemd maintainer who clicked "merge" (Luca Boccassi) does work at Microsoft.
LukeShu··on Illinois just passed a law that puts Linux on the hook for age verification
NB that you could already add your own freeform fields; it just added that field to userdbctl and friends.
LukeShu··on Tail-call optimization in C is relatively recent (2025)
GCC has `[[gnu::musttail]] return`.

But yes, framing TCO as an optimization is unfortunate.

LukeShu··on Go 1.27 Interactive Tour

    type IntBox struct { v int }
    type StrBox struct { v string }

    func (b IntBox) MapToStr(f func(int) string) StrBox {
        return StrBox{v: f(b.v)}
    }
(Please forgive any typos I made on mobile.)

It wasn't a great example because "Box" isn't really a useful type. But the point is that you no longer need to define a separate "MapToXXX" method for every type you might want to map to; now you can have just one type-generic "Map" method.

LukeShu··on Game of Trees – Git-based version control from OpenBSD folks
> along with their style of development: patches onto mailing lists

I mean that's also Git's style of development.

LukeShu··on RISCBoy is an open-source portable games console, designed from scratch
I'm surprised to see that it's OK that he has opensource AHB/APB stuff in it--I'd avoided learning them too much about them assuming that they were ARM proprietary.
LukeShu··on RISCBoy is an open-source portable games console, designed from scratch
I mean no disrespect to Luke Wren, but he did not write it in 2026; he wrote it in 2018-2021. :)
LukeShu··on RISCBoy is an open-source portable games console, designed from scratch
I think "ASIC design" engineer is under-selling him--he's working on their CPU cores too!
LukeShu··on RISCBoy is an open-source portable games console, designed from scratch
He works at Raspberry Pi, and designed the Hazard3 RISC-V core that is at the heart of the RP2350--although he did Hazard3 in his spare time. It's actually a fork of the "Hazard5" core that he designed for the RISCBoy.
LukeShu··on There's only one Woz, but we can all learn from him
Heh, I assumed he was referring to "Scott the Woz" Scott Wozniak, a vintage-gaming youtuber. I assumed that the GP took a more literal attack on "only one 'Woz'", hile you took a more symbolic "only one engineer of such quality". In the context of Apple, sure "Scott" is Scott Forstall, but that's not necessarily the context.
LukeShu··on Losing 1½ Million Lines of Go
"CL"/"Change List" is the lingo for the Gerrit code review tool, which is how all contributions to Go happen. Creating a GitHub PR simply triggers a bot to create a Gerrit CL, which is where all discussion about the "PR" happens and where the "accept" button gets clicked.
LukeShu··on Update on age requirements for apps distributed in Texas
First they said you wouldn't be able to travel unless you had a Real ID by 2008. Then they delayed it. Many times. Based on which airport/facility and what state your ID was from, some enforcement started in 2014. Not all states were even issuing Real IDs yet in 2019. Finally, in 2024, all states and territories are issuing Real IDs, but full enforcement won't be until 2027.
LukeShu··on Update on age requirements for apps distributed in Texas
In 2005, we decided that we were going to have Real ID by 2008. We're now looking at a 2027 completion date.
LukeShu··on Go.sum is not a lockfile
The correct answer is `go mod vendor && cat vendor/modules.txt`
LukeShu··on Linear Address Spaces: Unsafe at any speed (2022)
Linux on PA-RISC also has an upward-growing stack (AFAIK, it's the only architecture Linux has ever had an upward-growing stack on; it's certainly the only currently-supported one).
LukeShu··on Unix v4 (1973) – Live Terminal
In 2002, Caldera licensed Research Unix <= 7th edition and 32-bit 32V Unix under a BSD-style license.

Gotta stick the "This product includes software developed or owned by Caldera International, Inc." notice on it though.

LukeShu··on My insulin pump controller uses the Linux kernel. It also violates the GPL
TL;DR: Not the FSF, but SFC; email compliance@sfconservancy.org

The dominant legal theory is that the GPL can only be enforced by the party holding the copyright. SFC's lawsuit against Vizio is strategically trying to establish precedent changing that; establishing that end-users are "third party beneficiaries" under the GPL, so others can enforce the GPL; but for now the copyright holder is the only one who can enforce it.

So the FSF could only take it up if the violation is on projects that do copyright-assignment to the FSF (i.e.: most GNU stuff). If you do find a violation of GNU stuff, the process is "email license-violation@gnu.org". I do not know what process Craig and Krzysztof use when triaging reports and deciding what to pursue.

Many Linux-kernel contributors (also, SFC member projects such as OpenWrt, Git, Qemu) have assigned their copyright to SFC or named SFC as their legal representative (also, SFC member projects; so SFC can take up something like this. Similarly, you can report violations to them by emailing compliance@sfconservancy.org (see https://sfconservancy.org/copyleft-compliance/help.html for more info).

Now, SFC is aware of more violations than they could ever possibly pursue, so they're strategic about pursuing ones that are high-impact. I'm not sure how they decide that. But I can say that medical devices are near-and-dear to them, between executive-director Karen Sandler's implanted defibrillator and policy-fellow Bradley Kühn's blood glucose monitor.

LukeShu··on Security vulnerability found in Rust Linux kernel code
While it doesn't add much more info: https://lore.kernel.org/linux-cve-announce/2025121614-CVE-20...
LukeShu··on Rust GCC backend: Why and how
libgccjit is much higher level than what's documented in the "GCC Internals" manual.
LukeShu··on Fifty Shades of OOP
...yes? Hence me saying that 'composition' and 'polymorphism' have often been unnecessarily coupled together in 'inheritance'?

Compare: Ruby mixins or Go embedded struct fields.

LukeShu··on Fifty Shades of OOP
Inheritance is just the unnecessary coupling of composition and polymorphism.
LukeShu··on Mozilla says it's finally done with Onerep
Yes, subscribing to bullshit I don't want them to work on will surely send the signal that they're focusing on the wrong things!
LukeShu··on Run ancient UNIX on modern hardware
While exact definitions vary, it's a term of art for Research Unix ≤ V7, perhaps plus or minus a version, perhaps including contemporary derivatives.
LukeShu··on This week in 1988, Robert Morris unleashed his eponymous worm
At the same time, it's easy to believe that MIT of 2013 is very different than MIT of 1988.
LukeShu··on State of Terminal Emulators in 2025: The Errant Champions
> You can do the same thing with a vt220.

Can you? The last I looked at it (a year or two ago), the vt220 in MAME was just the beginning skeleton of an implementation, and it doesn't seem to have been touched much since then. A shame, because AFAIK no "terminal emulator" implements vt220-style sixels (which are different than than the widely-implemented vt4xx-style sixels).

Page 1 of 34Next →