Hacker News new | ask | show | jobs
by benreesman 554 days ago
If you know how to do serious software without spilling any memory then you should write it up and collect the most significant Turing Award ever.

Hackers would be immediately bifurcated into those who followed that practice and those who are helpless.

1 comments

> If you know how to do serious software without spilling any memory

This thread is about K8s Pods (and other K8s resources) that have been sitting idle, not memory leaks in software.

As far as "spilling" memory, the problem has already been solved by Rust which does not do garbage collection because it has static memory mapping. Does this mean egregious amounts of memory won't be used by some Rust programs? No. But unlike languages with garbage collection, where Rust is using that memory it is actually doing something with that memory.

I can assure you that memory leaks specifically and resource leaks generally are possible in any language more expressive than a stack machine with an arena.

Rust makes an interesting and demonstrably pragmatic set of tradeoffs here as opposed to e.g. C/C++: treating std::move as a default (aka linear typing) prevents a lot of leaks. But it still has pointers (Arc, etc.) and it still has tables: it’s still easy to leak in a long-lived process doing interesting things. For a lot of use cases it’s the better default and it’s popular as a result.

But neither Rust nor k8s have solved computer science.

:-)
Heh, yeah. No, no they have not.