Recent submissions

Comment · 7 months ago
I plugged my iPhone 16 into my usb-C docking station the other day to charge it and was pretty surprised to discover it just started mirroring my phone screen. Keyboard worked too!
Comment · 9 months ago
Put a script in /etc/systemd/system-generators/ that does something like

  if grep "logging = syslog" /etc/stupid-service/stupid-service.conf >/dev/null; then
    printf "[Unit]\nAfter=rsyslogd.service\n" > "$1/stupid-service.d/10-syslog-dep.conf";
  fi;
> It's pretty basic and straightforward

Postgres config supports line continuations, so the OpenRC service file you quoted is buggy; it could potentially match a file just because some other option contained a multi-line value that had the string "log_destination = syslog" in it.

The whole philosophy of systemd is to move away from these kinds of "simple" and "mostly working" pile-of-shell-script systems to actually-unconditionally-correct configuration that doesn't come with bonus text processing surprises.

Comment · 9 months ago
Yeah parsing config files with regular expressions that may or may not properly handle quoting or line continuations etc is… not a great idea in my opinion.

But of course in this particular case, because systemd makes the /dev/log journal/syslog socket a dependency of every unit by default, there is no need to encode this dependency at all.

Anyway if you really wanted to you could write this script as a generator and have it put a drop-in in /run/systemd/system/postgres.service.d. But… why?

Comment · 9 months ago
> As a trivial example, you can dynamically depend on other services depending on system configuration (as PostgreSQL does)

Depending on what you want to do, a generator might be appropriate:

> Their main purpose is to convert configuration and execution context parameters that are not native to the service manager into dynamically generated unit files, symlinks or unit file drop-ins

Comment · 9 months ago
Something like the stm32mp2 series of MCUs can run Linux and act as a PCIe endpoint you can control from a kernel module on the MCU. So you can program an arbitrary PCIe device that way (although it won’t be setting any speed records, and I think the PHY might be limited to PCIe 1x)
Comment · 10 months ago
Was expecting some real unproductive and entitled whining based on the title, but was pleasantly surprised - someone actually investigating and debugging their wayland issues rather than putting their head in the sand and screaming “X11 FOREVER!!!”
Comment · 10 months ago
Hm. I found this (that memory must be stable wherever a SEH exception could be thrown) surprising, because I thought the unwind information generated by the compiler should be able to reconstruct all the correct variable values during stack unwinding.

TIL

Comment · 1 year ago
I have no idea whether the text was generated from an LLM, but “slop” it absolutely is not - it’s clearly a very logically ordered walkthrough about a very thorough debugging process.

If you call anything that comes out of a model “slop” the term uses all meaning.

Comment · 1 year ago
That’s exactly what it was. He discovered the customer was using a version of ffi that had this “use-after-free” (ish) bug, but the question “is this actually what my customer was seeing or is there _another_ bug lurking” still needed to be answered.
Comment · 1 year ago
I personally know and have (tangentially) worked with the guy and none of what you’ve said is true.

> Look at his CV. Tiny (but impactful) features ///building on existing infrastructure which has already provably scaled to millions and likely has never seen beneath what is a rest api and a react front end///

Off the top of my head he wrote the socket monitoring infrastructure for Zendesk’s unicorn workers, for example.

Comment · 1 year ago
Thanks for clarifying, and implementing this essential feature!
Comment · 1 year ago
Question: what actually reads /etc/pooper to configure the character? I can’t work out how that file’s contents ends up as module parameters and I’d love to know!
Comment · 1 year ago
I don’t know what you’re basing this on. Good psychiatrists absolutely “call themselves doctors” and definitely seek to exclude or treat organic causes of psychiatric symptoms. All the psychiatrists I know absolutely understand there’s a link between the immune system and mood disorders and will involve immunology/rheumatology for these things.

Your ideas about how psychiatry is practiced might have been correct in the 1950’s but they’re a world away from how it’s done in the 2020s.

Comment · 1 year ago
> In order to proceed, you’ll need a PC with a 64-bit CPU — and that might mean you have to buy a new PC if you don’t want to lose your EA games.

Uh, can’t imagine too many people reading this are playing Origin-era EA games on a Pentium 4

Comment · 2 years ago
> Which means your changes have to go through the Ruby team first. Any additional changes would also need to go through them …

I do want to pick on this specifically - people can and should be patching open source projects they depend on and deploying them to production (exactly as described in the article). Something being in the language vs in “user” code should be no barrier to improving it.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton