Recent submissions

Comment · 6 years ago
Linux/Unix just trust that if you want something persisted with certainty you'll do an fsync, if you do it will absolutely guarantee you're not losing that. It will absolutely make sure that your filesystem doesn't get corrupted by a power loss but if you didn't fsync your write you had no place believing it was persisted.

Doing that IMHO matches real world use much better. If I do a compile and get a power outage I don't care if some object files get lost. If I do an INSERT in a DB I do care a lot but the DB knows that and will fsync before telling me it succeeded. So making sync explicit gives you both great performance and flexibility.

Comment · 6 years ago
As for kernel panics, with iOS likely sharing most if not all of it's kernel code with macOS I'd be surprised if Apple hasn't had an iPhone macOS build since before they released the first iPhone.
Comment · 6 years ago
Comment · 6 years ago
Yeah I know about 1 e.g. also MicroPython, no idea if that's used outside DIY though. I agree about rust but I would think that with much stronger type safety and static compilation it should be able to remove a lot more of the overflow checks and most that remain would be needed in correct C too. At least that's what I learned from my compilers prof who worked on Ada compilers for many years and that should be quite similar. But maybe that's my biased hope as I really really hate working with dynamic languages.
Comment · 6 years ago
Instead of fusing them, shouldn't it be possible to speculate that it will not overflow, process the check on a separate slow path and do a roll back in case it did overflow?
Comment · 6 years ago
I wonder how this interacts with branch prediction. Since overflows should happen very rarely I guess the branch on overflow should almost always predict as non taken. So wouldn't it be possible to have a "branch if add would overflow" instruction or even canonical sequence that a higher end CPU can completely speculate around and just use speculation rollback if it overflows?

I think an important design point here is that the languages that need a lot of dynamic overflow checks are primarily used on beefier CPUs so if you can get around the code size issue, making it performant only on more capable designs is fine since the overflow check will be rare on simpler CPUs.

Comment · 6 years ago
I would argue that the stable syscall interfaces is one of the main drivers behind Linux success. Containers as we know them would be quite different if they needed to somehow merge the kernel version appropriate .so files into the fs. They would forever remain just sandboxes of the essentially the same distro as the host just like they are on Solaris/FreeBSD.

Also something like WSL would be impossible

Comment · 6 years ago
Maybe I'm missing something but e.g. on the Android clock you can dismiss an upcoming alarm. So now if you wake up, dismiss it and it never rings that kind of proofs you really woke up before, right?
Comment · 6 years ago
I think the most expensive isn't the address translation itself but TLB housekeeping when mappings get remapped or invalidated. This is especially true with virtualization where the hypervisor often needs to do extra work like (un)pinning guest pages, translating guest real addresses to host real and reissuing TLB flushes.
Comment · 7 years ago
Afaic the upcoming Porsche Taycan has a two speed transmission. In the Taycan it's used for more efficiency at >160 kph or so something an American car really doesn't need and it costs them a slower 0-100 kph. Tesla uses another trick to get better acceleration to 100 kph. They have two motors and one is geared for high efficiency at US highway cruising speeds (so ca 120 kph).

In general electric motors have a very wide band of excellent efficiency and an even wider band of great efficiency and they are orders of magnitude more efficient than ICE in any part of their operational torgue/speed range.

Comment · 7 years ago
I deleted my account when they purposefully made their Linux version not launch on any other FS than ext4. I use btrfs and that supports all the features they use, still Dropbox refused to work with it. I complained to their support and then deleted my account. Then again I guess having a private server with NextCloud means I'm pretty privileged.
Comment · 7 years ago
I hear this claim almost every day yet its been years since I've actually felt my normal work computers being slow. Hell, even booting an OS in an emulator running in a browser proper software still runs blazingly fast. It's just that some people seem to use an awful lot of terrible software but I don't seem to be one of those people
Comment · 7 years ago
Well at the very least running in a container gives you filesystem and network and PID space isolation, optionally also user namespace isolation.
Comment · 7 years ago
Docker also has support for user namespaces which makes it so that the root inside the container is e.g. nobody outside. In general I'd say docker (with user namespaces) is quite a bit more secure than running as a normal user without containers when it comes to escaping the container/the app being breached. However this is very distinct from the fact that it basically ignores all multi user aspects of Unix when it comes to using the docker command. So while the application inside is more secure, using docker is insecure. Now in the typical deployment scenario the latter doesn't really matter since an admin deploys and the developer only creates the image locally.
Comment · 7 years ago
Alacritty is pretty great, especially if you enable use of the new ConPTY API (needs Windows 19H1)

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton