Recent submissions

Comment · 1 month ago
He was a great compiler engineer, a great collaborator, and a better friend. I count myself lucky having known him, and getting to spend a few of his last hours with him. Rest in peace my friend.
Comment · 7 months ago
Everything else in the siblings is true, but remember that the language and std types in rust all do this already. Most of the time it’s better to use a native enum or optional/result because they do this in the compiler/lib. It’s only really worth it if you need more than a few types or need precise control of the representation for C interop or something.
Comment · 7 months ago
It’s Hana Dusikova’s paper IIRC.
Comment · 7 months ago
There’s a paper in flight to add a stdlib type to handle pointer tagging as well while preserving pointer provenance and so-forth. It’s currently best to use the intptr types, but the goal is to make it so that an implementation can provide specializations based on what bits of a pointer are insignificant, or even ignored, on a given target without user code having to be specialized. Not sure where it has landed since discussion in SG1 but seemed like a good idea.
Comment · 11 months ago
Comment · 1 year ago
Comment · 1 year ago
Quite so. We would have too, but I left out the nasty bit that someone had at one point put a callback argument in an internal launching API that runs between fork and exec. Still working on squashing the last of those.
Comment · 1 year ago
The other place it comes up is launchers and resource managers. We actually have a series of old issues and implementation work on flux (large scale resource manager for clusters) working around fork becoming a significant bottleneck in parallel launch. IIRC it showed up when we had ~1gb of memory in use and needed to spawn between 64 and 192 processes per node. That said, we actually didn’t pivot to vfork, we pivoted to posix_spawn for all but the case where we have to change working directory (had to support old glibc without the attr for that in spawn). If you’re interested I think we did some benchmarking with public results I could dredge up.

Anyway, much as I have cases where it matters I guess what I’m saying is I think you’re right that vfork is rarely actually necessary, especially since you’d probably have a much easier time getting a faster and still deterministic spawn if it ever actually becomes a bottleneck for something you care about.

Comment · 1 year ago
I largely agree, and use these patterns in C, but you’re neglecting the usual approach of having a default or stub implementation in the base for classic OOP. There’s also the option of using interfaces in more modern OOP or concept-style languages where you can cast to an interface type to only require the subset of the API you actually need to call. Go is a good example of this, in fact doing the lookup at runtime from effectively a table of function pointers like this.
Comment · 1 year ago
You have this largely right, but I need to defend the Radeon driver a bit here. The driver that caused all the problems was the proprietary fglrx driver, not the open source Radeon driver. The issue with the Radeon driver wasn’t stability, it was that it was 2d acceleration only.
Comment · 1 year ago
I just started giving it a try again about a week ago, and I second this. A year ago it was nearly unusable for any extension outside their preferred list, now it’s largely a pleasant experience.
Comment · 1 year ago
I’m rather hoping there’s something better, but various CAD formats support specifying assemblies of objects, and joints between those objects that can represent properties like that. Often this comes with at least some level of simulation, or if not simulation imposed constraints like in the FreeCAD assembly workbench, allowing you to move connected parts in the assembly but only through the range permitted by the “joint”. I quote that because that includes things like meshed gears, linear slides, ball joints, all kinds of things like that some of which I would not call joints as such.
Comment · 1 year ago
The short answer is yes, Linux can be informed to some extent but often you still want a memory balloon driver so that the host can “allocate” memory out of the VM so the host OS can reclaim that memory. It’s not entirely trivial but the tools exist, and it’s usually not too bad on vz these days when properly configured.
Comment · 1 year ago
> Is this obvious, simple, and default behaviour?

Yes. There are two options IIRC, minimum layers and maximum layers (one per dep by default unless that makes too many, which is handled automatically) depending on what you want, and it’s a Boolean flag. If you need more control it’s more complicated but this one really is a strange criticism unless they’re using non-standard wrappers for the usual nix way to do this.

Comment · 1 year ago
Much as the article makes good points, I find it difficult to believe that the list of meats banned by kosher and halal matches the top allergies and disease risk factors as well as it does without some intent. Pork was, until very recently, the greatest risk for parasitic infection, insects in a similar spot. Shellfish are the top meat allergy, by a whole lot. Most of the rest of the rules about preparation amount to good practices for ensuring cleanliness or at least reasonable preservation and parasite prevention. There are exceptions, I can’t think of a practical reason for not allowing meat and dairy to come into contact, but the vast majority would have kept people healthier.

Whether it originated from an us vs them ideology or not, there were practical benefits for a population that made those choices that would have reinforced it in pre-modern times.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton