Better HN
topnewbestaskshowjobs
Log inSign up

database64128

646 karma · joined Aug 27, 2021 (5y ago) · 50 submissions

https://github.com/database64128
Submissions

comment 2w ago · link · parent

Yeah, I hate these forms (issue templates) too. Every time I have to fill such a form, I always feel that they are discouraging me from writing the bug description in a natural, coherent way. I'd spend more effort to make sure the description is clear and contains all necessary information, if there's no issue template requirements.

comment 2w ago · link · parent

> I've passed on reporting so many bugs, because I refuse to create a Microsoft account to do it.

99% of the time it's perfectly fine to just email the maintainer with a bug report and maybe a patch.

> In fact, I don't understand how sending an email is high friction.

Judging from the fact that after so many years, such a widespread (as seen in the Reddit post and here) issue still hasn't resulted in a single bug report in the mailing list, I'd say most people (including myself) do indeed consider using a mailing list to be higher friction.

If I'm not mistaken, unless you're already CC'ed by a participant, you'd have to subscribe to the whole mailing list just to receive notifications for a single thread. For an "issue" on a Git forge, participation is usually as easy as upvoting and then clicking the "Subscribe" button.

comment 2w ago · link · parent

> Definitely still a bug right? Linked them to your parent comment.

Thanks! Yes, it is still a bug.

> Edit: oops sorry team, think you're on it (4d ago)

I don't think @zx2c4 has seen this PR, and the author of the PR has not sent a bug report yet, so it's probably fine :P

comment 2w ago · link · parent

Lucky for you! I first ran into this before AI agents were a thing, so :(

comment 2w ago · link · parent

> You linked a commit and a Reddit post. Is there a proper Github issue as well?

It's funny you mentioned that. The GitHub repository is a mirror of https://git.zx2c4.com/wireguard-apple. You cannot create issues there. You're supposed to send a bug report to the mailing list, which is enough friction that none of us did so far.

comment 2w ago · link · parent

Security features like this works, until it doesn't.

When I installed WireGuard on macOS, I was happy to discover that it stores private keys in the system keychain. Accessing the private key requires Touch ID.

Then one day after a system upgrade, the WireGuard app crashed on startup with:

  [APP] Unable to open config from keychain: -25300
Then the app deleted all profiles because they are all "orphaned", apparently for "keychain consistency" [0].

From then on, I just use a text editor to edit my WireGuard configuration files, and import them to the app. The bug still exists to this day [1].

[0] https://github.com/WireGuard/wireguard-apple/commit/dfb685f2...

[1] https://www.reddit.com/r/WireGuard/comments/wyt828/osx_wireg...

7.

Hacking the Go compiler to efficiently map IPv4 to IPv6(vincent.bernat.ch ↗)

6 points · by database64128 · 1mo ago · discuss

comment 1mo ago · link · parent

Interestingly this is exactly why I have to mess with brightness settings from time to time.

Has anyone else noticed the weird interaction between apps turning the brightness to the max and the system’s auto brightness? I’m not an iOS developer, so I don’t know about the relevant APIs. But every time an app changes the brightness to display a QR code, it seems to do so by retrieving the current brightness, turning it to the max, and when it’s done, setting it back to the old value. The problem is that iOS seems to register the brightness change as user initiated, and changes auto brightness behavior. After a few uses, auto brightness will no longer adjust the display to the minimum brightness, even when you’re in complete darkness.

Fixing this used to be easy. Just go to display settings and toggle auto brightness off and on. Then Apple decided to move the toggle under accessibility. Now it’s Accessibility -> Display & Text Size and scroll all the way to the bottom.

9.

Go 1.27(go.dev ↗)

759 points · by database64128 · 3mo ago · 265 comments

10.

Arch Linux disables AUR package adoption(lwn.net ↗)

164 points · by database64128 · 3mo ago · 128 comments

comment 4mo ago · link · parent

I'm new to Ubiquiti routers, but I had no problem dividing the /60 I got from my ISP and assign /64s to VLANs.

You might be interested in https://www.youtube.com/watch?v=KZpJvpm1Ris (title: Does UniFi FINALLY support IPv6 Properly? State of IPv6 with Unifi Network v9). The video is about a year old, but from the looks it's not terribly outdated.

12.

Latest ToS update includes class action waiver and forced arbitration(github.com ↗)

2 points · by database64128 · 8mo ago · discuss

13.

Std: Introduce `Io` Interface by Andrewrk(github.com ↗)

8 points · by database64128 · 1y ago · discuss

comment 1y ago · link · parent

No, having the bare minimum "HDR support" does not mean it works fine. I have a 27-inch 4K 144Hz monitor with P3 wide color gamut and HDR600. This monitor is connected to 2 PCs, one running Arch Linux with GNOME as the DE and one with Windows 11.

Since Windows 11 24H2, with the new color management feature turned on, I can get correct colors on the monitor in both SDR and HDR modes. So it ends up with HDR on at all times, and mpv can play HDR videos with no color or brightness issues.

GNOME, on the other hand, is stuck with sRGB output in SDR mode, so you get oversaturated colors. With HDR on, SDR content will no longer be oversaturated, but if you play HDR videos with mpv, the image looks darkened and wrong. I've tried setting target-peak and target-contrast to match the auto-detected values on Windows, but the video still looks off.

comment 1y ago · link · parent

I don't think so. I'm on GNOME 49 and nothing has changed compared to 48.

comment 1y ago · link · parent

> Every time I login using a Wayland desktop, only my main monitor is detected and it defaults to 60hz. I have to go through a whole process of unplugging the "undetected" monitors and plugging them back in.

Are you using GNOME? mutter has this problem where it does not retry commit on the next CRTC: https://gitlab.gnome.org/GNOME/mutter/-/issues/3833. If this is actually what's happening on your system, switching to KDE should solve it.

> HDR on Wayland is barely functional (in my experience)

This also sounds specific to GNOME, as mutter still doesn't have color management. You'll get a better HDR experience with KDE.

comment 1y ago · link · parent

Have you actually contributed to the Go standard library?

Yes, there are people who don't work for Google and can +2 on changes, but you still need 2 Google employees to at least +1 on your change before it can be submitted. This is mentioned in the Contribution Guide [0] and is enforced by Gerrit.

> Finally, to be submitted, a change must have the involvement of two Google employees, either as the uploader of the change or as a reviewer voting at least Code-Review +1. This requirement is for compliance and supply chain security reasons.

[0] https://go.dev/doc/contribute

comment 1y ago · link · parent

Yes. To land a change in the Go standard library, you'll need 2 Google employees to approve your change on their "trusted devices".

comment 1y ago · link · parent

I see you use a hard-coded constant ALIGN = 512. Many NVMe drives actually allow you to raise the logical block size to 4096 by re-formatting (nvme-format(1)) the drive.

20.

Linus Torvalds Marks Bcachefs as Now "Externally Maintained"(phoronix.com ↗)

22 points · by database64128 · 1y ago · discuss

21.

Bcachefs Goes to "Externally Maintained"(lwn.net ↗)

15 points · by database64128 · 1y ago · discuss

comment 1y ago · link · parent

You could use something like https://github.com/database64128/swgp-go to obfuscate WireGuard traffic.

Using full-blown VPNs under such environments has the disadvantage of affecting your use of domestic web services. You might want to try something like https://github.com/database64128/shadowsocks-go, which allows you to route traffic based on domain and IP geolocation rules.

23.

Show HN: DDNS-go – Over-engineered DDNS service with native OS integrations(github.com ↗)

2 points · by database64128 · 1y ago · discuss

comment 1y ago · link · parent

> One problem with Go is the lack of fine-grained control over allocation. In particular, no arena allocation support. How does C# compare?

Go has an experimental arena package [0], but the proposal is on hold and the code may be removed in the future.

C# does not support arenas. But it does provide the stackalloc keyword, whereas in Go you kind of need the compiler's blessing for avoiding heap allocations.

> Another problem is relatively high cost of FFI interop with C. It's gotten better, but Go still needs to switch stacks, etc. How is C#?

Async in C# is implemented as stackless coroutines. Calling into FFI is cheap.

> How does C# compilation speed compare?

In my experience, release builds are a bit slower than Go.

> Does the compiler optimize more aggressively than Go (which does very little optimization)? I've heard the C# AOT compiler is lacking, but it's not clear in what way.

Not much to say on this, but with each new .NET release, a core .NET team member posts a blog post about performance improvements in the new release. The most recent one: https://devblogs.microsoft.com/dotnet/performance-improvemen...

> Does C# have the equivalent of "go run"?

  dotnet run
> What's the package management situation like?

NuGet Gallery [1] is like a centralized DLL registry. Definitely not as good as Go.

> Can you use LINQ against databases like Postgres on Linux, without having to buy into a lot of Microsoft/.NET stuff?

Probably not. This is usually done with EF Core and the Postgres provider.

[0] https://github.com/golang/go/issues/51317

[1] https://www.nuget.org/

comment 1y ago · link · parent

Shameless plug: I wrote a DDNS service in Go [0] that uses Netlink on Linux and the IP Helper API on Windows to monitor network interface addresses in the most efficient way possible. As a result of working on this project, I sent 3 separate CLs to the x/sys module.

[0] https://github.com/database64128/ddns-go

[1] https://go-review.googlesource.com/c/sys/+/597915

[2] https://go-review.googlesource.com/c/sys/+/598895

[3] https://go-review.googlesource.com/c/sys/+/603755

26.

Bcachefs Changes Merged into Linux 6.16, for 6.17: "We'll Be Parting Ways"(phoronix.com ↗)

18 points · by database64128 · 1y ago · 1 comment

comment 1y ago · link · parent

Raising the soft limit to the hard limit is also recommended by the author of systemd: https://0pointer.net/blog/file-descriptor-limits.html

I doubt the kernel would actually allocate the resource space upfront. Like SO_SNDBUF and SO_RCVBUF, it's probably only allocated when it's actually needed.

comment 1y ago · link · parent

> In fact it’s quite common to “commit” on close, at least from what I’ve seen.

close(2) does not "commit". You have to call v.Sync() (i.e. fsync(2)) for that.

From man 2 close:

       A successful close does not guarantee that the data has been successfully saved to disk, as the kernel uses the buffer cache  to  defer  writes.   Typi‐
       cally,  filesystems  do  not flush buffers when a file is closed.  If you need to be sure that the data is physically stored on the underlying disk, use
       fsync(2).  (It will depend on the disk hardware at this point.)

comment 1y ago · link · parent

This is one of the many things where Go just takes care of automatically. Since Go 1.19, if you import the os package, on startup, the open file soft limit will be raised to the hard limit: https://github.com/golang/go/commit/8427429c592588af8c49522c...

comment 1y ago · link · parent

Just write `defer v.Close()`? In almost all cases, `close(2)` errors can be safely ignored. Rust also does this: https://github.com/rust-lang/rust/blob/792fc2b033aea7ea7b766...
12