HN user

mishafb

117 karma
Posts0
Comments41
View on HN
No posts found.
Zig's New Writer 1 year ago

I agree on the last point of the lack of composition here.

While it's true that writers need to be aware of buffering to make use of fancy syscalls, implementing that should be an option, but not a requirement.

Naively this would mean implementing one of two APIs in an interface, which ruins the direct peformance. So I see why the choice was made, but I still hope for something better.

It's probably not possible with zig's current capabilities, but I would ideally like to see a solution that:

- Allows implementations to know at comptime what the interface actually implements and optimize for that (is buffering supported? Can you get access to the buffer inplace for zero copy?).

- For the generic version (which is in the vtable), choose one of the methods and wrap it (at comptime).

There's so many directions to take Zig into (more types? more metaprogramming? closer to metal?) so it's always interesting to see new developments!

LineageOS 19 4 years ago

There's a payment app that detects the installation source is not google play store, and I haven't found a way to use it

On the mdn page for it they say there are other less legitimate techniques like adding an image which will start loading and delay the page unloading. So if they didn't add beacons it would mean other less performant ways would be (ab)used.

We have atomic bitwise operations already (look at glibc's mutex implementation), and the unit atomic operations work on is a 64-byte cache line. Cache lines are useful because reading 64 bytes isn't really more expensive but it improves sequential memory access by a lot.

With IPv6, you don't have CG-NAT, or double NATting, at the ISP level. If both sides are behind CG-NAT, then direct peer-to-peer communication is impossible or at least unstable to establish.

The lambdas aren't actually lambdas, they are anonymous classes with a single metthod according to the type-inferred interface, and they can't use variables that aren't effectively final.

[dead] 5 years ago

Many realtek wifi adapters cause issues on Linux, and require buggy kernel modules. You should do some research before getting a wifi adapter. I just repurposed a wifi extender to be a wireless "bridge" from wifi to ethernet.