Hacker News new | past | comments | ask | show | jobs | submit login
JWZ, on Garbage Collection (jwz.org)
74 points by abstractbill on April 29, 2009 | hide | past | favorite | 29 comments



What separates good thinking/writing from a mediocre noise is that it remains relevant and interesting to read even in 10 years, despite missing rounded corners and lack of randomly chosen photos that are supposed to help us to understand his point.


Everything JWZ writes, even the rants, have a builtin life-support and relevance of at least 10 years.

Maybe I'm just too involved with the community, but Lispers tend to make some of the greatest rants, aphorisms, epigrams and one-liners out of any other hacker group I know, even when they're downright hostile :-)


Or, in some cases, specially when they're being hostile ;-)


and what does it say that it's probably been reachable at the same url for those 10 years?


...that it's now in the oldest generational set and will probably never be collected. :)


And this was written before Java's garbage collector was even good.


As well as before Python got cyclic GC, while we're at it.


I've been thinking that Perl, Python, Ruby, and GNU Smalltalk have really hurt the case of Garbage Collection by being so Open and visible, and yet having such low expectations for so much of their early life. In the meantime, Java has really helped it by putting some great GC technology in front of a large audience. (Basically lagging the commercial Smalltalk engines by a few years for the past 10. They've since caught up and surpassed.) The new Javascript engines are also doing this.

(At one job, I wrote an infinite loop background process that did nothing but allocate memory, and ran it in the test environment of the Smalltalk trading application I was maintaining. Unless you did certain intensive operations, you couldn't tell the difference. The GC handled it without a hiccup. I could've put that into production, and almost no one would've had any idea it was there.)


Perhaps slightly off topic and probably not worth its own submission, but anyone visiting this thread might be interested to know about the cool things in store for us with the next generation of garbage collectors:

http://www.infoq.com/news/2009/04/g1


I agree with the points expressed on this article. Fully. But "I claim", "I claim", ..., will not convince a lot of people. Ah and... unfortunately after 10 years the situation is still the same, we are still writing malloc/free and no standard, high quality, widely accepted GC for C/C++ is here. At least now valgrind is able to remove most of the leaks without too much efforts compared to 10 years ago.


In a certain online forum, I was once taken to task for saying "I assert". People criticized it because it was "just" an assertion, not backed up with facts.

The thing is, I am punctilious about labeling the various parts of my arguments: this is an incontrovertible fact, this is strongly supported by evidence, this is an assertion, and that is a wild-assed guess.

A certain kind of engineering-oriented mind (a) wants to be fair in not claiming too much; (b) wants to have a productive debate that can actually move forward.

The ironic thing about me being taken to task is that I provided far more evidence in my posts than most people in that forum (a town social / political email list), but because most participants conflated their assertions with their defensible fact-based points, they were never called on it, but because I was more intellectually honest, I was perceived as asserting facts more often, even though I did it less.

So, my point is this:

I applaud JWZ for labeling his assertions as such; agree with him or disagree with him, at least he's playing the intellectual game of debate on a fair and level playing field, and even helpfully labelled the stronger and weaker points of his argument. Win or lose, it's a lot more possible to have a constructive conversation.


I sympathize with the sentiment, but C's and C++'s lack of a memory model is really a barrier (ahem) to GC development.

It's amazing that the BDW GC works as well as it does. I hack on Guile, and we're actually switching to use it.


Is it just me or does every GC is faster argument boil down to: "All working real world examples are noticeably slower, but trust me, I know of this amazing GC that's actually faster it's just not in production use anywhere yet."


That hasn't been my experience at all. The JVM garbage collector kicks ass today, right now in real applications all over the world, and the next one is going to be even better. There is very likely a class of application out there where extreme micro-optimization is still a good tradeoff (Google's search maybe?), but anyone arguing that they really need to write it in C and do their own memory management carries the burden of proof these days, not the other way around.

In fact many would argue that for small, short-lived objects that the Sun GC outperforms malloc/free. This is a topic of debate, obviously.


Operating systems, drivers and small embeded systems. I'm sure there are a few others. These also happen to be C's problem domain in the modern era.


Yeah, for Google most of the code that runs when you do a search is C++. (There's a lot of backend servers that handle different things so it isn't 100%, but the core search engine is definitely C++.) It's not just that it's extremely micro-optimized... the general issue is that when your code is running on enough machines it's more often a good tradeoff to spend programmer time to increase performance.


Exactly. Spending programmer time to gain some marginal improvement in CPU cycle efficiency is almost always a bad call, except when that code is going to run on a GAJILLION CPUs all of which use a lot of electricity etc.

I still think that this is only the case for a tiny fraction of all the code out there (Java is f*ing fast these days), and will become less and less true with each passing year.


As always, it depends. For most cases, Garbage Collection is faster than malloc/free. On some platforms, Java can allocate objects in like 3 instructions. It does this because garbage collection allows for optimizations that simply aren't possible using manual memory allocation.

Of course, there are apps that require manual memory management, but they are becoming few and far between.


Only that the amazing GC JWZ states as examples (Smalltalk, Lisp) are used in production ourdays.


As previously noted, this article was written a while ago, and is somewhat critical of 'bad' GC's: Perl, Python & Java in particular. I think Perl is still using reference counting, which has its own drawbacks, but I think most would agree that Java's GC has grown to be pretty good over the years. And now there's C#, which seems to have a decent GC as well.


> This is because large applications have nontrivial object life cycles, and so you end up spending all of your time trying to figure out what exactly those life cycles are.

GC just abets to care less about memory management in applications.


This text is more than 10 years old (1998).

Are you just indirectly polling if there is still controversy about GC?


Are you just indirectly polling if there is still controversy about GC?

There is, apparently: http://news.ycombinator.com/item?id=585094


Nice 10 year old rant :-)


Double meaning is the guy who picks up the litter in his nightclub.


When you spent your precious youth creating XEmacs, mozilla, and netscape navigator, you're sure as hell allowed to have a pet nightclub; can you think of a better way to hack the popularity problem than to own a kickass music venue for hipsters?

Don't hate the playa, hate the game! ;-)


I didn't think his comment was negative. It seems weird that it's downvoted. However, since you mentioned it...

DNA is a weird spot. It's a great space. JWZ obviously tried to recreate a subculture that was never hugely popular but sort of maybe had its heyday and died in the 90s. The sort of only-in-SF cyber-industrial-goth thing. Front242, Throbbing Gristle and Cabaret Voltaire remixes. Every guy looks like Robert Smith with a top hat, wearable computer, and zombie boots. Proto-burning-man meets blade runner sort of thing.

It's definitely not a favorite for hipsters. It only comes close on mashup night, and even those "hipsters" are all 38 years old. The whole hipster in SF thing is bit of a hoax. All those hipsters are really web designers who went to Stanford, which wasn't really hip ever, but certainly hasn't been hip since 1999. What is now known as hipster in SF was called "yuppie" 20 years ago. It's just different brands of shoes and alcohol - even the tight pants remain the same.


I didn't downvote the poster above, but it's unfair of him not to address the article and its content, and its make a snide remark about how the author makes his living nowadays. Borderline ad hominem, imo.


I wasn't trying to get at JWZ, I was just making a silly unrelated joke, almost a pun. I don't have anything against him.

But I'll try and be more clear next time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: