Readit News logoReadit News
battle-racket commented on Fundamentals of garbage collection (2023)   learn.microsoft.com/en-us... · Posted by u/b-man
jlouis · 2 months ago
You can make a programming language where cycles are impossible. Erlang is a prime example.

Region inference is another strategy in this space. It can limit the need for full-blown garbage collection in many cases, but also comes with its own set of added trade-offs.

Reference counting is just a different kind of garbage collection, really. It acts like a dual construction to a tracing GC in many cases. If you start optimizing both, you tend to converge to the same ideas over time. Refcounting isn't void of e.g. latency problems either: if I have a long linked list and snip the last pointer, then we have to collect all of that list. That's going to take O(n) time in the size of the list. For that reason, you'd have to delay collecting the large list right away, which means you are converging toward a tracing GC that can work simultaneously with the mutator. See e.g., Go's garbage collector.

battle-racket · 2 months ago
> It acts like a dual construction to a tracing GC in many cases

yeah one of the most helpful realizations I’ve read is that tracing and ref counting are essentially two formulations of the same problem - one is finding objects that are alive (by tracing), and the other is finding things that are dead (i.e. their ref counts reach zero). and of course, every object is either dead or alive!

battle-racket commented on A list is a monad   alexyorke.github.io//2025... · Posted by u/polygot
mvdtnz · 2 months ago
The amount of people who tie themselves into knots to understand this pointless concept is very funny to me. I am 16 years into a successful software engineering career without learning what a monad is an it never held me back. Turns out I can use lists and optional types and all that jazz without it.

I mean really. Look at posts like this[0]. What does this give you? Nothing, in practical reality. Nothing.

[0] https://news.ycombinator.com/item?id=44446472

battle-racket · 2 months ago
funny that you call it pointless then admit you never learned what it is
battle-racket commented on Why Do Swallows Fly to the Korean DMZ?   sapiens.org/culture/korea... · Posted by u/gaws
OJFord · 2 months ago
> A quick chat says

Does that mean like 'a quick search' but with ChatGPT or similar? Haven't come across that before and I don't think I like it...

battle-racket · 2 months ago
"let me relay potentially made-up information because I'm too lazy and/or incompetent to read an article"
battle-racket commented on Show HN: pshunt: Terminal app for easily killing processes   github.com/jamesma100/psh... · Posted by u/battle-racket
eMPee584 · 2 months ago
Uhm, `htop` with process filter (`F4`), then `k` for kill did the job just fine for me for two decades, but it's always good to have another option coded in Go, right xD
battle-racket · 2 months ago
I didn't know you could do that, thanks! also, so what if I want to re-implement something that already exists? god people on hackernews are so miserable
battle-racket commented on Show HN: pshunt: Terminal app for easily killing processes   github.com/jamesma100/psh... · Posted by u/battle-racket
battle-racket · 2 months ago
Killing processes usually involves some combination of ps, grep, copying a pid, and running kill. To make this process slightly more efficient, I made a terminal app to list, search, and kill processes, all in one interface. Please share any feedback you have :)
battle-racket commented on Xeneva Operating System   github.com/manaskamal/Xen... · Posted by u/psnehanshu
yyyk · 3 months ago
It's always impressive when someone builds an OS.

To be noticed by a large community though, a new OS needs to be different from yet another C-based POSIX-style system. We already have a lot of those which are fine enough. It would be nice to see a new OS chucking away that legacy and doing some new things, supporting Linux via a WSL-style system at most.

u/battle-racket

KarmaCake day111October 16, 2024View Original