Recent submissions

Comment · 4 days ago
I’m surprised because Apple has famously (and publicly) argued in the past that touchscreens on laptops were a bad idea. Things can change, of course, but I don’t see anything here that even attempts to invalidates any of the arguments they made against touchscreen laptops at the time, which I still think were pretty compelling.

For example, raising your arm to interact with a screen for any sustained period just doesn’t work ergonomically. In my experience, people who buy touchscreen-enabled laptops quickly loose the habit of using the touchscreen for exactly that reason.

It also makes the display look dirty. I expected Apple to pair this with some new coating or display technology that would reduce fingerprints and smudges, etc, but I’m not seeing anything like that either.

Overall I’m surprised Apple would add a whole new interaction model to the MacBook and barely explain why. Given how central UX has always been to Apple (they make a big deal of the mouse, the click wheel and multi-touch, etc.) That feels very... un-Apple.

Comment · 2 months ago
This is specifically for immigrant visas. USCIS distinguishes two broad categories of visas: immigrants and non-immigrants. Tourists are part of the latter group.
Comment · 8 months ago
> Says frustrating things like "so I can just use unsafe", because no you don't and if you do I would reject your changes immediately.

This is the kind of hostility (which is frankly toxic) that’s become associated with parts of the Rust community, and has fairly or not, driven away many talented people over time.

Comment · 9 months ago
> Rust invented the concept of ownership as a solution memory management issues without resorting to something slower like Garbage Collection or Reference Counting.

This is plain wrong, and it undermines the credibility of the author and the rest of the piece. Rust did not invent ownership in the abstract; it relies on plain RAII, a model that predates Rust by decades and was popularized by C++. What Rust adds is a compile-time borrow checker that enforces ownership and lifetime rules statically, not a fundamentally new memory-management paradigm.

Comment · 11 months ago
> It actually took a lot longer to re-write the game in C++ than it took me to write the original machine code version 20 years earlier.

Is the most interesting quote IMO. I often feel like productivity has gone down significantly in recent years, despite tooling and computers being more numerous/sophisticated/fast.

Comment · 1 year ago
I’m very excited for Zig personally, but calling it “ultra reliable” feels very premature.

The language isn’t even stable, which is pretty much the opposite of something you can rely on.

We’ll know in many years if it was something worth relying on.

Comment · 1 year ago
It was nighttime in Singapore when the ruling was announced. My husband and I scrambled to find a flight back. The best we could find, at any price, lands 25mins after the deadline.

We are on our way there.

Comment · 1 year ago
It’s really the hardware block size that matters in this case (direct I/O). That value is a property of the hardware and can’t be changed.

In some situations, the “logical” block size can differ. For example, buffered writes use the page cache, which operates in PAGE_SIZE blocks (usually 4K). Or your RAID stripe size might be misconfigured, stuff like that. Otherwise they should be equal for best outcomes.

In general, we want it to be as small as possible!

Comment · 1 year ago
Just to add my two cents—I’ve been writing Go professionally for about 10 years, and neither I nor any of my colleagues have had real issues with how Go handles errors.

Newcomers often push back on this aspect of the language (among other things), but in my experience, that usually fades as they get more familiar with Go’s philosophy and design choices.

As for the Go team’s decision process, I think it’s a good thing that the lack of consensus over a long period and many attempts can prompt them to formally define a position.

Comment · 1 year ago
I’m amazed by the ambition, technical brilliance, and relentless dedication behind some personal projects on display here.

All of this for a clock! I don’t get it, but I’m in awe.

Comment · 1 year ago
Eminently pragmatic solution — I like it. In Rust, a crate is a compilation unit, and the compiler has limited parallelism opportunities, especially since rustc offloads much of the work to LLVM, which is largely single-threaded.

It’s not surprising they didn’t see a linear speedup from splitting into so many crates. The compiler now produces a large number of intermediate object files that must be read back and linked into the final binary. On top of that, rustc caches a significant amount of semantic information — lifetimes, trait resolutions, type inference — much of which now has to be recomputed for each crate, including dependencies. That introduces a lot of redundant work.

I also would expect this to hurt runtime performance as it likely reduces inlining opportunities (unless LTO is really good now?)

Comment · 2 years ago
It would be great to know a bit more about the protocol itself in the readme. I’m left wondering if it’s reliable connection-oriented, stream or message based, etc.
Comment · 2 years ago
I am not sure I buy the underlying idea behind this piece, that somehow a lot of money/time has been invested into asynchronous IO at the expense of thread performance (creation time, context switch time, scheduler efficiency, etc.).

First, significant work has been done in the kernel in that area simply because any gains there massively impact application performance and energy efficiency, two things the big kernel sponsors deeply care about.

Second, asynchronous IO in the kernel has actually been underinvested for years. Async disk IO did not exist at all for years until AIO came to be. And even that was a half-backed, awful API no one wanted to use except for some database people who needed it badly enough to be willing to put up with it. It's a somewhat recent development that really fast, genuinely async IO has taken center stage through io_uring and the likes of AF_XDP.

Comment · 2 years ago
> Under the asynchronous model, both timeouts and cancellation simply compose. You take a future representing the work you're doing, and spawn a new future that completes after sleeping for some duration, or spawn a new future that waits on a cancel channel. Then you just race these futures. Take whichever completes first and cancel the other.

That only works when what you're trying to do has no side effect. Consider what happens when you need to cancel a write to a file or a stream. Did you write everything? Something? Nothing? What's the state of the file/stream at this point?

Unfortunately, this is intractable: you'll need the underlying system to let you know, which means you will have to wait for it to return. Therefore, if these operations should have a deadline, you'll need to be able to communicate that to the kernel.

Comment · 2 years ago
I think the author knows very well what UB is and means. But he’s thinking critically about the whole system.

UB is meant to add value. It’s possible to write a language without it, so why do we have any UB at all? We do because of portability and because it gives flexibility to compilers writers.

The post is all about whether this flexibility is worth it when compared with the difficulty of writing programs without UB.

The author makes the case that (1) there seem to be more money lost on bugs than money saved on faster bytecode and (2) there’s an unwillingness to do something about it because compiler writers have a lot of weight when it comes to what goes into language standards.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton